enable analog audio on startup

  • Every time I reboot libreelec, the audio defaults to PA bluetooth. I need it to default to Analog because I am using headphones plugged into the audio jack.


    I can force the setting to change with a curl command:


    curl -d '{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.audiodevice","value":"PI:Analogue"},"id":1}' -H "Content-type: application/json" http://localhost:8080/jsonrpc



    I just don't know where to put it. I've put it in autostart.py, but it runs before Kodi starts. I've put it in a script called from autoexec.py, but it doesn't seem to fix the issue (maybe it runs too soon?)


    How can I force the Audio setting to stay on Analog? I'm using it in a vehicle with a PI touchscreen, so it will be rebooted a lot (every time I crank the car).


    eta: i edited /storage/.kodi/userdata/guisettings.xml


    changed the value to the following ("PI:Analogue" is the value I get when I run a curl for getSettings on this value after changing in the GUI.

    <setting id="audiooutput.audiodevice">PI:Analogue</setting>


    After reboot, it still won't stick.


    edit 2 : I had the wrong curl command above.

    Edited 2 times, last by david_a ().

  • If you don't need Bluetooth, uninstall all Bluetooth related add-ons. Probably one of those hijacks your audio control.

    Flexin' vinyl, jammin' break beats. 8)