You are not logged in.

#1 2012-02-14 18:25:20

Lowra
Member
Registered: 2009-09-21
Posts: 192

Sound over HDMI works, but laptop sound isn't working after...

Hey,

First, sound over HDMI was not working on my laptop, but when I followed this section of Alsa Wiki it worked.
So I created the ~/.asoundrc file containing:

pcm.!default {
      type hw
      card 0
      device 3
}

But now, when I unplug my HDMI cable, and want to listen to music using my laptop built-in speakers/jack speakers, it doesn't work anymore, even if I restart Alsa.
In fact, I need to delete the .asoundrc file AND restart Alsa in order to get it work.

Is there a way to make both sound over HDMI, and built-in speakers works automatically depending on if my laptop is/is not connected to my TV ?

Thanks wink

Last edited by Lowra (2012-02-14 18:26:06)

Offline

#2 2012-02-14 18:34:30

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: Sound over HDMI works, but laptop sound isn't working after...

You need to restore the card and/or device number to those for your laptop speakers, as determined by:

aplay -l

To do this automatically, you will need to use scripts called by udev, as described a little further down.

Offline

Board footer

Powered by FluxBB