]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: bt-sco: fix duplicate DAPM widget names for wideband DAI
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 15 Jul 2026 10:06:20 +0000 (18:06 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 15 Jul 2026 15:55:47 +0000 (16:55 +0100)
The bt-sco-pcm-wb DAI uses the same stream_name strings as bt-sco-pcm
("Playback" and "Capture"). This causes duplicate DAPM AIF widget
names within the same component, leading to debugfs warnings:

  debugfs: 'Playback' already exists in 'dapm'
  debugfs: 'Capture' already exists in 'dapm'

Give the wideband DAI distinct stream names ("WB Playback" and
"WB Capture") and add corresponding DAPM AIF widgets and routes for
them.

Fixes: 5947e1b4992e ("ASoC: bt-sco: extend rate and add a general compatible string")
Assisted-by: VeroCoder:claude-sonnet-4-5
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20260715100620.1387159-1-shengjiu.wang@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/bt-sco.c

index 3afcef2dfa3529cc106342e814dea36c6c69d425..c0bf45b76cb8c5698a23f26257c9a59658a2a190 100644 (file)
@@ -17,11 +17,17 @@ static const struct snd_soc_dapm_widget bt_sco_widgets[] = {
                            SND_SOC_NOPM, 0, 0),
        SND_SOC_DAPM_AIF_OUT("BT_SCO_TX", "Capture", 0,
                             SND_SOC_NOPM, 0, 0),
+       SND_SOC_DAPM_AIF_IN("BT_SCO_RX_WB", "WB Playback", 0,
+                           SND_SOC_NOPM, 0, 0),
+       SND_SOC_DAPM_AIF_OUT("BT_SCO_TX_WB", "WB Capture", 0,
+                            SND_SOC_NOPM, 0, 0),
 };
 
 static const struct snd_soc_dapm_route bt_sco_routes[] = {
        { "BT_SCO_TX", NULL, "RX" },
        { "TX", NULL, "BT_SCO_RX" },
+       { "BT_SCO_TX_WB", NULL, "RX" },
+       { "TX", NULL, "BT_SCO_RX_WB" },
 };
 
 static struct snd_soc_dai_driver bt_sco_dai[] = {
@@ -45,14 +51,14 @@ static struct snd_soc_dai_driver bt_sco_dai[] = {
        {
                .name = "bt-sco-pcm-wb",
                .playback = {
-                       .stream_name = "Playback",
+                       .stream_name = "WB Playback",
                        .channels_min = 1,
                        .channels_max = 1,
                        .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
                        .formats = SNDRV_PCM_FMTBIT_S16_LE,
                },
                .capture = {
-                        .stream_name = "Capture",
+                        .stream_name = "WB Capture",
                        .channels_min = 1,
                        .channels_max = 1,
                        .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,