aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHerton Ronaldo Krzesinski <herton@mandriva.com.br>2010-06-17 13:15:06 -0400
committerTakashi Iwai <tiwai@suse.de>2010-06-17 14:37:40 -0400
commitf7154de220f14073ef0d76638f85e254ad2e202f (patch)
tree79244a561e5c3b2e3b09b7f5efb57c0e8ba143ec /sound
parentb8f171e7e7ed5c9b77324bcc6bb580ddcc84da49 (diff)
ALSA: hda - add ideapad model for Conexant 5051 codec
Lenovo IdeaPad Y430 has an additional subwoofer connected at pin 0x1b, which isn't muted when headphone is plugged in. This adds additional support to the extra subwoofer via new ideapad model. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_conexant.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 2bf2cb5da95..54f74191ebc 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1632,6 +1632,11 @@ static void cxt5051_update_speaker(struct hda_codec *codec)
1632 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; 1632 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0;
1633 snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 1633 snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
1634 pinctl); 1634 pinctl);
1635 /* on ideapad there is an aditional speaker (subwoofer) to mute */
1636 if (spec->ideapad)
1637 snd_hda_codec_write(codec, 0x1b, 0,
1638 AC_VERB_SET_PIN_WIDGET_CONTROL,
1639 pinctl);
1635} 1640}
1636 1641
1637/* turn on/off EAPD (+ mute HP) as a master switch */ 1642/* turn on/off EAPD (+ mute HP) as a master switch */
@@ -1888,6 +1893,13 @@ static void cxt5051_init_mic_port(struct hda_codec *codec, hda_nid_t nid,
1888#endif 1893#endif
1889} 1894}
1890 1895
1896static struct hda_verb cxt5051_ideapad_init_verbs[] = {
1897 /* Subwoofer */
1898 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1899 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
1900 { } /* end */
1901};
1902
1891/* initialize jack-sensing, too */ 1903/* initialize jack-sensing, too */
1892static int cxt5051_init(struct hda_codec *codec) 1904static int cxt5051_init(struct hda_codec *codec)
1893{ 1905{
@@ -1917,6 +1929,7 @@ enum {
1917 CXT5051_LENOVO_X200, /* Lenovo X200 laptop, also used for Advanced Mini Dock 250410 */ 1929 CXT5051_LENOVO_X200, /* Lenovo X200 laptop, also used for Advanced Mini Dock 250410 */
1918 CXT5051_F700, /* HP Compaq Presario F700 */ 1930 CXT5051_F700, /* HP Compaq Presario F700 */
1919 CXT5051_TOSHIBA, /* Toshiba M300 & co */ 1931 CXT5051_TOSHIBA, /* Toshiba M300 & co */
1932 CXT5051_IDEAPAD, /* Lenovo IdeaPad Y430 */
1920 CXT5051_MODELS 1933 CXT5051_MODELS
1921}; 1934};
1922 1935
@@ -1927,6 +1940,7 @@ static const char *cxt5051_models[CXT5051_MODELS] = {
1927 [CXT5051_LENOVO_X200] = "lenovo-x200", 1940 [CXT5051_LENOVO_X200] = "lenovo-x200",
1928 [CXT5051_F700] = "hp-700", 1941 [CXT5051_F700] = "hp-700",
1929 [CXT5051_TOSHIBA] = "toshiba", 1942 [CXT5051_TOSHIBA] = "toshiba",
1943 [CXT5051_IDEAPAD] = "ideapad",
1930}; 1944};
1931 1945
1932static struct snd_pci_quirk cxt5051_cfg_tbl[] = { 1946static struct snd_pci_quirk cxt5051_cfg_tbl[] = {
@@ -1938,6 +1952,7 @@ static struct snd_pci_quirk cxt5051_cfg_tbl[] = {
1938 CXT5051_LAPTOP), 1952 CXT5051_LAPTOP),
1939 SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP), 1953 SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP),
1940 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT5051_LENOVO_X200), 1954 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT5051_LENOVO_X200),
1955 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo IdeaPad", CXT5051_IDEAPAD),
1941 {} 1956 {}
1942}; 1957};
1943 1958
@@ -1999,6 +2014,11 @@ static int patch_cxt5051(struct hda_codec *codec)
1999 spec->mixers[0] = cxt5051_toshiba_mixers; 2014 spec->mixers[0] = cxt5051_toshiba_mixers;
2000 spec->auto_mic = AUTO_MIC_PORTB; 2015 spec->auto_mic = AUTO_MIC_PORTB;
2001 break; 2016 break;
2017 case CXT5051_IDEAPAD:
2018 spec->init_verbs[spec->num_init_verbs++] =
2019 cxt5051_ideapad_init_verbs;
2020 spec->ideapad = 1;
2021 break;
2002 } 2022 }
2003 2023
2004 return 0; 2024 return 0;