View Single Post
Old 05-29-10, 03:41 AM   #47
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: Enable audio through HDMI on GT240

To share my experience with a G210 (MSI N210-MD512H):
I originally had a CRT (Sony GDM-FW900) connected to the VGA connector and wanted to use a HDMI A/V receiver at the same time (Kenwood KRF-V7300D).
(I suspect) It is necessary to install the ALSA kernel modules, I successfully tested 1.0.23 (which can not be installed on older kernels, at least not 2.6.25) on 2.6.31. Without any options in /etc/modprobe.d/50-sound.conf, four Nvidia sound subdevices are detected ("7" was the working one after the other problems were solved), I added the following line:
Code:
options snd-hda-intel probe_mask=0xffff,0xfff2
It allows to only detect one Nvidia subdevice ("3"), but at the same time also detects the internal HDA Intel device.
When I connected the HDMI device for the first time, the first bad surprise was that the VGA monitor was not detected as primary device anymore (although there was no screen connected to the A/V receiver), disabling all terminals (X still ran on the CRT). Connecting the CRT via DVI solved that problem.
The next thing was that the "HDMI" symbol on my receiver was blinking sometimes (on power-up), but never indicated a connection (and I could hear no sound from MPlayer or speaker-test, but without any error messages). I had to modify my xorg.conf, adding a second screen, second monitor ("KWD KRF-V7300D") and second device (mostly identical to the existing "GeForce 210" Device0). Now the HDMI connection is up whenever X is active (but not if I switch to a terminal).
The following commands work successfully indicating 8-channel PCM, AC-3 and DTS are working as expected:
Code:
speaker-test -c8 -twav -Dplughw:1,3
speaker-test -c6 -twav -Dplughw:1,3
speaker-test -c4 -twav -Dplughw:1,3
speaker-test -c2 -twav -Dplughw:1,3
speaker-test -c1 -twav -Dplughw:1,3
mplayer file -ac hwac3 -ao alsa:device=hw=1.3
mplayer file -ac hwdts -ao alsa:device=hw=1.3
The following commands initially seem to block, and fail after a long time(-out):
(-c7 fails immediately which is probably correct behaviour)
Code:
$ speaker-test -c5 -twav -Dplughw:1,3

speaker-test 1.0.21

Playback device is plughw:1,3
Stream parameters are 48000Hz, S16_LE, 5 channels
WAV file(s)                                      
Rate set to 48000Hz (requested 48000Hz)          
Buffer size range from 128 to 6528               
Period size range from 64 to 3264                
Using max buffer size 6528                       
Periods = 4                                      
was set period_size = 2176                       
was set buffer_size = 6528                       
 0 - Front Left                                  
Write error: -5,Input/output error               
xrun_recovery failed: -5,Input/output error      
Transfer failed: Operation not permitted         
$ speaker-test -c3 -twav -Dplughw:1,3

speaker-test 1.0.21

Playback device is plughw:1,3
Stream parameters are 48000Hz, S16_LE, 3 channels
WAV file(s)                                      
Rate set to 48000Hz (requested 48000Hz)          
Buffer size range from 128 to 10880              
Period size range from 64 to 5440                
Using max buffer size 10880
Periods = 4
was set period_size = 2176
was set buffer_size = 10880
 0 - Front Left
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Operation not permitted
Note that -c5 is not so farfetched: The Neujahrskonzert is broadcast in 5.0, so the following mplayer command shows the first frame and blocks indefinitely:
Code:
mplayer Neujahrskonzert.ts -channels 6 -ao alsa:device=hw=1.3
Looking at dmesg
Code:
HDMI: detected monitor KRF-V7300D
  at connection type HDMI
HDMI: available speakers: FL/FR LFE FC RL/RR RLC/RRC
HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 88200 176400 192000 384000, bits = 16 20
HDMI: supports coding type LPCM: channels = 8, rates = 44100 48000 88200 176400 192000 384000, bits = 16 20
HDMI: supports coding type AC-3: channels = 8, rates = 44100 48000 88200, max bitrate = 640000
HDMI: supports coding type DTS: channels = 8, rates = 48000 88200, max bitrate = 1536000
HDMI: supports coding type E-AC-3/DD+ (Dolby Digital Plus): channels = 8, rates = 48000 88200
HDMI: supports coding type DTS-HD: channels = 8, rates = 48000 88200 176400 192000 384000
HDMI: supports coding type MLP (Dolby TrueHD): channels = 8, rates = 48000 88200 176400 192000 384000
the remaining question is how do we get E-AC-3, TrueHD and DTS-HD output?

Carl Eugen
Attached Files
File Type: txt xorg.conf.txt (2.6 KB, 151 views)
cehoyos is offline   Reply With Quote