HDMI audio output on Nvidia Geforce card

HDMI audio output on Nvidia Geforce card

Postby pomotron » Jun 4th, '11, 12:15

Hi, I'm having a problem playing audio through HDMI output on my video card GeForce GTS 450. Being the Linux beginner I am, I don't really understand the relationship between ALSA, Pulseaudio and Phonon (I run KDE), but so far it seems to me that the problem lies in Pulseaudio.
What I've discovered so far:
The system recognizes two sound devices, the motherboard sound card, which I don't intend to use, and the Nvidia HDMI output, and I can see these two in Phonon. No matter what I do at this moment I can't get any sound out of the HDMI. However, when I disabled Pulseaudio, Phonon showed many more devices, and about 4 of them were the HDMI thing and one of them was the real output, I could hear the sound when I ran the test sound on it (I had to unmute one of the S/PDIF channels in "alsamixer" first). If I pull this device all the way up on the Phonon preference scale, I will get sound from Amarok, but it doesn't work for system sounds and Firefox playing Flash (I haven't tried anything else, yet). Interestingly, the same trick did make system sounds work in OpenSuse (11.3 and 11.4), though the Firefox/Flash was mute as well.
Thanks to Phonon and "aplay -l" I believe the correct audio device for output lies on the "hw:2,7" line.
What should I do to set that device to be the default output for Pulseaudio? Or does the problem lie somewhere else and the disabled-Pulseaudio-made-things-work thingy is just a misdirection?
pomotron
 
Posts: 6
Joined: Jun 4th, '11, 11:37

Re: HDMI audio output on Nvidia Geforce card

Postby pomotron » Jun 6th, '11, 15:17

It seems like I solved it.

Since I knew the card and device number assigned by ALSA, I just had to open /etc/pulse/default.pa in editor and change this line
Code: Select all
#load-module module-alsa-sink

into this
Code: Select all
load-module module-alsa-sink device=hw:2,7

where 2 and 7 are my particular instances of card and device numbers.
This created a new sink for Pulseaudio, which was connected to the correct device and then used as the default output (I don't know whether automatically or just by chance).
pomotron
 
Posts: 6
Joined: Jun 4th, '11, 11:37

Re: HDMI audio output on Nvidia Geforce card

Postby maat » Jun 6th, '11, 15:42

thanks for adding the answer for those who could come here with the same problem :)
maat
 
Posts: 307
Joined: Feb 13th, '11, 00:23

Re: HDMI audio output on Nvidia Geforce card

Postby Sturmkraehe » Jul 22nd, '11, 22:34

Thx, I had the same problem :-)

Still some more problems with PulseAudio: is it possible to passthru AC3, DTS, DolbyDigital 5.1 etc.?

With mplayer i can use it this way:
mplayer -ac hwdts,hwac3, -afm hwac3 *
works very well.

But on PulseAudio I only get 2 channels. On some pages they write to use the padevchooser, but I don't find it on mageia 1
Sturmkraehe
 
Posts: 2
Joined: Jul 22nd, '11, 22:30

Re: HDMI audio output on Nvidia Geforce card

Postby colin » Jul 25th, '11, 11:26

@pomotron, strange that PA did not offer this as a possible configuration of you sound H/W. Does using "hdmi:2" not work for you? This is how PA detects HDMI (we rely on underlying alsa support). If:

pasuspender bash
aplay -D hdmi:2 something.wav
exit

does not play anything for you then the underlying alsa support is broken on this device.

