LibreELEC-RR 9.x [ Emulationstation | Retroarch | Pegasus | DolphinQT | Moonlight | Chrome | Spotify ]

  • I'm well aware that dmix can be disabled, I'm just not sure what that has to do with anything. Alright so it's not interesting for you, just informing others that ALSA definitely is not useless. I have ES with menu sounds and omxplayer both outputting at the same time with ALSA at the moment, it's an option. I don't do guessing, I do testing ;)

    Mind sharing your configuration? I've been trying to implement something using ALSA and dmix but I have failed :(

  • On the RPi you don't even need an asound.conf, dmixing should already be enabled. To avoid ES/omxplayer locking the card, I had to use these settings:

    Code
    <string name="AudioCard" value="sysdefault" />
    <string name="AudioDevice" value="PCM" />
    <string name="OMXAudioDev" value="alsa" />

    Any application that tries to set a specific PCM device will break dmixing by locking the card. Applications should be set to default/sysdefault or not set at all. ES was picky about this, but the above combination works both with PA stopped or by having it running and use pasuspender:

    # SDL_AUDIODRIVER=alsa pasuspender -- emulationstation


    In most cases you should be able to just set ALSA_CARD=0 or specify the card like this in /storage/.config/asound.conf:

    defaults.pcm.!card 0

    defaults.ctl.!card 0

    defaults.pcm.!device 1

    defaults.ctl.!device 1

    Environment variable takes preference.

  • Thank you, I will try it

  • HaLeXz

    5schatten

    Think I found the cause of your volume troubles:

    LibreELEC.tv/soundconfig at master · LibreELEC/LibreELEC.tv · GitHub

    It's being run by /usr/lib/udev/rules.d/90-alsa-restore.rules.

    Well what in particular could be the reason for 44% volume on master in this file? I've played a bit with decreasing the volume by using dB but wasn't able to exactly hit 44% which also isn't exactly what I would expect once you set 25% for PA. /shrug:/

  • I thought perhaps because of this, but it seems like it's not being saved anywhere.

    5schatten

    niabi

    Elegant (somewhat) configuration of ALSA (dmix) based on the default sink detected in Pulseaudio: done. Tested on XU4/RPi3/Intel. Good bye pulseaudio ;)

    I guess this config file is just an option to add your custom channel config if you run into quirks :/

    So basically this works for systems with a single audio card on the first output? The problem is once you use dedicated GPUs or not the first video output you run into trouble. Otherwise probably fine -> have to test it.

  • It picks whatever Pulseaudio picks. My NUC has two cards with several devices, PA correctly detects 0,7 and it’s what my script generates config for.

    How do you tell PA which output it should use? Because normally you would get this output if PA is not running any sinks:

    It works fine for me once I start a frontend & PA has created a sink I've chosen. But then again I could use this code to let PCSX2 use the "fake" ALSA output while still PA is running :/

  • I’ll let you figure it out, you have no need for this useless stuff right? 😉

    Well this script makes only sense if you use a PulseAudio sink which standard LE doesn't.:/ So yes unless I use something like this it's still useless. Why should I create a PulseAudio sink and let a script create a config file that tells programs to use the same ALSA device & stop PA afterwards /shrug

  • I don't manually create anything, it will create a sink for the connected output.

    Indeed but a standard LE installation uses PA only for bluetooth so unless you start PA with a custom config that creates the sinks you wont't get any proper output for pactl list sinks

    Exporting -e PULSE_RUNTIME_PATH=/run/pulse \ to docker & updating the .inis is enough so run PCSX2 with PA?

    EDIT: works now.

  • I thought perhaps because of this, but it seems like it's not being saved anywhere.

    5schatten

    niabi

    Elegant (somewhat) configuration of ALSA (dmix) based on the default sink detected in Pulseaudio: done. Tested on XU4/RPi3/Intel. Good bye pulseaudio ;)

    Thanks for this! I tried implementing it on Amlogic but I failed (no sound at all), I think I am missing something, but I do like the elegant solution!

  • Thanks for this! I tried implementing it on Amlogic but I failed (no sound at all), I think I am missing something, but I do like the elegant solution!

    Did you merge all commits touching this? You probably need a lot of other PA related ones too. One problem for my Vim was that on certain tvs udev does not detect a correct device. So even if you use this it possible that autodetection of the correct device just failed.

  • Did you merge all commits touching this? You probably need a lot of other PA related ones too. One problem for my Vim was that on certain tvs udev does not detect a correct device. So even if you use this it possible that autodetection of the correct device just failed.

    I merged the ones I thought were related, but maybe I missed one if it was committed a while ago, will look at them again.

    My TV is an old 1080p TV so I might need to also check that to make sure the auto detect is working.


    But since its working on your VIM at least I know its something on my end!

    Question, is there a simple way to make sure the configuration of PA and ALSA is correct? and maybe I am wrong in other areas (like emu or ES configuration)

  • I merged the ones I thought were related, but maybe I missed one if it was committed a while ago, will look at them again.

    My TV is an old 1080p TV so I might need to also check that to make sure the auto detect is working.


    But since its working on your VIM at least I know its something on my end!

    Question, is there a simple way to make sure the configuration of PA and ALSA is correct? and maybe I am wrong in other areas (like emu or ES configuration)

    Well you got that wrong -> I use a complete different way to configure the audio backend because autodetect won't work reliable. But if you include all of escalade commits it should work but might break compatibility to other Kodi stuff. Been there, done that. Last time I tried to use PA in Kodi it broke audio passthrough for me so I keep it to the emulation stuff.