Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-18-10, 07:55 PM   #37
paoleary
Registered User
 
Join Date: Feb 2010
Posts: 37
Default Re: Enable audio through HDMI on GT240

Quote:
Originally Posted by larophel View Post
I have been able to use audio through HDMI on my GT230M using the latest ALSA drivers, yay!

I use the the following command to play movies:

mplayer -ao alsa:device=hw=1.7

Have any of you experienced mplayer skipping frames when using audio through HDMI?
Make sure you're using the VDPAU video renderer. Also, depending on how "latest" your drivers are, you might need the enable_msi=0 option in /etc/modprobe.d/sound.conf (see wiki page).
paoleary is offline   Reply With Quote
Old 05-19-10, 02:06 PM   #38
larophel
Registered User
 
Join Date: Nov 2009
Posts: 29
Default Re: Enable audio through HDMI on GT240

My ALSA drivers are from git from some days ago, and I do have enable_msi=0
However, I was not using VDPAU so I am going to test it with VDPAU enabled.

Thanks!
larophel is offline   Reply With Quote
Old 05-19-10, 10:40 PM   #39
larophel
Registered User
 
Join Date: Nov 2009
Posts: 29
Default Re: Enable audio through HDMI on GT240

Unfortunately, VDPAU does not seem to be working on my laptop, at least for now (see http://www.nvnews.net/vbulletin/showthread.php?t=151135).

Is there another way of playing movies on my TV with HDMI Audio without it skipping frames?
It is not a HD movie, with only stereo audio, so it seems weird to me that it would skip frames.
Many thanks again.
larophel is offline   Reply With Quote
Old 05-20-10, 12:24 AM   #40
primerib
Registered User
 
Join Date: Dec 2008
Posts: 128
Default Re: Enable audio through HDMI on GT240

Quote:
Originally Posted by larophel View Post
Unfortunately, VDPAU does not seem to be working on my laptop, at least for now (see http://www.nvnews.net/vbulletin/showthread.php?t=151135).

Is there another way of playing movies on my TV with HDMI Audio without it skipping frames?
It is not a HD movie, with only stereo audio, so it seems weird to me that it would skip frames.
Many thanks again.
Try increasing the buffer sizes.
primerib is offline   Reply With Quote
Old 05-20-10, 08:19 AM   #41
zim2dive
Registered User
 
Join Date: Dec 2008
Posts: 145
Default Re: Enable audio through HDMI on GT240

Quote:
Originally Posted by larophel View Post
Unfortunately, VDPAU does not seem to be working on my laptop, at least for now (see http://www.nvnews.net/vbulletin/showthread.php?t=151135).

Is there another way of playing movies on my TV with HDMI Audio without it skipping frames?
It is not a HD movie, with only stereo audio, so it seems weird to me that it would skip frames.
Many thanks again.
I would think you would do better to consolidate your info in your GT230M thread.

a) you have a GT230M.. this is a GT240 thread
b) you have video skipping? this is an audio thread and has nothing to do with VDPAU

(really not trying to be a grump, only a mildly AR thread/forum dude)
zim2dive is offline   Reply With Quote
Old 05-20-10, 11:15 AM   #42
larophel
Registered User
 
Join Date: Nov 2009
Posts: 29
Default Re: Enable audio through HDMI on GT240

zim2dive: I guess you are right, I have pasted my question in my own thread now.

primerib: Care to elaborate a bit on your suggestion? I assume you mean to increase the buffer size in mplayer? There are many buffer-affecting options to mplayer. Which one do you mean? Thanks!

If you don't mind please answer in http://www.nvnews.net/vbulletin/showthread.php?t=151135
as to not further derail this topic.
larophel is offline   Reply With Quote
Old 05-26-10, 06:52 AM   #43
fuzzy2010
Registered User
 
Join Date: May 2010
Posts: 4
Default Re: Enable audio through HDMI on GT240

I am still having problems with my Asus GT 220. Mythdora 12.23 (Fedora 12). There's quite some confusion on my part what should be correct sound.conf for me.

uname -a
Code:
Linux localhost.localdomain 2.6.32.12-115.fc12.x86_64 #1 SMP Fri Apr 30 19:46:25 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
lspci -v
Code:
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
        Subsystem: Giga-byte Technology Device a002
 01:00.0 VGA compatible controller: nVidia Corporation Device 0a20 (rev a2) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device 830f
 01:00.1 Audio device: nVidia Corporation Device 0be2 (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 830f
Code:
rpm -qa|grep alsa
alsa-utils-1.0.22-1.fc12.x86_64
alsa-lib-1.0.23-1.fc12.x86_64
alsa-kmdl-2.6.32.12-115.fc12-1.0.23-83.fc12.x86_64

rpm -qa|grep nv
libgnomecanvas-2.26.0-2.fc12.x86_64
nvidia-xconfig-1.0-2.fc12.x86_64
kmod-nvidia-2.6.32.12-115.fc12.x86_64-195.36.24-1.fc12.2.x86_64
nvidia-settings-1.0-3.4.fc12.x86_64
xorg-x11-drv-nv-2.1.15-2.fc12.x86_64
kmod-nvidia-195.36.24-1.fc12.2.x86_64
gnome-python2-canvas-2.28.0-1.fc12.x86_64
xorg-x11-drv-nvidia-libs-195.36.24-1.fc12.x86_64
kmod-nvidia-2.6.32.11-99.fc12.x86_64-195.36.15-1.fc12.2.x86_64
xorg-x11-drv-nvidia-195.36.24-1.fc12.x86_64
cat /etc/modprobe.d/sound.conf

Code:
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel

options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2
#options snd-hda-intel enable_msi=0 probe_mask=0xfff2
aplay -l

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC883 Analog [ALC883 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC883 Digital [ALC883 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
cat /etc/modprobe.d/alsa-dist.conf

Code:
install snd-pcm /sbin/modprobe --ignore-install snd-pcm && /sbin/modprobe snd-seq
cat /etc/asound.conf

Code:
#
# Place your global alsa-lib configuration here...
#

@hooks [
        {
                func load
                files [
                        "/etc/alsa/pulse-default.conf"
                ]
                errors false
        }
]

pcm.!default hdmi:NVidia
pcm:iec958 hdmi:NVidia
/etc/alsa/pulse-default.conf does not exist. There is a alsa-ctl.conf in there.

cat /etc/alsa/alsactl.conf
Code:
#
# ALSA library configuration file for alsactl tool
# (/usr/share/alsa tree is not necessary for alsactl)
#

ctl.hw {
        @args [ CARD ]
        @args.CARD {
                type string
                default "0"
        }
        type hw
        card $CARD
}

cat /etc/pulse/default.pa
Code:
load-module module-alsa-sink device=hw:1,3
Again, when doing the various speaker tests I don't get errors, but no sound. I have to umute the spdif on the hdmi every time, so I didn't forget that ever.

No sound:
Code:
aplay -D plughw:1,3 Noise.wav
Playing WAVE 'Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Sound:
Code:
[root@localhost alsa]# aplay -D plughw:0,0 Noise.wav
Playing WAVE 'Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
fuzzy2010 is offline   Reply With Quote
Old 05-26-10, 08:20 AM   #44
paoleary
Registered User
 
Join Date: Feb 2010
Posts: 37
Default Re: Enable audio through HDMI on GT240

@fuzzy2010: Kill the @hooks[] section of /etc/asound.conf and kill /etc/alsa/alsactl.conf completely. For good measure, kill the alias lines in /etc/modprobe.d/sound.conf too. Your probe_mask is right; enable_msi is technically not needed anymore but it doesn't hurt. (Of course, make backups of these files!)

Check the output from `lsmod | grep snd'. If snd_hda_codec_nvhdmi isn't loaded, I don't think you'd even see the device, but check anyway. If not loaded, you'll need to load it.
paoleary is offline   Reply With Quote

Old 05-26-10, 06:35 PM   #45
fuzzy2010
Registered User
 
Join Date: May 2010
Posts: 4
Default Re: Enable audio through HDMI on GT240

Quote:
Originally Posted by paoleary View Post
@fuzzy2010: Kill the @hooks[] section of /etc/asound.conf and kill /etc/alsa/alsactl.conf completely. For good measure, kill the alias lines in /etc/modprobe.d/sound.conf too. Your probe_mask is right; enable_msi is technically not needed anymore but it doesn't hurt. (Of course, make backups of these files!)

Check the output from `lsmod | grep snd'. If snd_hda_codec_nvhdmi isn't loaded, I don't think you'd even see the device, but check anyway. If not loaded, you'll need to load it.
ok, commented out all the hook section. Moved the alsactl.conf to alsa.conf.bak. My sound.conf:

Code:
#options snd-hda-intel enable_msi=0 probe_mask=0xfff2

#alias snd-card-0 snd-hda-intel
#alias sound-slot-0 snd-hda-intel

options snd_hda_codec_nvhdmi

options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2
#options snd-hda-intel enable_msi=0 probe_mask=0xfff2

lsmod|grep snd_hda_codec_nvhdmi
snd_hda_codec_nvhdmi 12743 1
snd_hda_codec 83951 3 snd_hda_codec_nvhdmi,snd_hda_codec_realtek,snd_hda _intel
snd 60294 9 snd_hda_codec_nvhdmi,snd_hda_codec_realtek,snd_hda _intel,snd_hda_codec,snd_hwdep,snd_seq,snd_seq_dev ice,snd_pcm,snd_timer

unmuted in alsamixer the nvidia spdif.

Still no sound. I notice if I am watching something in MythTv and try aplay:

aplay -D plughw:1,3 Noise.wav
aplay: main:608: audio open error: Device or resource busy

Also, this produces no sound now:

aplay -D plughw:0,0 Noise.wav
Playing WAVE 'Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
fuzzy2010 is offline   Reply With Quote
Old 05-27-10, 12:27 AM   #46
paoleary
Registered User
 
Join Date: Feb 2010
Posts: 37
Default Re: Enable audio through HDMI on GT240

Quote:
Originally Posted by fuzzy2010 View Post
Code:
options snd_hda_codec_nvhdmi
Pretty sure that's a syntax error, since I suspect all options targets are hyphenated, but you shouldn't need the line at all.

At any rate, the "back to basics" technique apparently hasn't gotten us anywhere (unless the presence of the line above was it, which I doubt). If you can't get it in aplay (or speaker-test), you just ain't gonna get it anywhere. There was a new reply on your original thread which you might check out; as it is Fedora-specific I can't usefully comment on it.

The only ideas I have left include doing ugly things like compiling your own ALSA and/or kernel. I can't imagine that it's down to that, but hopefully someone else will chime in.
paoleary is offline   Reply With Quote
Old 05-29-10, 04: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, 160 views)
cehoyos is offline   Reply With Quote
Old 05-29-10, 12:50 PM   #48
paoleary
Registered User
 
Join Date: Feb 2010
Posts: 37
Default Re: Enable audio through HDMI on GT240

Quote:
Originally Posted by cehoyos View Post
the remaining question is how do we get E-AC-3, TrueHD and DTS-HD output?
Your best bet is to decode them to LPCM on your computer, and send them uncompressed to your receiver. See alanwww1's guide for details. You can probably start at Post 2 since you have ALSA up and running. Hope it helps.
paoleary is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:25 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.