summaryrefslogtreecommitdiffstats
path: root/sound/soc/spear
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-03 08:57:49 +0100
committerMark Brown <broonie@linaro.org>2014-03-10 17:43:15 +0000
commitbde24030b5a2825ef198b2f092b7271e22fae142 (patch)
treed379a9e06a36750d96af59921a8389eb39b01200 /sound/soc/spear
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadlinux-bde24030b5a2825ef198b2f092b7271e22fae142.tar.bz2
ASoC: spear: spdif_out: Fix mute control
For controls registers with snd_soc_add_dai_controls snd_kcontrol_chip() returns a pointer to the DAI, not to the CODEC. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/spear')
-rw-r--r--sound/soc/spear/spdif_out.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index fe99f461aff0..19cca043e6e4 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -213,10 +213,7 @@ static int spdif_digital_mute(struct snd_soc_dai *dai, int mute)
static int spdif_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct snd_soc_card *card = codec->card;
- struct snd_soc_pcm_runtime *rtd = card->rtd;
- struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+ struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
ucontrol->value.integer.value[0] = host->saved_params.mute;
@@ -226,10 +223,7 @@ static int spdif_mute_get(struct snd_kcontrol *kcontrol,
static int spdif_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct snd_soc_card *card = codec->card;
- struct snd_soc_pcm_runtime *rtd = card->rtd;
- struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+ struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai);
if (host->saved_params.mute == ucontrol->value.integer.value[0])