* [PATCH] ASOC: spear: spdif_out: Fix mute control
@ 2014-03-03 7:57 Lars-Peter Clausen
2014-03-10 17:43 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2014-03-03 7:57 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Rajeev Kumar, Lars-Peter Clausen
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>
---
sound/soc/spear/spdif_out.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index fe99f46..19cca04 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])
--
1.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASOC: spear: spdif_out: Fix mute control
2014-03-03 7:57 [PATCH] ASOC: spear: spdif_out: Fix mute control Lars-Peter Clausen
@ 2014-03-10 17:43 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-03-10 17:43 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel, Rajeev Kumar, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 211 bytes --]
On Mon, Mar 03, 2014 at 08:57:49AM +0100, Lars-Peter Clausen wrote:
> For controls registers with snd_soc_add_dai_controls snd_kcontrol_chip() returns
> a pointer to the DAI, not to the CODEC.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-10 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-03 7:57 [PATCH] ASOC: spear: spdif_out: Fix mute control Lars-Peter Clausen
2014-03-10 17:43 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).