ALSA: hda: intel-nhlt: verify config type
Pierre-Louis Bossart authored
[ Upstream commit a864e8f1 ]

Multiple bug reports report issues with the SOF and SST drivers when
dealing with single microphone cases.

We currently read the DMIC array information unconditionally but we
don't check that the configuration type is actually a mic array.

When the DMIC link does not rely on a mic array configuration, the
recommendation is to check the format information to infer the maximum
number of channels, and map this to the number of microphones.

This leaves a potential for a mismatch between actual microphones
available in hardware and what the ACPI table contains, but we have no
other source of information.

Note that single microphone configurations can alternatively be
handled with a 'mic array' configuration along with a 'vendor-defined'
geometry.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201251
BugLink: https://github.com/thesofproject/linux/issues/2725
Fixes: 7a33ea70

 ('ALSA: hda: intel-nhlt: handle NHLT VENDOR_DEFINED DMIC geometry')
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210302000146.1177770-1-pierre-louis.bossart@linux.intel.com

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
9a20e578
Name Last commit Last update
..
ac97 ASoC: ac97: convert to SPDX identifiers
sof Merge branch 'asoc-5.4' into asoc-next
ac97_codec.h ASoC: ac97: convert to SPDX identifiers
aci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license
ad1816a.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
ad1843.h ALSA: ALSA driver for SGI O2 audio board
adau1373.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149
aess.h ASoC: TI AESS: add autogating-enable function, callable from architecture code
ak4113.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
ak4114.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
ak4117.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
ak4531_codec.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
ak4641.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
ak4xxx-adda.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
alc5623.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license
asequencer.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
asound.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
asoundef.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
compress_driver.h ALSA: compress: fix partial_drain completion state
control.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
cs35l33.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
cs35l34.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
cs35l35.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
cs35l36.h ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier
cs4231-regs.h
cs4271.h
cs42l52.h
cs42l56.h
cs42l73.h
cs8403.h
cs8427.h
da7213.h
da7218.h
da7219-aad.h
da7219.h
da9055.h
designware_i2s.h
dmaengine_pcm.h
emu10k1.h
emu10k1_synth.h
emu8000.h
emu8000_reg.h
emux_legacy.h
emux_synth.h
es1688.h
gus.h
hda_chmap.h
hda_codec.h
hda_component.h
hda_hwdep.h
hda_i915.h
hda_register.h
hda_regmap.h
hda_verbs.h
hdaudio.h
hdaudio_ext.h
hdmi-codec.h
hwdep.h
i2c.h
info.h
initval.h
intel-nhlt.h
jack.h
l3.h
madera-pdata.h
max9768.h
max98088.h
max98090.h
max98095.h
memalloc.h
minors.h
mixer_oss.h
mpu401.h
omap-hdmi-audio.h
opl3.h
opl4.h
pcm-indirect.h
pcm.h
pcm_drm_eld.h
pcm_iec958.h
pcm_oss.h
pcm_params.h
pt2258.h
pxa2xx-lib.h
rawmidi.h
rt286.h
rt298.h
rt5514.h
rt5645.h
rt5659.h
rt5660.h
rt5663.h
rt5665.h
rt5668.h
rt5670.h
rt5682.h
s3c24xx_uda134x.h
sb.h
sb16_csp.h
seq_device.h
seq_kernel.h
seq_midi_emul.h
seq_midi_event.h
seq_oss.h
seq_oss_legacy.h
seq_virmidi.h
sh_dac_audio.h
sh_fsi.h
simple_card.h
simple_card_utils.h
snd_wavefront.h
soc-acpi-intel-match.h
soc-acpi.h
soc-component.h
soc-dai.h
soc-dapm.h
soc-dpcm.h
soc-topology.h
soc.h
sof.h
soundfont.h
spear_dma.h
spear_spdif.h
sta32x.h
sta350.h
tas2552-plat.h
tas5086.h
tea6330t.h
timer.h
tlv.h
tlv320aic32x4.h
tlv320aic3x.h
tlv320dac33-plat.h
tpa6130a2-plat.h
uda134x.h
uda1380.h
util_mem.h
vx_core.h
wavefront.h
wm0010.h
wm1250-ev1.h
wm2000.h
wm2200.h
wm5100.h
wm8903.h
wm8904.h
wm8955.h
wm8960.h
wm8962.h
wm8993.h
wm8996.h
wm9081.h
wm9090.h
wss.h