From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 1/3] ASoC: Fix mono controls after conversion to support full int masks
Date: Thu, 30 Oct 2008 12:37:08 +0000 [thread overview]
Message-ID: <1225370230-7829-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20081030123649.GA7682@rakim.wolfsonmicro.main>
When ASoC was converted to support full int width masks SOC_SINGLE_VALUE()
omitted the assignment of rshift, causing the control operatins to report
some mono controls as stereo. This happened to work some of the time due
to a confusion between shift and min in snd_soc_info_volsw().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/sound/soc.h | 3 ++-
sound/soc/soc-core.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a1e0357..5e01898 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -28,7 +28,8 @@
*/
#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \
((unsigned long)&(struct soc_mixer_control) \
- {.reg = xreg, .shift = xshift, .max = xmax, .invert = xinvert})
+ {.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \
+ .invert = xinvert})
#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \
((unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .max = xmax, .invert = xinvert})
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 462e635..a3adbf0 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
int max = mc->max;
- unsigned int shift = mc->min;
+ unsigned int shift = mc->shift;
unsigned int rshift = mc->rshift;
if (max == 1)
--
1.5.6.5
next prev parent reply other threads:[~2008-10-30 12:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 12:36 [PATCH 0/3] ASoC updates for 2.6.28 Mark Brown
2008-10-30 12:37 ` Mark Brown [this message]
2008-10-30 12:37 ` [PATCH 2/3] ASoC: Fix some minor errors in mpc5200 psc i2s driver Mark Brown
2008-10-30 12:37 ` [PATCH 3/3] ASoC: Fix WM9713 ALC Decay Time name Mark Brown
2008-10-30 13:15 ` [PATCH 0/3] ASoC updates for 2.6.28 Takashi Iwai
2008-10-30 13:16 ` Takashi Iwai
2008-10-30 13:20 ` Mark Brown
2008-10-30 13:27 ` Takashi Iwai
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=1225370230-7829-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox