Open pgcudahy opened 1 year ago
Hi, I think to expose a USB device to a docker container you need to add as volume the actual usb drive handle. One way to easily check whether it would work is with the privileged: true
option in your docker compose. privileged
gives root access to the container of all of your host's devices. The proper way to do it is to mount the specific usb devices to the container. You can do that by mounting it as a volume similar to something like this: - /dev/ttyUSB0:/dev/ttyUSB0
. However, you need to find out the exact handle for your soundcard. You can do that with lsusb
.
lsusb
gives me
Bus 002 Device 003: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
But there are not ttyUSB
devices
I tried adding
devices:
- /dev/snd:/dev/snd
- /dev/bus/usb:/dev/bus/usb
privileged: true
to the dockercompose.yml but get the same error
you can mount the complete /dev to your container, e.g. - /dev:/dev
or check which is the /dev
handle for your usb soundcard using dmesg
Thanks very much for helping me with this. But even with
devices:
- /dev:/dev
privileged: true
I still get the same error
I'm not sure then. You could try to start the container with a bash shell and see if you can see the soundcard and try to get it to work. Alternatively, try to get spotifyd without a container, since it should be a bit easier.
Yeah, odd. I tried with the container dubodubonduponey/librespot
and got it to work straight off. Thanks again for trying to debug with me.
Hello, I've got an ubuntu setup with working audio but trying to get a spotifyd.conf that works with this container. Currently I have a USB soundcard that is labeled as "default" by
aplay -L
andaplay -D default /usr/share/sounds/alsa/Front_Center.wav
works. My spotifyd.conf isAnd my docker-compose.yml is
But it doesn't work and the logs are
What am I getting wrong?