public inbox for linux-kernel@vger.kernel.org
 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: "C, Balamurugan" <balamurugan.c@intel.com>,
	"Rojewski, Cezary" <cezary.rojewski@intel.com>,
	Chao Song <chao.song@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	"Wang, Rander" <rander.wang@intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Takashi Iwai <tiwai@suse.com>,
	"Song, Gongjun" <gongjun.song@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	"Chiang, Mac" <mac.chiang@intel.com>,
	Mark Brown <broonie@kernel.org>,
	"Reddy, Muralidhar" <muralidhar.reddy@intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Ajye Huang <ajye.huang@gmail.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	"Gopal, Vamshi Krishna" <vamshi.krishna.gopal@intel.com>,
	"Zhi, Yong" <yong.zhi@intel.com>
Subject: Re: [PATCH 2/2] ASoC: Intel: sof_rt5682: quirk auto detection
Date: Wed, 26 Oct 2022 20:30:00 -0500	[thread overview]
Message-ID: <bba5dc19-c0c4-2409-6cd2-c8fa91950444@linux.intel.com> (raw)
In-Reply-To: <CY5PR11MB6257D168A60B712088BC7CF797339@CY5PR11MB6257.namprd11.prod.outlook.com>



On 10/26/22 19:13, Lu, Brent wrote:
>>
>> This is a bit confusing: this quirk does not work for Volteer
>>
>> 	{
>> 		.callback = sof_rt5682_quirk_cb,
>> 		.matches = {
>> 			DMI_MATCH(DMI_PRODUCT_FAMILY,
>> "Google_Volteer"),
>> 			DMI_MATCH(DMI_OEM_STRING, "AUDIO-
>> MAX98373_ALC5682I_I2S_UP4"),
>> 		},
>> 		.driver_data = (void *)(SOF_RT5682_MCLK_EN |
>> 					SOF_RT5682_SSP_CODEC(0) |
>> 					SOF_SPEAKER_AMP_PRESENT |
>>
>> 	SOF_MAX98373_SPEAKER_AMP_PRESENT |
>> 					SOF_RT5682_SSP_AMP(2) |
>> 					SOF_RT5682_NUM_HDMIDEV(4)),
>> 	},
> 
> I checked Volteer reference kit, it should use SSP1 for amplifier. It seems to me 
> this quirk is for some customer variants which implements MAX98373 on SSP2.
> 
>>
>> Same for Brya and all usages of SSP_AMP(2)
>>
>>
> 
> It's a compromise that Google implements amplifiers on SSP2 on Brya so they can 
> connect SDW codec to SSP1 pins, but we asked customers to implement amplifiers 
> on SSP1 to reserve BT offload capability.

I appreciate what you are trying to suggest, and I am all for trying to
put this proliferation of quirks under control, but the autodetection
based on rules seems out-of-reach if we don't first cleanup the existing
quirks.

If "volteer" and "brya" mean different things to different people, and
reference and derivatives are not well identified, the odds of
regressions seem very high to me.

> 
>>> -	{
>>> -		.name = "adl_rt1019_rt5682s",
>>> -		.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
>>> -					SOF_RT5682_SSP_CODEC(0) |
>>> -
>> 	SOF_RT5682S_HEADPHONE_CODEC_PRESENT |
>>
>> and HEADPHONE_CODEC_PRESENT is not handled either.
>>
> 
> Headphone type will be detected later in the sof_audio_probe().
> 
>>> -					SOF_SPEAKER_AMP_PRESENT |
>>> -					SOF_RT1019_SPEAKER_AMP_PRESENT
>> |
>>> -					SOF_RT5682_SSP_AMP(1) |
>>> -					SOF_RT5682_NUM_HDMIDEV(4)),
>>> -	},
>>
>> Overall I doubt that the SOC alone can tell you what the quirk is.
>>
>> Maybe it's a default to avoid repeats of the same baseline configuration, but
>> there's not much else that can be infer from an SOC definition in light of the
>> creativity of our hardware friends who routinely swap interfaces.
> 
> I'm thinking about using kernel module parameters for those boards which do not
> use default SSP port allocation. Not sure it's doable for machine driver module.

That's not a working solution IMHO, the kernel parameters should be used
by expert developers only for specific and short-term debug. It's not
possible to add a dependency on kernel parameters, that would prevent a
kernel update.

  reply	other threads:[~2022-10-27  2:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26  7:14 [PATCH 0/2] ASoC: Intel: sof_rt5682: quirk auto detection Brent Lu
2022-10-26  7:14 ` [PATCH 1/2] ASoC: Intel: add helpers to detect SoCs Brent Lu
2022-10-26  7:14 ` [PATCH 2/2] ASoC: Intel: sof_rt5682: quirk auto detection Brent Lu
2022-10-26 20:34   ` Pierre-Louis Bossart
2022-10-27  0:13     ` Lu, Brent
2022-10-27  1:30       ` Pierre-Louis Bossart [this message]
2022-10-27  4:33         ` Lu, Brent
2022-10-27 13:36         ` Mark Brown

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=bba5dc19-c0c4-2409-6cd2-c8fa91950444@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=ajye.huang@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=balamurugan.c@intel.com \
    --cc=brent.lu@intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=chao.song@linux.intel.com \
    --cc=gongjun.song@intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mac.chiang@intel.com \
    --cc=muralidhar.reddy@intel.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=rander.wang@intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=vamshi.krishna.gopal@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