summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-07-29 10:51:49 -0500
committerTakashi Iwai <tiwai@suse.de>2019-07-31 15:46:00 +0200
commit7a33ea70e1868ee578fe2e9a85dd300efa1a35d5 (patch)
tree874ca24e1e4a6faf55908f32ab4eb3edd6af1ea0 /sound/hda
parent303681f4356d322232dd5f6d9eb4bc62666064c5 (diff)
downloadtalos-op-linux-7a33ea70e1868ee578fe2e9a85dd300efa1a35d5.tar.gz
talos-op-linux-7a33ea70e1868ee578fe2e9a85dd300efa1a35d5.zip
ALSA: hda: intel-nhlt: handle NHLT VENDOR_DEFINED DMIC geometry
The NHLT spec defines a VENDOR_DEFINED geometry, which requires reading additional information to figure out the number of microphones. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/intel-nhlt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/hda/intel-nhlt.c b/sound/hda/intel-nhlt.c
index 7a62e03ba407..daede96f28ee 100644
--- a/sound/hda/intel-nhlt.c
+++ b/sound/hda/intel-nhlt.c
@@ -63,6 +63,7 @@ int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt)
{
struct nhlt_endpoint *epnt;
struct nhlt_dmic_array_config *cfg;
+ struct nhlt_vendor_dmic_array_config *cfg_vendor;
unsigned int dmic_geo = 0;
u8 j;
@@ -86,7 +87,10 @@ int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt)
case NHLT_MIC_ARRAY_4CH_2ND_GEOM:
dmic_geo = MIC_ARRAY_4CH;
break;
-
+ case NHLT_MIC_ARRAY_VENDOR_DEFINED:
+ cfg_vendor = (struct nhlt_vendor_dmic_array_config *)cfg;
+ dmic_geo = cfg_vendor->nb_mics;
+ break;
default:
dev_warn(dev, "undefined DMIC array_type 0x%0x\n",
cfg->array_type);
OpenPOWER on IntegriCloud