Commit 0643558f authored by Koro Chen's avatar Koro Chen Committed by Mark Brown

ASoC: mediatek: Remove AIF widgets for backend DAIs

DAPM core already creates widgets for DAIs. It is not necessary
to declare them by SND_SOC_DAPM_AIF_IN/SND_SOC_DAPM_AIF_OUT.
Furthermore, original codes use backend DAI's stream name to be the AIF
widget name. It causes the same widget to be created twice, and after
commit 92fa1242 ("ASoC: dapm: Add new widgets to the end of the
widget list") the first created widget (by snd_soc_dapm_new_controls)
is used, not the 2nd created one (by snd_soc_dapm_new_dai_widgets),
so audio path is broken.
Signed-off-by: default avatarKoro Chen <koro.chen@mediatek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent bc0195aa
...@@ -820,10 +820,6 @@ static const struct snd_kcontrol_new mtk_afe_o10_mix[] = { ...@@ -820,10 +820,6 @@ static const struct snd_kcontrol_new mtk_afe_o10_mix[] = {
}; };
static const struct snd_soc_dapm_widget mtk_afe_pcm_widgets[] = { static const struct snd_soc_dapm_widget mtk_afe_pcm_widgets[] = {
/* Backend DAIs */
SND_SOC_DAPM_AIF_IN("I2S Capture", NULL, 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_OUT("I2S Playback", NULL, 0, SND_SOC_NOPM, 0, 0),
/* inter-connections */ /* inter-connections */
SND_SOC_DAPM_MIXER("I05", SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER("I05", SND_SOC_NOPM, 0, 0, NULL, 0),
SND_SOC_DAPM_MIXER("I06", SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER("I06", SND_SOC_NOPM, 0, 0, NULL, 0),
...@@ -855,11 +851,6 @@ static const struct snd_soc_dapm_route mtk_afe_pcm_routes[] = { ...@@ -855,11 +851,6 @@ static const struct snd_soc_dapm_route mtk_afe_pcm_routes[] = {
{ "O10", "I18 Switch", "I18" }, { "O10", "I18 Switch", "I18" },
}; };
static const struct snd_soc_dapm_widget mtk_afe_hdmi_widgets[] = {
/* Backend DAIs */
SND_SOC_DAPM_AIF_OUT("HDMIO Playback", NULL, 0, SND_SOC_NOPM, 0, 0),
};
static const struct snd_soc_dapm_route mtk_afe_hdmi_routes[] = { static const struct snd_soc_dapm_route mtk_afe_hdmi_routes[] = {
{"HDMIO Playback", NULL, "HDMI"}, {"HDMIO Playback", NULL, "HDMI"},
}; };
...@@ -874,8 +865,6 @@ static const struct snd_soc_component_driver mtk_afe_pcm_dai_component = { ...@@ -874,8 +865,6 @@ static const struct snd_soc_component_driver mtk_afe_pcm_dai_component = {
static const struct snd_soc_component_driver mtk_afe_hdmi_dai_component = { static const struct snd_soc_component_driver mtk_afe_hdmi_dai_component = {
.name = "mtk-afe-hdmi-dai", .name = "mtk-afe-hdmi-dai",
.dapm_widgets = mtk_afe_hdmi_widgets,
.num_dapm_widgets = ARRAY_SIZE(mtk_afe_hdmi_widgets),
.dapm_routes = mtk_afe_hdmi_routes, .dapm_routes = mtk_afe_hdmi_routes,
.num_dapm_routes = ARRAY_SIZE(mtk_afe_hdmi_routes), .num_dapm_routes = ARRAY_SIZE(mtk_afe_hdmi_routes),
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment