* [PATCH] ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX
@ 2013-11-22 17:29 Stephen Warren
2013-11-22 18:32 ` Mark Brown
2013-11-24 13:55 ` Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Stephen Warren @ 2013-11-22 17:29 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: alsa-devel, ac100, Stephen Warren, stable, Lars-Peter Clausen
From: Stephen Warren <swarren@nvidia.com>
SND_SOC_DAPM_MUX() doesn't currently initialize the .mask field. This
results in the mux never affecting HW, since no bits are ever set or
cleared. Fix SND_SOC_DAPM_MUX() to use SND_SOC_DAPM_INIT_REG_VAL() to
set up the reg, shift, on_val, and off_val fields like almost all other
SND_SOC_xxx() macros. It looks like this was a "typo" in the fixed
commit linked below.
This makes the speakers on the Toshiba AC100 (PAZ00) laptop work again.
Fixes: de9ba98b6d26 ("ASoC: dapm: Make widget power register settings more flexible")
Cc: <stable@vger.kernel.org> # v3.12+
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
include/sound/soc-dapm.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 2037c45adfe6..56ebdfca6273 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -104,7 +104,8 @@ struct device;
SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
.kcontrol_news = wcontrols, .num_kcontrols = 1}
#define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \
-{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, \
+{ .id = snd_soc_dapm_mux, .name = wname, \
+ SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
.kcontrol_news = wcontrols, .num_kcontrols = 1}
#define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \
{ .id = snd_soc_dapm_virt_mux, .name = wname, \
--
1.8.1.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX
2013-11-22 17:29 [PATCH] ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX Stephen Warren
@ 2013-11-22 18:32 ` Mark Brown
2013-11-22 18:35 ` Stephen Warren
2013-11-24 13:55 ` Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-11-22 18:32 UTC (permalink / raw)
To: Stephen Warren
Cc: alsa-devel, Lars-Peter Clausen, Stephen Warren, Liam Girdwood,
stable, ac100
[-- Attachment #1.1: Type: text/plain, Size: 820 bytes --]
On Fri, Nov 22, 2013 at 10:29:18AM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> SND_SOC_DAPM_MUX() doesn't currently initialize the .mask field. This
> results in the mux never affecting HW, since no bits are ever set or
> cleared. Fix SND_SOC_DAPM_MUX() to use SND_SOC_DAPM_INIT_REG_VAL() to
> set up the reg, shift, on_val, and off_val fields like almost all other
> SND_SOC_xxx() macros. It looks like this was a "typo" in the fixed
> commit linked below.
Hrm. Why has nobody else noticed this? I've been doing plenty of
testing that involved changing muxes... The patch and reasoning makes
sense but I can't immediately see why any of the testing I've been doing
recently would've worked without it since it all relies on muxes being
configured to make any noise.
[-- 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: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX
2013-11-22 18:32 ` Mark Brown
@ 2013-11-22 18:35 ` Stephen Warren
2013-11-22 19:48 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2013-11-22 18:35 UTC (permalink / raw)
To: Mark Brown
Cc: Liam Girdwood, alsa-devel, ac100, Stephen Warren, stable,
Lars-Peter Clausen
On 11/22/2013 11:32 AM, Mark Brown wrote:
> On Fri, Nov 22, 2013 at 10:29:18AM -0700, Stephen Warren wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> SND_SOC_DAPM_MUX() doesn't currently initialize the .mask field.
>> This results in the mux never affecting HW, since no bits are
>> ever set or cleared. Fix SND_SOC_DAPM_MUX() to use
>> SND_SOC_DAPM_INIT_REG_VAL() to set up the reg, shift, on_val, and
>> off_val fields like almost all other SND_SOC_xxx() macros. It
>> looks like this was a "typo" in the fixed commit linked below.
>
> Hrm. Why has nobody else noticed this? I've been doing plenty of
> testing that involved changing muxes... The patch and reasoning
> makes sense but I can't immediately see why any of the testing I've
> been doing recently would've worked without it since it all relies
> on muxes being configured to make any noise.
I think it's not the mux values/routing that matter, but the mux power
gating.
Also, if HW were to power up with muxes powered, then never changing
the power gate wouldn't have any effect (aside from increased power
consumption). In my case, the mux isn't powered by default, so I saw
an issue.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX
2013-11-22 18:35 ` Stephen Warren
@ 2013-11-22 19:48 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-11-22 19:48 UTC (permalink / raw)
To: Stephen Warren
Cc: Liam Girdwood, alsa-devel, ac100, Stephen Warren, stable,
Lars-Peter Clausen
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
On Fri, Nov 22, 2013 at 11:35:09AM -0700, Stephen Warren wrote:
> I think it's not the mux values/routing that matter, but the mux power
> gating.
Ah, that mask - yes, none of the devices I've been testing with have
power control for their muxes.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX
2013-11-22 17:29 [PATCH] ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX Stephen Warren
2013-11-22 18:32 ` Mark Brown
@ 2013-11-24 13:55 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-11-24 13:55 UTC (permalink / raw)
To: Stephen Warren
Cc: Liam Girdwood, alsa-devel, ac100, Stephen Warren, stable,
Lars-Peter Clausen
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
On Fri, Nov 22, 2013 at 10:29:18AM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> SND_SOC_DAPM_MUX() doesn't currently initialize the .mask field. This
> results in the mux never affecting HW, since no bits are ever set or
> cleared. Fix SND_SOC_DAPM_MUX() to use SND_SOC_DAPM_INIT_REG_VAL() to
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-24 13:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 17:29 [PATCH] ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX Stephen Warren
2013-11-22 18:32 ` Mark Brown
2013-11-22 18:35 ` Stephen Warren
2013-11-22 19:48 ` Mark Brown
2013-11-24 13:55 ` Mark Brown
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.