ASoC: hdmi_spdif: config hdmi audio when hdmi using spdif source.
authorSugar Zhang <sugar.zhang@rock-chips.com>
Mon, 6 Jul 2015 09:08:14 +0000 (17:08 +0800)
committerSugar Zhang <sugar.zhang@rock-chips.com>
Mon, 6 Jul 2015 09:12:37 +0000 (17:12 +0800)
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
sound/soc/rockchip/rk_hdmi_spdif.c

index cfeb7f6cb1c1228f47a7973e9a627909829719b5..4dff132dcae055a6970e5a54be054bc1e75d4843 100755 (executable)
 #include "card_info.h"
 #include "rk_pcm.h"
 
+#if defined(CONFIG_RK_HDMI) && defined(CONFIG_SND_SOC_HDMI_SPDIF)
+extern int snd_config_hdmi_audio(struct snd_pcm_hw_params *params);
+#endif
+
 static int rk_hw_params(struct snd_pcm_substream *substream,
                        struct snd_pcm_hw_params *params)
 {
@@ -53,6 +57,10 @@ static int rk_hw_params(struct snd_pcm_substream *substream,
        ret = snd_soc_dai_set_sysclk(cpu_dai, 0,
                                     sclk, SND_SOC_CLOCK_IN);
 
+#if defined(CONFIG_RK_HDMI) && defined(CONFIG_SND_SOC_HDMI_SPDIF)
+       snd_config_hdmi_audio(params);
+#endif
+
        return ret;
 }