From: Clemens Ladisch <clemens@ladisch.de>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
ibm-acpi-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH] thinkpad-acpi: fix return value of volume callbacks
Date: Mon, 22 Feb 2010 10:45:12 +0100 [thread overview]
Message-ID: <4B825228.8050405@ladisch.de> (raw)
Fix up the volume status setting functions to return a non-zero value if
the control value has changed, so that the ALSA framework can correctly
generate control change notifications.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
--- linux/drivers/platform/x86/thinkpad_acpi.c
+++ linux/drivers/platform/x86/thinkpad_acpi.c
@@ -6537,8 +6537,11 @@ static int volume_set_mute_ec(const bool
n = (mute) ? s | TP_EC_AUDIO_MUTESW_MSK :
s & ~TP_EC_AUDIO_MUTESW_MSK;
- if (n != s)
+ if (n != s) {
rc = volume_set_status_ec(n);
+ if (!rc)
+ rc = 1;
+ }
unlock:
mutex_unlock(&volume_mutex);
@@ -6569,8 +6572,11 @@ static int volume_set_volume_ec(const u8
n = (s & ~TP_EC_AUDIO_LVL_MSK) | vol;
- if (n != s)
+ if (n != s) {
rc = volume_set_status_ec(n);
+ if (!rc)
+ rc = 1;
+ }
unlock:
mutex_unlock(&volume_mutex);
next reply other threads:[~2010-02-22 9:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 9:45 Clemens Ladisch [this message]
2010-02-23 3:12 ` [PATCH] thinkpad-acpi: fix return value of volume callbacks Henrique de Moraes Holschuh
2010-02-23 7:36 ` Clemens Ladisch
2010-02-26 0:30 ` Henrique de Moraes Holschuh
2010-02-26 7:38 ` Clemens Ladisch
2010-02-27 0:55 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
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=4B825228.8050405@ladisch.de \
--to=clemens@ladisch.de \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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.