LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   nVidia HDMI Audio Doesn't Work (https://www.linuxquestions.org/questions/linux-hardware-18/nvidia-hdmi-audio-doesnt-work-866841/)

scott12087 03-06-2011 07:42 PM

nVidia HDMI Audio Doesn't Work
 
I've seen this problem on dozens of different forums but I haven't found anybody with my specific problem or a solution that has worked. I have an nVidia GeForce 8400GS which I just installed in my Debian box and I can't get the HDMI audio to work. Kernel version is 2.6.32-5-amd64, nvidia driver version is 260.19.36, alsa version is 1.0.21. Output of lsmod shows that nvidia module is loaded. Output of aplay -l:

Code:

**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: SB [HDA ATI SB], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Output of aplay -L:

Code:

null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=SB
    HDA ATI SB, VT1708S Analog
    Default Audio Device
front:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    Front speakers
surround40:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=SB,DEV=0
    HDA ATI SB, VT1708S Digital
    IEC958 (S/PDIF) Digital Audio Output

As you can see, the nVidia audio output doesn't even appear in aplay -l or -L.

lspci -v shows:


Code:

01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 8378
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Memory at fea7c000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: HDA Intel

I feel like I've looked everywhere on the internet for a solution to this and I just can't find one. It seems that everybody is able to see their nVidia audio device using aplay -l and then the solution goes from there. I have no idea why I can't see it and it's really starting to frustrate me. If anybody can push me in the right direction with this it would be much appreciated. Thanks!

aus9 03-06-2011 09:06 PM

firstly please study the links contained in the first link I post

http://www.kernel.org/pub/linux/kern.../HD-Audio.html

now pretending you understand all that we look at
http://www.kernel.org/doc/Documentat...figuration.txt

which tells us that we need to look at
http://www.kernel.org/doc/Documentat...dio-Models.txt

and then we search for your codec

but you have not posted it and so I am guessing its vt as per

VIA VT17xx/VT18xx/VT20xx
========================
auto BIOS setup (default)

please post the output of below command

Code:

cat /proc/asound/card0/codec#0 | grep Codec
BTW I do not have your hardware so just starting you off

aus9 03-06-2011 09:23 PM

BTW pls capture a screenshot of the command

alsamixer

You need to install alsa-utls to get that command....I don't have your hardware but I do have hdmi but it won't show up as a switch

you can paste to free online such as (good for 14 days)
http://imagebin.org/index.php?page=add

or if you need to keep a permanent online try (which is free to join...just get a new email address in case of spam)
http://tinypic.com/

scott12087 03-06-2011 09:53 PM

The codec seems to be VIA VT1708S as you predicted. Full output from cat /proc/asound/card0/codec#0 below.

Output from alsamixer here: http://i.imgur.com/ap6Qr.png

Code:

Codec: VIA VT1708S
Address: 0
Function Id: 0x1
Vendor Id: 0x11060397
Subsystem Id: 0x1043836c
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=1, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x10 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x1d 0x1d]
  Converter: stream=5, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D3, actual=D3
Node 0x11 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x2a 0x2a]
  Converter: stream=5, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D3, actual=D3
Node 0x12 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital: Enabled Copyright Non-Audio GenLevel
  Digital category: 0x2
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D0, actual=D0
Node 0x13 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x14 0x14]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D3, actual=D3
  Connection: 1
    0x17
Node 0x14 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D3, actual=D3
  Connection: 1
    0x1e
Node 0x15 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital: Enabled Copyright Non-Audio GenLevel
  Digital category: 0x2
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D0, actual=D0
Node 0x16 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00] [0x80 0x80] [0x00 0x00] [0x00 0x00] [0x97 0x97] [0x97 0x97]
  Power: setting=D3, actual=D3
  Connection: 7
    0x10 0x1f 0x1a 0x1b 0x1e 0x1d 0x25
Node 0x17 [Audio Selector] wcaps 0x300501: Stereo
  Power: setting=D3, actual=D3
  Connection: 6
    0x1f 0x1a* 0x1b 0x1e 0x1d 0x16
Node 0x18 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Power: setting=D3, actual=D3
  Connection: 1
    0x11
Node 0x19 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000014: OUT Detect
  Pin Default 0x01011012: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0x2
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=04, enabled=1
  Power: setting=D3, actual=D3
  Connection: 1
    0x18
