LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Brent Lu <brent.lu@intel.com>, alsa-devel@alsa-project.org
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Rander Wang <rander.wang@intel.com>,
	linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Paul Olaru <paul.olaru@oss.nxp.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Julian Braha <julianbraha@gmail.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Subject: Re: [PATCH] ASoc: Intel: glk_rt5682_max98357a: support ALC5682I-VS codec
Date: Thu, 28 Oct 2021 08:58:00 -0500	[thread overview]
Message-ID: <2ca92247-70c6-a092-8fe2-cfca9d6f18e6@linux.intel.com> (raw)
In-Reply-To: <20211028060203.446093-1-brent.lu@intel.com>




> @@ -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",
> 

  reply	other threads:[~2021-10-28 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28  6:02 Brent Lu
2021-10-28 13:58 ` Pierre-Louis Bossart [this message]
2021-10-28 14:20   ` Lu, Brent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ca92247-70c6-a092-8fe2-cfca9d6f18e6@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=brent.lu@intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=geert@linux-m68k.org \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=julianbraha@gmail.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=paul.olaru@oss.nxp.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=rander.wang@intel.com \
    --cc=tiwai@suse.com \
    --cc=yang.jie@linux.intel.com \
    --subject='Re: [PATCH] ASoc: Intel: glk_rt5682_max98357a: support ALC5682I-VS codec' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).