Lines Matching +full:codec +full:- +full:0

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Universal Interface for Intel High Definition Audio Codec
59 STAC_92HD73XX_NO_JD, /* no jack-detection */
149 STAC_D965_REF_NO_JD, /* no jack-detection */
175 unsigned int headset_jack:1; /* 4-pin headset jack (hp + mono mic) */
176 unsigned int volknob_init:1; /* special volume-knob initialization */
188 unsigned int vref_mute_led_nid; /* pin NID for mute-LED vref control */
214 /* SPDIF-out mux */
220 #define AC_VERB_IDT_SET_POWER_MAP 0x7ec
221 #define AC_VERB_IDT_GET_POWER_MAP 0xfec
224 0x0a, 0x0b, 0x0c, 0xd, 0x0e,
225 0x0f, 0x10, 0x11
229 0x0a, 0x0b, 0x0c, 0xd, 0x0e,
230 0x0f, 0x10
234 0x0a, 0x0d, 0x0f
242 struct hda_codec *codec, in stac_playback_pcm_hook() argument
246 struct sigmatel_spec *spec = codec->spec; in stac_playback_pcm_hook()
247 if (action == HDA_GEN_PCM_ACT_OPEN && spec->stream_delay) in stac_playback_pcm_hook()
248 msleep(spec->stream_delay); in stac_playback_pcm_hook()
252 struct hda_codec *codec, in stac_capture_pcm_hook() argument
256 struct sigmatel_spec *spec = codec->spec; in stac_capture_pcm_hook()
257 int i, idx = 0; in stac_capture_pcm_hook()
259 if (!spec->powerdown_adcs) in stac_capture_pcm_hook()
262 for (i = 0; i < spec->gen.num_all_adcs; i++) { in stac_capture_pcm_hook()
263 if (spec->gen.all_adcs[i] == hinfo->nid) { in stac_capture_pcm_hook()
272 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook()
274 spec->active_adcs |= (1 << idx); in stac_capture_pcm_hook()
277 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook()
279 spec->active_adcs &= ~(1 << idx); in stac_capture_pcm_hook()
289 static void stac_gpio_set(struct hda_codec *codec, unsigned int mask, in stac_gpio_set() argument
293 hda_nid_t fg = codec->core.afg; in stac_gpio_set()
295 codec_dbg(codec, "%s msk %x dir %x gpio %x\n", __func__, mask, dir_mask, data); in stac_gpio_set()
297 gpiostate = snd_hda_codec_read(codec, fg, 0, in stac_gpio_set()
298 AC_VERB_GET_GPIO_DATA, 0); in stac_gpio_set()
301 gpiomask = snd_hda_codec_read(codec, fg, 0, in stac_gpio_set()
302 AC_VERB_GET_GPIO_MASK, 0); in stac_gpio_set()
305 gpiodir = snd_hda_codec_read(codec, fg, 0, in stac_gpio_set()
306 AC_VERB_GET_GPIO_DIRECTION, 0); in stac_gpio_set()
310 snd_hda_codec_write(codec, fg, 0, 0x7e7, 0); in stac_gpio_set()
312 snd_hda_codec_write(codec, fg, 0, in stac_gpio_set()
314 snd_hda_codec_read(codec, fg, 0, in stac_gpio_set()
319 snd_hda_codec_read(codec, fg, 0, in stac_gpio_set()
323 /* hook for controlling mic-mute LED GPIO */
327 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in stac_capture_led_update() local
328 struct sigmatel_spec *spec = codec->spec; in stac_capture_led_update()
331 spec->gpio_data |= spec->mic_mute_led_gpio; in stac_capture_led_update()
333 spec->gpio_data &= ~spec->mic_mute_led_gpio; in stac_capture_led_update()
334 stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); in stac_capture_led_update()
335 return 0; in stac_capture_led_update()
338 static int stac_vrefout_set(struct hda_codec *codec, in stac_vrefout_set() argument
343 codec_dbg(codec, "%s, nid %x ctl %x\n", __func__, nid, new_vref); in stac_vrefout_set()
344 pinctl = snd_hda_codec_read(codec, nid, 0, in stac_vrefout_set()
345 AC_VERB_GET_PIN_WIDGET_CONTROL, 0); in stac_vrefout_set()
347 if (pinctl < 0) in stac_vrefout_set()
350 pinctl &= 0xff; in stac_vrefout_set()
354 error = snd_hda_set_pin_ctl_cache(codec, nid, pinctl); in stac_vrefout_set()
355 if (error < 0) in stac_vrefout_set()
361 /* prevent codec AFG to D3 state when vref-out pin is used for mute LED */
363 static unsigned int stac_vref_led_power_filter(struct hda_codec *codec, in stac_vref_led_power_filter() argument
367 if (nid == codec->core.afg && power_state == AC_PWRST_D3) in stac_vref_led_power_filter()
369 return snd_hda_gen_path_power_filter(codec, nid, power_state); in stac_vref_led_power_filter()
372 /* update mute-LED accoring to the master switch */
373 static void stac_update_led_status(struct hda_codec *codec, bool muted) in stac_update_led_status() argument
375 struct sigmatel_spec *spec = codec->spec; in stac_update_led_status()
377 if (!spec->gpio_led) in stac_update_led_status()
381 if (spec->gpio_led_polarity) in stac_update_led_status()
384 if (!spec->vref_mute_led_nid) { in stac_update_led_status()
386 spec->gpio_data |= spec->gpio_led; in stac_update_led_status()
388 spec->gpio_data &= ~spec->gpio_led; in stac_update_led_status()
389 stac_gpio_set(codec, spec->gpio_mask, in stac_update_led_status()
390 spec->gpio_dir, spec->gpio_data); in stac_update_led_status()
392 spec->vref_led = muted ? AC_PINCTL_VREF_50 : AC_PINCTL_VREF_GRD; in stac_update_led_status()
393 stac_vrefout_set(codec, spec->vref_mute_led_nid, in stac_update_led_status()
394 spec->vref_led); in stac_update_led_status()
402 struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); in stac_vmaster_hook() local
404 stac_update_led_status(codec, brightness); in stac_vmaster_hook()
405 return 0; in stac_vmaster_hook()
409 static void stac_update_outputs(struct hda_codec *codec) in stac_update_outputs() argument
411 struct sigmatel_spec *spec = codec->spec; in stac_update_outputs()
413 if (spec->gpio_mute) in stac_update_outputs()
414 spec->gen.master_mute = in stac_update_outputs()
415 !(snd_hda_codec_read(codec, codec->core.afg, 0, in stac_update_outputs()
416 AC_VERB_GET_GPIO_DATA, 0) & spec->gpio_mute); in stac_update_outputs()
418 snd_hda_gen_update_outputs(codec); in stac_update_outputs()
420 if (spec->eapd_mask && spec->eapd_switch) { in stac_update_outputs()
421 unsigned int val = spec->gpio_data; in stac_update_outputs()
422 if (spec->gen.speaker_muted) in stac_update_outputs()
423 val &= ~spec->eapd_mask; in stac_update_outputs()
425 val |= spec->eapd_mask; in stac_update_outputs()
426 if (spec->gpio_data != val) { in stac_update_outputs()
427 spec->gpio_data = val; in stac_update_outputs()
428 stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, in stac_update_outputs()
434 static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid, in stac_toggle_power_map() argument
437 struct sigmatel_spec *spec = codec->spec; in stac_toggle_power_map()
440 for (idx = 0; idx < spec->num_pwrs; idx++) { in stac_toggle_power_map()
441 if (spec->pwr_nids[idx] == nid) in stac_toggle_power_map()
444 if (idx >= spec->num_pwrs) in stac_toggle_power_map()
449 val = spec->power_map_bits; in stac_toggle_power_map()
456 if (val != spec->power_map_bits) { in stac_toggle_power_map()
457 spec->power_map_bits = val; in stac_toggle_power_map()
459 snd_hda_codec_write(codec, codec->core.afg, 0, in stac_toggle_power_map()
465 static void jack_update_power(struct hda_codec *codec, in jack_update_power() argument
468 struct sigmatel_spec *spec = codec->spec; in jack_update_power()
471 if (!spec->num_pwrs) in jack_update_power()
474 if (jack && jack->nid) { in jack_update_power()
475 stac_toggle_power_map(codec, jack->nid, in jack_update_power()
476 snd_hda_jack_detect(codec, jack->nid), in jack_update_power()
482 for (i = 0; i < spec->num_pwrs; i++) { in jack_update_power()
483 hda_nid_t nid = spec->pwr_nids[i]; in jack_update_power()
484 if (!snd_hda_jack_tbl_get(codec, nid)) in jack_update_power()
486 stac_toggle_power_map(codec, nid, in jack_update_power()
487 snd_hda_jack_detect(codec, nid), in jack_update_power()
491 snd_hda_codec_write(codec, codec->core.afg, 0, in jack_update_power()
493 spec->power_map_bits); in jack_update_power()
496 static void stac_vref_event(struct hda_codec *codec, in stac_vref_event() argument
501 data = snd_hda_codec_read(codec, codec->core.afg, 0, in stac_vref_event()
502 AC_VERB_GET_GPIO_DATA, 0); in stac_vref_event()
504 snd_hda_codec_write(codec, codec->core.afg, 0, 0x7e0, in stac_vref_event()
505 !!(data & (1 << event->private_data))); in stac_vref_event()
511 static void stac_init_power_map(struct hda_codec *codec) in stac_init_power_map() argument
513 struct sigmatel_spec *spec = codec->spec; in stac_init_power_map()
516 for (i = 0; i < spec->num_pwrs; i++) { in stac_init_power_map()
517 hda_nid_t nid = spec->pwr_nids[i]; in stac_init_power_map()
518 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid); in stac_init_power_map()
521 spec->vref_mute_led_nid != nid && in stac_init_power_map()
522 is_jack_detectable(codec, nid)) { in stac_init_power_map()
523 snd_hda_jack_detect_enable_callback(codec, nid, in stac_init_power_map()
527 stac_toggle_power_map(codec, nid, false, false); in stac_init_power_map()
529 stac_toggle_power_map(codec, nid, true, false); in stac_init_power_map()
537 static inline bool get_int_hint(struct hda_codec *codec, const char *key, in get_int_hint() argument
540 return !snd_hda_get_int_hint(codec, key, valp); in get_int_hint()
544 static void stac_store_hints(struct hda_codec *codec) in stac_store_hints() argument
546 struct sigmatel_spec *spec = codec->spec; in stac_store_hints()
549 if (get_int_hint(codec, "gpio_mask", &spec->gpio_mask)) { in stac_store_hints()
550 spec->eapd_mask = spec->gpio_dir = spec->gpio_data = in stac_store_hints()
551 spec->gpio_mask; in stac_store_hints()
553 if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir)) in stac_store_hints()
554 spec->gpio_dir &= spec->gpio_mask; in stac_store_hints()
555 if (get_int_hint(codec, "gpio_data", &spec->gpio_data)) in stac_store_hints()
556 spec->gpio_data &= spec->gpio_mask; in stac_store_hints()
557 if (get_int_hint(codec, "eapd_mask", &spec->eapd_mask)) in stac_store_hints()
558 spec->eapd_mask &= spec->gpio_mask; in stac_store_hints()
559 if (get_int_hint(codec, "gpio_mute", &spec->gpio_mute)) in stac_store_hints()
560 spec->gpio_mute &= spec->gpio_mask; in stac_store_hints()
561 val = snd_hda_get_bool_hint(codec, "eapd_switch"); in stac_store_hints()
562 if (val >= 0) in stac_store_hints()
563 spec->eapd_switch = val; in stac_store_hints()
575 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_aloopback_get() local
576 unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); in stac_aloopback_get()
577 struct sigmatel_spec *spec = codec->spec; in stac_aloopback_get()
579 ucontrol->value.integer.value[0] = !!(spec->aloopback & in stac_aloopback_get()
580 (spec->aloopback_mask << idx)); in stac_aloopback_get()
581 return 0; in stac_aloopback_get()
587 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_aloopback_put() local
588 struct sigmatel_spec *spec = codec->spec; in stac_aloopback_put()
589 unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); in stac_aloopback_put()
593 idx_val = spec->aloopback_mask << idx; in stac_aloopback_put()
594 if (ucontrol->value.integer.value[0]) in stac_aloopback_put()
595 val = spec->aloopback | idx_val; in stac_aloopback_put()
597 val = spec->aloopback & ~idx_val; in stac_aloopback_put()
598 if (spec->aloopback == val) in stac_aloopback_put()
599 return 0; in stac_aloopback_put()
601 spec->aloopback = val; in stac_aloopback_put()
606 dac_mode = snd_hda_codec_read(codec, codec->core.afg, 0, in stac_aloopback_put()
607 kcontrol->private_value & 0xFFFF, 0x0); in stac_aloopback_put()
608 dac_mode >>= spec->aloopback_shift; in stac_aloopback_put()
610 if (spec->aloopback & idx_val) { in stac_aloopback_put()
611 snd_hda_power_up(codec); in stac_aloopback_put()
614 snd_hda_power_down(codec); in stac_aloopback_put()
618 snd_hda_codec_write_cache(codec, codec->core.afg, 0, in stac_aloopback_put()
619 kcontrol->private_value >> 16, dac_mode); in stac_aloopback_put()
640 static bool hp_bnb2011_with_dock(struct hda_codec *codec) in hp_bnb2011_with_dock() argument
642 if (codec->core.vendor_id != 0x111d7605 && in hp_bnb2011_with_dock()
643 codec->core.vendor_id != 0x111d76d1) in hp_bnb2011_with_dock()
646 switch (codec->core.subsystem_id) { in hp_bnb2011_with_dock()
647 case 0x103c1618: in hp_bnb2011_with_dock()
648 case 0x103c1619: in hp_bnb2011_with_dock()
649 case 0x103c161a: in hp_bnb2011_with_dock()
650 case 0x103c161b: in hp_bnb2011_with_dock()
651 case 0x103c161c: in hp_bnb2011_with_dock()
652 case 0x103c161d: in hp_bnb2011_with_dock()
653 case 0x103c161e: in hp_bnb2011_with_dock()
654 case 0x103c161f: in hp_bnb2011_with_dock()
656 case 0x103c162a: in hp_bnb2011_with_dock()
657 case 0x103c162b: in hp_bnb2011_with_dock()
659 case 0x103c1630: in hp_bnb2011_with_dock()
660 case 0x103c1631: in hp_bnb2011_with_dock()
662 case 0x103c1633: in hp_bnb2011_with_dock()
663 case 0x103c1634: in hp_bnb2011_with_dock()
664 case 0x103c1635: in hp_bnb2011_with_dock()
666 case 0x103c3587: in hp_bnb2011_with_dock()
667 case 0x103c3588: in hp_bnb2011_with_dock()
668 case 0x103c3589: in hp_bnb2011_with_dock()
669 case 0x103c358a: in hp_bnb2011_with_dock()
671 case 0x103c3667: in hp_bnb2011_with_dock()
672 case 0x103c3668: in hp_bnb2011_with_dock()
673 case 0x103c3669: in hp_bnb2011_with_dock()
683 case 0x103c1473: /* HP ProBook 6550b */ in hp_blike_system()
684 case 0x103c1520: in hp_blike_system()
685 case 0x103c1521: in hp_blike_system()
686 case 0x103c1523: in hp_blike_system()
687 case 0x103c1524: in hp_blike_system()
688 case 0x103c1525: in hp_blike_system()
689 case 0x103c1722: in hp_blike_system()
690 case 0x103c1723: in hp_blike_system()
691 case 0x103c1724: in hp_blike_system()
692 case 0x103c1725: in hp_blike_system()
693 case 0x103c1726: in hp_blike_system()
694 case 0x103c1727: in hp_blike_system()
695 case 0x103c1728: in hp_blike_system()
696 case 0x103c1729: in hp_blike_system()
697 case 0x103c172a: in hp_blike_system()
698 case 0x103c172b: in hp_blike_system()
699 case 0x103c307e: in hp_blike_system()
700 case 0x103c307f: in hp_blike_system()
701 case 0x103c3080: in hp_blike_system()
702 case 0x103c3081: in hp_blike_system()
703 case 0x103c7007: in hp_blike_system()
704 case 0x103c7008: in hp_blike_system()
710 static void set_hp_led_gpio(struct hda_codec *codec) in set_hp_led_gpio() argument
712 struct sigmatel_spec *spec = codec->spec; in set_hp_led_gpio()
715 if (spec->gpio_led) in set_hp_led_gpio()
718 gpio = snd_hda_param_read(codec, codec->core.afg, AC_PAR_GPIO_CAP); in set_hp_led_gpio()
721 spec->gpio_led = 0x08; /* GPIO 3 */ in set_hp_led_gpio()
723 spec->gpio_led = 0x01; /* GPIO 0 */ in set_hp_led_gpio()
730 * where P can be 0 or 1 and defines mute LED GPIO control state (low/high)
732 * and G is the index of the GPIO to use as the mute LED control (0..9)
733 * If _G portion is missing it is assigned based on the codec ID
735 * So, HP B-series like systems may have HP_Mute_LED_0 (current models)
739 * The dv-series laptops don't seem to have the HP_Mute_LED* strings in
740 * SMBIOS - at least the ones I have seen do not have them - which include
741 * my own system (HP Pavilion dv6-1110ax) and my cousin's
744 * -- kunal
746 static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity) in find_mute_led_cfg() argument
748 struct sigmatel_spec *spec = codec->spec; in find_mute_led_cfg()
751 if (get_int_hint(codec, "gpio_led", &spec->gpio_led)) { in find_mute_led_cfg()
752 get_int_hint(codec, "gpio_led_polarity", in find_mute_led_cfg()
753 &spec->gpio_led_polarity); in find_mute_led_cfg()
758 if (sscanf(dev->name, "HP_Mute_LED_%u_%x", in find_mute_led_cfg()
759 &spec->gpio_led_polarity, in find_mute_led_cfg()
760 &spec->gpio_led) == 2) { in find_mute_led_cfg()
762 max_gpio = snd_hda_param_read(codec, codec->core.afg, in find_mute_led_cfg()
765 if (spec->gpio_led < max_gpio) in find_mute_led_cfg()
766 spec->gpio_led = 1 << spec->gpio_led; in find_mute_led_cfg()
768 spec->vref_mute_led_nid = spec->gpio_led; in find_mute_led_cfg()
771 if (sscanf(dev->name, "HP_Mute_LED_%u", in find_mute_led_cfg()
772 &spec->gpio_led_polarity) == 1) { in find_mute_led_cfg()
773 set_hp_led_gpio(codec); in find_mute_led_cfg()
777 if (strstr(dev->name, "HP_Mute_LED_P_G")) { in find_mute_led_cfg()
778 set_hp_led_gpio(codec); in find_mute_led_cfg()
779 if (default_polarity >= 0) in find_mute_led_cfg()
780 spec->gpio_led_polarity = default_polarity; in find_mute_led_cfg()
782 spec->gpio_led_polarity = 1; in find_mute_led_cfg()
788 * Fallback case - if we don't find the DMI strings, in find_mute_led_cfg()
789 * we statically set the GPIO - if not a B-series system in find_mute_led_cfg()
792 if (!hp_blike_system(codec->core.subsystem_id) && in find_mute_led_cfg()
793 (default_polarity == 0 || default_polarity == 1)) { in find_mute_led_cfg()
794 set_hp_led_gpio(codec); in find_mute_led_cfg()
795 spec->gpio_led_polarity = default_polarity; in find_mute_led_cfg()
798 return 0; in find_mute_led_cfg()
801 /* check whether a built-in speaker is included in parsed pins */
802 static bool has_builtin_speaker(struct hda_codec *codec) in has_builtin_speaker() argument
804 struct sigmatel_spec *spec = codec->spec; in has_builtin_speaker()
808 if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) { in has_builtin_speaker()
809 nid_pin = spec->gen.autocfg.line_out_pins; in has_builtin_speaker()
810 nids = spec->gen.autocfg.line_outs; in has_builtin_speaker()
812 nid_pin = spec->gen.autocfg.speaker_pins; in has_builtin_speaker()
813 nids = spec->gen.autocfg.speaker_outs; in has_builtin_speaker()
816 for (i = 0; i < nids; i++) { in has_builtin_speaker()
817 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid_pin[i]); in has_builtin_speaker()
829 static int stac_auto_create_beep_ctls(struct hda_codec *codec, in stac_auto_create_beep_ctls() argument
832 struct sigmatel_spec *spec = codec->spec; in stac_auto_create_beep_ctls()
833 u32 caps = query_amp_caps(codec, nid, HDA_OUTPUT); in stac_auto_create_beep_ctls()
836 HDA_CODEC_MUTE(NULL, 0, 0, 0); in stac_auto_create_beep_ctls()
838 HDA_CODEC_MUTE_BEEP(NULL, 0, 0, 0); in stac_auto_create_beep_ctls()
840 HDA_CODEC_VOLUME(NULL, 0, 0, 0); in stac_auto_create_beep_ctls()
845 if (spec->anabeep_nid == nid) in stac_auto_create_beep_ctls()
849 knew = snd_hda_gen_add_kctl(&spec->gen, in stac_auto_create_beep_ctls()
852 return -ENOMEM; in stac_auto_create_beep_ctls()
853 knew->private_value = in stac_auto_create_beep_ctls()
854 HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT); in stac_auto_create_beep_ctls()
859 knew = snd_hda_gen_add_kctl(&spec->gen, in stac_auto_create_beep_ctls()
863 return -ENOMEM; in stac_auto_create_beep_ctls()
864 knew->private_value = in stac_auto_create_beep_ctls()
865 HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT); in stac_auto_create_beep_ctls()
867 return 0; in stac_auto_create_beep_ctls()
876 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_dig_beep_switch_get() local
877 ucontrol->value.integer.value[0] = codec->beep->enabled; in stac_dig_beep_switch_get()
878 return 0; in stac_dig_beep_switch_get()
884 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_dig_beep_switch_put() local
885 return snd_hda_enable_beep_device(codec, ucontrol->value.integer.value[0]); in stac_dig_beep_switch_put()
896 static int stac_beep_switch_ctl(struct hda_codec *codec) in stac_beep_switch_ctl() argument
898 struct sigmatel_spec *spec = codec->spec; in stac_beep_switch_ctl()
900 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, &stac_dig_beep_ctrl)) in stac_beep_switch_ctl()
901 return -ENOMEM; in stac_beep_switch_ctl()
902 return 0; in stac_beep_switch_ctl()
907 * SPDIF-out mux controls
913 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_smux_enum_info() local
914 struct sigmatel_spec *spec = codec->spec; in stac_smux_enum_info()
915 return snd_hda_input_mux_info(&spec->spdif_mux, uinfo); in stac_smux_enum_info()
921 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_smux_enum_get() local
922 struct sigmatel_spec *spec = codec->spec; in stac_smux_enum_get()
923 unsigned int smux_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); in stac_smux_enum_get()
925 ucontrol->value.enumerated.item[0] = spec->cur_smux[smux_idx]; in stac_smux_enum_get()
926 return 0; in stac_smux_enum_get()
932 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_smux_enum_put() local
933 struct sigmatel_spec *spec = codec->spec; in stac_smux_enum_put()
934 unsigned int smux_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); in stac_smux_enum_put()
936 return snd_hda_input_mux_put(codec, &spec->spdif_mux, ucontrol, in stac_smux_enum_put()
937 spec->gen.autocfg.dig_out_pins[smux_idx], in stac_smux_enum_put()
938 &spec->cur_smux[smux_idx]); in stac_smux_enum_put()
954 static int stac_create_spdif_mux_ctls(struct hda_codec *codec) in stac_create_spdif_mux_ctls() argument
956 struct sigmatel_spec *spec = codec->spec; in stac_create_spdif_mux_ctls()
957 struct auto_pin_cfg *cfg = &spec->gen.autocfg; in stac_create_spdif_mux_ctls()
958 const char * const *labels = spec->spdif_labels; in stac_create_spdif_mux_ctls()
962 if (cfg->dig_outs < 1) in stac_create_spdif_mux_ctls()
963 return 0; in stac_create_spdif_mux_ctls()
965 num_cons = snd_hda_get_num_conns(codec, cfg->dig_out_pins[0]); in stac_create_spdif_mux_ctls()
967 return 0; in stac_create_spdif_mux_ctls()
971 for (i = 0; i < num_cons; i++) { in stac_create_spdif_mux_ctls()
973 return -EINVAL; in stac_create_spdif_mux_ctls()
974 snd_hda_add_imux_item(codec, &spec->spdif_mux, labels[i], i, NULL); in stac_create_spdif_mux_ctls()
977 kctl = snd_hda_gen_add_kctl(&spec->gen, NULL, &stac_smux_mixer); in stac_create_spdif_mux_ctls()
979 return -ENOMEM; in stac_create_spdif_mux_ctls()
980 kctl->count = cfg->dig_outs; in stac_create_spdif_mux_ctls()
982 return 0; in stac_create_spdif_mux_ctls()
987 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
988 {0x08, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
995 { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
1001 { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
1007 { 0x01, AC_VERB_SET_EAPD, 1 << 2},
1012 { 0x22, 0x785, 0x43 },
1013 { 0x22, 0x782, 0xe0 },
1014 { 0x22, 0x795, 0x00 },
1020 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
1025 /* unmute right and left channels for nodes 0x0f, 0xa, 0x0d */
1026 0x0f, 0x0a, 0x0d, 0
1031 { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
1033 { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
1039 { 0x16, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
1044 /* unmute node 0x1b */
1045 { 0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
1046 /* select node 0x03 as DAC */
1047 { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x01},
1053 {0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0x7f},
1054 /* unmute node 0x1b */
1055 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
1056 /* select node 0x03 as DAC */
1057 {0x0b, AC_VERB_SET_CONNECT_SEL, 0x01},
1063 { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
1065 { 0x01, AC_VERB_SET_DIGI_CONVERT_2, 1 << 5},
1071 {0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0x7f},
1073 {0x01, AC_VERB_SET_DIGI_CONVERT_2, 1 << 5},
1079 { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
1081 { 0x01, AC_VERB_SET_DIGI_CONVERT_2, 1 << 5},
1086 STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3);
1089 STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 4);
1092 STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 5);
1095 STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2);
1098 STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0, 1);
1101 STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB, 1);
1104 { 0x08, 0x01c47010 },
1105 { 0x09, 0x01447010 },
1106 { 0x0d, 0x0221401f },
1107 { 0x0e, 0x01114010 },
1108 { 0x0f, 0x02a19020 },
1109 { 0x10, 0x01a19021 },
1110 { 0x11, 0x90100140 },
1111 { 0x12, 0x01813122 },
1116 { 0x08, 0x400000fe },
1117 { 0x09, 0x404500f4 },
1118 { 0x0d, 0x400100f0 },
1119 { 0x0e, 0x90110010 },
1120 { 0x0f, 0x400100f1 },
1121 { 0x10, 0x02a1902e },
1122 { 0x11, 0x500000f2 },
1123 { 0x12, 0x500000f3 },
1128 { 0x08, 0x400000fe },
1129 { 0x09, 0x404500f4 },
1130 { 0x0d, 0x400100f0 },
1131 { 0x0e, 0x90110010 },
1132 { 0x0f, 0x400100f1 },
1133 { 0x10, 0x02a1902e },
1134 { 0x11, 0x500000f2 },
1135 { 0x12, 0x500000f3 },
1146 { 0x08, 0x400001f0 },
1147 { 0x09, 0x400001f1 },
1148 { 0x0d, 0x02214030 },
1149 { 0x0e, 0x01014010 },
1150 { 0x0f, 0x02a19020 },
1151 { 0x10, 0x01a19021 },
1152 { 0x11, 0x90100140 },
1153 { 0x12, 0x01813122 },
1163 { 0x08, 0x400001f0 },
1164 { 0x09, 0x400001f1 },
1165 { 0x0d, 0x0221401f },
1166 { 0x0e, 0x01014010 },
1167 { 0x0f, 0x01813020 },
1168 { 0x10, 0x02a19021 },
1169 { 0x11, 0x90100140 },
1170 { 0x12, 0x400001f2 },
1184 { 0x08, 0x400001f0 },
1185 { 0x09, 0x400001f1 },
1186 { 0x0d, 0x0221401f },
1187 { 0x0e, 0x01014010 },
1188 { 0x0f, 0x01813020 },
1189 { 0x10, 0x01a19021 },
1190 { 0x11, 0x90100140 },
1191 { 0x12, 0x400001f2 },
1197 STAC 9200-32 pin configs for
1202 { 0x08, 0x40c003fa },
1203 { 0x09, 0x03441340 },
1204 { 0x0d, 0x0321121f },
1205 { 0x0e, 0x90170310 },
1206 { 0x0f, 0x408003fb },
1207 { 0x10, 0x03a11020 },
1208 { 0x11, 0x401003fc },
1209 { 0x12, 0x403003fd },
1214 STAC 9200-32 pin configs for
1222 { 0x08, 0x40c003fa },
1223 { 0x09, 0x0144131f },
1224 { 0x0d, 0x0321121f },
1225 { 0x0e, 0x90170310 },
1226 { 0x0f, 0x90a70321 },
1227 { 0x10, 0x03a11020 },
1228 { 0x11, 0x401003fb },
1229 { 0x12, 0x40f000fc },
1234 STAC 9200-32 pin configs for
1239 { 0x08, 0x40c003fa },
1240 { 0x09, 0x01441340 },
1241 { 0x0d, 0x0421421f },
1242 { 0x0e, 0x90170310 },
1243 { 0x0f, 0x408003fb },
1244 { 0x10, 0x04a1102e },
1245 { 0x11, 0x90170311 },
1246 { 0x12, 0x403003fc },
1251 STAC 9200-32 pin configs for
1258 { 0x08, 0x40c003fa },
1259 { 0x09, 0x404003fb },
1260 { 0x0d, 0x0321121f },
1261 { 0x0e, 0x90170310 },
1262 { 0x0f, 0x408003fc },
1263 { 0x10, 0x03a11020 },
1264 { 0x11, 0x401003fd },
1265 { 0x12, 0x403003fe },
1270 STAC 9200-32 pin configs for
1276 { 0x08, 0x40c003fa },
1277 { 0x09, 0x01441340 },
1278 { 0x0d, 0x0421121f },
1279 { 0x0e, 0x90170310 },
1280 { 0x0f, 0x408003fb },
1281 { 0x10, 0x04a11020 },
1282 { 0x11, 0x401003fc },
1283 { 0x12, 0x403003fd },
1288 STAC 9200-32 pin configs for
1293 { 0x08, 0x40c003fa },
1294 { 0x09, 0x404003fb },
1295 { 0x0d, 0x0421121f },
1296 { 0x0e, 0x90170310 },
1297 { 0x0f, 0x408003fc },
1298 { 0x10, 0x04a11020 },
1299 { 0x11, 0x401003fd },
1300 { 0x12, 0x403003fe },
1305 STAC 9200-32
1309 { 0x08, 0x40c003fa },
1310 { 0x09, 0x01441340 },
1311 { 0x0d, 0x0421121f },
1312 { 0x0e, 0x90170310 },
1313 { 0x0f, 0x90170310 },
1314 { 0x10, 0x04a11020 },
1315 { 0x11, 0x90170310 },
1316 { 0x12, 0x40f003fc },
1321 { 0x08, 0x40c000f0 },
1322 { 0x09, 0x404000f1 },
1323 { 0x0d, 0x0221121f },
1324 { 0x0e, 0x02211210 },
1325 { 0x0f, 0x90170111 },
1326 { 0x10, 0x90a70120 },
1327 { 0x11, 0x400000f2 },
1328 { 0x12, 0x400000f3 },
1337 { 0x0a, 0x02214020 }, /* Front panel HP socket */
1338 { 0x0b, 0x02a19080 }, /* Front Mic */
1339 { 0x0c, 0x0181304e }, /* Line in */
1340 { 0x0d, 0x01014010 }, /* Line out */
1341 { 0x0e, 0x01a19040 }, /* Rear Mic */
1342 { 0x0f, 0x01011012 }, /* Rear speakers */
1343 { 0x10, 0x01016011 }, /* Center speaker */
1344 { 0x11, 0x01012014 }, /* Side speakers (7.1) */
1345 { 0x12, 0x103301f0 }, /* Motherboard CD line in connector */
1346 { 0x13, 0x411111f0 }, /* Unused */
1347 { 0x14, 0x411111f0 }, /* Unused */
1348 { 0x21, 0x01442170 }, /* S/PDIF line out */
1349 { 0x22, 0x411111f0 }, /* Unused */
1350 { 0x23, 0x411111f0 }, /* Unused */
1354 static void stac9200_fixup_panasonic(struct hda_codec *codec, in stac9200_fixup_panasonic() argument
1357 struct sigmatel_spec *spec = codec->spec; in stac9200_fixup_panasonic()
1360 spec->gpio_mask = spec->gpio_dir = 0x09; in stac9200_fixup_panasonic()
1361 spec->gpio_data = 0x00; in stac9200_fixup_panasonic()
1362 /* CF-74 has no headphone detection, and the driver should *NOT* in stac9200_fixup_panasonic()
1365 spec->gen.suppress_auto_mute = 1; in stac9200_fixup_panasonic()
1440 {0x08, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
1449 { .id = STAC_9200_DELL_D21, .name = "dell-d21" },
1450 { .id = STAC_9200_DELL_D22, .name = "dell-d22" },
1451 { .id = STAC_9200_DELL_D23, .name = "dell-d23" },
1452 { .id = STAC_9200_DELL_M21, .name = "dell-m21" },
1453 { .id = STAC_9200_DELL_M22, .name = "dell-m22" },
1454 { .id = STAC_9200_DELL_M23, .name = "dell-m23" },
1455 { .id = STAC_9200_DELL_M24, .name = "dell-m24" },
1456 { .id = STAC_9200_DELL_M25, .name = "dell-m25" },
1457 { .id = STAC_9200_DELL_M26, .name = "dell-m26" },
1458 { .id = STAC_9200_DELL_M27, .name = "dell-m27" },
1459 { .id = STAC_9200_M4, .name = "gateway-m4" },
1460 { .id = STAC_9200_M4_2, .name = "gateway-m4-2" },
1467 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
1469 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
1472 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01a8,
1474 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01b5,
1476 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01bd,
1478 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c0,
1480 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c1,
1482 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c2,
1484 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c5,
1486 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c7,
1488 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c8,
1490 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c9,
1492 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ca,
1494 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cb,
1496 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cc,
1498 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cd,
1500 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ce,
1502 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cf,
1504 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d3,
1506 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d4,
1508 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6,
1510 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d8,
1512 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d9,
1514 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01da,
1516 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01de,
1518 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01e3,
1520 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01e8,
1522 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ee,
1524 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ef,
1526 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f5,
1528 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f6,
1530 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0201,
1533 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC),
1535 SND_PCI_QUIRK(0x107b, 0x0205, "Gateway S-7110M", STAC_9200_M4),
1536 SND_PCI_QUIRK(0x107b, 0x0317, "Gateway MT3423, MX341*", STAC_9200_M4_2),
1537 SND_PCI_QUIRK(0x107b, 0x0318, "Gateway ML3019, MT3707", STAC_9200_M4_2),
1539 SND_PCI_QUIRK(0x1106, 0x3288, "OQO Model 2", STAC_9200_OQO),
1544 { 0x07, 0x40c003f0 },
1545 { 0x08, 0x424503f2 },
1546 { 0x0a, 0x01813022 },
1547 { 0x0b, 0x02a19021 },
1548 { 0x0c, 0x90a70320 },
1549 { 0x0d, 0x02214210 },
1550 { 0x10, 0x01019020 },
1551 { 0x11, 0x9033032e },
1556 { 0x07, 0x40c003f4 },
1557 { 0x08, 0x424503f2 },
1558 { 0x0a, 0x400000f3 },
1559 { 0x0b, 0x02a19020 },
1560 { 0x0c, 0x40a000f0 },
1561 { 0x0d, 0x90100210 },
1562 { 0x10, 0x400003f1 },
1563 { 0x11, 0x9033032e },
1568 { 0x07, 0x40c003f4 },
1569 { 0x08, 0x424503f2 },
1570 { 0x0a, 0x400000f3 },
1571 { 0x0b, 0x02a19020 },
1572 { 0x0c, 0x40a000f0 },
1573 { 0x0d, 0x90100210 },
1574 { 0x10, 0x400003f1 },
1575 { 0x11, 0x9033032e },
1580 { 0x07, 0x40c003f4 },
1581 { 0x08, 0x424503f2 },
1582 { 0x0a, 0x400000f3 },
1583 { 0x0b, 0x02a19020 },
1584 { 0x0c, 0x40a000f0 },
1585 { 0x0d, 0x90100210 },
1586 { 0x10, 0x400003f1 },
1587 { 0x11, 0x9033032e },
1592 { 0x07, 0x40c003f4 },
1593 { 0x08, 0x424503f2 },
1594 { 0x0a, 0x400000f3 },
1595 { 0x0b, 0x02a19020 },
1596 { 0x0c, 0x40a000f0 },
1597 { 0x0d, 0x90100210 },
1598 { 0x10, 0x400003f1 },
1599 { 0x11, 0x9033032e },
1604 { 0x07, 0x40c003f4 },
1605 { 0x08, 0x424503f2 },
1606 { 0x0a, 0x400000f3 },
1607 { 0x0b, 0x02a19020 },
1608 { 0x0c, 0x40a000f0 },
1609 { 0x0d, 0x90100210 },
1610 { 0x10, 0x400003f1 },
1611 { 0x11, 0x503303f3 },
1616 { 0x07, 0x40c003f4 },
1617 { 0x08, 0x424503f2 },
1618 { 0x0a, 0x400000f3 },
1619 { 0x0b, 0x02a19020 },
1620 { 0x0c, 0x40a000f0 },
1621 { 0x0d, 0x90100210 },
1622 { 0x10, 0x400003f1 },
1623 { 0x11, 0x9033032e },
1628 { 0x07, 0x40c003f4 },
1629 { 0x08, 0x424503f2 },
1630 { 0x0a, 0x400000f3 },
1631 { 0x0b, 0x02a19020 },
1632 { 0x0c, 0x40a000f0 },
1633 { 0x0d, 0x90100210 },
1634 { 0x10, 0x400003f1 },
1635 { 0x11, 0x90330320 },
1677 { .id = STAC_M1_2, .name = "m1-2" },
1679 { .id = STAC_M2_2, .name = "m2-2" },
1688 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
1689 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, "DFI LanParty", STAC_REF),
1690 SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
1693 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway mobile", STAC_M2_2),
1695 /* gateway machines are checked via codec ssid */
1696 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_M2),
1697 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_M5),
1698 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_M1),
1699 SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_M2),
1700 SND_PCI_QUIRK(0x107b, 0x0367, "Gateway MX6453", STAC_M1_2),
1702 SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M1),
1703 SND_PCI_QUIRK(0x107b, 0x0507, "Gateway mobile", STAC_M3),
1704 SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M6),
1705 SND_PCI_QUIRK(0x107b, 0x0685, "Gateway mobile", STAC_M2_2),
1710 { 0x0a, 0x02214030 },
1711 { 0x0b, 0x02a19040 },
1712 { 0x0c, 0x01a19020 },
1713 { 0x0d, 0x02214030 },
1714 { 0x0e, 0x0181302e },
1715 { 0x0f, 0x01014010 },
1716 { 0x10, 0x01014020 },
1717 { 0x11, 0x01014030 },
1718 { 0x12, 0x02319040 },
1719 { 0x13, 0x90a000f0 },
1720 { 0x14, 0x90a000f0 },
1721 { 0x22, 0x01452050 },
1722 { 0x23, 0x01452050 },
1727 { 0x0a, 0x0321101f },
1728 { 0x0b, 0x4f00000f },
1729 { 0x0c, 0x4f0000f0 },
1730 { 0x0d, 0x90170110 },
1731 { 0x0e, 0x03a11020 },
1732 { 0x0f, 0x0321101f },
1733 { 0x10, 0x4f0000f0 },
1734 { 0x11, 0x4f0000f0 },
1735 { 0x12, 0x4f0000f0 },
1736 { 0x13, 0x90a60160 },
1737 { 0x14, 0x4f0000f0 },
1738 { 0x22, 0x4f0000f0 },
1739 { 0x23, 0x4f0000f0 },
1744 { 0x0a, 0x0321101f },
1745 { 0x0b, 0x0321101f },
1746 { 0x0c, 0x03a11020 },
1747 { 0x0d, 0x03014020 },
1748 { 0x0e, 0x90170110 },
1749 { 0x0f, 0x4f0000f0 },
1750 { 0x10, 0x4f0000f0 },
1751 { 0x11, 0x4f0000f0 },
1752 { 0x12, 0x4f0000f0 },
1753 { 0x13, 0x90a60160 },
1754 { 0x14, 0x4f0000f0 },
1755 { 0x22, 0x4f0000f0 },
1756 { 0x23, 0x904601b0 },
1761 { 0x0a, 0x02214230 },
1762 { 0x0b, 0x02A19240 },
1763 { 0x0c, 0x01013214 },
1764 { 0x0d, 0x01014210 },
1765 { 0x0e, 0x01A19250 },
1766 { 0x0f, 0x01011212 },
1767 { 0x10, 0x01016211 },
1772 { 0x0a, 0x02214030 },
1773 { 0x0b, 0x02A19010 },
1778 { 0x0e, 0x400000f0 },
1782 static void stac92hd73xx_fixup_ref(struct hda_codec *codec, in stac92hd73xx_fixup_ref() argument
1785 struct sigmatel_spec *spec = codec->spec; in stac92hd73xx_fixup_ref()
1790 snd_hda_apply_pincfgs(codec, ref92hd73xx_pin_configs); in stac92hd73xx_fixup_ref()
1791 spec->gpio_mask = spec->gpio_dir = spec->gpio_data = 0; in stac92hd73xx_fixup_ref()
1794 static void stac92hd73xx_fixup_dell(struct hda_codec *codec) in stac92hd73xx_fixup_dell() argument
1796 struct sigmatel_spec *spec = codec->spec; in stac92hd73xx_fixup_dell()
1798 snd_hda_apply_pincfgs(codec, dell_m6_pin_configs); in stac92hd73xx_fixup_dell()
1799 spec->eapd_switch = 0; in stac92hd73xx_fixup_dell()
1802 static void stac92hd73xx_fixup_dell_eq(struct hda_codec *codec, in stac92hd73xx_fixup_dell_eq() argument
1805 struct sigmatel_spec *spec = codec->spec; in stac92hd73xx_fixup_dell_eq()
1810 stac92hd73xx_fixup_dell(codec); in stac92hd73xx_fixup_dell_eq()
1811 snd_hda_add_verbs(codec, dell_eq_core_init); in stac92hd73xx_fixup_dell_eq()
1812 spec->volknob_init = 1; in stac92hd73xx_fixup_dell_eq()
1816 static void stac92hd73xx_fixup_dell_m6_amic(struct hda_codec *codec, in stac92hd73xx_fixup_dell_m6_amic() argument
1822 stac92hd73xx_fixup_dell(codec); in stac92hd73xx_fixup_dell_m6_amic()
1823 snd_hda_codec_set_pincfg(codec, 0x0b, 0x90A70170); in stac92hd73xx_fixup_dell_m6_amic()
1827 static void stac92hd73xx_fixup_dell_m6_dmic(struct hda_codec *codec, in stac92hd73xx_fixup_dell_m6_dmic() argument
1833 stac92hd73xx_fixup_dell(codec); in stac92hd73xx_fixup_dell_m6_dmic()
1834 snd_hda_codec_set_pincfg(codec, 0x13, 0x90A60160); in stac92hd73xx_fixup_dell_m6_dmic()
1838 static void stac92hd73xx_fixup_dell_m6_both(struct hda_codec *codec, in stac92hd73xx_fixup_dell_m6_both() argument
1844 stac92hd73xx_fixup_dell(codec); in stac92hd73xx_fixup_dell_m6_both()
1845 snd_hda_codec_set_pincfg(codec, 0x0b, 0x90A70170); in stac92hd73xx_fixup_dell_m6_both()
1846 snd_hda_codec_set_pincfg(codec, 0x13, 0x90A60160); in stac92hd73xx_fixup_dell_m6_both()
1849 static void stac92hd73xx_fixup_alienware_m17x(struct hda_codec *codec, in stac92hd73xx_fixup_alienware_m17x() argument
1852 struct sigmatel_spec *spec = codec->spec; in stac92hd73xx_fixup_alienware_m17x()
1857 snd_hda_apply_pincfgs(codec, alienware_m17x_pin_configs); in stac92hd73xx_fixup_alienware_m17x()
1858 spec->eapd_switch = 0; in stac92hd73xx_fixup_alienware_m17x()
1861 static void stac92hd73xx_fixup_no_jd(struct hda_codec *codec, in stac92hd73xx_fixup_no_jd() argument
1865 codec->no_jack_detect = 1; in stac92hd73xx_fixup_no_jd()
1869 static void stac92hd73xx_disable_automute(struct hda_codec *codec, in stac92hd73xx_disable_automute() argument
1872 struct sigmatel_spec *spec = codec->spec; in stac92hd73xx_disable_automute()
1877 spec->gen.suppress_auto_mute = 1; in stac92hd73xx_disable_automute()
1929 { 0x0c, 0x01014411 },
1930 { 0x0d, 0x01014410 },
1931 { 0x0e, 0x01014412 },
1932 { 0x22, 0x014b1180 },
1939 { .id = STAC_92HD73XX_NO_JD, .name = "no-jd" },
1942 { .id = STAC_DELL_M6_AMIC, .name = "dell-m6-amic" },
1943 { .id = STAC_DELL_M6_DMIC, .name = "dell-m6-dmic" },
1944 { .id = STAC_DELL_M6_BOTH, .name = "dell-m6" },
1945 { .id = STAC_DELL_EQ, .name = "dell-eq" },
1947 { .id = STAC_ELO_VUPOINT_15MX, .name = "elo-vupoint-15mx" },
1948 { .id = STAC_92HD73XX_ASUS_MOBO, .name = "asus-mobo" },
1954 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
1956 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
1958 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5002,
1960 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5003,
1962 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254,
1964 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255,
1966 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0256,
1968 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0257,
1970 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025e,
1972 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025f,
1974 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0271,
1976 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0272,
1978 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f,
1980 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
1982 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be,
1984 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02bd,
1986 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02fe,
1988 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0413,
1990 /* codec SSID matching */
1991 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a1,
1993 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x043a,
1995 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490,
1997 SND_PCI_QUIRK(0x1059, 0x1011,
1999 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1927,
2001 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
2003 SND_PCI_QUIRK(PCI_VENDOR_ID_ASUSTEK, 0x83f8, "ASUS AT4NM10",
2009 { 0x0a, 0x02214030 },
2010 { 0x0b, 0x02211010 },
2011 { 0x0c, 0x02a19020 },
2012 { 0x0d, 0x02170130 },
2013 { 0x0e, 0x01014050 },
2014 { 0x0f, 0x01819040 },
2015 { 0x10, 0x01014020 },
2016 { 0x11, 0x90a3014e },
2017 { 0x1f, 0x01451160 },
2018 { 0x20, 0x98560170 },
2023 { 0x0a, 0x0221403f },
2024 { 0x0b, 0x0221101f },
2025 { 0x0c, 0x02a19020 },
2026 { 0x0d, 0x90170110 },
2027 { 0x0e, 0x40f000f0 },
2028 { 0x0f, 0x40f000f0 },
2029 { 0x10, 0x40f000f0 },
2030 { 0x11, 0x90a60160 },
2031 { 0x1f, 0x40f000f0 },
2032 { 0x20, 0x40f000f0 },
2037 { 0x0a, 0x02a11020 },
2038 { 0x0b, 0x0221101f },
2039 { 0x0c, 0x400000f0 },
2040 { 0x0d, 0x90170110 },
2041 { 0x0e, 0x400000f1 },
2042 { 0x0f, 0x400000f2 },
2043 { 0x10, 0x400000f3 },
2044 { 0x11, 0x90a60160 },
2045 { 0x1f, 0x400000f4 },
2046 { 0x20, 0x400000f5 },
2051 { 0x0a, 0x03a12050 },
2052 { 0x0b, 0x0321201f },
2053 { 0x0c, 0x40f000f0 },
2054 { 0x0d, 0x90170110 },
2055 { 0x0e, 0x40f000f0 },
2056 { 0x0f, 0x40f000f0 },
2057 { 0x10, 0x90170110 },
2058 { 0x11, 0xd5a30140 },
2059 { 0x1f, 0x40f000f0 },
2060 { 0x20, 0x40f000f0 },
2065 { 0x0a, 0x01813050 },
2066 { 0x0b, 0x0421201f },
2067 { 0x0c, 0x04a1205e },
2068 { 0x0d, 0x96130310 },
2069 { 0x0e, 0x96130310 },
2070 { 0x0f, 0x0101401f },
2071 { 0x10, 0x1111611f },
2072 { 0x11, 0xd5a30130 },
2077 { 0x0a, 0x40f000f0 },
2078 { 0x0b, 0x0221101f },
2079 { 0x0c, 0x02a11020 },
2080 { 0x0d, 0x92170110 },
2081 { 0x0e, 0x40f000f0 },
2082 { 0x0f, 0x92170110 },
2083 { 0x10, 0x40f000f0 },
2084 { 0x11, 0xd5a30130 },
2085 { 0x1f, 0x40f000f0 },
2086 { 0x20, 0x40f000f0 },
2090 static void stac92hd83xxx_fixup_hp(struct hda_codec *codec, in stac92hd83xxx_fixup_hp() argument
2093 struct sigmatel_spec *spec = codec->spec; in stac92hd83xxx_fixup_hp()
2098 if (hp_bnb2011_with_dock(codec)) { in stac92hd83xxx_fixup_hp()
2099 snd_hda_codec_set_pincfg(codec, 0xa, 0x2101201f); in stac92hd83xxx_fixup_hp()
2100 snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e); in stac92hd83xxx_fixup_hp()
2103 if (find_mute_led_cfg(codec, spec->default_polarity)) in stac92hd83xxx_fixup_hp()
2104 codec_dbg(codec, "mute LED gpio %d polarity %d\n", in stac92hd83xxx_fixup_hp()
2105 spec->gpio_led, in stac92hd83xxx_fixup_hp()
2106 spec->gpio_led_polarity); in stac92hd83xxx_fixup_hp()
2108 /* allow auto-switching of dock line-in */ in stac92hd83xxx_fixup_hp()
2109 spec->gen.line_in_auto_switch = true; in stac92hd83xxx_fixup_hp()
2112 static void stac92hd83xxx_fixup_hp_zephyr(struct hda_codec *codec, in stac92hd83xxx_fixup_hp_zephyr() argument
2118 snd_hda_apply_pincfgs(codec, hp_zephyr_pin_configs); in stac92hd83xxx_fixup_hp_zephyr()
2119 snd_hda_add_verbs(codec, stac92hd83xxx_hp_zephyr_init); in stac92hd83xxx_fixup_hp_zephyr()
2122 static void stac92hd83xxx_fixup_hp_led(struct hda_codec *codec, in stac92hd83xxx_fixup_hp_led() argument
2125 struct sigmatel_spec *spec = codec->spec; in stac92hd83xxx_fixup_hp_led()
2128 spec->default_polarity = 0; in stac92hd83xxx_fixup_hp_led()
2131 static void stac92hd83xxx_fixup_hp_inv_led(struct hda_codec *codec, in stac92hd83xxx_fixup_hp_inv_led() argument
2134 struct sigmatel_spec *spec = codec->spec; in stac92hd83xxx_fixup_hp_inv_led()
2137 spec->default_polarity = 1; in stac92hd83xxx_fixup_hp_inv_led()
2140 static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec, in stac92hd83xxx_fixup_hp_mic_led() argument
2143 struct sigmatel_spec *spec = codec->spec; in stac92hd83xxx_fixup_hp_mic_led()
2146 spec->mic_mute_led_gpio = 0x08; /* GPIO3 */ in stac92hd83xxx_fixup_hp_mic_led()
2149 codec->core.power_caps &= ~AC_PWRST_CLKSTOP; in stac92hd83xxx_fixup_hp_mic_led()
2154 static void stac92hd83xxx_fixup_hp_led_gpio10(struct hda_codec *codec, in stac92hd83xxx_fixup_hp_led_gpio10() argument
2157 struct sigmatel_spec *spec = codec->spec; in stac92hd83xxx_fixup_hp_led_gpio10()
2160 spec->gpio_led = 0x10; /* GPIO4 */ in stac92hd83xxx_fixup_hp_led_gpio10()
2161 spec->default_polarity = 0; in stac92hd83xxx_fixup_hp_led_gpio10()
2165 static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec, in stac92hd83xxx_fixup_headset_jack() argument
2168 struct sigmatel_spec *spec = codec->spec; in stac92hd83xxx_fixup_headset_jack()
2171 spec->headset_jack = 1; in stac92hd83xxx_fixup_headset_jack()
2174 static void stac92hd83xxx_fixup_gpio10_eapd(struct hda_codec *codec, in stac92hd83xxx_fixup_gpio10_eapd() argument
2178 struct sigmatel_spec *spec = codec->spec; in stac92hd83xxx_fixup_gpio10_eapd()
2182 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = in stac92hd83xxx_fixup_gpio10_eapd()
2183 spec->gpio_data = 0x10; in stac92hd83xxx_fixup_gpio10_eapd()
2184 spec->eapd_switch = 0; in stac92hd83xxx_fixup_gpio10_eapd()
2187 static void hp_envy_ts_fixup_dac_bind(struct hda_codec *codec, in hp_envy_ts_fixup_dac_bind() argument
2191 struct sigmatel_spec *spec = codec->spec; in hp_envy_ts_fixup_dac_bind()
2193 0xd, 0x13, in hp_envy_ts_fixup_dac_bind()
2194 0 in hp_envy_ts_fixup_dac_bind()
2200 spec->gen.preferred_dacs = preferred_pairs; in hp_envy_ts_fixup_dac_bind()
2205 { 0x22, 0x7A6, 0x3E },
2206 { 0x22, 0x7A7, 0x68 },
2207 { 0x22, 0x7A8, 0x17 },
2208 { 0x22, 0x7A9, 0x3E },
2209 { 0x22, 0x7AA, 0x68 },
2210 { 0x22, 0x7AB, 0x17 },
2211 { 0x22, 0x7AC, 0x00 },
2212 { 0x22, 0x7AD, 0x80 },
2213 { 0x22, 0x7A6, 0x83 },
2214 { 0x22, 0x7A7, 0x2F },
2215 { 0x22, 0x7A8, 0xD1 },
2216 { 0x22, 0x7A9, 0x83 },
2217 { 0x22, 0x7AA, 0x2F },
2218 { 0x22, 0x7AB, 0xD1 },
2219 { 0x22, 0x7AC, 0x01 },
2220 { 0x22, 0x7AD, 0x80 },
2221 { 0x22, 0x7A6, 0x3E },
2222 { 0x22, 0x7A7, 0x68 },
2223 { 0x22, 0x7A8, 0x17 },
2224 { 0x22, 0x7A9, 0x3E },
2225 { 0x22, 0x7AA, 0x68 },
2226 { 0x22, 0x7AB, 0x17 },
2227 { 0x22, 0x7AC, 0x02 },
2228 { 0x22, 0x7AD, 0x80 },
2229 { 0x22, 0x7A6, 0x7C },
2230 { 0x22, 0x7A7, 0xC6 },
2231 { 0x22, 0x7A8, 0x0C },
2232 { 0x22, 0x7A9, 0x7C },
2233 { 0x22, 0x7AA, 0xC6 },
2234 { 0x22, 0x7AB, 0x0C },
2235 { 0x22, 0x7AC, 0x03 },
2236 { 0x22, 0x7AD, 0x80 },
2237 { 0x22, 0x7A6, 0xC3 },
2238 { 0x22, 0x7A7, 0x25 },
2239 { 0x22, 0x7A8, 0xAF },
2240 { 0x22, 0x7A9, 0xC3 },
2241 { 0x22, 0x7AA, 0x25 },
2242 { 0x22, 0x7AB, 0xAF },
2243 { 0x22, 0x7AC, 0x04 },
2244 { 0x22, 0x7AD, 0x80 },
2245 { 0x22, 0x7A6, 0x3E },
2246 { 0x22, 0x7A7, 0x85 },
2247 { 0x22, 0x7A8, 0x73 },
2248 { 0x22, 0x7A9, 0x3E },
2249 { 0x22, 0x7AA, 0x85 },
2250 { 0x22, 0x7AB, 0x73 },
2251 { 0x22, 0x7AC, 0x05 },
2252 { 0x22, 0x7AD, 0x80 },
2253 { 0x22, 0x7A6, 0x85 },
2254 { 0x22, 0x7A7, 0x39 },
2255 { 0x22, 0x7A8, 0xC7 },
2256 { 0x22, 0x7A9, 0x85 },
2257 { 0x22, 0x7AA, 0x39 },
2258 { 0x22, 0x7AB, 0xC7 },
2259 { 0x22, 0x7AC, 0x06 },
2260 { 0x22, 0x7AD, 0x80 },
2261 { 0x22, 0x7A6, 0x3C },
2262 { 0x22, 0x7A7, 0x90 },
2263 { 0x22, 0x7A8, 0xB0 },
2264 { 0x22, 0x7A9, 0x3C },
2265 { 0x22, 0x7AA, 0x90 },
2266 { 0x22, 0x7AB, 0xB0 },
2267 { 0x22, 0x7AC, 0x07 },
2268 { 0x22, 0x7AD, 0x80 },
2269 { 0x22, 0x7A6, 0x7A },
2270 { 0x22, 0x7A7, 0xC6 },
2271 { 0x22, 0x7A8, 0x39 },
2272 { 0x22, 0x7A9, 0x7A },
2273 { 0x22, 0x7AA, 0xC6 },
2274 { 0x22, 0x7AB, 0x39 },
2275 { 0x22, 0x7AC, 0x08 },
2276 { 0x22, 0x7AD, 0x80 },
2277 { 0x22, 0x7A6, 0xC4 },
2278 { 0x22, 0x7A7, 0xE9 },
2279 { 0x22, 0x7A8, 0xDC },
2280 { 0x22, 0x7A9, 0xC4 },
2281 { 0x22, 0x7AA, 0xE9 },
2282 { 0x22, 0x7AB, 0xDC },
2283 { 0x22, 0x7AC, 0x09 },
2284 { 0x22, 0x7AD, 0x80 },
2285 { 0x22, 0x7A6, 0x3D },
2286 { 0x22, 0x7A7, 0xE1 },
2287 { 0x22, 0x7A8, 0x0D },
2288 { 0x22, 0x7A9, 0x3D },
2289 { 0x22, 0x7AA, 0xE1 },
2290 { 0x22, 0x7AB, 0x0D },
2291 { 0x22, 0x7AC, 0x0A },
2292 { 0x22, 0x7AD, 0x80 },
2293 { 0x22, 0x7A6, 0x89 },
2294 { 0x22, 0x7A7, 0xB6 },
2295 { 0x22, 0x7A8, 0xEB },
2296 { 0x22, 0x7A9, 0x89 },
2297 { 0x22, 0x7AA, 0xB6 },
2298 { 0x22, 0x7AB, 0xEB },
2299 { 0x22, 0x7AC, 0x0B },
2300 { 0x22, 0x7AD, 0x80 },
2301 { 0x22, 0x7A6, 0x39 },
2302 { 0x22, 0x7A7, 0x9D },
2303 { 0x22, 0x7A8, 0xFE },
2304 { 0x22, 0x7A9, 0x39 },
2305 { 0x22, 0x7AA, 0x9D },
2306 { 0x22, 0x7AB, 0xFE },
2307 { 0x22, 0x7AC, 0x0C },
2308 { 0x22, 0x7AD, 0x80 },
2309 { 0x22, 0x7A6, 0x76 },
2310 { 0x22, 0x7A7, 0x49 },
2311 { 0x22, 0x7A8, 0x15 },
2312 { 0x22, 0x7A9, 0x76 },
2313 { 0x22, 0x7AA, 0x49 },
2314 { 0x22, 0x7AB, 0x15 },
2315 { 0x22, 0x7AC, 0x0D },
2316 { 0x22, 0x7AD, 0x80 },
2317 { 0x22, 0x7A6, 0xC8 },
2318 { 0x22, 0x7A7, 0x80 },
2319 { 0x22, 0x7A8, 0xF5 },
2320 { 0x22, 0x7A9, 0xC8 },
2321 { 0x22, 0x7AA, 0x80 },
2322 { 0x22, 0x7AB, 0xF5 },
2323 { 0x22, 0x7AC, 0x0E },
2324 { 0x22, 0x7AD, 0x80 },
2325 { 0x22, 0x7A6, 0x40 },
2326 { 0x22, 0x7A7, 0x00 },
2327 { 0x22, 0x7A8, 0x00 },
2328 { 0x22, 0x7A9, 0x40 },
2329 { 0x22, 0x7AA, 0x00 },
2330 { 0x22, 0x7AB, 0x00 },
2331 { 0x22, 0x7AC, 0x0F },
2332 { 0x22, 0x7AD, 0x80 },
2333 { 0x22, 0x7A6, 0x90 },
2334 { 0x22, 0x7A7, 0x68 },
2335 { 0x22, 0x7A8, 0xF1 },
2336 { 0x22, 0x7A9, 0x90 },
2337 { 0x22, 0x7AA, 0x68 },
2338 { 0x22, 0x7AB, 0xF1 },
2339 { 0x22, 0x7AC, 0x10 },
2340 { 0x22, 0x7AD, 0x80 },
2341 { 0x22, 0x7A6, 0x34 },
2342 { 0x22, 0x7A7, 0x47 },
2343 { 0x22, 0x7A8, 0x6C },
2344 { 0x22, 0x7A9, 0x34 },
2345 { 0x22, 0x7AA, 0x47 },
2346 { 0x22, 0x7AB, 0x6C },
2347 { 0x22, 0x7AC, 0x11 },
2348 { 0x22, 0x7AD, 0x80 },
2349 { 0x22, 0x7A6, 0x6F },
2350 { 0x22, 0x7A7, 0x97 },
2351 { 0x22, 0x7A8, 0x0F },
2352 { 0x22, 0x7A9, 0x6F },
2353 { 0x22, 0x7AA, 0x97 },
2354 { 0x22, 0x7AB, 0x0F },
2355 { 0x22, 0x7AC, 0x12 },
2356 { 0x22, 0x7AD, 0x80 },
2357 { 0x22, 0x7A6, 0xCB },
2358 { 0x22, 0x7A7, 0xB8 },
2359 { 0x22, 0x7A8, 0x94 },
2360 { 0x22, 0x7A9, 0xCB },
2361 { 0x22, 0x7AA, 0xB8 },
2362 { 0x22, 0x7AB, 0x94 },
2363 { 0x22, 0x7AC, 0x13 },
2364 { 0x22, 0x7AD, 0x80 },
2365 { 0x22, 0x7A6, 0x40 },
2366 { 0x22, 0x7A7, 0x00 },
2367 { 0x22, 0x7A8, 0x00 },
2368 { 0x22, 0x7A9, 0x40 },
2369 { 0x22, 0x7AA, 0x00 },
2370 { 0x22, 0x7AB, 0x00 },
2371 { 0x22, 0x7AC, 0x14 },
2372 { 0x22, 0x7AD, 0x80 },
2373 { 0x22, 0x7A6, 0x95 },
2374 { 0x22, 0x7A7, 0x76 },
2375 { 0x22, 0x7A8, 0x5B },
2376 { 0x22, 0x7A9, 0x95 },
2377 { 0x22, 0x7AA, 0x76 },
2378 { 0x22, 0x7AB, 0x5B },
2379 { 0x22, 0x7AC, 0x15 },
2380 { 0x22, 0x7AD, 0x80 },
2381 { 0x22, 0x7A6, 0x31 },
2382 { 0x22, 0x7A7, 0xAC },
2383 { 0x22, 0x7A8, 0x31 },
2384 { 0x22, 0x7A9, 0x31 },
2385 { 0x22, 0x7AA, 0xAC },
2386 { 0x22, 0x7AB, 0x31 },
2387 { 0x22, 0x7AC, 0x16 },
2388 { 0x22, 0x7AD, 0x80 },
2389 { 0x22, 0x7A6, 0x6A },
2390 { 0x22, 0x7A7, 0x89 },
2391 { 0x22, 0x7A8, 0xA5 },
2392 { 0x22, 0x7A9, 0x6A },
2393 { 0x22, 0x7AA, 0x89 },
2394 { 0x22, 0x7AB, 0xA5 },
2395 { 0x22, 0x7AC, 0x17 },
2396 { 0x22, 0x7AD, 0x80 },
2397 { 0x22, 0x7A6, 0xCE },
2398 { 0x22, 0x7A7, 0x53 },
2399 { 0x22, 0x7A8, 0xCF },
2400 { 0x22, 0x7A9, 0xCE },
2401 { 0x22, 0x7AA, 0x53 },
2402 { 0x22, 0x7AB, 0xCF },
2403 { 0x22, 0x7AC, 0x18 },
2404 { 0x22, 0x7AD, 0x80 },
2405 { 0x22, 0x7A6, 0x40 },
2406 { 0x22, 0x7A7, 0x00 },
2407 { 0x22, 0x7A8, 0x00 },
2408 { 0x22, 0x7A9, 0x40 },
2409 { 0x22, 0x7AA, 0x00 },
2410 { 0x22, 0x7AB, 0x00 },
2411 { 0x22, 0x7AC, 0x19 },
2412 { 0x22, 0x7AD, 0x80 },
2414 { 0x22, 0x7A6, 0x3E },
2415 { 0x22, 0x7A7, 0x88 },
2416 { 0x22, 0x7A8, 0xDC },
2417 { 0x22, 0x7A9, 0x3E },
2418 { 0x22, 0x7AA, 0x88 },
2419 { 0x22, 0x7AB, 0xDC },
2420 { 0x22, 0x7AC, 0x1A },
2421 { 0x22, 0x7AD, 0x80 },
2422 { 0x22, 0x7A6, 0x82 },
2423 { 0x22, 0x7A7, 0xEE },
2424 { 0x22, 0x7A8, 0x46 },
2425 { 0x22, 0x7A9, 0x82 },
2426 { 0x22, 0x7AA, 0xEE },
2427 { 0x22, 0x7AB, 0x46 },
2428 { 0x22, 0x7AC, 0x1B },
2429 { 0x22, 0x7AD, 0x80 },
2430 { 0x22, 0x7A6, 0x3E },
2431 { 0x22, 0x7A7, 0x88 },
2432 { 0x22, 0x7A8, 0xDC },
2433 { 0x22, 0x7A9, 0x3E },
2434 { 0x22, 0x7AA, 0x88 },
2435 { 0x22, 0x7AB, 0xDC },
2436 { 0x22, 0x7AC, 0x1C },
2437 { 0x22, 0x7AD, 0x80 },
2438 { 0x22, 0x7A6, 0x7D },
2439 { 0x22, 0x7A7, 0x09 },
2440 { 0x22, 0x7A8, 0x28 },
2441 { 0x22, 0x7A9, 0x7D },
2442 { 0x22, 0x7AA, 0x09 },
2443 { 0x22, 0x7AB, 0x28 },
2444 { 0x22, 0x7AC, 0x1D },
2445 { 0x22, 0x7AD, 0x80 },
2446 { 0x22, 0x7A6, 0xC2 },
2447 { 0x22, 0x7A7, 0xE5 },
2448 { 0x22, 0x7A8, 0xB4 },
2449 { 0x22, 0x7A9, 0xC2 },
2450 { 0x22, 0x7AA, 0xE5 },
2451 { 0x22, 0x7AB, 0xB4 },
2452 { 0x22, 0x7AC, 0x1E },
2453 { 0x22, 0x7AD, 0x80 },
2454 { 0x22, 0x7A6, 0x3E },
2455 { 0x22, 0x7A7, 0xA3 },
2456 { 0x22, 0x7A8, 0x1F },
2457 { 0x22, 0x7A9, 0x3E },
2458 { 0x22, 0x7AA, 0xA3 },
2459 { 0x22, 0x7AB, 0x1F },
2460 { 0x22, 0x7AC, 0x1F },
2461 { 0x22, 0x7AD, 0x80 },
2462 { 0x22, 0x7A6, 0x84 },
2463 { 0x22, 0x7A7, 0xCA },
2464 { 0x22, 0x7A8, 0xF1 },
2465 { 0x22, 0x7A9, 0x84 },
2466 { 0x22, 0x7AA, 0xCA },
2467 { 0x22, 0x7AB, 0xF1 },
2468 { 0x22, 0x7AC, 0x20 },
2469 { 0x22, 0x7AD, 0x80 },
2470 { 0x22, 0x7A6, 0x3C },
2471 { 0x22, 0x7A7, 0xD5 },
2472 { 0x22, 0x7A8, 0x9C },
2473 { 0x22, 0x7A9, 0x3C },
2474 { 0x22, 0x7AA, 0xD5 },
2475 { 0x22, 0x7AB, 0x9C },
2476 { 0x22, 0x7AC, 0x21 },
2477 { 0x22, 0x7AD, 0x80 },
2478 { 0x22, 0x7A6, 0x7B },
2479 { 0x22, 0x7A7, 0x35 },
2480 { 0x22, 0x7A8, 0x0F },
2481 { 0x22, 0x7A9, 0x7B },
2482 { 0x22, 0x7AA, 0x35 },
2483 { 0x22, 0x7AB, 0x0F },
2484 { 0x22, 0x7AC, 0x22 },
2485 { 0x22, 0x7AD, 0x80 },
2486 { 0x22, 0x7A6, 0xC4 },
2487 { 0x22, 0x7A7, 0x87 },
2488 { 0x22, 0x7A8, 0x45 },
2489 { 0x22, 0x7A9, 0xC4 },
2490 { 0x22, 0x7AA, 0x87 },
2491 { 0x22, 0x7AB, 0x45 },
2492 { 0x22, 0x7AC, 0x23 },
2493 { 0x22, 0x7AD, 0x80 },
2494 { 0x22, 0x7A6, 0x3E },
2495 { 0x22, 0x7A7, 0x0A },
2496 { 0x22, 0x7A8, 0x78 },
2497 { 0x22, 0x7A9, 0x3E },
2498 { 0x22, 0x7AA, 0x0A },
2499 { 0x22, 0x7AB, 0x78 },
2500 { 0x22, 0x7AC, 0x24 },
2501 { 0x22, 0x7AD, 0x80 },
2502 { 0x22, 0x7A6, 0x88 },
2503 { 0x22, 0x7A7, 0xE2 },
2504 { 0x22, 0x7A8, 0x05 },
2505 { 0x22, 0x7A9, 0x88 },
2506 { 0x22, 0x7AA, 0xE2 },
2507 { 0x22, 0x7AB, 0x05 },
2508 { 0x22, 0x7AC, 0x25 },
2509 { 0x22, 0x7AD, 0x80 },
2510 { 0x22, 0x7A6, 0x3A },
2511 { 0x22, 0x7A7, 0x1A },
2512 { 0x22, 0x7A8, 0xA3 },
2513 { 0x22, 0x7A9, 0x3A },
2514 { 0x22, 0x7AA, 0x1A },
2515 { 0x22, 0x7AB, 0xA3 },
2516 { 0x22, 0x7AC, 0x26 },
2517 { 0x22, 0x7AD, 0x80 },
2518 { 0x22, 0x7A6, 0x77 },
2519 { 0x22, 0x7A7, 0x1D },
2520 { 0x22, 0x7A8, 0xFB },
2521 { 0x22, 0x7A9, 0x77 },
2522 { 0x22, 0x7AA, 0x1D },
2523 { 0x22, 0x7AB, 0xFB },
2524 { 0x22, 0x7AC, 0x27 },
2525 { 0x22, 0x7AD, 0x80 },
2526 { 0x22, 0x7A6, 0xC7 },
2527 { 0x22, 0x7A7, 0xDA },
2528 { 0x22, 0x7A8, 0xE5 },
2529 { 0x22, 0x7A9, 0xC7 },
2530 { 0x22, 0x7AA, 0xDA },
2531 { 0x22, 0x7AB, 0xE5 },
2532 { 0x22, 0x7AC, 0x28 },
2533 { 0x22, 0x7AD, 0x80 },
2534 { 0x22, 0x7A6, 0x40 },
2535 { 0x22, 0x7A7, 0x00 },
2536 { 0x22, 0x7A8, 0x00 },
2537 { 0x22, 0x7A9, 0x40 },
2538 { 0x22, 0x7AA, 0x00 },
2539 { 0x22, 0x7AB, 0x00 },
2540 { 0x22, 0x7AC, 0x29 },
2541 { 0x22, 0x7AD, 0x80 },
2542 { 0x22, 0x7A6, 0x8E },
2543 { 0x22, 0x7A7, 0xD7 },
2544 { 0x22, 0x7A8, 0x22 },
2545 { 0x22, 0x7A9, 0x8E },
2546 { 0x22, 0x7AA, 0xD7 },
2547 { 0x22, 0x7AB, 0x22 },
2548 { 0x22, 0x7AC, 0x2A },
2549 { 0x22, 0x7AD, 0x80 },
2550 { 0x22, 0x7A6, 0x35 },
2551 { 0x22, 0x7A7, 0x26 },
2552 { 0x22, 0x7A8, 0xC6 },
2553 { 0x22, 0x7A9, 0x35 },
2554 { 0x22, 0x7AA, 0x26 },
2555 { 0x22, 0x7AB, 0xC6 },
2556 { 0x22, 0x7AC, 0x2B },
2557 { 0x22, 0x7AD, 0x80 },
2558 { 0x22, 0x7A6, 0x71 },
2559 { 0x22, 0x7A7, 0x28 },
2560 { 0x22, 0x7A8, 0xDE },
2561 { 0x22, 0x7A9, 0x71 },
2562 { 0x22, 0x7AA, 0x28 },
2563 { 0x22, 0x7AB, 0xDE },
2564 { 0x22, 0x7AC, 0x2C },
2565 { 0x22, 0x7AD, 0x80 },
2566 { 0x22, 0x7A6, 0xCA },
2567 { 0x22, 0x7A7, 0xD9 },
2568 { 0x22, 0x7A8, 0x3A },
2569 { 0x22, 0x7A9, 0xCA },
2570 { 0x22, 0x7AA, 0xD9 },
2571 { 0x22, 0x7AB, 0x3A },
2572 { 0x22, 0x7AC, 0x2D },
2573 { 0x22, 0x7AD, 0x80 },
2574 { 0x22, 0x7A6, 0x40 },
2575 { 0x22, 0x7A7, 0x00 },
2576 { 0x22, 0x7A8, 0x00 },
2577 { 0x22, 0x7A9, 0x40 },
2578 { 0x22, 0x7AA, 0x00 },
2579 { 0x22, 0x7AB, 0x00 },
2580 { 0x22, 0x7AC, 0x2E },
2581 { 0x22, 0x7AD, 0x80 },
2582 { 0x22, 0x7A6, 0x93 },
2583 { 0x22, 0x7A7, 0x5E },
2584 { 0x22, 0x7A8, 0xD8 },
2585 { 0x22, 0x7A9, 0x93 },
2586 { 0x22, 0x7AA, 0x5E },
2587 { 0x22, 0x7AB, 0xD8 },
2588 { 0x22, 0x7AC, 0x2F },
2589 { 0x22, 0x7AD, 0x80 },
2590 { 0x22, 0x7A6, 0x32 },
2591 { 0x22, 0x7A7, 0xB7 },
2592 { 0x22, 0x7A8, 0xB1 },
2593 { 0x22, 0x7A9, 0x32 },
2594 { 0x22, 0x7AA, 0xB7 },
2595 { 0x22, 0x7AB, 0xB1 },
2596 { 0x22, 0x7AC, 0x30 },
2597 { 0x22, 0x7AD, 0x80 },
2598 { 0x22, 0x7A6, 0x6C },
2599 { 0x22, 0x7A7, 0xA1 },
2600 { 0x22, 0x7A8, 0x28 },
2601 { 0x22, 0x7A9, 0x6C },
2602 { 0x22, 0x7AA, 0xA1 },
2603 { 0x22, 0x7AB, 0x28 },
2604 { 0x22, 0x7AC, 0x31 },
2605 { 0x22, 0x7AD, 0x80 },
2606 { 0x22, 0x7A6, 0xCD },
2607 { 0x22, 0x7A7, 0x48 },
2608 { 0x22, 0x7A8, 0x4F },
2609 { 0x22, 0x7A9, 0xCD },
2610 { 0x22, 0x7AA, 0x48 },
2611 { 0x22, 0x7AB, 0x4F },
2612 { 0x22, 0x7AC, 0x32 },
2613 { 0x22, 0x7AD, 0x80 },
2614 { 0x22, 0x7A6, 0x40 },
2615 { 0x22, 0x7A7, 0x00 },
2616 { 0x22, 0x7A8, 0x00 },
2617 { 0x22, 0x7A9, 0x40 },
2618 { 0x22, 0x7AA, 0x00 },
2619 { 0x22, 0x7AB, 0x00 },
2620 { 0x22, 0x7AC, 0x33 },
2621 { 0x22, 0x7AD, 0x80 },
2623 { 0x22, 0x782, 0xC1 },
2624 { 0x22, 0x771, 0x2C },
2625 { 0x22, 0x772, 0x2C },
2626 { 0x22, 0x788, 0x04 },
2627 { 0x01, 0x7B0, 0x08 },
2701 { 0x0f, 0x90170111 },
2714 { 0x10, 0x92170111 },
2732 { .id = STAC_92HD83XXX_PWR_REF, .name = "mic-ref" },
2733 { .id = STAC_DELL_S14, .name = "dell-s14" },
2734 { .id = STAC_DELL_VOSTRO_3500, .name = "dell-vostro-3500" },
2736 { .id = STAC_HP_DV7_4000, .name = "hp-dv7-4000" },
2737 { .id = STAC_HP_ZEPHYR, .name = "hp-zephyr" },
2738 { .id = STAC_92HD83XXX_HP_LED, .name = "hp-led" },
2739 { .id = STAC_92HD83XXX_HP_INV_LED, .name = "hp-inv-led" },
2740 { .id = STAC_92HD83XXX_HP_MIC_LED, .name = "hp-mic-led" },
2741 { .id = STAC_92HD83XXX_HEADSET_JACK, .name = "headset-jack" },
2742 { .id = STAC_HP_ENVY_BASS, .name = "hp-envy-bass" },
2743 { .id = STAC_HP_BNB13_EQ, .name = "hp-bnb13-eq" },
2744 { .id = STAC_HP_ENVY_TS_BASS, .name = "hp-envy-ts-bass" },
2750 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
2752 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
2754 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba,
2756 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0532,
2758 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0533,
2760 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0534,
2762 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0535,
2764 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x053c,
2766 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x053d,
2768 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0549,
2770 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x057d,
2772 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0584,
2774 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x1028,
2776 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656,
2778 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1657,
2780 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1658,
2782 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1659,
2784 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x165A,
2786 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x165B,
2788 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888,
2790 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1899,
2792 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df,
2794 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18F8,
2796 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1909,
2798 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190A,
2800 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190e,
2802 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1967,
2804 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1940,
2806 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1941,
2808 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1942,
2810 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1943,
2812 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1944,
2814 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1945,
2816 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1946,
2818 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1948,
2820 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1949,
2822 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194A,
2824 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194B,
2826 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194C,
2828 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194E,
2830 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194F,
2832 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1950,
2834 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1951,
2836 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x195A,
2838 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x195B,
2840 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x195C,
2842 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1991,
2844 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2103,
2846 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2104,
2848 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2105,
2850 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2106,
2852 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2107,
2854 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2108,
2856 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2109,
2858 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x210A,
2860 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x210B,
2862 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211C,
2864 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211D,
2866 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211E,
2868 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211F,
2870 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2120,
2872 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2121,
2874 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2122,
2876 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2123,
2878 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x213E,
2880 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x213F,
2882 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2140,
2884 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B2,
2886 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B3,
2888 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B5,
2890 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B6,
2892 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x1900,
2894 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x2000,
2896 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x2100,
2898 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3388,
2900 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3389,
2902 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x355B,
2904 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x355C,
2906 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x355D,
2908 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x355E,
2910 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x355F,
2912 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3560,
2914 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x358B,
2916 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x358C,
2918 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x358D,
2920 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3591,
2922 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3592,
2924 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3593,
2926 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3561,
2928 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3660,
2930 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x144E,
2932 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x148a,
2935 /* match both for 0xfa91 and 0xfa93 */
2936 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_TOSHIBA, 0xfffd, 0xfa91,
2941 /* HP dv7 bass switch - GPIO5 */
2946 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_hp_bass_gpio_get() local
2947 struct sigmatel_spec *spec = codec->spec; in stac_hp_bass_gpio_get()
2948 ucontrol->value.integer.value[0] = !!(spec->gpio_data & 0x20); in stac_hp_bass_gpio_get()
2949 return 0; in stac_hp_bass_gpio_get()
2955 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac_hp_bass_gpio_put() local
2956 struct sigmatel_spec *spec = codec->spec; in stac_hp_bass_gpio_put()
2959 gpio_data = (spec->gpio_data & ~0x20) | in stac_hp_bass_gpio_put()
2960 (ucontrol->value.integer.value[0] ? 0x20 : 0); in stac_hp_bass_gpio_put()
2961 if (gpio_data == spec->gpio_data) in stac_hp_bass_gpio_put()
2962 return 0; in stac_hp_bass_gpio_put()
2963 spec->gpio_data = gpio_data; in stac_hp_bass_gpio_put()
2964 stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); in stac_hp_bass_gpio_put()
2975 static int stac_add_hp_bass_switch(struct hda_codec *codec) in stac_add_hp_bass_switch() argument
2977 struct sigmatel_spec *spec = codec->spec; in stac_add_hp_bass_switch()
2979 if (!snd_hda_gen_add_kctl(&spec->gen, "Bass Speaker Playback Switch", in stac_add_hp_bass_switch()
2981 return -ENOMEM; in stac_add_hp_bass_switch()
2983 spec->gpio_mask |= 0x20; in stac_add_hp_bass_switch()
2984 spec->gpio_dir |= 0x20; in stac_add_hp_bass_switch()
2985 spec->gpio_data |= 0x20; in stac_add_hp_bass_switch()
2986 return 0; in stac_add_hp_bass_switch()
2990 { 0x0a, 0x02214030 },
2991 { 0x0b, 0x02a19040 },
2992 { 0x0c, 0x01a19020 },
2993 { 0x0d, 0x01014010 },
2994 { 0x0e, 0x0181302e },
2995 { 0x0f, 0x01014010 },
2996 { 0x14, 0x01019020 },
2997 { 0x18, 0x90a000f0 },
2998 { 0x19, 0x90a000f0 },
2999 { 0x1e, 0x01452050 },
3000 { 0x1f, 0x01452050 },
3005 { 0x0a, 0x0421101f },
3006 { 0x0b, 0x04a11221 },
3007 { 0x0c, 0x40f000f0 },
3008 { 0x0d, 0x90170110 },
3009 { 0x0e, 0x23a1902e },
3010 { 0x0f, 0x23014250 },
3011 { 0x14, 0x40f000f0 },
3012 { 0x18, 0x90a000f0 },
3013 { 0x19, 0x40f000f0 },
3014 { 0x1e, 0x4f0000f0 },
3015 { 0x1f, 0x4f0000f0 },
3020 { 0x0a, 0x0421101f },
3021 { 0x0b, 0x04a11221 },
3022 { 0x0c, 0x90a70330 },
3023 { 0x0d, 0x90170110 },
3024 { 0x0e, 0x23a1902e },
3025 { 0x0f, 0x23014250 },
3026 { 0x14, 0x40f000f0 },
3027 { 0x18, 0x40f000f0 },
3028 { 0x19, 0x40f000f0 },
3029 { 0x1e, 0x044413b0 },
3030 { 0x1f, 0x044413b0 },
3035 { 0x0a, 0x0421101f },
3036 { 0x0b, 0x04a11221 },
3037 { 0x0c, 0x90a70330 },
3038 { 0x0d, 0x90170110 },
3039 { 0x0e, 0x40f000f0 },
3040 { 0x0f, 0x40f000f0 },
3041 { 0x14, 0x40f000f0 },
3042 { 0x18, 0x90a000f0 },
3043 { 0x19, 0x40f000f0 },
3044 { 0x1e, 0x044413b0 },
3045 { 0x1f, 0x044413b0 },
3049 static void stac92hd71bxx_fixup_ref(struct hda_codec *codec, in stac92hd71bxx_fixup_ref() argument
3052 struct sigmatel_spec *spec = codec->spec; in stac92hd71bxx_fixup_ref()
3057 snd_hda_apply_pincfgs(codec, ref92hd71bxx_pin_configs); in stac92hd71bxx_fixup_ref()
3058 spec->gpio_mask = spec->gpio_dir = spec->gpio_data = 0; in stac92hd71bxx_fixup_ref()
3061 static void stac92hd71bxx_fixup_hp_m4(struct hda_codec *codec, in stac92hd71bxx_fixup_hp_m4() argument
3064 struct sigmatel_spec *spec = codec->spec; in stac92hd71bxx_fixup_hp_m4()
3071 snd_hda_codec_write_cache(codec, codec->core.afg, 0, in stac92hd71bxx_fixup_hp_m4()
3072 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x02); in stac92hd71bxx_fixup_hp_m4()
3073 jack = snd_hda_jack_detect_enable_callback(codec, codec->core.afg, in stac92hd71bxx_fixup_hp_m4()
3076 jack->private_data = 0x02; in stac92hd71bxx_fixup_hp_m4()
3078 spec->gpio_mask |= 0x02; in stac92hd71bxx_fixup_hp_m4()
3081 snd_hda_codec_set_pincfg(codec, 0x0e, 0x01813040); in stac92hd71bxx_fixup_hp_m4()
3084 static void stac92hd71bxx_fixup_hp_dv4(struct hda_codec *codec, in stac92hd71bxx_fixup_hp_dv4() argument
3087 struct sigmatel_spec *spec = codec->spec; in stac92hd71bxx_fixup_hp_dv4()
3091 spec->gpio_led = 0x01; in stac92hd71bxx_fixup_hp_dv4()
3094 static void stac92hd71bxx_fixup_hp_dv5(struct hda_codec *codec, in stac92hd71bxx_fixup_hp_dv5() argument
3101 snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); in stac92hd71bxx_fixup_hp_dv5()
3106 cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP); in stac92hd71bxx_fixup_hp_dv5()
3109 stac_add_hp_bass_switch(codec); in stac92hd71bxx_fixup_hp_dv5()
3114 static void stac92hd71bxx_fixup_hp_hdx(struct hda_codec *codec, in stac92hd71bxx_fixup_hp_hdx() argument
3117 struct sigmatel_spec *spec = codec->spec; in stac92hd71bxx_fixup_hp_hdx()
3121 spec->gpio_led = 0x08; in stac92hd71bxx_fixup_hp_hdx()
3124 static bool is_hp_output(struct hda_codec *codec, hda_nid_t pin) in is_hp_output() argument
3126 unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin); in is_hp_output()
3128 /* count line-out, too, as BIOS sets often so */ in is_hp_output()
3134 static void fixup_hp_headphone(struct hda_codec *codec, hda_nid_t pin) in fixup_hp_headphone() argument
3136 unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin); in fixup_hp_headphone()
3144 0x1f; in fixup_hp_headphone()
3145 snd_hda_codec_set_pincfg(codec, pin, pin_cfg); in fixup_hp_headphone()
3148 static void stac92hd71bxx_fixup_hp(struct hda_codec *codec, in stac92hd71bxx_fixup_hp() argument
3151 struct sigmatel_spec *spec = codec->spec; in stac92hd71bxx_fixup_hp()
3157 * dock and built-in headphones; fix both pin configs in stac92hd71bxx_fixup_hp()
3159 if (is_hp_output(codec, 0x0a) && is_hp_output(codec, 0x0f)) { in stac92hd71bxx_fixup_hp()
3160 fixup_hp_headphone(codec, 0x0a); in stac92hd71bxx_fixup_hp()
3161 fixup_hp_headphone(codec, 0x0f); in stac92hd71bxx_fixup_hp()
3164 if (find_mute_led_cfg(codec, 1)) in stac92hd71bxx_fixup_hp()
3165 codec_dbg(codec, "mute LED gpio %d polarity %d\n", in stac92hd71bxx_fixup_hp()
3166 spec->gpio_led, in stac92hd71bxx_fixup_hp()
3167 spec->gpio_led_polarity); in stac92hd71bxx_fixup_hp()
3220 { .id = STAC_DELL_M4_1, .name = "dell-m4-1" },
3221 { .id = STAC_DELL_M4_2, .name = "dell-m4-2" },
3222 { .id = STAC_DELL_M4_3, .name = "dell-m4-3" },
3223 { .id = STAC_HP_M4, .name = "hp-m4" },
3224 { .id = STAC_HP_DV4, .name = "hp-dv4" },
3225 { .id = STAC_HP_DV5, .name = "hp-dv5" },
3226 { .id = STAC_HP_HDX, .name = "hp-hdx" },
3227 { .id = STAC_HP_DV4, .name = "hp-dv4-1222nr" },
3233 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
3235 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
3237 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x1720,
3239 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080,
3241 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0,
3242 "HP dv4-7", STAC_HP_DV4),
3243 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3600,
3244 "HP dv4-7", STAC_HP_DV5),
3245 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3610,
3247 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a,
3249 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b,
3251 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620,
3253 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3061,
3254 "HP dv6", STAC_HP_DV5), /* HP dv6-1110ax */
3255 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x363e,
3257 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010,
3260 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
3262 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0234,
3264 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0250,
3266 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x024f,
3268 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x024d,
3270 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0251,
3272 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0277,
3274 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0263,
3276 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0265,
3278 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0262,
3280 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0264,
3282 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02aa,
3288 { 0x0a, 0x01014010 },
3289 { 0x0b, 0x01016011 },
3290 { 0x0c, 0x01012012 },
3291 { 0x0d, 0x0221401f },
3292 { 0x0e, 0x01813122 },
3293 { 0x0f, 0x01011014 },
3294 { 0x10, 0x01441030 },
3295 { 0x11, 0x01c41030 },
3296 { 0x15, 0x40000100 },
3297 { 0x1b, 0x40000100 },
3310 { 0x0a, 0x02214030 },
3311 { 0x0b, 0x01a19021 },
3312 { 0x0c, 0x01111012 },
3313 { 0x0d, 0x01114010 },
3314 { 0x0e, 0x02a19020 },
3315 { 0x0f, 0x01117011 },
3316 { 0x10, 0x400001f0 },
3317 { 0x11, 0x400001f1 },
3318 { 0x15, 0x01813122 },
3319 { 0x1b, 0x400001f2 },
3329 { 0x0a, 0x02214030 },
3330 { 0x0b, 0x01a19021 },
3331 { 0x0c, 0x01111012 },
3332 { 0x0d, 0x01114010 },
3333 { 0x0e, 0x02a19020 },
3334 { 0x0f, 0x01117011 },
3335 { 0x10, 0x01451140 },
3336 { 0x11, 0x400001f0 },
3337 { 0x15, 0x01813122 },
3338 { 0x1b, 0x400001f1 },
3347 { 0x0a, 0x0321101f },
3348 { 0x0b, 0x01112024 },
3349 { 0x0c, 0x01111222 },
3350 { 0x0d, 0x91174220 },
3351 { 0x0e, 0x03a11050 },
3352 { 0x0f, 0x01116221 },
3353 { 0x10, 0x90a70330 },
3354 { 0x11, 0x01452340 },
3355 { 0x15, 0x40C003f1 },
3356 { 0x1b, 0x405003f0 },
3365 { 0x0a, 0x02211211 },
3366 { 0x0b, 0x408103ff },
3367 { 0x0c, 0x02a1123e },
3368 { 0x0d, 0x90100310 },
3369 { 0x0e, 0x408003f1 },
3370 { 0x0f, 0x0221121f },
3371 { 0x10, 0x03451340 },
3372 { 0x11, 0x40c003f2 },
3373 { 0x15, 0x508003f3 },
3374 { 0x1b, 0x405003f4 },
3379 { 0x0a, 0x0221401f },
3380 { 0x0b, 0x01a19022 },
3381 { 0x0c, 0x01813021 },
3382 { 0x0d, 0x01014010 },
3383 { 0x0e, 0x40000100 },
3384 { 0x0f, 0x40000100 },
3385 { 0x10, 0x40000100 },
3386 { 0x11, 0x40000100 },
3387 { 0x15, 0x02a19120 },
3388 { 0x1b, 0x40000100 },
3393 { 0x0a, 0x0221401f },
3394 { 0x0b, 0x01011012 },
3395 { 0x0c, 0x01813024 },
3396 { 0x0d, 0x01014010 },
3397 { 0x0e, 0x01a19021 },
3398 { 0x0f, 0x01016011 },
3399 { 0x10, 0x01452130 },
3400 { 0x11, 0x40000100 },
3401 { 0x15, 0x02a19320 },
3402 { 0x1b, 0x40000100 },
3407 { 0x0a, 0x0121e21f },
3408 { 0x0b, 0x400000ff },
3409 { 0x0c, 0x9017e110 },
3410 { 0x0d, 0x400000fd },
3411 { 0x0e, 0x400000fe },
3412 { 0x0f, 0x0181e020 },
3413 { 0x10, 0x1145e030 },
3414 { 0x11, 0x11c5e240 },
3415 { 0x15, 0x400000fc },
3416 { 0x1b, 0x400000fb },
3421 { 0x0a, 0x0121e21f },
3422 { 0x0b, 0x90a7012e },
3423 { 0x0c, 0x9017e110 },
3424 { 0x0d, 0x400000fd },
3425 { 0x0e, 0x400000fe },
3426 { 0x0f, 0x0181e020 },
3427 { 0x10, 0x1145e230 },
3428 { 0x11, 0x500000fa },
3429 { 0x15, 0x400000fc },
3430 { 0x1b, 0x400000fb },
3435 { 0x0a, 0x0121e21f },
3436 { 0x0b, 0x90a7012e },
3437 { 0x0c, 0x9017e110 },
3438 { 0x0d, 0x400000fd },
3439 { 0x0e, 0x400000fe },
3440 { 0x0f, 0x0181e020 },
3441 { 0x10, 0x1145e230 },
3442 { 0x11, 0x11c5e240 },
3443 { 0x15, 0x400000fc },
3444 { 0x1b, 0x400000fb },
3449 { 0x0a, 0x0321e21f },
3450 { 0x0b, 0x03a1e02e },
3451 { 0x0c, 0x9017e110 },
3452 { 0x0d, 0x9017e11f },
3453 { 0x0e, 0x400000fe },
3454 { 0x0f, 0x0381e020 },
3455 { 0x10, 0x1345e230 },
3456 { 0x11, 0x13c5e240 },
3457 { 0x15, 0x400000fc },
3458 { 0x1b, 0x400000fb },
3463 { 0x0a, 0x0321e21f },
3464 { 0x0b, 0x03a1e02e },
3465 { 0x0c, 0x9017e110 },
3466 { 0x0d, 0x9017e11f },
3467 { 0x0e, 0x400000fe },
3468 { 0x0f, 0x0381e020 },
3469 { 0x10, 0x1345e230 },
3470 { 0x11, 0x13c5e240 },
3471 { 0x15, 0x400000fc },
3472 { 0x1b, 0x400000fb },
3477 { 0x0a, 0x0221401f },
3478 { 0x0b, 0x02a19020 },
3479 { 0x0c, 0x01a19020 },
3480 { 0x0d, 0x01114010 },
3481 { 0x0e, 0x408000f0 },
3482 { 0x0f, 0x01813022 },
3483 { 0x10, 0x074510a0 },
3484 { 0x11, 0x40c400f1 },
3485 { 0x15, 0x9037012e },
3486 { 0x1b, 0x40e000f2 },
3490 /* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */
3492 SND_PCI_QUIRK(0x0000, 0x0100, "Mac Mini", STAC_INTEL_MAC_V3),
3493 SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1),
3494 SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2),
3495 SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2),
3496 SND_PCI_QUIRK(0x106b, 0x0e00, "Mac", STAC_INTEL_MAC_V3),
3497 SND_PCI_QUIRK(0x106b, 0x0f00, "Mac", STAC_INTEL_MAC_V3),
3498 SND_PCI_QUIRK(0x106b, 0x1600, "Mac", STAC_INTEL_MAC_V3),
3499 SND_PCI_QUIRK(0x106b, 0x1700, "Mac", STAC_INTEL_MAC_V3),
3500 SND_PCI_QUIRK(0x106b, 0x0200, "Mac", STAC_INTEL_MAC_V3),
3501 SND_PCI_QUIRK(0x106b, 0x1e00, "Mac", STAC_INTEL_MAC_V3),
3502 SND_PCI_QUIRK(0x106b, 0x1a00, "Mac", STAC_INTEL_MAC_V4),
3503 SND_PCI_QUIRK(0x106b, 0x0a00, "Mac", STAC_INTEL_MAC_V5),
3504 SND_PCI_QUIRK(0x106b, 0x2200, "Mac", STAC_INTEL_MAC_V5),
3510 /* remap the fixup from codec SSID and apply it */
3511 static void stac922x_fixup_intel_mac_auto(struct hda_codec *codec, in stac922x_fixup_intel_mac_auto() argument
3518 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; in stac922x_fixup_intel_mac_auto()
3519 snd_hda_pick_fixup(codec, NULL, stac922x_intel_mac_fixup_tbl, in stac922x_fixup_intel_mac_auto()
3521 if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET) in stac922x_fixup_intel_mac_auto()
3522 snd_hda_apply_fixup(codec, action); in stac922x_fixup_intel_mac_auto()
3525 static void stac922x_fixup_intel_mac_gpio(struct hda_codec *codec, in stac922x_fixup_intel_mac_gpio() argument
3529 struct sigmatel_spec *spec = codec->spec; in stac922x_fixup_intel_mac_gpio()
3532 spec->gpio_mask = spec->gpio_dir = 0x03; in stac922x_fixup_intel_mac_gpio()
3533 spec->gpio_data = 0x03; in stac922x_fixup_intel_mac_gpio()
3614 { .id = STAC_INTEL_MAC_V1, .name = "intel-mac-v1" },
3615 { .id = STAC_INTEL_MAC_V2, .name = "intel-mac-v2" },
3616 { .id = STAC_INTEL_MAC_V3, .name = "intel-mac-v3" },
3617 { .id = STAC_INTEL_MAC_V4, .name = "intel-mac-v4" },
3618 { .id = STAC_INTEL_MAC_V5, .name = "intel-mac-v5" },
3619 { .id = STAC_INTEL_MAC_AUTO, .name = "intel-mac-auto" },
3621 { .id = STAC_922X_DELL_D81, .name = "dell-d81" },
3622 { .id = STAC_922X_DELL_D82, .name = "dell-d82" },
3623 { .id = STAC_922X_DELL_M81, .name = "dell-m81" },
3624 { .id = STAC_922X_DELL_M82, .name = "dell-m82" },
3628 { .id = STAC_INTEL_MAC_V3, .name = "macbook-pro-v1" },
3629 { .id = STAC_INTEL_MAC_V3, .name = "macbook-pro" },
3630 { .id = STAC_INTEL_MAC_V2, .name = "imac-intel" },
3631 { .id = STAC_INTEL_MAC_V3, .name = "imac-intel-20" },
3637 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
3639 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
3642 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0101,
3644 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0202,
3646 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0606,
3648 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0601,
3650 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0111,
3652 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1115,
3654 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1116,
3656 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1117,
3658 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1118,
3660 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1119,
3662 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x8826,
3664 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5049,
3666 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5055,
3668 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5048,
3670 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0110,
3672 /* Intel D945G 5-stack systems */
3673 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0404,
3675 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0303,
3677 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0013,
3679 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0417,
3682 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0b0b,
3684 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0112,
3686 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0d0d,
3688 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0909,
3690 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0505,
3692 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0707,
3695 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0204,
3700 SND_PCI_QUIRK(0x8384, 0x7680, "Mac", STAC_INTEL_MAC_AUTO),
3703 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01a7,
3705 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01a9,
3707 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ab,
3709 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ac,
3711 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01bf,
3713 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d0,
3715 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d1,
3717 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d2,
3719 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d7,
3722 SND_PCI_QUIRK_MASK(0x1019, 0xf000, 0x2000,
3728 { 0x0a, 0x02214020 },
3729 { 0x0b, 0x02a19080 },
3730 { 0x0c, 0x0181304e },
3731 { 0x0d, 0x01014010 },
3732 { 0x0e, 0x01a19040 },
3733 { 0x0f, 0x01011012 },
3734 { 0x10, 0x01016011 },
3735 { 0x11, 0x0101201f },
3736 { 0x12, 0x183301f0 },
3737 { 0x13, 0x18a001f0 },
3738 { 0x14, 0x18a001f0 },
3739 { 0x21, 0x01442070 },
3740 { 0x22, 0x01c42190 },
3741 { 0x23, 0x40000100 },
3746 { 0x0a, 0x0221401f },
3747 { 0x0b, 0x02a19120 },
3748 { 0x0c, 0x40000100 },
3749 { 0x0d, 0x01014011 },
3750 { 0x0e, 0x01a19021 },
3751 { 0x0f, 0x01813024 },
3752 { 0x10, 0x40000100 },
3753 { 0x11, 0x40000100 },
3754 { 0x12, 0x40000100 },
3755 { 0x13, 0x40000100 },
3756 { 0x14, 0x40000100 },
3757 { 0x21, 0x40000100 },
3758 { 0x22, 0x40000100 },
3759 { 0x23, 0x40000100 },
3764 { 0x0a, 0x02214020 },
3765 { 0x0b, 0x02a19080 },
3766 { 0x0c, 0x0181304e },
3767 { 0x0d, 0x01014010 },
3768 { 0x0e, 0x01a19040 },
3769 { 0x0f, 0x01011012 },
3770 { 0x10, 0x01016011 },
3771 { 0x11, 0x40000100 },
3772 { 0x12, 0x40000100 },
3773 { 0x13, 0x40000100 },
3774 { 0x14, 0x40000100 },
3775 { 0x21, 0x01442070 },
3776 { 0x22, 0x40000100 },
3777 { 0x23, 0x40000100 },
3782 { 0x0a, 0x40000100 },
3783 { 0x0b, 0x40000100 },
3784 { 0x0c, 0x0181304e },
3785 { 0x0d, 0x01014010 },
3786 { 0x0e, 0x01a19040 },
3787 { 0x0f, 0x01011012 },
3788 { 0x10, 0x01016011 },
3789 { 0x11, 0x40000100 },
3790 { 0x12, 0x40000100 },
3791 { 0x13, 0x40000100 },
3792 { 0x14, 0x40000100 },
3793 { 0x21, 0x01442070 },
3794 { 0x22, 0x40000100 },
3795 { 0x23, 0x40000100 },
3800 { 0x0a, 0x02211230 },
3801 { 0x0b, 0x02a11220 },
3802 { 0x0c, 0x01a19040 },
3803 { 0x0d, 0x01114210 },
3804 { 0x0e, 0x01111212 },
3805 { 0x0f, 0x01116211 },
3806 { 0x10, 0x01813050 },
3807 { 0x11, 0x01112214 },
3808 { 0x12, 0x403003fa },
3809 { 0x13, 0x90a60040 },
3810 { 0x14, 0x90a60040 },
3811 { 0x21, 0x404003fb },
3812 { 0x22, 0x40c003fc },
3813 { 0x23, 0x40000100 },
3817 static void stac927x_fixup_ref_no_jd(struct hda_codec *codec, in stac927x_fixup_ref_no_jd() argument
3820 /* no jack detecion for ref-no-jd model */ in stac927x_fixup_ref_no_jd()
3822 codec->no_jack_detect = 1; in stac927x_fixup_ref_no_jd()
3825 static void stac927x_fixup_ref(struct hda_codec *codec, in stac927x_fixup_ref() argument
3828 struct sigmatel_spec *spec = codec->spec; in stac927x_fixup_ref()
3831 snd_hda_apply_pincfgs(codec, ref927x_pin_configs); in stac927x_fixup_ref()
3832 spec->eapd_mask = spec->gpio_mask = 0; in stac927x_fixup_ref()
3833 spec->gpio_dir = spec->gpio_data = 0; in stac927x_fixup_ref()
3837 static void stac927x_fixup_dell_dmic(struct hda_codec *codec, in stac927x_fixup_dell_dmic() argument
3840 struct sigmatel_spec *spec = codec->spec; in stac927x_fixup_dell_dmic()
3845 if (codec->core.subsystem_id != 0x1028022f) { in stac927x_fixup_dell_dmic()
3847 spec->eapd_mask = spec->gpio_mask = 0x04; in stac927x_fixup_dell_dmic()
3848 spec->gpio_dir = spec->gpio_data = 0x04; in stac927x_fixup_dell_dmic()
3851 snd_hda_add_verbs(codec, dell_3st_core_init); in stac927x_fixup_dell_dmic()
3852 spec->volknob_init = 1; in stac927x_fixup_dell_dmic()
3855 static void stac927x_fixup_volknob(struct hda_codec *codec, in stac927x_fixup_volknob() argument
3858 struct sigmatel_spec *spec = codec->spec; in stac927x_fixup_volknob()
3861 snd_hda_add_verbs(codec, stac927x_volknob_core_init); in stac927x_fixup_volknob()
3862 spec->volknob_init = 1; in stac927x_fixup_volknob()
3911 { 0x0f, 0x0221101f },
3913 { 0x0e, 0x02a79130 },
3923 { 0x0c, 0x90a79130 },
3933 { 0x21, 0x01442070 },
3950 { .id = STAC_D965_REF_NO_JD, .name = "ref-no-jd" },
3954 { .id = STAC_D965_5ST_NO_FP, .name = "5stack-no-fp" },
3955 { .id = STAC_DELL_3ST, .name = "dell-3stack" },
3956 { .id = STAC_DELL_BIOS, .name = "dell-bios" },
3957 { .id = STAC_NEMO_DEFAULT, .name = "nemo-default" },
3958 { .id = STAC_DELL_BIOS_AMIC, .name = "dell-bios-amic" },
3965 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
3967 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
3970 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x3d01, "Intel D946", STAC_D965_3ST),
3971 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0xa301, "Intel D946", STAC_D965_3ST),
3973 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2100,
3975 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2000,
3978 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01dd, "Dell Dimension E520", STAC_DELL_3ST),
3979 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ed, "Dell ", STAC_DELL_3ST),
3980 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f4, "Dell ", STAC_DELL_3ST),
3982 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS),
3983 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f7, "Dell XPS M1730", STAC_DELL_BIOS),
3984 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS),
3985 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS_SPDIF),
3986 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS),
3987 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS),
3988 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS),
3989 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS),
3990 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0209, "Dell XPS 1330", STAC_DELL_BIOS_SPDIF),
3992 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2300,
3994 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2500,
3997 SND_PCI_QUIRK(0x1888, 0x1000, "AmigaOne X1000", STAC_NEMO_DEFAULT),
3998 /* volume-knob fixes */
3999 SND_PCI_QUIRK_VENDOR(0x10cf, "FSC", STAC_927X_VOLKNOB),
4004 { 0x0a, 0x40000100 },
4005 { 0x0b, 0x40000100 },
4006 { 0x0c, 0x01016011 },
4007 { 0x0d, 0x01014010 },
4008 { 0x0e, 0x01813122 },
4009 { 0x0f, 0x01a19021 },
4010 { 0x14, 0x01019020 },
4011 { 0x16, 0x40000100 },
4012 { 0x17, 0x90a000f0 },
4013 { 0x18, 0x90a000f0 },
4014 { 0x21, 0x01441030 },
4015 { 0x22, 0x01c41030 },
4031 { 0x0a, 0x0321101F },
4032 { 0x0b, 0x03A11020 },
4033 { 0x0c, 0x400003FA },
4034 { 0x0d, 0x90170310 },
4035 { 0x0e, 0x400003FB },
4036 { 0x0f, 0x400003FC },
4037 { 0x14, 0x400003FD },
4038 { 0x16, 0x40F000F9 },
4039 { 0x17, 0x90A60330 },
4040 { 0x18, 0x400003FF },
4041 { 0x21, 0x0144131F },
4042 { 0x22, 0x40C003FE },
4057 { 0x0a, 0x0321101f },
4058 { 0x0b, 0x03a11020 },
4059 { 0x0c, 0x90a70330 },
4060 { 0x0d, 0x90170310 },
4061 { 0x0e, 0x400000fe },
4062 { 0x0f, 0x400000ff },
4063 { 0x14, 0x400000fd },
4064 { 0x16, 0x40f000f9 },
4065 { 0x17, 0x400000fa },
4066 { 0x18, 0x400000fc },
4067 { 0x21, 0x0144131f },
4068 { 0x22, 0x40c003f8 },
4070 { 0x1f, 0x01441030 },
4071 { 0x20, 0x1c410030 },
4076 { 0x0a, 0x0421101f },
4077 { 0x0b, 0x04a11020 },
4078 { 0x0c, 0x400003fa },
4079 { 0x0d, 0x90170310 },
4080 { 0x0e, 0x400003fb },
4081 { 0x0f, 0x400003fc },
4082 { 0x14, 0x400003fd },
4083 { 0x16, 0x400003f9 },
4084 { 0x17, 0x90a60330 },
4085 { 0x18, 0x400003ff },
4086 { 0x21, 0x01441340 },
4087 { 0x22, 0x40c003fe },
4091 static void stac9205_fixup_ref(struct hda_codec *codec, in stac9205_fixup_ref() argument
4094 struct sigmatel_spec *spec = codec->spec; in stac9205_fixup_ref()
4097 snd_hda_apply_pincfgs(codec, ref9205_pin_configs); in stac9205_fixup_ref()
4098 /* SPDIF-In enabled */ in stac9205_fixup_ref()
4099 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0; in stac9205_fixup_ref()
4103 static void stac9205_fixup_dell_m43(struct hda_codec *codec, in stac9205_fixup_dell_m43() argument
4106 struct sigmatel_spec *spec = codec->spec; in stac9205_fixup_dell_m43()
4110 snd_hda_apply_pincfgs(codec, dell_9205_m43_pin_configs); in stac9205_fixup_dell_m43()
4113 snd_hda_codec_write_cache(codec, codec->core.afg, 0, in stac9205_fixup_dell_m43()
4114 AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x10); in stac9205_fixup_dell_m43()
4115 jack = snd_hda_jack_detect_enable_callback(codec, codec->core.afg, in stac9205_fixup_dell_m43()
4118 jack->private_data = 0x01; in stac9205_fixup_dell_m43()
4120 spec->gpio_dir = 0x0b; in stac9205_fixup_dell_m43()
4121 spec->eapd_mask = 0x01; in stac9205_fixup_dell_m43()
4122 spec->gpio_mask = 0x1b; in stac9205_fixup_dell_m43()
4123 spec->gpio_mute = 0x10; in stac9205_fixup_dell_m43()
4127 spec->gpio_data = 0x01; in stac9205_fixup_dell_m43()
4131 static void stac9205_fixup_eapd(struct hda_codec *codec, in stac9205_fixup_eapd() argument
4134 struct sigmatel_spec *spec = codec->spec; in stac9205_fixup_eapd()
4137 spec->eapd_switch = 0; in stac9205_fixup_eapd()
4166 { .id = STAC_9205_DELL_M42, .name = "dell-m42" },
4167 { .id = STAC_9205_DELL_M43, .name = "dell-m43" },
4168 { .id = STAC_9205_DELL_M44, .name = "dell-m44" },
4175 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
4177 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0xfb30,
4179 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
4182 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f1,
4184 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f2,
4186 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f8,
4188 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f9,
4190 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fa,
4192 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fc,
4194 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fd,
4196 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fe,
4198 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ff,
4200 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0204,
4202 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0206,
4204 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x021b,
4206 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x021c,
4208 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x021f,
4210 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228,
4212 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0229,
4215 SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD),
4216 SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD),
4220 static void stac92hd95_fixup_hp_led(struct hda_codec *codec, in stac92hd95_fixup_hp_led() argument
4223 struct sigmatel_spec *spec = codec->spec; in stac92hd95_fixup_hp_led()
4228 if (find_mute_led_cfg(codec, spec->default_polarity)) in stac92hd95_fixup_hp_led()
4229 codec_dbg(codec, "mute LED gpio %d polarity %d\n", in stac92hd95_fixup_hp_led()
4230 spec->gpio_led, in stac92hd95_fixup_hp_led()
4231 spec->gpio_led_polarity); in stac92hd95_fixup_hp_led()
4242 {0x1a, 0x795, 0x00}, /* HPF to 100Hz */
4251 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1911, "HP Spectre 13", STAC_92HD95_HP_BASS),
4256 { .id = STAC_92HD95_HP_LED, .name = "hp-led" },
4257 { .id = STAC_92HD95_HP_BASS, .name = "hp-bass" },
4262 static int stac_parse_auto_config(struct hda_codec *codec) in stac_parse_auto_config() argument
4264 struct sigmatel_spec *spec = codec->spec; in stac_parse_auto_config()
4266 int flags = 0; in stac_parse_auto_config()
4268 if (spec->headset_jack) in stac_parse_auto_config()
4271 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, flags); in stac_parse_auto_config()
4272 if (err < 0) in stac_parse_auto_config()
4276 spec->gen.pcm_playback_hook = stac_playback_pcm_hook; in stac_parse_auto_config()
4277 spec->gen.pcm_capture_hook = stac_capture_pcm_hook; in stac_parse_auto_config()
4279 spec->gen.automute_hook = stac_update_outputs; in stac_parse_auto_config()
4281 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in stac_parse_auto_config()
4282 if (err < 0) in stac_parse_auto_config()
4285 if (spec->vref_mute_led_nid) { in stac_parse_auto_config()
4286 err = snd_hda_gen_fix_pin_power(codec, spec->vref_mute_led_nid); in stac_parse_auto_config()
4287 if (err < 0) in stac_parse_auto_config()
4292 if (spec->anabeep_nid > 0) { in stac_parse_auto_config()
4293 err = stac_auto_create_beep_ctls(codec, in stac_parse_auto_config()
4294 spec->anabeep_nid); in stac_parse_auto_config()
4295 if (err < 0) in stac_parse_auto_config()
4301 if (spec->gen.beep_nid) { in stac_parse_auto_config()
4302 hda_nid_t nid = spec->gen.beep_nid; in stac_parse_auto_config()
4305 err = stac_auto_create_beep_ctls(codec, nid); in stac_parse_auto_config()
4306 if (err < 0) in stac_parse_auto_config()
4308 if (codec->beep) { in stac_parse_auto_config()
4310 codec->beep->linear_tone = spec->linear_tone_beep; in stac_parse_auto_config()
4312 codec->beep->keep_power_at_enable = 1; in stac_parse_auto_config()
4314 caps = query_amp_caps(codec, nid, HDA_OUTPUT); in stac_parse_auto_config()
4316 err = stac_beep_switch_ctl(codec); in stac_parse_auto_config()
4317 if (err < 0) in stac_parse_auto_config()
4324 if (spec->gpio_led) in stac_parse_auto_config()
4325 snd_hda_gen_add_mute_led_cdev(codec, stac_vmaster_hook); in stac_parse_auto_config()
4327 if (spec->aloopback_ctl && in stac_parse_auto_config()
4328 snd_hda_get_bool_hint(codec, "loopback") == 1) { in stac_parse_auto_config()
4330 spec->aloopback_ctl->private_value >> 16; in stac_parse_auto_config()
4331 if (snd_hdac_regmap_add_vendor_verb(&codec->core, wr_verb)) in stac_parse_auto_config()
4332 return -ENOMEM; in stac_parse_auto_config()
4333 if (!snd_hda_gen_add_kctl(&spec->gen, NULL, spec->aloopback_ctl)) in stac_parse_auto_config()
4334 return -ENOMEM; in stac_parse_auto_config()
4337 if (spec->have_spdif_mux) { in stac_parse_auto_config()
4338 err = stac_create_spdif_mux_ctls(codec); in stac_parse_auto_config()
4339 if (err < 0) in stac_parse_auto_config()
4343 stac_init_power_map(codec); in stac_parse_auto_config()
4345 return 0; in stac_parse_auto_config()
4348 static int stac_init(struct hda_codec *codec) in stac_init() argument
4350 struct sigmatel_spec *spec = codec->spec; in stac_init()
4354 stac_store_hints(codec); in stac_init()
4357 /* turn on EAPD statically when spec->eapd_switch isn't set. in stac_init()
4360 if (!spec->eapd_switch) in stac_init()
4361 spec->gpio_data |= spec->eapd_mask; in stac_init()
4362 stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); in stac_init()
4364 snd_hda_gen_init(codec); in stac_init()
4366 /* sync the power-map */ in stac_init()
4367 if (spec->num_pwrs) in stac_init()
4368 snd_hda_codec_write(codec, codec->core.afg, 0, in stac_init()
4370 spec->power_map_bits); in stac_init()
4373 if (spec->powerdown_adcs) { in stac_init()
4374 for (i = 0; i < spec->gen.num_all_adcs; i++) { in stac_init()
4375 if (spec->active_adcs & (1 << i)) in stac_init()
4377 snd_hda_codec_write(codec, spec->gen.all_adcs[i], 0, in stac_init()
4383 return 0; in stac_init()
4386 static void stac_shutup(struct hda_codec *codec) in stac_shutup() argument
4388 struct sigmatel_spec *spec = codec->spec; in stac_shutup()
4390 snd_hda_shutup_pins(codec); in stac_shutup()
4392 if (spec->eapd_mask) in stac_shutup()
4393 stac_gpio_set(codec, spec->gpio_mask, in stac_shutup()
4394 spec->gpio_dir, spec->gpio_data & in stac_shutup()
4395 ~spec->eapd_mask); in stac_shutup()
4402 struct hda_codec *codec, hda_nid_t nid) in stac92hd_proc_hook() argument
4404 if (nid == codec->core.afg) in stac92hd_proc_hook()
4405 snd_iprintf(buffer, "Power-Map: 0x%02x\n", in stac92hd_proc_hook()
4406 snd_hda_codec_read(codec, nid, 0, in stac92hd_proc_hook()
4407 AC_VERB_IDT_GET_POWER_MAP, 0)); in stac92hd_proc_hook()
4411 struct hda_codec *codec, in analog_loop_proc_hook() argument
4414 snd_iprintf(buffer, "Analog Loopback: 0x%02x\n", in analog_loop_proc_hook()
4415 snd_hda_codec_read(codec, codec->core.afg, 0, verb, 0)); in analog_loop_proc_hook()
4420 struct hda_codec *codec, hda_nid_t nid) in stac92hd7x_proc_hook() argument
4422 stac92hd_proc_hook(buffer, codec, nid); in stac92hd7x_proc_hook()
4423 if (nid == codec->core.afg) in stac92hd7x_proc_hook()
4424 analog_loop_proc_hook(buffer, codec, 0xfa0); in stac92hd7x_proc_hook()
4428 struct hda_codec *codec, hda_nid_t nid) in stac9205_proc_hook() argument
4430 if (nid == codec->core.afg) in stac9205_proc_hook()
4431 analog_loop_proc_hook(buffer, codec, 0xfe0); in stac9205_proc_hook()
4435 struct hda_codec *codec, hda_nid_t nid) in stac927x_proc_hook() argument
4437 if (nid == codec->core.afg) in stac927x_proc_hook()
4438 analog_loop_proc_hook(buffer, codec, 0xfeb); in stac927x_proc_hook()
4448 static int stac_suspend(struct hda_codec *codec) in stac_suspend() argument
4450 stac_shutup(codec); in stac_suspend()
4451 return 0; in stac_suspend()
4469 static int alloc_stac_spec(struct hda_codec *codec) in alloc_stac_spec() argument
4475 return -ENOMEM; in alloc_stac_spec()
4476 snd_hda_gen_spec_init(&spec->gen); in alloc_stac_spec()
4477 codec->spec = spec; in alloc_stac_spec()
4478 codec->no_trigger_sense = 1; /* seems common with STAC/IDT codecs */ in alloc_stac_spec()
4479 spec->gen.dac_min_mute = true; in alloc_stac_spec()
4480 codec->patch_ops = stac_patch_ops; in alloc_stac_spec()
4481 return 0; in alloc_stac_spec()
4484 static int patch_stac9200(struct hda_codec *codec) in patch_stac9200() argument
4489 err = alloc_stac_spec(codec); in patch_stac9200()
4490 if (err < 0) in patch_stac9200()
4493 spec = codec->spec; in patch_stac9200()
4494 spec->linear_tone_beep = 1; in patch_stac9200()
4495 spec->gen.own_eapd_ctl = 1; in patch_stac9200()
4497 codec->power_filter = snd_hda_codec_eapd_power_filter; in patch_stac9200()
4499 snd_hda_add_verbs(codec, stac9200_eapd_init); in patch_stac9200()
4501 snd_hda_pick_fixup(codec, stac9200_models, stac9200_fixup_tbl, in patch_stac9200()
4503 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac9200()
4505 err = stac_parse_auto_config(codec); in patch_stac9200()
4506 if (err < 0) { in patch_stac9200()
4507 stac_free(codec); in patch_stac9200()
4511 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac9200()
4513 return 0; in patch_stac9200()
4516 static int patch_stac925x(struct hda_codec *codec) in patch_stac925x() argument
4521 err = alloc_stac_spec(codec); in patch_stac925x()
4522 if (err < 0) in patch_stac925x()
4525 spec = codec->spec; in patch_stac925x()
4526 spec->linear_tone_beep = 1; in patch_stac925x()
4527 spec->gen.own_eapd_ctl = 1; in patch_stac925x()
4529 snd_hda_add_verbs(codec, stac925x_core_init); in patch_stac925x()
4531 snd_hda_pick_fixup(codec, stac925x_models, stac925x_fixup_tbl, in patch_stac925x()
4533 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac925x()
4535 err = stac_parse_auto_config(codec); in patch_stac925x()
4536 if (err < 0) { in patch_stac925x()
4537 stac_free(codec); in patch_stac925x()
4541 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac925x()
4543 return 0; in patch_stac925x()
4546 static int patch_stac92hd73xx(struct hda_codec *codec) in patch_stac92hd73xx() argument
4552 err = alloc_stac_spec(codec); in patch_stac92hd73xx()
4553 if (err < 0) in patch_stac92hd73xx()
4556 spec = codec->spec; in patch_stac92hd73xx()
4560 if ((codec->core.vendor_id & 0xfffffff0) != 0x111d7670) in patch_stac92hd73xx()
4561 codec->power_save_node = 1; in patch_stac92hd73xx()
4562 spec->linear_tone_beep = 0; in patch_stac92hd73xx()
4563 spec->gen.mixer_nid = 0x1d; in patch_stac92hd73xx()
4564 spec->have_spdif_mux = 1; in patch_stac92hd73xx()
4566 num_dacs = snd_hda_get_num_conns(codec, 0x0a) - 1; in patch_stac92hd73xx()
4568 codec_warn(codec, in patch_stac92hd73xx()
4574 case 0x3: /* 6 Channel */ in patch_stac92hd73xx()
4575 spec->aloopback_ctl = &stac92hd73xx_6ch_loopback; in patch_stac92hd73xx()
4577 case 0x4: /* 8 Channel */ in patch_stac92hd73xx()
4578 spec->aloopback_ctl = &stac92hd73xx_8ch_loopback; in patch_stac92hd73xx()
4580 case 0x5: /* 10 Channel */ in patch_stac92hd73xx()
4581 spec->aloopback_ctl = &stac92hd73xx_10ch_loopback; in patch_stac92hd73xx()
4585 spec->aloopback_mask = 0x01; in patch_stac92hd73xx()
4586 spec->aloopback_shift = 8; in patch_stac92hd73xx()
4588 spec->gen.beep_nid = 0x1c; /* digital beep */ in patch_stac92hd73xx()
4591 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; in patch_stac92hd73xx()
4592 spec->gpio_data = 0x01; in patch_stac92hd73xx()
4594 spec->eapd_switch = 1; in patch_stac92hd73xx()
4596 spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); in patch_stac92hd73xx()
4597 spec->pwr_nids = stac92hd73xx_pwr_nids; in patch_stac92hd73xx()
4599 spec->gen.own_eapd_ctl = 1; in patch_stac92hd73xx()
4600 spec->gen.power_down_unused = 1; in patch_stac92hd73xx()
4602 snd_hda_pick_fixup(codec, stac92hd73xx_models, stac92hd73xx_fixup_tbl, in patch_stac92hd73xx()
4604 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac92hd73xx()
4606 if (!spec->volknob_init) in patch_stac92hd73xx()
4607 snd_hda_add_verbs(codec, stac92hd73xx_core_init); in patch_stac92hd73xx()
4609 err = stac_parse_auto_config(codec); in patch_stac92hd73xx()
4610 if (err < 0) { in patch_stac92hd73xx()
4611 stac_free(codec); in patch_stac92hd73xx()
4615 /* Don't GPIO-mute speakers if there are no internal speakers, because in patch_stac92hd73xx()
4618 if (spec->eapd_switch && !has_builtin_speaker(codec)) in patch_stac92hd73xx()
4619 spec->eapd_switch = 0; in patch_stac92hd73xx()
4621 codec->proc_widget_hook = stac92hd7x_proc_hook; in patch_stac92hd73xx()
4623 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac92hd73xx()
4625 return 0; in patch_stac92hd73xx()
4628 static void stac_setup_gpio(struct hda_codec *codec) in stac_setup_gpio() argument
4630 struct sigmatel_spec *spec = codec->spec; in stac_setup_gpio()
4632 spec->gpio_mask |= spec->eapd_mask; in stac_setup_gpio()
4633 if (spec->gpio_led) { in stac_setup_gpio()
4634 if (!spec->vref_mute_led_nid) { in stac_setup_gpio()
4635 spec->gpio_mask |= spec->gpio_led; in stac_setup_gpio()
4636 spec->gpio_dir |= spec->gpio_led; in stac_setup_gpio()
4637 spec->gpio_data |= spec->gpio_led; in stac_setup_gpio()
4639 codec->power_filter = stac_vref_led_power_filter; in stac_setup_gpio()
4643 if (spec->mic_mute_led_gpio) { in stac_setup_gpio()
4644 spec->gpio_mask |= spec->mic_mute_led_gpio; in stac_setup_gpio()
4645 spec->gpio_dir |= spec->mic_mute_led_gpio; in stac_setup_gpio()
4646 spec->mic_enabled = 0; in stac_setup_gpio()
4647 spec->gpio_data |= spec->mic_mute_led_gpio; in stac_setup_gpio()
4648 snd_hda_gen_add_micmute_led_cdev(codec, stac_capture_led_update); in stac_setup_gpio()
4652 static int patch_stac92hd83xxx(struct hda_codec *codec) in patch_stac92hd83xxx() argument
4657 err = alloc_stac_spec(codec); in patch_stac92hd83xxx()
4658 if (err < 0) in patch_stac92hd83xxx()
4662 codec->core.power_caps &= ~AC_PWRST_EPSS; in patch_stac92hd83xxx()
4664 spec = codec->spec; in patch_stac92hd83xxx()
4665 codec->power_save_node = 1; in patch_stac92hd83xxx()
4666 spec->linear_tone_beep = 0; in patch_stac92hd83xxx()
4667 spec->gen.own_eapd_ctl = 1; in patch_stac92hd83xxx()
4668 spec->gen.power_down_unused = 1; in patch_stac92hd83xxx()
4669 spec->gen.mixer_nid = 0x1b; in patch_stac92hd83xxx()
4671 spec->gen.beep_nid = 0x21; /* digital beep */ in patch_stac92hd83xxx()
4672 spec->pwr_nids = stac92hd83xxx_pwr_nids; in patch_stac92hd83xxx()
4673 spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); in patch_stac92hd83xxx()
4674 spec->default_polarity = -1; /* no default cfg */ in patch_stac92hd83xxx()
4676 snd_hda_add_verbs(codec, stac92hd83xxx_core_init); in patch_stac92hd83xxx()
4678 snd_hda_pick_fixup(codec, stac92hd83xxx_models, stac92hd83xxx_fixup_tbl, in patch_stac92hd83xxx()
4680 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac92hd83xxx()
4682 stac_setup_gpio(codec); in patch_stac92hd83xxx()
4684 err = stac_parse_auto_config(codec); in patch_stac92hd83xxx()
4685 if (err < 0) { in patch_stac92hd83xxx()
4686 stac_free(codec); in patch_stac92hd83xxx()
4690 codec->proc_widget_hook = stac92hd_proc_hook; in patch_stac92hd83xxx()
4692 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac92hd83xxx()
4694 return 0; in patch_stac92hd83xxx()
4698 0x0a, 0x0b, 0x0c, 0x0d
4701 static int patch_stac92hd95(struct hda_codec *codec) in patch_stac92hd95() argument
4706 err = alloc_stac_spec(codec); in patch_stac92hd95()
4707 if (err < 0) in patch_stac92hd95()
4711 codec->core.power_caps &= ~AC_PWRST_EPSS; in patch_stac92hd95()
4713 spec = codec->spec; in patch_stac92hd95()
4714 codec->power_save_node = 1; in patch_stac92hd95()
4715 spec->linear_tone_beep = 0; in patch_stac92hd95()
4716 spec->gen.own_eapd_ctl = 1; in patch_stac92hd95()
4717 spec->gen.power_down_unused = 1; in patch_stac92hd95()
4719 spec->gen.beep_nid = 0x19; /* digital beep */ in patch_stac92hd95()
4720 spec->pwr_nids = stac92hd95_pwr_nids; in patch_stac92hd95()
4721 spec->num_pwrs = ARRAY_SIZE(stac92hd95_pwr_nids); in patch_stac92hd95()
4722 spec->default_polarity = 0; in patch_stac92hd95()
4724 snd_hda_pick_fixup(codec, stac92hd95_models, stac92hd95_fixup_tbl, in patch_stac92hd95()
4726 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac92hd95()
4728 stac_setup_gpio(codec); in patch_stac92hd95()
4730 err = stac_parse_auto_config(codec); in patch_stac92hd95()
4731 if (err < 0) { in patch_stac92hd95()
4732 stac_free(codec); in patch_stac92hd95()
4736 codec->proc_widget_hook = stac92hd_proc_hook; in patch_stac92hd95()
4738 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac92hd95()
4740 return 0; in patch_stac92hd95()
4743 static int patch_stac92hd71bxx(struct hda_codec *codec) in patch_stac92hd71bxx() argument
4749 err = alloc_stac_spec(codec); in patch_stac92hd71bxx()
4750 if (err < 0) in patch_stac92hd71bxx()
4753 spec = codec->spec; in patch_stac92hd71bxx()
4755 /* codec->power_save_node = 1; */ in patch_stac92hd71bxx()
4756 spec->linear_tone_beep = 0; in patch_stac92hd71bxx()
4757 spec->gen.own_eapd_ctl = 1; in patch_stac92hd71bxx()
4758 spec->gen.power_down_unused = 1; in patch_stac92hd71bxx()
4759 spec->gen.mixer_nid = 0x17; in patch_stac92hd71bxx()
4760 spec->have_spdif_mux = 1; in patch_stac92hd71bxx()
4763 spec->gpio_mask = 0x01; in patch_stac92hd71bxx()
4764 spec->gpio_dir = 0x01; in patch_stac92hd71bxx()
4765 spec->gpio_data = 0x01; in patch_stac92hd71bxx()
4767 switch (codec->core.vendor_id) { in patch_stac92hd71bxx()
4768 case 0x111d76b6: /* 4 Port without Analog Mixer */ in patch_stac92hd71bxx()
4769 case 0x111d76b7: in patch_stac92hd71bxx()
4772 case 0x111d7608: /* 5 Port with Analog Mixer */ in patch_stac92hd71bxx()
4773 if ((codec->core.revision_id & 0xf) == 0 || in patch_stac92hd71bxx()
4774 (codec->core.revision_id & 0xf) == 1) in patch_stac92hd71bxx()
4775 spec->stream_delay = 40; /* 40 milliseconds */ in patch_stac92hd71bxx()
4779 snd_hda_codec_set_pincfg(codec, 0x0f, 0x40f000f0); in patch_stac92hd71bxx()
4780 snd_hda_codec_set_pincfg(codec, 0x19, 0x40f000f3); in patch_stac92hd71bxx()
4782 case 0x111d7603: /* 6 Port with Analog Mixer */ in patch_stac92hd71bxx()
4783 if ((codec->core.revision_id & 0xf) == 1) in patch_stac92hd71bxx()
4784 spec->stream_delay = 40; /* 40 milliseconds */ in patch_stac92hd71bxx()
4789 if (get_wcaps_type(get_wcaps(codec, 0x28)) == AC_WID_VOL_KNB) in patch_stac92hd71bxx()
4790 snd_hda_add_verbs(codec, stac92hd71bxx_core_init); in patch_stac92hd71bxx()
4792 if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP) { in patch_stac92hd71bxx()
4795 snd_hda_codec_amp_init_stereo(codec, *p, HDA_INPUT, 0, in patch_stac92hd71bxx()
4796 0xff, 0x00); in patch_stac92hd71bxx()
4799 spec->aloopback_ctl = &stac92hd71bxx_loopback; in patch_stac92hd71bxx()
4800 spec->aloopback_mask = 0x50; in patch_stac92hd71bxx()
4801 spec->aloopback_shift = 0; in patch_stac92hd71bxx()
4803 spec->powerdown_adcs = 1; in patch_stac92hd71bxx()
4804 spec->gen.beep_nid = 0x26; /* digital beep */ in patch_stac92hd71bxx()
4805 spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids); in patch_stac92hd71bxx()
4806 spec->pwr_nids = stac92hd71bxx_pwr_nids; in patch_stac92hd71bxx()
4808 snd_hda_pick_fixup(codec, stac92hd71bxx_models, stac92hd71bxx_fixup_tbl, in patch_stac92hd71bxx()
4810 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac92hd71bxx()
4812 stac_setup_gpio(codec); in patch_stac92hd71bxx()
4814 err = stac_parse_auto_config(codec); in patch_stac92hd71bxx()
4815 if (err < 0) { in patch_stac92hd71bxx()
4816 stac_free(codec); in patch_stac92hd71bxx()
4820 codec->proc_widget_hook = stac92hd7x_proc_hook; in patch_stac92hd71bxx()
4822 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac92hd71bxx()
4824 return 0; in patch_stac92hd71bxx()
4827 static int patch_stac922x(struct hda_codec *codec) in patch_stac922x() argument
4832 err = alloc_stac_spec(codec); in patch_stac922x()
4833 if (err < 0) in patch_stac922x()
4836 spec = codec->spec; in patch_stac922x()
4837 spec->linear_tone_beep = 1; in patch_stac922x()
4838 spec->gen.own_eapd_ctl = 1; in patch_stac922x()
4840 snd_hda_add_verbs(codec, stac922x_core_init); in patch_stac922x()
4843 snd_hda_override_amp_caps(codec, 0x12, HDA_OUTPUT, in patch_stac922x()
4844 (0 << AC_AMPCAP_OFFSET_SHIFT) | in patch_stac922x()
4846 (0x27 << AC_AMPCAP_STEP_SIZE_SHIFT) | in patch_stac922x()
4847 (0 << AC_AMPCAP_MUTE_SHIFT)); in patch_stac922x()
4849 snd_hda_pick_fixup(codec, stac922x_models, stac922x_fixup_tbl, in patch_stac922x()
4851 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac922x()
4853 err = stac_parse_auto_config(codec); in patch_stac922x()
4854 if (err < 0) { in patch_stac922x()
4855 stac_free(codec); in patch_stac922x()
4859 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac922x()
4861 return 0; in patch_stac922x()
4869 static int patch_stac927x(struct hda_codec *codec) in patch_stac927x() argument
4874 err = alloc_stac_spec(codec); in patch_stac927x()
4875 if (err < 0) in patch_stac927x()
4878 spec = codec->spec; in patch_stac927x()
4879 spec->linear_tone_beep = 1; in patch_stac927x()
4880 spec->gen.own_eapd_ctl = 1; in patch_stac927x()
4881 spec->have_spdif_mux = 1; in patch_stac927x()
4882 spec->spdif_labels = stac927x_spdif_labels; in patch_stac927x()
4884 spec->gen.beep_nid = 0x23; /* digital beep */ in patch_stac927x()
4887 spec->eapd_mask = spec->gpio_mask = 0x01; in patch_stac927x()
4888 spec->gpio_dir = spec->gpio_data = 0x01; in patch_stac927x()
4890 spec->aloopback_ctl = &stac927x_loopback; in patch_stac927x()
4891 spec->aloopback_mask = 0x40; in patch_stac927x()
4892 spec->aloopback_shift = 0; in patch_stac927x()
4893 spec->eapd_switch = 1; in patch_stac927x()
4895 snd_hda_pick_fixup(codec, stac927x_models, stac927x_fixup_tbl, in patch_stac927x()
4897 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac927x()
4899 if (!spec->volknob_init) in patch_stac927x()
4900 snd_hda_add_verbs(codec, stac927x_core_init); in patch_stac927x()
4902 err = stac_parse_auto_config(codec); in patch_stac927x()
4903 if (err < 0) { in patch_stac927x()
4904 stac_free(codec); in patch_stac927x()
4908 codec->proc_widget_hook = stac927x_proc_hook; in patch_stac927x()
4920 codec->bus->core.needs_damn_long_delay = 1; in patch_stac927x()
4922 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac927x()
4924 return 0; in patch_stac927x()
4927 static int patch_stac9205(struct hda_codec *codec) in patch_stac9205() argument
4932 err = alloc_stac_spec(codec); in patch_stac9205()
4933 if (err < 0) in patch_stac9205()
4936 spec = codec->spec; in patch_stac9205()
4937 spec->linear_tone_beep = 1; in patch_stac9205()
4938 spec->gen.own_eapd_ctl = 1; in patch_stac9205()
4939 spec->have_spdif_mux = 1; in patch_stac9205()
4941 spec->gen.beep_nid = 0x23; /* digital beep */ in patch_stac9205()
4943 snd_hda_add_verbs(codec, stac9205_core_init); in patch_stac9205()
4944 spec->aloopback_ctl = &stac9205_loopback; in patch_stac9205()
4946 spec->aloopback_mask = 0x40; in patch_stac9205()
4947 spec->aloopback_shift = 0; in patch_stac9205()
4950 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; in patch_stac9205()
4951 spec->gpio_data = 0x01; in patch_stac9205()
4954 spec->eapd_switch = 1; in patch_stac9205()
4956 snd_hda_pick_fixup(codec, stac9205_models, stac9205_fixup_tbl, in patch_stac9205()
4958 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac9205()
4960 err = stac_parse_auto_config(codec); in patch_stac9205()
4961 if (err < 0) { in patch_stac9205()
4962 stac_free(codec); in patch_stac9205()
4966 codec->proc_widget_hook = stac9205_proc_hook; in patch_stac9205()
4968 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac9205()
4970 return 0; in patch_stac9205()
4978 {0x15, AC_VERB_SET_CONNECT_SEL, 0x1}, /* mic-sel: 0a,0d,14,02 */
4979 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, /* Mic-in -> 0x9 */
4984 { 0x0a, 0x03211020 },
4985 { 0x0b, 0x411111f0 },
4986 { 0x0c, 0x411111f0 },
4987 { 0x0d, 0x03a15030 },
4988 { 0x0e, 0x411111f0 },
4989 { 0x0f, 0x90170110 },
4990 { 0x11, 0x411111f0 },
4991 { 0x13, 0x411111f0 },
4992 { 0x14, 0x90a7013e },
5009 SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
5014 static int patch_stac9872(struct hda_codec *codec) in patch_stac9872() argument
5019 err = alloc_stac_spec(codec); in patch_stac9872()
5020 if (err < 0) in patch_stac9872()
5023 spec = codec->spec; in patch_stac9872()
5024 spec->linear_tone_beep = 1; in patch_stac9872()
5025 spec->gen.own_eapd_ctl = 1; in patch_stac9872()
5027 snd_hda_add_verbs(codec, stac9872_core_init); in patch_stac9872()
5029 snd_hda_pick_fixup(codec, stac9872_models, stac9872_fixup_tbl, in patch_stac9872()
5031 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); in patch_stac9872()
5033 err = stac_parse_auto_config(codec); in patch_stac9872()
5034 if (err < 0) { in patch_stac9872()
5035 stac_free(codec); in patch_stac9872()
5036 return -EINVAL; in patch_stac9872()
5039 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); in patch_stac9872()
5041 return 0; in patch_stac9872()
5049 HDA_CODEC_ENTRY(0x83847690, "STAC9200", patch_stac9200),
5050 HDA_CODEC_ENTRY(0x83847882, "STAC9220 A1", patch_stac922x),
5051 HDA_CODEC_ENTRY(0x83847680, "STAC9221 A1", patch_stac922x),
5052 HDA_CODEC_ENTRY(0x83847880, "STAC9220 A2", patch_stac922x),
5053 HDA_CODEC_ENTRY(0x83847681, "STAC9220D/9223D A2", patch_stac922x),
5054 HDA_CODEC_ENTRY(0x83847682, "STAC9221 A2", patch_stac922x),
5055 HDA_CODEC_ENTRY(0x83847683, "STAC9221D A2", patch_stac922x),
5056 HDA_CODEC_ENTRY(0x83847618, "STAC9227", patch_stac927x),
5057 HDA_CODEC_ENTRY(0x83847619, "STAC9227", patch_stac927x),
5058 HDA_CODEC_ENTRY(0x83847638, "STAC92HD700", patch_stac927x),
5059 HDA_CODEC_ENTRY(0x83847616, "STAC9228", patch_stac927x),
5060 HDA_CODEC_ENTRY(0x83847617, "STAC9228", patch_stac927x),
5061 HDA_CODEC_ENTRY(0x83847614, "STAC9229", patch_stac927x),
5062 HDA_CODEC_ENTRY(0x83847615, "STAC9229", patch_stac927x),
5063 HDA_CODEC_ENTRY(0x83847620, "STAC9274", patch_stac927x),
5064 HDA_CODEC_ENTRY(0x83847621, "STAC9274D", patch_stac927x),
5065 HDA_CODEC_ENTRY(0x83847622, "STAC9273X", patch_stac927x),
5066 HDA_CODEC_ENTRY(0x83847623, "STAC9273D", patch_stac927x),
5067 HDA_CODEC_ENTRY(0x83847624, "STAC9272X", patch_stac927x),
5068 HDA_CODEC_ENTRY(0x83847625, "STAC9272D", patch_stac927x),
5069 HDA_CODEC_ENTRY(0x83847626, "STAC9271X", patch_stac927x),
5070 HDA_CODEC_ENTRY(0x83847627, "STAC9271D", patch_stac927x),
5071 HDA_CODEC_ENTRY(0x83847628, "STAC9274X5NH", patch_stac927x),
5072 HDA_CODEC_ENTRY(0x83847629, "STAC9274D5NH", patch_stac927x),
5073 HDA_CODEC_ENTRY(0x83847632, "STAC9202", patch_stac925x),
5074 HDA_CODEC_ENTRY(0x83847633, "STAC9202D", patch_stac925x),
5075 HDA_CODEC_ENTRY(0x83847634, "STAC9250", patch_stac925x),
5076 HDA_CODEC_ENTRY(0x83847635, "STAC9250D", patch_stac925x),
5077 HDA_CODEC_ENTRY(0x83847636, "STAC9251", patch_stac925x),
5078 HDA_CODEC_ENTRY(0x83847637, "STAC9250D", patch_stac925x),
5079 HDA_CODEC_ENTRY(0x83847645, "92HD206X", patch_stac927x),
5080 HDA_CODEC_ENTRY(0x83847646, "92HD206D", patch_stac927x),
5081 /* The following does not take into account .id=0x83847661 when subsys =
5085 HDA_CODEC_ENTRY(0x83847661, "CXD9872RD/K", patch_stac9872),
5086 HDA_CODEC_ENTRY(0x83847662, "STAC9872AK", patch_stac9872),
5087 HDA_CODEC_ENTRY(0x83847664, "CXD9872AKD", patch_stac9872),
5088 HDA_CODEC_ENTRY(0x83847698, "STAC9205", patch_stac9205),
5089 HDA_CODEC_ENTRY(0x838476a0, "STAC9205", patch_stac9205),
5090 HDA_CODEC_ENTRY(0x838476a1, "STAC9205D", patch_stac9205),
5091 HDA_CODEC_ENTRY(0x838476a2, "STAC9204", patch_stac9205),
5092 HDA_CODEC_ENTRY(0x838476a3, "STAC9204D", patch_stac9205),
5093 HDA_CODEC_ENTRY(0x838476a4, "STAC9255", patch_stac9205),
5094 HDA_CODEC_ENTRY(0x838476a5, "STAC9255D", patch_stac9205),
5095 HDA_CODEC_ENTRY(0x838476a6, "STAC9254", patch_stac9205),
5096 HDA_CODEC_ENTRY(0x838476a7, "STAC9254D", patch_stac9205),
5097 HDA_CODEC_ENTRY(0x111d7603, "92HD75B3X5", patch_stac92hd71bxx),
5098 HDA_CODEC_ENTRY(0x111d7604, "92HD83C1X5", patch_stac92hd83xxx),
5099 HDA_CODEC_ENTRY(0x111d76d4, "92HD83C1C5", patch_stac92hd83xxx),
5100 HDA_CODEC_ENTRY(0x111d7605, "92HD81B1X5", patch_stac92hd83xxx),
5101 HDA_CODEC_ENTRY(0x111d76d5, "92HD81B1C5", patch_stac92hd83xxx),
5102 HDA_CODEC_ENTRY(0x111d76d1, "92HD87B1/3", patch_stac92hd83xxx),
5103 HDA_CODEC_ENTRY(0x111d76d9, "92HD87B2/4", patch_stac92hd83xxx),
5104 HDA_CODEC_ENTRY(0x111d7666, "92HD88B3", patch_stac92hd83xxx),
5105 HDA_CODEC_ENTRY(0x111d7667, "92HD88B1", patch_stac92hd83xxx),
5106 HDA_CODEC_ENTRY(0x111d7668, "92HD88B2", patch_stac92hd83xxx),
5107 HDA_CODEC_ENTRY(0x111d7669, "92HD88B4", patch_stac92hd83xxx),
5108 HDA_CODEC_ENTRY(0x111d7608, "92HD75B2X5", patch_stac92hd71bxx),
5109 HDA_CODEC_ENTRY(0x111d7674, "92HD73D1X5", patch_stac92hd73xx),
5110 HDA_CODEC_ENTRY(0x111d7675, "92HD73C1X5", patch_stac92hd73xx),
5111 HDA_CODEC_ENTRY(0x111d7676, "92HD73E1X5", patch_stac92hd73xx),
5112 HDA_CODEC_ENTRY(0x111d7695, "92HD95", patch_stac92hd95),
5113 HDA_CODEC_ENTRY(0x111d76b0, "92HD71B8X", patch_stac92hd71bxx),
5114 HDA_CODEC_ENTRY(0x111d76b1, "92HD71B8X", patch_stac92hd71bxx),
5115 HDA_CODEC_ENTRY(0x111d76b2, "92HD71B7X", patch_stac92hd71bxx),
5116 HDA_CODEC_ENTRY(0x111d76b3, "92HD71B7X", patch_stac92hd71bxx),
5117 HDA_CODEC_ENTRY(0x111d76b4, "92HD71B6X", patch_stac92hd71bxx),
5118 HDA_CODEC_ENTRY(0x111d76b5, "92HD71B6X", patch_stac92hd71bxx),
5119 HDA_CODEC_ENTRY(0x111d76b6, "92HD71B5X", patch_stac92hd71bxx),
5120 HDA_CODEC_ENTRY(0x111d76b7, "92HD71B5X", patch_stac92hd71bxx),
5121 HDA_CODEC_ENTRY(0x111d76c0, "92HD89C3", patch_stac92hd73xx),
5122 HDA_CODEC_ENTRY(0x111d76c1, "92HD89C2", patch_stac92hd73xx),
5123 HDA_CODEC_ENTRY(0x111d76c2, "92HD89C1", patch_stac92hd73xx),
5124 HDA_CODEC_ENTRY(0x111d76c3, "92HD89B3", patch_stac92hd73xx),
5125 HDA_CODEC_ENTRY(0x111d76c4, "92HD89B2", patch_stac92hd73xx),
5126 HDA_CODEC_ENTRY(0x111d76c5, "92HD89B1", patch_stac92hd73xx),
5127 HDA_CODEC_ENTRY(0x111d76c6, "92HD89E3", patch_stac92hd73xx),
5128 HDA_CODEC_ENTRY(0x111d76c7, "92HD89E2", patch_stac92hd73xx),
5129 HDA_CODEC_ENTRY(0x111d76c8, "92HD89E1", patch_stac92hd73xx),
5130 HDA_CODEC_ENTRY(0x111d76c9, "92HD89D3", patch_stac92hd73xx),
5131 HDA_CODEC_ENTRY(0x111d76ca, "92HD89D2", patch_stac92hd73xx),
5132 HDA_CODEC_ENTRY(0x111d76cb, "92HD89D1", patch_stac92hd73xx),
5133 HDA_CODEC_ENTRY(0x111d76cc, "92HD89F3", patch_stac92hd73xx),
5134 HDA_CODEC_ENTRY(0x111d76cd, "92HD89F2", patch_stac92hd73xx),
5135 HDA_CODEC_ENTRY(0x111d76ce, "92HD89F1", patch_stac92hd73xx),
5136 HDA_CODEC_ENTRY(0x111d76df, "92HD93BXX", patch_stac92hd83xxx),
5137 HDA_CODEC_ENTRY(0x111d76e0, "92HD91BXX", patch_stac92hd83xxx),
5138 HDA_CODEC_ENTRY(0x111d76e3, "92HD98BXX", patch_stac92hd83xxx),
5139 HDA_CODEC_ENTRY(0x111d76e5, "92HD99BXX", patch_stac92hd83xxx),
5140 HDA_CODEC_ENTRY(0x111d76e7, "92HD90BXX", patch_stac92hd83xxx),
5141 HDA_CODEC_ENTRY(0x111d76e8, "92HD66B1X5", patch_stac92hd83xxx),
5142 HDA_CODEC_ENTRY(0x111d76e9, "92HD66B2X5", patch_stac92hd83xxx),
5143 HDA_CODEC_ENTRY(0x111d76ea, "92HD66B3X5", patch_stac92hd83xxx),
5144 HDA_CODEC_ENTRY(0x111d76eb, "92HD66C1X5", patch_stac92hd83xxx),
5145 HDA_CODEC_ENTRY(0x111d76ec, "92HD66C2X5", patch_stac92hd83xxx),
5146 HDA_CODEC_ENTRY(0x111d76ed, "92HD66C3X5", patch_stac92hd83xxx),
5147 HDA_CODEC_ENTRY(0x111d76ee, "92HD66B1X3", patch_stac92hd83xxx),
5148 HDA_CODEC_ENTRY(0x111d76ef, "92HD66B2X3", patch_stac92hd83xxx),
5149 HDA_CODEC_ENTRY(0x111d76f0, "92HD66B3X3", patch_stac92hd83xxx),
5150 HDA_CODEC_ENTRY(0x111d76f1, "92HD66C1X3", patch_stac92hd83xxx),
5151 HDA_CODEC_ENTRY(0x111d76f2, "92HD66C2X3", patch_stac92hd83xxx),
5152 HDA_CODEC_ENTRY(0x111d76f3, "92HD66C3/65", patch_stac92hd83xxx),
5158 MODULE_DESCRIPTION("IDT/Sigmatel HD-audio codec");