Skip to content

Commit eb5a558

Browse files
Tzung-Bi Shihbroonie
authored andcommitted
ASoC: mediatek: mt8183-da7219: fix DAPM paths for rt1015
RT1015's output widget name is "SPO" instead of "Speaker". Fixes it to use the correct names. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201019044724.1601476-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 3d53c6d commit eb5a558

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -630,15 +630,34 @@ static struct snd_soc_codec_conf mt8183_da7219_rt1015_codec_conf[] = {
630630
},
631631
};
632632

633+
static const struct snd_kcontrol_new mt8183_da7219_rt1015_snd_controls[] = {
634+
SOC_DAPM_PIN_SWITCH("Left Spk"),
635+
SOC_DAPM_PIN_SWITCH("Right Spk"),
636+
};
637+
638+
static const
639+
struct snd_soc_dapm_widget mt8183_da7219_rt1015_dapm_widgets[] = {
640+
SND_SOC_DAPM_SPK("Left Spk", NULL),
641+
SND_SOC_DAPM_SPK("Right Spk", NULL),
642+
SND_SOC_DAPM_PINCTRL("TDM_OUT_PINCTRL",
643+
"aud_tdm_out_on", "aud_tdm_out_off"),
644+
};
645+
646+
static const struct snd_soc_dapm_route mt8183_da7219_rt1015_dapm_routes[] = {
647+
{"Left Spk", NULL, "Left SPO"},
648+
{"Right Spk", NULL, "Right SPO"},
649+
{"I2S Playback", NULL, "TDM_OUT_PINCTRL"},
650+
};
651+
633652
static struct snd_soc_card mt8183_da7219_rt1015_card = {
634653
.name = "mt8183_da7219_rt1015",
635654
.owner = THIS_MODULE,
636-
.controls = mt8183_da7219_max98357_snd_controls,
637-
.num_controls = ARRAY_SIZE(mt8183_da7219_max98357_snd_controls),
638-
.dapm_widgets = mt8183_da7219_max98357_dapm_widgets,
639-
.num_dapm_widgets = ARRAY_SIZE(mt8183_da7219_max98357_dapm_widgets),
640-
.dapm_routes = mt8183_da7219_max98357_dapm_routes,
641-
.num_dapm_routes = ARRAY_SIZE(mt8183_da7219_max98357_dapm_routes),
655+
.controls = mt8183_da7219_rt1015_snd_controls,
656+
.num_controls = ARRAY_SIZE(mt8183_da7219_rt1015_snd_controls),
657+
.dapm_widgets = mt8183_da7219_rt1015_dapm_widgets,
658+
.num_dapm_widgets = ARRAY_SIZE(mt8183_da7219_rt1015_dapm_widgets),
659+
.dapm_routes = mt8183_da7219_rt1015_dapm_routes,
660+
.num_dapm_routes = ARRAY_SIZE(mt8183_da7219_rt1015_dapm_routes),
642661
.dai_link = mt8183_da7219_dai_links,
643662
.num_links = ARRAY_SIZE(mt8183_da7219_dai_links),
644663
.aux_dev = &mt8183_da7219_max98357_headset_dev,

0 commit comments

Comments
 (0)