[alsa-devel] [PATCH 1/1] ALSA: ASoC: Fix wrong param when call snd_soc_test_bits

Richard Zhao linuxzsc at gmail.com
Sun Sep 28 01:27:27 CEST 2008

Without the patch, value of val is the value of the enumerated control
(mux), so dapm_mux_update_power didn't go wrong. But snd_soc_test_bits
need the bitmask value, so I changed the original variable name "val"
to "mux" and add a new variable "val" which means bitmask value. So
the meaning of val and mux is unified with that in
Though you can't find "if (!snd_soc_test_bits(widget->codec, e->reg,
mask, val))" in the patch, it's what I want to fix.


2008/9/28 Mark Brown <broonie at opensource.wolfsonmicro.com>
> On Sat, Sep 27, 2008 at 08:43:16PM +0800, Richard Zhao wrote:
> > Fix wrong param when call snd_soc_test_bits in function dapm_mux_update_power.
> So...  This patch doesn't actually do what the changelog entry here
> says: the arguments to snd_soc_test_bits() remain the same before and
> after your change.
> > -             if (!path->name || ! e->texts[val])
> > +             if (!path->name || !e->texts[mux])
> >                       continue;
> What this is actually doing is changing the enum text examined to be
> indexed by mux (the value of the enumerated control) rather than val
> (the bitmask in the register).  This looks like a good change but I want
> to double check with a test system.

More information about the Alsa-devel mailing list