aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoro Chen <koro.chen@mediatek.com>2015-08-17 07:16:51 -0400
committerMark Brown <broonie@kernel.org>2015-08-17 13:52:08 -0400
commit0643558f85e740019e0632072c55e8b2f79a8d7d (patch)
tree1aaa2f50c98fcd9123586c9a3b28e86ca63900f2
parentbc0195aad0daa2ad5b0d76cce22b167bc3435590 (diff)
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 92fa12426741 ("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: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/mediatek/mtk-afe-pcm.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sound/soc/mediatek/mtk-afe-pcm.c b/sound/soc/mediatek/mtk-afe-pcm.c
index cc228db5fb76..e3e6331e36b6 100644
--- a/sound/soc/mediatek/mtk-afe-pcm.c
+++ b/sound/soc/mediatek/mtk-afe-pcm.c
@@ -820,10 +820,6 @@ static const struct snd_kcontrol_new mtk_afe_o10_mix[] = {
820}; 820};
821 821
822static const struct snd_soc_dapm_widget mtk_afe_pcm_widgets[] = { 822static const struct snd_soc_dapm_widget mtk_afe_pcm_widgets[] = {
823 /* Backend DAIs */
824 SND_SOC_DAPM_AIF_IN("I2S Capture", NULL, 0, SND_SOC_NOPM, 0, 0),
825 SND_SOC_DAPM_AIF_OUT("I2S Playback", NULL, 0, SND_SOC_NOPM, 0, 0),
826
827 /* inter-connections */ 823 /* inter-connections */
828 SND_SOC_DAPM_MIXER("I05", SND_SOC_NOPM, 0, 0, NULL, 0), 824 SND_SOC_DAPM_MIXER("I05", SND_SOC_NOPM, 0, 0, NULL, 0),
829 SND_SOC_DAPM_MIXER("I06", SND_SOC_NOPM, 0, 0, NULL, 0), 825 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 { "O10", "I18 Switch", "I18" }, 851 { "O10", "I18 Switch", "I18" },
856}; 852};
857 853
858static const struct snd_soc_dapm_widget mtk_afe_hdmi_widgets[] = {
859 /* Backend DAIs */
860 SND_SOC_DAPM_AIF_OUT("HDMIO Playback", NULL, 0, SND_SOC_NOPM, 0, 0),
861};
862
863static const struct snd_soc_dapm_route mtk_afe_hdmi_routes[] = { 854static const struct snd_soc_dapm_route mtk_afe_hdmi_routes[] = {
864 {"HDMIO Playback", NULL, "HDMI"}, 855 {"HDMIO Playback", NULL, "HDMI"},
865}; 856};
@@ -874,8 +865,6 @@ static const struct snd_soc_component_driver mtk_afe_pcm_dai_component = {
874 865
875static const struct snd_soc_component_driver mtk_afe_hdmi_dai_component = { 866static const struct snd_soc_component_driver mtk_afe_hdmi_dai_component = {
876 .name = "mtk-afe-hdmi-dai", 867 .name = "mtk-afe-hdmi-dai",
877 .dapm_widgets = mtk_afe_hdmi_widgets,
878 .num_dapm_widgets = ARRAY_SIZE(mtk_afe_hdmi_widgets),
879 .dapm_routes = mtk_afe_hdmi_routes, 868 .dapm_routes = mtk_afe_hdmi_routes,
880 .num_dapm_routes = ARRAY_SIZE(mtk_afe_hdmi_routes), 869 .num_dapm_routes = ARRAY_SIZE(mtk_afe_hdmi_routes),
881}; 870};