Linux - Another HDMI & Sound plea for help..

  Thread Rating:
  • 2 Votes - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
adam81 Offline
Junior Member
Posts: 5
Joined: May 2012
Reputation: 0
Post: #1
Hi,

I've looked at huge numbers of threads and posts before even registering but nothing gets me very far.

I have a revo 3700 running 12.04 with XBMC eden

As per the other sound related post on the 1st page

1) audio is not muted in alsamixer.
2) audio works fine in VLC with same files - Well it did until I removed Pulseaudio reading that somewhere would help
3)menu sounds in XBMC works fine - again did until I removed Pulseaudio
4) When playing videos I can get downmixed audio from Pulse audio as the audio output if I deselect the AC3/DTS buttons, this is by selecting Pulseaudio as the output device but nothing through the passthrough
6) i have a reciever and it supports ac3 and dts

I'll happily post anything people want to look at in order, I've tried the most things, custom audio devices editing my asound files..

Anyone have any ideas?
find quote
KeithLM Offline
Fan
Posts: 309
Joined: Dec 2009
Reputation: 7
Post: #2
Provide the output of the following:
aplay -L
aplay -l
/etc/asound.conf (if exists)
~/.asoundrc

Also what version of the nvidia drivers are you using? Run 'dmesg | grep NVIDIA' and that should tell you.
find quote
adam81 Offline
Junior Member
Posts: 5
Joined: May 2012
Reputation: 0
Post: #3
aplay -L
Quote:null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default:CARD=Intel
HDA Intel, ALC662 rev1 Analog
Default Audio Device
sysdefault:CARD=Intel
HDA Intel, ALC662 rev1 Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Digital
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Direct sample mixing device
dmix:CARD=Intel,DEV=1
HDA Intel, ALC662 rev1 Digital
Direct sample mixing device
dsnoop:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Direct sample snooping device
dsnoop:CARD=Intel,DEV=1
HDA Intel, ALC662 rev1 Digital
Direct sample snooping device
hw:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Direct hardware device without any conversions
hw:CARD=Intel,DEV=1
HDA Intel, ALC662 rev1 Digital
Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Hardware device with all software conversions
plughw:CARD=Intel,DEV=1
HDA Intel, ALC662 rev1 Digital
Hardware device with all software conversions
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
HDMI Audio Output
dmix:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Direct sample mixing device
dsnoop:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct sample snooping device
dsnoop:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Direct sample snooping device
dsnoop:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Direct sample snooping device
dsnoop:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Direct sample snooping device
hw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=7
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=8
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=9
HDA NVidia, HDMI 0
Hardware device with all software conversions

aplay -l
Quote:**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 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

/etc/asound.conf - dont' have this, have a asound.config, which is also empty which I guess i probably created in error.

~/.asoundrc
Quote:Currently empty had previsoulsy tried the plughw trick but that seemed to crash XBMC then

NVIDIA Drivers
Quote:[ 18.488634] nvidia: module license 'NVIDIA' taints kernel.
[ 19.746428] NVRM: loading NVIDIA UNIX x86 Kernel Module 295.49 Mon Apr 30 23:30:07 PDT 2012


Cheers
Adam
find quote
KeithLM Offline
Fan
Posts: 309
Joined: Dec 2009
Reputation: 7
Post: #4
Have you tried he various custom hardware settings without asound files? I don't remember the exact syntax off-hand, but it's going to be some combination of plughw or hw and the card and device numbers for the nvidia in aplay -l. I think it will be something like hw:1,3 or hw:1,7 or hw:1,9.
find quote
Plaguester Offline
Senior Member
Posts: 262
Joined: May 2010
Reputation: 7
Post: #5
First try the HDMI plugs:
Code:
$ speaker-test -D plug:hdmi

Use CTRL+C to quit.

If that produces sound, then try the "hdmi (ALSA)" entry in XBMC. If not, try:
Code:
$ speaker-test -D plughw:1,3

Replace 3 with 7, 8, and 9 until it works.

HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
find quote
adam81 Offline
Junior Member
Posts: 5
Joined: May 2012
Reputation: 0
Post: #6
(2012-05-30 15:51)KeithLM Wrote:  Have you tried he various custom hardware settings without asound files? I don't remember the exact syntax off-hand, but it's going to be some combination of plughw or hw and the card and device numbers for the nvidia in aplay -l. I think it will be something like hw:1,3 or hw:1,7 or hw:1,9.

Doh.. Thanks so much Keith, I had been trying these to no success but using a 0 for the card as per most other threads I had seen for help not appreciating my card was listed as 1.

