aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ac97/ac97_patch.c17
-rw-r--r--sound/pci/hda/patch_conexant.c50
2 files changed, 51 insertions, 16 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 139cf3b2b9d7..e288a5595f34 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -544,25 +544,10 @@ static int patch_wolfson04(struct snd_ac97 * ac97)
544 return 0; 544 return 0;
545} 545}
546 546
547static int patch_wolfson_wm9705_specific(struct snd_ac97 * ac97)
548{
549 int err, i;
550 for (i = 0; i < ARRAY_SIZE(wm97xx_snd_ac97_controls); i++) {
551 if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&wm97xx_snd_ac97_controls[i], ac97))) < 0)
552 return err;
553 }
554 snd_ac97_write_cache(ac97, 0x72, 0x0808);
555 return 0;
556}
557
558static struct snd_ac97_build_ops patch_wolfson_wm9705_ops = {
559 .build_specific = patch_wolfson_wm9705_specific,
560};
561
562static int patch_wolfson05(struct snd_ac97 * ac97) 547static int patch_wolfson05(struct snd_ac97 * ac97)
563{ 548{
564 /* WM9705, WM9710 */ 549 /* WM9705, WM9710 */
565 ac97->build_ops = &patch_wolfson_wm9705_ops; 550 ac97->build_ops = &patch_wolfson_wm9703_ops;
566#ifdef CONFIG_TOUCHSCREEN_WM9705 551#ifdef CONFIG_TOUCHSCREEN_WM9705
567 /* WM9705 touchscreen uses AUX and VIDEO for touch */ 552 /* WM9705 touchscreen uses AUX and VIDEO for touch */
568 ac97->flags |= AC97_HAS_NO_VIDEO | AC97_HAS_NO_AUX; 553 ac97->flags |= AC97_HAS_NO_VIDEO | AC97_HAS_NO_AUX;
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 947785f43b28..01e46ba72690 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1723,6 +1723,22 @@ static struct snd_kcontrol_new cxt5051_hp_dv6736_mixers[] = {
1723 {} 1723 {}
1724}; 1724};
1725 1725
1726static struct snd_kcontrol_new cxt5051_f700_mixers[] = {
1727 HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT),
1728 HDA_CODEC_MUTE("Mic Switch", 0x14, 0x01, HDA_INPUT),
1729 HDA_CODEC_VOLUME("Master Playback Volume", 0x10, 0x00, HDA_OUTPUT),
1730 {
1731 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1732 .name = "Master Playback Switch",
1733 .info = cxt_eapd_info,
1734 .get = cxt_eapd_get,
1735 .put = cxt5051_hp_master_sw_put,
1736 .private_value = 0x1a,
1737 },
1738
1739 {}
1740};
1741
1726static struct hda_verb cxt5051_init_verbs[] = { 1742static struct hda_verb cxt5051_init_verbs[] = {
1727 /* Line in, Mic */ 1743 /* Line in, Mic */
1728 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03}, 1744 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03},
@@ -1813,6 +1829,32 @@ static struct hda_verb cxt5051_lenovo_x200_init_verbs[] = {
1813 { } /* end */ 1829 { } /* end */
1814}; 1830};
1815 1831
1832static struct hda_verb cxt5051_f700_init_verbs[] = {
1833 /* Line in, Mic */
1834 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x03},
1835 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
1836 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0},
1837 {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0},
1838 /* SPK */
1839 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1840 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00},
1841 /* HP, Amp */
1842 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1843 {0x16, AC_VERB_SET_CONNECT_SEL, 0x00},
1844 /* DAC1 */
1845 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1846 /* Record selector: Int mic */
1847 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44},
1848 {0x14, AC_VERB_SET_CONNECT_SEL, 0x1},
1849 /* SPDIF route: PCM */
1850 {0x1c, AC_VERB_SET_CONNECT_SEL, 0x0},
1851 /* EAPD */
1852 {0x1a, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */
1853 {0x16, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|CONEXANT_HP_EVENT},
1854 {0x17, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|CXT5051_PORTB_EVENT},
1855 { } /* end */
1856};
1857
1816/* initialize jack-sensing, too */ 1858/* initialize jack-sensing, too */
1817static int cxt5051_init(struct hda_codec *codec) 1859static int cxt5051_init(struct hda_codec *codec)
1818{ 1860{
@@ -1832,6 +1874,7 @@ enum {
1832 CXT5051_HP, /* no docking */ 1874 CXT5051_HP, /* no docking */
1833 CXT5051_HP_DV6736, /* HP without mic switch */ 1875 CXT5051_HP_DV6736, /* HP without mic switch */
1834 CXT5051_LENOVO_X200, /* Lenovo X200 laptop */ 1876 CXT5051_LENOVO_X200, /* Lenovo X200 laptop */
1877 CXT5051_F700, /* HP Compaq Presario F700 */
1835 CXT5051_MODELS 1878 CXT5051_MODELS
1836}; 1879};
1837 1880
@@ -1840,6 +1883,7 @@ static const char *cxt5051_models[CXT5051_MODELS] = {
1840 [CXT5051_HP] = "hp", 1883 [CXT5051_HP] = "hp",
1841 [CXT5051_HP_DV6736] = "hp-dv6736", 1884 [CXT5051_HP_DV6736] = "hp-dv6736",
1842 [CXT5051_LENOVO_X200] = "lenovo-x200", 1885 [CXT5051_LENOVO_X200] = "lenovo-x200",
1886 [CXT5051_F700] = "hp 700"
1843}; 1887};
1844 1888
1845static struct snd_pci_quirk cxt5051_cfg_tbl[] = { 1889static struct snd_pci_quirk cxt5051_cfg_tbl[] = {
@@ -1849,6 +1893,7 @@ static struct snd_pci_quirk cxt5051_cfg_tbl[] = {
1849 CXT5051_LAPTOP), 1893 CXT5051_LAPTOP),
1850 SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP), 1894 SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP),
1851 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT5051_LENOVO_X200), 1895 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT5051_LENOVO_X200),
1896 SND_PCI_QUIRK(0x103c, 0x30ea, "Compaq Presario F700", CXT5051_F700),
1852 {} 1897 {}
1853}; 1898};
1854 1899
@@ -1899,6 +1944,11 @@ static int patch_cxt5051(struct hda_codec *codec)
1899 case CXT5051_LENOVO_X200: 1944 case CXT5051_LENOVO_X200:
1900 spec->init_verbs[0] = cxt5051_lenovo_x200_init_verbs; 1945 spec->init_verbs[0] = cxt5051_lenovo_x200_init_verbs;
1901 break; 1946 break;
1947 case CXT5051_F700:
1948 spec->init_verbs[0] = cxt5051_f700_init_verbs;
1949 spec->mixers[0] = cxt5051_f700_mixers;
1950 spec->no_auto_mic = 1;
1951 break;
1902 } 1952 }
1903 1953
1904 return 0; 1954 return 0;