ALSA error: snd_pcm_open failed: Protocol error

Hi!
I re-installed ALSA.

An error message often appears when I want to add music in the Audacious music player.

I use ALSA with Audacious.

As soon as I reconnect my USB sound card, everything works again until I want to add music to Audacious again.

Error message:

> ALSA error: snd_pcm_open failed: Protocol error

> ALSA error: snd_pcm_hw_params_set_format failed: Invalid argument.

My .asoundrc @ home folder:

> pcm.usb-audio {
>           type hw
>           card 0
>        }
>        
>        ctl.usb-audio {
>           type hw
>           card 0
>        }

I have already tried a few things, edited asound.conf, alsa.conf etc. but the error message does not disappear.

Could someone help me to try to get rid of this error message?

Check if Audacious is set up for pulse audio output, alsa or pipewire. It took me quite a while to figure this out after an update on audacious:

If I remember correctly it is now set to pipewire by default and you will have to set it back to pulse audio or alsa output. You might have to edit your script back to the original file. Mine plays fine on either pulse or alsa, but not on pipewire.

...is set to ALSA :wink:

my new ".asoundrc":

pcm.usb-audio {
	type dmix
	slave {
		pcm "hw:0,0"
		rate 48000
		channels 6
    	}
       
ctl.usb-audio {
	type plug
	slave.pcm "plug:dmix"
    	}
}

ALSA error: snd_pcm_open failed: Invalid argument.

:-/

did a new test - new config @ ".soundrc" @ home folder:

pcm.!default {
    type plug
    slave.pcm "dmixer"
}

ctl.equal {
    type equal;
}

pcm.plugequal {
    type equal
    slave.pcm "plug:dmixer" 
}

ctl.!default {
    type hw
    card 0
}

pcm.dmixer {
    type dmix
    ipc_key 5678293
    slave {
	    pcm {
	    type hw
	    card 0
	    device 0
	  }
    }
}

ctl.mixer0 {
    type hw
    card 0
}

syslog:

 [25858.246261] usb 10-2: 1:0: usb_set_interface failed (-71)
 [25858.246651] usb 10-2: uac_clock_source_is_valid(): cannot get clock validity for id 40
 [25858.246654] usb 10-2: clock source 40 is not valid, cannot use
 [25858.247010] usb 10-2: 1:1: cannot get freq (v2/v3): err -71
 [25858.247374] usb 10-2: 1:1: cannot set freq 48000 (v2/v3): err -71
 [25858.250156] usb 10-2: 1:0: usb_set_interface failed (-71)
 [25858.253543] usb 10-2: 1:0: usb_set_interface failed (-71)
 [25858.253927] usb 10-2: uac_clock_source_is_valid(): cannot get clock validity for id 40
 [25858.253931] usb 10-2: clock source 40 is not valid, cannot use
 [25858.254290] usb 10-2: 1:1: cannot get freq (v2/v3): err -71
 [25858.254654] usb 10-2: 1:1: cannot set freq 48000 (v2/v3): err -71
 [25858.257396] usb 10-2: 1:0: usb_set_interface failed (-71)
 [25858.260702] usb 10-2: 1:0: usb_set_interface failed (-71)
 [25858.261069] usb 10-2: uac_clock_source_is_valid(): cannot get clock validity for id 40
 [25858.261072] usb 10-2: clock source 40 is not valid, cannot use
 [25858.261447] usb 10-2: 1:1: cannot get freq (v2/v3): err -71
 [25858.261818] usb 10-2: 1:1: cannot set freq 48000 (v2/v3): err -71
 [25858.264578] usb 10-2: 1:0: usb_set_interface failed (-71)

When I reconnect my USB sound card:

[27365.049342] usb 10-2: new high-speed USB device number 15 using xhci_hcd
[27365.197758] usb 10-2: New USB device found, idVendor=17cc, idProduct=1011, bcdDevice= 0.32
[27365.197764] usb 10-2: New USB device strings: Mfr=12, Product=7, SerialNumber=13
[27365.197767] usb 10-2: Product: Traktor Audio 6
[27365.197769] usb 10-2: Manufacturer: Native Instruments
[27365.197770] usb 10-2: SerialNumber: 427A3B0A
mtp-probe: checking bus 10, device 15: "/sys/devices/pci0000:00/0000:00:06.0/0000:03:00.0/usb10/10-2"
mtp-probe: bus: 10, device: 15 was not an MTP device
systemd[2104]: Reached target Sound Card.
systemd[1]: Condition check resulted in Manage Sound Card State (restore and store) being skipped.
systemd[1]: Reached target Sound Card.
systemd[2647]: Reached target Sound Card.
mtp-probe: checking bus 10, device 15: "/sys/devices/pci0000:00/0000:00:06.0/0000:03:00.0/usb10/10-2"
meth mtp-probe: bus: 10, device: 15 was not an MTP device

:confused: Strange, no idea, I don't know what the problem could be.

I have done it, the error is now gone.

I deleted all *.conf files in the "

/usr/share/alsa/cards

folder and only kept "

aliases.conf

in the folder.

my asound.conf:

defaults.pcm.card 0
defaults.ctl.card 0

Audacious is playing my music great again without errors (with USB-Sound-Audio)

1 Like