aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-07 16:05:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-07 16:05:18 -0400
commit308f8813de2b608e8de436fa03a795d2e94f1a1f (patch)
tree220f7fd5258b691c525aa434cb8e58cd78f5020c /sound/pci
parent3132aef2ed51d0248c89b102247be73f44e2b826 (diff)
parent11e7064f35bb87da8f427d1aa4bbd8b7473a3993 (diff)
Merge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: - A pile of small regression fix patches for HD-audio VIA codecs - Quirks for HD-aduio and USB-audio devices - A trivial SIS7019 error path fix * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270 ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface ALSA: hda/via - Clean up duplicated codes ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802 ALSA: hda - Add keep_eapd_on flag to generic parser ALSA: hda - Allow setting automute/automic hooks after parsing ALSA: hda/via - Disable broken dynamic power control ALSA: usb-audio: fix Roland/Cakewalk UM-3G support ALSA: hda - Add headset quirk for two Dell machines ALSA: hda - add dock support for Thinkpad T431s ALSA: sis7019: fix error return code in sis_chip_create()
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_generic.c68
-rw-r--r--sound/pci/hda/hda_generic.h1
-rw-r--r--sound/pci/hda/patch_realtek.c3
-rw-r--r--sound/pci/hda/patch_via.c10
-rw-r--r--sound/pci/sis7019.c3
5 files changed, 53 insertions, 32 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index ae85bbd2e6f8..4b1524a861f3 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -788,6 +788,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable)
788 return; 788 return;
789 if (codec->inv_eapd) 789 if (codec->inv_eapd)
790 enable = !enable; 790 enable = !enable;
791 if (spec->keep_eapd_on && !enable)
792 return;
791 snd_hda_codec_update_cache(codec, pin, 0, 793 snd_hda_codec_update_cache(codec, pin, 0,
792 AC_VERB_SET_EAPD_BTLENABLE, 794 AC_VERB_SET_EAPD_BTLENABLE,
793 enable ? 0x02 : 0x00); 795 enable ? 0x02 : 0x00);
@@ -1938,17 +1940,7 @@ static int create_speaker_out_ctls(struct hda_codec *codec)
1938 * independent HP controls 1940 * independent HP controls
1939 */ 1941 */
1940 1942
1941/* update HP auto-mute state too */ 1943static void call_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack);
1942static void update_hp_automute_hook(struct hda_codec *codec)
1943{
1944 struct hda_gen_spec *spec = codec->spec;
1945
1946 if (spec->hp_automute_hook)
1947 spec->hp_automute_hook(codec, NULL);
1948 else
1949 snd_hda_gen_hp_automute(codec, NULL);
1950}
1951
1952static int indep_hp_info(struct snd_kcontrol *kcontrol, 1944static int indep_hp_info(struct snd_kcontrol *kcontrol,
1953 struct snd_ctl_elem_info *uinfo) 1945 struct snd_ctl_elem_info *uinfo)
1954{ 1946{
@@ -2009,7 +2001,7 @@ static int indep_hp_put(struct snd_kcontrol *kcontrol,
2009 else 2001 else
2010 *dacp = spec->alt_dac_nid; 2002 *dacp = spec->alt_dac_nid;
2011 2003
2012 update_hp_automute_hook(codec); 2004 call_hp_automute(codec, NULL);
2013 ret = 1; 2005 ret = 1;
2014 } 2006 }
2015 unlock: 2007 unlock:
@@ -2305,7 +2297,7 @@ static void update_hp_mic(struct hda_codec *codec, int adc_mux, bool force)
2305 else 2297 else
2306 val = PIN_HP; 2298 val = PIN_HP;
2307 set_pin_target(codec, pin, val, true); 2299 set_pin_target(codec, pin, val, true);
2308 update_hp_automute_hook(codec); 2300 call_hp_automute(codec, NULL);
2309 } 2301 }
2310} 2302}
2311 2303
@@ -2714,7 +2706,7 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol,
2714 val = snd_hda_get_default_vref(codec, nid); 2706 val = snd_hda_get_default_vref(codec, nid);
2715 } 2707 }
2716 snd_hda_set_pin_ctl_cache(codec, nid, val); 2708 snd_hda_set_pin_ctl_cache(codec, nid, val);
2717 update_hp_automute_hook(codec); 2709 call_hp_automute(codec, NULL);
2718 2710
2719 return 1; 2711 return 1;
2720} 2712}
@@ -3859,20 +3851,42 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, struct hda_jack_tbl *ja
3859} 3851}
3860EXPORT_SYMBOL_HDA(snd_hda_gen_mic_autoswitch); 3852EXPORT_SYMBOL_HDA(snd_hda_gen_mic_autoswitch);
3861 3853
3862/* update jack retasking */ 3854/* call appropriate hooks */
3863static void update_automute_all(struct hda_codec *codec) 3855static void call_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack)
3864{ 3856{
3865 struct hda_gen_spec *spec = codec->spec; 3857 struct hda_gen_spec *spec = codec->spec;
3858 if (spec->hp_automute_hook)
3859 spec->hp_automute_hook(codec, jack);
3860 else
3861 snd_hda_gen_hp_automute(codec, jack);
3862}
3866 3863
3867 update_hp_automute_hook(codec); 3864static void call_line_automute(struct hda_codec *codec,
3865 struct hda_jack_tbl *jack)
3866{
3867 struct hda_gen_spec *spec = codec->spec;
3868 if (spec->line_automute_hook) 3868 if (spec->line_automute_hook)
3869 spec->line_automute_hook(codec, NULL); 3869 spec->line_automute_hook(codec, jack);
3870 else 3870 else
3871 snd_hda_gen_line_automute(codec, NULL); 3871 snd_hda_gen_line_automute(codec, jack);
3872}
3873
3874static void call_mic_autoswitch(struct hda_codec *codec,
3875 struct hda_jack_tbl *jack)
3876{
3877 struct hda_gen_spec *spec = codec->spec;
3872 if (spec->mic_autoswitch_hook) 3878 if (spec->mic_autoswitch_hook)
3873 spec->mic_autoswitch_hook(codec, NULL); 3879 spec->mic_autoswitch_hook(codec, jack);
3874 else 3880 else
3875 snd_hda_gen_mic_autoswitch(codec, NULL); 3881 snd_hda_gen_mic_autoswitch(codec, jack);
3882}
3883
3884/* update jack retasking */
3885static void update_automute_all(struct hda_codec *codec)
3886{
3887 call_hp_automute(codec, NULL);
3888 call_line_automute(codec, NULL);
3889 call_mic_autoswitch(codec, NULL);
3876} 3890}
3877 3891
3878/* 3892/*
@@ -4009,9 +4023,7 @@ static int check_auto_mute_availability(struct hda_codec *codec)
4009 snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n", 4023 snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n",
4010 nid); 4024 nid);
4011 snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT, 4025 snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT,
4012 spec->hp_automute_hook ? 4026 call_hp_automute);
4013 spec->hp_automute_hook :
4014 snd_hda_gen_hp_automute);
4015 spec->detect_hp = 1; 4027 spec->detect_hp = 1;
4016 } 4028 }
4017 4029
@@ -4024,9 +4036,7 @@ static int check_auto_mute_availability(struct hda_codec *codec)
4024 snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid); 4036 snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid);
4025 snd_hda_jack_detect_enable_callback(codec, nid, 4037 snd_hda_jack_detect_enable_callback(codec, nid,
4026 HDA_GEN_FRONT_EVENT, 4038 HDA_GEN_FRONT_EVENT,
4027 spec->line_automute_hook ? 4039 call_line_automute);
4028 spec->line_automute_hook :
4029 snd_hda_gen_line_automute);
4030 spec->detect_lo = 1; 4040 spec->detect_lo = 1;
4031 } 4041 }
4032 spec->automute_lo_possible = spec->detect_hp; 4042 spec->automute_lo_possible = spec->detect_hp;
@@ -4068,9 +4078,7 @@ static bool auto_mic_check_imux(struct hda_codec *codec)
4068 snd_hda_jack_detect_enable_callback(codec, 4078 snd_hda_jack_detect_enable_callback(codec,
4069 spec->am_entry[i].pin, 4079 spec->am_entry[i].pin,
4070 HDA_GEN_MIC_EVENT, 4080 HDA_GEN_MIC_EVENT,
4071 spec->mic_autoswitch_hook ? 4081 call_mic_autoswitch);
4072 spec->mic_autoswitch_hook :
4073 snd_hda_gen_mic_autoswitch);
4074 return true; 4082 return true;
4075} 4083}
4076 4084
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 54e665160379..76200314ee95 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -222,6 +222,7 @@ struct hda_gen_spec {
222 unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */ 222 unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */
223 unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */ 223 unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
224 unsigned int own_eapd_ctl:1; /* set EAPD by own function */ 224 unsigned int own_eapd_ctl:1; /* set EAPD by own function */
225 unsigned int keep_eapd_on:1; /* don't turn off EAPD automatically */
225 unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */ 226 unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */
226 unsigned int indep_hp:1; /* independent HP supported */ 227 unsigned int indep_hp:1; /* independent HP supported */
227 unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */ 228 unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 59d2e91a9ab6..02e22b4458d2 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3493,6 +3493,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3493 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3493 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3494 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3494 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3495 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3495 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3496 SND_PCI_QUIRK(0x1028, 0x05f8, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3497 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3496 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 3498 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
3497 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED), 3499 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
3498 SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), 3500 SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
@@ -3530,6 +3532,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3530 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), 3532 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
3531 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK), 3533 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
3532 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), 3534 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
3535 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
3533 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), 3536 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
3534 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 3537 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
3535 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 3538 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e0dadcf2030d..e5245544eb52 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
136 spec->codec_type = VT1708S; 136 spec->codec_type = VT1708S;
137 spec->no_pin_power_ctl = 1; 137 spec->no_pin_power_ctl = 1;
138 spec->gen.indep_hp = 1; 138 spec->gen.indep_hp = 1;
139 spec->gen.keep_eapd_on = 1;
139 spec->gen.pcm_playback_hook = via_playback_pcm_hook; 140 spec->gen.pcm_playback_hook = via_playback_pcm_hook;
140 return spec; 141 return spec;
141} 142}
@@ -231,9 +232,14 @@ static void vt1708_update_hp_work(struct hda_codec *codec)
231 232
232static void set_widgets_power_state(struct hda_codec *codec) 233static void set_widgets_power_state(struct hda_codec *codec)
233{ 234{
235#if 0 /* FIXME: the assumed connections don't match always with the
236 * actual routes by the generic parser, so better to disable
237 * the control for safety.
238 */
234 struct via_spec *spec = codec->spec; 239 struct via_spec *spec = codec->spec;
235 if (spec->set_widgets_power_state) 240 if (spec->set_widgets_power_state)
236 spec->set_widgets_power_state(codec); 241 spec->set_widgets_power_state(codec);
242#endif
237} 243}
238 244
239static void update_power_state(struct hda_codec *codec, hda_nid_t nid, 245static void update_power_state(struct hda_codec *codec, hda_nid_t nid,
@@ -478,7 +484,9 @@ static int via_suspend(struct hda_codec *codec)
478 /* Fix pop noise on headphones */ 484 /* Fix pop noise on headphones */
479 int i; 485 int i;
480 for (i = 0; i < spec->gen.autocfg.hp_outs; i++) 486 for (i = 0; i < spec->gen.autocfg.hp_outs; i++)
481 snd_hda_set_pin_ctl(codec, spec->gen.autocfg.hp_pins[i], 0); 487 snd_hda_codec_write(codec, spec->gen.autocfg.hp_pins[i],
488 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
489 0x00);
482 } 490 }
483 491
484 return 0; 492 return 0;
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index d59abe1682c5..748e82d4d257 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1341,7 +1341,8 @@ static int sis_chip_create(struct snd_card *card,
1341 if (rc) 1341 if (rc)
1342 goto error_out; 1342 goto error_out;
1343 1343
1344 if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0) { 1344 rc = pci_set_dma_mask(pci, DMA_BIT_MASK(30));
1345 if (rc < 0) {
1345 dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA"); 1346 dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA");
1346 goto error_out_enabled; 1347 goto error_out_enabled;
1347 } 1348 }