Kodi Community Forum

Full Version: ALSA passthrough SPDIF
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi All!
I'm fighting with a problem of audio passthrough in Kodi 17.4 in Ubuntu Linux 16.04.3 LTS.
When linux/kodi is decoding sound evrything is OK, but when I check passthrough option I hear only cracks from speakers, yes they support DD or DTS.
Evrything is working fine in VLC on this system with this options:
Image

I turn on KODI with this parameters:
Image

But I see only this devices (less then in VLC):
Image

And there are settings of passthrough:
Image

Evrything is working fine when the playback device is: Audiotrak ProDigy CUBE, USB Audio Direct #1 hardware device without any conversions
Anybody knew method to force KODI to use this device in ALSA?
On the pulseaudio passthrough isn't working in any app, I have only confiramtion from VNC that passthrough is working with ALSA and device mention before.

Output from aplay -L:
Code:
root@HTPC:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=CUBE
    Audiotrak ProDigy CUBE, USB Audio
    Default Audio Device
sysdefault:CARD=CUBE
    Audiotrak ProDigy CUBE, USB Audio
    Default Audio Device
front:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    Front speakers
surround21:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    Direct sample mixing device
dmix:CARD=CUBE,DEV=1
    Audiotrak ProDigy CUBE, USB Audio #1
    Direct sample mixing device
dsnoop:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    Direct sample snooping device
dsnoop:CARD=CUBE,DEV=1
    Audiotrak ProDigy CUBE, USB Audio #1
    Direct sample snooping device
hw:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    Direct hardware device without any conversions
hw:CARD=CUBE,DEV=1
    Audiotrak ProDigy CUBE, USB Audio #1
    Direct hardware device without any conversions
plughw:CARD=CUBE,DEV=0
    Audiotrak ProDigy CUBE, USB Audio
    Hardware device with all software conversions
plughw:CARD=CUBE,DEV=1
    Audiotrak ProDigy CUBE, USB Audio #1
    Hardware device with all software conversions
a52:CARD=CUBE
    Audiotrak ProDigy CUBE

Regs,
Sam!
Everything is documented in the wiki: http://kodi.wiki/view/PulseAudio
I'm not a Linux expert (that's fritsch) but since you have Pulseaudio installed then if you want to use ALSA while keeping Pulseaudio installed then you must suspend Pulseaudio, as fritsch hinted this is documentated at http://kodi.wiki/view/PulseAudio#Can_I_f...stalled.3F
(2017-10-22, 15:15)fritsch Wrote: [ -> ]Everything is documented in the wiki: http://kodi.wiki/view/PulseAudio
I read this document and for me this solution isn't working.
(2017-10-22, 16:10)jjd-uk Wrote: [ -> ]I'm not a Linux expert (that's fritsch) but since you have Pulseaudio installed then if you want to use ALSA while keeping Pulseaudio installed then you must suspend Pulseaudio, as fritsch hinted this is documentated at http://kodi.wiki/view/PulseAudio#Can_I_f...stalled.3F
I knew that but even when I kill PulseAudio proccess or remove even pulseaudio this isn't working.

Main issue is that I don't see in Audio device output: Audiotrak ProDigy CUBE, USB Audio Direct #1 hardware device without any conversions
but I see this device in VLC.
VLC is not Kodi.. you might have figured so far :-) post your Debug Log please.
I know that VLC is not Kodi Smile but this is example that in VLC passthrough is working.

Log in link: https://paste.ubuntu.com/25795433/

During the video playback i hear from speakers cracks and noise.
you have to configure pulseaudio for passthrough support. See the Wiki
The problem is something else:

Quote:19:03:36.549 T:140248122124032   DEBUG: CActiveAESink::OpenSink - trying to open device PULSE:alsa_output.usb-GYROCOM_C_C_Co.__LTD_Audiotrak_ProDigy_CUBE-01.iec958-stereo
19:03:36.550 T:140248122124032   DEBUG: PulseAudio: Context authorizing
19:03:36.550 T:140248122124032   DEBUG: PulseAudio: Context setting name
19:03:36.550 T:140248122124032   DEBUG: PulseAudio: Context ready
19:03:36.552 T:140248122124032   DEBUG: PulseAudio: Stream ready
19:03:36.552 T:140248122124032  NOTICE: PulseAudio: Opened device alsa_output.usb-GYROCOM_C_C_Co.__LTD_Audiotrak_ProDigy_CUBE-01.iec958-stereo in pcm mode with Buffersize 150 ms
19:03:36.552 T:140248122124032   DEBUG: CActiveAESink::OpenSink - PULSE Initialized:
19:03:36.552 T:140248122124032   DEBUG:   Output Device : Device not found

The device is disappearing out of a sudden. Afterwards pulse falls back to the default device which obviously cannot cope with getting RAW,RAW input. You might have more luck with a recent Ubuntu.

Aha! this is foobar. Your guisettings.xml still has the PULSE:whatever entry while you now force ALSA. Therefore opening the pulse device fails. Post another log WITHOUT alsa forced.
I just open kodi without any parameters, still cracks and noise, log here: https://paste.ubuntu.com/25797617/
When I disable passthorugh, sound is working but unfortunetly without DTS on my sound system.

@wsnipex
I use wiki to force alsa, and in second option to force passthrough in pulse. Both solution dosn't work.
Log looks better now :-) it opens the device correctly.

Do the following: Remove your guisettings.xml and start kodi with ALSA forced again and give us a log.
Stil same after I delete this file, only all settings disapeare, after that I only configure passthrough in options, nothing more was change.
http://paste.ubuntu.com/25802358/
Did you try to start kodi forcing Alsa?

Code:
AE_SINK=alsa kodi

from command line
@DaVu
yes
(2017-10-23, 19:52)Dr_K1einer Wrote: [ -> ]@DaVu
yes

Could you please try LibreELEC from an USB stick? Seeing the KabyLake with old Mesa and old drivers hurts - let's see if it works better there. From the log: audio wise: all okay.
(2017-10-23, 21:12)fritsch Wrote: [ -> ]
(2017-10-23, 19:52)Dr_K1einer Wrote: [ -> ]@DaVu
yes

Could you please try LibreELEC from an USB stick? Seeing the KabyLake with old Mesa and old drivers hurts - let's see if it works better there. From the log: audio wise: all okay.


I'm not a linux expert you mean my Linux is out of date? Or this distro LibreELEC?

About LibreELEC I will try tomorrow Smile additionality I will try with Ubuntu 17.10 (in portable mode).
Pages: 1 2