summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda.c
diff options
context:
space:
mode:
authorJaska Uimonen <jaska.uimonen@linux.intel.com>2020-08-26 02:50:36 +0300
committerMark Brown <broonie@kernel.org>2020-08-26 15:19:13 +0300
commit3dca35e35b42b3405ddad7ee95c02a2d8cf28592 (patch)
tree46e3520719f1f14d8246c47ccf0bf38529e83772 /sound/soc/sof/intel/hda.c
parent6c63c954e1c52f1262f986f36d95f557c6f8fa94 (diff)
downloadlinux-3dca35e35b42b3405ddad7ee95c02a2d8cf28592.tar.xz
ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics
Currently the dmic check code supports only devices with 2 or 4 dmics. With other dmic counts the function will return 0. Lately we've seen devices with only 1 dmic thus enable also configurations with 1, and possibly 3, dmics. Add also topology postfix -1ch and -3ch for new dmic configuration. Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200825235040.1586478-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda.c')
-rw-r--r--sound/soc/sof/intel/hda.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index b8157c1f37f3..0e8285b34a7d 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -544,7 +544,7 @@ static int check_nhlt_dmic(struct snd_sof_dev *sdev)
if (nhlt) {
dmic_num = intel_nhlt_get_dmic_geo(sdev->dev, nhlt);
intel_nhlt_free(nhlt);
- if (dmic_num == 2 || dmic_num == 4)
+ if (dmic_num >= 1 && dmic_num <= 4)
return dmic_num;
}
@@ -992,9 +992,15 @@ static int hda_generic_machine_select(struct snd_sof_dev *sdev)
dmic_num = hda_dmic_num;
switch (dmic_num) {
+ case 1:
+ dmic_str = "-1ch";
+ break;
case 2:
dmic_str = "-2ch";
break;
+ case 3:
+ dmic_str = "-3ch";
+ break;
case 4:
dmic_str = "-4ch";
break;