Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HDMI audio as default via asound.conf
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Thu Nov 03, 2011 10:09 pm    Post subject: HDMI audio as default via asound.conf Reply with quote

Hi there,

I'm trying to build up a HTPC (Zotac IONITX U-E board with Atom D-525). At the moment I ran into some trouble to get an audio output via HDMI. First the config:

aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

With aplay I figured out, device 1.7 gives me sound over HDMI. The other devices (1.3 / 1.8 / 1.9) remain quiet. Hence I specified the output device via asound.conf
/etc/asound.conf:

pcm.!default {
        type hw
        card 1
        device 7
}

But these lines seem to be useless. At least mplayer doesn't play sound with:
Code:
mplayer -ao alsa


I can get sound over HDMI only with the command line:
Code:
mplayer -ao alsa:device=hw=1.7


Within XBMC the situation seems to be even more queer:
Without any configuration I can hear the ticking sound when switching to options. Playing any movie or music there's no chance to get sound over HDMI. I've tried every combination in the audio settings:

Code:
Audio: hdmi
Audio device: HDMI, HDMI Alsa, HDMI Nvidia, HDMI Standard, Custom (alsa:...)
Pass-through: HDMI, HDMI Alsa, HDMI Nvidia

I could image that XBMC lacks of any dts or ac3 pass-through codecs. But via Toslink (iec958) any sound works perfectly.

On the other hand: CMUS works and plays every MP3 via HDMI without any problems. Selected output device is just: alsa - no additional option needed.

My goal would be:
- create an /etc/asound.conf that makes the HDMI device as default sound output. Analog output is not needed.
- Use HDMI audio in XBMC, CMus and mplayer without any special parameters - just the default audio.

Is that possible? What do I have to do?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Nov 04, 2011 1:47 pm    Post subject: Reply with quote

"default" is basically "surround20" - i.e. 2 speakers. Do the same for surround51 and surround40. Have many speakers have you got?
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Mon Nov 07, 2011 12:23 pm    Post subject: Reply with quote

Ok, I haven't got it yet completely. So, default ist just for surround20. Does it mean: For DTS sound I have to specify the numbers of speakers explicitly and not take just any kind of pass-through?

Hardware configuration:
- Speakers are a 5.1 system connected to a Marantz AV-receiver
- My PC has an optical output (S/PDIF) and a HDMI output (Nvidia ION).
- To the optical output is the AV-receiver connected which is able to decode DTS and AC3.
- To the HDMI output is the TV connected. It can decode AC3 but not DTS.
- I want to be able to connect the AV-receiver via HDMI too.

Current state:
- XBMC plays everything through S/PDIF, but only the system sounds via HDMI. Until now I didn't find any solution to change that behavior.
- CMus plays MP3 to HDMI by default, if X had been started.
- VDR plays (Stereo) to HDMI.
- mplayer plays to HDMI, when I specify the command-line: mplayer -ao alsa:device=hw=1.7

What I want to have:
- Pass-through any AC3 or DTS sound to both HDMI and S/PDIF.
- Play any other sound through HDMI and S/PDIF too.
- Solution should be application-independent and independent of the number of speakers. Means, just specify alsa without any additional options.

Is that possible with an asound.conf solution?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum