Problem with an usb dac in Dietpi with Odroid C1+

Creating a bug report/issue

Required Information

  • DietPi version | 8.17.2
  • Distro version | bullseye
  • Kernel version | Linux DietPi 5.15.93-meson #23.02.2 SMP Fri Feb 17 22:38:47 UTC 2023 armv7l GNU/Linux
  • Architecture | armhf
  • SBC model | Odroid C1+ (armv7l)
  • Power supply used | apple 5v charger
  • SD card used | sandisk

Additional Information (if applicable)

  • Software title | Squeezelite v1.9.9-1414
  • Was the software title installed freshly or updated/migrated? no
  • Can this issue be replicated on a fresh installation of DietPi? don’t know

Steps to reproduce

i plug an usb dac wich is capable of decoding flac audio files 16 bits and 24 bits up to rate 96000 (Audiophonics U-Sabre)

cat /proc/asound/card1/stream0 :

SAVITECH Bravo-X USB Audio at usb-c90c0000.usb-1.1, full speed : USB Audio

Playback:
  Status: Stop
  Interface 3
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 0x03 (3 OUT) (ADAPTIVE)
    Rates: 96000, 88200, 48000, 44100, 32000
    Bits: 16
    Channel map: FL FR
  Interface 3
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x03 (3 OUT) (ADAPTIVE)
    Rates: 96000, 88200, 48000, 44100, 32000
    Bits: 24
    Channel map: FL FR

If in squeezelite i put these parameters:

ARGS='-o hw:1,0 -a 160:4:24_3:1 -b 32768:49152 -c pcm,flac,aac,mp3 -r 44100,48000,88200,96000:100 -C 5 -n DietPi'

I can play flac 48000 or 96000 but no 44100 or 88200. With 44100 or 88200, i can hear music but it is very chopped. Same thing if i put 160:4::1

If in squeezelite i put these parameters

ARGS='-o hw:1,0 -a 160:4:16:1 -b 32768:49152 -c pcm,flac,aac,mp3 -r 44100,48000,88200,96000:100 -C 5 -n DietPi'

Every rates are playing but audio is downwsample to 16 bits by squeezelite and it is not what i want

dmesg show me this when the problem occurs:

