Set Default Audio

  • Hello all,

    I have LibreELEC 9.2.1 running on a Gateway "frankenbox" (built from random parts). It works beautifully!!!

    I have HDMI and USB audio. Both of which work. I prefer to use USB as it is also my passthrough device and saves me switching settings. Every time I restart it always defaults back to HDMI audio. I've been scouring Google for hours looking for a way to change the default audio device using SSH or any method available and I can't for the life of me make the USB default!

    Help! I'll post any details or info you wish.

    Keep up the great work people!!! I love LibreELEC!

  • First, there is 9.2.2 for Generic for some audio settings. Not sure if it includes your setting problem.

    I take it the USB audio dongle is always inserted before you (re)boot your LibreELEC box?

    Try to get us dmesg listings of both situations with USB not-working and working.

  • Actually just upgraded to 9.2.2. Nothing changed.

    Both HDMI and USB always work. Always did. I don't have a problem with anything not working.

    How do I set USB to default is my question. Or can I disable HDMI audio?

    I go to system -> audio every time I boot the box and select USB. I have no use for the HDMI audio but it always defaults to it when it boots up.

    It seems like LibreELEC just doesn't remember the setting or something.

  • The onboard audio is disabled in BIOS yes. However, the HDMI is on a PCI-Express video card so no I don't have any option in BIOS to disable that.

    UPDATE: Ok so discovered something weird....

    Took a break while awaiting a reply from the forums. USB audio working fine as always while I watched a movie. I restarted my box for no good reason other than just because and knew what I wanted to do once it booted so as soon as the Kodi splash screen disappeared I began hitting the right arrow to move me over to the settings. And the audio for seriously the first two seconds came through the USB and then flipped over to the HDMI. So I went into settings and sure enough it says HDMI for audio, so I picked USB again and restarted. After the Kodi splash screen I did the same, started hitting arrows and again for the first two seconds sound comes from the USB and then flips to HDMI.

    Ummmm confused much? LOL

    Also forgot you requested this: (my dmesg log)

    http://ix.io/2fVe

    Edited 2 times, last by adamleander (March 29, 2020 at 9:19 PM).

  • However, the HDMI is on a PCI-Express video card so no I don't have any option in BIOS to disable that.

    A shot in the wild:

    maybe there is module parameter for your graphic card driver (radeon ?) to shut HDMI audio off ?

    in case of module radeon: "modinfo radeon" will show all available parameter

  • Hey!!

    I really hope someone out there reads this :) I fixed it!!!

    OK I am not taking the blame for this one. I'm not placing blame either LOL but, it wasn't me....

    Turns out the issue was caused by an add-on of yours called "Bluetooth Audio Device Changer" which I have installed and works perfectly. It has only one setting which is what sets the audio device back to default after switching off the bluetooth device you were using. This setting also applies that audio setting at boot....

    So, now that I have changed that setting to the USB Audio Device, not the HDMI Audio Device, everything works exactly as I wanted it to.

    Also, the settings to put into the "Bluetooth Audio Device Changer" add-ons were not easy to find. And it is one of your add-ons. So, something you guys may want to look into. Or I'll post it as a glitch somewhere for you if you'll tell me how and where?

    Thank you all so much for doing what you do!!

  • I have the exact same problem. Mine is defaulting to the analog output and I'm using HDMI. Can you share any details on how to enter the setting for the "Bluetooth Audio Device Changer"? I have tried a few things, nothing works. I would guess you'd want the text exactly as it's shown in System/Audio selection.

    Thanks,

    -Brad

  • Hey Brad,

    Honestly I kinda guessed at what to put in there. Mine says:

    ALSA:@:CARD=Device,DEV=0

    That is part of what shows up for my Settings-System-Audio HOWEVER that is for my USB Audio card so that setting will not work for you.

    I don't remember for certain, but I believe the following should make it default to HDMI (that is what you wanted, yes?):

    ALSA:@:CARD=HDMI,DEV=0

    It was an educated guess tho. I enabled ssh and used terminal on a linux machine to connect the LibreELEC machine.

    ssh root@"your machines ip address" (no quotes)

    It will ask for the default password. Then type:

    aplay -l

    AND/OR you may also type:

    aplay -L

    Both commands give info about the sound devices. Which I used and modified the setting. Honestly I got lucky :)

    Hope this helps. I'm by no means anyone to be providing information tho I'm just a home user (a smart one yes, but no expert....Lord, it's hard to be humble hehe).

  • Thanks Adam.

    Is the text you entered in the "settings" the exact same as aplay -l/-L returned? My Pi4 running LibreElec 9.2.1 doesn't like aplay -l or -L:

    But my ODroid N2 CoreElec v9.2.2 returns different stuff for each command:

    I tried "hdmi:CARD=AMLAUGESOUND,DEV=0", no dice.

  • Actually "hdmi:CARD=AMLAUGESOUND,DEV=0" does work. In Settings-System-Audio it shows differently, but it does work. I goofed and had "ALSA:" in front of the text above on my first try.

    Thanks Adam, you are the man!

  • Awesome!! Glad I could help someone out!!

    I am using LibreELEC on a generic PC. I have never used RPi or ODroid....

    Quite tickled that I was able to offer some assistance :)