2012-12-23
How to set default playback (NVIDIA HDMI) device on Debian Squeeze
I install alsa-driver-1.0.25 from source, because default version 1.0.23 did not see "Nvidia GPU 14 HDMI/DP"
It can be tested with
$ alsamixer
By pressing F6 and selecting Sound Card:
After installation all outputs was muted by default, so I unmute, by selecting and pressing key "m".
Then start investigating my hardware, for more details:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC1200 Digital [ALC1200 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
$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Intel
HDA Intel, ALC1200 Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, ALC1200 Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, ALC1200 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, ALC1200 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, ALC1200 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, ALC1200 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, ALC1200 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
HDA Intel, ALC1200 Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia
HDA NVidia, HDMI 0
HDMI Audio Output
$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xfcff8000 irq 28
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfe8fc000 irq 17
$ cat /proc/asound/devices
1: : sequencer
2: [ 0- 2]: digital audio capture
3: [ 0- 1]: digital audio playback
4: [ 0- 0]: digital audio playback
5: [ 0- 0]: digital audio capture
6: [ 0- 0]: hardware dependent
7: [ 0] : control
8: [ 1- 9]: digital audio playback
9: [ 1- 8]: digital audio playback
10: [ 1- 7]: digital audio playback
11: [ 1- 3]: digital audio playback
12: [ 1- 3]: hardware dependent
13: [ 1- 2]: hardware dependent
14: [ 1- 1]: hardware dependent
15: [ 1- 0]: hardware dependent
16: [ 1] : control
33: : timer
In the terminal it work just fine. I can make audio output by specifying playback device.
For example HDMI audio played with:
$ aplay -D plughw:1,9 some_audio_file.wav
$ mplayer some_audio_file.wav -ao alsa:device=hw=1.9
PC analog output (green socket, in the back) played with:
$ aplay -D plughw:0,0 some_audio_file.wav
$ mplayer some_audio_file.wav -ao alsa:device=hw=0.0
PC analog output is the default playback so it also played with:
$ aplay some_audio_file.wav
$ mplayer some_audio_file.wav
To make HDMI playback by default instead of PC analog output (green socket, in the back).
It Need to create a file ~/.asoundrc
Hidden file in a home directory, with a content like this:
$ cat ./.asoundrc
-----------------------------------------------------------------------------------------------------------
# HDMI configuration with volume control
# Instructions for use
# 1) Find your hmdi hardware Card Number and Device Number. Open a terminal and do:
# aplay -L
# That will list all of the hardware audio devices. Look for the one labeled HDMI.
# Note what Card Number and Device Number it lists (they seem to be card 0,
# device 3 but your system may be different).
# 2) Edit the pcm.hdmi_hw device defined here to set your Card Number and Device Number.
# 3) Put this file in either /etc/asound.conf or in your home directory as .asoundrc.
# sudo cp jons_asound.conf /etc/asound.conf
# or
# sudo cp jons_asound.conf $HOME/.asound.conf
# 4) Exit mythfrontend. Then restart the sound system:
# sudo /etc/init.d/alsa-utils restart
# 5) Start mythfrontend and go to the audio setup screen
# "Utilities / Setup" then "Setup" then "General" then "Next" until you
# get to the Audio tab.
# 6) Fill in the info - it's case sensitive:
# Audio output device: ALSA:hdmi_complete <--- note you have to type in this field
# Passthrough output devide: Default
# ... Stereo... ... Passive...
# Mixer Device: ALSA:default
# Mixer controls: hdmi_volume <--- type in this field
# 7) Work your way back to Watch TV and give it a try.
pcm.hdmi_hw {
type hw
card 1 # <----- Put your card number here
device 9 # <----- Put your device number here
}
pcm.hdmi_formatted {
type plug
slave {
pcm hdmi_hw
rate 48000
channels 2
}
}
pcm.hdmi_complete {
type softvol
slave.pcm hdmi_formatted
control.name hdmi_volume
control.card 1
}
pcm.!default hdmi_complete
-----------------------------------------------------------------------------------------------------------
This taken from Good Tip (Ubutu Forum)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment