[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ca92247-70c6-a092-8fe2-cfca9d6f18e6@linux.intel.com>
Date: Thu, 28 Oct 2021 08:58:00 -0500
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Brent Lu <brent.lu@...el.com>, alsa-devel@...a-project.org
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@...ux.intel.com>,
Cezary Rojewski <cezary.rojewski@...el.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Rander Wang <rander.wang@...el.com>,
linux-kernel@...r.kernel.org, Takashi Iwai <tiwai@...e.com>,
Jie Yang <yang.jie@...ux.intel.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Paul Olaru <paul.olaru@....nxp.com>,
Nathan Chancellor <nathan@...nel.org>,
Julian Braha <julianbraha@...il.com>,
Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>
Subject: Re: [PATCH] ASoc: Intel: glk_rt5682_max98357a: support ALC5682I-VS
codec
> @@ -592,12 +610,29 @@ static int geminilake_audio_probe(struct platform_device *pdev)
> struct snd_soc_acpi_mach *mach;
> const char *platform_name;
> struct snd_soc_card *card;
> - int ret;
> + int ret, i;
>
> ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
> if (!ctx)
> return -ENOMEM;
>
> + /* Detect the headset codec variant */
> + if (acpi_dev_present("RTL5682", NULL, -1)) {
> + /* ALC5682I-VS is detected */
> + ctx->is_rt5682s = 1;
> +
> + for (i = 0; i < glk_audio_card_rt5682_m98357a.num_links; i++) {
> + if (strcmp(geminilake_dais[i].name, "SSP2-Codec"))
> + continue;
> +
> + /* update the dai link to use rt5682s codec */
> + geminilake_dais[i].codecs = ssp2_codec_5682s;
> + geminilake_dais[i].num_codecs = ARRAY_SIZE(ssp2_codec_5682s);
> + break;
> + }
> + } else
> + ctx->is_rt5682s = 0;
> +
nit-pick: this branch is not required, the field is already reset with
kzalloc().
> INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
>
> card = &glk_audio_card_rt5682_m98357a;
> diff --git a/sound/soc/intel/common/soc-acpi-intel-glk-match.c b/sound/soc/intel/common/soc-acpi-intel-glk-match.c
> index 32fff9389eb3..4de4add74443 100644
> --- a/sound/soc/intel/common/soc-acpi-intel-glk-match.c
> +++ b/sound/soc/intel/common/soc-acpi-intel-glk-match.c
> @@ -40,6 +40,15 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
> .sof_fw_filename = "sof-glk.ri",
> .sof_tplg_filename = "sof-glk-rt5682.tplg",
> },
> + {
> + .id = "RTL5682",
> + .drv_name = "glk_rt5682_max98357a",
> + .fw_filename = "intel/dsp_fw_glk.bin",
Have you actually tested with this firmware? if not, it's probably
better not to list it as an option.
> + .machine_quirk = snd_soc_acpi_codec_list,
> + .quirk_data = &glk_codecs,
> + .sof_fw_filename = "sof-glk.ri",
> + .sof_tplg_filename = "sof-glk-rt5682.tplg",
> + },
> {
> .id = "10134242",
> .drv_name = "glk_cs4242_mx98357a",
>
Powered by blists - more mailing lists