Skip to contentSkip to conversation

ASoC: fsl_sai: Rename stream name of dai driver

PATCH Superseded Chancel Liu 2 participants 3 messages Feb 14, 2025

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 ASoC: fsl_sai: Rename stream name of dai driver

If stream names of dai driver are duplicated there'll be warnings when machine driver tries to add widgets on a route:

[    8.831335] fsl-asoc-card sound-wm8960: ASoC: sink widget CPU-Playback overwritten
[    8.839917] fsl-asoc-card sound-wm8960: ASoC: source widget CPU-Capture overwritten

Use different stream names to avoid such warnings.

Fixes 15c958390460 ("ASoC: fsl_sai: Add separate DAI for transmitter and receiver")
---
 sound/soc/fsl/fsl_sai.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/fsl/fsl_sai.c +3 -3
index c4eb87c5d39e..9f33dd11d47f 100644
@@ -994,10 +994,10 @@ static struct snd_soc_dai_driver fsl_sai_dai_template[] = {
 	{
 		.name = "sai-tx",
 		.playback = {
-			.stream_name = "CPU-Playback",
+			.stream_name = "SAI-Playback",
 			.channels_min = 1,
 			.channels_max = 32,
-				.rate_min = 8000,
+			.rate_min = 8000,
 			.rate_max = 2822400,
 			.rates = SNDRV_PCM_RATE_KNOT,
 			.formats = FSL_SAI_FORMATS,
@@ -1007,7 +1007,7 @@ static struct snd_soc_dai_driver fsl_sai_dai_template[] = {
 	{
 		.name = "sai-rx",
 		.capture = {
-			.stream_name = "CPU-Capture",
+			.stream_name = "SAI-Capture",
 			.channels_min = 1,
 			.channels_max = 32,
 			.rate_min = 8000,
Signature · 1 line
2.47.1
#1 lore raw

PATCH v2 2/2 ASoC: imx-audmix: Update correct dai names

Update correct dai names which are changed in CPU dai.

---
 sound/soc/fsl/imx-audmix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/fsl/imx-audmix.c +2 -2
index 50ecc5f51100..dac5d4ddacd6 100644
@@ -119,8 +119,8 @@ static const struct snd_soc_ops imx_audmix_be_ops = {
 static const char *name[][3] = {
 	{"HiFi-AUDMIX-FE-0", "HiFi-AUDMIX-FE-1", "HiFi-AUDMIX-FE-2"},
 	{"sai-tx", "sai-tx", "sai-rx"},
-	{"AUDMIX-Playback-0", "AUDMIX-Playback-1", "CPU-Capture"},
-	{"CPU-Playback", "CPU-Playback", "AUDMIX-Capture-0"},
+	{"AUDMIX-Playback-0", "AUDMIX-Playback-1", "SAI-Capture"},
+	{"SAI-Playback", "SAI-Playback", "AUDMIX-Capture-0"},
 };
 
 static int imx_audmix_probe(struct platform_device *pdev)
Signature · 1 line
2.47.1
#2 lore raw

Re: [PATCH v2 2/2] ASoC: imx-audmix: Update correct dai names

Hi Chancel,

This change should be squashed together with patch 1/2 otherwise you break bisectability

Quoted 27 lines · Chancel Liu

Update correct dai names which are changed in CPU dai.

---
 sound/soc/fsl/imx-audmix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/fsl/imx-audmix.c +2 -3
index 50ecc5f51100..dac5d4ddacd6 100644
@@ -119,8 +119,8 @@ static const struct snd_soc_ops imx_audmix_be_ops = {
 static const char *name[][3] = {
        {"HiFi-AUDMIX-FE-0", "HiFi-AUDMIX-FE-1", "HiFi-AUDMIX-FE-2"},
        {"sai-tx", "sai-tx", "sai-rx"},
-       {"AUDMIX-Playback-0", "AUDMIX-Playback-1", "CPU-Capture"},
-       {"CPU-Playback", "CPU-Playback", "AUDMIX-Capture-0"},
+       {"AUDMIX-Playback-0", "AUDMIX-Playback-1", "SAI-Capture"},
+       {"SAI-Playback", "SAI-Playback", "AUDMIX-Capture-0"},
 };
 
 static int imx_audmix_probe(struct platform_device *pdev)
--

2.47.1