PDA

View Full Version : mplayer 5.1 ok, xbmc only stereo for passthrough


jiojio74
2009-06-22, 21:31
I think the proble is here:
# speaker-test -c6 -Diec958

speaker-test 1.0.18

La periferica di riproduzione è iec958
I parametri dello stream sono 48000Hz, S16_LE, 6 canali
In uso 16 ottave di rumore rosa
Conteggio dei canali (6) non disponibile per la riproduzione: Argomento non valido
L'impostazione dei parametri hardware è fallita: Argomento non valido

Same thing with -D plug:iec958

But WHY mplayer works fine?

# mplayer -ac hwac3 www_lynnemusic_com_surround_test.ac3
MPlayer 1.0rc2-4.3.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Atom(TM) CPU 330 @ 1.60GHz (Family: 6, Model: 28, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not open config files /root/.lircrc and /etc/lirc//lircrc
mplayer: No such file or directory
Failed to read LIRC config file ~/.lircrc.

Playing www_lynnemusic_com_surround_test.ac3.
libavformat file format detected.
[lavf] Audio stream found, -aid 0
================================================== ========================
Forced audio codec: hwac3
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
No accelerated IMDCT transform found
hwac3: switched to AC3, 448000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
================================================== ========================
AO: [pulse] Unsupported sample spec
AO: [alsa] 48000Hz 2ch ac3 (1 bytes per sample)
Video: no video
Starting playback...


Previously I have ubuntu Hardy (minimal install) with 8.04 and all works fine. I just fresh installed jaunty (minimal install) and 9.10 I had this problem.

No pulse installed.

Maybe is related to this:
http://ubuntuforums.org/showthread.php?t=1165897
If so: I must compile alsa with this plugin?

bobo1on1
2009-06-23, 03:04
Did you set xbmc to use digital audio output and did you disable "Downmix multichannel audio to stereo" ?

jiojio74
2009-06-23, 09:39
Obviously yes: digital, default, iec958, multichannel downmix disabled. I remember that in 8.04 there was a enable direct passthrough or something similar that now there isn't.
And if you noticed also speaker-test fails so I think is some problem with alsa.

P.S.: I noticed now that the speaker-test was not in english. This is a possible translation:


Channel counting (6) not available for playbacks: argument not valid
Setting of hwparams failed: argument not valid

If I try with:
# speaker-test -c2 -Diec958
works fine

xbmcuser01
2009-06-23, 14:55
I remember that in 8.04 there was a enable direct passthrough or something similar that now there isn't.

Do you mean Ubuntu 8.04 or Xbmc 8.04? You must set up alsa/linux to passthrough digital audio (which you did, else no passthrough via mplayer). AND one must set up Xbmc to passthrough digital audio.

P.S. The link to the Ubuntu forum you posted is about encoding 6 channels to a digital stream to pass to one's amplifier. This is not what you are tying to do. The audio on a DVD is already digitally encoded. ;)

Haggy
2009-06-23, 17:26
And if you noticed also speaker-test fails so I think is some problem with alsa.


You cannot output plain 6 channel pcm through spdif. Either use the plug-device and loose your surround information or output _ENCODED_ AC3 to your amplifier (which is what mplayer does according to your output). Set your passthrough device in xbmc to iec958.

jiojio74
2009-06-23, 17:27
Do you mean Ubuntu 8.04 or Xbmc 8.04?

Sorry: I mean in xbmc 8.10 (atlantis) on ubuntu hardy


You must set up alsa/linux to passthrough digital audio (which you did, else no passthrough via mplayer). AND one must set up Xbmc to passthrough digital audio.

When I have atlantis with hardy the only things I did to enable passthrough was to unmute iec958 with alsamixer, change from analog to digital xbmc, enable DTS, AC3 and flag that "enable direct passthrough" (or something similar that in babilon now there isn't).
Now with jaunty and babilon: unmuted iec958 in alsamixer; in babilon: changed from analog to digital, enabled AC3, DTS, disabled downmix multichannel.
I think is something to do with alsa because testspeacker don't work with 6 channel.


P.S. The link to the Ubuntu forum you posted is about encoding 6 channels to a digital stream to pass to one's amplifier. This is not what you are tying to do. The audio on a DVD is already digitally encoded. ;)

Oh! I didn't noticed this part:
It works really well in playing stereo CD quality sound and pre-recorded 6 channel audio using dolby digital.
Thanks

You cannot output plain 6 channel pcm through spdif. Either use the plug-device and loose your surround information or output _ENCODED_ AC3 to your amplifier (which is what mplayer does according to your output). Set your passthrough device in xbmc to iec958.
I've already done this! This is my sound settings in xbmc:
<audiooutput>
<ac3passthrough>true</ac3passthrough>
<audiodevice>default</audiodevice>
<downmixmultichannel>false</downmixmultichannel>
<dtspassthrough>true</dtspassthrough>
<mode>1</mode>
<passthroughdevice>iec958</passthroughdevice>
</audiooutput>
Changing audiodevice to iec958 mute everithing, changing passthroughdevice to plug:iec958 change nothing

Haggy
2009-06-23, 17:37
Changing audiodevice to iec958 mute everithing, changing passthroughdevice to plug:iec958 change nothing

That's not what i said. Do it this way:
<audiodevice>plug:iec958</audiodevice>
<passthroughdevice>iec958</passthroughdevice>

and tell us if you're actually trying to play some ac3 file (the one you played with mplayer) or something else.

jiojio74
2009-06-23, 18:49
I changed audiodevice as specified, I lost menu sound and... works!!!
The file of the example above don't go, but my other film now works.

This is the log after a restart and playing the same file:
http://pastebin.com/m29ac3bd4

If you want to try, this is the file:
http://www.lynnepublishing.com/surround/www_lynnemusic_com_surround_test.ac3

Haggy
2009-06-23, 19:01
for menu sounds you need some alsa magic. don't know though, i don't want menu sounds :)