mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
To: "perex@perex.cz" <perex@perex.cz>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tiwai@suse.com" <tiwai@suse.com>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] ALSA: usb-audio: Logitech P710e: Add quirk to fix setting sample rate.
Date: Thu, 1 Jun 2023 11:01:39 +0000	[thread overview]
Message-ID: <4c0d3476f554530e61a7c41580997e021056cce9.camel@infinera.com> (raw)
In-Reply-To: <bef94a3bbcb933e0c9128b602a973b7996ba337e.camel@infinera.com>

On Thu, 2023-06-01 at 12:39 +0200, Joakim Tjernlund wrote:
> 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?

This swap appears to make the initial error go away:
diff -u stream.c.org stream.c
--- stream.c.org	2023-06-01 12:54:41.229145989 +0200
+++ stream.c	2023-06-01 12:57:46.427514638 +0200
@@ -1226,8 +1226,8 @@
 		/* try to set the interface... */
 		usb_set_interface(chip->dev, iface_no, 0);
 		snd_usb_init_pitch(chip, fp);
-		snd_usb_init_sample_rate(chip, fp, fp->rate_max);
 		usb_set_interface(chip->dev, iface_no, altno);
+		snd_usb_init_sample_rate(chip, fp, fp->rate_max);
 	}
 	return 0;
 }

But I don't really now what I am doing w.r.t USB/Audio 

 Jocke


      reply	other threads:[~2023-06-01 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 12:51 Joakim Tjernlund
2023-06-01 10:39 ` Joakim Tjernlund
2023-06-01 11:01   ` Joakim Tjernlund [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c0d3476f554530e61a7c41580997e021056cce9.camel@infinera.com \
    --to=joakim.tjernlund@infinera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®