PINE64
If booted with headphones in, sound comes from them and speakers - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112)
+--- Thread: If booted with headphones in, sound comes from them and speakers (/showthread.php?tid=13849)



If booted with headphones in, sound comes from them and speakers - stozi - 05-08-2021

I've started playing music in my headphones without realizing it's also blaring from the speakers in public enough times now to try to fix this.

If headphones are in on boot, sound will come out of both them and the speakers unless you remove them and put them back. How to make only play from headphones if they are in on boot?


RE: If booted with headphones in, sound comes from them and speakers - KC9UDX - 05-09-2021

Which operating system are you running?
Unfortunately, the audio output routing is done in software.


RE: If booted with headphones in, sound comes from them and speakers - stozi - 05-09-2021

Whups forgot to mention this is the default Manjaro it came with


RE: If booted with headphones in, sound comes from them and speakers - dsimic - 05-16-2021

This detection issue seems to be caused by the ASoC driver, which is used by the audio codec inside the PineBook Pro.  I'll have a detailed look at the source code of the driver, and I'll report back here.


RE: If booted with headphones in, sound comes from them and speakers - pietenpol - 06-06-2021

+1

I can resolve it by re-plugging the headphones into the 3.5mm jack, at which point sound only outputs through the headphones.


RE: If booted with headphones in, sound comes from them and speakers - user18130814200115 - 06-07-2021

(06-06-2021, 11:42 AM)pietenpol Wrote: +1

I can resolve it by re-plugging the headphones into the 3.5mm jack, at which point sound only outputs through the headphones.
By default, I think manjaro adds a systemd service that switches the output between analog-output-speaker and analog-output-headphones.
If the output is set to analog-output-speaker and anything is plugged into the 3.5 mm jack, then the sound will come from both.

You can switch the output manually with:

Code:
pactl set-sink-port alsa_output.platform-es8316-sound.stereo-fallback analog-output-headphones
I personally have a script to toggle between the two outputs bound to a hotkey.


RE: If booted with headphones in, sound comes from them and speakers - dsimic - 06-11-2021

(06-07-2021, 02:25 AM)user18130814200115 Wrote: By default, I think manjaro adds a systemd service that switches the output between analog-output-speaker and analog-output-headphones. If the output is set to analog-output-speaker and anything is plugged into the 3.5 mm jack, then the sound will come from both.

Upon closer inspection, Manjaro ARM provides a pinebookpro-audio package that (slighltly ab)uses the acpid daemon to implement the switching between the audio outputs.  This package also provides a pinebookpro-audio.service systemd service, which is disabled by default, and actually doesn't do proper switching on boot when enabled.  I haven't spent a lot of time debugging that, though.