LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-27-2014, 03:28 AM   #1
dugan
Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 5,502

Rep: Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733
Getting sound from NVidia desktop video card to TV over HDMI


How do I get HDMI audio working? I'm connecting an NVidia GTX 760 video card to a TV over HDMI. Video is going over the HDMI cable; I'm trying to get audio over the HDMI cable too.

I've attached a screenshot of what I see in alsamixer if I press F6 to select the sound card built into the video card. As you can see, I can unmute the channels, but I can't set their volumes above zero.

I should mention that when I boot into Windows, audio over HDMI just works. I say this not to whine, but because I think it's relevant to troubleshooting.

Here's my aplay -l

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD 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 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
And here's my aplay -L:

Code:
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    Front speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
I'm using the binary NVidia drivers, of course.
Attached Thumbnails
Click image for larger version

Name:	alsamixer.jpg
Views:	51
Size:	94.3 KB
ID:	15796  
 
Old 06-27-2014, 09:19 AM   #2
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 810

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Greetz
I have essentially the same card but I don't have anything I can plug HDMI into to test audio but I am very curious as to how this thread turns out since I expect to remedy that shortly. I do have an idea that I have yet to check out and that is I am wondering if the nVidia driver also normally supports the HDMI audio and therefore provides some sort of conflict with ALSA? I'm going to look through the rather comprehensive and helpful nVidia driver documentation to see if this is so and what switches might be applied. Perhaps you might wish to peruse those as well. In any case if I find something I'll write back but still depend on you since you can actually test it out. Good fortune.
 
Old 06-27-2014, 09:39 AM   #3
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current & "True Multilib." PC-BSD.
Posts: 2,419

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by enorbet View Post
..I am wondering if the nVidia driver also normally supports the HDMI audio..
Yes, the nvidia drivers for Linux do support HDMI audio.
Unless someone has come up with a recent solution, setting up HDMI in Linux is not an easy task and not everything will work, e.g., some applications might be able to use HDMI and other may not.
 
Old 06-27-2014, 09:51 AM   #4
dugan
Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 5,502

Original Poster
Rep: Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733
Update.

I don't have it working yet, but these commands are all working and sending sound to the HDMI-connected TV:

Code:
aplay -D plughw:NVidia,3 /usr/share/sounds/alsa/Front_Center.wav
aplay -D plughw:NVidia,7 /usr/share/sounds/alsa/Front_Center.wav
aplay -D plughw:NVidia,8 /usr/share/sounds/alsa/Front_Center.wav
aplay -D plughw:NVidia,9 /usr/share/sounds/alsa/Front_Center.wav
I got them from here: http://ubuntuforums.org/showthread.php?t=1668737

Several guides have recommended setting a probe_mask option on the Intel driver. I haven't been able to investigate that yet, but here's what I get for grep valid /proc/asound/NVidia/eld*:

Code:
/proc/asound/NVidia/eld#0.1:eld_valid		1
Quote:
and not everything will work, e.g., some applications might be able to use HDMI and other may not.
The setup is of ALSA, so wouldn't it work with every application that outputs audio through ALSA?

Last edited by dugan; 06-27-2014 at 09:59 AM.
 
Old 06-27-2014, 09:55 AM   #5
NGIB
Member
 
Registered: Sep 2013
Location: Hinesville, GA USA
Distribution: MX-14
Posts: 156

Rep: Reputation: Disabled
I've had some luck using Pulseaudio to control where the sound goes on my laptop with nvidia...
 
Old 06-27-2014, 10:28 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Whatever fits the task best
Posts: 16,275
Blog Entries: 2

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Set up Alsa to use the HDMI output as default (info how to do that here).
Easier, but a sacrilege for some people: Just install Pulseaudio and let it route audio to whichever output you want, including changing the output on the fly.
 
Old 06-27-2014, 01:19 PM   #7
ReaperX7
Senior Member
 
Registered: Jul 2011
Location: California
Distribution: FreeBSD 11.0-Current Slackware64-Current
Posts: 4,639
Blog Entries: 15

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
The best option is to just disable the onboard audio if possible. This will allow udev to detect only the HDMI processor and use the Intel HD Audio. It also helps if you have a PCI/PCIe audio card that uses a different chipset as well.

Yes, using PulseAudio is easier, but you should learn, at least, how to properly configure ALSA and dmix properly.

Last edited by ReaperX7; 06-27-2014 at 01:20 PM.
 
Old 06-27-2014, 01:33 PM   #8
genss
Member
 
Registered: Nov 2013
Posts: 565

Rep: Reputation: Disabled
.asoundrc in HOME
Code:
pcm.!default {
  type hw
  card 1
  device 3
}
i think, and may be wrong, that this is direct routing
so if two sound sources have different sample/bit rate then only the first one will get through
expanding the config would sort that out, if it happens (i think its the ctl part, not sure)

