HDMI sound problem

Hallo:

I use OpenSuse 11.3 on a HP dv6 2020es laptop

I connect it to TV with HDMI.

For sending sound to TV with HDMI I’d to go preferences-sound and place HDMI out put in first place. Later, put this file:
/etc/asound.conf
pcm.!default {
type plug
slave.pcm {
type hw
card 1
device 3
}
}

Thus I can hear sound on TV (Laptop-hdmi-tv).

But for listening sound on laptop speakers, I’ve to reconfigure preferences- sound and put it as was at the beginning and delete the file asound.conf.

Is there any way to send sound to HDMI and to laptop speakers without having to do all this?

Thanks

So what I have found is that if the HDMI audio is just part of the same built-in sound card/chip set, you should be able to turn both on by default. Open up your mixer and add all channels not in your default. Some channels may be muted (so try to unmute them) and some channels may need to be muted to get both to work together. Further, I keep any analog outputs as a higher preference than digital ones, so that the ability to adjust the volume is not lost just because you placed a digital output preference above an analog one.

If, on the other hand, your digital HDMI audio is a separate function, you may indeed need to continue as you are doing now. It might be possible to write a bash script file that could switch the audio around for you when needed.

You mention using openSUSE 11.3, but not your desktop version. I deal with KDE and do not use Gnome. In KDE, it would be nice to know the channels that can be displayed in your mixer and just what sound options you have when you go into Personnel Settings / Multimedia, both in KDE.

Thank You,

Thanks for reply:

As you say, i don’t need to change preferences for HDMI to work. Only creating and deleting file it works (and restarting the video application).
I use KDE and now I’m creating/deleting the file with a script.

I’ve tried in Kmix to enable all channels but the only way to work is to add/delete the file.

This are the devices:

aplay

The devices I’ve are:
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: STAC92xx Analog [STAC92xx Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: STAC92xx Digital [STAC92xx Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

I don’t know if there is a way to enable both outputs (HDMI and STAC) without having to do this.

After further review, it does appear you have two sound cards, STAC as card 0 and ATI as card 1. Even in Windows you had to select one or the other anytime you had two sound cards. Of course someone else could pop in with a solution, but you may have already found one that works.

So, do you keep two /etc/asound.conf files, one for HDMI and the other for analog sound? Must you log in and out or must you reboot to make this work? We could still look at writing a bash script to make this less painful to change sound cards.

Thank You,

Hallo.

The only thing I do is to rename the file to asound.conf-ok for card 0 output sound and put it again as asound.conf for HDMI output (the file didn’t exist at first).

I don’t have to restart computer nor session. The only I’ve to do is to restart the application (smplayer, kaffeine) to take changes.

I’ve seen that some applications as Amarak allow to select the output but not others.

Regards

Tell me the folder location for the asound.conf file and if you must be root or a normal user to rename the file and I will write a script file to do this for you.

Thank You,

Finally, I’ve found a solution.
I use smplayer, which allow to select output device. So I don’t have to create or delete any script.

                 Finally, I've found a solution.

I use smplayer, which allow to select output device. So I don’t have to create or delete any script.
Happy to hear torcaz99 you found a solution to your problem by using smplayer.

Thank You,