diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 51 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 20 |
4 files changed, 54 insertions, 20 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index e0a605adde42..ff1b922c610b 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -2858,6 +2858,7 @@ static const char *ad1988_models[AD1988_MODEL_LAST] = { | |||
2858 | static struct snd_pci_quirk ad1988_cfg_tbl[] = { | 2858 | static struct snd_pci_quirk ad1988_cfg_tbl[] = { |
2859 | SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG), | 2859 | SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG), |
2860 | SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG), | 2860 | SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG), |
2861 | SND_PCI_QUIRK(0x1043, 0x8277, "Asus P5K-E/WIFI-AP", AD1988_6STACK_DIG), | ||
2861 | {} | 2862 | {} |
2862 | }; | 2863 | }; |
2863 | 2864 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6d4df45e81e0..8f31247c52bd 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -853,6 +853,7 @@ do_sku: | |||
853 | case 0x10ec0269: | 853 | case 0x10ec0269: |
854 | case 0x10ec0862: | 854 | case 0x10ec0862: |
855 | case 0x10ec0662: | 855 | case 0x10ec0662: |
856 | case 0x10ec0889: | ||
856 | snd_hda_codec_write(codec, 0x14, 0, | 857 | snd_hda_codec_write(codec, 0x14, 0, |
857 | AC_VERB_SET_EAPD_BTLENABLE, 2); | 858 | AC_VERB_SET_EAPD_BTLENABLE, 2); |
858 | snd_hda_codec_write(codec, 0x15, 0, | 859 | snd_hda_codec_write(codec, 0x15, 0, |
@@ -877,6 +878,7 @@ do_sku: | |||
877 | case 0x10ec0883: | 878 | case 0x10ec0883: |
878 | case 0x10ec0885: | 879 | case 0x10ec0885: |
879 | case 0x10ec0888: | 880 | case 0x10ec0888: |
881 | case 0x10ec0889: | ||
880 | snd_hda_codec_write(codec, 0x20, 0, | 882 | snd_hda_codec_write(codec, 0x20, 0, |
881 | AC_VERB_SET_COEF_INDEX, 7); | 883 | AC_VERB_SET_COEF_INDEX, 7); |
882 | tmp = snd_hda_codec_read(codec, 0x20, 0, | 884 | tmp = snd_hda_codec_read(codec, 0x20, 0, |
@@ -2981,7 +2983,7 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = { | |||
2981 | /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */ | 2983 | /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */ |
2982 | SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG), | 2984 | SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG), |
2983 | SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG), | 2985 | SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG), |
2984 | SND_PCI_QUIRK(0x1043, 0x814e, "ASUS", ALC880_ASUS), | 2986 | SND_PCI_QUIRK(0x1043, 0x814e, "ASUS P5GD1 w/SPDIF", ALC880_6ST_DIG), |
2985 | SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG), | 2987 | SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG), |
2986 | SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST), | 2988 | SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST), |
2987 | SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST), | 2989 | SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST), |
@@ -7743,6 +7745,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
7743 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), | 7745 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), |
7744 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | 7746 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), |
7745 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | 7747 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), |
7748 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | ||
7746 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 7749 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
7747 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), | 7750 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), |
7748 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 7751 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
@@ -8757,35 +8760,39 @@ static struct hda_input_mux alc262_HP_D7000_capture_source = { | |||
8757 | }, | 8760 | }, |
8758 | }; | 8761 | }; |
8759 | 8762 | ||
8760 | /* mute/unmute internal speaker according to the hp jack and mute state */ | 8763 | /* mute/unmute internal speaker according to the hp jacks and mute state */ |
8761 | static void alc262_fujitsu_automute(struct hda_codec *codec, int force) | 8764 | static void alc262_fujitsu_automute(struct hda_codec *codec, int force) |
8762 | { | 8765 | { |
8763 | struct alc_spec *spec = codec->spec; | 8766 | struct alc_spec *spec = codec->spec; |
8764 | unsigned int mute; | 8767 | unsigned int mute; |
8765 | 8768 | ||
8766 | if (force || !spec->sense_updated) { | 8769 | if (force || !spec->sense_updated) { |
8767 | unsigned int present_int_hp, present_dock_hp; | 8770 | unsigned int present; |
8768 | /* need to execute and sync at first */ | 8771 | /* need to execute and sync at first */ |
8769 | snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0); | 8772 | snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0); |
8770 | present_int_hp = snd_hda_codec_read(codec, 0x14, 0, | 8773 | /* check laptop HP jack */ |
8771 | AC_VERB_GET_PIN_SENSE, 0); | 8774 | present = snd_hda_codec_read(codec, 0x14, 0, |
8772 | snd_hda_codec_read(codec, 0x1B, 0, AC_VERB_SET_PIN_SENSE, 0); | 8775 | AC_VERB_GET_PIN_SENSE, 0); |
8773 | present_dock_hp = snd_hda_codec_read(codec, 0x1b, 0, | 8776 | /* need to execute and sync at first */ |
8774 | AC_VERB_GET_PIN_SENSE, 0); | 8777 | snd_hda_codec_read(codec, 0x1b, 0, AC_VERB_SET_PIN_SENSE, 0); |
8775 | spec->jack_present = (present_int_hp & 0x80000000) != 0; | 8778 | /* check docking HP jack */ |
8776 | spec->jack_present |= (present_dock_hp & 0x80000000) != 0; | 8779 | present |= snd_hda_codec_read(codec, 0x1b, 0, |
8780 | AC_VERB_GET_PIN_SENSE, 0); | ||
8781 | if (present & AC_PINSENSE_PRESENCE) | ||
8782 | spec->jack_present = 1; | ||
8783 | else | ||
8784 | spec->jack_present = 0; | ||
8777 | spec->sense_updated = 1; | 8785 | spec->sense_updated = 1; |
8778 | } | 8786 | } |
8779 | if (spec->jack_present) { | 8787 | /* unmute internal speaker only if both HPs are unplugged and |
8780 | /* mute internal speaker */ | 8788 | * master switch is on |
8781 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, | 8789 | */ |
8782 | HDA_AMP_MUTE, HDA_AMP_MUTE); | 8790 | if (spec->jack_present) |
8783 | } else { | 8791 | mute = HDA_AMP_MUTE; |
8784 | /* unmute internal speaker if necessary */ | 8792 | else |
8785 | mute = snd_hda_codec_amp_read(codec, 0x14, 0, HDA_OUTPUT, 0); | 8793 | mute = snd_hda_codec_amp_read(codec, 0x14, 0, HDA_OUTPUT, 0); |
8786 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, | 8794 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, |
8787 | HDA_AMP_MUTE, mute); | 8795 | HDA_AMP_MUTE, mute); |
8788 | } | ||
8789 | } | 8796 | } |
8790 | 8797 | ||
8791 | /* unsolicited event for HP jack sensing */ | 8798 | /* unsolicited event for HP jack sensing */ |
@@ -8797,6 +8804,11 @@ static void alc262_fujitsu_unsol_event(struct hda_codec *codec, | |||
8797 | alc262_fujitsu_automute(codec, 1); | 8804 | alc262_fujitsu_automute(codec, 1); |
8798 | } | 8805 | } |
8799 | 8806 | ||
8807 | static void alc262_fujitsu_init_hook(struct hda_codec *codec) | ||
8808 | { | ||
8809 | alc262_fujitsu_automute(codec, 1); | ||
8810 | } | ||
8811 | |||
8800 | /* bind volumes of both NID 0x0c and 0x0d */ | 8812 | /* bind volumes of both NID 0x0c and 0x0d */ |
8801 | static struct hda_bind_ctls alc262_fujitsu_bind_master_vol = { | 8813 | static struct hda_bind_ctls alc262_fujitsu_bind_master_vol = { |
8802 | .ops = &snd_hda_bind_vol, | 8814 | .ops = &snd_hda_bind_vol, |
@@ -9570,6 +9582,7 @@ static struct alc_config_preset alc262_presets[] = { | |||
9570 | .channel_mode = alc262_modes, | 9582 | .channel_mode = alc262_modes, |
9571 | .input_mux = &alc262_fujitsu_capture_source, | 9583 | .input_mux = &alc262_fujitsu_capture_source, |
9572 | .unsol_event = alc262_fujitsu_unsol_event, | 9584 | .unsol_event = alc262_fujitsu_unsol_event, |
9585 | .init_hook = alc262_fujitsu_init_hook, | ||
9573 | }, | 9586 | }, |
9574 | [ALC262_HP_BPC] = { | 9587 | [ALC262_HP_BPC] = { |
9575 | .mixers = { alc262_HP_BPC_mixer }, | 9588 | .mixers = { alc262_HP_BPC_mixer }, |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 393f7fd2b1be..a4f44a00bae8 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -840,7 +840,7 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { | |||
840 | static struct snd_kcontrol_new stac925x_mixer[] = { | 840 | static struct snd_kcontrol_new stac925x_mixer[] = { |
841 | STAC_INPUT_SOURCE(1), | 841 | STAC_INPUT_SOURCE(1), |
842 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), | 842 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), |
843 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT), | 843 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), |
844 | HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT), | 844 | HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT), |
845 | { } /* end */ | 845 | { } /* end */ |
846 | }; | 846 | }; |
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 52b1d81a26f7..e7e43524f8c7 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -447,6 +447,23 @@ static struct hda_pcm_stream vt1708_pcm_analog_playback = { | |||
447 | }, | 447 | }, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = { | ||
451 | .substreams = 1, | ||
452 | .channels_min = 2, | ||
453 | .channels_max = 8, | ||
454 | .nid = 0x10, /* NID to query formats and rates */ | ||
455 | /* We got noisy outputs on the right channel on VT1708 when | ||
456 | * 24bit samples are used. Until any workaround is found, | ||
457 | * disable the 24bit format, so far. | ||
458 | */ | ||
459 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | ||
460 | .ops = { | ||
461 | .open = via_playback_pcm_open, | ||
462 | .prepare = via_playback_pcm_prepare, | ||
463 | .cleanup = via_playback_pcm_cleanup | ||
464 | }, | ||
465 | }; | ||
466 | |||
450 | static struct hda_pcm_stream vt1708_pcm_analog_capture = { | 467 | static struct hda_pcm_stream vt1708_pcm_analog_capture = { |
451 | .substreams = 2, | 468 | .substreams = 2, |
452 | .channels_min = 2, | 469 | .channels_min = 2, |
@@ -899,6 +916,9 @@ static int patch_vt1708(struct hda_codec *codec) | |||
899 | 916 | ||
900 | spec->stream_name_analog = "VT1708 Analog"; | 917 | spec->stream_name_analog = "VT1708 Analog"; |
901 | spec->stream_analog_playback = &vt1708_pcm_analog_playback; | 918 | spec->stream_analog_playback = &vt1708_pcm_analog_playback; |
919 | /* disable 32bit format on VT1708 */ | ||
920 | if (codec->vendor_id == 0x11061708) | ||
921 | spec->stream_analog_playback = &vt1708_pcm_analog_s16_playback; | ||
902 | spec->stream_analog_capture = &vt1708_pcm_analog_capture; | 922 | spec->stream_analog_capture = &vt1708_pcm_analog_capture; |
903 | 923 | ||
904 | spec->stream_name_digital = "VT1708 Digital"; | 924 | spec->stream_name_digital = "VT1708 Digital"; |