Node 0x1a [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00002334: IN OUT Detect
    Vref caps: HIZ 50 100
  Pin Default 0x01a19036: [Jack] Mic at Ext Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0x3, Sequence = 0x6
  Pin-ctls: 0x21: IN VREF_50
  Unsolicited: tag=04, enabled=1
  Power: setting=D3, actual=D3
  Connection: 1
    0x26
Node 0x1b [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00002334: IN OUT Detect
    Vref caps: HIZ 50 100
  Pin Default 0x0181303e: [Jack] Line In at Ext Rear
    Conn = 1/8, Color = Blue
    DefAssociation = 0x3, Sequence = 0xe
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=04, enabled=1
  Power: setting=D3, actual=D3
  Connection: 1
    0x18
Node 0x1c [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x01014010: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=04, enabled=1
  Power: setting=D3, actual=D3
  Connection: 1
    0x16
Node 0x1d [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000233c: IN OUT HP Detect
    Vref caps: HIZ 50 100
  Pin Default 0x0221401f: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=05, enabled=1
  Power: setting=D3, actual=D3
  Connection: 2
    0x16* 0x25
Node 0x1e [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000233c: IN OUT HP Detect
    Vref caps: HIZ 50 100
  Pin Default 0x02a19038: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Pink
    DefAssociation = 0x3, Sequence = 0x8
  Pin-ctls: 0x21: IN VREF_50
  Unsolicited: tag=04, enabled=1
  Power: setting=D3, actual=D3
  Connection: 2
    0x16 0x25*
Node 0x1f [Pin Complex] wcaps 0x400401: Stereo
  Pincap 0x00000020: IN
  Pin Default 0x503701f7: [N/A] CD at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x7
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Power: setting=D0, actual=D0
Node 0x20 [Pin Complex] wcaps 0x400701: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x074311f0: [Jack] SPDIF Out at Ext Rear Panel
    Conn = ATAPI, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power: setting=D0, actual=D0
  Connection: 1
    0x12
Node 0x21 [Pin Complex] wcaps 0x400701: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x074521f0: [Jack] SPDIF Out at Ext Rear Panel
    Conn = Optical, Color = Grey
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power: setting=D0, actual=D0
  Connection: 1
    0x15
Node 0x22 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000014: OUT Detect
  Pin Default 0x01016011: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Orange
    DefAssociation = 0x1, Sequence = 0x1
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=04, enabled=1
  Power: setting=D3, actual=D3
  Connection: 1
    0x26
Node 0x23 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000014: OUT Detect
  Pin Default 0x01012014: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Grey
    DefAssociation = 0x1, Sequence = 0x4
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=04, enabled=1
  Power: setting=D3, actual=D3
  Connection: 1
    0x27
Node 0x24 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x2a 0x2a]
  Converter: stream=5, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D3, actual=D3
Node 0x25 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Amp-Out caps: ofs=0x2a, nsteps=0x2a, stepsize=0x05, mute=0
  Amp-Out vals:  [0x2a 0x2a]
  Converter: stream=5, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: setting=D3, actual=D3
Node 0x26 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Power: setting=D3, actual=D3
  Connection: 1
    0x24
Node 0x27 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Power: setting=D3, actual=D3
  Connection: 1
    0x25


aus9 03-07-2011 01:39 AM

okeydokey

1) can you get any sound?

2) Are you using pulseauido?

3) what happens in alsamixer when you go to Master Front and hold page up to increase vol to max as its already unmuted but set to 0 volume

4) you may need to play some test sounds but what exactly does the hdmi cable go to? a home stereo? a tv? etc

5) do you know what hp and smart5.1 settings do? (as I don't)

aus9 03-07-2011 01:58 AM

instead of edit in case you are reading last bit ...google suggests there may be a tweak we can do but first can you explicitly say what sound devices you normally have on boot

and I mean all

include
phones
usb sound mixers includes mp3 players and the like


this is because we may have to force an index=(number) into your modprobe conf file

this is because your other sound device may be grabbing index=0......generally the first detected device gets index=0

until you understand this try this as a way of seeing what alsa sees

alsamixer -c0
should return the same output as alsamixer

alsamixer -c1
may produce and image or report invalid card index: 1

we can see this easier with the output of following command for my hw

Code:


aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: STAC92xx Digital [STAC92xx Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and I have deliberately not booted up with any other sound devices

aus9 03-07-2011 02:05 AM

and finally a thread talking a number of issues but your spdif already appears unmuted so we can look at the options for enabling msi maybe?

https://bbs.archlinux.org/viewtopic.php?id=90350

aus9 03-07-2011 02:15 AM

ok

google Old thread suggests what i said early is part true

1) max out your unmuted outputs

2) unmute (if muted) your SPDIF devices

as per
https://bugs.launchpad.net/ubuntu/+s...ux/+bug/406613

report your results please.....ignore index= values unless you find more than one device

scott12087 03-07-2011 07:40 PM

Quote:

1) can you get any sound?

2) Are you using pulseauido?

3) what happens in alsamixer when you go to Master Front and hold page up to increase vol to max as its already unmuted but set to 0 volume

4) you may need to play some test sounds but what exactly does the hdmi cable go to? a home stereo? a tv? etc

