Thanks, the log is interesting. At line 5943 the headphones are plugged in. Pulseaudio then decides to switch from the 5.1 profile to the analog stereo profile, as expected. After switching the profile, however, pulseaudio decides to immediately switch to digital output instead. Unfortunately the log doesn't show why this happens.
If I write a patch that adds better logging, will you be able to apply and test it? Here are some instructions for building and installing pulseaudio from source: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/PulseAudioFromGit/ -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to pulseaudio in Ubuntu. https://bugs.launchpad.net/bugs/1521987 Title: Sound is not automatically switched back from headphones to speakers Status in PulseAudio: Unknown Status in pulseaudio package in Ubuntu: Invalid Bug description: When plugging in headphones, sound output is correctly switched from speakers (line out) to the headphones. When the headphones are unplugged, sound is NOT automatically switched back to the speakers. This bug started happening on my system after I upgraded from 14.04 to 15.10 so it is a regression. Attached is pulseaudio log of what happens when I plug and unplug my headphones. To manage notifications about this bug go to: https://bugs.launchpad.net/pulseaudio/+bug/1521987/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp