Problem with USB DAC

Hello;

Required Information

DietPi version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=5
G_DIETPI_VERSION_RC=1
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’

-Distro version
bullseye 0

Kernel version
Linux DietPi4 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

SBC model
RPi 4 Model B (aarch64)

  • Power supply used: 5V 3A
  • SD card used: SanDisk Ultra 32

Additional Information:

  • Can this issue be replicated on a fresh installation of DietPi?
    YES

Steps to reproduce

  1. Nothing specciall - simply does not work

Expected behaviour

  • I hope will work with SU-G700M2 :slight_smile:

Actual behaviour

  • This setup was working flawlessly with older Technics SU-C700 amp (USB connection) but with newer Technics amp, model SU-G700M2 - no sound…
    No changes ware made - only other equipment was connected.
    I want to add that the “Volumio” installed on this kit works fine with this SU-G700M2 amp (also USB connection).

How to diagnose and resolve this issue?

Best regards; Franek

Does aplay -l show the USB DAC?

If so, you did use dietpi-config to select it as sound card?

If so, does speaker-test or speaker-test -c 2 give you noise?

Thank you for your answer.
No any noise and here are the test results:

aplay -l show the USB DAC
**** List of PLAYBACK Hardware Devices ****
card 1: Audio [Technics USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

speaker-test

speaker-test 1.2.4

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Sample format not available for playback: Invalid argument
Setting of hwparams failed: Invalid argument

speaker-test -c 2

speaker-test 1.2.4

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Sample format not available for playback: Invalid argument
Setting of hwparams failed: Invalid argument

The DAC seems to be a bit picky about supported auto formats. Please try to enable the audio auto-conversion plugin in dietpi-config.

I already did it, but unfortunately to no avail.
This DAC is very “capable”, when PC USB output controlled it play files up to DXD 352.8.

Auto-conversion is enabled but speaker-test still fails with this error message? That error message pretty clear indicates that no conversion is done. Can you show:

cat /etc/asound.conf

Also try a reboot and check alsamixer whether the master volume is too low or another possibly required switch not enabled.

Sorry for a little misunderstanding, “speaker-test -c 2” - there is noise but still no music by DLNA streaming; still no sound.

cat /etc/asound.conf
pcm.!default {
type plug
slave.pcm {
type hw
card 1
device 0
}
}

ctl.!default {
type hw
card 1
}
root@DietPi4:~#
root@DietPi4:~#
root@DietPi4:~#
root@DietPi4:~#
root@DietPi4:~#
root@DietPi4:~#
root@DietPi4:~# cat /etc/asound.conf
pcm.!default {
type plug
slave.pcm {
type hw
card 1
device 0
}
}

ctl.!default {
type hw
card 1
}

Ah okay, so far so good.

Which software do you use for DLNA? Probably the endpoint logs give a hint.

Neither Foobar2000 nor BubbleUPnP nor Audirvana works, so I don’t think the problem is with DLNA itself. Especially that all these programs work properly if I stream from them to HDMI output of this RPi 4. And they all work also when I stream to the same RPi 4 (USB output) - but connected to an older Technics amplifier.

I have the impression that DietPi does not understand something that the newer Technics amplifier is “saying” to him …

I will add that test version of Roon with RAAT protocol and DietPi Roon Bridge, streams correctly to this SU-G700M2, across USB output of this RPi 4 (but I do not want to use Roon because it is expensive and has many disadvantages, I prefer BubbleUPnP with DietPi). Not only that, after using Roon DLNA streaming also starts working properly for a moment. But after some time or the DietPi reset, the DLAA streaming unfortunately stops … MAGIC!

What does DietPi “dislike” about the SU-G700M2?

Well, since speaker-test produces output, the sound card generally works. I guess then playing an audio file via aplay (.wav) or mpg123 (.mp3) works as well. It is a software/config issue then.

Did you try GMediaRender as DLNA endpoint? Does the server or the client/endpoint produce any logs which give a hint about the issue?

1 Like

Thank you for advice - GmediaRenderer works fine.
Maybe the problem will be solved by further DietPi updates.
Regards.

As said, it doesn’t look like a driver or system issue that we could solve, but more like a software configuration issue that you’d need to dig into, checking the logs of the software you use. Sound and DLNA via GMediaRender works, so everything else should potentially work as well.

This seems logical and will look at it. But on the other hand, it is unlikely that all three programs I use (Audirvana, BubbleUPnP and Foobar2000) are misconfigured. Especially since these three programs properly streams to the Onboard HDMI output.
Or maybe the DietPi software module responsible for DLNA renderin to HDMI output is different from that for USB?

Ah, I didn’t know that. What audio device are the three software titles configured to use? Best is to not set any explicit audio device, so the default (pointing correctly to the USB DAC) is used.

I’m not aware of a “module” for DLNA, isn’t it just a server and a client, i.e. pure software feature which does not depend on kernel or system, aside of shared libraries and of course the ALSA audio device? Libraries are all regular Debian packages, the kernel is the official Raspberry Pi kernel, so there is no specific DietPi part involved in this, what I can think of :thinking:.

In all three programs DietPi (not DietPi USB or HDMI output) has been selected as DLNA renderer - DietPi appears on the network with the name I gave it during installation. Whereas, the USB or HDMI output is selected from the DietPI “Audio configuration” level and is default DietPi audio output.

To sum up - the DLNA functionality in DietPi is in no way related to the type of audio output and is the same for all audio outputs. So if I stream via DLNA to HDMI and hear the sound, it means that the DLNA layer is working and properly configured in my three programs and in DietPi.

So - if there is no sound on the USB output when I connect this particular DAC (if other DAC is connected to this USB, the sound is heard) something other than the DLNA layer in DietPi must work badly, something in DietPi is incompatible with this particular DAC - just what?