From: Sugar Zhang Date: Mon, 6 Jul 2015 09:08:14 +0000 (+0800) Subject: ASoC: hdmi_spdif: config hdmi audio when hdmi using spdif source. X-Git-Tag: firefly_0821_release~3946 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=765e9818aea814fb4b384363648f8f1221831922;p=firefly-linux-kernel-4.4.55.git ASoC: hdmi_spdif: config hdmi audio when hdmi using spdif source. Signed-off-by: Sugar Zhang --- diff --git a/sound/soc/rockchip/rk_hdmi_spdif.c b/sound/soc/rockchip/rk_hdmi_spdif.c index cfeb7f6cb1c1..4dff132dcae0 100755 --- a/sound/soc/rockchip/rk_hdmi_spdif.c +++ b/sound/soc/rockchip/rk_hdmi_spdif.c @@ -27,6 +27,10 @@ #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; }