mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #47] ALSA lib pcm.c:8382:(snd_pcm_set_params) Sample format not available for PLAYBACK: Invalid argument #36
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#36
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 @sashahilton00 on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/47
Saturday Mar 11, 2017 at 09:44 GMT
Originally opened as https://github.com/plietar/librespot/issues/162
Hi,
I built librespot with alsa backend on Archlinuxarm:
https://aur.archlinux.org/packages/librespot-alsa-git/
When I try to start librespot with the following command:
librespot --cache /var/cache/librespot --name Test --bitrate 320 --username xxxxxx --password xxxxxx
I get the following error:
Any help is highly appreciated.
Many thanks,
Michael
@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 10:19 GMT
Looks like your ALSA device does not support the sample format
S16_LE.@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 10:21 GMT
My device is:
ard 1, ID
DAC', nameS16 USB DAC'Device 0, ID
USB Audio', nameUSB Audio', 1 subdevices (1 available)2 channels, sampling rate 44100..384000 Hz
Sample formats: S32_LE
Subdevice 0, name `subdevice #0'
and indeed does not support S16_LE.
So I assume there's no solution to this?
Many thanks for your immediate reply.
@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 10:24 GMT
You can set the ALSA device with the
--deviceoption. Try--device=plughw:1.@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 10:28 GMT
Thank you very much, it works!
I am trying to find a more generic approach so that librespot uses the default alsa device. Is there any possibility to do this?
@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 10:35 GMT
librespot does use the default device. Your default device does not support S16_LE. If you do not want to set the device with
--deviceyou have to makeplughw:1your default ALSA device. You can set this in ALSA config file. Google will help you 😄@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 10:40 GMT
Many thanks for everything.
I have already created an asound.conf file with the following configuration:
pcm.!default {
type hw
card 1
}
As it seems I have to search more for this.
@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 10:43 GMT
Try this:
@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 11:11 GMT
Thank you very much for everything Joerg.
Everything is up and running buy adding the device option on the systemd.service file.
@sashahilton00 commented on GitHub (Jan 29, 2018):
Saturday Mar 11, 2017 at 11:15 GMT
You are welcome!
@sashahilton00 commented on GitHub (Jan 29, 2018):
Thursday Nov 16, 2017 at 20:45 GMT
am getting this too, but with a FiiO USB DAC adding
--device=plughw:1doesn't fix it. See my report on pimusicbox through which I am using librespot https://github.com/pimusicbox/pimusicbox/issues/453@ComlOnline commented on GitHub (Jan 29, 2018):
The last comment was a different issue. Closing as it was solved.