C2 no more sound after kodi install

Hello everyone,
i’m using DietPi on Odroid C2 with Xfce as desktop. I have a usb audio adapter which was working fine. After installing Kodi, i can’t find the way to have sound. No sound in Kodi (usb audio selected in settings) neither with vlc or inside chromium (youtube).

cat /proc/asound/cards gives

 0 [ODROIDHDMI     ]: ODROID-HDMI - ODROID-HDMI
                      ODROID-HDMI
 1 [Device         ]: USB-Audio - C-Media USB Audio Device
                      C-Media USB Audio Device at usb-dwc2_b-1.2, full speed

lsmod | grep snd

snd_usb_audio         132230  2 
snd_hwdep               7912  1 snd_usb_audio
snd_usbmidi_lib        22268  1 snd_usb_audio
snd_rawmidi            22113  1 snd_usbmidi_lib
snd_seq_device          6677  1 snd_rawmidi

It seems that after Kodi install, the file asound.conf disappeared. I wrote a new one but i’m not sure it’s correct

cat /etc/asound.conf

pcm.!default {
type hw
format S32_LE
card 1
}
ctl.!default {
type hw
card 1
}

Exit of speaker-test -c2

speaker-test 1.0.28

Le périphérique de lecture est default
Les paramètres du flux sont 48000Hz, S16_LE, 2 canaux
Utilisation de 16 octaves de 'pink noise'
Configuration erronée pour la lecture: pas de configuration: Argument invalide
Échec de la configuration des paramètres matériel: Argument invalide

Any help would be appreciated as i don’t know what to do to solve the problem
Thanks

Hi,

Many thanks for reporting this.

I’ll create a ticket and look into this issue. You can track its status here: https://github.com/Fourdee/DietPi/issues/532

Hi,

Was unable to replicate with XFCE + Kodi, sound working fine.

Please remove the asound.conf, this is no longer required with latest kernel:

rm /etc/asound.conf
reboot

Please also update kernel:

apt-get update
apt-get dist-upgrade
reboot

If problems persist, please let me know.

Thanks for your answers

Did this, sound now works again in vlc by selecting manually usb audio card in settings but still doesn’t work with chromium or Kodi.
In Kodi, audio output selected is C-Media usB Audio Device (@:CARD=Device,DEV=0). But my card 0 is HDMI and my usb audio device is n°1, so i think it should be seen as DEV=1 to work. Am i right ?
How do i tell the system that my default output is card 1 ? I thought it was in /etc/asound.conf but you tell me it is no longer required. What replace it ?

You can check which soundcards and devices the system has found with:

aplay -l

So if it is card 1 and device 0, the asound.conf would be:

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

ctl.!default {
   type hw
   card 1
   device 0
}

You can also run a simple speaker test with:

speaker-test -c2
#ctrl+c to stop

If its still not working, please paste the output of these commands:

aplay -l
aplay -L
lsmod

I created /etc/asound.conf like this :

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw           
    card 1
}

and everything works fine !

Thank you very much for all your work on DietPi