Commit 308f8813 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 3132aef2 11e7064f
...@@ -788,6 +788,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable) ...@@ -788,6 +788,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable)
return; return;
if (codec->inv_eapd) if (codec->inv_eapd)
enable = !enable; enable = !enable;
if (spec->keep_eapd_on && !enable)
return;
snd_hda_codec_update_cache(codec, pin, 0, snd_hda_codec_update_cache(codec, pin, 0,
AC_VERB_SET_EAPD_BTLENABLE, AC_VERB_SET_EAPD_BTLENABLE,
enable ? 0x02 : 0x00); enable ? 0x02 : 0x00);
...@@ -1938,17 +1940,7 @@ static int create_speaker_out_ctls(struct hda_codec *codec) ...@@ -1938,17 +1940,7 @@ static int create_speaker_out_ctls(struct hda_codec *codec)
* independent HP controls * independent HP controls
*/ */
/* update HP auto-mute state too */ static void call_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack);
static void update_hp_automute_hook(struct hda_codec *codec)
{
struct hda_gen_spec *spec = codec->spec;
if (spec->hp_automute_hook)
spec->hp_automute_hook(codec, NULL);
else
snd_hda_gen_hp_automute(codec, NULL);
}
static int indep_hp_info(struct snd_kcontrol *kcontrol, static int indep_hp_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) struct snd_ctl_elem_info *uinfo)
{ {
...@@ -2009,7 +2001,7 @@ static int indep_hp_put(struct snd_kcontrol *kcontrol, ...@@ -2009,7 +2001,7 @@ static int indep_hp_put(struct snd_kcontrol *kcontrol,
else else
*dacp = spec->alt_dac_nid; *dacp = spec->alt_dac_nid;
update_hp_automute_hook(codec); call_hp_automute(codec, NULL);
ret = 1; ret = 1;
} }
unlock: unlock:
...@@ -2305,7 +2297,7 @@ static void update_hp_mic(struct hda_codec *codec, int adc_mux, bool force) ...@@ -2305,7 +2297,7 @@ static void update_hp_mic(struct hda_codec *codec, int adc_mux, bool force)
else else
val = PIN_HP; val = PIN_HP;
set_pin_target(codec, pin, val, true); set_pin_target(codec, pin, val, true);
update_hp_automute_hook(codec); call_hp_automute(codec, NULL);
} }
} }
...@@ -2714,7 +2706,7 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol, ...@@ -2714,7 +2706,7 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol,
val = snd_hda_get_default_vref(codec, nid); val = snd_hda_get_default_vref(codec, nid);
} }
snd_hda_set_pin_ctl_cache(codec, nid, val); snd_hda_set_pin_ctl_cache(codec, nid, val);
update_hp_automute_hook(codec); call_hp_automute(codec, NULL);
return 1; return 1;
} }
...@@ -3859,20 +3851,42 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, struct hda_jack_tbl *ja ...@@ -3859,20 +3851,42 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, struct hda_jack_tbl *ja
} }
EXPORT_SYMBOL_HDA(snd_hda_gen_mic_autoswitch); EXPORT_SYMBOL_HDA(snd_hda_gen_mic_autoswitch);
/* update jack retasking */ /* call appropriate hooks */
static void update_automute_all(struct hda_codec *codec) static void call_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack)
{ {
struct hda_gen_spec *spec = codec->spec; struct hda_gen_spec *spec = codec->spec;
if (spec->hp_automute_hook)
spec->hp_automute_hook(codec, jack);
else
snd_hda_gen_hp_automute(codec, jack);
}
update_hp_automute_hook(codec); static void call_line_automute(struct hda_codec *codec,
struct hda_jack_tbl *jack)
{
struct hda_gen_spec *spec = codec->spec;
if (spec->line_automute_hook) if (spec->line_automute_hook)
spec->line_automute_hook(codec, NULL); spec->line_automute_hook(codec, jack);
else else
snd_hda_gen_line_automute(codec, NULL); snd_hda_gen_line_automute(codec, jack);
}
static void call_mic_autoswitch(struct hda_codec *codec,
struct hda_jack_tbl *jack)
{
struct hda_gen_spec *spec = codec->spec;
if (spec->mic_autoswitch_hook) if (spec->mic_autoswitch_hook)
spec->mic_autoswitch_hook(codec, NULL); spec->mic_autoswitch_hook(codec, jack);
else else
snd_hda_gen_mic_autoswitch(codec, NULL); snd_hda_gen_mic_autoswitch(codec, jack);
}
/* update jack retasking */
static void update_automute_all(struct hda_codec *codec)
{
call_hp_automute(codec, NULL);
call_line_automute(codec, NULL);
call_mic_autoswitch(codec, NULL);
} }
/* /*
...@@ -4009,9 +4023,7 @@ static int check_auto_mute_availability(struct hda_codec *codec) ...@@ -4009,9 +4023,7 @@ static int check_auto_mute_availability(struct hda_codec *codec)
snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n", snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n",
nid); nid);
snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT, snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT,
spec->hp_automute_hook ? call_hp_automute);
spec->hp_automute_hook :
snd_hda_gen_hp_automute);
spec->detect_hp = 1; spec->detect_hp = 1;
} }
...@@ -4024,9 +4036,7 @@ static int check_auto_mute_availability(struct hda_codec *codec) ...@@ -4024,9 +4036,7 @@ static int check_auto_mute_availability(struct hda_codec *codec)
snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid); snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid);
snd_hda_jack_detect_enable_callback(codec, nid, snd_hda_jack_detect_enable_callback(codec, nid,
HDA_GEN_FRONT_EVENT, HDA_GEN_FRONT_EVENT,
spec->line_automute_hook ? call_line_automute);
spec->line_automute_hook :
snd_hda_gen_line_automute);
spec->detect_lo = 1; spec->detect_lo = 1;
} }
spec->automute_lo_possible = spec->detect_hp; spec->automute_lo_possible = spec->detect_hp;
...@@ -4068,9 +4078,7 @@ static bool auto_mic_check_imux(struct hda_codec *codec) ...@@ -4068,9 +4078,7 @@ static bool auto_mic_check_imux(struct hda_codec *codec)
snd_hda_jack_detect_enable_callback(codec, snd_hda_jack_detect_enable_callback(codec,
spec->am_entry[i].pin, spec->am_entry[i].pin,
HDA_GEN_MIC_EVENT, HDA_GEN_MIC_EVENT,
spec->mic_autoswitch_hook ? call_mic_autoswitch);
spec->mic_autoswitch_hook :
snd_hda_gen_mic_autoswitch);
return true; return true;
} }
......
...@@ -222,6 +222,7 @@ struct hda_gen_spec { ...@@ -222,6 +222,7 @@ struct hda_gen_spec {
unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */ unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */
unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */ unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
unsigned int own_eapd_ctl:1; /* set EAPD by own function */ unsigned int own_eapd_ctl:1; /* set EAPD by own function */
unsigned int keep_eapd_on:1; /* don't turn off EAPD automatically */
unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */ unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */
unsigned int indep_hp:1; /* independent HP supported */ unsigned int indep_hp:1; /* independent HP supported */
unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */ unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */
......
...@@ -3493,6 +3493,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -3493,6 +3493,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x05f8, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), 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,6 +3532,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK), SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
......
...@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec) ...@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
spec->codec_type = VT1708S; spec->codec_type = VT1708S;
spec->no_pin_power_ctl = 1; spec->no_pin_power_ctl = 1;
spec->gen.indep_hp = 1; spec->gen.indep_hp = 1;
spec->gen.keep_eapd_on = 1;
spec->gen.pcm_playback_hook = via_playback_pcm_hook; spec->gen.pcm_playback_hook = via_playback_pcm_hook;
return spec; return spec;
} }
...@@ -231,9 +232,14 @@ static void vt1708_update_hp_work(struct hda_codec *codec) ...@@ -231,9 +232,14 @@ static void vt1708_update_hp_work(struct hda_codec *codec)
static void set_widgets_power_state(struct hda_codec *codec) static void set_widgets_power_state(struct hda_codec *codec)
{ {
#if 0 /* FIXME: the assumed connections don't match always with the
* actual routes by the generic parser, so better to disable
* the control for safety.
*/
struct via_spec *spec = codec->spec; struct via_spec *spec = codec->spec;
if (spec->set_widgets_power_state) if (spec->set_widgets_power_state)
spec->set_widgets_power_state(codec); spec->set_widgets_power_state(codec);
#endif
} }
static void update_power_state(struct hda_codec *codec, hda_nid_t nid, static 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,7 +484,9 @@ static int via_suspend(struct hda_codec *codec)
/* Fix pop noise on headphones */ /* Fix pop noise on headphones */
int i; int i;
for (i = 0; i < spec->gen.autocfg.hp_outs; i++) for (i = 0; i < spec->gen.autocfg.hp_outs; i++)
snd_hda_set_pin_ctl(codec, spec->gen.autocfg.hp_pins[i], 0); snd_hda_codec_write(codec, spec->gen.autocfg.hp_pins[i],
0, AC_VERB_SET_PIN_WIDGET_CONTROL,
0x00);
} }
return 0; return 0;
......
...@@ -1341,7 +1341,8 @@ static int sis_chip_create(struct snd_card *card, ...@@ -1341,7 +1341,8 @@ static int sis_chip_create(struct snd_card *card,
if (rc) if (rc)
goto error_out; goto error_out;
if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0) { rc = pci_set_dma_mask(pci, DMA_BIT_MASK(30));
if (rc < 0) {
dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA"); dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA");
goto error_out_enabled; goto error_out_enabled;
} }
......
...@@ -886,6 +886,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, ...@@ -886,6 +886,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
case USB_ID(0x046d, 0x0808): case USB_ID(0x046d, 0x0808):
case USB_ID(0x046d, 0x0809): case USB_ID(0x046d, 0x0809):
case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
case USB_ID(0x046d, 0x0991): case USB_ID(0x046d, 0x0991):
/* Most audio usb devices lie about volume resolution. /* Most audio usb devices lie about volume resolution.
* Most Logitech webcams have res = 384. * Most Logitech webcams have res = 384.
......
...@@ -215,7 +215,13 @@ ...@@ -215,7 +215,13 @@
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
}, },
{ {
USB_DEVICE(0x046d, 0x0990), .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.idVendor = 0x046d,
.idProduct = 0x0990,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
.vendor_name = "Logitech, Inc.", .vendor_name = "Logitech, Inc.",
.product_name = "QuickCam Pro 9000", .product_name = "QuickCam Pro 9000",
...@@ -1792,7 +1798,11 @@ YAMAHA_DEVICE(0x7010, "UB99"), ...@@ -1792,7 +1798,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108), USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
.ifnum = 0, .ifnum = 0,
.type = QUIRK_MIDI_STANDARD_INTERFACE .type = QUIRK_MIDI_FIXED_ENDPOINT,
.data = & (const struct snd_usb_midi_endpoint_info) {
.out_cables = 0x0007,
.in_cables = 0x0007
}
} }
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment