[LINUX] no passthrough sound
#1
Question 
Hello,

I'm a {xbmc, linux} noob, who after reading many posts, realizes that my awesome build included ATI Sad And now I am quite regretful, but stuck with it.

I have read numerous posts and trying out different configurations before posting. Obviously nothing helped. I would greatly appreciate any help I can get!

Configuration:
Ubuntu 11.10
AMD A6-3650 APU
ASROCK A75M-HVS FM1
Conencted via HDMI to Onkyo receiver

Code:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code:
$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    Playback/recording through the PulseAudio sound server
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
    Hardware device with all software conversions

Code:
$ cat /etc/asound.conf
pcm.!default {
        type hw
        card 0
        device 3
}

ctl.!default {
        type hw
        card 0
}

A few things I've tried:

Followed advice here to install 11.10 catalyst driver:
http://wiki.cchtml.com/index.php/Ubuntu_...tion_Guide

Ensured that in alsamixer everything is unmuted (I only have 1 card, with spdif as only option).

In XBMC i've tried setting passthrough sound to: hdmi, hw:0,3, plughw:0,3 (all of these work with speaker-test -D). With always the same results:
Code:
13:20:38 T:140328153728768 M:3134590976   ERROR: Initialize - failed to open custom device hdmi:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2 (error:Device or resource busy), retry with default hdmi
13:20:38 T:140328153728768 M:3134590976   ERROR: Initialize - pcm_open_lconf, alsa error: -16 - Device or resource busy
13:20:38 T:140328153728768 M:3134337024   ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen

I've tried adding alsa sink to pulse default.pa config, this leads to me loosing sound altogether:
Code:
load module module-alsa-sink device=hw:0,3

Also added my user to audio, video groups.

Again, any help would be greatly appreciated.
Reply
#2
I've discovered a few things:

- using pasuspender xbmc seems to crash XBMC, there is no useful output in the log files

- removing pulseaudio and setting audio and passthrough in XBMC to Custom=hdmi does the trick (now I don't get any sounds in ubuntu, so need to fix this)

- also setting passthrough in XBMC to Custom=pulse with pulseaudio installed also works
Reply
#3
Did you ever get this to work the way you wanted? THere's so much conflicting info right now, I'm not sure what to try.
Reply
#4
Yes there is!

I never did get any replies from anyone here or on linux forums. So I bought windows, now everything just works

~jdw
Reply
#5
I think there is a bug somewhere. I can't get sound in system or menu, it only works during media playback. That is using HDMI alsa. But when i install pulse audio and choose to use it with HDMI, the sound will work, but only stereo output is supported. Shouldn't it be possible to use alsa driver for system and menu sound?
Reply
#6
I recently spent a few hours trying to troubleshoot why Ubuntu 12.04 had system sounds and XBMC had menu sounds, but no playback had audio. The error in the logs was "alsa error: -16 - Device or resource busy"

By disabling XBMC navigation sounds (in Settings/Appearance) media playback starting working. Claus, I'm not sure why it's not possible to get system/menu and playback sounds
Reply
#7
Are you running XBMC inside the Ubuntu session or are you running XBMC in the standalone session?

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
Reply
#8
Hey guys,

I have been dealing with this for a while now (its pulseaudio + XBMC + pulseaudio's previous lack of passthrough support + XBMC's bleeding edge support of passthrough within pulseaudio)

OK so to start:

The reason your seeing device busy is because pulseaudio has locked the device to handle audio, therefore XBMC cant get a lock on the audio device.

XBMC's menu audio goes through the OS default sound output (in Dharma and Eden, not sure about latest with audioEngine, will confirm once mine is working) which is why that works when XBMC doesnt.

Basically you have a few choices:
1. Cripple pulseaudio's control over your sound device / give it a dummy device, and point XBMC direct to audio device with custom strings. This will work but will result in no menu sounds (plus other things that use menu output, TVTunes being one)
2. Get Pulseaudio working correctly. and set XBMC to output from that - This will work for PCM stuff (SD movies, audio etc) but will result in no passthrough.
3. Update to the XBMC nightly's and try your luck at the new audioEngine stuff which supports pulseaudios' new passthrough method. - I am trying to do this now, i have had a few problems with the XBMC nightlys unfortunately. Basically you will need an OS which has pulseaudio 1.0+ installed and configured, have OS sounds working correctly through pulseaudio, then have a working install of a recent nightly.

I hope thats some helpful info, if you need more please let me know. If you are willing to stuff around, option 3 is best, but if you want a quick fix, breaking pulseaudio and then pointing direct to the device (aplay -l gives you the right info) will get you sorted for all media Smile
Also a couple of other things:

1. It IS possible to get the OS and XBMC to output via the alsa device, however only one thing can have it open at once in most cases (this is what pulseaudio is designed to handle) so its not practical nor easy.
2. For a quick way to cripple pulse (this works on fedora, havent tested on ubuntu) just edit the default.pa config (in /etc/pulse/ for fedora) and instead of adding the device as a sink, add it as a source.
i.e. the correct entry to get my HDMI output working in pulse is: load-module module-alsa-sink device=hw:0,7
However if you use load-module module-alsa-source device=hw:0,7 it breaks the config and stops pulse loading on boot / login

Once you have done that you can put custom:plughw:0,7 for both passthrough and regular audio and off you go Smile (but its a dirty hack for now)
Reply
#9
After you have made changes to alsa or pulseaudio you need to modify the 'Sound' app to reflect these changes. I use pulseaudio so I use 'pavucontrol'
In 'pavucontrol' under 'configuration' there are a few options to choose, try each once until you get sound in your OS then move onto XBMC.

My setup
I have on-board audio disabled in BIOS

aplay -l
Code:
**** 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

/etc/asound.conf
Code:
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

/etc/pulse/default.pa (added to file)
Code:
load-module module-alsa-sink device=hw:0,7

Lastly
pavucontrol
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] no passthrough sound0