From: Richard Zhao <linuxzsc@gmail.com>
To: patch@alsa-project.org
Cc: liam.girdwood@wolfsonmicro.com, alsa-devel@alsa-project.org,
Richard Zhao <linuxzsc@gmail.com>,
"Richard Zhao (none)" <richard@richard-laptop.alsa-project.org>
Subject: [PATCH 1/1] ALSA: ASoC: Fix wrong param when call snd_soc_test_bits
Date: Fri, 26 Sep 2008 22:28:52 +0800 [thread overview]
Message-ID: <1222439332-21375-1-git-send-email-linuxzsc@gmail.com> (raw)
In-Reply-To: <>
From: Richard Zhao <richard@richard-laptop.(none)>
Fix wrong param when call snd_soc_test_bits in function dapm_mux_update_power.
Signed-off-by: Richard Zhao <linuxzsc@gmail.com>
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c016426..9ca9c08 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -693,7 +693,7 @@ static void dbg_dump_dapm(struct snd_soc_codec* codec, const char *action)
/* test and update the power status of a mux widget */
static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kcontrol, int mask,
- int val, struct soc_enum* e)
+ int mux, int val, struct soc_enum *e)
{
struct snd_soc_dapm_path *path;
int found = 0;
@@ -709,12 +709,12 @@ static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
if (path->kcontrol != kcontrol)
continue;
- if (!path->name || ! e->texts[val])
+ if (!path->name || !e->texts[mux])
continue;
found = 1;
/* we now need to match the string in the enum to the path */
- if (!(strcmp(path->name, e->texts[val])))
+ if (!(strcmp(path->name, e->texts[mux])))
path->connect = 1; /* new connection */
else
path->connect = 0; /* old connection must be powered down */
@@ -1291,7 +1291,7 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
mutex_lock(&widget->codec->mutex);
widget->value = val;
- dapm_mux_update_power(widget, kcontrol, mask, mux, e);
+ dapm_mux_update_power(widget, kcontrol, mask, mux, val, e);
if (widget->event) {
if (widget->event_flags & SND_SOC_DAPM_PRE_REG) {
ret = widget->event(widget,
--
1.5.4.3
next reply other threads:[~2008-09-26 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 14:28 Richard Zhao [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-27 12:43 [PATCH 1/1] ALSA: ASoC: Fix wrong param when call snd_soc_test_bits Richard Zhao
2008-09-27 16:33 ` Mark Brown
2008-09-27 23:27 ` Richard Zhao
2008-09-29 10:11 ` Mark Brown
2008-10-06 23:58 ` Richard Zhao
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=1222439332-21375-1-git-send-email-linuxzsc@gmail.com \
--to=linuxzsc@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=liam.girdwood@wolfsonmicro.com \
--cc=patch@alsa-project.org \
--cc=richard@richard-laptop.alsa-project.org \
/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.