From: Gary Zhang Date: Tue, 30 Oct 2012 06:52:30 +0000 (+0800) Subject: ENGR00231595 spdif: improve spdif driver X-Git-Tag: v3.0.35-fsl~306 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3549f362661b76054d073bc1c256c2480a30685a;p=karo-tx-linux.git ENGR00231595 spdif: improve spdif driver add clk operation in mxc_pb_spdif_put function Signed-off-by: Gary Zhang --- diff --git a/sound/soc/codecs/mxc_spdif.c b/sound/soc/codecs/mxc_spdif.c index c80eed6d80d3..33b23371ea58 100644 --- a/sound/soc/codecs/mxc_spdif.c +++ b/sound/soc/codecs/mxc_spdif.c @@ -849,13 +849,21 @@ static int mxc_pb_spdif_get(struct snd_kcontrol *kcontrol, static int mxc_pb_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue) { + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); + struct mxc_spdif_priv *spdif_priv = snd_soc_codec_get_drvdata(codec); + struct mxc_spdif_platform_data *plat_data = spdif_priv->plat_data; + mxc_spdif_control.ch_status[0] = uvalue->value.iec958.status[0]; mxc_spdif_control.ch_status[1] = uvalue->value.iec958.status[1]; mxc_spdif_control.ch_status[2] = uvalue->value.iec958.status[2]; mxc_spdif_control.ch_status[3] = uvalue->value.iec958.status[3]; + clk_enable(plat_data->spdif_clk); + spdif_write_channel_status(); + clk_disable(plat_data->spdif_clk); + return 0; }