5) do you know what hp and smart5.1 settings do? (as I don't)
1) I can get sound from the rear speaker-out jack

2) Yes.

3) Turns up the front headphone jack. Not very useful.

4) HDMI goes out to a TV

5) No idea

Quote:

google suggests there may be a tweak we can do but first can you explicitly say what sound devices you normally have on boot

and I mean all

include
phones
usb sound mixers includes mp3 players and the like
I'm not sure if you want me to list them somehow from the command line, but there's on-board audio and the HDMI on the graphics card (not on-board). No USB devices or anything like that. If there is something grabbing index=0 and this is a problem then I'm guessing the on-board audio is doing it.

Here's something interesting. alsamixer -c0 gives the same controls as alsamixer (like you said), but alsamixer -c1 shows:
Code:

Card: NVidia
Chip: Nvidia ID b
...
This sound device does not have any controls

It doesn't mean much but it's the first indication that something is actually seeing my hardware. Yay!

Output of aplay -l still doesn't show it though:
Code:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 1/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: SB [HDA ATI SB], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Looking at the links you gave in the last two posts now. Will report back in a few minutes.

scott12087 03-07-2011 08:02 PM

Disabled the on-board audio. Now I get the output:

Code:

aplay -l
**** List of PLAYBACK Hardware Devices ****

Code:

aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)

alsamixer -c0 show the NVidia card now, which means that it now knows it as card 0, but it still says that there are no controls available for this card. Still no sound.

scott12087 03-07-2011 09:51 PM

Muchos progress! I built alsa from source as was suggested here:
https://bbs.archlinux.org/viewtopic....768136#p768136

Instructions for building from source here:
http://alsa.opensrc.org/Quick_Install

Don't forget to remove all snd and sound modules before trying to load the new ones or you'll get errors.

How to load the new modules automatically in Debian can be found here:
http://kernel-handbook.alioth.debian...h-modules.html

Now I can finally see the device on an aplay -l:
Code:

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

And I can see the 4 SPDIF interfaces when I go into alsamixer. Problem now is.....still no sound. Even when I unmute them in alsamixer. But hey, lots of progress.

scott12087 03-07-2011 10:14 PM

Still no progress on this. Going to bed and going to try again tomorrow. I'm trying to play a movie in VLC and still no audio. I'm not sure why. Everything is unmuted. Maybe Debian doesn't know to default to that device?

aus9 03-08-2011 03:59 AM

ok well if you are sure your first reported device is not what you what then you need to setup a blacklist entry in
/etc/modprobe.d/blacklist.conf

we need to know the exact module for that pesky device but I am guessing its snd_hda_intel so with root powers add this line

blacklist snd_hda_intel

2) now reboot and see what the command

Code:

lsmod | grep snd
reports and post the results pls

3) I would like you to redo the cat /proc/asound/card0/codec#0

I am thinking....if you had 2 devices....the pesky device grabs index=0 and you need the second device to have that index value

so there are 2 main ways of doing it

disable the hardware so it can not be detected or
tweak the configs so the second device is forced to use index=0

so

4) the tweak could be in rc.local or in a modprobe file....typically on a debian system in /etc/modprobe.d/alsa-base.conf

eg (not knowing your module I call X)

options moduleX index=0

Once we set the correct device to always use index=0....any other device device can no longer use index=0 ok?

aus9 03-08-2011 04:03 AM

BTW it might be better to post the full output of

lspci -v

lsusb

and

cat /proc/asound/cards

scott12087 03-08-2011 12:00 PM

I think I mentioned above that I already disabled the other audio source and that my HDMI sound is now at index 0 and visible through alsamixer. I will post the output of those commands when I get home to the computer tonight.

TobiSGD 03-08-2011 02:39 PM

Just a question, because I can see it nowhere mentioned in this thread: Do you have connected your video-card with the S/PDIF-connector from your motherboard?

scott12087 03-08-2011 09:56 PM

Got it working. Unmuted SPDIF in alsamixer and then it was just some settings in VLC. In preferences, turn on advanced settings, set the output device from Default to ALSA, refresh the list of ALSA devices and select nVidia device 0,7. There were a few nVidia devices, and 7 is the one that seemed to work for me.

Anyway, problem solved! Thanks for all the help!

scott12087 03-08-2011 10:00 PM

Quote:

Just a question, because I can see it nowhere mentioned in this thread: Do you have connected your video-card with the S/PDIF-connector from your motherboard?
Nope, no need for it.

scott12087 03-09-2011 07:15 AM

Just to clarify, the SPDIF connection may be needed on other cards, however my video card doesn't even have a connector for it. It worked without it.

TobiSGD 03-09-2011 04:43 PM

I really wonder about that, just because the 8400GS has no dedicated sound device.


All times are GMT -5. The time now is 09:02 PM.