aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-08 09:58:25 -0500
committerTakashi Iwai <tiwai@suse.de>2012-11-08 09:58:25 -0500
commit17a4adbe68c8e6c1fde8decb2345dc4acea87934 (patch)
tree16d772ee8b5904ad9b92e1514e131bc504a079ae /sound/pci/hda
parentc9adeefda0e29bed628e40e7f9da1f84243937e7 (diff)
parent8bb4d9ce08b0a92ca174e41d92c180328f86173f (diff)
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/hda/patch_analog.c1
-rw-r--r--sound/pci/hda/patch_cirrus.c21
-rw-r--r--sound/pci/hda/patch_realtek.c26
-rw-r--r--sound/pci/hda/patch_via.c36
5 files changed, 57 insertions, 29 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index bffaaeb0b4ba..2cc07c184d31 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -3683,6 +3683,8 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
3683 /* Teradici */ 3683 /* Teradici */
3684 { PCI_DEVICE(0x6549, 0x1200), 3684 { PCI_DEVICE(0x6549, 0x1200),
3685 .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, 3685 .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT },
3686 { PCI_DEVICE(0x6549, 0x2200),
3687 .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT },
3686 /* Creative X-Fi (CA0110-IBG) */ 3688 /* Creative X-Fi (CA0110-IBG) */
3687 /* CTHDA chips */ 3689 /* CTHDA chips */
3688 { PCI_DEVICE(0x1102, 0x0010), 3690 { PCI_DEVICE(0x1102, 0x0010),
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index cdd43eadbc67..1eeba7386666 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -545,6 +545,7 @@ static int ad198x_build_pcms(struct hda_codec *codec)
545 if (spec->multiout.dig_out_nid) { 545 if (spec->multiout.dig_out_nid) {
546 info++; 546 info++;
547 codec->num_pcms++; 547 codec->num_pcms++;
548 codec->spdif_status_reset = 1;
548 info->name = "AD198x Digital"; 549 info->name = "AD198x Digital";
549 info->pcm_type = HDA_PCM_TYPE_SPDIF; 550 info->pcm_type = HDA_PCM_TYPE_SPDIF;
550 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback; 551 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback;
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index a7f8790ae885..b9039dbd704d 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -101,8 +101,8 @@ enum {
101#define CS420X_VENDOR_NID 0x11 101#define CS420X_VENDOR_NID 0x11
102#define CS_DIG_OUT1_PIN_NID 0x10 102#define CS_DIG_OUT1_PIN_NID 0x10
103#define CS_DIG_OUT2_PIN_NID 0x15 103#define CS_DIG_OUT2_PIN_NID 0x15
104#define CS_DMIC1_PIN_NID 0x12 104#define CS_DMIC1_PIN_NID 0x0e
105#define CS_DMIC2_PIN_NID 0x0e 105#define CS_DMIC2_PIN_NID 0x12
106 106
107/* coef indices */ 107/* coef indices */
108#define IDX_SPDIF_STAT 0x0000 108#define IDX_SPDIF_STAT 0x0000
@@ -1080,14 +1080,18 @@ static void init_input(struct hda_codec *codec)
1080 cs_automic(codec, NULL); 1080 cs_automic(codec, NULL);
1081 1081
1082 coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ 1082 coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */
1083 cs_vendor_coef_set(codec, IDX_ADC_CFG, coef);
1084
1085 coef = cs_vendor_coef_get(codec, IDX_BEEP_CFG);
1083 if (is_active_pin(codec, CS_DMIC2_PIN_NID)) 1086 if (is_active_pin(codec, CS_DMIC2_PIN_NID))
1084 coef |= 0x0500; /* DMIC2 2 chan on, GPIO1 off */ 1087 coef |= 1 << 4; /* DMIC2 2 chan on, GPIO1 off */
1085 if (is_active_pin(codec, CS_DMIC1_PIN_NID)) 1088 if (is_active_pin(codec, CS_DMIC1_PIN_NID))
1086 coef |= 0x1800; /* DMIC1 2 chan on, GPIO0 off 1089 coef |= 1 << 3; /* DMIC1 2 chan on, GPIO0 off
1087 * No effect if SPDIF_OUT2 is 1090 * No effect if SPDIF_OUT2 is
1088 * selected in IDX_SPDIF_CTL. 1091 * selected in IDX_SPDIF_CTL.
1089 */ 1092 */
1090 cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); 1093
1094 cs_vendor_coef_set(codec, IDX_BEEP_CFG, coef);
1091 } else { 1095 } else {
1092 if (spec->mic_detect) 1096 if (spec->mic_detect)
1093 cs_automic(codec, NULL); 1097 cs_automic(codec, NULL);
@@ -1108,7 +1112,7 @@ static const struct hda_verb cs_coef_init_verbs[] = {
1108 | 0x0400 /* Disable Coefficient Auto increment */ 1112 | 0x0400 /* Disable Coefficient Auto increment */
1109 )}, 1113 )},
1110 /* Beep */ 1114 /* Beep */
1111 {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG}, 1115 {0x11, AC_VERB_SET_COEF_INDEX, IDX_BEEP_CFG},
1112 {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ 1116 {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */
1113 1117
1114 {} /* terminator */ 1118 {} /* terminator */
@@ -1729,8 +1733,7 @@ static int cs421x_mux_enum_put(struct snd_kcontrol *kcontrol,
1729 1733
1730} 1734}
1731 1735
1732static struct snd_kcontrol_new cs421x_capture_source = { 1736static const struct snd_kcontrol_new cs421x_capture_source = {
1733
1734 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1737 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1735 .name = "Capture Source", 1738 .name = "Capture Source",
1736 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 1739 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -1947,7 +1950,7 @@ static int cs421x_suspend(struct hda_codec *codec)
1947} 1950}
1948#endif 1951#endif
1949 1952
1950static struct hda_codec_ops cs421x_patch_ops = { 1953static const struct hda_codec_ops cs421x_patch_ops = {
1951 .build_controls = cs421x_build_controls, 1954 .build_controls = cs421x_build_controls,
1952 .build_pcms = cs_build_pcms, 1955 .build_pcms = cs_build_pcms,
1953 .init = cs421x_init, 1956 .init = cs421x_init,
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 96c08792d210..bc71be32232e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5841,7 +5841,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
5841 return alc_parse_auto_config(codec, alc269_ignore, ssids); 5841 return alc_parse_auto_config(codec, alc269_ignore, ssids);
5842} 5842}
5843 5843
5844static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) 5844static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
5845{ 5845{
5846 int val = alc_read_coef_idx(codec, 0x04); 5846 int val = alc_read_coef_idx(codec, 0x04);
5847 if (power_up) 5847 if (power_up)
@@ -5858,10 +5858,10 @@ static void alc269_shutup(struct hda_codec *codec)
5858 if (spec->codec_variant != ALC269_TYPE_ALC269VB) 5858 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
5859 return; 5859 return;
5860 5860
5861 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) 5861 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
5862 alc269_toggle_power_output(codec, 0); 5862 alc269vb_toggle_power_output(codec, 0);
5863 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { 5863 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
5864 alc269_toggle_power_output(codec, 0); 5864 (alc_get_coef0(codec) & 0x00ff) == 0x018) {
5865 msleep(150); 5865 msleep(150);
5866 } 5866 }
5867} 5867}
@@ -5871,24 +5871,22 @@ static int alc269_resume(struct hda_codec *codec)
5871{ 5871{
5872 struct alc_spec *spec = codec->spec; 5872 struct alc_spec *spec = codec->spec;
5873 5873
5874 if (spec->codec_variant == ALC269_TYPE_ALC269VB || 5874 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
5875 alc269vb_toggle_power_output(codec, 0);
5876 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
5875 (alc_get_coef0(codec) & 0x00ff) == 0x018) { 5877 (alc_get_coef0(codec) & 0x00ff) == 0x018) {
5876 alc269_toggle_power_output(codec, 0);
5877 msleep(150); 5878 msleep(150);
5878 } 5879 }
5879 5880
5880 codec->patch_ops.init(codec); 5881 codec->patch_ops.init(codec);
5881 5882
5882 if (spec->codec_variant == ALC269_TYPE_ALC269VB || 5883 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
5884 alc269vb_toggle_power_output(codec, 1);
5885 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
5883 (alc_get_coef0(codec) & 0x00ff) == 0x017) { 5886 (alc_get_coef0(codec) & 0x00ff) == 0x017) {
5884 alc269_toggle_power_output(codec, 1);
5885 msleep(200); 5887 msleep(200);
5886 } 5888 }
5887 5889
5888 if (spec->codec_variant == ALC269_TYPE_ALC269VB ||
5889 (alc_get_coef0(codec) & 0x00ff) == 0x018)
5890 alc269_toggle_power_output(codec, 1);
5891
5892 snd_hda_codec_resume_amp(codec); 5890 snd_hda_codec_resume_amp(codec);
5893 snd_hda_codec_resume_cache(codec); 5891 snd_hda_codec_resume_cache(codec);
5894 hda_call_check_power_status(codec, 0x01); 5892 hda_call_check_power_status(codec, 0x01);
@@ -7080,6 +7078,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
7080 .patch = patch_alc662 }, 7078 .patch = patch_alc662 },
7081 { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, 7079 { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 },
7082 { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, 7080 { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 },
7081 { .id = 0x10ec0668, .name = "ALC668", .patch = patch_alc662 },
7083 { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, 7082 { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 },
7084 { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, 7083 { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 },
7085 { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, 7084 { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 },
@@ -7097,6 +7096,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
7097 { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 }, 7096 { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 },
7098 { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 }, 7097 { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 },
7099 { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 }, 7098 { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 },
7099 { .id = 0x10ec0900, .name = "ALC1150", .patch = patch_alc882 },
7100 {} /* terminator */ 7100 {} /* terminator */
7101}; 7101};
7102 7102
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 72a2f60b087c..019e1a00414a 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1809,11 +1809,11 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec)
1809{ 1809{
1810 struct via_spec *spec = codec->spec; 1810 struct via_spec *spec = codec->spec;
1811 const struct auto_pin_cfg *cfg = &spec->autocfg; 1811 const struct auto_pin_cfg *cfg = &spec->autocfg;
1812 int i, dac_num; 1812 int i;
1813 hda_nid_t nid; 1813 hda_nid_t nid;
1814 1814
1815 spec->multiout.num_dacs = 0;
1815 spec->multiout.dac_nids = spec->private_dac_nids; 1816 spec->multiout.dac_nids = spec->private_dac_nids;
1816 dac_num = 0;
1817 for (i = 0; i < cfg->line_outs; i++) { 1817 for (i = 0; i < cfg->line_outs; i++) {
1818 hda_nid_t dac = 0; 1818 hda_nid_t dac = 0;
1819 nid = cfg->line_out_pins[i]; 1819 nid = cfg->line_out_pins[i];
@@ -1824,16 +1824,13 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec)
1824 if (!i && parse_output_path(codec, nid, dac, 1, 1824 if (!i && parse_output_path(codec, nid, dac, 1,
1825 &spec->out_mix_path)) 1825 &spec->out_mix_path))
1826 dac = spec->out_mix_path.path[0]; 1826 dac = spec->out_mix_path.path[0];
1827 if (dac) { 1827 if (dac)
1828 spec->private_dac_nids[i] = dac; 1828 spec->private_dac_nids[spec->multiout.num_dacs++] = dac;
1829 dac_num++;
1830 }
1831 } 1829 }
1832 if (!spec->out_path[0].depth && spec->out_mix_path.depth) { 1830 if (!spec->out_path[0].depth && spec->out_mix_path.depth) {
1833 spec->out_path[0] = spec->out_mix_path; 1831 spec->out_path[0] = spec->out_mix_path;
1834 spec->out_mix_path.depth = 0; 1832 spec->out_mix_path.depth = 0;
1835 } 1833 }
1836 spec->multiout.num_dacs = dac_num;
1837 return 0; 1834 return 0;
1838} 1835}
1839 1836
@@ -3628,6 +3625,7 @@ static void set_widgets_power_state_vt2002P(struct hda_codec *codec)
3628 */ 3625 */
3629enum { 3626enum {
3630 VIA_FIXUP_INTMIC_BOOST, 3627 VIA_FIXUP_INTMIC_BOOST,
3628 VIA_FIXUP_ASUS_G75,
3631}; 3629};
3632 3630
3633static void via_fixup_intmic_boost(struct hda_codec *codec, 3631static void via_fixup_intmic_boost(struct hda_codec *codec,
@@ -3642,13 +3640,35 @@ static const struct hda_fixup via_fixups[] = {
3642 .type = HDA_FIXUP_FUNC, 3640 .type = HDA_FIXUP_FUNC,
3643 .v.func = via_fixup_intmic_boost, 3641 .v.func = via_fixup_intmic_boost,
3644 }, 3642 },
3643 [VIA_FIXUP_ASUS_G75] = {
3644 .type = HDA_FIXUP_PINS,
3645 .v.pins = (const struct hda_pintbl[]) {
3646 /* set 0x24 and 0x33 as speakers */
3647 { 0x24, 0x991301f0 },
3648 { 0x33, 0x991301f1 }, /* subwoofer */
3649 { }
3650 }
3651 },
3645}; 3652};
3646 3653
3647static const struct snd_pci_quirk vt2002p_fixups[] = { 3654static const struct snd_pci_quirk vt2002p_fixups[] = {
3655 SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75),
3648 SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST), 3656 SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
3649 {} 3657 {}
3650}; 3658};
3651 3659
3660/* NIDs 0x24 and 0x33 on VT1802 have connections to non-existing NID 0x3e
3661 * Replace this with mixer NID 0x1c
3662 */
3663static void fix_vt1802_connections(struct hda_codec *codec)
3664{
3665 static hda_nid_t conn_24[] = { 0x14, 0x1c };
3666 static hda_nid_t conn_33[] = { 0x1c };
3667
3668 snd_hda_override_conn_list(codec, 0x24, ARRAY_SIZE(conn_24), conn_24);
3669 snd_hda_override_conn_list(codec, 0x33, ARRAY_SIZE(conn_33), conn_33);
3670}
3671
3652/* patch for vt2002P */ 3672/* patch for vt2002P */
3653static int patch_vt2002P(struct hda_codec *codec) 3673static int patch_vt2002P(struct hda_codec *codec)
3654{ 3674{
@@ -3663,6 +3683,8 @@ static int patch_vt2002P(struct hda_codec *codec)
3663 spec->aa_mix_nid = 0x21; 3683 spec->aa_mix_nid = 0x21;
3664 override_mic_boost(codec, 0x2b, 0, 3, 40); 3684 override_mic_boost(codec, 0x2b, 0, 3, 40);
3665 override_mic_boost(codec, 0x29, 0, 3, 40); 3685 override_mic_boost(codec, 0x29, 0, 3, 40);
3686 if (spec->codec_type == VT1802)
3687 fix_vt1802_connections(codec);
3666 add_secret_dac_path(codec); 3688 add_secret_dac_path(codec);
3667 3689
3668 snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups); 3690 snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups);