You are not logged in.
Pages: 1
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC269VB Analog [ALC269VB Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0My laptop has two devices on the same card, where first is the analog, and second is the HDMI. How to make the audio output to HDMI when HDMI is connected?
Thanks.
Offline
Quick solution, use pulseaudio and set hdmi as the fallback device, activate the module-switch-on-connect (before the if..udev-block) in the default.pa.
Long solution, try to do this in ALSA by following this: http://alsa.opensrc.org/Udev but I can't really help you further than this if you choose to go this route
Offline
Quick solution, use pulseaudio and set hdmi as the fallback device, activate the module-switch-on-connect (before the if..udev-block) in the default.pa.
Long solution, try to do this in ALSA by following this: http://alsa.opensrc.org/Udev but I can't really help you further than this if you choose to go this route
Thanks. Do you have wiki or doc for the quick solution?
Offline
I've never ever heard pulse audio considered the quick solution to anything.
Try this, one simple line, done once.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Unless I sorely misinterpreted his post he wants dynamic switching on HDMI connect which the one liner is not gonna give you
You could technically do it a similar way by creating a .asoundrc with the following contents:
defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0and running
systemctl restart alsa-restoreand restarting all your applications. Which would be a plain ALSA solution. Then writing a script triggered on Udev events to switch out the files and call systemctl at which point we are at the solution I gave the link for (which comes from the Archwiki although I have a faint memory of there being a simpler udev-based solution mentioned there, which I didn't find).
Edit: in retrospect the link seems overly convoluted, If you want to do this the ALSA way check https://wiki.archlinux.org/index.php/Udev find out what triggers get called on HDMI plug-in and write a script that swaps out the asoundrc would probably be sufficient (real hotplugging, with keeping the existing streams alive without restart, is still not possible then afaik)
@enihcam Install pulseaudio, pavucontrol and pulseaudio-alsa (lib32-libpulse and lib32-alsa-plugins to have working 32bit programs). Add the load-module module-switch-on-connect at the position I've mentioned. Start to play some sound they should switch when you connect your HDMI. Optionally set the HDMI as the fallback device in pavucontrol so that streams default to it when HDMI is connected
Additional reading http://www.freedesktop.org/wiki/Softwar … r/Modules/
Last edited by V1del (2015-08-28 09:01:41)
Offline
Unless I sorely misinterpreted his post
D'Oh. No, it was me who did that. Sorry.
Something more dynamic could certainly be done with alsa which I would shoot for if I needed this, but this is the sort of thing where pulse audio could become more practical.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1