Kodi Community Forum

Full Version: ALSA output device
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
I'm trying to enable ALSA on raspbian stretch.
/etc/asound.conf contain some ALSA plugins:
Code:
pcm.!default {
   type plug
   slave.pcm "mainfilter";
}

ctl.!default {
 type hw card 0
}

pcm.ok {
   type plug
   slave.pcm "mainfilter";
}

pcm.mainfilter {
       type ladspa
       slave.pcm "plughw:0,0";
       path "/usr/lib/ladspa";
       plugins [

               {
                       id 1197
                      label mbeq
                      input {
                       # min="-70" max="30"
                       # 50Hz 100Hz 156Hz 220Hz 311Hz 440Hz 622Hz 880Hz 1250Hz 1750Hz 2500Hz 3500Hz 5000Hz 10000Hz 20000Hz
                               controls [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
#                                controls [ -6 -3 0 0 3 4 5 6 3 0 0 0 3 4 6 ]
                       }
               }

               {
                       id 1403
                      label dysonCompress
                      input {
                       # Peak limit (dB) ; Release time (s) ; Fast compression ratio ; Compression ratio
                               controls [ -9.0 0.5 2 4 ]
                       }
               }

               {
                       id 1913
                      label fastLookaheadLimiter
                      input {
                       # Input gain (dB) -20 -> +20 ; Limit (dB) -20 -> 0 ; Release time (s) 0.01 -> 2
                               controls [ 20 0 0.8 ]
                       }
               }

]
}
This file is symlinked to /etc/asound.rc and /home/pi/.asoundrc
Kodi 18 installed from "deb http://pipplware.pplware.pt/pipplware/di...ain/binary" repository

My /usr/share/kodi/system/advancedsettings.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>

 <fanartres>720</fanartres>
 <imageres>540</imageres>

 <video>
   <busydialogdelayms>750</busydialogdelayms>
 </video>

 <samba>
   <clienttimeout>30</clienttimeout>
 </samba>

 <cache>
   <memorysize>31457280</memorysize>
 </cache>

 <audiooutput>
   <audiodevice>ALSA:default</audiodevice>
 </audiooutput>

</advancedsettings>
I'm try to set:
<audiodevice>ALSA:default</audiodevice>
<audiodevice>ALSA:mainfilter</audiodevice>
<audiodevice>ALSA:ok</audiodevice>
<audiodevice>ALSA:plug:mainfilter</audiodevice>
<audiodevice>ALSA:plug:ok</audiodevice>
<audiodevice>ALSA:@</audiodevice>
It's not work for me. No sound or error "ERROR: CAESinkALSA::InitializeHW - Unable to find a suitable output format"
Kodi started in terminal emulator by command: "AE_SINK=ALSA kodi"
aplay -L :
Code:
null
   Discard all samples (playback) or generate zero samples (capture)
default
ok
mainfilter
sysdefault:CARD=ALSA
   bcm2835 ALSA, bcm2835 ALSA
   Default Audio Device
dmix:CARD=ALSA,DEV=0
   bcm2835 ALSA, bcm2835 ALSA
   Direct sample mixing device
dmix:CARD=ALSA,DEV=1
   bcm2835 ALSA, bcm2835 IEC958/HDMI
   Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
   bcm2835 ALSA, bcm2835 ALSA
   Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
   bcm2835 ALSA, bcm2835 IEC958/HDMI
   Direct sample snooping device
hw:CARD=ALSA,DEV=0
   bcm2835 ALSA, bcm2835 ALSA
   Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
   bcm2835 ALSA, bcm2835 IEC958/HDMI
   Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
   bcm2835 ALSA, bcm2835 ALSA
   Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
   bcm2835 ALSA, bcm2835 IEC958/HDMI
   Hardware device with all software conversions
"Aplay" tests is successfully passed:
"aplay -D ok 1k.wav" and "aplay -D default 1k.wav"

 What else can I do?
Kodi does not support ALSA "plugins".
Although you can make them work.
First you have to make sure the plugin is correctly configured and working. I think you are trying to use the "mainfilter" right ? If so, you tested "aplay -D ok 1k.wav" and "aplay -D default 1k.wav", but not "aplay -D mainfilter 1k.wav".
If it is working, add to advancedsettings.xml:
Code:
<audiooutput>
   <audiodevice>ALSA:mainfilter</audiodevice>
</audiooutput>

PS: You don't need to call AE_SINK=ALSA kodi (which from Kodi 18+ is KODI_AE_SINK=ALSA by the way), only if you want to use PulseAudio. For example: KODI_AE_SINK=PULSE kodi. This only applies to Kodi on Raspbian.
I am totally stuck.
aplay -D mainfilter 1k.wav say:
Code:
Playing WAVE '1k.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1294: Access type not available
aplay -D ok 1k.wav work perfect, all plugins is OK
omxplayer this option "--adev alsa" work correctly this default section of asound.conf
If I try to set in advancedsettings.xml:
Code:
 <audiooutput>
   <audiodevice>ALSA:default</audiodevice>
 </audiooutput>
Kodi get error:
Code:
ERROR: CAESinkALSA::InitializeHW - Unable to find a suitable output format