diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-17 13:54:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-17 13:54:30 -0400 |
commit | 1ea2a01c1db326f5b594ac086255ed2d9387603b (patch) | |
tree | 19d2ce0c7b8830da5e49b8950d34744a4282be0d | |
parent | 9bca4df258735087f37568feaca694913f1b5a5f (diff) | |
parent | 98973f2f083a5ec580da8bbb685e6baa93613546 (diff) |
Merge tag 'sound-4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"There are two small fixes for HD-audio and USB LINE6, and the rest are
a few new quirks and device ID addition that are good enough to get
into 4.2"
* tag 'sound-4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/realtek: Enable HP amp and mute LED on HP Folio 9480m [v3]
ALSA: line6: Fix -EBUSY error during active monitoring
ALSA: hda - Fix a wrong busy check in alt PCM open
ALSA: hda - add codec ID for Broxton display audio codec
ALSA: usb-audio: Add MIDI support for Steinberg MI2/MI4
-rw-r--r-- | sound/pci/hda/hda_generic.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 55 | ||||
-rw-r--r-- | sound/usb/line6/pcm.c | 9 | ||||
-rw-r--r-- | sound/usb/quirks-table.h | 68 |
5 files changed, 128 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index ac0db1679f09..b077bb644434 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -5175,7 +5175,7 @@ static int alt_playback_pcm_open(struct hda_pcm_stream *hinfo, | |||
5175 | int err = 0; | 5175 | int err = 0; |
5176 | 5176 | ||
5177 | mutex_lock(&spec->pcm_mutex); | 5177 | mutex_lock(&spec->pcm_mutex); |
5178 | if (!spec->indep_hp_enabled) | 5178 | if (spec->indep_hp && !spec->indep_hp_enabled) |
5179 | err = -EBUSY; | 5179 | err = -EBUSY; |
5180 | else | 5180 | else |
5181 | spec->active_streams |= 1 << STREAM_INDEP_HP; | 5181 | spec->active_streams |= 1 << STREAM_INDEP_HP; |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 2f2433845d04..95158914cc6c 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -3527,6 +3527,7 @@ static const struct hda_codec_preset snd_hda_preset_hdmi[] = { | |||
3527 | { .id = 0x80862807, .name = "Haswell HDMI", .patch = patch_generic_hdmi }, | 3527 | { .id = 0x80862807, .name = "Haswell HDMI", .patch = patch_generic_hdmi }, |
3528 | { .id = 0x80862808, .name = "Broadwell HDMI", .patch = patch_generic_hdmi }, | 3528 | { .id = 0x80862808, .name = "Broadwell HDMI", .patch = patch_generic_hdmi }, |
3529 | { .id = 0x80862809, .name = "Skylake HDMI", .patch = patch_generic_hdmi }, | 3529 | { .id = 0x80862809, .name = "Skylake HDMI", .patch = patch_generic_hdmi }, |
3530 | { .id = 0x8086280a, .name = "Broxton HDMI", .patch = patch_generic_hdmi }, | ||
3530 | { .id = 0x80862880, .name = "CedarTrail HDMI", .patch = patch_generic_hdmi }, | 3531 | { .id = 0x80862880, .name = "CedarTrail HDMI", .patch = patch_generic_hdmi }, |
3531 | { .id = 0x80862882, .name = "Valleyview2 HDMI", .patch = patch_generic_hdmi }, | 3532 | { .id = 0x80862882, .name = "Valleyview2 HDMI", .patch = patch_generic_hdmi }, |
3532 | { .id = 0x80862883, .name = "Braswell HDMI", .patch = patch_generic_hdmi }, | 3533 | { .id = 0x80862883, .name = "Braswell HDMI", .patch = patch_generic_hdmi }, |
@@ -3591,6 +3592,7 @@ MODULE_ALIAS("snd-hda-codec-id:80862806"); | |||
3591 | MODULE_ALIAS("snd-hda-codec-id:80862807"); | 3592 | MODULE_ALIAS("snd-hda-codec-id:80862807"); |
3592 | MODULE_ALIAS("snd-hda-codec-id:80862808"); | 3593 | MODULE_ALIAS("snd-hda-codec-id:80862808"); |
3593 | MODULE_ALIAS("snd-hda-codec-id:80862809"); | 3594 | MODULE_ALIAS("snd-hda-codec-id:80862809"); |
3595 | MODULE_ALIAS("snd-hda-codec-id:8086280a"); | ||
3594 | MODULE_ALIAS("snd-hda-codec-id:80862880"); | 3596 | MODULE_ALIAS("snd-hda-codec-id:80862880"); |
3595 | MODULE_ALIAS("snd-hda-codec-id:80862882"); | 3597 | MODULE_ALIAS("snd-hda-codec-id:80862882"); |
3596 | MODULE_ALIAS("snd-hda-codec-id:80862883"); | 3598 | MODULE_ALIAS("snd-hda-codec-id:80862883"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b3b44681d3cf..d35cf506a7db 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4441,6 +4441,55 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec, | |||
4441 | } | 4441 | } |
4442 | } | 4442 | } |
4443 | 4443 | ||
4444 | /* Hook to update amp GPIO4 for automute */ | ||
4445 | static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, | ||
4446 | struct hda_jack_callback *jack) | ||
4447 | { | ||
4448 | struct alc_spec *spec = codec->spec; | ||
4449 | |||
4450 | snd_hda_gen_hp_automute(codec, jack); | ||
4451 | /* mute_led_polarity is set to 0, so we pass inverted value here */ | ||
4452 | alc_update_gpio_led(codec, 0x10, !spec->gen.hp_jack_present); | ||
4453 | } | ||
4454 | |||
4455 | /* Manage GPIOs for HP EliteBook Folio 9480m. | ||
4456 | * | ||
4457 | * GPIO4 is the headphone amplifier power control | ||
4458 | * GPIO3 is the audio output mute indicator LED | ||
4459 | */ | ||
4460 | |||
4461 | static void alc280_fixup_hp_9480m(struct hda_codec *codec, | ||
4462 | const struct hda_fixup *fix, | ||
4463 | int action) | ||
4464 | { | ||
4465 | struct alc_spec *spec = codec->spec; | ||
4466 | static const struct hda_verb gpio_init[] = { | ||
4467 | { 0x01, AC_VERB_SET_GPIO_MASK, 0x18 }, | ||
4468 | { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x18 }, | ||
4469 | {} | ||
4470 | }; | ||
4471 | |||
4472 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
4473 | /* Set the hooks to turn the headphone amp on/off | ||
4474 | * as needed | ||
4475 | */ | ||
4476 | spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook; | ||
4477 | spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook; | ||
4478 | |||
4479 | /* The GPIOs are currently off */ | ||
4480 | spec->gpio_led = 0; | ||
4481 | |||
4482 | /* GPIO3 is connected to the output mute LED, | ||
4483 | * high is on, low is off | ||
4484 | */ | ||
4485 | spec->mute_led_polarity = 0; | ||
4486 | spec->gpio_mute_led_mask = 0x08; | ||
4487 | |||
4488 | /* Initialize GPIO configuration */ | ||
4489 | snd_hda_add_verbs(codec, gpio_init); | ||
4490 | } | ||
4491 | } | ||
4492 | |||
4444 | /* for hda_fixup_thinkpad_acpi() */ | 4493 | /* for hda_fixup_thinkpad_acpi() */ |
4445 | #include "thinkpad_helper.c" | 4494 | #include "thinkpad_helper.c" |
4446 | 4495 | ||
@@ -4521,6 +4570,7 @@ enum { | |||
4521 | ALC286_FIXUP_HP_GPIO_LED, | 4570 | ALC286_FIXUP_HP_GPIO_LED, |
4522 | ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, | 4571 | ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, |
4523 | ALC280_FIXUP_HP_DOCK_PINS, | 4572 | ALC280_FIXUP_HP_DOCK_PINS, |
4573 | ALC280_FIXUP_HP_9480M, | ||
4524 | ALC288_FIXUP_DELL_HEADSET_MODE, | 4574 | ALC288_FIXUP_DELL_HEADSET_MODE, |
4525 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, | 4575 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, |
4526 | ALC288_FIXUP_DELL_XPS_13_GPIO6, | 4576 | ALC288_FIXUP_DELL_XPS_13_GPIO6, |
@@ -5043,6 +5093,10 @@ static const struct hda_fixup alc269_fixups[] = { | |||
5043 | .chained = true, | 5093 | .chained = true, |
5044 | .chain_id = ALC280_FIXUP_HP_GPIO4 | 5094 | .chain_id = ALC280_FIXUP_HP_GPIO4 |
5045 | }, | 5095 | }, |
5096 | [ALC280_FIXUP_HP_9480M] = { | ||
5097 | .type = HDA_FIXUP_FUNC, | ||
5098 | .v.func = alc280_fixup_hp_9480m, | ||
5099 | }, | ||
5046 | [ALC288_FIXUP_DELL_HEADSET_MODE] = { | 5100 | [ALC288_FIXUP_DELL_HEADSET_MODE] = { |
5047 | .type = HDA_FIXUP_FUNC, | 5101 | .type = HDA_FIXUP_FUNC, |
5048 | .v.func = alc_fixup_headset_mode_dell_alc288, | 5102 | .v.func = alc_fixup_headset_mode_dell_alc288, |
@@ -5161,6 +5215,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
5161 | SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 5215 | SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
5162 | SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 5216 | SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
5163 | SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 5217 | SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
5218 | SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M), | ||
5164 | SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 5219 | SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
5165 | SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 5220 | SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
5166 | /* ALC290 */ | 5221 | /* ALC290 */ |
diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c index 8461d6bf992f..204cc074adb9 100644 --- a/sound/usb/line6/pcm.c +++ b/sound/usb/line6/pcm.c | |||
@@ -186,12 +186,8 @@ static int line6_stream_start(struct snd_line6_pcm *line6pcm, int direction, | |||
186 | int ret = 0; | 186 | int ret = 0; |
187 | 187 | ||
188 | spin_lock_irqsave(&pstr->lock, flags); | 188 | spin_lock_irqsave(&pstr->lock, flags); |
189 | if (!test_and_set_bit(type, &pstr->running)) { | 189 | if (!test_and_set_bit(type, &pstr->running) && |
190 | if (pstr->active_urbs || pstr->unlink_urbs) { | 190 | !(pstr->active_urbs || pstr->unlink_urbs)) { |
191 | ret = -EBUSY; | ||
192 | goto error; | ||
193 | } | ||
194 | |||
195 | pstr->count = 0; | 191 | pstr->count = 0; |
196 | /* Submit all currently available URBs */ | 192 | /* Submit all currently available URBs */ |
197 | if (direction == SNDRV_PCM_STREAM_PLAYBACK) | 193 | if (direction == SNDRV_PCM_STREAM_PLAYBACK) |
@@ -199,7 +195,6 @@ static int line6_stream_start(struct snd_line6_pcm *line6pcm, int direction, | |||
199 | else | 195 | else |
200 | ret = line6_submit_audio_in_all_urbs(line6pcm); | 196 | ret = line6_submit_audio_in_all_urbs(line6pcm); |
201 | } | 197 | } |
202 | error: | ||
203 | if (ret < 0) | 198 | if (ret < 0) |
204 | clear_bit(type, &pstr->running); | 199 | clear_bit(type, &pstr->running); |
205 | spin_unlock_irqrestore(&pstr->lock, flags); | 200 | spin_unlock_irqrestore(&pstr->lock, flags); |
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index 2f6d3e9a1bcd..e4756651a52c 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h | |||
@@ -2512,6 +2512,74 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
2512 | } | 2512 | } |
2513 | }, | 2513 | }, |
2514 | 2514 | ||
2515 | /* Steinberg devices */ | ||
2516 | { | ||
2517 | /* Steinberg MI2 */ | ||
2518 | USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x2040), | ||
2519 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | ||
2520 | .ifnum = QUIRK_ANY_INTERFACE, | ||
2521 | .type = QUIRK_COMPOSITE, | ||
2522 | .data = & (const struct snd_usb_audio_quirk[]) { | ||
2523 | { | ||
2524 | .ifnum = 0, | ||
2525 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
2526 | }, | ||
2527 | { | ||
2528 | .ifnum = 1, | ||
2529 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
2530 | }, | ||
2531 | { | ||
2532 | .ifnum = 2, | ||
2533 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
2534 | }, | ||
2535 | { | ||
2536 | .ifnum = 3, | ||
2537 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | ||
2538 | .data = &(const struct snd_usb_midi_endpoint_info) { | ||
2539 | .out_cables = 0x0001, | ||
2540 | .in_cables = 0x0001 | ||
2541 | } | ||
2542 | }, | ||
2543 | { | ||
2544 | .ifnum = -1 | ||
2545 | } | ||
2546 | } | ||
2547 | } | ||
2548 | }, | ||
2549 | { | ||
2550 | /* Steinberg MI4 */ | ||
2551 | USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x4040), | ||
2552 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | ||
2553 | .ifnum = QUIRK_ANY_INTERFACE, | ||
2554 | .type = QUIRK_COMPOSITE, | ||
2555 | .data = & (const struct snd_usb_audio_quirk[]) { | ||
2556 | { | ||
2557 | .ifnum = 0, | ||
2558 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
2559 | }, | ||
2560 | { | ||
2561 | .ifnum = 1, | ||
2562 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
2563 | }, | ||
2564 | { | ||
2565 | .ifnum = 2, | ||
2566 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
2567 | }, | ||
2568 | { | ||
2569 | .ifnum = 3, | ||
2570 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | ||
2571 | .data = &(const struct snd_usb_midi_endpoint_info) { | ||
2572 | .out_cables = 0x0001, | ||
2573 | .in_cables = 0x0001 | ||
2574 | } | ||
2575 | }, | ||
2576 | { | ||
2577 | .ifnum = -1 | ||
2578 | } | ||
2579 | } | ||
2580 | } | ||
2581 | }, | ||
2582 | |||
2515 | /* TerraTec devices */ | 2583 | /* TerraTec devices */ |
2516 | { | 2584 | { |
2517 | USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012), | 2585 | USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012), |