Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Here are no big surprises but just all small fixes, mostly
device-specific quirks for HD-audio and USB-audio:

- Fix for detection of FireWire DICE Loud devices
- Intel Broxton HDMI/DP PCI IDs and relevant quirks
- Noise fixes: Dell XPS13 2015 model, Dell Latitude E6440, Gigabyte
Z170X mobo
- Fix the headphone mixer assignment on HP laptops for PulseAudio
- USB-MIDI fixes for Medeli DD305 and CH345
- Apply fixup for Acer Aspire One Cloudbook 14"

* tag 'sound-4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix noise on Gigabyte Z170X mobo
ALSA: hda - Fix headphone noise after Dell XPS 13 resume back from S3
ALSA: hda - Apply HP headphone fixups more generically
ALSA: hda - Add fixup for Acer Aspire One Cloudbook 14
ALSA: hda - apply SKL display power request/release patch to BXT
ALSA: hda - add PCI IDs for Intel Broxton
ALSA: usb-audio: work around CH345 input SysEx corruption
ALSA: usb-audio: prevent CH345 multiport output SysEx corruption
ALSA: usb-audio: add packet size quirk for the Medeli DD305
ALSA: dice: fix detection of Loud devices
ALSA: hda - Fix noise on Dell Latitude E6440

+124 -17
+4
sound/firewire/dice/dice.c
··· 12 12 MODULE_LICENSE("GPL v2"); 13 13 14 14 #define OUI_WEISS 0x001c6a 15 + #define OUI_LOUD 0x000ff2 15 16 16 17 #define DICE_CATEGORY_ID 0x04 17 18 #define WEISS_CATEGORY_ID 0x00 19 + #define LOUD_CATEGORY_ID 0x10 18 20 19 21 static int dice_interface_check(struct fw_unit *unit) 20 22 { ··· 59 57 } 60 58 if (vendor == OUI_WEISS) 61 59 category = WEISS_CATEGORY_ID; 60 + else if (vendor == OUI_LOUD) 61 + category = LOUD_CATEGORY_ID; 62 62 else 63 63 category = DICE_CATEGORY_ID; 64 64 if (device->config_rom[3] != ((vendor << 8) | category) ||
+7
sound/pci/hda/hda_intel.c
··· 312 312 (AZX_DCAPS_INTEL_PCH | AZX_DCAPS_SEPARATE_STREAM_TAG |\ 313 313 AZX_DCAPS_I915_POWERWELL) 314 314 315 + #define AZX_DCAPS_INTEL_BROXTON \ 316 + (AZX_DCAPS_INTEL_PCH | AZX_DCAPS_SEPARATE_STREAM_TAG |\ 317 + AZX_DCAPS_I915_POWERWELL) 318 + 315 319 /* quirks for ATI SB / AMD Hudson */ 316 320 #define AZX_DCAPS_PRESET_ATI_SB \ 317 321 (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB |\ ··· 2128 2124 /* Sunrise Point-LP */ 2129 2125 { PCI_DEVICE(0x8086, 0x9d70), 2130 2126 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, 2127 + /* Broxton-P(Apollolake) */ 2128 + { PCI_DEVICE(0x8086, 0x5a98), 2129 + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2131 2130 /* Haswell */ 2132 2131 { PCI_DEVICE(0x8086, 0x0a0c), 2133 2132 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
+2 -1
sound/pci/hda/patch_hdmi.c
··· 2378 2378 * can cover the codec power request, and so need not set this flag. 2379 2379 * For previous platforms, there is no such power well feature. 2380 2380 */ 2381 - if (is_valleyview_plus(codec) || is_skylake(codec)) 2381 + if (is_valleyview_plus(codec) || is_skylake(codec) || 2382 + is_broxton(codec)) 2382 2383 codec->core.link_power_control = 1; 2383 2384 2384 2385 if (is_haswell_plus(codec) || is_valleyview_plus(codec)) {
+23
sound/pci/hda/patch_realtek.c
··· 1759 1759 ALC882_FIXUP_NO_PRIMARY_HP, 1760 1760 ALC887_FIXUP_ASUS_BASS, 1761 1761 ALC887_FIXUP_BASS_CHMAP, 1762 + ALC882_FIXUP_DISABLE_AAMIX, 1762 1763 }; 1763 1764 1764 1765 static void alc889_fixup_coef(struct hda_codec *codec, ··· 1921 1920 1922 1921 static void alc_fixup_bass_chmap(struct hda_codec *codec, 1923 1922 const struct hda_fixup *fix, int action); 1923 + static void alc_fixup_disable_aamix(struct hda_codec *codec, 1924 + const struct hda_fixup *fix, int action); 1924 1925 1925 1926 static const struct hda_fixup alc882_fixups[] = { 1926 1927 [ALC882_FIXUP_ABIT_AW9D_MAX] = { ··· 2154 2151 .type = HDA_FIXUP_FUNC, 2155 2152 .v.func = alc_fixup_bass_chmap, 2156 2153 }, 2154 + [ALC882_FIXUP_DISABLE_AAMIX] = { 2155 + .type = HDA_FIXUP_FUNC, 2156 + .v.func = alc_fixup_disable_aamix, 2157 + }, 2157 2158 }; 2158 2159 2159 2160 static const struct snd_pci_quirk alc882_fixup_tbl[] = { ··· 2225 2218 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD), 2226 2219 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), 2227 2220 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), 2221 + SND_PCI_QUIRK(0x1458, 0xa182, "Gigabyte Z170X-UD3", ALC882_FIXUP_DISABLE_AAMIX), 2228 2222 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 2229 2223 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 2230 2224 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), ··· 4595 4587 ALC292_FIXUP_DISABLE_AAMIX, 4596 4588 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 4597 4589 ALC275_FIXUP_DELL_XPS, 4590 + ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE, 4598 4591 }; 4599 4592 4600 4593 static const struct hda_fixup alc269_fixups[] = { ··· 5176 5167 {} 5177 5168 } 5178 5169 }, 5170 + [ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE] = { 5171 + .type = HDA_FIXUP_VERBS, 5172 + .v.verbs = (const struct hda_verb[]) { 5173 + /* Disable pass-through path for FRONT 14h */ 5174 + {0x20, AC_VERB_SET_COEF_INDEX, 0x36}, 5175 + {0x20, AC_VERB_SET_PROC_COEF, 0x1737}, 5176 + {} 5177 + }, 5178 + .chained = true, 5179 + .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 5180 + }, 5179 5181 }; 5180 5182 5181 5183 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 5200 5180 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), 5201 5181 SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), 5202 5182 SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS), 5183 + SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK), 5203 5184 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 5204 5185 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), 5186 + SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), 5205 5187 SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X), 5206 5188 SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X), 5207 5189 SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER), ··· 5226 5204 SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC292_FIXUP_DISABLE_AAMIX), 5227 5205 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC292_FIXUP_DISABLE_AAMIX), 5228 5206 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC292_FIXUP_DISABLE_AAMIX), 5207 + SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), 5229 5208 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5230 5209 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5231 5210 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
+29 -16
sound/pci/hda/patch_sigmatel.c
··· 3110 3110 spec->gpio_led = 0x08; 3111 3111 } 3112 3112 3113 + static bool is_hp_output(struct hda_codec *codec, hda_nid_t pin) 3114 + { 3115 + unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin); 3116 + 3117 + /* count line-out, too, as BIOS sets often so */ 3118 + return get_defcfg_connect(pin_cfg) != AC_JACK_PORT_NONE && 3119 + (get_defcfg_device(pin_cfg) == AC_JACK_LINE_OUT || 3120 + get_defcfg_device(pin_cfg) == AC_JACK_HP_OUT); 3121 + } 3122 + 3123 + static void fixup_hp_headphone(struct hda_codec *codec, hda_nid_t pin) 3124 + { 3125 + unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin); 3126 + 3127 + /* It was changed in the BIOS to just satisfy MS DTM. 3128 + * Lets turn it back into slaved HP 3129 + */ 3130 + pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE)) | 3131 + (AC_JACK_HP_OUT << AC_DEFCFG_DEVICE_SHIFT); 3132 + pin_cfg = (pin_cfg & (~(AC_DEFCFG_DEF_ASSOC | AC_DEFCFG_SEQUENCE))) | 3133 + 0x1f; 3134 + snd_hda_codec_set_pincfg(codec, pin, pin_cfg); 3135 + } 3113 3136 3114 3137 static void stac92hd71bxx_fixup_hp(struct hda_codec *codec, 3115 3138 const struct hda_fixup *fix, int action) ··· 3142 3119 if (action != HDA_FIXUP_ACT_PRE_PROBE) 3143 3120 return; 3144 3121 3145 - if (hp_blike_system(codec->core.subsystem_id)) { 3146 - unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, 0x0f); 3147 - if (get_defcfg_device(pin_cfg) == AC_JACK_LINE_OUT || 3148 - get_defcfg_device(pin_cfg) == AC_JACK_SPEAKER || 3149 - get_defcfg_device(pin_cfg) == AC_JACK_HP_OUT) { 3150 - /* It was changed in the BIOS to just satisfy MS DTM. 3151 - * Lets turn it back into slaved HP 3152 - */ 3153 - pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE)) 3154 - | (AC_JACK_HP_OUT << 3155 - AC_DEFCFG_DEVICE_SHIFT); 3156 - pin_cfg = (pin_cfg & (~(AC_DEFCFG_DEF_ASSOC 3157 - | AC_DEFCFG_SEQUENCE))) 3158 - | 0x1f; 3159 - snd_hda_codec_set_pincfg(codec, 0x0f, pin_cfg); 3160 - } 3122 + /* when both output A and F are assigned, these are supposedly 3123 + * dock and built-in headphones; fix both pin configs 3124 + */ 3125 + if (is_hp_output(codec, 0x0a) && is_hp_output(codec, 0x0f)) { 3126 + fixup_hp_headphone(codec, 0x0a); 3127 + fixup_hp_headphone(codec, 0x0f); 3161 3128 } 3162 3129 3163 3130 if (find_mute_led_cfg(codec, 1))
+46
sound/usb/midi.c
··· 174 174 u8 running_status_length; 175 175 } ports[0x10]; 176 176 u8 seen_f5; 177 + bool in_sysex; 178 + u8 last_cin; 177 179 u8 error_resubmit; 178 180 int current_port; 179 181 }; ··· 470 468 } 471 469 472 470 /* 471 + * QinHeng CH345 is buggy: every second packet inside a SysEx has not CIN 4 472 + * but the previously seen CIN, but still with three data bytes. 473 + */ 474 + static void ch345_broken_sysex_input(struct snd_usb_midi_in_endpoint *ep, 475 + uint8_t *buffer, int buffer_length) 476 + { 477 + unsigned int i, cin, length; 478 + 479 + for (i = 0; i + 3 < buffer_length; i += 4) { 480 + if (buffer[i] == 0 && i > 0) 481 + break; 482 + cin = buffer[i] & 0x0f; 483 + if (ep->in_sysex && 484 + cin == ep->last_cin && 485 + (buffer[i + 1 + (cin == 0x6)] & 0x80) == 0) 486 + cin = 0x4; 487 + #if 0 488 + if (buffer[i + 1] == 0x90) { 489 + /* 490 + * Either a corrupted running status or a real note-on 491 + * message; impossible to detect reliably. 492 + */ 493 + } 494 + #endif 495 + length = snd_usbmidi_cin_length[cin]; 496 + snd_usbmidi_input_data(ep, 0, &buffer[i + 1], length); 497 + ep->in_sysex = cin == 0x4; 498 + if (!ep->in_sysex) 499 + ep->last_cin = cin; 500 + } 501 + } 502 + 503 + /* 473 504 * CME protocol: like the standard protocol, but SysEx commands are sent as a 474 505 * single USB packet preceded by a 0x0F byte. 475 506 */ ··· 691 656 692 657 static struct usb_protocol_ops snd_usbmidi_cme_ops = { 693 658 .input = snd_usbmidi_cme_input, 659 + .output = snd_usbmidi_standard_output, 660 + .output_packet = snd_usbmidi_output_standard_packet, 661 + }; 662 + 663 + static struct usb_protocol_ops snd_usbmidi_ch345_broken_sysex_ops = { 664 + .input = ch345_broken_sysex_input, 694 665 .output = snd_usbmidi_standard_output, 695 666 .output_packet = snd_usbmidi_output_standard_packet, 696 667 }; ··· 1382 1341 * Various chips declare a packet size larger than 4 bytes, but 1383 1342 * do not actually work with larger packets: 1384 1343 */ 1344 + case USB_ID(0x0a67, 0x5011): /* Medeli DD305 */ 1385 1345 case USB_ID(0x0a92, 0x1020): /* ESI M4U */ 1386 1346 case USB_ID(0x1430, 0x474b): /* RedOctane GH MIDI INTERFACE */ 1387 1347 case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */ ··· 2418 2376 if (err < 0) 2419 2377 break; 2420 2378 2379 + err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2380 + break; 2381 + case QUIRK_MIDI_CH345: 2382 + umidi->usb_protocol_ops = &snd_usbmidi_ch345_broken_sysex_ops; 2421 2383 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2422 2384 break; 2423 2385 default:
+11
sound/usb/quirks-table.h
··· 2829 2829 .idProduct = 0x1020, 2830 2830 }, 2831 2831 2832 + /* QinHeng devices */ 2833 + { 2834 + USB_DEVICE(0x1a86, 0x752d), 2835 + .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 2836 + .vendor_name = "QinHeng", 2837 + .product_name = "CH345", 2838 + .ifnum = 1, 2839 + .type = QUIRK_MIDI_CH345 2840 + } 2841 + }, 2842 + 2832 2843 /* KeithMcMillen Stringport */ 2833 2844 { 2834 2845 USB_DEVICE(0x1f38, 0x0001),
+1
sound/usb/quirks.c
··· 538 538 [QUIRK_MIDI_CME] = create_any_midi_quirk, 539 539 [QUIRK_MIDI_AKAI] = create_any_midi_quirk, 540 540 [QUIRK_MIDI_FTDI] = create_any_midi_quirk, 541 + [QUIRK_MIDI_CH345] = create_any_midi_quirk, 541 542 [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk, 542 543 [QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk, 543 544 [QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk,
+1
sound/usb/usbaudio.h
··· 95 95 QUIRK_MIDI_AKAI, 96 96 QUIRK_MIDI_US122L, 97 97 QUIRK_MIDI_FTDI, 98 + QUIRK_MIDI_CH345, 98 99 QUIRK_AUDIO_STANDARD_INTERFACE, 99 100 QUIRK_AUDIO_FIXED_ENDPOINT, 100 101 QUIRK_AUDIO_EDIROL_UAXX,