Could not start audio: Alsa error: PCM open failed when using USB audio device
Description
Sorry for raising so many issues, I just keep running into walls!
When setting my device and control in the config to hw:1,0 in line with the output of aplay -l, which is
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
I get the following log output:
./spotifyd --no-daemon
Loading config from "/home/pi/.config/spotifyd/spotifyd.conf"
No proxy specified
Using software volume controller.
Connecting to AP "gew1-accesspoint-b-pxcb.ap.spotify.com:443"
Authenticated as "myusernamehere" !
Using alsa sink
Country: "GB"
Loading <Deadhead> with Spotify URI <spotify:track:11fuAIjyGQcFcbeW9oikCC>
<Deadhead> loaded
Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'
Could not start audio: Alsa error: PCM open failed
Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'
Could not start audio: Alsa error: PCM open failed
Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'
Could not start audio: Alsa error: PCM open failed
Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'
I have deleted /etc/asound.conf and ~/.asoundrc as suggested in here, and set my usb device as the default in alsamixer
I attempted to paste the logs below but they were mahooooosive and wouldn't fit (and actually went past my shell max lines... (and seemed mostly to be noise)). Happy to pastebin them if you think there is more to be gained from them.
To Reproduce
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Try to put it on pulseaudio mode, at least it worked for me.
Try to put it on pulseaudio mode, at least it worked for me.
can you explain a little bit better what you did? kinda noob here :) thanks!
The problem was solved for me by simply removing the line that specifies mixer. Maybe it's defaulting to some other value, like device?