Bug 102560 - Headphone insert fails to unmute.
Summary: Headphone insert fails to unmute.
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: alsa (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-06 13:59 UTC by Dean Wallace
Modified: 2017-09-21 16:59 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
alsa-info output (59.34 KB, text/plain)
2017-09-06 13:59 UTC, Dean Wallace
Details
startup debug log (168.33 KB, text/plain)
2017-09-06 15:14 UTC, Dean Wallace
Details

Description Dean Wallace 2017-09-06 13:59:39 UTC
Created attachment 133993 [details]
alsa-info output

System: Toshiba Chromebook 2 (Swanky)
OS: Archlinux x86_64
Kernel: custom 4.13

Updated to version 11 libpulse and pulseaudio packages and now sound mixers do not get handled correctly when inserting headphones.  Normally the headphone mixer is unmuted and volume level restored from previous, and Speaker mixer should be zero.  However, I now have to manually perform these operations since update.

One other thing that's different.  Changing master volume also used to set speaker mixer level to same value, but now not only does it not move, audible volume is much quieter, and I now have to set alsa speaker mixer to 100 for the same audible experience as before.  Have rolled back to 4.10 until fixed.
Comment 1 Tanu Kaskinen 2017-09-06 14:21:19 UTC
The debug log from pulseaudio would be interesting. To get it, first turn off automatic starting of pulseaudio and stop the currently running daemon:

systemctl --user --now mask pulseaudio.socket pulseaudio.service

Then run pulseaudio in a terminal with debug level logging:

pulseaudio -vv

After it has started, you can stop it right away with ctrl-c, because I'm only interested in what happens during the startup.

Save the output to a file and attach it to this bug.

Restore the systemd units:

systemctl --user unmask pulseaudio.socket pulseaudio.service

Finally, edit /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf. Find these two lines in the file:

[Mapping analog-stereo]
device-strings = front:%f

Change the second line to

device-strings = front:%f hw:%f

Starting from PA 11, we don't any more assume that if the "front" device doesn't work, then "hw" is an analog stereo device. If reverting this change fixes the problem for you, then this is an alsa bug.
Comment 2 Dean Wallace 2017-09-06 15:14:31 UTC
Hi Tanu.  Thank you very much, that did the trick, everything back to normal.
Attached the startup log anyway.

regards
Dean
Comment 3 Dean Wallace 2017-09-06 15:14:51 UTC
Created attachment 134000 [details]
startup debug log
Comment 4 Tanu Kaskinen 2017-09-07 12:26:37 UTC
I reported the bug on the alsa-devel mailing list:
http://mailman.alsa-project.org/pipermail/alsa-devel/2017-September/125308.html
Comment 5 Dean Wallace 2017-09-07 12:40:50 UTC
Thanks.  Tbh, this machines sound (byt-max98090) was already problematic due to the regression introduced in kernel 4.5 and above due to a new cherrytrail driver making it obsolete (no mappings for it or something).  I've been using patches that revert functionality like that of the last known working kernel (4.4).  It has since been looked at and 4.13 fixed the regressions so no patches are needed now, but I still need to compile because the newer driver(s) need disabling before the old one can be built.  Life in the old dog yet!

Regards, DW
Comment 6 Dean Wallace 2017-09-07 15:37:16 UTC
Waiting forever it seems to get confirmation to subscribe to the list so I can post reply.  In the meantime, since Takashi wanted a quick reply, could you respond by saying I have built alsa-lib 1.1.4.1 with the patch he included and all is working as expected.

Thanks..
--
Dean
Comment 7 Tanu Kaskinen 2017-09-08 11:39:49 UTC
It seems that we'll have to fix this in PulseAudio after all.

Could you undo the alsa-lib change, and make the following change to /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf? Find this section in the file:

[Mapping unknown-stereo]
device-strings = hw:%f
channel-map = front-left,front-right
fallback = yes
priority = 1

Add these lines to that section:

paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic

Those are supposed to be two lines, starting with "paths-output" and "paths-input". Bugzilla will probably wrap the lines, so undo the wrapping.

The expected result is that things work, and "pactl list sinks | grep Name" prints a sink name that ends with "unknown-stereo". Can you try that out?
Comment 8 Dean Wallace 2017-09-08 15:15:11 UTC
Hi.  Done that, everything still works as expected.
pactl list sinks | grep Name                                                       
Name: alsa_output.platform-byt-max98090.unknown-stereo

Will this be in another PA update then?

Thanks
Comment 9 Tanu Kaskinen 2017-09-17 17:36:37 UTC
Yes, the fix will be included in pulseaudio 11.1 (to be released soon).
Comment 10 Dean Wallace 2017-09-19 19:04:21 UTC
Hi Tanu.  Just to confirm in the 11.1 update I just received, is this the expected output of pactl list sinks | grep Name                                             

Name: alsa_output.platform-byt-max98090.stereo-fallback

Sound working fine, but I noticed that's different fix.
Regards, DW
Comment 11 Tanu Kaskinen 2017-09-21 16:59:46 UTC
Yes, that's expected.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.