aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-24 10:54:59 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-24 10:54:59 -0400
commita3daf68931679dbd96342099e4d61a99ba98315c (patch)
tree7460f5dfb8cb63fe2b3cc5da3cb4b869bde78bfb /sound/pci
parentb5d6f93b92a37466b43ba105f524bdf046d3bb3c (diff)
parent8de56b7deb2534a586839eda52843c1dae680dc5 (diff)
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_analog.c2
-rw-r--r--sound/pci/hda/patch_realtek.c33
-rw-r--r--sound/pci/hda/patch_sigmatel.c9
3 files changed, 23 insertions, 21 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index be7d25fa7f35..3da85caf8af1 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -3754,7 +3754,7 @@ static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol,
3754 int mute = (!ucontrol->value.integer.value[0] && 3754 int mute = (!ucontrol->value.integer.value[0] &&
3755 !ucontrol->value.integer.value[1]); 3755 !ucontrol->value.integer.value[1]);
3756 /* toggle GPIO1 according to the mute state */ 3756 /* toggle GPIO1 according to the mute state */
3757 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 3757 snd_hda_codec_write_cache(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
3758 mute ? 0x02 : 0x0); 3758 mute ? 0x02 : 0x0);
3759 return ret; 3759 return ret;
3760} 3760}
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b5b36b893b1e..e1563f48243f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10389,6 +10389,18 @@ static void alc262_lenovo_3000_unsol_event(struct hda_codec *codec,
10389 alc262_lenovo_3000_automute(codec, 1); 10389 alc262_lenovo_3000_automute(codec, 1);
10390} 10390}
10391 10391
10392static int amp_stereo_mute_update(struct hda_codec *codec, hda_nid_t nid,
10393 int dir, int idx, long *valp)
10394{
10395 int i, change = 0;
10396
10397 for (i = 0; i < 2; i++, valp++)
10398 change |= snd_hda_codec_amp_update(codec, nid, i, dir, idx,
10399 HDA_AMP_MUTE,
10400 *valp ? 0 : HDA_AMP_MUTE);
10401 return change;
10402}
10403
10392/* bind hp and internal speaker mute (with plug check) */ 10404/* bind hp and internal speaker mute (with plug check) */
10393static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, 10405static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
10394 struct snd_ctl_elem_value *ucontrol) 10406 struct snd_ctl_elem_value *ucontrol)
@@ -10397,13 +10409,8 @@ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
10397 long *valp = ucontrol->value.integer.value; 10409 long *valp = ucontrol->value.integer.value;
10398 int change; 10410 int change;
10399 10411
10400 change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0, 10412 change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
10401 HDA_AMP_MUTE, 10413 change |= amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
10402 valp ? 0 : HDA_AMP_MUTE);
10403 change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
10404 HDA_AMP_MUTE,
10405 valp ? 0 : HDA_AMP_MUTE);
10406
10407 if (change) 10414 if (change)
10408 alc262_fujitsu_automute(codec, 0); 10415 alc262_fujitsu_automute(codec, 0);
10409 return change; 10416 return change;
@@ -10438,10 +10445,7 @@ static int alc262_lenovo_3000_master_sw_put(struct snd_kcontrol *kcontrol,
10438 long *valp = ucontrol->value.integer.value; 10445 long *valp = ucontrol->value.integer.value;
10439 int change; 10446 int change;
10440 10447
10441 change = snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0, 10448 change = amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
10442 HDA_AMP_MUTE,
10443 valp ? 0 : HDA_AMP_MUTE);
10444
10445 if (change) 10449 if (change)
10446 alc262_lenovo_3000_automute(codec, 0); 10450 alc262_lenovo_3000_automute(codec, 0);
10447 return change; 10451 return change;
@@ -11612,12 +11616,7 @@ static int alc268_acer_master_sw_put(struct snd_kcontrol *kcontrol,
11612 long *valp = ucontrol->value.integer.value; 11616 long *valp = ucontrol->value.integer.value;
11613 int change; 11617 int change;
11614 11618
11615 change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, 11619 change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
11616 HDA_AMP_MUTE,
11617 valp[0] ? 0 : HDA_AMP_MUTE);
11618 change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
11619 HDA_AMP_MUTE,
11620 valp[1] ? 0 : HDA_AMP_MUTE);
11621 if (change) 11620 if (change)
11622 alc268_acer_automute(codec, 0); 11621 alc268_acer_automute(codec, 0);
11623 return change; 11622 return change;
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 948600dd3b90..8c48f868d993 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2378,6 +2378,7 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = {
2378 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, 2378 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228,
2379 "Dell Vostro 1500", STAC_9205_DELL_M42), 2379 "Dell Vostro 1500", STAC_9205_DELL_M42),
2380 /* Gateway */ 2380 /* Gateway */
2381 SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD),
2381 SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), 2382 SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD),
2382 {} /* terminator */ 2383 {} /* terminator */
2383}; 2384};
@@ -4065,7 +4066,7 @@ static int stac92xx_add_jack(struct hda_codec *codec,
4065 jack->nid = nid; 4066 jack->nid = nid;
4066 jack->type = type; 4067 jack->type = type;
4067 4068
4068 sprintf(name, "%s at %s %s Jack", 4069 snprintf(name, sizeof(name), "%s at %s %s Jack",
4069 snd_hda_get_jack_type(def_conf), 4070 snd_hda_get_jack_type(def_conf),
4070 snd_hda_get_jack_connectivity(def_conf), 4071 snd_hda_get_jack_connectivity(def_conf),
4071 snd_hda_get_jack_location(def_conf)); 4072 snd_hda_get_jack_location(def_conf));
@@ -5870,6 +5871,8 @@ static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = {
5870}; 5871};
5871 5872
5872static struct snd_pci_quirk stac9872_cfg_tbl[] = { 5873static struct snd_pci_quirk stac9872_cfg_tbl[] = {
5874 SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
5875 "Sony VAIO F/S", STAC_9872_VAIO),
5873 {} /* terminator */ 5876 {} /* terminator */
5874}; 5877};
5875 5878
@@ -5882,6 +5885,8 @@ static int patch_stac9872(struct hda_codec *codec)
5882 if (spec == NULL) 5885 if (spec == NULL)
5883 return -ENOMEM; 5886 return -ENOMEM;
5884 codec->spec = spec; 5887 codec->spec = spec;
5888 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
5889 spec->pin_nids = stac9872_pin_nids;
5885 5890
5886 spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, 5891 spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS,
5887 stac9872_models, 5892 stac9872_models,
@@ -5893,8 +5898,6 @@ static int patch_stac9872(struct hda_codec *codec)
5893 stac92xx_set_config_regs(codec, 5898 stac92xx_set_config_regs(codec,
5894 stac9872_brd_tbl[spec->board_config]); 5899 stac9872_brd_tbl[spec->board_config]);
5895 5900
5896 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
5897 spec->pin_nids = stac9872_pin_nids;
5898 spec->multiout.dac_nids = spec->dac_nids; 5901 spec->multiout.dac_nids = spec->dac_nids;
5899 spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids); 5902 spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids);
5900 spec->adc_nids = stac9872_adc_nids; 5903 spec->adc_nids = stac9872_adc_nids;