diff mbox series

sound: usb: quirks: add quirk for Samsung USBC Headset (AKG)

Message ID 1592910203-24035-1-git-send-email-macpaul.lin@mediatek.com (mailing list archive)
State New, archived
Headers show
Series sound: usb: quirks: add quirk for Samsung USBC Headset (AKG) | expand

Commit Message

Macpaul Lin June 23, 2020, 11:03 a.m. UTC
We've found Samsung USBC Headset (AKG) (VID: 0x04e8, PID: 0xa051)
need a tiny delay after each class compliant request.
Otherwise the device might not be able to be recognized each times.

Signed-off-by: Chihhao Chen <chihhao.chen@mediatek.com>
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Cc: stable@vger.kernel.org
---
 sound/usb/quirks.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Takashi Iwai June 23, 2020, 2:14 p.m. UTC | #1
On Tue, 23 Jun 2020 13:03:23 +0200,
Macpaul Lin wrote:
> 
> We've found Samsung USBC Headset (AKG) (VID: 0x04e8, PID: 0xa051)
> need a tiny delay after each class compliant request.
> Otherwise the device might not be able to be recognized each times.
> 
> Signed-off-by: Chihhao Chen <chihhao.chen@mediatek.com>
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> Cc: stable@vger.kernel.org

Thanks, applied.


Takashi
diff mbox series

Patch

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index bca0179..ebba29a 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1673,6 +1673,14 @@  void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
 	     chip->usb_id == USB_ID(0x0951, 0x16ad)) &&
 	    (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
 		usleep_range(1000, 2000);
+
+	/*
+	 * Samsung USBC Headset (AKG) need a tiny delay after each
+	 * class compliant request. (Model number: AAM625R or AAM627R)
+	 */
+	if (chip->usb_id == USB_ID(0x04e8, 0xa051) &&
+	    (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
+		usleep_range(5000, 6000);
 }
 
 /*