Cheers
find quote
KeithLM Offline
Fan
Posts: 309
Joined: Dec 2009
Reputation: 7
Post: #7
It would be really helpful if people who understood how these sound configurations worked would write a tutorial for the rest of us. People often throw out different values without explanation, and I am just lucky enough to guess the right stuff on occasion. I have no idea what the difference between plughw and hw is for instance.

I currently have two systems running, one has PulseAudio, and since I have sound for videos working I don't want to mess with it, I'm just living without the menu audio which doesn't bother me. The other is a Zotac box with specs similar to yours. I put XBMCbuntu on it so it doesn't have PulseAudio. I've been fortunate enough to find other people with similar configurations to mine that have it working with the optical output. I got XBMC and squeezeslave working together thanks to an asound.conf file I found here, but I don't know why it works and why it didn't before. It lacks menu sounds also, which I just find odd. Likewise I don't know the difference between the two audio devices that have to be set in XBMC and I've never seen a thorough explanation of the two. It's all very frustrating.
find quote
Plaguester Offline
Senior Member
Posts: 262
Joined: May 2010
Reputation: 7
Post: #8
(2012-05-30 21:04)KeithLM Wrote:  It would be really helpful if people who understood how these sound configurations worked would write a tutorial for the rest of us. People often throw out different values without explanation, and I am just lucky enough to guess the right stuff on occasion. I have no idea what the difference between plughw and hw is for instance.

The problem is that there are so many different combinations of sound cards, mainboards, receivers, and televisions that it would be impossible to cover all of them in a single guide. Even the version of the HDMI cable can make a difference in some circumstances. ION or ION2 devices should work out of the box with XBMCbuntu. I'm not familiar with other hardware, but the steps are typically the same.

The difference between plughw and hw is the ALSA plugin layer. Using plughw invokes the plugin layer which allows ALSA to adjust the sound to match what the sound card supports. hw invokes the hardware directly and turns off the plugin layer. If the sound doesn't match up with the sound card, it will not play.

(2012-05-30 21:04)KeithLM Wrote:  Likewise I don't know the difference between the two audio devices that have to be set in XBMC and I've never seen a thorough explanation of the two. It's all very frustrating.

"Audio Device" is the device to which XBMC sends sound that is decoded and mixed locally on the machine. The "Passthrough Audio Device" sends the original audio and the other device (usually a receiver) decodes it. It is preferable to have passthrough audio set up as it allows you to use more of the functions of your receiver.

The reason that you are given an option for both is that it is possible to connect multiple speakers to multiple outputs (HDMI to receiver and also want the headphone jack to work... etc.).

HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
(This post was last modified: 2012-05-31 00:37 by Plaguester.)
find quote
KeithLM Offline
Fan
Posts: 309
Joined: Dec 2009
Reputation: 7
Post: #9
Well I understand your point about there being too many devices, but just an analysis of one device, which commands you run, which part of the output you examine to feed to the next command, why you use plughw or hw, what a sink is, what is pulseaudio, how should it be used or should it be removed or could it be bypassed, etc. In many different cases I've seen people say "use plughw instead of hw", but never once why you would use that. It seems like most people are just stumbling around in the dark and hoping to make it work, without ever knowing why it works. Most of the time when I see people with the kind of problem adam81 had people just throw out a string to try in the custom audio, and never say why so other people could use that as a guide for their own audio setup.

As for the two devices, how do you determine which is working and when? I usually use pass-through, I assume, since my receiver does the processing. But I think if I change Audio Device it doesn't work at all. And then where's the menu audio going? That's completely different.

I've been using PC's since the 80's, and Linux since probably around 2000, and I find audio on Linux to be one of the worst things ever to work with. It's so damn cryptic and very touchy. I'm under the impression that I'd be better off without PulseAudio, but I'm scared to remove it because it will probably kill my working settings. I really do the AudioEngine stuff takes care of this nightmare.
find quote
Plaguester Offline
Senior Member
Posts: 262
Joined: May 2010
Reputation: 7
Post: #10
See my edit for plughw vs. hw. Generally, you want plughw because it enables the ALSA plugin layer.

HDMI connections require a handshake. If audio isn't enabled at the time of the handshake, the other device (the receiver) may disable audio until another handshake is executed. I believe this happens when you begin playing music or videos since the context changes (PCM vs. passthrough), but someone may need to correct me there.

HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
find quote
Chainsawdave Offline
Junior Member
Posts: 9
Joined: May 2012
Reputation: 0
Post: #11
Hi I don't profess to understand most of what I have read here so please be gentle. I have pretty much the same issue as adam81. I'm running ASRock H67M-ITX, 4GB Ram, A Radeon 6450 Graphics card Intel i3 2100 processor with Eden 11.0 I have HDMI connected to the graphics card and an optical Toshlink out for sound. Analog sound works fine using the generic driver. HDMI video works fine. The digital outputs give me nothing.

