All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics
@ 2020-09-18 16:15 Pierre-Louis Bossart
  2020-09-21 16:10 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre-Louis Bossart @ 2020-09-18 16:15 UTC (permalink / raw)
  To: stable
  Cc: gregkh, Jaska Uimonen, Pierre-Louis Bossart, Ranjani Sridharan,
	Mark Brown

From: Jaska Uimonen <jaska.uimonen@linux.intel.com>

[ Backported from Upstream commit 3dca35e35b42b3405ddad7ee95c02a2d8cf28592]

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>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---

Note to -stable maintainers:

The Upstream commit 3dca35e35b42b3405ddad7ee95c02a2d8cf28592 can be
cherry-picked as is for kernel 5.6+. For kernel 5.4 and 5.5, the
backport provided in this patch is required (same functionality,
different location). Let me know in case I missed required information
(tags, etc).

 sound/soc/sof/intel/hda.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 91bd88fddac7..a3465e857c59 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -305,7 +305,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;
 	}
 
@@ -442,9 +442,15 @@ static int hda_init_caps(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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-21 17:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-18 16:15 [PATCH] ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics Pierre-Louis Bossart
2020-09-21 16:10 ` Greg KH
2020-09-21 16:18   ` Pierre-Louis Bossart
2020-09-21 16:21     ` Greg KH
2020-09-21 16:33       ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.