Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  How to force a sound output  (Read 3165 times)

Offline kokurya

  • User
  • Posts: 68
How to force a sound output
« on: 2019/08/02, 15:03:10 »
Hi there!
I recently changed my sound setup on my siduction multimedia pc.
Until now it was sending sound and video via hdmi to the TV which worked like a charm.
As I have now a audio set-up which supports S/PDIF i hooked up my Tv via HDMI and my speaker via S/PDIF, which also works.
But with one amazing annoying problem:
  • Everytime I start my TV the sound is set back to hdmi-output
  • Everytime I stop a video the sound is set back to hdmi-output also
So how can i force the audiosystem to always stick to the S/PDIF output?
Code: [Select]
lspci |grep -i audio
00:1b.0 Audio device: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller (rev 21)
Code: [Select]
aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: PCH [HDA Intel PCH], Gerät 0: ALC892 Analog [ALC892 Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 1: ALC892 Digital [ALC892 Digital]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 7: HDMI 1 [HDMI 1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 8: HDMI 2 [HDMI 2]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

correct setup:
Code: [Select]
pactl list short sinks
8       alsa_output.pci-0000_00_1b.0.iec958-stereo      module-alsa-card.c      s16le 2ch 44100Hz       SUSPENDED


automatic fallback when TV is turned on again or after a video was stopped:
Code: [Select]
pactl list short sinks                                             
6       alsa_output.pci-0000_00_1b.0.hdmi-stereo-extra2 module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
« Last Edit: 2019/08/02, 15:06:51 by kokurya »
Linux is highly user friendly, it is just highly selective who it is friends with.

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: How to force a sound output
« Reply #1 on: 2019/08/02, 15:37:27 »
Sorry I can't help on this matter, maybe another member will chime in, in the mean time you can maybe search these forums, they may/may not help

Sorry, it's all I got :(

https://www.avsforum.com/forum/index.php
https://www.avforums.com/forums/

They are fantastic sites for htpc and more
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline kokurya

  • User
  • Posts: 68
Re: How to force a sound output
« Reply #2 on: 2019/08/02, 15:45:57 »
Thx & no problem.

I'm pretty sure that i oversee something really simple and stupid...

*edit*
As I don't know which setting did it exactly... Here my "workaround" for now:
I uncommented following lines in  "/etc/pulse/default.pa"
Code: [Select]
### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

As far as i underestood this is some kind of autoconnect thingy.

Code: [Select]
### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

Overrides Users wishes...

And I did set a default sink:

Code: [Select]
### Make some devices default
set-default-sink output 4
#set-default-source input


So far it seems to work and maybe this helps some others if they run into the same problem.

« Last Edit: 2019/08/02, 16:11:07 by kokurya »
Linux is highly user friendly, it is just highly selective who it is friends with.