My setup is:
Odroid C2
CoreELEC latest
USB sound card
On every reboot and sometimes while playing a movie or a song the default playback device jumps back to HDMI. That is really annoying and I’ve been trying everything to change it.
I tried adding the following line to ~/.config/modprobe.d/alsa-base.conf :
options snd_usb_audio index=0
That just makes USB sound disappear completely?! I suspect that’s because of snd_usb_audio index=-2 in /lib/modprobe.d/alsa-base.conf
I tried adding this to either ~/.asoundrc and ~/.config/asound.conf :
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
Neither of which helped at all. Of course I did a full reboot after every change. I am desperate I don’t know what else to do… If anyone here could help, I’d be very greatful.
English is not my first language, so I appologize for any mistakes.
If you wanna a simple solution, get an HDMI pass through with an audio splitter. This way, you will guarantee both video and audio signals come from the same HDMI output port from the TV Box. If you are still on 1080P resolution, perhaps this FHD 1080P Converter Adapter 3.5mm Audio Output Jack is what you want. For 4K video, perhaps this [HDMI Audio Extractor AY78 HDMI to HDMI Optical TOSLINK SPDIF + 3.5mm Stereo Extractor]. For a 4K video, perhaps this (https://www.aliexpress.com/item/Hot-HDMI-Audio-Extractor-AY78-HDMI-to-HDMI-Optical-TOSLINK-SPDIF-3-5mm-Stereo-Extractor-Converter/32830875128.html) is what you will need. Just one word of caution, product like this may not be stable and will cease to function after a few months of usage, particularly if it heats up while in use.
Yeah don’t really wanna do that. Ideally I wanna be using a high quality USB DAC or if that doesn’t work I’ll see if I can get an I2C DAC working with the Odroid C2 and CoreELEC. I mean it works pretty good already, just that the software sometimes starts using HDMI again. Which should be possible to fix…
Second this as a problem behaviour.
I would suspect its a scheduling error where sound is brought up before the USB port. Would be nice to have a forced setup for USB DAC.
The strange thing about this is that on initial boot the USB sound card is working and about 10 seconds into the boot sequence it switches away to another output device.
I have messed about with placing the guisettings.xml entry for ALSA into the advancedsettings.xml, but this seems not to work.
I was mistaken in suggesting that this was resolved in nightlies. However I have managed to resolve it myself and this is how.
There is not a asound.conf file by default in CE, and this is the file which allows you to user define the default sound device among other things.
You need to create asound.conf and set your default in it.
The place to put asound.conf is in (not the usual location of this file in Linux)
/storage/.config
Find out what sound devices you have by issuing the command:
cat /proc/asound/cards
This will list a number followed by the sound device description, use this number to set the default by placing these two lines in asound.conf