sept. 16 14:23:17 DietPi kernel: ------------[ cut here ]------------
sept. 16 14:23:17 DietPi kernel: WARNING: CPU: 0 PID: 0 at drivers/usb/dwc2/hcd.c:2682 dwc2_assign_and_init_hc+0x804/0x994
sept. 16 14:23:17 DietPi kernel: Modules linked in: snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi mc snd_pcm snd_timer snd soundcore cbc aes_arm_bs crypto_simd cryptd aes_arm aes_generic libaes ccm evdev meson_ir rc_core thermal_generic_adc meson_saradc mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 mac80211 cfg80211 rfkill libarc4 ip_tables x_tables
sept. 16 14:23:17 DietPi kernel: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.15.93-meson #23.02.2
sept. 16 14:23:17 DietPi kernel: Hardware name: Amlogic Meson platform
sept. 16 14:23:17 DietPi kernel: [<c0310bb8>] (unwind_backtrace) from [<c030b604>] (show_stack+0x10/0x14)
sept. 16 14:23:17 DietPi kernel: [<c030b604>] (show_stack) from [<c11972fc>] (dump_stack_lvl+0x40/0x4c)
sept. 16 14:23:17 DietPi kernel: [<c11972fc>] (dump_stack_lvl) from [<c0327980>] (__warn+0x88/0xe4)
sept. 16 14:23:17 DietPi kernel: [<c0327980>] (__warn) from [<c118c388>] (warn_slowpath_fmt+0x64/0xbc)
sept. 16 14:23:17 DietPi kernel: [<c118c388>] (warn_slowpath_fmt) from [<c0e590b4>] (dwc2_assign_and_init_hc+0x804/0x994)
sept. 16 14:23:17 DietPi kernel: [<c0e590b4>] (dwc2_assign_and_init_hc) from [<c0e5a808>] (dwc2_hcd_select_transactions+0xac/0x1a4)
sept. 16 14:23:17 DietPi kernel: [<c0e5a808>] (dwc2_hcd_select_transactions) from [<c0e6184c>] (dwc2_handle_hcd_intr+0x238/0x74c)
sept. 16 14:23:17 DietPi kernel: [<c0e6184c>] (dwc2_handle_hcd_intr) from [<c0e3cda8>] (usb_hcd_irq+0x24/0x38)
sept. 16 14:23:17 DietPi kernel: [<c0e3cda8>] (usb_hcd_irq) from [<c038e89c>] (__handle_irq_event_percpu+0x70/0x1e4)
sept. 16 14:23:17 DietPi kernel: [<c038e89c>] (__handle_irq_event_percpu) from [<c038ea40>] (handle_irq_event_percpu+0x30/0x78)
sept. 16 14:23:17 DietPi kernel: [<c038ea40>] (handle_irq_event_percpu) from [<c038eacc>] (handle_irq_event+0x44/0x68)
sept. 16 14:23:17 DietPi kernel: [<c038eacc>] (handle_irq_event) from [<c0393378>] (handle_fasteoi_irq+0xb4/0x16c)
sept. 16 14:23:17 DietPi kernel: [<c0393378>] (handle_fasteoi_irq) from [<c038e1e4>] (handle_domain_irq+0x5c/0x78)
sept. 16 14:23:17 DietPi kernel: [<c038e1e4>] (handle_domain_irq) from [<c0c64bf0>] (gic_handle_irq+0x7c/0x90)
sept. 16 14:23:17 DietPi kernel: [<c0c64bf0>] (gic_handle_irq) from [<c0300b7c>] (__irq_svc+0x5c/0x78)
sept. 16 14:23:17 DietPi kernel: Exception stack(0xc1701f08 to 0xc1701f50)
sept. 16 14:23:17 DietPi kernel: 1f00:                   01280bc4 00000000 00000001 c0319920 c188ad00 c1715e50
sept. 16 14:23:17 DietPi kernel: 1f20: c1715ea4 00000001 00000000 c16859a8 c1889691 00000000 00000000 c1701f58
sept. 16 14:23:17 DietPi kernel: 1f40: c0307ff0 c0307ff4 60000013 ffffffff
sept. 16 14:23:17 DietPi kernel: [<c0300b7c>] (__irq_svc) from [<c0307ff4>] (arch_cpu_idle+0x38/0x3c)
sept. 16 14:23:17 DietPi kernel: [<c0307ff4>] (arch_cpu_idle) from [<c11a46c8>] (default_idle_call+0x44/0xcc)
sept. 16 14:23:17 DietPi kernel: [<c11a46c8>] (default_idle_call) from [<c0360da4>] (do_idle+0x214/0x27c)
sept. 16 14:23:17 DietPi kernel: [<c0360da4>] (do_idle) from [<c0361130>] (cpu_startup_entry+0x18/0x20)
sept. 16 14:23:17 DietPi kernel: [<c0361130>] (cpu_startup_entry) from [<c160117c>] (start_kernel+0x67c/0x6cc)
sept. 16 14:23:17 DietPi kernel: ---[ end trace 2ccb86544802577f ]---

when i plug the dac i can see also :

[  295.595496] usb 1-1.1: new high-speed USB device number 4 using dwc2
[  295.845202] mc: Linux media interface: v0.10
[  296.870362] usb 1-1.1: 1:3 : unsupported format bits 0x100000000
[  297.483057] usbcore: registered new interface driver snd-usb-audio
[  514.689605] usb 1-1.1: USB disconnect, device number 4
[  537.515499] usb 1-1.1: new full-speed USB device number 5 using dwc2
[  537.648303] usb 1-1.1: config 1 has an invalid interface number: 3 but max is 2
[  537.648322] usb 1-1.1: config 1 has an invalid interface number: 3 but max is 2
[  537.648334] usb 1-1.1: config 1 has an invalid interface number: 3 but max is 2
[  537.648344] usb 1-1.1: config 1 has an invalid interface number: 3 but max is 2
[  537.648355] usb 1-1.1: config 1 has no interface number 2
[  537.654055] input: SAVITECH Bravo-X USB Audio as /devices/platform/soc/c90c0000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:262A:9023.0001/input/input1
[  537.715916] hid-generic 0003:262A:9023.0001: input: USB HID v1.00 Device [SAVITECH Bravo-X USB Audio] on usb-c90c0000.usb-1.1/input0

With a raspberry pi3B+ on picoreplayer, everything is ok with the same dac. The only difference (except kernel) i found is the driver for the usb hub : dwc2 for odroid vs dwc_otg for rpi

Can you help me to solve this please ?

Thanks
Thomas

Is it possible to change the driver of the usb hub (dwc2) to see if it is the problem ?

Will it be better on the micro usb port (i don’t have an adapteur yet, but i will by one) ?