Sound card code always changed randomly

Sound card code always changed randomly

I use Dietpi Native PC on mini PC BeeLink. And after rebooting, sound card id always change but randomly. First time hw:1,3 hw:1,7 hw:1,8 than next time change to hw:0,3 hw:0,7 hw:0,8.
Than after rebooting I should change sound card from dietpi-config
I have searched the existing open and closed issues

Required Information

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname --all
  • Architecture | dpkg --print-architecture
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | (EG: SanDisk ultra)

Best regards
Thanks

Hello, anyone can help me to solve this problem?

CAn you please fill out the troubleshoot templateE:

Required Information

DietPi version | cat /boot/dietpi/.version
Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
Kernel version | uname --all
Architecture | dpkg --print-architecture
SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
Power supply used | (EG: 5V 1A RAVpower)
SD card used | (EG: SanDisk ultra)

And can you share the output of

aplay -l
cat /etc/asound.conf
1 Like

Required Information

  • DietPi version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=9
    G_DIETPI_VERSION_RC=0
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘applied’
    G_LIVE_PATCH_STATUS[1]=‘applied’
    G_LIVE_PATCH_STATUS[2]=‘not applicable’
    G_LIVE_PATCH_STATUS[3]=‘not applicable’

  • Distro version | bookworm

  • Kernel version | Linux DietPi 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12) x86_64 GNU/Linux

  • Architecture | amd64

  • SBC model | Native PC (x86_64)

  • Power supply used | original from BeeLink

  • SD card used | eMMC

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Audio [KT USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
# cat /etc/asound.conf
pcm.!default {
        type hw
        card 0
        device 3
}

ctl.!default {
        type hw
        card 0
}

What should I change?
Thanks in advance

@MichaIng can you have a look pls.

1 Like

So card 0 is USB audio and card 1 is HDMI
You can change your alsa conf to the following, if you want to use USB:

pcm.!default {
    type hw
    card Audio
    device 0
}

ctl.!default {
    type hw
    card Audio
}

Then restart alsa
sudo systemctl restart alsa

Thanks for your suggestion. If I want to use HDMI, how to modify config?

Thanks

Then just change the card type from Audio to PCH and select the HDMI output you wanna use, like:

pcm.!default {
    type hw
    card PCH
    device 3
}

ctl.!default {
    type hw
    card PCH
}


Still change randomly after twice rebooting. Before this hw:0,3 hw:0,7 and hw:0,8, after rebooting it changes to hw:1,3 hw:1,7 and hw:1,8. Where set 0 and 1 for soundcard?
Thanks