Skip to content

Commit

Permalink
ASoC: bt-sco: fix bt-sco-pcm-wb dai widget don't connect to the endpoint
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20220302013533.29068-1-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jiaxin Yu authored and Mark Brown committed Mar 3, 2022
1 parent e947699 commit 8f2b025
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sound/soc/codecs/bt-sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 8f2b025

Please sign in to comment.