Page 2 of 2

Re: Command to play sound through speakers when headphones on ?

Posted: Tue Mar 26, 2019 9:21 pm
by MrEen
bartszu wrote:
Tue Mar 26, 2019 9:06 pm
OMG I sorted it, it works :°)))))
Can you be more specific? Did you manage to get a sound going through the speakers while headphones were connected?

Re: Command to play sound through speakers when headphones on ?

Posted: Tue Mar 26, 2019 9:58 pm
by bartszu
1. alsamixer auto mute off
2. Connect headphones manually change output in Preferences to Headphones, this silence speakers.
3. Run

Code: Select all

pacmd set-sink-port 0 analog-output-speaker && audacious example.mp3
This plays tru Speakers and ............ Headphones.

Auto mute option in Alsa is one to detect that Headphones are in, and mute Speakers.
This is digged deeply in ALSA.
Turning this off, coz sound to play from both Headphones and Speakers in analog-output-speaker.
Connecting Headphones and changing to analog-output-headphones its just 3 clicks.
Actually

Code: Select all

pacmd set-sink-port 0 analog-output-headphones
can be a desktop launcher.

So I can go around with headphones, throw them away and in the morning Alarm will play thru Speakers.

Re: Command to play sound through speakers when headphones on ?

Posted: Tue Mar 26, 2019 10:05 pm
by MrEen
I see.

I was thinking you wanted to play something through the speakers ONLY, while you were listening to something else on the headphones.

I'm glad you got it figured out. Nice work! :D

Re: Command to play sound through speakers when headphones on ?

Posted: Tue Mar 26, 2019 10:11 pm
by bartszu
No I just wanted bloody Alarm to work as it should.
I often fall asleep with Headphones then in the morning I have no alarm.