From patchwork Mon Jul 22 08:48:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangdicheng X-Patchwork-Id: 813791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3BB99C3DA5D for ; Mon, 22 Jul 2024 13:03:28 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8945A162A; Mon, 22 Jul 2024 15:03:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8945A162A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1721653406; bh=eKAoRhRBHdoGTQMFIzXbD4i+756bnaT0Wb8pX4ENf/Y=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=irHr5YoES6cQ9QlgyUeD+yu9QxT1+OagoegjJuTrW8F3snz0pZNF03UN4EO03l5VJ ROfb/pdheLZg7ZV4Dzlcc24xg65OSlBEdg/biI/1ydUeLetEBO1nkmZ9C1/aa0kJ/k fs2Bq1arts+1vYWIpILEYjXfo9SvQZ1m85Q/CtxY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4438DF80715; Mon, 22 Jul 2024 15:00:59 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 00E93F8070B; Mon, 22 Jul 2024 15:00:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9F1AEF801F5; Mon, 22 Jul 2024 10:48:38 +0200 (CEST) Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.220]) by alsa1.perex.cz (Postfix) with ESMTP id 06193F8013D for ; Mon, 22 Jul 2024 10:48:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 06193F8013D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Y+F7Wt7f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=9xWlT Jv12XCC0n8wbvF4dnppY+xU0yYtgqnHm9eH5Ls=; b=Y+F7Wt7fEDZK793cd7X4+ hhrJ2wKTDoHkyw42PmAToO1/gVHN7x9VICvMWJEhFIoHlSqym3BW8JaLVY9joKfN cGjFzH742iUV802CDNL7efIrHbnveOniUYinav5o3dyh98AZwBAUWty4k/wSsa6E FhpLIqcdFNakSX0jJ+LI7k= Received: from localhost.localdomain (unknown [111.48.69.245]) by gzga-smtp-mta-g0-1 (Coremail) with SMTP id _____wD3fx_YHJ5mPX+sDw--.22519S2; Mon, 22 Jul 2024 16:48:25 +0800 (CST) From: wangdicheng To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, wangdicheng Subject: [PATCH v3] ALSA: usb-audio: Add a quirk for Sonix HD USB Camera Date: Mon, 22 Jul 2024 16:48:22 +0800 Message-Id: <20240722084822.31620-1-wangdich9700@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: _____wD3fx_YHJ5mPX+sDw--.22519S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7KrykJr1kAw4kXw4fXFyfXrb_yoW8Wr1kpr s7C3s5KwnYgr1jqr18tF4UX3W8Ww4Ik3y5Ja4aqwnxAr1Yqa1rJF97A3yfK3yUtrs8Gaya qwn0v3s8Ka93GaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jYKZXUUUUU= X-Originating-IP: [111.48.69.245] X-CM-SenderInfo: pzdqwv5lfkmliqq6il2tof0z/1tbioxskT2VOEie29QAAsO X-MailFrom: wangdich9700@163.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: XMS2MHIKSSI4WSGKV7HHGWUSGL6UF2TH X-Message-ID-Hash: XMS2MHIKSSI4WSGKV7HHGWUSGL6UF2TH X-Mailman-Approved-At: Mon, 22 Jul 2024 13:00:44 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: wangdicheng Sonix HD USB Camera does not support reading the sample rate which leads to many lines of "cannot get freq at ep 0x84". This patch adds the USB ID to quirks.c and avoids those error messages. (snip) [1.789698] usb 3-3: new high-speed USB device number 2 using xhci_hcd [1.984121] usb 3-3: New USB device found, idVendor=0c45, idProduct=6340, bcdDevice= 0.00 [1.984124] usb 3-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0 [1.984127] usb 3-3: Product: USB 2.0 Camera [1.984128] usb 3-3: Manufacturer: Sonix Technology Co., Ltd. [5.440957] usb 3-3: 3:1: cannot get freq at ep 0x84 [12.130679] usb 3-3: 3:1: cannot get freq at ep 0x84 [12.175065] usb 3-3: 3:1: cannot get freq at ep 0x84 Signed-off-by: wangdicheng --- v2 -> v3: Update the insertion order of ID 0c45 v1 -> v2: Arrange the ID in order --- sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 58156fbca02c..b42654033c33 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -2125,6 +2125,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_CTL_MSG_DELAY_1M), DEVICE_FLG(0x0b0e, 0x0349, /* Jabra 550a */ QUIRK_FLAG_CTL_MSG_DELAY_1M), + DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */ + QUIRK_FLAG_GET_SAMPLE_RATE), DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */ QUIRK_FLAG_FIXED_RATE), DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */