Sound issue

Hy,
i used xu4 with the latest dietpi. But i dont have sound.

root@DietPi:/etc# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: OdroidXU4 [Odroid-XU4], device 0: Primary multicodec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0



root@DietPi:/etc# cat /etc/asound.conf
pcm.!default {
    type hw
    card 0
    device 0
    #format S16_LE
    #channels 2
    #rate 44100
}

ctl.!default {
    type hw
    card 0
}

The sound test is well played.

root@DietPi:/etc# speaker-test -c2

speaker-test 1.1.3

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 131072
Period size range from 64 to 65536
Using max buffer size 131072
Periods = 4
was set period_size = 32768
was set buffer_size = 131072
 0 - Front Left
 1 - Front Right
Time per period = 2,751413
 0 - Front Left
 1 - Front Right
^CTime per period = 3,833856

Bad information. This is 16 bit, 44kHz file.

root@DietPi:/etc# aplay /mnt/data/dietpi_userdata/Music/Andy\ C\ -\ Nightlife\ 6/01\ -\ DC\ Breaks\ -\ Shaman\ \(Original\ Mix\).mp3 -V -v
Playing raw data '/mnt/data/dietpi_userdata/Music/Andy C - Nightlife 6/01 - DC Breaks - Shaman (Original Mix).mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1299: Sample format non available
Available formats:
- S16_LE
- S24_LE

Kodi is stop playing the movie, and no sound.

How can i solve the issue?

That solved for me:

root@DietPi:~# cat /etc/asound.conf
pcm.dmixed {
        type asym
        playback.pcm {
                type dmix
                ipc_key 5678293
                ipc_perm 0660
                ipc_gid audio

                slave {
                        channels 2 # make 6 or 5.1 channel
                        pcm {
                                format S16_LE # S32_LE
                                rate 44100 # can also be 44100
                                type hw
                                card 0 # your card
                                device 0 # your device
                                subdevice 0 #important?
                        }

                        period_size 1024
                        buffer_size 2048
                }

                bindings {
                        0 0
                        1 1
# Uncomment below if using 6 channel
#                       2 2
#                       3 3
#                       4 4
#                       5 5
                }
        }
        capture.pcm "hw:0"
}

pcm.!default {
        type plug
        slave.pcm "dmixed"
}

And is selected in kodi the hdmi fixed.

Hello,

I managed to fix this issue - just changed the boot.ini configuration file: setenv vout_mode “dvi” to setenv vout_mode “hdmi”. I’m not sure though why it was so, It’s weird, because as far as I know, hdmi is a default setting for XU4 boot.ini in DietPi. I found the same question on Odroid forum, but they redirected me here.