linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2] ASoC: bt-sco: fix bt-sco-pcm-wb dai widget don't connect to the endpoint
@ 2022-03-02  1:35 Jiaxin Yu
  2022-03-03 13:33 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jiaxin Yu @ 2022-03-02  1:35 UTC (permalink / raw)
  To: broonie
  Cc: perex, matthias.bgg, trevor.wu, tzungbi, alsa-devel, devicetree,
	linux-arm-kernel, linux-mediatek, linux-kernel,
	Project_Global_Chrome_Upstream_Group, Jiaxin Yu

This patch fix the second dai driver's dai widget can't connect to the
endpoint. Because "bt-sco-pcm" and "bt-sco-pcm-wb" dai driver have the
same stream_name, so it will cause they have the same widget name.
Therefor it will just create only one route when do snd_soc_dapm_add_route
that only find the widget through the widget name.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
---

Change from v1:
   fix build error

Hi maintainer,
   Need your comments. The patch is the one that I think it makes the
   most sense. Maybe we can define the new stream_name for
   "bt-sco-pcm-wb" and add the new route.

 sound/soc/codecs/bt-sco.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/bt-sco.c b/sound/soc/codecs/bt-sco.c
index 4d286844e3c8..cf17b9741bd8 100644
--- a/sound/soc/codecs/bt-sco.c
+++ b/sound/soc/codecs/bt-sco.c
@@ -13,11 +13,15 @@
 static const struct snd_soc_dapm_widget bt_sco_widgets[] = {
 	SND_SOC_DAPM_INPUT("RX"),
 	SND_SOC_DAPM_OUTPUT("TX"),
+	SND_SOC_DAPM_AIF_IN("BT_SCO_RX", "Playback", 0,
+			    SND_SOC_NOPM, 0, 0),
+	SND_SOC_DAPM_AIF_OUT("BT_SCO_TX", "Capture", 0,
+			     SND_SOC_NOPM, 0, 0),
 };
 
 static const struct snd_soc_dapm_route bt_sco_routes[] = {
-	{ "Capture", NULL, "RX" },
-	{ "TX", NULL, "Playback" },
+	{ "BT_SCO_TX", NULL, "RX" },
+	{ "TX", NULL, "BT_SCO_RX" },
 };
 
 static struct snd_soc_dai_driver bt_sco_dai[] = {
-- 
2.25.1


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

end of thread, other threads:[~2022-03-03 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02  1:35 [v2] ASoC: bt-sco: fix bt-sco-pcm-wb dai widget don't connect to the endpoint Jiaxin Yu
2022-03-03 13:33 ` Mark Brown

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