]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00231595 spdif: improve spdif driver
authorGary Zhang <b13634@freescale.com>
Tue, 30 Oct 2012 06:52:30 +0000 (14:52 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:38 +0000 (08:35 +0200)
add clk operation in mxc_pb_spdif_put function

Signed-off-by: Gary Zhang <b13634@freescale.com>
sound/soc/codecs/mxc_spdif.c

index c80eed6d80d3fa28474785ecf4edd17abbcb55ea..33b23371ea58653c31f2d15e04e9310a995e5da7 100644 (file)
@@ -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;
 }