balena-sound icon indicating copy to clipboard operation
balena-sound copied to clipboard

USB DAC isn't recognized (SONY UDA-1)

Open buzuddha opened this issue 3 years ago • 5 comments

Hi all,

I'm working with a SONY UDA-1 connected via USB. I've tried power cycling the pi but I'm still getting audio through the stereo headphone jack.

Anything I can do to force USB audio?

Thanks!

HOST OS VERSION balenaOS 2.83.10+rev1 Raspberry Pi 4 (using 64bit OS)Raspberry Pi 4 (using 64bit OS) CURRENT RELEASE d2a9ae8 SUPERVISOR VERSION 12.9.3

buzuddha avatar Sep 19 '21 14:09 buzuddha

I don't have that DAC but I had this problem getting my Focusrite Scarlett 2i4 to work over USB.

This solution worked for me: https://github.com/balenalabs/balena-sound/issues/314#issuecomment-715248194 @cpwood

FWIW, I was able to workaround this temporarily by getting an SSH session in the audio service and issuing the following commands:

pactl list

to find the name of the sink for my USB DAC, and then using that name:

pactl set-default-sink alsa_output.usb-soundcard-1.analog-stereo

I actually was able to set Device Variable (in balena dashboard) AUDIO_OUTPUT = alsa_output.usb-soundcard-0.analog-surround-40 (the sink I found from pactl list).

I theorize that I had this problem (even on the latest balenaSound) because the Scarlett 2i4 has 4 outputs - thus making it 'surround' rather than 'stereo'. Maybe the Sony has multiple outputs too?

joegibes avatar Sep 27 '21 18:09 joegibes

Do I need to install pulseaudio?


root@balena:~# pactl list
bash: pactl: command not found

Slash how do you even install stuffz on the balena via cli? A goog of "balena package manager" doesn't turn up much useful.

Also, would would I just add "AUDIO_OUTPUT" or would I need "BALENA_HOST_CONFIG_AUDIO_OUTPUT"?

buzuddha avatar Sep 30 '21 00:09 buzuddha

You have to be in the audio container - you will find pactl there.

eiddor avatar Sep 30 '21 00:09 eiddor

Hmmm from the audio container pactl list | grep usb doesn't produce any result, even after rebooting the pi with the dac plugged in and turned on. pactl list gives: http://ix.io/3AyD

From the OS root lsusb gives

Bus 002 Device 001: ID 1d6b:0003  
Bus 001 Device 001: ID 1d6b:0002 

dmesg gives: http://ix.io/3AyB methinks this line might be relevant usb usb1-port1: unable to enumerate USB device usb-devices gives: http://ix.io/3AyC

Any thoughts?

buzuddha avatar Oct 02 '21 01:10 buzuddha

I actually was able to set Device Variable (in balena dashboard) AUDIO_OUTPUT = alsa_output.usb-soundcard-0.analog-surround-40 (the sink I found from pactl list).

Was going crazy, this worked for me as well with my own USB device after looking up the value with pactl. Thanks!

plisker avatar Feb 02 '24 01:02 plisker