alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/8] ASoC: tas2783A: sdw_utils: support ch 3 & 4
@ 2025-11-20  9:20 Niranjan H Y
  2025-11-20  9:20 ` [PATCH v1 2/8] ASoC: tas2783A: use custom firmware Niranjan H Y
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Niranjan H Y @ 2025-11-20  9:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: linux-sound, lgirdwood, broonie, ckeepax, yung-chuan.liao,
	ranjani.sridharan, perex, tiwai, cezary.rojewski, peter.ujfalusi,
	kai.vehmanen, pierre-louis.bossart, navada, shenghao-ding,
	v-hampiholi, baojun.xu, dan.carpenter, Niranjan H Y

 Currently the machine driver for tas2783A can only
support 2 channels. This patch adds support for
2 channel playback with 4 device setup.

Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
---
 sound/soc/sdw_utils/soc_sdw_ti_amp.c |  4 ++++
 sound/soc/sdw_utils/soc_sdw_utils.c  | 22 ++++++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/sound/soc/sdw_utils/soc_sdw_ti_amp.c b/sound/soc/sdw_utils/soc_sdw_ti_amp.c
index cbd60faec..488ef2ef4 100644
--- a/sound/soc/sdw_utils/soc_sdw_ti_amp.c
+++ b/sound/soc/sdw_utils/soc_sdw_ti_amp.c
@@ -58,6 +58,10 @@ int asoc_sdw_ti_spk_rtd_init(struct snd_soc_pcm_runtime *rtd,
 			strscpy(speaker, "Left Spk", sizeof(speaker));
 		} else if (!strncmp(prefix, "tas2783-2", strlen("tas2783-2"))) {
 			strscpy(speaker, "Right Spk", sizeof(speaker));
+		} else if (!strncmp(prefix, "tas2783-3", strlen("tas2783-3"))) {
+			strscpy(speaker, "Left Spk2", sizeof(speaker));
+		} else if (!strncmp(prefix, "tas2783-4", strlen("tas2783-4"))) {
+			strscpy(speaker, "Right Spk2", sizeof(speaker));
 		} else {
 			ret = -EINVAL;
 			dev_err(card->dev, "unhandled prefix %s", prefix);
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index 824fb613c..ec00f13a6 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -40,11 +40,25 @@ static const struct snd_soc_dapm_widget lr_spk_widgets[] = {
 	SND_SOC_DAPM_SPK("Right Spk", NULL),
 };
 
+static const struct snd_soc_dapm_widget lr_4spk_widgets[] = {
+	SND_SOC_DAPM_SPK("Left Spk", NULL),
+	SND_SOC_DAPM_SPK("Right Spk", NULL),
+	SND_SOC_DAPM_SPK("Left Spk2", NULL),
+	SND_SOC_DAPM_SPK("Right Spk2", NULL),
+};
+
 static const struct snd_kcontrol_new lr_spk_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Left Spk"),
 	SOC_DAPM_PIN_SWITCH("Right Spk"),
 };
 
+static const struct snd_kcontrol_new lr_4spk_controls[] = {
+	SOC_DAPM_PIN_SWITCH("Left Spk"),
+	SOC_DAPM_PIN_SWITCH("Right Spk"),
+	SOC_DAPM_PIN_SWITCH("Left Spk2"),
+	SOC_DAPM_PIN_SWITCH("Right Spk2"),
+};
+
 static const struct snd_soc_dapm_widget rt700_widgets[] = {
 	SND_SOC_DAPM_HP("Headphones", NULL),
 	SND_SOC_DAPM_MIC("AMIC", NULL),
@@ -69,10 +83,10 @@ struct asoc_sdw_codec_info codec_info_list[] = {
 				.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID},
 				.init = asoc_sdw_ti_amp_init,
 				.rtd_init = asoc_sdw_ti_spk_rtd_init,
-				.controls = lr_spk_controls,
-				.num_controls = ARRAY_SIZE(lr_spk_controls),
-				.widgets = lr_spk_widgets,
-				.num_widgets = ARRAY_SIZE(lr_spk_widgets),
+				.controls = lr_4spk_controls,
+				.num_controls = ARRAY_SIZE(lr_4spk_controls),
+				.widgets = lr_4spk_widgets,
+				.num_widgets = ARRAY_SIZE(lr_4spk_widgets),
 			},
 		},
 		.dai_num = 1,
-- 
2.25.1


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

end of thread, other threads:[~2025-11-20 16:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20  9:20 [PATCH v1 1/8] ASoC: tas2783A: sdw_utils: support ch 3 & 4 Niranjan H Y
2025-11-20  9:20 ` [PATCH v1 2/8] ASoC: tas2783A: use custom firmware Niranjan H Y
2025-11-20  9:20 ` [PATCH v1 3/8] ASoC: tas2783A: update default init writes Niranjan H Y
2025-11-20  9:20 ` [PATCH v1 4/8] ASoC: tas2783A: fix error log for calibration data Niranjan H Y
2025-11-20  9:20 ` [PATCH v1 5/8] ASoc: tas2783A: fw name based on system details Niranjan H Y
2025-11-20  9:20 ` [PATCH v1 6/8] ASoc: tas2783A: acpi match for 4 channel for mtl Niranjan H Y
2025-11-20  9:20 ` [PATCH v1 7/8] ASoC: tas2783A: use acpi initialisation table Niranjan H Y
2025-11-20 10:16   ` Charles Keepax
2025-11-20  9:20 ` [PATCH v1 8/8] ASoC: tas2783A: read slave properties from acpi table Niranjan H Y
2025-11-20 10:16   ` Charles Keepax

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).