From patchwork Tue Nov 3 17:47:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leann Ogasawara X-Patchwork-Id: 37522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3C332B7BA5 for ; Wed, 4 Nov 2009 04:49:40 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1N5NVf-0001qE-Cn; Tue, 03 Nov 2009 17:49:35 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1N5NTj-0000WT-Ba for kernel-team@lists.ubuntu.com; Tue, 03 Nov 2009 17:47:35 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1N5NTj-0008AG-8z for ; Tue, 03 Nov 2009 17:47:35 +0000 Received: from c-76-105-148-120.hsd1.or.comcast.net ([76.105.148.120] helo=[192.168.1.3]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1N5NTi-0007NR-Rr for kernel-team@lists.ubuntu.com; Tue, 03 Nov 2009 17:47:35 +0000 Subject: Re: [Jaunty] [Patch 1/3] SRU: Enable speakers for Toshiba NB200 (Realtek ALC272) From: Leann Ogasawara To: kernel-team In-Reply-To: <1257270382.25494.49.camel@emiko> References: <1257270382.25494.49.camel@emiko> Date: Tue, 03 Nov 2009 09:47:32 -0800 Message-Id: <1257270452.25494.50.camel@emiko> Mime-Version: 1.0 X-Mailer: Evolution 2.28.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.8 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com >From abc722e76ba082a82b5e5edefdb43327e88af37d Mon Sep 17 00:00:00 2001 From: Leann Ogasawara Date: Tue, 18 Aug 2009 11:56:47 -0700 Subject: [PATCH] UBUNTU: SAUCE: Enable speakers for Toshiba NB200 (Realtek ALC272) OriginalLocation: Hardy LUM netbook-lpia branch BugLink: BugLink: http://bugs.launchpad.net/bugs/438318 The following adds a new verb table to enable the speakers for the Toshiba NB200, Realtek ALC272 (Vendor ID: 0x10ec:0272, Subsystem ID: 0x1179:0xff6e, Revision ID: 0x100001). Code was forward ported from Hardy LUM (netbook-lpia branch). Signed-off-by: Leann Ogasawara Acked-by: Stefan Bader --- sound/pci/hda/patch_realtek.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index db91cf8..79710c5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -184,6 +184,7 @@ enum { ALC663_ASUS_MODE5, ALC663_ASUS_MODE6, ALC272_DELL_ZM1, + ALC272_TOSHIBA_NB200, ALC662_AUTO, ALC662_MODEL_LAST, }; @@ -15348,6 +15349,28 @@ static struct hda_verb alc272_dell_zm1_init_verbs[] = { {} }; +static struct hda_verb alc272_toshiba_init_verbs[] = { + /* Front Pin: output 0 (0x0c) */ + {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* 0x14 */ + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, /* 0x14 */ + /* Front Mic pin: input vref at 80% */ + {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* 0x19 */ + {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* 0x19 */ + {0x17, AC_VERB_SET_EAPD_BTLENABLE, 2}, /* 0x14 */ + {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* originally 0x12 */ + {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, + {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, + {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, + {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */ + {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, + {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)}, + {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT}, + {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, + {} +}; + /* capture mixer elements */ static struct snd_kcontrol_new alc662_capture_mixer[] = { @@ -15872,6 +15895,7 @@ static const char *alc662_models[ALC662_MODEL_LAST] = { [ALC662_ASUS_EEEPC_EP20] = "eeepc-ep20", [ALC662_ECS] = "ecs", [ALC272_DELL_ZM1] = "dell-zm1", + [ALC272_TOSHIBA_NB200] = "toshiba-nb200", [ALC663_ASUS_M51VA] = "m51va", [ALC663_ASUS_G71V] = "g71v", [ALC663_ASUS_H13] = "h13", @@ -15929,6 +15953,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_ECS), SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_ECS), SND_PCI_QUIRK(0x1028, 0x02f4, "DELL ZM1", ALC272_DELL_ZM1), + SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB200", ALC272_TOSHIBA_NB200), SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", ALC662_3ST_6ch_DIG), SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), @@ -16050,6 +16075,20 @@ static struct alc_config_preset alc662_presets[] = { .unsol_event = alc663_m51va_unsol_event, .init_hook = alc663_m51va_inithook, }, + [ALC272_TOSHIBA_NB200] = { + .mixers = { alc663_m51va_mixer }, + .init_verbs = { alc662_init_verbs, alc272_toshiba_init_verbs }, + .num_dacs = ARRAY_SIZE(alc662_dac_nids), + .dac_nids = alc662_dac_nids, + .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes), + .adc_nids = alc662_adc_nids, + .num_adc_nids = ARRAY_SIZE(alc662_adc_nids), + .capsrc_nids = alc662_capsrc_nids, + .channel_mode = alc662_3ST_2ch_modes, + .input_mux = &alc663_m51va_capture_source, + .unsol_event = alc663_m51va_unsol_event, + .init_hook = alc663_m51va_inithook, + }, [ALC663_ASUS_M51VA] = { .mixers = { alc663_m51va_mixer, alc662_capture_mixer}, .init_verbs = { alc662_init_verbs, alc663_m51va_init_verbs },