libreelec10 - No Audio on 3,5mm Jack

  • Hello everyone,

    I have installed LibreELEC 10.0.2 on RPi 3 B+.

    I have a problem with the choice of the sound emission, I'll explain better.

    1.

    First I enable the following parameter in config.txt:

    Code
    dtparam=audio=on

    This is to be able to use the 3.5 Audio Jack

    2.

    I created autostart.sh where I run the following command on startup::

    Code
    pactl load-module module-udev-detect

    3.

    With a script I set the device connected via Bluetooth as the Audio source and everything works fine

    4.

    I have created a script to set which "sound card" to play the sound on but this is where I encounter the problem.

    Any setting I set (HDMI or Analog) however always comes out in Jack 3.5

    In the Kodi settings I see the following Audio tabs:

    - ALSA: bcm2835 Headphones, bcm2835 Headphones

    - PULSE: Default, Bluetooth Audio (PULSEAUDIO)

    - PULSE: Built-in Audio Digital Stereo (HDMI), HDMI / Display Port (PULSEAUDIO)

    If you select "ALSA: bcm2835 Headphones, bcm2835 Headphones" I hear audio only from Jack 3.5

    If I select "PULSE: Built-in Audio Digital Stereo (HDMI), HDMI / Display Port (PULSEAUDIO)" I hear the music in Jack 3.5 and the effects of the Kodi Gui on HDMI.

    This whole system in LibreELEC 9.2.8 version worked perfectly.

    You can help me?

    Thank you

    Edited once, last by napster32 (March 22, 2022 at 1:49 PM).

  • I Have solved, i have use this commands,

    For Use HDMI:

    Code
    pactl set-default-sink alsa_output.0.hdmi-stereo

    For Use Jack Audio:

    Code
    pactl set-default-sink alsa_output.1.stereo-fallback

    Than i have made this script:

    And I linked this script with a button in my keyboard enabled in keymap