Message ID | 20210204203312.27112-15-pierre-louis.bossart@linux.intel.com |
---|---|
State | Accepted |
Commit | 026370cb5bd7ef7999bc4379ab89ffd7a73874f2 |
Headers | show |
Series | ASoC: SOF/Intel/SoundWire: add missing quirks and DMIC support | expand |
On Thu, Feb 04, 2021 at 02:33:12PM -0600, Pierre-Louis Bossart wrote: > /* allow for module parameter override */ > - if (hda_dmic_num != -1) > + if (hda_dmic_num != -1) { This is breaking in an x86 allmodconfig build due to: /mnt/kernel/sound/soc/sof/intel/hda.c: In function 'dmic_topology_fixup': /mnt/kernel/sound/soc/sof/intel/hda.c:615:6: error: 'hda_dmic_num' undeclared (first use in this function); did you mean 'dmic_num'? if (hda_dmic_num != -1) { ^~~~~~~~~~~~ dmic_num /mnt/kernel/sound/soc/sof/intel/hda.c:615:6: note: each undeclared identifier is reported only once for each function it appears in which will actually be triggered by one of the earlier patches in the series (my script is going through things in reverse order), that variable is only defined for CONFIG_SOC_SOF_HDA.
On 2/5/21 9:33 AM, Mark Brown wrote: > On Thu, Feb 04, 2021 at 02:33:12PM -0600, Pierre-Louis Bossart wrote: > >> /* allow for module parameter override */ >> - if (hda_dmic_num != -1) >> + if (hda_dmic_num != -1) { > > This is breaking in an x86 allmodconfig build due to: > > /mnt/kernel/sound/soc/sof/intel/hda.c: In function 'dmic_topology_fixup': > /mnt/kernel/sound/soc/sof/intel/hda.c:615:6: error: 'hda_dmic_num' undeclared (first use in this function); did you mean 'dmic_num'? > if (hda_dmic_num != -1) { > ^~~~~~~~~~~~ > dmic_num > /mnt/kernel/sound/soc/sof/intel/hda.c:615:6: note: each undeclared identifier is reported only once for each function it appears in > > which will actually be triggered by one of the earlier patches in the > series (my script is going through things in reverse order), that > variable is only defined for CONFIG_SOC_SOF_HDA. That's not good. Please drop this patch for now, it's nice-to-have and not critical. I'll have to figure out why this wasn't reported earlier.
On Fri, Feb 05, 2021 at 09:47:39AM -0600, Pierre-Louis Bossart wrote: > On 2/5/21 9:33 AM, Mark Brown wrote: > > On Thu, Feb 04, 2021 at 02:33:12PM -0600, Pierre-Louis Bossart wrote: > > This is breaking in an x86 allmodconfig build due to: > > which will actually be triggered by one of the earlier patches in the > > series (my script is going through things in reverse order), that > > variable is only defined for CONFIG_SOC_SOF_HDA. > That's not good. Please drop this patch for now, it's nice-to-have and not > critical. > I'll have to figure out why this wasn't reported earlier. Like I say it's not that patch that's causing the break, I didn't walk through and work out which one was - the patch isn't actually adding the usage or anything.
> Like I say it's not that patch that's causing the break, I didn't walk > through and work out which one was - the patch isn't actually adding the > usage or anything. Ah yes, you're correct. Mea culpa. We're using the parameter for HDA and SoundWire now, but HDA is disabled with allmodconfig due to a mutual exclusion with NOCODEC. I've had this on my todo list for a while. We need something like this, will test and resend a v2. Sorry about the noise. diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 2014058bddf2..0dc3a8c0f5e3 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -285,11 +285,13 @@ static char *hda_model; module_param(hda_model, charp, 0444); MODULE_PARM_DESC(hda_model, "Use the given HDA board model."); -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) || IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE) static int hda_dmic_num = -1; module_param_named(dmic_num, hda_dmic_num, int, 0444); MODULE_PARM_DESC(dmic_num, "SOF HDA DMIC number"); +#endif +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) static bool hda_codec_use_common_hdmi = IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI); module_param_named(use_common_hdmi, hda_codec_use_common_hdmi, bool, 0444); MODULE_PARM_DESC(use_common_hdmi, "SOF HDA use common HDMI codec driver");
On Fri, Feb 05, 2021 at 10:38:54AM -0600, Pierre-Louis Bossart wrote: > > Like I say it's not that patch that's causing the break, I didn't walk > > through and work out which one was - the patch isn't actually adding the > > usage or anything. > Ah yes, you're correct. Mea culpa. We're using the parameter for HDA and > SoundWire now, but HDA is disabled with allmodconfig due to a mutual > exclusion with NOCODEC. I've had this on my todo list for a while. > We need something like this, will test and resend a v2. Sorry about the > noise. Yeah, that looks like it should do the job.
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index a61eb7afd364..5926d23da9ae 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -612,8 +612,12 @@ static int dmic_topology_fixup(struct snd_sof_dev *sdev, dmic_num = check_nhlt_dmic(sdev); /* allow for module parameter override */ - if (hda_dmic_num != -1) + if (hda_dmic_num != -1) { + dev_dbg(sdev->dev, + "overriding DMICs detected in NHLT tables %d by kernel param %d\n", + dmic_num, hda_dmic_num); dmic_num = hda_dmic_num; + } switch (dmic_num) { case 1: