From: Keng-Yu Lin <keng-yu.lin@canonical.com>
To: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
Matthew Garrett <mjg@redhat.com>,
ibm-acpi-devel@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Keng-Yu Lin <keng-yu.lin@canonical.com>
Subject: [PATCH] thinkpad-acpi: disable alsa volume mixer for SL410/SL510
Date: Tue, 15 Mar 2011 17:25:06 +0800 [thread overview]
Message-ID: <1300181106-20219-1-git-send-email-keng-yu.lin@canonical.com> (raw)
The mute key on SL410/SL510 only works when the alsa volume mixer
is not enabled. This patch makes the alsa volume mixer disabled
on the matched SL410/SL510 EC versions.
Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
---
drivers/platform/x86/thinkpad_acpi.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
BugLink: https://launchpad.net/bugs/595896
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index eb99223..d4ee8f2 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6870,6 +6870,7 @@ err_exit:
#define TPACPI_VOL_Q_MUTEONLY 0x0001 /* Mute-only control available */
#define TPACPI_VOL_Q_LEVEL 0x0002 /* Volume control available */
+#define TPACPI_VOL_Q_IGNORE 0x0003 /* No Volume control available */
static const struct tpacpi_quirk volume_quirk_table[] __initconst = {
/* Whitelist volume level on all IBM by default */
@@ -6886,6 +6887,8 @@ static const struct tpacpi_quirk volume_quirk_table[] __initconst = {
TPACPI_QEC_LNV('7', 'J', TPACPI_VOL_Q_LEVEL), /* X60t */
TPACPI_QEC_LNV('7', '7', TPACPI_VOL_Q_LEVEL), /* Z60 */
TPACPI_QEC_LNV('7', 'F', TPACPI_VOL_Q_LEVEL), /* Z61 */
+ TPACPI_QEC_LNV('6', 'J', TPACPI_VOL_Q_IGNORE), /* SL410/SL510 */
+ TPACPI_QEC_LNV('7', 'X', TPACPI_VOL_Q_IGNORE), /* SL410/SL510 */
/* Whitelist mute-only on all Lenovo by default */
{ .vendor = PCI_VENDOR_ID_LENOVO,
@@ -6921,20 +6924,21 @@ static int __init volume_init(struct ibm_init_struct *iibm)
if (volume_capabilities >= TPACPI_VOL_CAP_MAX)
return -EINVAL;
+ quirks = tpacpi_check_quirks(volume_quirk_table,
+ ARRAY_SIZE(volume_quirk_table));
+
/*
* The ALSA mixer is our primary interface.
* When disabled, don't install the subdriver at all
*/
- if (!alsa_enable) {
+ if (!alsa_enable || quirks & TPACPI_VOL_Q_IGNORE) {
vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_MIXER,
"ALSA mixer disabled by parameter, "
"not loading volume subdriver...\n");
+ alsa_enable = 0; /* reflect the quirk status in sysfs */
return 1;
}
- quirks = tpacpi_check_quirks(volume_quirk_table,
- ARRAY_SIZE(volume_quirk_table));
-
switch (volume_capabilities) {
case TPACPI_VOL_CAP_AUTO:
if (quirks & TPACPI_VOL_Q_MUTEONLY)
--
1.7.1
next reply other threads:[~2011-03-15 9:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 9:25 Keng-Yu Lin [this message]
2011-03-16 18:57 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
2011-10-06 3:50 ` Keng-Yü Lin
2011-10-06 18:12 ` Henrique de Moraes Holschuh
2011-10-13 7:07 ` Keng-Yü Lin
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=1300181106-20219-1-git-send-email-keng-yu.lin@canonical.com \
--to=keng-yu.lin@canonical.com \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ibm-acpi@hmh.eng.br \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®