I have tried:
- plughw: 1,3 for both audio output and passthrough under the custom setting
- alsmixer settings all unmuted including SPDIF
- changing different sound drivers
With the above I get "Failure to initialize audio device" error

My aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH],device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Generic [HD Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

I'd post the aplay -L but not sure stop the screen scroll or how to copy the text.
Any help you chaps can off would be greatly recieved.
Thx in adavance.
find quote
KeithLM Offline
Fan
Posts: 309
Joined: Dec 2009
Reputation: 7
Post: #12
Chainsawdave, it looks like you need to use card 2, thus plughw:2,3. But I'm not sure if you got drivers loaded right since it's says Generic there. You need to look into the ATI threads for help with this. NVidia and ATI are two completely different beasts.

To get the output for something that scrolls by too fast just dump it to a text file then open it in an editor. Do the following:
aplay -L > output.txt
find quote
Chainsawdave Offline
Junior Member
Posts: 9
Joined: May 2012
Reputation: 0
Post: #13
Thank you KeithLM, much appreciated. I will try the ATI thread this weekend and report back. On the output question, can I FTP into the PC to get the text file so i can post it here? This is such an awesome project can't wait to get my machine working properly - thanks for all the help

Edit
Here is the aplay -L result
Quote:null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
HDA Intel PCH, ALC892 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Front speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Digital
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Direct sample mixing device
dmix:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Direct sample snooping device
hw:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Hardware device with all software conversions
hdmi:CARD=Generic,DEV=0
HD-Audio Generic, HDMI 0
HDMI Audio Output
dmix:CARD=Generic,DEV=3
HD-Audio Generic, HDMI 0
Direct sample mixing device
dsnoop:CARD=Generic,DEV=3
HD-Audio Generic, HDMI 0
Direct sample snooping device
hw:CARD=Generic,DEV=3
HD-Audio Generic, HDMI 0
Direct hardware device without any conversions
plughw:CARD=Generic,DEV=3
HD-Audio Generic, HDMI 0
(This post was last modified: 2012-06-01 18:08 by Chainsawdave.)
find quote
Chainsawdave Offline
Junior Member
Posts: 9
Joined: May 2012
Reputation: 0
Post: #14
Still having issues with my sound. Tried ATI forum but no success. I think the bottom line, the sound drivers are not there for my ATI card. So I gave up and bought an NVIDIA based card Asus 8400GS. Now I have no sound what so ever! I get the 'Failed to initialize audio' error at every audio output setting aprt from iec958 (ALSA) but I get no sound.
Can anyone help? thanks in advance

Quote:**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
aplay -L
Quote:ALSA lib namehint.c:278:(try_config) (digital_hw) device must be an integer
ALSA lib namehint.c:278:(try_config) (analog_hw) device must be an integer
null
Discard all samples (playback) or generate zero samples (capture)
default
both
multi
hdmi_formatted
hdmi_complete
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Front speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Digital
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Direct sample mixing device
dmix:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Direct sample snooping device
hw:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
HDA Intel PCH, ALC892 Analog
Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
HDA Intel PCH, ALC892 Digital
Hardware device with all software conversions
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
dmix:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct sample mixing device
dsnoop:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct sample snooping device
hw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Hardware device with all software conversions

Oh sorry a couple of pieces of information which might be critical. I had no /etc/asound.conf file and I can't locate ~asoundrc. it may be my lack of Linnux skills but it might not :-)
(This post was last modified: 2012-07-15 17:45 by Chainsawdave.)
find quote
TheGremlyn Offline
Junior Member
Posts: 22
Joined: Aug 2011
Reputation: 0
Post: #15
Chainsawdave, are you still trying to output audio over TOSLINK? If you have HDMI for video, why not output audio over that as well? From your aplay -l I only see one on board digital output, which is your HDMI out (hw:0,1). If you're set on using the optical cable you might want to check your BIOS for an On Board HD Audio setting and make sure it is enabled.

If you are attempting to use the 'hw:2,3' device, that is routing your output through the NVidia HDMI cable. If it is audio passthrough you are after, you will want to set the XBMC Passthrough option to 'custom', and use either 'plughw:#/#' or 'hw:#/#', where the numbers correspond to the appropriate card/device for the sound output you want to use. You will want to enable the AC3 and DTS capable receiver options as well.

What operating system are you running? I'm on an Ubuntu install with XBMC running on top (not XBMCbuntu). I had to remove PulseAudio in order to get passthrough functional, but this had the side effect of losing my menu sounds. I'd much rather listen to the movies and TV shows though Smile
find quote
Post Reply