On Wed, 2023-05-31 at 14:51 +0200, Joakim Tjernlund wrote:
P710e, will throw an "cannot set freq 48000 to ep 0x3" error, no matter adding mdelays around setting sample rate.
Please ignore this patch, the "cannot set freq 48000 to ep 0x3" only happens when kernel(6.1.31) initially probes the device:
[ 555.200166] usb 3-1: USB disconnect, device number 14 [ 560.906553] usb 3-1: new full-speed USB device number 15 using xhci_hcd [ 561.104340] usb 3-1: 2:1: cannot set freq 48000 to ep 0x3 [ 566.342420] usb 3-1: 2:1: cannot get freq at ep 0x3 [ 566.497056] input: Logitech Speakerphone P710e Consumer Control as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.3/0003:046D:0A4E.0008/input/input29 [ 566.548828] input: Logitech Speakerphone P710e as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.3/0003:046D:0A4E.0008/input/input30 [ 566.549086] hid-generic 0003:046D:0A4E.0008: input,hiddev97,hidraw5: USB HID v1.11 Device [Logitech Speakerphone P710e] on usb-0000:00:14.0-1/input3
I have a Jabra SPEAK 510 which behaves the same. Once attached setting sample rate works.
Seems like the devices are not ready to handle sample rate this early when device is beeing attached. Does the kernel need to manage sample rate before device is fully attached?
Jocke
Only way to avoid it I can find is to avoid setting it at all.
Signed-off-by: Joakim Tjernlund joakim.tjernlund@infinera.com Cc: stable@vger.kernel.org
I also tried QUIRK_FLAG_FIXED_RATE quirk but that didnt have any effect. sound/usb/quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 3ecd1ba7fd4b..8277bfd3deec 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1952,7 +1952,8 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip, { switch (chip->usb_id) { case USB_ID(0x0a92, 0x0053): /* AudioTrak Optoplay */
/* Optoplay sets the sample rate attribute although
- case USB_ID(0x046d, 0x0a4e): /* Logitech P710e */
/* Optoplay/P710e sets the sample rate attribute although
*/ fp->attributes &= ~UAC_EP_CS_ATTR_SAMPLE_RATE;
- it seems not supporting it in fact.