PS flash may also not work
an udev rule to put nvidia interface as the first one (0) would fix that

edit: as per wiki that TobiSGD linked, this might work if the one above does not
Code:
defaults.pcm.card 1
defaults.pcm.device 3
defaults.ctl.card 1

Last edited by genss; 06-27-2014 at 01:43 PM.
 
Old 06-27-2014, 01:52 PM   #9
dugan
Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 5,502

Original Poster
Rep: Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733
Quote:
Originally Posted by ReaperX7 View Post
The best option is to just disable the onboard audio if possible. This will allow udev to detect only the HDMI processor and use the Intel HD Audio.
I tried that approach. It didn't work, and I abandoned it before doing any analysis beyond "it didn't work."
 
Old 06-27-2014, 01:56 PM   #10
NGIB
Member
 
Registered: Sep 2013
Location: Hinesville, GA USA
Distribution: MX-14
Posts: 156

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Yes, using PulseAudio is easier, but you should learn, at least, how to properly configure ALSA and dmix properly.
Some of us just want to use our computers rather than digging around and editing config files - which is why I mentioned that PulseAudio had worked for me...
 
Old 06-27-2014, 02:46 PM   #11
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 31

Rep: Reputation: Disabled
I have had the same issue; I found the first ~/.asoundrc file mentioned by genss in post #8 didn't work, but the second one did (with some tweaking):
Code:
defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0
I have it saved as ~/.asoundrc-hdmi so when I plug the hdmi cable in I just cp ~/.asoundrc-hdmi ~/.asoundrc
 
Old 06-27-2014, 02:51 PM   #12
dugan
Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 5,502

Original Poster
Rep: Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733
Quote:
Originally Posted by enorbet View Post
I have essentially the same card but I don't have anything I can plug HDMI into to test audio but I am very curious as to how this thread turns out since I expect to remedy that shortly.
I won't be able to try out the recommendations until tonight (most likely tomorrow), but I do need to ask, enorbet: will your Slackware Box be an HTPC or a Steam Machine?
 
Old 06-27-2014, 04:12 PM   #13
genss
Member
 
Registered: Nov 2013
Posts: 565

Rep: Reputation: Disabled
Quote:
Originally Posted by Loomx View Post
I found the first ~/.asoundrc file mentioned by genss in post #8 didn't work, but the second one did (with some tweaking):
device numbers are based off of aplay -l from the first post

card0 is whatever was initialized first on the system
every card has subdevices, like my card0 has "device 0: Multichannel [Multichannel]" and "device 1: Digital [Digital]"
udev, i think, is the one that initializes the cards but there is something about alsa configs (never digged deep enough)
 
Old 06-27-2014, 04:19 PM   #14
dugan
Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 5,502

Original Poster
Rep: Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733Reputation: 1733
NVidia (ftp://download.nvidia.com/XFree86/gp...dmi-audio.html) mentioned that chipsets are Card 0 and discrete cards are Card 1.

Last edited by dugan; 06-27-2014 at 04:26 PM.
 
Old 06-27-2014, 06:42 PM   #15
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 810

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Quote:
Originally Posted by dugan View Post
I won't be able to try out the recommendations until tonight (most likely tomorrow), but I do need to ask, enorbet: will your Slackware Box be an HTPC or a Steam Machine?
I suppose the short answer is, as it is pretty much all the time, some mongrel

I'm using an old Olevia 27" HDTV for a monitor which, although it has an HDMI input, the docs say only the VGA input can be used for PC. It's a decent amount of screen real estate but it's resolution is no great shakes - limited to 1280 x 720. I am an avid gamer so I have many versions of Steam installed through PlayOnLinux but I also have Pipelight for streaming. I do have an interest in trying out the Steam OS after it gets dry behind the ears, but no rush on that as presently the only reason I have left to boot to Windows is for parts of audio recording/editing work. I do as much as I can with Ardour, and have since it first came out as Alpha software, but unfortunately some initial work still takes windows apps and plugins.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] no sound ati video card HDMI Shadowmeph Linux Mint 3 01-27-2014 12:00 AM
(RHEL 5.6) No sound after installing NVIDIA Video Card with hdmi neoserdes Linux - Hardware 7 05-08-2012 03:10 AM
No sound through inboard HDMI on Fedora 12 with proprietary NVIDIA video driver rcx11 Linux - Hardware 9 08-21-2010 08:29 PM
Debian Video Card Question, Nvidia and HDMI bruceam Linux - Hardware 5 07-31-2009 12:29 PM
Missing the perimeter of my desktop - Video Card / DVI-HDMI waffe Linux - Hardware 3 04-20-2009 01:23 PM


All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration