From: Niranjan H Y <niranjan.hy@ti.com>
To: <alsa-devel@alsa-project.org>
Cc: <linux-sound@vger.kernel.org>, <broonie@kernel.org>,
<ckeepax@opensource.cirrus.com>, <lgirdwood@gmail.com>,
<yung-chuan.liao@linux.intel.com>,
<ranjani.sridharan@linux.intel.com>, <perex@perex.cz>,
<tiwai@suse.com>, <cezary.rojewski@intel.com>,
<peter.ujfalusi@linux.intel.com>, <kai.vehmanen@linux.intel.com>,
<pierre-louis.bossart@linux.dev>, <shenghao-ding@ti.com>,
<v-hampiholi@ti.com>, <baojun.xu@ti.com>,
<dan.carpenter@linaro.org>, <sandeepk@ti.com>,
Niranjan H Y <niranjan.hy@ti.com>
Subject: [PATCH v2 1/8] ASoC: tas2783A: sdw_utils: support ch 3 & 4
Date: Mon, 15 Dec 2025 21:02:12 +0530 [thread overview]
Message-ID: <20251215153219.810-1-niranjan.hy@ti.com> (raw)
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>
---
v2:
- no change
---
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 f169d9589..1d1ba7a25 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.43.0
next reply other threads:[~2025-12-15 15:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 15:32 Niranjan H Y [this message]
2025-12-15 15:32 ` [PATCH v2 2/8] ASoC: tas2783A: use custom firmware Niranjan H Y
2025-12-15 15:32 ` [PATCH v2 3/8] ASoC: tas2783A: update default init writes Niranjan H Y
2025-12-15 15:32 ` [PATCH v2 4/8] ASoC: tas2783A: fix error log for calibration data Niranjan H Y
2025-12-15 15:32 ` [PATCH v2 5/8] ASoc: tas2783A: fw name based on system details Niranjan H Y
2025-12-15 15:32 ` [PATCH v2 6/8] ASoc: tas2783A: acpi match for 4 channel for mtl Niranjan H Y
2025-12-15 15:32 ` [PATCH v2 7/8] ASoC: tas2783A: use acpi initialisation table Niranjan H Y
2025-12-15 15:47 ` Charles Keepax
2025-12-15 15:32 ` [PATCH v2 8/8] ASoC: tas2783A: read slave properties from acpi table Niranjan H Y
2025-12-18 15:32 ` [PATCH v2 1/8] ASoC: tas2783A: sdw_utils: support ch 3 & 4 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=20251215153219.810-1-niranjan.hy@ti.com \
--to=niranjan.hy@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=dan.carpenter@linaro.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=ranjani.sridharan@linux.intel.com \
--cc=sandeepk@ti.com \
--cc=shenghao-ding@ti.com \
--cc=tiwai@suse.com \
--cc=v-hampiholi@ti.com \
--cc=yung-chuan.liao@linux.intel.com \
/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