From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>,
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
patches@opensource.wolfsonmicro.com
Subject: Broken outmixer_event function in wm8400/wm8990/wm8991
Date: Mon, 12 May 2014 10:19:26 +0200 [thread overview]
Message-ID: <5370840E.10009@metafoo.de> (raw)
Hi,
I was looking at the drivers that were using the SND_SOC_DAPM_PRE_REG event
and I noticed that the outmixer_event function for the wm8400, wm8990 and
wm8991 is broken. They do a switch statement to determine which kcontrol
cause the event in the form of 'switch(kcontrol->private_value) { case (REG
| (SHIFT << 8)): ...'. Long long time ago we used to store the register and
the shift in the same integer which was stored in private_value. But this
was changed in commit 4eaa9819 ("ALSA: ASoC: Convert bitfields in ASoC into
full int width"). This was long before the wm8400 and wm8991 drivers were
merged and just a month after the wm8990 driver was merged. So these
functions have been dead code pretty much for as long as they existed. Do
you want to fix this up? If not I'm going to send a patch that removes the
functions. If you want to fix this up, this should be re-implemented as a
custom put handler for the kcontrols rather than a event callback, which
checks whether the change is valid before doing any DAPM changes. The event
callback runs in the middle of the DAPM sequence, so half of the changes
will already have been applied before the check is made whether the change
should be done or not.
- Lars
next reply other threads:[~2014-05-12 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 8:19 Lars-Peter Clausen [this message]
2014-05-12 20:47 ` Broken outmixer_event function in wm8400/wm8990/wm8991 Mark Brown
2014-05-13 13:53 ` Charles Keepax
2014-05-13 14:11 ` Lars-Peter Clausen
2014-05-13 14:22 ` Charles Keepax
2014-05-13 16:09 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5370840E.10009@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=dp@opensource.wolfsonmicro.com \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.