mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #787] Alsa 'snd_pcm_hw_params' error with USB DAC #410
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#410
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wpresident on GitHub (Jun 4, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/787
Originally assigned to: @roderickvd on GitHub.
Hi. I'am trying to use librespot with raspberry pi zero w (Raspberry Pi OS Lite + raspotify) and usb dac.
As i understand my DAC can do 32bit, not 16bit. So i use --format S32. But have errors after song start.
Using latest build.
What i'am doing wrong?
@roderickvd commented on GitHub (Jun 4, 2021):
You are running
aplayandlibrespotwith two different devices. Please use the same ones and report back.plughwshould really take any format and reformat to whatever your hardware device supports so I suspect an issue with your Alsa configuration.@wpresident commented on GitHub (Jun 4, 2021):
I have only one sound card (DAC) connected to USB.
I'am weak with launch line. Shouldn't I use
--device plughw:1,0?@roderickvd commented on GitHub (Jun 4, 2021):
The device you want is probably
hw:0, this is the most "bare metal". You may also tryplughw:0(with all software conversions) or justhw:CARD=S10th,DEV=0for the full name of your device.In any case I am closing this as I am 99% sure that this is not an issue with
librespot.@JasonLG1979 commented on GitHub (Jun 4, 2021):
There's really no way to know that.
hw:CARD=S10th,DEV=0could very well be the same device asplughw:1,0(just going thoughplugofc) You can address cards by name or index.hw:0is just the 1st card thatalsaruns into. Generallyhw:0is the built-in sound card if the device has it and it's not otherwise disabled. Indexes are assigned on a 1st come 1st served basis. If your system has a built-in sound and a USB DAC the DAC will behw:1most of the time. (hisaplay -llists his DAC ashw:1) That's why referring to them by name is always best when in doubt.But I agree otherwise. Either use
--device hw:1,0or--device hw:CARD=S10th,DEV=0@JasonLG1979 commented on GitHub (Jun 4, 2021):
I can confirm though that
plughw:x,xworks just fine as a--devicevalue. Come to think of it, it looks like you may be trying to open a device that's already open judging by the'EIO: I/O error'part of the error. Only one program can open a sound device at a time.@wpresident commented on GitHub (Jun 9, 2021):
Problem solved. All of this because of usb power-board that was attached to second-hand rpi i bought (https://www.elecrow.com/usb-hub-powermanager-for-rpi-zero-v1-0.html)
Disconnected it and used simple pc usb hub via micro usb port on rpi zero w. Works like a charm.