C2 no more sound after kodi install Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
manusim972

C2 no more sound after kodi install

Post by manusim972 »

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

Code: Select all

 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

Code: Select all

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

Code: Select all

pcm.!default {
type hw
format S32_LE
card 1
}
ctl.!default {
type hw
card 1
}
Exit of speaker-test -c2

Code: Select all

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
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: C2 no more sound after kodi install

Post by Fourdee »

manusim972 wrote:It seems that after Kodi install, the file asound.conf disappeared
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
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: C2 no more sound after kodi install

Post by Fourdee »

Hi,

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

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

Code: Select all

rm /etc/asound.conf
reboot
Please also update kernel:

Code: Select all

apt-get update
apt-get dist-upgrade
reboot
If problems persist, please let me know.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
manusim972

Re: C2 no more sound after kodi install

Post by manusim972 »

Thanks for your answers
Fourdee wrote:Please remove the asound.conf, this is no longer required with latest kernel:
CODE: SELECT ALL
rm /etc/asound.conf
reboot
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 ?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: C2 no more sound after kodi install

Post by Fourdee »

manusim972 wrote: 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:

Code: Select all

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

Code: Select all

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:

Code: Select all

speaker-test -c2
#ctrl+c to stop
If its still not working, please paste the output of these commands:

Code: Select all

aplay -l
aplay -L
lsmod
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
manusim972

Re: C2 no more sound after kodi install

Post by manusim972 »

I created /etc/asound.conf like this :

Code: Select all

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
Post Reply