29 #include <linux/slab.h>
30 #include <linux/pci.h>
32 #include <linux/module.h>
191 #define MAX_PINS_NUM 16
192 #define MAX_ADCS_NUM 4
193 #define MAX_DMICS_NUM 4
327 #define AC_VERB_IDT_SET_POWER_MAP 0x7ec
328 #define AC_VERB_IDT_GET_POWER_MAP 0xfec
330 static const hda_nid_t stac9200_adc_nids[1] = {
334 static const hda_nid_t stac9200_mux_nids[1] = {
338 static const hda_nid_t stac9200_dac_nids[1] = {
342 static const hda_nid_t stac92hd73xx_pwr_nids[8] = {
343 0x0a, 0x0b, 0x0c, 0xd, 0x0e,
347 static const hda_nid_t stac92hd73xx_slave_dig_outs[2] = {
351 static const hda_nid_t stac92hd73xx_adc_nids[2] = {
355 #define STAC92HD73XX_NUM_DMICS 2
360 #define STAC92HD73_DAC_COUNT 5
362 static const hda_nid_t stac92hd73xx_mux_nids[2] = {
366 static const hda_nid_t stac92hd73xx_dmux_nids[2] = {
370 static const hda_nid_t stac92hd73xx_smux_nids[2] = {
374 #define STAC92HD73XX_NUM_CAPS 2
375 static const unsigned long stac92hd73xx_capvols[] = {
379 #define stac92hd73xx_capsws stac92hd73xx_capvols
381 #define STAC92HD83_DAC_COUNT 3
383 static const hda_nid_t stac92hd83xxx_pwr_nids[7] = {
384 0x0a, 0x0b, 0x0c, 0xd, 0x0e,
388 static const hda_nid_t stac92hd83xxx_slave_dig_outs[2] = {
392 static const hda_nid_t stac92hd83xxx_dmic_nids[] = {
396 static const hda_nid_t stac92hd71bxx_pwr_nids[3] = {
400 static const hda_nid_t stac92hd71bxx_adc_nids[2] = {
404 static const hda_nid_t stac92hd71bxx_mux_nids[2] = {
408 static const hda_nid_t stac92hd71bxx_dmux_nids[2] = {
412 static const hda_nid_t stac92hd71bxx_smux_nids[2] = {
416 #define STAC92HD71BXX_NUM_DMICS 2
425 static const hda_nid_t stac92hd71bxx_slave_dig_outs[2] = {
429 #define STAC92HD71BXX_NUM_CAPS 2
430 static const unsigned long stac92hd71bxx_capvols[] = {
434 #define stac92hd71bxx_capsws stac92hd71bxx_capvols
436 static const hda_nid_t stac925x_adc_nids[1] = {
440 static const hda_nid_t stac925x_mux_nids[1] = {
444 static const hda_nid_t stac925x_dac_nids[1] = {
448 #define STAC925X_NUM_DMICS 1
453 static const hda_nid_t stac925x_dmux_nids[1] = {
457 static const unsigned long stac925x_capvols[] = {
460 static const unsigned long stac925x_capsws[] = {
464 static const hda_nid_t stac922x_adc_nids[2] = {
468 static const hda_nid_t stac922x_mux_nids[2] = {
472 #define STAC922X_NUM_CAPS 2
473 static const unsigned long stac922x_capvols[] = {
477 #define stac922x_capsws stac922x_capvols
479 static const hda_nid_t stac927x_slave_dig_outs[2] = {
483 static const hda_nid_t stac927x_adc_nids[3] = {
487 static const hda_nid_t stac927x_mux_nids[3] = {
491 static const hda_nid_t stac927x_smux_nids[1] = {
495 static const hda_nid_t stac927x_dac_nids[6] = {
496 0x02, 0x03, 0x04, 0x05, 0x06, 0
499 static const hda_nid_t stac927x_dmux_nids[1] = {
503 #define STAC927X_NUM_DMICS 2
508 #define STAC927X_NUM_CAPS 3
509 static const unsigned long stac927x_capvols[] = {
514 static const unsigned long stac927x_capsws[] = {
520 static const char *
const stac927x_spdif_labels[5] = {
521 "Digital Playback",
"ADAT",
"Analog Mux 1",
522 "Analog Mux 2",
"Analog Mux 3"
525 static const hda_nid_t stac9205_adc_nids[2] = {
529 static const hda_nid_t stac9205_mux_nids[2] = {
533 static const hda_nid_t stac9205_dmux_nids[1] = {
537 static const hda_nid_t stac9205_smux_nids[1] = {
541 #define STAC9205_NUM_DMICS 2
546 #define STAC9205_NUM_CAPS 2
547 static const unsigned long stac9205_capvols[] = {
551 static const unsigned long stac9205_capsws[] = {
556 static const hda_nid_t stac9200_pin_nids[8] = {
557 0x08, 0x09, 0x0d, 0x0e,
558 0x0f, 0x10, 0x11, 0x12,
561 static const hda_nid_t stac925x_pin_nids[8] = {
562 0x07, 0x08, 0x0a, 0x0b,
563 0x0c, 0x0d, 0x10, 0x11,
566 static const hda_nid_t stac922x_pin_nids[10] = {
567 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
568 0x0f, 0x10, 0x11, 0x15, 0x1b,
571 static const hda_nid_t stac92hd73xx_pin_nids[13] = {
572 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
573 0x0f, 0x10, 0x11, 0x12, 0x13,
577 #define STAC92HD71BXX_NUM_PINS 13
579 0x0a, 0x0b, 0x0c, 0x0d, 0x00,
580 0x00, 0x14, 0x18, 0x19, 0x1e,
584 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
585 0x0f, 0x14, 0x18, 0x19, 0x1e,
589 static const hda_nid_t stac927x_pin_nids[14] = {
590 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
591 0x0f, 0x10, 0x11, 0x12, 0x13,
592 0x14, 0x21, 0x22, 0x23,
595 static const hda_nid_t stac9205_pin_nids[12] = {
596 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
597 0x0f, 0x14, 0x16, 0x17, 0x18,
601 static int stac92xx_dmux_enum_info(
struct snd_kcontrol *kcontrol,
609 static int stac92xx_dmux_enum_get(
struct snd_kcontrol *kcontrol,
614 unsigned int dmux_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
616 ucontrol->
value.enumerated.item[0] = spec->
cur_dmux[dmux_idx];
620 static int stac92xx_dmux_enum_put(
struct snd_kcontrol *kcontrol,
625 unsigned int dmux_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
631 static int stac92xx_smux_enum_info(
struct snd_kcontrol *kcontrol,
639 static int stac92xx_smux_enum_get(
struct snd_kcontrol *kcontrol,
644 unsigned int smux_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
646 ucontrol->
value.enumerated.item[0] = spec->
cur_smux[smux_idx];
650 static int stac92xx_smux_enum_put(
struct snd_kcontrol *kcontrol,
656 unsigned int smux_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
681 static int stac_vrefout_set(
struct hda_codec *codec,
686 snd_printdd(
"%s, nid %x ctl %x\n", __func__, nid, new_vref);
697 error = snd_hda_set_pin_ctl_cache(codec, nid, pinctl);
704 static unsigned int stac92xx_vref_set(
struct hda_codec *codec,
721 error = snd_hda_set_pin_ctl_cache(codec, nid, pincfg);
748 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
750 ucontrol->
value.enumerated.item[0] = spec->
cur_mux[adc_idx];
758 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
760 unsigned int idx, prev_idx, didx;
762 idx = ucontrol->
value.enumerated.item[0];
765 prev_idx = spec->
cur_mux[adc_idx];
768 if (idx < spec->num_analog_muxes) {
771 imux->
items[idx].index);
779 imux->
items[0].index);
789 imux->
items[didx].index);
795 static int stac92xx_mono_mux_enum_info(
struct snd_kcontrol *kcontrol,
803 static int stac92xx_mono_mux_enum_get(
struct snd_kcontrol *kcontrol,
813 static int stac92xx_mono_mux_enum_put(
struct snd_kcontrol *kcontrol,
823 #define stac92xx_aloopback_info snd_ctl_boolean_mono_info
825 static int stac92xx_aloopback_get(
struct snd_kcontrol *kcontrol,
829 unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
837 static int stac92xx_aloopback_put(
struct snd_kcontrol *kcontrol,
842 unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->
id);
843 unsigned int dac_mode;
844 unsigned int val, idx_val;
847 if (ucontrol->
value.integer.value[0])
864 snd_hda_power_up(codec);
867 snd_hda_power_down(codec);
868 dac_mode &= ~idx_val;
877 static const struct hda_verb stac9200_core_init[] = {
883 static const struct hda_verb stac9200_eapd_init[] = {
890 static const struct hda_verb dell_eq_core_init[] = {
897 static const struct hda_verb stac92hd73xx_core_init[] = {
903 static const struct hda_verb stac92hd83xxx_core_init[] = {
909 static const struct hda_verb stac92hd83xxx_hp_zephyr_init[] = {
910 { 0x22, 0x785, 0x43 },
911 { 0x22, 0x782, 0xe0 },
912 { 0x22, 0x795, 0x00 },
916 static const struct hda_verb stac92hd71bxx_core_init[] = {
922 static const struct hda_verb stac92hd71bxx_unmute_core_init[] = {
930 static const struct hda_verb stac925x_core_init[] = {
938 static const struct hda_verb stac922x_core_init[] = {
944 static const struct hda_verb d965_core_init[] = {
954 static const struct hda_verb dell_3st_core_init[] = {
964 static const struct hda_verb stac927x_core_init[] = {
972 static const struct hda_verb stac927x_volknob_core_init[] = {
980 static const struct hda_verb stac9205_core_init[] = {
988 #define STAC_MONO_MUX \
990 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
991 .name = "Mono Mux", \
993 .info = stac92xx_mono_mux_enum_info, \
994 .get = stac92xx_mono_mux_enum_get, \
995 .put = stac92xx_mono_mux_enum_put, \
998 #define STAC_ANALOG_LOOPBACK(verb_read, verb_write, cnt) \
1000 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
1001 .name = "Analog Loopback", \
1003 .info = stac92xx_aloopback_info, \
1004 .get = stac92xx_aloopback_get, \
1005 .put = stac92xx_aloopback_put, \
1006 .private_value = verb_read | (verb_write << 16), \
1009 #define DC_BIAS(xname, idx, nid) \
1011 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
1014 .info = stac92xx_dc_bias_info, \
1015 .get = stac92xx_dc_bias_get, \
1016 .put = stac92xx_dc_bias_put, \
1017 .private_value = nid, \
1066 .name =
"Digital Input Source",
1068 .info = stac92xx_dmux_enum_info,
1069 .get = stac92xx_dmux_enum_get,
1070 .put = stac92xx_dmux_enum_put,
1075 .name =
"IEC958 Playback Source",
1077 .info = stac92xx_smux_enum_info,
1078 .get = stac92xx_smux_enum_get,
1079 .put = stac92xx_smux_enum_put,
1082 static const char *
const slave_pfxs[] = {
1083 "Front",
"Surround",
"Center",
"LFE",
"Side",
1084 "Headphone",
"Speaker",
"IEC958",
"PCM",
1088 static void stac92xx_update_led_status(
struct hda_codec *codec,
int enabled);
1090 static void stac92xx_vmaster_hook(
void *
private_data,
int val)
1092 stac92xx_update_led_status(private_data, val);
1095 static void stac92xx_free_kctls(
struct hda_codec *codec);
1097 static int stac92xx_build_controls(
struct hda_codec *codec)
1100 unsigned int vmaster_tlv[4];
1116 snd_hda_get_bool_hint(codec,
"separate_dmux") == 1) {
1124 int wcaps = get_wcaps(codec, spec->
multiout.dig_out_nid);
1164 vmaster_tlv, slave_pfxs,
1171 "Playback Switch",
true,
1184 snd_hda_get_bool_hint(codec,
"loopback") == 1) {
1190 stac92xx_free_kctls(codec);
1199 static const unsigned int ref9200_pin_configs[8] = {
1200 0x01c47010, 0x01447010, 0x0221401f, 0x01114010,
1201 0x02a19020, 0x01a19021, 0x90100140, 0x01813122,
1204 static const unsigned int gateway9200_m4_pin_configs[8] = {
1205 0x400000fe, 0x404500f4, 0x400100f0, 0x90110010,
1206 0x400100f1, 0x02a1902e, 0x500000f2, 0x500000f3,
1208 static const unsigned int gateway9200_m4_2_pin_configs[8] = {
1209 0x400000fe, 0x404500f4, 0x400100f0, 0x90110010,
1210 0x400100f1, 0x02a1902e, 0x500000f2, 0x500000f3,
1219 static const unsigned int dell9200_d21_pin_configs[8] = {
1220 0x400001f0, 0x400001f1, 0x02214030, 0x01014010,
1221 0x02a19020, 0x01a19021, 0x90100140, 0x01813122,
1229 static const unsigned int dell9200_d22_pin_configs[8] = {
1230 0x400001f0, 0x400001f1, 0x0221401f, 0x01014010,
1231 0x01813020, 0x02a19021, 0x90100140, 0x400001f2,
1243 static const unsigned int dell9200_d23_pin_configs[8] = {
1244 0x400001f0, 0x400001f1, 0x0221401f, 0x01014010,
1245 0x01813020, 0x01a19021, 0x90100140, 0x400001f2,
1254 static const unsigned int dell9200_m21_pin_configs[8] = {
1255 0x40c003fa, 0x03441340, 0x0321121f, 0x90170310,
1256 0x408003fb, 0x03a11020, 0x401003fc, 0x403003fd,
1267 static const unsigned int dell9200_m22_pin_configs[8] = {
1268 0x40c003fa, 0x0144131f, 0x0321121f, 0x90170310,
1269 0x90a70321, 0x03a11020, 0x401003fb, 0x40f000fc,
1277 static const unsigned int dell9200_m23_pin_configs[8] = {
1278 0x40c003fa, 0x01441340, 0x0421421f, 0x90170310,
1279 0x408003fb, 0x04a1102e, 0x90170311, 0x403003fc,
1289 static const unsigned int dell9200_m24_pin_configs[8] = {
1290 0x40c003fa, 0x404003fb, 0x0321121f, 0x90170310,
1291 0x408003fc, 0x03a11020, 0x401003fd, 0x403003fe,
1300 static const unsigned int dell9200_m25_pin_configs[8] = {
1301 0x40c003fa, 0x01441340, 0x0421121f, 0x90170310,
1302 0x408003fb, 0x04a11020, 0x401003fc, 0x403003fd,
1310 static const unsigned int dell9200_m26_pin_configs[8] = {
1311 0x40c003fa, 0x404003fb, 0x0421121f, 0x90170310,
1312 0x408003fc, 0x04a11020, 0x401003fd, 0x403003fe,
1319 static const unsigned int dell9200_m27_pin_configs[8] = {
1320 0x40c003fa, 0x01441340, 0x0421121f, 0x90170310,
1321 0x90170310, 0x04a11020, 0x90170310, 0x40f003fc,
1324 static const unsigned int oqo9200_pin_configs[8] = {
1325 0x40c000f0, 0x404000f1, 0x0221121f, 0x02211210,
1326 0x90170111, 0x90a70120, 0x400000f2, 0x400000f3,
1367 static const struct snd_pci_quirk stac9200_cfg_tbl[] = {
1435 SND_PCI_QUIRK(0x107b, 0x0205,
"Gateway S-7110M",
STAC_9200_M4),
1436 SND_PCI_QUIRK(0x107b, 0x0317,
"Gateway MT3423, MX341*",
STAC_9200_M4_2),
1437 SND_PCI_QUIRK(0x107b, 0x0318,
"Gateway ML3019, MT3707",
STAC_9200_M4_2),
1439 SND_PCI_QUIRK(0x1106, 0x3288,
"OQO Model 2",
STAC_9200_OQO),
1443 static const unsigned int ref925x_pin_configs[8] = {
1444 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
1445 0x90a70320, 0x02214210, 0x01019020, 0x9033032e,
1448 static const unsigned int stac925xM1_pin_configs[8] = {
1449 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1450 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1453 static const unsigned int stac925xM1_2_pin_configs[8] = {
1454 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1455 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1458 static const unsigned int stac925xM2_pin_configs[8] = {
1459 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1460 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1463 static const unsigned int stac925xM2_2_pin_configs[8] = {
1464 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1465 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1468 static const unsigned int stac925xM3_pin_configs[8] = {
1469 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1470 0x40a000f0, 0x90100210, 0x400003f1, 0x503303f3,
1473 static const unsigned int stac925xM5_pin_configs[8] = {
1474 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1475 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1478 static const unsigned int stac925xM6_pin_configs[8] = {
1479 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1480 0x40a000f0, 0x90100210, 0x400003f1, 0x90330320,
1485 [
STAC_M1] = stac925xM1_pin_configs,
1487 [
STAC_M2] = stac925xM2_pin_configs,
1489 [
STAC_M3] = stac925xM3_pin_configs,
1490 [
STAC_M5] = stac925xM5_pin_configs,
1491 [
STAC_M6] = stac925xM6_pin_configs,
1506 static const struct snd_pci_quirk stac925x_codec_id_cfg_tbl[] = {
1507 SND_PCI_QUIRK(0x107b, 0x0316,
"Gateway M255",
STAC_M2),
1508 SND_PCI_QUIRK(0x107b, 0x0366,
"Gateway MP6954",
STAC_M5),
1509 SND_PCI_QUIRK(0x107b, 0x0461,
"Gateway NX560XL",
STAC_M1),
1510 SND_PCI_QUIRK(0x107b, 0x0681,
"Gateway NX860",
STAC_M2),
1511 SND_PCI_QUIRK(0x107b, 0x0367,
"Gateway MX6453",
STAC_M1_2),
1513 SND_PCI_QUIRK(0x107b, 0x0281,
"Gateway mobile",
STAC_M1),
1514 SND_PCI_QUIRK(0x107b, 0x0507,
"Gateway mobile",
STAC_M3),
1515 SND_PCI_QUIRK(0x107b, 0x0281,
"Gateway mobile",
STAC_M6),
1516 SND_PCI_QUIRK(0x107b, 0x0685,
"Gateway mobile",
STAC_M2_2),
1520 static const struct snd_pci_quirk stac925x_cfg_tbl[] = {
1524 SND_PCI_QUIRK(0x8384, 0x7632,
"Stac9202 Reference Board",
STAC_REF),
1527 SND_PCI_QUIRK(0x1002, 0x437b,
"Gateway mobile",
STAC_M2_2),
1532 static const unsigned int ref92hd73xx_pin_configs[13] = {
1533 0x02214030, 0x02a19040, 0x01a19020, 0x02214030,
1534 0x0181302e, 0x01014010, 0x01014020, 0x01014030,
1535 0x02319040, 0x90a000f0, 0x90a000f0, 0x01452050,
1539 static const unsigned int dell_m6_pin_configs[13] = {
1540 0x0321101f, 0x4f00000f, 0x4f0000f0, 0x90170110,
1541 0x03a11020, 0x0321101f, 0x4f0000f0, 0x4f0000f0,
1542 0x4f0000f0, 0x90a60160, 0x4f0000f0, 0x4f0000f0,
1546 static const unsigned int alienware_m17x_pin_configs[13] = {
1547 0x0321101f, 0x0321101f, 0x03a11020, 0x03014020,
1548 0x90170110, 0x4f0000f0, 0x4f0000f0, 0x4f0000f0,
1549 0x4f0000f0, 0x90a60160, 0x4f0000f0, 0x4f0000f0,
1553 static const unsigned int intel_dg45id_pin_configs[13] = {
1554 0x02214230, 0x02A19240, 0x01013214, 0x01014210,
1555 0x01A19250, 0x01011212, 0x01016211
1580 static const struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
1621 static const struct snd_pci_quirk stac92hd73xx_codec_id_cfg_tbl[] = {
1631 static const unsigned int ref92hd83xxx_pin_configs[10] = {
1632 0x02214030, 0x02211010, 0x02a19020, 0x02170130,
1633 0x01014050, 0x01819040, 0x01014020, 0x90a3014e,
1634 0x01451160, 0x98560170,
1637 static const unsigned int dell_s14_pin_configs[10] = {
1638 0x0221403f, 0x0221101f, 0x02a19020, 0x90170110,
1639 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a60160,
1640 0x40f000f0, 0x40f000f0,
1643 static const unsigned int dell_vostro_3500_pin_configs[10] = {
1644 0x02a11020, 0x0221101f, 0x400000f0, 0x90170110,
1645 0x400000f1, 0x400000f2, 0x400000f3, 0x90a60160,
1646 0x400000f4, 0x400000f5,
1649 static const unsigned int hp_dv7_4000_pin_configs[10] = {
1650 0x03a12050, 0x0321201f, 0x40f000f0, 0x90170110,
1651 0x40f000f0, 0x40f000f0, 0x90170110, 0xd5a30140,
1652 0x40f000f0, 0x40f000f0,
1655 static const unsigned int hp_zephyr_pin_configs[10] = {
1656 0x01813050, 0x0421201f, 0x04a1205e, 0x96130310,
1657 0x96130310, 0x0101401f, 0x1111611f, 0xd5a30130,
1661 static const unsigned int hp_cNB11_intquad_pin_configs[10] = {
1662 0x40f000f0, 0x0221101f, 0x02a11020, 0x92170110,
1663 0x40f000f0, 0x92170110, 0x40f000f0, 0xd5a30130,
1664 0x40f000f0, 0x40f000f0,
1692 static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
1771 static const struct snd_pci_quirk stac92hd83xxx_codec_id_cfg_tbl[] = {
1778 0x02214030, 0x02a19040, 0x01a19020, 0x01014010,
1779 0x0181302e, 0x01014010, 0x01019020, 0x90a000f0,
1780 0x90a000f0, 0x01452050, 0x01452050, 0x00000000,
1785 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110,
1786 0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0,
1787 0x40f000f0, 0x4f0000f0, 0x4f0000f0, 0x00000000,
1792 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110,
1793 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
1794 0x40f000f0, 0x044413b0, 0x044413b0, 0x00000000,
1799 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110,
1800 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a000f0,
1801 0x40f000f0, 0x044413b0, 0x044413b0, 0x00000000,
1830 static const struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1887 static const unsigned int ref922x_pin_configs[10] = {
1888 0x01014010, 0x01016011, 0x01012012, 0x0221401f,
1889 0x01813122, 0x01011014, 0x01441030, 0x01c41030,
1890 0x40000100, 0x40000100,
1901 static const unsigned int dell_922x_d81_pin_configs[10] = {
1902 0x02214030, 0x01a19021, 0x01111012, 0x01114010,
1903 0x02a19020, 0x01117011, 0x400001f0, 0x400001f1,
1904 0x01813122, 0x400001f2,
1912 static const unsigned int dell_922x_d82_pin_configs[10] = {
1913 0x02214030, 0x01a19021, 0x01111012, 0x01114010,
1914 0x02a19020, 0x01117011, 0x01451140, 0x400001f0,
1915 0x01813122, 0x400001f1,
1922 static const unsigned int dell_922x_m81_pin_configs[10] = {
1923 0x0321101f, 0x01112024, 0x01111222, 0x91174220,
1924 0x03a11050, 0x01116221, 0x90a70330, 0x01452340,
1925 0x40C003f1, 0x405003f0,
1932 static const unsigned int dell_922x_m82_pin_configs[10] = {
1933 0x02211211, 0x408103ff, 0x02a1123e, 0x90100310,
1934 0x408003f1, 0x0221121f, 0x03451340, 0x40c003f2,
1935 0x508003f3, 0x405003f4,
1938 static const unsigned int d945gtp3_pin_configs[10] = {
1939 0x0221401f, 0x01a19022, 0x01813021, 0x01014010,
1940 0x40000100, 0x40000100, 0x40000100, 0x40000100,
1941 0x02a19120, 0x40000100,
1944 static const unsigned int d945gtp5_pin_configs[10] = {
1945 0x0221401f, 0x01011012, 0x01813024, 0x01014010,
1946 0x01a19021, 0x01016011, 0x01452130, 0x40000100,
1947 0x02a19320, 0x40000100,
1950 static const unsigned int intel_mac_v1_pin_configs[10] = {
1951 0x0121e21f, 0x400000ff, 0x9017e110, 0x400000fd,
1952 0x400000fe, 0x0181e020, 0x1145e030, 0x11c5e240,
1953 0x400000fc, 0x400000fb,
1956 static const unsigned int intel_mac_v2_pin_configs[10] = {
1957 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd,
1958 0x400000fe, 0x0181e020, 0x1145e230, 0x500000fa,
1959 0x400000fc, 0x400000fb,
1962 static const unsigned int intel_mac_v3_pin_configs[10] = {
1963 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd,
1964 0x400000fe, 0x0181e020, 0x1145e230, 0x11c5e240,
1965 0x400000fc, 0x400000fb,
1968 static const unsigned int intel_mac_v4_pin_configs[10] = {
1969 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f,
1970 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240,
1971 0x400000fc, 0x400000fb,
1974 static const unsigned int intel_mac_v5_pin_configs[10] = {
1975 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f,
1976 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240,
1977 0x400000fc, 0x400000fb,
1980 static const unsigned int ecs202_pin_configs[10] = {
1981 0x0221401f, 0x02a19020, 0x01a19020, 0x01114010,
1982 0x408000f0, 0x01813022, 0x074510a0, 0x40c400f1,
1983 0x9037012e, 0x40e000f2,
2035 static const struct snd_pci_quirk stac922x_cfg_tbl[] = {
2099 SND_PCI_QUIRK(0x8384, 0x7680,
2121 SND_PCI_QUIRK_MASK(0x1019, 0xf000, 0x2000,
2126 static const unsigned int ref927x_pin_configs[14] = {
2127 0x02214020, 0x02a19080, 0x0181304e, 0x01014010,
2128 0x01a19040, 0x01011012, 0x01016011, 0x0101201f,
2129 0x183301f0, 0x18a001f0, 0x18a001f0, 0x01442070,
2130 0x01c42190, 0x40000100,
2133 static const unsigned int d965_3st_pin_configs[14] = {
2134 0x0221401f, 0x02a19120, 0x40000100, 0x01014011,
2135 0x01a19021, 0x01813024, 0x40000100, 0x40000100,
2136 0x40000100, 0x40000100, 0x40000100, 0x40000100,
2137 0x40000100, 0x40000100
2140 static const unsigned int d965_5st_pin_configs[14] = {
2141 0x02214020, 0x02a19080, 0x0181304e, 0x01014010,
2142 0x01a19040, 0x01011012, 0x01016011, 0x40000100,
2143 0x40000100, 0x40000100, 0x40000100, 0x01442070,
2144 0x40000100, 0x40000100
2147 static const unsigned int d965_5st_no_fp_pin_configs[14] = {
2148 0x40000100, 0x40000100, 0x0181304e, 0x01014010,
2149 0x01a19040, 0x01011012, 0x01016011, 0x40000100,
2150 0x40000100, 0x40000100, 0x40000100, 0x01442070,
2151 0x40000100, 0x40000100
2154 static const unsigned int dell_3st_pin_configs[14] = {
2155 0x02211230, 0x02a11220, 0x01a19040, 0x01114210,
2156 0x01111212, 0x01116211, 0x01813050, 0x01112214,
2157 0x403003fa, 0x90a60040, 0x90a60040, 0x404003fb,
2158 0x40c003fc, 0x40000100
2184 static const struct snd_pci_quirk stac927x_cfg_tbl[] = {
2222 static const unsigned int ref9205_pin_configs[12] = {
2223 0x40000100, 0x40000100, 0x01016011, 0x01014010,
2224 0x01813122, 0x01a19021, 0x01019020, 0x40000100,
2225 0x90a000f0, 0x90a000f0, 0x01441030, 0x01c41030
2239 static const unsigned int dell_9205_m42_pin_configs[12] = {
2240 0x0321101F, 0x03A11020, 0x400003FA, 0x90170310,
2241 0x400003FB, 0x400003FC, 0x400003FD, 0x40F000F9,
2242 0x90A60330, 0x400003FF, 0x0144131F, 0x40C003FE,
2255 static const unsigned int dell_9205_m43_pin_configs[12] = {
2256 0x0321101f, 0x03a11020, 0x90a70330, 0x90170310,
2257 0x400000fe, 0x400000ff, 0x400000fd, 0x40f000f9,
2258 0x400000fa, 0x400000fc, 0x0144131f, 0x40c003f8,
2261 static const unsigned int dell_9205_m44_pin_configs[12] = {
2262 0x0421101f, 0x04a11020, 0x400003fa, 0x90170310,
2263 0x400003fb, 0x400003fc, 0x400003fd, 0x400003f9,
2264 0x90a60330, 0x400003ff, 0x01441340, 0x40c003fe,
2284 static const struct snd_pci_quirk stac9205_cfg_tbl[] = {
2331 static void stac92xx_set_config_regs(
struct hda_codec *codec,
2332 const unsigned int *pincfgs)
2340 for (i = 0; i < spec->
num_pins; i++)
2341 if (spec->
pin_nids[i] && pincfgs[i])
2349 static int stac92xx_playback_pcm_open(
struct hda_pcm_stream *hinfo,
2360 static int stac92xx_playback_pcm_prepare(
struct hda_pcm_stream *hinfo,
2362 unsigned int stream_tag,
2370 static int stac92xx_playback_pcm_cleanup(
struct hda_pcm_stream *hinfo,
2381 static int stac92xx_dig_playback_pcm_open(
struct hda_pcm_stream *hinfo,
2389 static int stac92xx_dig_playback_pcm_close(
struct hda_pcm_stream *hinfo,
2397 static int stac92xx_dig_playback_pcm_prepare(
struct hda_pcm_stream *hinfo,
2399 unsigned int stream_tag,
2405 stream_tag, format, substream);
2408 static int stac92xx_dig_playback_pcm_cleanup(
struct hda_pcm_stream *hinfo,
2420 static int stac92xx_capture_pcm_prepare(
struct hda_pcm_stream *hinfo,
2422 unsigned int stream_tag,
2438 static int stac92xx_capture_pcm_cleanup(
struct hda_pcm_stream *hinfo,
2452 static const struct hda_pcm_stream stac92xx_pcm_digital_playback = {
2458 .open = stac92xx_dig_playback_pcm_open,
2459 .close = stac92xx_dig_playback_pcm_close,
2460 .prepare = stac92xx_dig_playback_pcm_prepare,
2461 .cleanup = stac92xx_dig_playback_pcm_cleanup
2465 static const struct hda_pcm_stream stac92xx_pcm_digital_capture = {
2472 static const struct hda_pcm_stream stac92xx_pcm_analog_playback = {
2478 .open = stac92xx_playback_pcm_open,
2479 .prepare = stac92xx_playback_pcm_prepare,
2480 .cleanup = stac92xx_playback_pcm_cleanup
2484 static const struct hda_pcm_stream stac92xx_pcm_analog_alt_playback = {
2490 .open = stac92xx_playback_pcm_open,
2491 .prepare = stac92xx_playback_pcm_prepare,
2492 .cleanup = stac92xx_playback_pcm_cleanup
2496 static const struct hda_pcm_stream stac92xx_pcm_analog_capture = {
2501 .prepare = stac92xx_capture_pcm_prepare,
2502 .cleanup = stac92xx_capture_pcm_cleanup
2506 static int stac92xx_build_pcms(
struct hda_codec *codec)
2514 info->
name =
"STAC92xx Analog";
2525 info->
name =
"STAC92xx Analog Alt";
2532 info->
name =
"STAC92xx Digital";
2547 static void stac92xx_auto_set_pinctl(
struct hda_codec *codec,
hda_nid_t nid,
int pin_type)
2550 snd_hda_set_pin_ctl_cache(codec, nid, pin_type);
2553 #define stac92xx_hp_switch_info snd_ctl_boolean_mono_info
2555 static int stac92xx_hp_switch_get(
struct snd_kcontrol *kcontrol,
2567 static int stac92xx_hp_switch_put(
struct snd_kcontrol *kcontrol,
2579 stac_issue_unsol_event(codec, nid);
2584 static int stac92xx_dc_bias_info(
struct snd_kcontrol *kcontrol,
2588 static const char *
const texts[] = {
2589 "Mic In",
"Line In",
"Line Out"
2612 static int stac92xx_dc_bias_get(
struct snd_kcontrol *kcontrol,
2617 unsigned int vref = stac92xx_vref_get(codec, nid);
2620 ucontrol->
value.enumerated.item[0] = 0;
2622 ucontrol->
value.enumerated.item[0] = 1;
2624 ucontrol->
value.enumerated.item[0] = 2;
2629 static int stac92xx_dc_bias_put(
struct snd_kcontrol *kcontrol,
2633 unsigned int new_vref = 0;
2637 if (ucontrol->
value.enumerated.item[0] == 0)
2639 else if (ucontrol->
value.enumerated.item[0] == 1)
2641 else if (ucontrol->
value.enumerated.item[0] == 2)
2646 if (new_vref != stac92xx_vref_get(codec, nid)) {
2647 error = stac92xx_vref_set(codec, nid, new_vref);
2654 static int stac92xx_io_switch_info(
struct snd_kcontrol *kcontrol,
2662 texts[0] =
"Line In";
2664 texts[0] =
"Mic In";
2665 texts[1] =
"Line Out";
2683 int io_idx = (nid == spec->
mic_switch) ? 1 : 0;
2694 int io_idx = (nid == spec->
mic_switch) ? 1 : 0;
2695 unsigned short val = !!ucontrol->
value.enumerated.item[0];
2705 stac92xx_auto_set_pinctl(codec, nid, pinctl);
2712 stac_issue_unsol_event(codec, nid);
2717 #define stac92xx_clfe_switch_info snd_ctl_boolean_mono_info
2719 static int stac92xx_clfe_switch_get(
struct snd_kcontrol *kcontrol,
2729 static int stac92xx_clfe_switch_put(
struct snd_kcontrol *kcontrol,
2735 unsigned int val = !!ucontrol->
value.integer.value[0];
2748 #define STAC_CODEC_HP_SWITCH(xname) \
2749 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
2752 .info = stac92xx_hp_switch_info, \
2753 .get = stac92xx_hp_switch_get, \
2754 .put = stac92xx_hp_switch_put, \
2757 #define STAC_CODEC_IO_SWITCH(xname, xpval) \
2758 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
2761 .info = stac92xx_io_switch_info, \
2762 .get = stac92xx_io_switch_get, \
2763 .put = stac92xx_io_switch_put, \
2764 .private_value = xpval, \
2767 #define STAC_CODEC_CLFE_SWITCH(xname, xpval) \
2768 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
2771 .info = stac92xx_clfe_switch_info, \
2772 .get = stac92xx_clfe_switch_get, \
2773 .put = stac92xx_clfe_switch_put, \
2774 .private_value = xpval, \
2808 snd_array_init(&spec->
kctls,
sizeof(*knew), 32);
2816 memset(knew, 0,
sizeof(*knew));
2817 spec->
kctls.alloced--;
2827 int idx,
const char *name,
2839 static int stac92xx_add_control_temp(
struct sigmatel_spec *spec,
2841 int idx,
const char *name,
2844 return add_control_temp(spec, ktemp, idx, name, val) ? 0 : -
ENOMEM;
2847 static inline int stac92xx_add_control_idx(
struct sigmatel_spec *spec,
2848 int type,
int idx,
const char *name,
2851 return stac92xx_add_control_temp(spec,
2852 &stac92xx_control_templates[type],
2859 const char *name,
unsigned long val)
2861 return stac92xx_add_control_idx(spec, type, 0, name, val);
2866 .name =
"Input Source",
2867 .info = stac92xx_mux_enum_info,
2868 .get = stac92xx_mux_enum_get,
2869 .put = stac92xx_mux_enum_put,
2872 static inline int stac92xx_add_jack_mode_control(
struct hda_codec *codec,
2896 name,
sizeof(name),
NULL);
2897 return stac92xx_add_control(codec->
spec, control,
2898 strcat(name,
" Jack Mode"), nid);
2904 static int stac92xx_add_input_source(
struct sigmatel_spec *spec)
2913 knew = stac_control_new(spec, &stac_input_src_temp,
2914 stac_input_src_temp.
name, 0);
2927 unsigned int pincap;
2950 unsigned int def_conf, pincap;
2966 *dac = get_unassigned_dac(codec, nid);
2979 for (i = 0; i < spec->
multiout.num_dacs; i++) {
2980 if (spec->
multiout.dac_nids[i] == nid)
2990 if (is_in_dac_nids(spec, nid))
2992 for (i = 0; i < spec->
autocfg.hp_outs; i++)
2995 for (i = 0; i < spec->
autocfg.speaker_outs; i++)
3007 unsigned int wcaps, wtype;
3012 while (conn_len == 1 && (get_wcaps_type(get_wcaps(codec, conn[0]))
3018 for (j = 0; j < conn_len; j++) {
3019 wcaps = get_wcaps(codec, conn[j]);
3020 wtype = get_wcaps_type(wcaps);
3025 if (!check_all_dac_nids(spec, conn[j])) {
3037 fallback_dac = spec->
multiout.dac_nids[0];
3039 for (j = 0; j < cfg->
hp_outs; j++)
3041 fallback_dac = spec->
multiout.hp_nid;
3047 for (j = 0; j < conn_len; j++) {
3048 if (conn[j] == fallback_dac) {
3068 static int stac92xx_auto_fill_dac_nids(
struct hda_codec *codec)
3077 dac = get_unassigned_dac(codec, nid);
3088 "%s: No available DAC for pin 0x%x\n",
3092 add_spec_dacs(spec, dac);
3095 for (i = 0; i < cfg->
hp_outs; i++) {
3097 dac = get_unassigned_dac(codec, nid);
3102 add_spec_extra_dacs(spec, dac);
3109 dac = get_unassigned_dac(codec, nid);
3111 add_spec_extra_dacs(spec, dac);
3116 nid = check_line_out_switch(codec);
3118 dac = get_unassigned_dac(codec, nid);
3120 snd_printdd(
"STAC: Add line-in 0x%x as output %d\n",
3125 add_spec_dacs(spec, dac);
3129 nid = check_mic_out_switch(codec, &dac);
3131 snd_printdd(
"STAC: Add mic-in 0x%x as output %d\n",
3136 add_spec_dacs(spec, dac);
3139 snd_printd(
"stac92xx: dac_nids=%d (0x%x/0x%x/0x%x/0x%x/0x%x)\n",
3151 static int create_controls_idx(
struct hda_codec *codec,
const char *pfx,
3159 unsigned int caps,
step, nums, db_scale;
3163 step = (step + 1) * 25;
3166 db_scale = nums *
step;
3170 if (db_scale > 6400 && nums >= 0x1f)
3175 sprintf(name,
"%s Playback Volume", pfx);
3181 sprintf(name,
"%s Playback Switch", pfx);
3189 #define create_controls(codec, pfx, nid, chs) \
3190 create_controls_idx(codec, pfx, 0, nid, chs)
3209 if (!spec->
multiout.extra_out_nid[i]) {
3221 static int create_multi_out_ctls(
struct hda_codec *codec,
int num_outs,
3227 static const char *
const chname[4] = {
3228 "Front",
"Surround",
NULL ,
"Side"
3232 unsigned int wid_caps;
3234 for (i = 0; i < num_outs && i <
ARRAY_SIZE(chname); i++) {
3251 wid_caps = get_wcaps(codec, nid);
3254 err = stac92xx_add_control(spec,
3256 "Swap Center/LFE Playback Switch", nid);
3271 if (num_outs <= 1) {
3282 err = create_controls_idx(codec, name, idx, nid, 3);
3290 static void stac_gpio_set(
struct hda_codec *codec,
unsigned int mask,
3291 unsigned int dir_mask,
unsigned int data);
3294 static int stac92xx_capture_sw_put_led(
struct snd_kcontrol *kcontrol,
3305 mute = !(ucontrol->
value.integer.value[0] &&
3306 ucontrol->
value.integer.value[1]);
3319 static int stac92xx_add_capvol_ctls(
struct hda_codec *codec,
unsigned long vol,
3320 unsigned long sw,
int idx)
3327 "Capture Volume", vol);
3331 knew = add_control_temp(spec,
3333 idx,
"Capture Switch", sw);
3338 knew->
put = stac92xx_capture_sw_put_led;
3344 static int stac92xx_auto_create_multi_out_ctls(
struct hda_codec *codec,
3359 err = stac92xx_add_control(spec,
3361 "Headphone as Line Out Switch",
3367 for (idx = 0; idx < cfg->
num_inputs; idx++) {
3371 err = stac92xx_add_jack_mode_control(codec, nid, idx);
3380 static int stac92xx_auto_create_hp_ctls(
struct hda_codec *codec,
3400 static const char *
const stac92xx_mono_labels[4] = {
3401 "DAC0",
"DAC1",
"Mixer",
"DAC2"
3405 static int stac92xx_auto_create_mono_output_ctls(
struct hda_codec *codec)
3416 if (num_cons <= 0 || num_cons >
ARRAY_SIZE(stac92xx_mono_labels))
3419 for (i = 0; i < num_cons; i++)
3428 static int stac92xx_auto_create_beep_ctls(
struct hda_codec *codec,
3440 err = stac92xx_add_control(spec, type,
3441 "Beep Playback Switch",
3450 "Beep Playback Volume",
3458 #ifdef CONFIG_SND_HDA_INPUT_BEEP
3459 #define stac92xx_dig_beep_switch_info snd_ctl_boolean_mono_info
3461 static int stac92xx_dig_beep_switch_get(
struct snd_kcontrol *kcontrol,
3465 ucontrol->
value.integer.value[0] = codec->
beep->enabled;
3469 static int stac92xx_dig_beep_switch_put(
struct snd_kcontrol *kcontrol,
3478 .info = stac92xx_dig_beep_switch_info,
3479 .get = stac92xx_dig_beep_switch_get,
3480 .put = stac92xx_dig_beep_switch_put,
3483 static int stac92xx_beep_switch_ctl(
struct hda_codec *codec)
3485 return stac92xx_add_control_temp(codec->
spec, &stac92xx_dig_beep_ctrl,
3486 0,
"Beep Playback Switch", 0);
3490 static int stac92xx_auto_create_mux_input_ctls(
struct hda_codec *codec)
3501 wcaps = get_wcaps(codec, nid);
3502 if (!(wcaps & AC_WCAP_OUT_AMP))
3509 for (j = 0; j < spec->
num_caps; j++) {
3517 "Mux Capture Volume", val);
3524 static const char *
const stac92xx_spdif_labels[3] = {
3525 "Digital Playback",
"Analog Mux 1",
"Analog Mux 2",
3528 static int stac92xx_auto_create_spdif_mux_ctls(
struct hda_codec *codec)
3544 labels = stac92xx_spdif_labels;
3546 for (i = 0; i < num_cons; i++)
3553 static const char *
const stac92xx_dmic_labels[5] = {
3554 "Analog Inputs",
"Digital Mic 1",
"Digital Mic 2",
3555 "Digital Mic 3",
"Digital Mic 4"
3564 if (idx >= 0 && idx < nums)
3570 #define get_connection_index(codec, mux, nid) \
3571 snd_hda_get_conn_index(codec, mux, nid, 1)
3578 unsigned int caps, nums;
3586 if (!(get_wcaps(codec, nid) & caps))
3592 snprintf(name,
sizeof(name),
"%s Capture Volume", label);
3601 static int stac92xx_auto_create_dmic_input_ctls(
struct hda_codec *codec,
3608 unsigned int def_conf;
3614 int index, type_idx;
3618 if (get_wcaps_type(get_wcaps(codec, nid)) !=
AC_WID_PIN)
3629 label,
sizeof(label),
NULL);
3631 if (snd_hda_get_bool_hint(codec,
"separate_dmux") != 1)
3634 err = create_elem_capture_vol(codec, nid, label, type_idx,
3639 err = create_elem_capture_vol(codec, nid, label,
3644 nid = get_connected_node(codec,
3647 err = create_elem_capture_vol(codec,
3697 static int set_mic_route(
struct hda_codec *codec,
3709 if (pin == cfg->
inputs[i].pin)
3739 static int stac_check_auto_mic(
struct hda_codec *codec)
3746 fixed = ext = dock = 0;
3748 if (check_mic_pin(codec, cfg->
inputs[i].pin,
3749 &fixed, &ext, &dock))
3752 if (check_mic_pin(codec, spec->
dmic_nids[i],
3753 &fixed, &ext, &dock))
3755 if (!fixed || (!ext && !dock))
3759 if (set_mic_route(codec, &spec->
ext_mic, ext) ||
3760 set_mic_route(codec, &spec->
int_mic, fixed) ||
3761 set_mic_route(codec, &spec->
dock_mic, dock))
3767 static int stac92xx_auto_create_analog_input_ctls(
struct hda_codec *codec,
const struct auto_pin_cfg *cfg)
3791 err = create_elem_capture_vol(codec, nid,
3808 imux->
items[0].index);
3815 static void stac92xx_auto_init_multi_out(
struct hda_codec *codec)
3820 for (i = 0; i < spec->
autocfg.line_outs; i++) {
3826 static void stac92xx_auto_init_hp_out(
struct hda_codec *codec)
3831 for (i = 0; i < spec->
autocfg.hp_outs; i++) {
3837 for (i = 0; i < spec->
autocfg.speaker_outs; i++) {
3839 pin = spec->
autocfg.speaker_pins[
i];
3845 static int is_dual_headphones(
struct hda_codec *codec)
3854 for (i = 0; i < spec->
autocfg.hp_outs; i++) {
3861 return (valid_hps > 1);
3865 static int stac92xx_parse_auto_config(
struct hda_codec *codec)
3876 if (! spec->
autocfg.line_outs)
3882 if (is_dual_headphones(codec)) {
3887 snd_printdd(
"stac92xx: Enabling multi-HPs workaround\n");
3889 sizeof(spec->
autocfg.line_out_pins));
3892 sizeof(spec->
autocfg.hp_pins));
3898 if (spec->
autocfg.mono_out_pin) {
3899 int dir = get_wcaps(codec, spec->
autocfg.mono_out_pin) &
3902 spec->
autocfg.mono_out_pin, dir);
3907 spec->
autocfg.mono_out_pin, conn_list, 1) &&
3909 conn_list, 1) > 0) {
3911 int wcaps = get_wcaps(codec, conn_list[0]);
3912 int wid_type = get_wcaps_type(wcaps);
3918 !(wcaps & AC_WCAP_LR_SWAP))
3927 "Mono Playback Switch",
3932 if ((caps & AC_AMPCAP_NUM_STEPS)
3934 err = stac92xx_add_control(spec,
3936 "Mono Playback Volume",
3943 stac92xx_auto_set_pinctl(codec, spec->
autocfg.mono_out_pin,
3948 err = stac92xx_auto_fill_dac_nids(codec);
3951 err = stac92xx_auto_create_multi_out_ctls(codec,
3959 err = stac92xx_auto_create_beep_ctls(codec,
3966 #ifdef CONFIG_SND_HDA_INPUT_BEEP
3971 err = stac92xx_auto_create_beep_ctls(codec, nid);
3982 if (!(caps & AC_AMPCAP_MUTE)) {
3983 err = stac92xx_beep_switch_ctl(codec);
3991 err = stac92xx_auto_create_hp_ctls(codec, &spec->
autocfg);
3998 sizeof(spec->
autocfg.hp_pins));
4004 if (stac_check_auto_mic(codec)) {
4012 for (i = 0; i < spec->
num_caps; i++) {
4013 err = stac92xx_add_capvol_ctls(codec, spec->
capvols[i],
4019 err = stac92xx_auto_create_analog_input_ctls(codec, &spec->
autocfg);
4024 err = stac92xx_auto_create_mono_output_ctls(codec);
4029 if ((err = stac92xx_auto_create_dmic_input_ctls(codec,
4033 err = stac92xx_auto_create_mux_input_ctls(codec);
4038 err = stac92xx_auto_create_spdif_mux_ctls(codec);
4043 err = stac92xx_add_input_source(spec);
4048 if (spec->
multiout.max_channels > 2)
4053 unsigned int wid_caps = get_wcaps(codec, i);
4054 if (wid_caps & AC_WCAP_DIGITAL) {
4055 switch (get_wcaps_type(wid_caps)) {
4068 spec->
multiout.dig_out_nid = dig_out;
4069 if (dig_in && spec->
autocfg.dig_in_pin)
4072 if (spec->
kctls.list)
4084 static int stac9200_auto_create_hp_ctls(
struct hda_codec *codec,
4100 static int stac9200_auto_create_lfe_ctls(
struct hda_codec *codec,
4113 for (i = 0; i < spec->
autocfg.speaker_outs && lfe_pin == 0x0; i++) {
4115 unsigned int wcaps = get_wcaps(codec, pin);
4117 if (wcaps == AC_WCAP_OUT_AMP)
4123 if (lfe_pin == 0 && spec->
autocfg.speaker_outs == 0) {
4124 for (i = 0; i < spec->
autocfg.line_outs && lfe_pin == 0x0; i++) {
4126 unsigned int defcfg;
4129 unsigned int wcaps = get_wcaps(codec, pin);
4131 if (wcaps == AC_WCAP_OUT_AMP)
4148 static int stac9200_parse_auto_config(
struct hda_codec *codec)
4156 if ((err = stac92xx_auto_create_analog_input_ctls(codec, &spec->
autocfg)) < 0)
4159 if ((err = stac9200_auto_create_hp_ctls(codec, &spec->
autocfg)) < 0)
4162 if ((err = stac9200_auto_create_lfe_ctls(codec, &spec->
autocfg)) < 0)
4166 err = stac92xx_auto_create_mux_input_ctls(codec);
4171 err = stac92xx_add_input_source(spec);
4180 if (spec->
kctls.list)
4194 static void stac_gpio_set(
struct hda_codec *codec,
unsigned int mask,
4195 unsigned int dir_mask,
unsigned int data)
4197 unsigned int gpiostate, gpiomask, gpiodir;
4199 snd_printdd(
"%s msk %x dir %x gpio %x\n", __func__, mask, dir_mask, data);
4203 gpiostate = (gpiostate & ~dir_mask) | (data & dir_mask);
4211 gpiodir |= dir_mask;
4228 unsigned char type,
int data)
4235 event->action =
type;
4236 event->private_data =
data;
4241 static void handle_unsol_event(
struct hda_codec *codec,
4260 event->action =
type;
4261 event->callback = handle_unsol_event;
4269 for (i = 0; i < cfg->
hp_outs; i++)
4278 static void stac92xx_power_down(
struct hda_codec *codec)
4284 for (dac = spec->
dac_list; *dac; dac++)
4285 if (!check_all_dac_nids(spec, *dac))
4293 static inline int get_int_hint(
struct hda_codec *codec,
const char *
key,
4297 p = snd_hda_get_hint(codec, key);
4309 static void stac_store_hints(
struct hda_codec *codec)
4314 val = snd_hda_get_bool_hint(codec,
"hp_detect");
4317 if (get_int_hint(codec,
"gpio_mask", &spec->
gpio_mask)) {
4321 if (get_int_hint(codec,
"gpio_dir", &spec->
gpio_dir))
4323 if (get_int_hint(codec,
"gpio_data", &spec->
gpio_data))
4325 if (get_int_hint(codec,
"eapd_mask", &spec->
eapd_mask))
4327 if (get_int_hint(codec,
"gpio_mute", &spec->
gpio_mute))
4329 val = snd_hda_get_bool_hint(codec,
"eapd_switch");
4338 stac_issue_unsol_event(codec, *pins++);
4342 static void stac_fake_hp_events(
struct hda_codec *codec)
4347 stac_issue_unsol_events(codec, spec->
autocfg.hp_outs,
4349 if (spec->
autocfg.line_outs &&
4351 stac_issue_unsol_events(codec, spec->
autocfg.line_outs,
4355 static int stac92xx_init(
struct hda_codec *codec)
4367 for (i = 0; i < spec->
num_adcs; i++)
4373 stac_store_hints(codec);
4387 for (i = 0; i < cfg->
hp_outs; i++) {
4403 stac92xx_auto_set_pinctl(codec, spec->
autocfg.line_out_pins[0],
4406 stac_fake_hp_events(codec);
4408 stac92xx_auto_init_multi_out(codec);
4409 stac92xx_auto_init_hp_out(codec);
4410 for (i = 0; i < cfg->
hp_outs; i++)
4411 stac_toggle_power_map(codec, cfg->
hp_pins[i], 1);
4419 stac_issue_unsol_event(codec, spec->
ext_mic.pin);
4420 if (enable_pin_detect(codec, spec->
dock_mic.pin,
4422 stac_issue_unsol_event(codec, spec->
dock_mic.pin);
4426 int type = cfg->
inputs[
i].type;
4427 unsigned int pinctl, conf;
4432 stac92xx_auto_set_pinctl(codec, nid, pinctl);
4442 pinctl &= ~AC_PINCTL_OUT_EN;
4444 stac92xx_auto_set_pinctl(codec, nid, pinctl);
4450 stac_issue_unsol_event(codec, nid);
4454 stac92xx_auto_set_pinctl(codec, spec->
dmic_nids[i],
4460 stac92xx_auto_set_pinctl(codec, cfg->
dig_in_pin,
4462 for (i = 0; i < spec->
num_pwrs; i++) {
4464 unsigned int pinctl, def_conf;
4470 stac_toggle_power_map(codec, nid, 0);
4475 stac_toggle_power_map(codec, nid, 1);
4483 stac_toggle_power_map(codec, nid, 1);
4487 if (is_nid_out_jack_pin(cfg, nid))
4496 if (pinctl & AC_PINCTL_IN_EN) {
4497 stac_toggle_power_map(codec, nid, 1);
4501 stac_issue_unsol_event(codec, nid);
4505 stac_toggle_power_map(codec, nid, 0);
4513 stac92xx_update_led_status(codec,
false);
4522 stac92xx_power_down(codec);
4526 static void stac92xx_free_kctls(
struct hda_codec *codec)
4530 if (spec->
kctls.list) {
4533 for (i = 0; i < spec->
kctls.used; i++)
4534 kfree(kctl[i].name);
4539 static void stac92xx_shutup_pins(
struct hda_codec *codec)
4541 unsigned int i, def_conf;
4543 if (codec->
bus->shutdown)
4545 for (i = 0; i < codec->
init_pins.used; i++) {
4549 snd_hda_set_pin_ctl(codec, pin->
nid, 0);
4553 static void stac92xx_shutup(
struct hda_codec *codec)
4557 stac92xx_shutup_pins(codec);
4565 static void stac92xx_free(
struct hda_codec *codec)
4572 stac92xx_shutup(codec);
4581 unsigned int old_ctl, pin_ctl;
4586 if (pin_ctl & AC_PINCTL_IN_EN) {
4604 if (old_ctl != pin_ctl)
4605 snd_hda_set_pin_ctl_cache(codec, nid, pin_ctl);
4614 snd_hda_set_pin_ctl_cache(codec, nid, pin_ctl & ~flag);
4624 static void stac92xx_line_out_detect(
struct hda_codec *codec,
4639 unsigned int pinctl;
4643 if (pinctl & AC_PINCTL_IN_EN)
4687 static void stac92xx_hp_detect(
struct hda_codec *codec)
4698 for (i = 0; i < cfg->
hp_outs; i++) {
4701 if (no_hp_sensing(spec, i))
4703 presence = get_pin_presence(codec, cfg->
hp_pins[i]);
4705 unsigned int pinctl;
4708 if (pinctl & AC_PINCTL_IN_EN)
4716 stac92xx_reset_pinctl(codec, spec->
hp_switch,
4724 stac92xx_set_pinctl(codec, spec->
hp_switch,
4730 stac92xx_line_out_detect(codec, presence);
4732 for (i = 0; i < cfg->
hp_outs; i++) {
4734 if (no_hp_sensing(spec, i))
4737 stac92xx_set_pinctl(codec, cfg->
hp_pins[i], val);
4749 stac92xx_reset_pinctl(codec, cfg->
hp_pins[i], val);
4760 for (idx = 0; idx < spec->
num_pwrs; idx++) {
4785 stac_toggle_power_map(codec, nid, get_pin_presence(codec, nid));
4789 static unsigned int stac_get_defcfg_connect(
struct hda_codec *codec,
int idx)
4798 static int stac92xx_connected_ports(
struct hda_codec *codec,
4803 unsigned int def_conf;
4805 for (num = 0; num < num_nids; num++) {
4806 for (idx = 0; idx < spec->
num_pins; idx++)
4807 if (spec->
pin_nids[idx] == nids[num])
4811 def_conf = stac_get_defcfg_connect(codec, idx);
4818 static void stac92xx_mic_detect(
struct hda_codec *codec)
4823 if (get_pin_presence(codec, spec->
ext_mic.pin))
4825 else if (get_pin_presence(codec, spec->
dock_mic.pin))
4839 static void handle_unsol_event(
struct hda_codec *codec,
4848 stac92xx_hp_detect(codec);
4851 stac92xx_mic_detect(codec);
4862 stac92xx_pin_sense(codec, event->
nid);
4866 if (event->
nid == 0
xb) {
4869 if (get_pin_presence(codec, 0xa)
4870 && get_pin_presence(codec, 0
xb))
4872 if (!get_pin_presence(codec, 0
xb))
4878 stac92xx_auto_set_pinctl(codec, 0x0a, pin);
4897 handle_unsol_event(codec, event);
4900 static int hp_blike_system(
u32 subsystem_id);
4902 static void set_hp_led_gpio(
struct hda_codec *codec)
4938 static int find_mute_led_cfg(
struct hda_codec *codec,
int default_polarity)
4943 if (get_int_hint(codec,
"gpio_led", &spec->
gpio_led)) {
4944 get_int_hint(codec,
"gpio_led_polarity",
4954 unsigned int max_gpio;
4966 set_hp_led_gpio(codec);
4971 set_hp_led_gpio(codec);
4990 (default_polarity == 0 || default_polarity == 1)) {
4991 set_hp_led_gpio(codec);
4999 static int hp_blike_system(
u32 subsystem_id)
5001 switch (subsystem_id) {
5028 #ifdef CONFIG_PROC_FS
5032 if (nid == codec->
afg)
5033 snd_iprintf(buffer,
"Power-Map: 0x%02x\n",
5042 snd_iprintf(buffer,
"Analog Loopback: 0x%02x\n",
5051 if (nid == codec->
afg)
5052 analog_loop_proc_hook(buffer, codec, 0xfa0);
5058 if (nid == codec->
afg)
5059 analog_loop_proc_hook(buffer, codec, 0xfe0);
5065 if (nid == codec->
afg)
5066 analog_loop_proc_hook(buffer, codec, 0xfeb);
5069 #define stac92hd_proc_hook NULL
5070 #define stac92hd7x_proc_hook NULL
5071 #define stac9205_proc_hook NULL
5072 #define stac927x_proc_hook NULL
5078 stac92xx_init(codec);
5079 snd_hda_codec_resume_amp(codec);
5080 snd_hda_codec_resume_cache(codec);
5082 stac_fake_hp_events(codec);
5088 stac92xx_shutup(codec);
5095 unsigned int afg_power_state = power_state;
5113 #define stac92xx_suspend NULL
5114 #define stac92xx_resume NULL
5115 #define stac92xx_set_power_state NULL
5119 static void stac92xx_update_led_status(
struct hda_codec *codec,
int enabled)
5146 .build_controls = stac92xx_build_controls,
5147 .build_pcms = stac92xx_build_pcms,
5148 .init = stac92xx_init,
5149 .free = stac92xx_free,
5155 .reboot_notify = stac92xx_shutup,
5158 static int patch_stac9200(
struct hda_codec *codec)
5171 spec->
pin_nids = stac9200_pin_nids;
5179 stac92xx_set_config_regs(codec,
5184 spec->
multiout.dac_nids = stac9200_dac_nids;
5185 spec->
adc_nids = stac9200_adc_nids;
5186 spec->
mux_nids = stac9200_mux_nids;
5195 spec->
init = stac9200_eapd_init;
5197 spec->
init = stac9200_core_init;
5198 spec->
mixer = stac9200_mixer;
5205 err = stac9200_parse_auto_config(codec);
5207 stac92xx_free(codec);
5222 static int patch_stac925x(
struct hda_codec *codec)
5235 spec->
pin_nids = stac925x_pin_nids;
5241 stac925x_codec_id_cfg_tbl);
5254 stac92xx_set_config_regs(codec,
5259 spec->
multiout.dac_nids = stac925x_dac_nids;
5260 spec->
adc_nids = stac925x_adc_nids;
5261 spec->
mux_nids = stac925x_mux_nids;
5280 spec->
init = stac925x_core_init;
5281 spec->
mixer = stac925x_mixer;
5283 spec->
capvols = stac925x_capvols;
5284 spec->
capsws = stac925x_capsws;
5286 err = stac92xx_parse_auto_config(codec);
5290 "available, default to model=ref\n");
5297 stac92xx_free(codec);
5306 static int patch_stac92hd73xx(
struct hda_codec *codec)
5322 spec->
pin_nids = stac92hd73xx_pin_nids;
5325 stac92hd73xx_models,
5326 stac92hd73xx_cfg_tbl);
5332 stac92hd73xx_codec_id_cfg_tbl);
5338 stac92xx_set_config_regs(codec,
5344 if (num_dacs < 3 || num_dacs > 5) {
5346 "number of channels defaulting to DAC count\n");
5349 spec->
init = stac92hd73xx_core_init;
5367 spec->
mux_nids = stac92hd73xx_mux_nids;
5368 spec->
adc_nids = stac92hd73xx_adc_nids;
5369 spec->
dmic_nids = stac92hd73xx_dmic_nids;
5370 spec->
dmux_nids = stac92hd73xx_dmux_nids;
5371 spec->
smux_nids = stac92hd73xx_smux_nids;
5378 spec->
capvols = stac92hd73xx_capvols;
5383 spec->
init = dell_eq_core_init;
5425 spec->
pwr_nids = stac92hd73xx_pwr_nids;
5427 err = stac92xx_parse_auto_config(codec);
5432 "available, default to model=ref\n");
5440 stac92xx_free(codec);
5454 static int hp_bnb2011_with_dock(
struct hda_codec *codec)
5505 for (i = 0; i <
ARRAY_SIZE(stac92hd83xxx_dmic_nids); i++) {
5506 if (nid == stac92hd83xxx_dmic_nids[i]) {
5551 static void stac92hd8x_fill_auto_spec(
struct hda_codec *codec)
5554 unsigned int wid_caps, wid_type;
5559 for (nid = codec->
start_nid; nid < end_nid; nid++) {
5560 wid_caps = get_wcaps(codec, nid);
5561 wid_type = get_wcaps_type(wid_caps);
5564 stac92hd8x_add_pin(codec, nid);
5566 if (wid_type ==
AC_WID_AUD_IN && !(wid_caps & AC_WCAP_DIGITAL))
5567 stac92hd8x_add_adc(codec, nid);
5570 for (nid = codec->
start_nid; nid < end_nid; nid++) {
5571 wid_caps = get_wcaps(codec, nid);
5572 wid_type = get_wcaps_type(wid_caps);
5575 stac92hd8x_add_mux(codec, nid);
5593 static int patch_stac92hd83xxx(
struct hda_codec *codec)
5596 int default_polarity = -1;
5603 if (hp_bnb2011_with_dock(codec)) {
5612 stac92hd8x_fill_auto_spec(codec);
5617 spec->
pwr_nids = stac92hd83xxx_pwr_nids;
5620 spec->
init = stac92hd83xxx_core_init;
5624 stac92hd83xxx_models,
5625 stac92hd83xxx_cfg_tbl);
5631 stac92hd83xxx_codec_id_cfg_tbl);
5637 stac92xx_set_config_regs(codec,
5644 spec->
init = stac92hd83xxx_hp_zephyr_init;
5647 default_polarity = 0;
5650 default_polarity = 1;
5660 if (find_mute_led_cfg(codec, default_polarity))
5683 err = stac92xx_parse_auto_config(codec);
5687 "available, default to model=ref\n");
5695 stac92xx_free(codec);
5704 static int stac92hd71bxx_connected_smuxes(
struct hda_codec *codec,
5710 for (idx = 0; idx < spec->
num_pins; idx++)
5711 if (spec->
pin_nids[idx] == dig0pin)
5730 #define stac_hp_bass_gpio_info snd_ctl_boolean_mono_info
5731 static int stac_hp_bass_gpio_get(
struct snd_kcontrol *kcontrol,
5740 static int stac_hp_bass_gpio_put(
struct snd_kcontrol *kcontrol,
5748 (ucontrol->
value.integer.value[0] ? 0x20 : 0);
5759 .get = stac_hp_bass_gpio_get,
5760 .put = stac_hp_bass_gpio_put,
5763 static int stac_add_hp_bass_switch(
struct hda_codec *codec)
5767 if (!stac_control_new(spec, &stac_hp_bass_sw_ctrl,
5768 "Bass Speaker Playback Switch", 0))
5777 static int patch_stac92hd71bxx(
struct hda_codec *codec)
5780 const struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init;
5781 unsigned int pin_cfg;
5796 spec->
pin_nids = stac92hd71bxx_pin_nids_4port;
5804 spec->
pin_nids = stac92hd71bxx_pin_nids_6port;
5809 stac92hd71bxx_models,
5810 stac92hd71bxx_cfg_tbl);
5816 stac92xx_set_config_regs(codec,
5826 spec->
dmic_nids = stac92hd71bxx_dmic_nids;
5827 spec->
dmux_nids = stac92hd71bxx_dmux_nids;
5830 spec->
capvols = stac92hd71bxx_capvols;
5841 spec->
num_dmics = stac92xx_connected_ports(codec,
5842 stac92hd71bxx_dmic_nids,
5849 err = stac_add_event(codec, codec->
afg,
5867 spec->
dmic_nids = stac92hd71bxx_dmic_5port_nids;
5868 spec->
num_dmics = stac92xx_connected_ports(codec,
5869 stac92hd71bxx_dmic_5port_nids,
5879 spec->
num_dmics = stac92xx_connected_ports(codec,
5880 stac92hd71bxx_dmic_nids,
5886 spec->
init = stac92hd71bxx_core_init;
5897 spec->
mux_nids = stac92hd71bxx_mux_nids;
5898 spec->
adc_nids = stac92hd71bxx_adc_nids;
5899 spec->
smux_nids = stac92hd71bxx_smux_nids;
5900 spec->
pwr_nids = stac92hd71bxx_pwr_nids;
5905 spec->
num_smuxes = stac92hd71bxx_connected_smuxes(codec, 0x1e);
5913 stac92xx_auto_set_pinctl(codec, 0x0e,
5973 if (find_mute_led_cfg(codec, 1))
5991 err = stac92xx_parse_auto_config(codec);
5995 "available, default to model=ref\n");
6003 stac92xx_free(codec);
6014 stac_add_hp_bass_switch(codec);
6022 static int patch_stac922x(
struct hda_codec *codec)
6035 spec->
pin_nids = stac922x_pin_nids;
6082 stac92xx_set_config_regs(codec,
6085 spec->
adc_nids = stac922x_adc_nids;
6086 spec->
mux_nids = stac922x_mux_nids;
6092 spec->
init = stac922x_core_init;
6095 spec->
capvols = stac922x_capvols;
6100 err = stac92xx_parse_auto_config(codec);
6104 "available, default to model=ref\n");
6111 stac92xx_free(codec);
6127 static int patch_stac927x(
struct hda_codec *codec)
6141 spec->
pin_nids = stac927x_pin_nids;
6150 stac92xx_set_config_regs(codec,
6154 spec->
adc_nids = stac927x_adc_nids;
6156 spec->
mux_nids = stac927x_mux_nids;
6161 spec->
dac_list = stac927x_dac_nids;
6175 spec->
init = d965_core_init;
6201 spec->
init = dell_3st_core_init;
6207 spec->
init = stac927x_volknob_core_init;
6211 spec->
init = stac927x_core_init;
6216 spec->
capvols = stac927x_capvols;
6217 spec->
capsws = stac927x_capsws;
6225 err = stac92xx_parse_auto_config(codec);
6229 "available, default to model=ref\n");
6236 stac92xx_free(codec);
6254 codec->
bus->needs_damn_long_delay = 1;
6263 static int patch_stac9205(
struct hda_codec *codec)
6276 spec->
pin_nids = stac9205_pin_nids;
6285 stac92xx_set_config_regs(codec,
6289 spec->
adc_nids = stac9205_adc_nids;
6291 spec->
mux_nids = stac9205_mux_nids;
6301 spec->
init = stac9205_core_init;
6305 spec->
capvols = stac9205_capvols;
6306 spec->
capsws = stac9205_capsws;
6348 err = stac92xx_parse_auto_config(codec);
6352 "available, default to model=ref\n");
6359 stac92xx_free(codec);
6374 static const struct hda_verb stac9872_core_init[] = {
6380 static const hda_nid_t stac9872_pin_nids[] = {
6381 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
6385 static const hda_nid_t stac9872_adc_nids[] = {
6389 static const hda_nid_t stac9872_mux_nids[] = {
6393 static const unsigned long stac9872_capvols[] = {
6396 #define stac9872_capsws stac9872_capvols
6398 static const unsigned int stac9872_vaio_pin_configs[9] = {
6399 0x03211020, 0x411111f0, 0x411111f0, 0x03a15030,
6400 0x411111f0, 0x90170110, 0x411111f0, 0x411111f0,
6413 static const struct snd_pci_quirk stac9872_cfg_tbl[] = {
6414 SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
6419 static int patch_stac9872(
struct hda_codec *codec)
6431 spec->
pin_nids = stac9872_pin_nids;
6440 stac92xx_set_config_regs(codec,
6445 spec->
adc_nids = stac9872_adc_nids;
6447 spec->
mux_nids = stac9872_mux_nids;
6448 spec->
init = stac9872_core_init;
6450 spec->
capvols = stac9872_capvols;
6453 err = stac92xx_parse_auto_config(codec);
6455 stac92xx_free(codec);
6468 { .id = 0x83847690, .name =
"STAC9200", .patch = patch_stac9200 },
6469 { .id = 0x83847882, .name =
"STAC9220 A1", .patch = patch_stac922x },
6470 { .id = 0x83847680, .name =
"STAC9221 A1", .patch = patch_stac922x },
6471 { .id = 0x83847880, .name =
"STAC9220 A2", .patch = patch_stac922x },
6472 { .id = 0x83847681, .name =
"STAC9220D/9223D A2", .patch = patch_stac922x },
6473 { .id = 0x83847682, .name =
"STAC9221 A2", .patch = patch_stac922x },
6474 { .id = 0x83847683, .name =
"STAC9221D A2", .patch = patch_stac922x },
6475 { .id = 0x83847618, .name =
"STAC9227", .patch = patch_stac927x },
6476 { .id = 0x83847619, .name =
"STAC9227", .patch = patch_stac927x },
6477 { .id = 0x83847616, .name =
"STAC9228", .patch = patch_stac927x },
6478 { .id = 0x83847617, .name =
"STAC9228", .patch = patch_stac927x },
6479 { .id = 0x83847614, .name =
"STAC9229", .patch = patch_stac927x },
6480 { .id = 0x83847615, .name =
"STAC9229", .patch = patch_stac927x },
6481 { .id = 0x83847620, .name =
"STAC9274", .patch = patch_stac927x },
6482 { .id = 0x83847621, .name =
"STAC9274D", .patch = patch_stac927x },
6483 { .id = 0x83847622, .name =
"STAC9273X", .patch = patch_stac927x },
6484 { .id = 0x83847623, .name =
"STAC9273D", .patch = patch_stac927x },
6485 { .id = 0x83847624, .name =
"STAC9272X", .patch = patch_stac927x },
6486 { .id = 0x83847625, .name =
"STAC9272D", .patch = patch_stac927x },
6487 { .id = 0x83847626, .name =
"STAC9271X", .patch = patch_stac927x },
6488 { .id = 0x83847627, .name =
"STAC9271D", .patch = patch_stac927x },
6489 { .id = 0x83847628, .name =
"STAC9274X5NH", .patch = patch_stac927x },
6490 { .id = 0x83847629, .name =
"STAC9274D5NH", .patch = patch_stac927x },
6491 { .id = 0x83847632, .name =
"STAC9202", .patch = patch_stac925x },
6492 { .id = 0x83847633, .name =
"STAC9202D", .patch = patch_stac925x },
6493 { .id = 0x83847634, .name =
"STAC9250", .patch = patch_stac925x },
6494 { .id = 0x83847635, .name =
"STAC9250D", .patch = patch_stac925x },
6495 { .id = 0x83847636, .name =
"STAC9251", .patch = patch_stac925x },
6496 { .id = 0x83847637, .name =
"STAC9250D", .patch = patch_stac925x },
6497 { .id = 0x83847645, .name =
"92HD206X", .patch = patch_stac927x },
6498 { .id = 0x83847646, .name =
"92HD206D", .patch = patch_stac927x },
6503 { .id = 0x83847661, .name =
"CXD9872RD/K", .patch = patch_stac9872 },
6504 { .id = 0x83847662, .name =
"STAC9872AK", .patch = patch_stac9872 },
6505 { .id = 0x83847664, .name =
"CXD9872AKD", .patch = patch_stac9872 },
6506 { .id = 0x83847698, .name =
"STAC9205", .patch = patch_stac9205 },
6507 { .id = 0x838476a0, .name =
"STAC9205", .patch = patch_stac9205 },
6508 { .id = 0x838476a1, .name =
"STAC9205D", .patch = patch_stac9205 },
6509 { .id = 0x838476a2, .name =
"STAC9204", .patch = patch_stac9205 },
6510 { .id = 0x838476a3, .name =
"STAC9204D", .patch = patch_stac9205 },
6511 { .id = 0x838476a4, .name =
"STAC9255", .patch = patch_stac9205 },
6512 { .id = 0x838476a5, .name =
"STAC9255D", .patch = patch_stac9205 },
6513 { .id = 0x838476a6, .name =
"STAC9254", .patch = patch_stac9205 },
6514 { .id = 0x838476a7, .name =
"STAC9254D", .patch = patch_stac9205 },
6515 { .id = 0x111d7603, .name =
"92HD75B3X5", .patch = patch_stac92hd71bxx},
6516 { .id = 0x111d7604, .name =
"92HD83C1X5", .patch = patch_stac92hd83xxx},
6517 { .id = 0x111d76d4, .name =
"92HD83C1C5", .patch = patch_stac92hd83xxx},
6518 { .id = 0x111d7605, .name =
"92HD81B1X5", .patch = patch_stac92hd83xxx},
6519 { .id = 0x111d76d5, .name =
"92HD81B1C5", .patch = patch_stac92hd83xxx},
6520 { .id = 0x111d76d1, .name =
"92HD87B1/3", .patch = patch_stac92hd83xxx},
6521 { .id = 0x111d76d9, .name =
"92HD87B2/4", .patch = patch_stac92hd83xxx},
6522 { .id = 0x111d7666, .name =
"92HD88B3", .patch = patch_stac92hd83xxx},
6523 { .id = 0x111d7667, .name =
"92HD88B1", .patch = patch_stac92hd83xxx},
6524 { .id = 0x111d7668, .name =
"92HD88B2", .patch = patch_stac92hd83xxx},
6525 { .id = 0x111d7669, .name =
"92HD88B4", .patch = patch_stac92hd83xxx},
6526 { .id = 0x111d7608, .name =
"92HD75B2X5", .patch = patch_stac92hd71bxx},
6527 { .id = 0x111d7674, .name =
"92HD73D1X5", .patch = patch_stac92hd73xx },
6528 { .id = 0x111d7675, .name =
"92HD73C1X5", .patch = patch_stac92hd73xx },
6529 { .id = 0x111d7676, .name =
"92HD73E1X5", .patch = patch_stac92hd73xx },
6530 { .id = 0x111d76b0, .name =
"92HD71B8X", .patch = patch_stac92hd71bxx },
6531 { .id = 0x111d76b1, .name =
"92HD71B8X", .patch = patch_stac92hd71bxx },
6532 { .id = 0x111d76b2, .name =
"92HD71B7X", .patch = patch_stac92hd71bxx },
6533 { .id = 0x111d76b3, .name =
"92HD71B7X", .patch = patch_stac92hd71bxx },
6534 { .id = 0x111d76b4, .name =
"92HD71B6X", .patch = patch_stac92hd71bxx },
6535 { .id = 0x111d76b5, .name =
"92HD71B6X", .patch = patch_stac92hd71bxx },
6536 { .id = 0x111d76b6, .name =
"92HD71B5X", .patch = patch_stac92hd71bxx },
6537 { .id = 0x111d76b7, .name =
"92HD71B5X", .patch = patch_stac92hd71bxx },
6538 { .id = 0x111d76c0, .name =
"92HD89C3", .patch = patch_stac92hd73xx },
6539 { .id = 0x111d76c1, .name =
"92HD89C2", .patch = patch_stac92hd73xx },
6540 { .id = 0x111d76c2, .name =
"92HD89C1", .patch = patch_stac92hd73xx },
6541 { .id = 0x111d76c3, .name =
"92HD89B3", .patch = patch_stac92hd73xx },
6542 { .id = 0x111d76c4, .name =
"92HD89B2", .patch = patch_stac92hd73xx },
6543 { .id = 0x111d76c5, .name =
"92HD89B1", .patch = patch_stac92hd73xx },
6544 { .id = 0x111d76c6, .name =
"92HD89E3", .patch = patch_stac92hd73xx },
6545 { .id = 0x111d76c7, .name =
"92HD89E2", .patch = patch_stac92hd73xx },
6546 { .id = 0x111d76c8, .name =
"92HD89E1", .patch = patch_stac92hd73xx },
6547 { .id = 0x111d76c9, .name =
"92HD89D3", .patch = patch_stac92hd73xx },
6548 { .id = 0x111d76ca, .name =
"92HD89D2", .patch = patch_stac92hd73xx },
6549 { .id = 0x111d76cb, .name =
"92HD89D1", .patch = patch_stac92hd73xx },
6550 { .id = 0x111d76cc, .name =
"92HD89F3", .patch = patch_stac92hd73xx },
6551 { .id = 0x111d76cd, .name =
"92HD89F2", .patch = patch_stac92hd73xx },
6552 { .id = 0x111d76ce, .name =
"92HD89F1", .patch = patch_stac92hd73xx },
6553 { .id = 0x111d76df, .name =
"92HD93BXX", .patch = patch_stac92hd83xxx},
6554 { .id = 0x111d76e0, .name =
"92HD91BXX", .patch = patch_stac92hd83xxx},
6555 { .id = 0x111d76e3, .name =
"92HD98BXX", .patch = patch_stac92hd83xxx},
6556 { .id = 0x111d76e5, .name =
"92HD99BXX", .patch = patch_stac92hd83xxx},
6557 { .id = 0x111d76e7, .name =
"92HD90BXX", .patch = patch_stac92hd83xxx},
6558 { .id = 0x111d76e8, .name =
"92HD66B1X5", .patch = patch_stac92hd83xxx},
6559 { .id = 0x111d76e9, .name =
"92HD66B2X5", .patch = patch_stac92hd83xxx},
6560 { .id = 0x111d76ea, .name =
"92HD66B3X5", .patch = patch_stac92hd83xxx},
6561 { .id = 0x111d76eb, .name =
"92HD66C1X5", .patch = patch_stac92hd83xxx},
6562 { .id = 0x111d76ec, .name =
"92HD66C2X5", .patch = patch_stac92hd83xxx},
6563 { .id = 0x111d76ed, .name =
"92HD66C3X5", .patch = patch_stac92hd83xxx},
6564 { .id = 0x111d76ee, .name =
"92HD66B1X3", .patch = patch_stac92hd83xxx},
6565 { .id = 0x111d76ef, .name =
"92HD66B2X3", .patch = patch_stac92hd83xxx},
6566 { .id = 0x111d76f0, .name =
"92HD66B3X3", .patch = patch_stac92hd83xxx},
6567 { .id = 0x111d76f1, .name =
"92HD66C1X3", .patch = patch_stac92hd83xxx},
6568 { .id = 0x111d76f2, .name =
"92HD66C2X3", .patch = patch_stac92hd83xxx},
6569 { .id = 0x111d76f3, .name =
"92HD66C3/65", .patch = patch_stac92hd83xxx},
6580 .preset = snd_hda_preset_sigmatel,
6584 static int __init patch_sigmatel_init(
void)
6589 static void __exit patch_sigmatel_exit(
void)