Changeset 87
- Timestamp:
- Jan 23, 2007, 10:49:43 PM (19 years ago)
- Location:
- GPL/trunk/alsa-kernel/pci/hda
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/pci/hda/patch_analog.c
r86 r87 787 787 }; 788 788 789 /* Ultra initialization */ 790 static struct hda_verb ad1986a_ultra_init[] = { 791 /* eapd initialization */ 792 { 0x1b, AC_VERB_SET_EAPD_BTLENABLE, 0x00 }, 793 /* CLFE -> Mic in */ 794 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2 }, 795 { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, 796 { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, 797 { } /* end */ 798 }; 799 789 800 /* models */ 790 801 enum { … … 792 803 AD1986A_3STACK, 793 804 AD1986A_LAPTOP, 794 AD1986A_LAPTOP_EAPD, 805 AD1986A_LAPTOP_EAPD, 806 AD1986A_ULTRA, 795 807 AD1986A_MODELS 796 808 }; … … 800 812 [AD1986A_3STACK] = "3stack", 801 813 [AD1986A_LAPTOP] = "laptop", 802 [AD1986A_LAPTOP_EAPD] = "laptop-eapd", 814 [AD1986A_LAPTOP_EAPD] = "laptop-eapd", 815 [AD1986A_ULTRA] = "ultra", 803 816 }; 804 817 … … 822 835 SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_LAPTOP_EAPD), 823 836 SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_LAPTOP_EAPD), 837 SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), 838 SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), 824 839 SND_PCI_QUIRK(0x17aa, 0x1017, "Lenovo A60", AD1986A_3STACK), 825 840 SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo N100", AD1986A_LAPTOP_EAPD), … … 888 903 spec->input_mux = &ad1986a_laptop_eapd_capture_source; 889 904 break; 905 case AD1986A_ULTRA: 906 spec->mixers[0] = ad1986a_laptop_eapd_mixers; 907 spec->num_init_verbs = 2; 908 spec->init_verbs[1] = ad1986a_ultra_init; 909 spec->multiout.max_channels = 2; 910 spec->multiout.num_dacs = 1; 911 spec->multiout.dac_nids = ad1986a_laptop_dac_nids; 912 spec->multiout.dig_out_nid = 0; 913 break; 890 914 } 891 915 892 916 return 0; 893 917 } 894 918 -
GPL/trunk/alsa-kernel/pci/hda/patch_sigmatel.c
r86 r87 51 51 52 52 enum { 53 STAC_925x_REF, 54 STAC_M2_2, 55 STAC_MA6, 56 STAC_925x_MODELS 57 }; 58 59 enum { 53 60 STAC_D945_REF, 54 61 STAC_D945GTP3, … … 132 139 }; 133 140 141 static hda_nid_t stac925x_adc_nids[1] = { 142 0x03, 143 }; 144 145 static hda_nid_t stac925x_mux_nids[1] = { 146 0x0f, 147 }; 148 149 static hda_nid_t stac925x_dac_nids[1] = { 150 0x02, 151 }; 152 134 153 static hda_nid_t stac922x_adc_nids[2] = { 135 154 0x06, 0x07, … … 163 182 0x08, 0x09, 0x0d, 0x0e, 164 183 0x0f, 0x10, 0x11, 0x12, 184 }; 185 186 static hda_nid_t stac925x_pin_nids[8] = { 187 0x07, 0x08, 0x0a, 0x0b, 188 0x0c, 0x0d, 0x10, 0x11, 165 189 }; 166 190 … … 241 265 /* set dac0mux for dac converter */ 242 266 { 0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, 267 {0} 268 }; 269 270 static struct hda_verb stac925x_core_init[] = { 271 /* set dac0mux for dac converter */ 272 { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, 243 273 {0} 244 274 }; … … 286 316 HDA_CODEC_MUTE("Capture Switch", 0x0a, 0, HDA_OUTPUT), 287 317 HDA_CODEC_VOLUME("Capture Mux Volume", 0x0c, 0, HDA_OUTPUT), 318 {0} /* end */ 319 }; 320 321 static struct snd_kcontrol_new stac925x_mixer[] = { 322 HDA_CODEC_VOLUME("Master Playback Volume", 0xe, 0, HDA_OUTPUT), 323 HDA_CODEC_MUTE("Master Playback Switch", 0xe, 0, HDA_OUTPUT), 324 { 325 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 326 .name = "Input Source", 327 .count = 1, 328 .info = stac92xx_mux_enum_info, 329 .get = stac92xx_mux_enum_get, 330 .put = stac92xx_mux_enum_put, 331 }, 332 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), 333 HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT), 334 HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT), 288 335 {0} /* end */ 289 336 }; … … 411 458 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cb, 412 459 "Dell Latitude 120L", STAC_REF), 460 {0} /* terminator */ 461 }; 462 463 static unsigned int ref925x_pin_configs[8] = { 464 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, 465 0x90a70320, 0x02214210, 0x400003f1, 0x9033032e, 466 }; 467 468 static unsigned int stac925x_MA6_pin_configs[8] = { 469 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, 470 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, 471 }; 472 473 static unsigned int stac925xM2_2_pin_configs[8] = { 474 0x40c003f3, 0x424503f2, 0x041800f4, 0x02a19020, 475 0x50a103F0, 0x90100210, 0x400003f1, 0x9033032e, 476 }; 477 478 static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { 479 [STAC_REF] = ref925x_pin_configs, 480 [STAC_M2_2] = stac925xM2_2_pin_configs, 481 [STAC_MA6] = stac925x_MA6_pin_configs, 482 }; 483 484 static const char *stac925x_models[STAC_925x_MODELS] = { 485 [STAC_REF] = "ref", 486 [STAC_M2_2] = "m2-2", 487 [STAC_MA6] = "m6", 488 }; 489 490 static struct snd_pci_quirk stac925x_cfg_tbl[] = { 491 /* SigmaTel reference board */ 492 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), 493 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), 494 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), 495 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), 496 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), 413 497 {0} /* terminator */ 414 498 }; … … 1702 1786 } 1703 1787 1788 static int patch_stac925x(struct hda_codec *codec) 1789 { 1790 struct sigmatel_spec *spec; 1791 int err; 1792 1793 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 1794 if (spec == NULL) 1795 return -ENOMEM; 1796 1797 codec->spec = spec; 1798 spec->num_pins = 8; 1799 spec->pin_nids = stac925x_pin_nids; 1800 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, 1801 stac925x_models, 1802 stac925x_cfg_tbl); 1803 if (spec->board_config < 0) { 1804 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x, using BIOS defaults\n"); 1805 err = stac92xx_save_bios_config_regs(codec); 1806 if (err < 0) { 1807 stac92xx_free(codec); 1808 return err; 1809 } 1810 spec->pin_configs = spec->bios_pin_configs; 1811 } else if (stac925x_brd_tbl[spec->board_config] != NULL){ 1812 spec->pin_configs = stac925x_brd_tbl[spec->board_config]; 1813 stac92xx_set_config_regs(codec); 1814 } 1815 1816 spec->multiout.max_channels = 2; 1817 spec->multiout.num_dacs = 1; 1818 spec->multiout.dac_nids = stac925x_dac_nids; 1819 spec->adc_nids = stac925x_adc_nids; 1820 spec->mux_nids = stac925x_mux_nids; 1821 spec->num_muxes = 1; 1822 spec->num_dmics = 0; 1823 1824 spec->init = stac925x_core_init; 1825 spec->mixer = stac925x_mixer; 1826 1827 err = stac92xx_parse_auto_config(codec, 0x8, 0x7); 1828 if (err < 0) { 1829 stac92xx_free(codec); 1830 return err; 1831 } 1832 1833 codec->patch_ops = stac92xx_patch_ops; 1834 1835 return 0; 1836 } 1837 1704 1838 static int patch_stac922x(struct hda_codec *codec) 1705 1839 { … … 1861 1995 1862 1996 spec->multiout.dac_nids = spec->dac_nids; 1997 1998 /* Configure GPIO0 as EAPD output */ 1999 snd_hda_codec_write(codec, codec->afg, 0, 2000 AC_VERB_SET_GPIO_DIRECTION, 0x00000001); 2001 /* Configure GPIO0 as CMOS */ 2002 snd_hda_codec_write(codec, codec->afg, 0, 0x7e7, 0x00000000); 2003 /* Assert GPIO0 high */ 2004 snd_hda_codec_write(codec, codec->afg, 0, 2005 AC_VERB_SET_GPIO_DATA, 0x00000001); 2006 /* Enable GPIO0 */ 2007 snd_hda_codec_write(codec, codec->afg, 0, 2008 AC_VERB_SET_GPIO_MASK, 0x00000001); 1863 2009 1864 2010 err = stac92xx_parse_auto_config(codec, 0x1f, 0x20); … … 2139 2285 { .id = 0x83847627, .name = "STAC9271D", .patch = patch_stac927x }, 2140 2286 { .id = 0x83847628, .name = "STAC9274X5NH", .patch = patch_stac927x }, 2141 { .id = 0x83847629, .name = "STAC9274D5NH", .patch = patch_stac927x }, 2287 { .id = 0x83847629, .name = "STAC9274D5NH", .patch = patch_stac927x }, 2288 { .id = 0x83847632, .name = "STAC9202", .patch = patch_stac925x }, 2289 { .id = 0x83847633, .name = "STAC9202D", .patch = patch_stac925x }, 2290 { .id = 0x83847634, .name = "STAC9250", .patch = patch_stac925x }, 2291 { .id = 0x83847635, .name = "STAC9250D", .patch = patch_stac925x }, 2292 { .id = 0x83847636, .name = "STAC9251", .patch = patch_stac925x }, 2293 { .id = 0x83847637, .name = "STAC9250D", .patch = patch_stac925x }, 2142 2294 /* The following does not take into account .id=0x83847661 when subsys = 2143 2295 * 104D0C00 which is STAC9225s. Because of this, some SZ Notebooks are
Note:
See TracChangeset
for help on using the changeset viewer.