* [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card
@ 2012-02-15 1:12 Mark Brown
2012-02-15 10:09 ` Liam Girdwood
2012-02-15 16:54 ` Stephen Warren
0 siblings, 2 replies; 5+ messages in thread
From: Mark Brown @ 2012-02-15 1:12 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Stephen Warren, Mark Brown
Since the addition of the non-CODEC control adds card controls like the
DAPM pin switch have been broken as they are expecting the private data
for the control to be the CODEC but it's now the card. Fix that for the
pin switches, an audit of other drivers is required.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/soc-dapm.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 6fc488e..9b796e3 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2644,15 +2644,15 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_info_pin_switch);
int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
const char *pin = (const char *)kcontrol->private_value;
- mutex_lock(&codec->mutex);
+ mutex_lock(&card->mutex);
ucontrol->value.integer.value[0] =
- snd_soc_dapm_get_pin_status(&codec->dapm, pin);
+ snd_soc_dapm_get_pin_status(&card->dapm, pin);
- mutex_unlock(&codec->mutex);
+ mutex_unlock(&card->mutex);
return 0;
}
@@ -2667,19 +2667,19 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_get_pin_switch);
int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
const char *pin = (const char *)kcontrol->private_value;
- mutex_lock(&codec->mutex);
+ mutex_lock(&card->mutex);
if (ucontrol->value.integer.value[0])
- snd_soc_dapm_enable_pin(&codec->dapm, pin);
+ snd_soc_dapm_enable_pin(&card->dapm, pin);
else
- snd_soc_dapm_disable_pin(&codec->dapm, pin);
+ snd_soc_dapm_disable_pin(&card->dapm, pin);
- snd_soc_dapm_sync(&codec->dapm);
+ snd_soc_dapm_sync(&card->dapm);
- mutex_unlock(&codec->mutex);
+ mutex_unlock(&card->mutex);
return 0;
}
--
1.7.9.rc1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card
2012-02-15 1:12 [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card Mark Brown
@ 2012-02-15 10:09 ` Liam Girdwood
2012-02-15 16:36 ` Mark Brown
2012-02-15 16:54 ` Stephen Warren
1 sibling, 1 reply; 5+ messages in thread
From: Liam Girdwood @ 2012-02-15 10:09 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches, Stephen Warren
On Tue, 2012-02-14 at 17:12 -0800, Mark Brown wrote:
> Since the addition of the non-CODEC control adds card controls like the
> DAPM pin switch have been broken as they are expecting the private data
> for the control to be the CODEC but it's now the card. Fix that for the
> pin switches, an audit of other drivers is required.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
I covered all the machine drivers who directly used the old API with the
original patch but I'll also do some further audit for indirect users
like the pin switch.
Liam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card
2012-02-15 10:09 ` Liam Girdwood
@ 2012-02-15 16:36 ` Mark Brown
2012-02-15 18:11 ` Liam Girdwood
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2012-02-15 16:36 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Stephen Warren
[-- Attachment #1.1: Type: text/plain, Size: 416 bytes --]
On Wed, Feb 15, 2012 at 10:09:24AM +0000, Liam Girdwood wrote:
> I covered all the machine drivers who directly used the old API with the
> original patch but I'll also do some further audit for indirect users
> like the pin switch.
Hrm, what about those that use the table based init? I just did a spot
check on spitz and it's still expecting to get a snd_soc_codec back.
But now I need breakfast...
[-- 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] 5+ messages in thread
* Re: [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card
2012-02-15 16:36 ` Mark Brown
@ 2012-02-15 18:11 ` Liam Girdwood
0 siblings, 0 replies; 5+ messages in thread
From: Liam Girdwood @ 2012-02-15 18:11 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches, Stephen Warren
On Wed, 2012-02-15 at 08:36 -0800, Mark Brown wrote:
> On Wed, Feb 15, 2012 at 10:09:24AM +0000, Liam Girdwood wrote:
>
> > I covered all the machine drivers who directly used the old API with the
> > original patch but I'll also do some further audit for indirect users
> > like the pin switch.
>
> Hrm, what about those that use the table based init? I just did a spot
> check on spitz and it's still expecting to get a snd_soc_codec back.
>
> But now I need breakfast...
A lucky check ;-) It looks like spitz was the only one missing the
update as the other table inits are all fine. Patch forthcoming...
Liam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card
2012-02-15 1:12 [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card Mark Brown
2012-02-15 10:09 ` Liam Girdwood
@ 2012-02-15 16:54 ` Stephen Warren
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2012-02-15 16:54 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com
Mark Brown wrote at Tuesday, February 14, 2012 6:12 PM:
> Since the addition of the non-CODEC control adds card controls like the
> DAPM pin switch have been broken as they are expecting the private data
> for the control to be the CODEC but it's now the card. Fix that for the
> pin switches, an audit of other drivers is required.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
(on a board using tegra_wm8903 machine driver)
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-15 18:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15 1:12 [PATCH] ASoC: dapm: Convert pin switches to use snd_soc_card Mark Brown
2012-02-15 10:09 ` Liam Girdwood
2012-02-15 16:36 ` Mark Brown
2012-02-15 18:11 ` Liam Girdwood
2012-02-15 16:54 ` Stephen Warren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.