diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-02 03:00:33 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-02 03:00:33 -0500 |
commit | 7c589750a70831b8cee3c10e01c297fefde104e3 (patch) | |
tree | 871da898d9953dd50c4830400ba1dd0b614ee311 /sound/pci | |
parent | 07cafff288266c3aa082f4bda3d47989e73ee85d (diff) | |
parent | e49a3434f1bc64dc49ff3a56e416bb5894868dde (diff) |
Merge branch 'fix/hda' into topic/hda
Speaker-Out renames are merged.
Conflicts:
sound/pci/hda/patch_realtek.c
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/azt3328.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 12 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 24 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 |
7 files changed, 48 insertions, 14 deletions
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 95ffa6a9db6e..496f14c1a731 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -2684,10 +2684,9 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
2684 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | 2684 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); |
2685 | if (err < 0) | 2685 | if (err < 0) |
2686 | goto out_err; | 2686 | goto out_err; |
2687 | opl3->private_data = chip; | ||
2687 | } | 2688 | } |
2688 | 2689 | ||
2689 | opl3->private_data = chip; | ||
2690 | |||
2691 | sprintf(card->longname, "%s at 0x%lx, irq %i", | 2690 | sprintf(card->longname, "%s at 0x%lx, irq %i", |
2692 | card->shortname, chip->ctrl_io, chip->irq); | 2691 | card->shortname, chip->ctrl_io, chip->irq); |
2693 | 2692 | ||
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 65c01798d843..76bac4fc0472 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1759,7 +1759,11 @@ static void put_vol_mute(struct hda_codec *codec, struct hda_amp_info *info, | |||
1759 | parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT; | 1759 | parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT; |
1760 | parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT; | 1760 | parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT; |
1761 | parm |= index << AC_AMP_SET_INDEX_SHIFT; | 1761 | parm |= index << AC_AMP_SET_INDEX_SHIFT; |
1762 | parm |= val; | 1762 | if ((val & HDA_AMP_MUTE) && !(info->amp_caps & AC_AMPCAP_MUTE) && |
1763 | (info->amp_caps & AC_AMPCAP_MIN_MUTE)) | ||
1764 | ; /* set the zero value as a fake mute */ | ||
1765 | else | ||
1766 | parm |= val; | ||
1763 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm); | 1767 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm); |
1764 | info->vol[ch] = val; | 1768 | info->vol[ch] = val; |
1765 | } | 1769 | } |
@@ -2026,7 +2030,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
2026 | val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT); | 2030 | val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT); |
2027 | val1 += ofs; | 2031 | val1 += ofs; |
2028 | val1 = ((int)val1) * ((int)val2); | 2032 | val1 = ((int)val1) * ((int)val2); |
2029 | if (min_mute) | 2033 | if (min_mute || (caps & AC_AMPCAP_MIN_MUTE)) |
2030 | val2 |= TLV_DB_SCALE_MUTE; | 2034 | val2 |= TLV_DB_SCALE_MUTE; |
2031 | if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) | 2035 | if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) |
2032 | return -EFAULT; | 2036 | return -EFAULT; |
@@ -5123,7 +5127,7 @@ static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid, | |||
5123 | const char *pfx = "", *sfx = ""; | 5127 | const char *pfx = "", *sfx = ""; |
5124 | 5128 | ||
5125 | /* handle as a speaker if it's a fixed line-out */ | 5129 | /* handle as a speaker if it's a fixed line-out */ |
5126 | if (!strcmp(name, "Line-Out") && attr == INPUT_PIN_ATTR_INT) | 5130 | if (!strcmp(name, "Line Out") && attr == INPUT_PIN_ATTR_INT) |
5127 | name = "Speaker"; | 5131 | name = "Speaker"; |
5128 | /* check the location */ | 5132 | /* check the location */ |
5129 | switch (attr) { | 5133 | switch (attr) { |
@@ -5182,7 +5186,7 @@ int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid, | |||
5182 | 5186 | ||
5183 | switch (get_defcfg_device(def_conf)) { | 5187 | switch (get_defcfg_device(def_conf)) { |
5184 | case AC_JACK_LINE_OUT: | 5188 | case AC_JACK_LINE_OUT: |
5185 | return fill_audio_out_name(codec, nid, cfg, "Line-Out", | 5189 | return fill_audio_out_name(codec, nid, cfg, "Line Out", |
5186 | label, maxlen, indexp); | 5190 | label, maxlen, indexp); |
5187 | case AC_JACK_SPEAKER: | 5191 | case AC_JACK_SPEAKER: |
5188 | return fill_audio_out_name(codec, nid, cfg, "Speaker", | 5192 | return fill_audio_out_name(codec, nid, cfg, "Speaker", |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 654d2e41e25d..9a9f372e1be4 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -298,6 +298,9 @@ enum { | |||
298 | #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ | 298 | #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ |
299 | #define AC_AMPCAP_MUTE_SHIFT 31 | 299 | #define AC_AMPCAP_MUTE_SHIFT 31 |
300 | 300 | ||
301 | /* driver-specific amp-caps: using bits 24-30 */ | ||
302 | #define AC_AMPCAP_MIN_MUTE (1 << 30) /* min-volume = mute */ | ||
303 | |||
301 | /* Connection list */ | 304 | /* Connection list */ |
302 | #define AC_CLIST_LENGTH (0x7f<<0) | 305 | #define AC_CLIST_LENGTH (0x7f<<0) |
303 | #define AC_CLIST_LONG (1<<7) | 306 | #define AC_CLIST_LONG (1<<7) |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index bc5a993d1146..c83ccdba1e5a 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -609,7 +609,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, | |||
609 | "Front Speaker", "Surround Speaker", "Bass Speaker" | 609 | "Front Speaker", "Surround Speaker", "Bass Speaker" |
610 | }; | 610 | }; |
611 | static const char * const line_outs[] = { | 611 | static const char * const line_outs[] = { |
612 | "Front Line-Out", "Surround Line-Out", "Bass Line-Out" | 612 | "Front Line Out", "Surround Line Out", "Bass Line Out" |
613 | }; | 613 | }; |
614 | 614 | ||
615 | fix_volume_caps(codec, dac); | 615 | fix_volume_caps(codec, dac); |
@@ -635,7 +635,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, | |||
635 | if (num_ctls > 1) | 635 | if (num_ctls > 1) |
636 | name = line_outs[idx]; | 636 | name = line_outs[idx]; |
637 | else | 637 | else |
638 | name = "Line-Out"; | 638 | name = "Line Out"; |
639 | break; | 639 | break; |
640 | } | 640 | } |
641 | 641 | ||
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index f3b79031fcca..5a56fda83625 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3470,7 +3470,7 @@ static int cx_automute_mode_info(struct snd_kcontrol *kcontrol, | |||
3470 | "Disabled", "Enabled" | 3470 | "Disabled", "Enabled" |
3471 | }; | 3471 | }; |
3472 | static const char * const texts3[] = { | 3472 | static const char * const texts3[] = { |
3473 | "Disabled", "Speaker Only", "Line-Out+Speaker" | 3473 | "Disabled", "Speaker Only", "Line Out+Speaker" |
3474 | }; | 3474 | }; |
3475 | const char * const *texts; | 3475 | const char * const *texts; |
3476 | 3476 | ||
@@ -4112,7 +4112,8 @@ static int cx_auto_add_volume_idx(struct hda_codec *codec, const char *basename, | |||
4112 | err = snd_hda_ctl_add(codec, nid, kctl); | 4112 | err = snd_hda_ctl_add(codec, nid, kctl); |
4113 | if (err < 0) | 4113 | if (err < 0) |
4114 | return err; | 4114 | return err; |
4115 | if (!(query_amp_caps(codec, nid, hda_dir) & AC_AMPCAP_MUTE)) | 4115 | if (!(query_amp_caps(codec, nid, hda_dir) & |
4116 | (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))) | ||
4116 | break; | 4117 | break; |
4117 | } | 4118 | } |
4118 | return 0; | 4119 | return 0; |
@@ -4413,6 +4414,22 @@ static const struct snd_pci_quirk cxt_fixups[] = { | |||
4413 | {} | 4414 | {} |
4414 | }; | 4415 | }; |
4415 | 4416 | ||
4417 | /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches | ||
4418 | * can be created (bko#42825) | ||
4419 | */ | ||
4420 | static void add_cx5051_fake_mutes(struct hda_codec *codec) | ||
4421 | { | ||
4422 | static hda_nid_t out_nids[] = { | ||
4423 | 0x10, 0x11, 0 | ||
4424 | }; | ||
4425 | hda_nid_t *p; | ||
4426 | |||
4427 | for (p = out_nids; *p; p++) | ||
4428 | snd_hda_override_amp_caps(codec, *p, HDA_OUTPUT, | ||
4429 | AC_AMPCAP_MIN_MUTE | | ||
4430 | query_amp_caps(codec, *p, HDA_OUTPUT)); | ||
4431 | } | ||
4432 | |||
4416 | static int patch_conexant_auto(struct hda_codec *codec) | 4433 | static int patch_conexant_auto(struct hda_codec *codec) |
4417 | { | 4434 | { |
4418 | struct conexant_spec *spec; | 4435 | struct conexant_spec *spec; |
@@ -4431,6 +4448,9 @@ static int patch_conexant_auto(struct hda_codec *codec) | |||
4431 | case 0x14f15045: | 4448 | case 0x14f15045: |
4432 | spec->single_adc_amp = 1; | 4449 | spec->single_adc_amp = 1; |
4433 | break; | 4450 | break; |
4451 | case 0x14f15051: | ||
4452 | add_cx5051_fake_mutes(codec); | ||
4453 | break; | ||
4434 | } | 4454 | } |
4435 | 4455 | ||
4436 | apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); | 4456 | apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e142f6f5c499..01179d53edcd 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -841,7 +841,7 @@ static int alc_automute_mode_info(struct snd_kcontrol *kcontrol, | |||
841 | "Disabled", "Enabled" | 841 | "Disabled", "Enabled" |
842 | }; | 842 | }; |
843 | static const char * const texts3[] = { | 843 | static const char * const texts3[] = { |
844 | "Disabled", "Speaker Only", "Line-Out+Speaker" | 844 | "Disabled", "Speaker Only", "Line Out+Speaker" |
845 | }; | 845 | }; |
846 | const char * const *texts; | 846 | const char * const *texts; |
847 | 847 | ||
@@ -1856,7 +1856,7 @@ DEFINE_CAPMIX_NOSRC(3); | |||
1856 | */ | 1856 | */ |
1857 | static const char * const alc_slave_pfxs[] = { | 1857 | static const char * const alc_slave_pfxs[] = { |
1858 | "Front", "Surround", "Center", "LFE", "Side", | 1858 | "Front", "Surround", "Center", "LFE", "Side", |
1859 | "Headphone", "Speaker", "Mono", "Line-Out", | 1859 | "Headphone", "Speaker", "Mono", "Line Out", |
1860 | "CLFE", "Bass Speaker", "PCM", | 1860 | "CLFE", "Bass Speaker", "PCM", |
1861 | NULL, | 1861 | NULL, |
1862 | }; | 1862 | }; |
@@ -4147,7 +4147,7 @@ static void alc_auto_init_input_src(struct hda_codec *codec) | |||
4147 | else | 4147 | else |
4148 | nums = spec->num_adc_nids; | 4148 | nums = spec->num_adc_nids; |
4149 | for (c = 0; c < nums; c++) | 4149 | for (c = 0; c < nums; c++) |
4150 | alc_mux_select(codec, 0, spec->cur_mux[c], true); | 4150 | alc_mux_select(codec, c, spec->cur_mux[c], true); |
4151 | } | 4151 | } |
4152 | 4152 | ||
4153 | /* add mic boosts if needed */ | 4153 | /* add mic boosts if needed */ |
@@ -5082,12 +5082,20 @@ static void alc889_fixup_dac_route(struct hda_codec *codec, | |||
5082 | const struct alc_fixup *fix, int action) | 5082 | const struct alc_fixup *fix, int action) |
5083 | { | 5083 | { |
5084 | if (action == ALC_FIXUP_ACT_PRE_PROBE) { | 5084 | if (action == ALC_FIXUP_ACT_PRE_PROBE) { |
5085 | /* fake the connections during parsing the tree */ | ||
5085 | hda_nid_t conn1[2] = { 0x0c, 0x0d }; | 5086 | hda_nid_t conn1[2] = { 0x0c, 0x0d }; |
5086 | hda_nid_t conn2[2] = { 0x0e, 0x0f }; | 5087 | hda_nid_t conn2[2] = { 0x0e, 0x0f }; |
5087 | snd_hda_override_conn_list(codec, 0x14, 2, conn1); | 5088 | snd_hda_override_conn_list(codec, 0x14, 2, conn1); |
5088 | snd_hda_override_conn_list(codec, 0x15, 2, conn1); | 5089 | snd_hda_override_conn_list(codec, 0x15, 2, conn1); |
5089 | snd_hda_override_conn_list(codec, 0x18, 2, conn2); | 5090 | snd_hda_override_conn_list(codec, 0x18, 2, conn2); |
5090 | snd_hda_override_conn_list(codec, 0x1a, 2, conn2); | 5091 | snd_hda_override_conn_list(codec, 0x1a, 2, conn2); |
5092 | } else if (action == ALC_FIXUP_ACT_PROBE) { | ||
5093 | /* restore the connections */ | ||
5094 | hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; | ||
5095 | snd_hda_override_conn_list(codec, 0x14, 5, conn); | ||
5096 | snd_hda_override_conn_list(codec, 0x15, 5, conn); | ||
5097 | snd_hda_override_conn_list(codec, 0x18, 5, conn); | ||
5098 | snd_hda_override_conn_list(codec, 0x1a, 5, conn); | ||
5091 | } | 5099 | } |
5092 | } | 5100 | } |
5093 | 5101 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 8c346ac59d46..5988dbdedc4e 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4638,7 +4638,7 @@ static void stac92xx_hp_detect(struct hda_codec *codec) | |||
4638 | unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN; | 4638 | unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN; |
4639 | if (no_hp_sensing(spec, i)) | 4639 | if (no_hp_sensing(spec, i)) |
4640 | continue; | 4640 | continue; |
4641 | if (presence) | 4641 | if (1 /*presence*/) |
4642 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); | 4642 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); |
4643 | #if 0 /* FIXME */ | 4643 | #if 0 /* FIXME */ |
4644 | /* Resetting the pinctl like below may lead to (a sort of) regressions | 4644 | /* Resetting the pinctl like below may lead to (a sort of) regressions |