linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Lu, Brent" <brent.lu@intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: "Rojewski, Cezary" <cezary.rojewski@intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	"M, Naveen" <naveen.m@intel.com>,
	"Zhi, Yong" <yong.zhi@intel.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Libin Yang <libin.yang@linux.intel.com>,
	"Chiang, Mac" <mac.chiang@intel.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Rander Wang <rander.wang@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	"Song, Chao" <chao.song@intel.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Jason Yan <yanaijie@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp
Date: Tue, 30 Jun 2020 11:26:53 -0500	[thread overview]
Message-ID: <e7bd9caf-1bf8-d57c-2b67-13a63d23ebf9@linux.intel.com> (raw)
In-Reply-To: <DM6PR11MB4316CA5F11462D11D1751C6C976F0@DM6PR11MB4316.namprd11.prod.outlook.com>


>> diff --git a/sound/soc/intel/boards/Kconfig
>> b/sound/soc/intel/boards/Kconfig index 3d820e1..b3b863e 100644
>> --- a/sound/soc/intel/boards/Kconfig
>> +++ b/sound/soc/intel/boards/Kconfig
>> @@ -291,9 +291,17 @@ config
>> SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
>>   	select SND_SOC_DMIC
>>   	select SND_SOC_HDAC_HDMI
>>
>> +config SND_SOC_INTEL_DA7219_MAX98390_GENERIC
>> +	tristate
>> +	select SND_SOC_DA7219
>> +	select SND_SOC_MAX98390
>> +	select SND_SOC_DMIC
>> +	select SND_SOC_HDAC_HDMI
>> +
>>   config SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
>>   	tristate
>>   	select SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
>> +	select SND_SOC_INTEL_DA7219_MAX98390_GENERIC

this doesn't look too good, the only difference is the addition of 
MAX98090 which should be added in SND_SOC_INTEL_DA7219_MAX98357A_GENERIC 
above.

>>
>>   if SND_SOC_INTEL_APL
>>
>> @@ -309,6 +317,18 @@ config
>> SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
>>   	   Say Y or m if you have such a device. This is a recommended option.
>>   	   If unsure select "N".
>>
>> +config SND_SOC_INTEL_BXT_DA7219_MAX98390_MACH
>> +	tristate "Broxton with DA7219 and MAX98390 in I2S Mode"
>> +	depends on I2C && ACPI && GPIOLIB
>> +	depends on MFD_INTEL_LPSS || COMPILE_TEST
>> +	depends on SND_HDA_CODEC_HDMI
>> +	select SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
>> +	help
>> +	   This adds support for ASoC machine driver for Broxton-P platforms
>> +	   with DA7219 + MAX98390 I2S audio codec.
>> +	   Say Y or m if you have such a device. This is a recommended option.
>> +	   If unsure select "N".
>> +

i don't think you need a different top-level config, just extend the 
existing one to say MAX98357A or MAX98390.

[...]

>>   	if (soc_intel_is_glk())
>>   		snd_soc_dapm_add_routes(&card->dapm, gemini_map,
>>   					ARRAY_SIZE(gemini_map));
>> @@ -631,17 +719,17 @@ static int bxt_card_late_probe(struct snd_soc_card
>> *card)
>>   		component = pcm->codec_dai->component;
>>   		snprintf(jack_name, sizeof(jack_name),
>>   			"HDMI/DP, pcm=%d Jack", pcm->device);
>> -		err = snd_soc_card_jack_new(card, jack_name,
>> +		ret = snd_soc_card_jack_new(card, jack_name,
>>   					SND_JACK_AVOUT,
>> &broxton_hdmi[i],
>>   					NULL, 0);
>>
>> -		if (err)
>> -			return err;
>> +		if (ret)
>> +			return ret;
>>
>> -		err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device,
>> +		ret = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device,
>>   						&broxton_hdmi[i]);
>> -		if (err < 0)
>> -			return err;
>> +		if (ret < 0)
>> +			return ret;

these look like unrelated changes?


>> --- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c
>> +++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c
>> @@ -15,8 +15,8 @@ static struct snd_soc_acpi_codecs rt1011_spk_codecs =
>> {  };
>>
>>   static struct snd_soc_acpi_codecs max98357a_spk_codecs = {
>> -	.num_codecs = 1,
>> -	.codecs = {"MX98357A"}
>> +	.num_codecs = 2,
>> +	.codecs = {"MX98357A", "MX98390"}

That looks just wrong?

It would be really odd to list two devices as prerequisites for loading 
a driver, when in practice they are mutually exclusive? Something's 
broken in coreboot if both are present.

see below what we used for JSL:

see static struct snd_soc_acpi_codecs jsl_7219_98373_codecs = {
	.num_codecs = 1,
	.codecs = {"MX98373"}
};

static struct snd_soc_acpi_codecs mx98360a_spk = {
	.num_codecs = 1,
	.codecs = {"MX98360A"}
};

  reply	other threads:[~2020-06-30 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  6:32 [PATCH] ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp Brent Lu
2020-06-30  6:46 ` Lu, Brent
2020-06-30 16:26   ` Pierre-Louis Bossart [this message]
2020-07-01  9:36     ` 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=e7bd9caf-1bf8-d57c-2b67-13a63d23ebf9@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=chao.song@intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=krzk@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=libin.yang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mac.chiang@intel.com \
    --cc=naveen.m@intel.com \
    --cc=perex@perex.cz \
    --cc=rander.wang@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=yanaijie@huawei.com \
    --cc=yang.jie@linux.intel.com \
    --cc=yong.zhi@intel.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).