summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Zhang <b13634@freescale.com>2012-10-30 14:52:30 +0800
committerJason Liu <r64343@freescale.com>2012-10-30 21:41:08 +0800
commitfd920e8556c6502d19898d6a5b5a05722cac7ff5 (patch)
tree74c8d27a80d100a06466f5058be013453319b62e
parent370dc7fda5048863fb1894c5ab5647f2a29a0574 (diff)
ENGR00231595 spdif: improve spdif driver
add clk operation in mxc_pb_spdif_put function Signed-off-by: Gary Zhang <b13634@freescale.com>
-rw-r--r--sound/soc/codecs/mxc_spdif.c8
1 files changed, 8 insertions, 0 deletions
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;
}