If this works, then you should happily be able to select HDMI as an option (tho' I admit it's not exposed as well as it should be and this is something I'm currently working on with some of the Canonical guys and also a part of my talk subject at the Desktop Summit). Under the "Speaker Setup" tab in System Settings -> Multimedia, you should have the option to change your card to HDMI mode. If this does not exist (but the above aplay does work), then please open a bug report and attach the output of "pacmd ls". Cheers

@Sturmkraehe: Passthrough support is not yet in the released version but it will be available in the month or so as we release the next version of PA. Clients need to be updated to support this, although preliminary support for GStreamer has already been written. Various UI tweaks will be needed to make this work fully moving forward (e.g. to disable volume control UIs - applets and multimedia keys when passthrough is active; to explain unobtrusively to the user why a second sound that is "played" is effectively stalled or muted while a passthrough stream has exclusive control etc).

That said, mplayer is not really architected in such a way as to make this work nicely - as it's passthrough and PCM modes are apparently on quite different branches of the graph. But for mplayer, where manual command lines are used, it should probably be able to be hacked to use the dbus device reservation protocol that PA supports such that similar UI concessions are made when it is playing directly via passthrough.

Also, I personally use the following approach for 5.1 output via digital spdif: http://colin.guthr.ie/2010/12/bobby-dig ... -surround/ It's not perfect, but it does also have some advantages over a passthrough system (such as volume control and multiple stream mixing), but for the typical "movie" scenario, that's pretty irrelevant

HTHs..
colin
 
Posts: 53
Joined: Jul 25th, '11, 11:15

Re: HDMI audio output on Nvidia Geforce card

Postby colin » Jul 25th, '11, 11:28

Oh and also, we do not support padevchooser and have not recommended it's use for 2+ years. We have even removed support for the feature of PA it uses in the upcoming release. It wouldn't actually help you in this case anyway :D, the a52 alsa output plugin is the only way to get 5.1 sound on spdif outputs in PulseAudio.
colin
 
Posts: 53
Joined: Jul 25th, '11, 11:15

Re: HDMI audio output on Nvidia Geforce card

Postby rolf » Jul 31st, '11, 21:04

we do not support padevchooser and have not recommended it's use for 2+ years.


Hmmm. I am just crawling along, trying to adapt to all the developments, including your, obviously, very good work with such a complex software as pa. I've recently bought myself a usb headset for gotomeeting (windows-only online conferencing tool) in a VirtualBox Xp guest and stumbled onto padevchooser as a means for selecting the headset on-the-fly as default sink and source, which seems to work in this case.

The software is vast, it seems to me, as well as documentation. Perhaps you could point out a good strategy for learning how to better configure this software.

Another oddity, I occasionally need to mute/unmute an always plugged-in mic or line-in from the plasma tv. For this, I call alsamixer, which always starts with Master Front, Master Center, Master Rear only. I press F6 to choose device, Default is pre-selected and I arrow down to the other entry, 0 HDA Intel, exposing many other channels, including Mic and Line. Reading this thread and looking into man pages, I found alsamixer -c 0 will bring up the desired mixer, w/o having to go to the F6-choose card routine, thanks to `man alsamixer`. Just seems odd that the only card, 0, is somehow different from "Default" in this app.

While I'm here, just one more thing :) I have many of the KDE notification sounds enabled and, if I trigger these notifications too rapidly, say switching desktops one after the other, after about 3 or 4 notifications, volume jumps to 100%. Not too problematic but something of a curiosity, non-ideality.

Using Asus P5Q Deluxe onboard intel audio chip.
00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller
and
snd_hda_codec_analog 77434 1
snd_hda_intel 23164 3
snd_hda_codec 87382 2 snd_hda_codec_analog,snd_hda_intel
snd_hwdep 6162 1 snd_hda_codec
snd_pcm 77309 4 snd_hda_intel,snd_hda_codec,snd_bt87x,snd_pcm_oss
snd 60082 18 snd_hda_codec_analog,snd_hda_intel,snd_hda_codec,snd_bt87x,snd_hwdep,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
snd_page_alloc 7773 3 snd_hda_intel,snd_bt87x,snd_pcm

Thanks!
rolf
 
Posts: 131
Joined: Mar 25th, '11, 02:58

Re: HDMI audio output on Nvidia Geforce card

Postby nextwave » Dec 23rd, '11, 05:57

I'm also having the same issue. Hi, I'm having a problem playing audio through HDMI output on my video card GeForce GTS 450. If there is anything I can try please let me know. I have edited /etc/pulse/default.pa and tried 2,7 but doesn't seem to do anything except make my audio mixer disappear. So i looked at "aplay -l" to find out what card/device I'm using.. this is what I got listed.

Code: Select all
[nextwave@localhost ~]$ aplay -l
**** 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
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
[nextwave@localhost ~]$


I'm not exactly sure which device I should use. I see its listing as card 1, but not sure where to go next. Any help would be greatly appreciated.
nextwave
 
Posts: 26
Joined: Oct 4th, '11, 21:41
Location: Ontario, Canada

Re: HDMI audio output on Nvidia Geforce card

Postby Vagulo » Mar 16th, '12, 12:33

And I have the same problem. :( GeForce GT 440.
Code: Select all
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 1: NVidia_1 [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia_1 [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia_1 [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia_1 [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
Vagulo
 
Posts: 16
Joined: May 21st, '11, 21:58

Re: HDMI audio output on Nvidia Geforce card

Postby colin » Mar 16th, '12, 13:49

Without offering all that much help, I will state that the latest kernel will provide availability information such that we know when a given HDMI device is plugged in.... this then helps us make the right routing decision in PulseAudio. Sadly the routing infrarstructure to do that is still in development and will certainly not be in mga2 for release time. It may, however, appear as a backport in a few months, but it really depends on implementation upstream an dhow much time I have etc. It's certainly non-trivial!!

In the case of the previous two replies, the HDMI device is on card 1, so anything starting hw:2... is wrong: it should start hw:1.

I can actually provide you a little patch that might help you out.... bear with me a little while and I'll dig it out. It should work on mga1 and does not require a recompile.
colin
 
Posts: 53
Joined: Jul 25th, '11, 11:15

Re: HDMI audio output on Nvidia Geforce card

Postby Vagulo » Mar 17th, '12, 00:07

I tried different options: load-module module-alsa-sink device=hw:1,3 (1,7...1,8...1,9), but it appears to switch the device does not bring results. No sound.

On another computer, we can not even hear the sound from the headphone jack on the front panel (Mageia 2 Beta 2 - PulseAudio pre-2). A lot of problems with sound in Mageia, unfortunately. : (
Vagulo
 
Posts: 16
Joined: May 21st, '11, 21:58

Re: HDMI audio output on Nvidia Geforce card

Postby colin » Mar 23rd, '12, 12:39

Vagulo, please define "a lot of problems". HDMI support is pretty young and only in the very latest version is it intended to work even vaguely properly for how certain hardware presents it (e.g. nvidia cards). I'm not sure how I can define that as a "problem" when it was not intended to work.

As for the front panel thing, this is something I'm very interested in, but I have not seen a bug report about it. Can you tell me the bug link for the bug you reported?

I also have a patch ready for people on Mageia 1 for exposing extra HDMI profiles on nvidia machines. I'll post about that in a separate comment.
colin
 
Posts: 53
Joined: Jul 25th, '11, 11:15

Re: HDMI audio output on Nvidia Geforce card

Postby colin » Mar 23rd, '12, 12:45

OK, so the attached patch should be downloaded.

Then on your machine, become root then do:

Code: Select all
cat 0001-HDMI-Add-jack-detection-for-HDMI-as-well-as-probing-.patch | patch -p0 --dry-run


If that works, then remove the --dry-run bit.

This is modifying files that are distributed with pulseaudio so you can undo this change by adding -R to the patch command.

After this is applied, you should restart your computer and then extra profiles will appear to enable the different HDMI devices (on the Configuration tab of pavucontrol). This is no auto-sensing of which one is active in this version.

Please remember to undo any customisations you made to your default.pa as these may affect probing at startup.
Attachments
0001-HDMI-Add-jack-detection-for-HDMI-as-well-as-probing-.patch.txt
Rename to remove the .txt suffix
(8.56 KiB) Downloaded 455 times
colin
 
Posts: 53
Joined: Jul 25th, '11, 11:15

Re: HDMI audio output on Nvidia Geforce card

Postby Vagulo » Mar 24th, '12, 21:25

colin, I previously described some of the problems: https://bugs.mageia.org/show_bug.cgi?id=2119 But I install Mageia for different people. So write in Bugzilla does not make sense - usually, I can not later come to these people to perform the tests.

Nevertheless, thanks for the patch! Maybe I can try it.
Vagulo
 
Posts: 16
Joined: May 21st, '11, 21:58

Re: HDMI audio output on Nvidia Geforce card

Postby doktor5000 » Mar 25th, '12, 14:47

Vagulo wrote: But I install Mageia for different people. So write in Bugzilla does not make sense - usually, I can not later come to these people to perform the tests.

Well, that's a problem, as in that case you can't expect the issues to be fixed, if noone reports or confirms them, and if they are not easily reproducable.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: HDMI audio output on Nvidia Geforce card

Postby Dwb » May 7th, '12, 03:53

Just a sugestion to try regarding sound card problems disable on board sound card in the BIOS have had to do this before myself
User avatar
Dwb
 
Posts: 16
Joined: Jan 11th, '12, 00:31
Location: Lithgow Australia


Return to Sound

Who is online

Users browsing this forum: No registered users and 1 guest