• 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 14
Linux PulseAudio Sink
#76
slurp, relax a bit you getting irate for no reason other than because you're frustrated, You not doing it correctly as it it works when running it directly, so cearly your system is doing something odd.

sometimes is bet to wrap the variables in ""

export MYVAR="test"
echo $MYVAR

Wacking environment var in script

read http://askubuntu.com/questions/139195/ho...e-launcher
and
do what you already been told by nickr.
Reply
#77
Hello,

Bitperfect audio output is important to me and due to the way PA sink concept has been implemented this is now broken in Gotham. My media PC is not 100% reserved for xbmc use and due to that I went the way of installing it on plain ubuntu instead of some type of minimal install. Therefore I have PA and find it hard to get rid of it now. I tried to go down that road on 12.04; it was not pretty and in the end there was still no success (I'm on 13.10 now).

My question now is, really, this. I tried starting xbmc via "AE_SINK=ALSA" workaround and when I do that, I do get my real hw audio output devices in xbmc settings, instead of just the PA sink virtual devices. However, even when I do select them, I can still see that high res audio sources get downsampled to 44.1 or 48 kHz. So the question is, is this expected? If it is, I'd like to understand why, if it is not, let me know, and I'll post logs debugs etc.

Thanks!
-- Stanislav
Reply
#78
Here, read this: http://xiph.org/~xiphmont/demo/neil-young.html and think about it.

Edit1: And concerning the second part: No, that should and will not happen on a correctly configured system. If you have ALSA with dmix running, then this will be used. I still don't understand why audiophiles come with pulseaudio and dmix installed ...

Edit2: Make fully sure you select the correct output device. It must be your alsa hw device, if you use the "pulse wrapper", it's obviously clear that you don't get any other bitrates.


And now to help a bit: Post a xbmc.log please with the AE_SINK=ALSA then we all can see the available samplerates.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#79
I know about that article. I do agree with the basic premise of it, but let's not get into that discussion now, it is in a way beside the point of this conversation.

I reproduced the problem with debugging enabled, and this time paid attention to xbmc.log. Here it is.

When playing audio, CAESinkALSA fails to open hw sound device ("Device or resource busy") and falls back to PA sink with 44.1 kHz sample rate.

Code:
03:36:21 T:140145728784128    INFO: CAESinkALSA::Initialize - Attempting to open device "iec958:CARD=C20,DEV=0"
03:36:21 T:140145728784128    INFO: CAESinkALSA - ALSA: pcm_hw.c:1557:(snd_pcm_hw_open) open '/dev/snd/pcmC1D0p' failed (-16): Device or resource busy
03:36:21 T:140145728784128    INFO: CAESinkALSA - Unable to open device "iec958:CARD=C20,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00" for playback
03:36:21 T:140145728784128    INFO: CAESinkALSA - ALSA: pcm_hw.c:1557:(snd_pcm_hw_open) open '/dev/snd/pcmC1D0p' failed (-16): Device or resource busy
03:36:21 T:140145728784128    INFO: CAESinkALSA - Unable to open device "iec958:CARD=C20,DEV=0" for playback
03:36:21 T:140145728784128   ERROR: CAESinkALSA::Initialize - failed to initialize device "iec958:CARD=C20,DEV=0"
03:36:21 T:140145728784128   DEBUG: CActiveAESink::OpenSink - trying to open device ALSA:default
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::GetChannelLayout - Input Channel Count: 2 Output Channel Count: 2
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::GetChannelLayout - Requested Layout: FL,FR
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::GetChannelLayout - Got Layout: FL,FR
03:36:21 T:140145728784128    INFO: CAESinkALSA::Initialize - Attempting to open device "default"
03:36:21 T:140145728784128    INFO: CAESinkALSA::Initialize - Opened device "default"
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::InitializeHW - Request: periodSize 2205, bufferSize 8820
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::InitializeHW - Got: periodSize 2205, bufferSize 8820
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::GetChannelLayout - Input Channel Count: 2 Output Channel Count: 2
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::GetChannelLayout - Requested Layout: FL,FR
03:36:21 T:140145728784128   DEBUG: CAESinkALSA::GetChannelLayout - Got Layout: FL,FR
03:36:21 T:140145728784128   DEBUG: CActiveAESink::OpenSink - ALSA Initialized:
03:36:21 T:140145728784128   DEBUG:   Output Device : Playback/recording through the PulseAudio sound server
03:36:21 T:140145728784128   DEBUG:   Sample Rate   : 44100
03:36:21 T:140145728784128   DEBUG:   Sample Format : AE_FMT_FLOAT
03:36:21 T:140145728784128   DEBUG:   Channel Count : 2
03:36:21 T:140145728784128   DEBUG:   Channel Layout: FL,FR

I thought about this a little, and then realized that I inadvertently left the following in advancedsettings.xml:

Code:
<streamsilence>1</streamsilence>

Problem disappeared when I removed that.

This is fixed now, thanks for looking!
-- Stanislav
Reply
#80
streamsilence advancedsetting is not existent at all in gotham. It does absolutely nothing, cause it is not read. All advancedsettings.xml audio settings have been dropped for gotham.

Problem is that pa daemon is hogging your device, so xbmc cannot open it exclusively. Exactly therefore we made the pa sinkt.

streamsilence is now the "Keep Audio alive Setting"
audiophile is now the "Best match" output setting.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#81
Hmmmm. On fernetmenta build, I assure you that I can reproduce the problem by adding/removing streamsilence setting from advancedsettings.xml, without any additional changes.

Also, if the problem was just that the pa daemon was hogging the soundcard, how come that the issue never existed on team-xbmc stable build? I moved to fernetmenta using your instructions because I had intermittent video issues on the stable build since I moved to new hardware (described here).
Reply
#82
The AudioEngine has been completely merged into xbmc mainline.

Post a logfile with it and one without that setting. Mainline audio engine is exactly the same (minus one patch that is for buffer time 0.5 vs 0.4 seconds) as in fernetmenta tree.

I won't argue with you. I have seen so many problems with full blown pulseaudio blocking the Audio Sink ... reproduce with mainline, provide whatever log you think does it different to show that issue.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#83
Don't have access to the system right now, will do so tonight when I'm back home.

And thanks again for all your awesome work.
Reply
#84
Sorry, somehow I cannot reproduce it anymore. Boy, do I feel stupid now... I'm sure it was there yesterday.

I will let you know if I somehow catch it later.
Reply
#85
Don't try too hard :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#86
When I first saw the new Gotham audio engine in Linux, I panicked. Where did my passthrough, Dobly Digital, DTS-HD and Dolby TrueHD options go? I got used to those options working well for me on Frodo.

Thanks to the pulsaudio wiki and this thread, I discovered I can have all those options back by enabling alsa with:

$ AE_SINK=ALSA xbmc

My next question was how to enable alsa without the terminal. I found the relevant passage:

(2014-02-23, 03:09)nickr Wrote: Alternative 2, write a script named xbmcmyway (or whatever you want to call it
Code:
#!/bin/sh
AE_SINK=ALSA xbmc

Put it in /usr/local/bin and make is executable.

Copy /usr/share/applications/xbmc.desktop to /usr/share/applications/xbmcmyway.desktop

Change the line Exec=xbmc to Exec=xbmcmyway

Now click on that to make xbmc go. Even edit the icon to distinguish it from the usual xbmc icon.

Thanks nickr. It worked beautifully. I now got an icon to launch xbmc-alsa.

I don't doubt that pulseaudio is useful to some people. A developer even went through great lengths to completely rewrite pulseaudio for Gotham. But for me, with pulseaudio it's just going through too many hoops to get passthrough working, also DTS-HD/TrueHD are not even supported. On my system, the soundtracks have so much more punch when passthrough is enabled.
Reply
#87
Just remove pulseaudio if you don't want to use it. I rewrote it for gotham cause I believe in "sane users", e.g. who has installed it, wants to use it. DTS-HD / TrueHD support will come into xbmc after PA starts supporting it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#88
@fritsch: there is almost no such thing as a user who installs Pulseaudio. It is installed by default, that's why people use it. The percentage of people who install it deliberaly because they need it is probably close to <5.
Reply
#89
same thing, if you run a full blown desktop install you probably want pulse. If you install a htpc optimized system, you don't have pulse.
Reply
#90
I don't believe it is installed by default be either of the main 2 XBMC distros - openelec and xbmcbuntu.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 14

Logout Mark Read Team Forum Stats Members Help
PulseAudio Sink0