alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Jaska Uimonen <jaska.uimonen@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 3/7] ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics
Date: Tue, 25 Aug 2020 16:50:36 -0700	[thread overview]
Message-ID: <20200825235040.1586478-4-ranjani.sridharan@linux.intel.com> (raw)
In-Reply-To: <20200825235040.1586478-1-ranjani.sridharan@linux.intel.com>

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

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>
---
 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 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;
-- 
2.25.1


  parent reply	other threads:[~2020-08-25 23:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 23:50 [PATCH 0/7] SOF fixes and updates Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 1/7] ASoC: SOF: Intel: hda: report error only for the last ROM init iteration Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 2/7] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work Ranjani Sridharan
2020-08-25 23:50 ` Ranjani Sridharan [this message]
2020-09-18 15:10   ` [PATCH 3/7] ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics Pierre-Louis Bossart
2020-09-18 15:14     ` Mark Brown
2020-08-25 23:50 ` [PATCH 4/7] ASoC: SOF: topology: fix the ipc_size calculation for process component Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 5/7] ASoC: SOF: Intel: hda: add extended rom status dump to error log Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 6/7] ASoC: SOF: imx: Replace sdev->private with sdev->pdata->hw_pdata Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 7/7] ASoC: SOF: sof-of-dev: Add .arch_ops field Ranjani Sridharan
2020-08-26 12:55 ` [PATCH 0/7] SOF fixes and updates Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200825235040.1586478-4-ranjani.sridharan@linux.intel.com \
    --to=ranjani.sridharan@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jaska.uimonen@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).