Bug 99851

Summary: Noisy headphone audio on Dell XPS 13 (2015)
Product: Drivers Reporter: Nicholas Narsing (soren121)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: a, kochemirov, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.1-rc6 Subsystem:
Regression: No Bisected commit-id:
Attachments: ALSA info
Test fix patch
alsa-info - 4.1-rc8 - microphone working
alsa-info - 4.1 - microphone not working
Microphone stops working after plugging in the headset

Description Nicholas Narsing 2015-06-12 01:16:59 UTC
Headphone audio on the Dell XPS 13 (2015) is quite noisy: there is loud white noise on both channels and an oscillating noise on the left channel.

Interestingly, running this Python script, which was written for the previous-gen XPS 13 (2013), greatly reduces the white noise and removes the oscillating noise: https://xps13-9333.appspot.com/root/usr/local/bin/white_noise_fix.py

Two kernel patches were committed for 3.16 that fixed the issue permanently for the 2013 XPS 13:

https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=5e6db6699b7651f02f4b7cc6a86f5b3d9359d636
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=033b0a7ca9ca6589003e7cd135d2de490d3848ad

It may be necessary to apply similar quirks for the ALC286 chipset in the 2015 XPS 13.

I've tested this issue on kernels 4.0.1 through 4.1-rc6.
Comment 1 Takashi Iwai 2015-06-15 11:14:10 UTC
Could you give alsa-info.sh output?
Comment 2 Nicholas Narsing 2015-06-15 15:27:00 UTC
Created attachment 179971 [details]
ALSA info
Comment 3 Takashi Iwai 2015-06-15 15:34:56 UTC
Could you try the latest sound git tree for-linus branch with the patch below?
  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
Comment 4 Takashi Iwai 2015-06-15 15:35:47 UTC
Created attachment 179981 [details]
Test fix patch
Comment 5 Nicholas Narsing 2015-06-15 16:40:38 UTC
Yes, that patch fixes it. Thanks for the quick response!
Comment 6 Takashi Iwai 2015-06-15 18:44:03 UTC
Thanks for a quick test.  I queued the fix now to git tree.  It'll be included in 4.1 final.
Comment 7 Adrien Matissart 2015-06-24 07:31:07 UTC
Side effect of this fix : the internal microphone doesn't work anymore and doesn't appear in alsamixer (no issue with 4.1-rc8).

Any idea why ?
Comment 8 Takashi Iwai 2015-06-24 07:37:56 UTC
Please give alsa-info.sh output to compare.
Comment 9 Adrien Matissart 2015-06-24 08:19:38 UTC
Created attachment 180751 [details]
alsa-info - 4.1-rc8 - microphone working
Comment 10 Adrien Matissart 2015-06-24 08:21:07 UTC
Created attachment 180761 [details]
alsa-info - 4.1 - microphone not working
Comment 11 Nicholas Narsing 2015-06-29 02:30:35 UTC
Can confirm that the fix caused a regression in headset/mic support. My apologies for not catching it in my testing earlier.
Comment 12 Takashi Iwai 2015-06-29 06:36:57 UTC
The fix for the mic was already included in for-linus branch.  Will be upstreamed in this week.
Comment 13 Nicholas Narsing 2015-06-29 17:14:09 UTC
I just tested it and the fix works great. Thanks for the update!
Comment 14 Mike Silberg 2015-08-04 22:14:30 UTC
Created attachment 184291 [details]
Microphone stops working after plugging in the headset

Unfortunately the issue with microphone still persists:
I'm using Fedora 22, kernel 4.1.3-200.fc22.x86_64 on my laptop Lenovo M30-70.

On the system's start the internal microphone works well, however if I try to plug in the headset with its own microphone it doesn't work at all as well as internal microphone even after I plug off the headset. Only the white noise can be heard.
I tested it with several headsets with the same result.

P.S. with the kernel 4.0.8 everything works just fine.
Comment 15 Takashi Iwai 2015-08-05 06:02:33 UTC
Your machine is totally different.  Please open another bug to track.
In the new opened bug, attach alsa-info.sh outputs at working (4.0.x kernel) and non-working cases.  At best, give both the headset plugged and unplugged states.
Comment 16 Mike Silberg 2015-08-08 22:19:01 UTC
Thanks for your advise.
I opened it here https://bugzilla.kernel.org/show_bug.cgi?id=102521