Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp154010rdb; Thu, 5 Oct 2023 21:49:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2qg70W5V8tTv04zlSocRGgfTZ75LGQYxspRrqvs+/MvXWSpSKgu1JuAazoG3FOslXuVbe X-Received: by 2002:a05:620a:2547:b0:76f:39:4180 with SMTP id s7-20020a05620a254700b0076f00394180mr8292428qko.15.1696567758797; Thu, 05 Oct 2023 21:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696567758; cv=none; d=google.com; s=arc-20160816; b=XzW6ROmCBt4bvLCyuwr+QPUfqAPsV4ivHtQO06c+B6Gj4NmRY+KigTpZlTkI6pQuXi UiAwXFEObhiUDWERdfNpZjALEMdNJK4ZAHExZElHvQ+820uch3g9t9ZjNqUvvn84X65x QSN1r41cz1Za9uSNMFFV2q2dgbF5MjyydlNBFOQ9bgWlqArR2VuNQqe5smxP8ZhC5+Uy LNnJf1T2yQdxjXqotLhGUD/OeWIRg0LXCjxmJ9VneP6z9VmQqQgdwi91fgC/3CrAUY6a tkZ6QQufuy33a+LwUq/FNFb80nGCIdBIAxA9gEeFWr385fZsTj/dpSZJIVg43TmEJmHh J0Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=JxejygH5qmziLoyCgFqVOSem9ij83WNjHKlHtGyea/0=; fh=7JwUAsLCPmkDcJZcw6NwAcjpnymSDIla3G4muZoXxGQ=; b=jdYLHuFUN2cSIW7LKHU56iL7h+EHgTuu2TlYxqQ5dPlJb+0JQUftg0UNlZHBMxsea6 tPEs18QVSQHhBdJSqkzSQcihQ/i0EpraSRQ7/c2JKoQiiLFMzGUzicqmQJPEM4WNIdzh wnBEev9WpS9UoOHiIsCxzeDsTb3FBTG8/Z+bl577SOpMo8cjhUo4lfA73PKwvoW1AVM1 fYsGoEX1Pyjcd/wFY0LgTFl0+e9F61FMB/3h/NpIn3WJ25WbH4aQQqkvegV1R67vHiJU r/AjU6Iz+sMXIxhxgRbuu7u/XByAB3yq6QqekttAcrAJMTBLPI9skm48w3DurDn6ZVyB HHAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WCuTswS0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id d17-20020a056a00245100b00696b367da55si707702pfj.396.2023.10.05.21.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 21:49:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WCuTswS0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4B5E783A1590; Thu, 5 Oct 2023 21:49:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbjJFEtB (ORCPT + 99 others); Fri, 6 Oct 2023 00:49:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbjJFEs7 (ORCPT ); Fri, 6 Oct 2023 00:48:59 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DB51E4 for ; Thu, 5 Oct 2023 21:48:58 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5a4c68a71b2so27266417b3.2 for ; Thu, 05 Oct 2023 21:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696567737; x=1697172537; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=JxejygH5qmziLoyCgFqVOSem9ij83WNjHKlHtGyea/0=; b=WCuTswS0hfWm2KQuLF6pNQFSUG5pmT9yA6Qvy741rKtY7NSunuLTnYzDiECtzbvrn5 eJmTXU4zXHzQFC4s0sLLI0GpIbiAtMj7HEVbcVcooc9Do8+A5R2DVpi4S6+fBcOQI2Zr oOjzo60uC6UdLDGnrCSDW8P/L/pgFS/A8PbI/19sZuQE7a4nxTJQaX9bVT+PFHWMRXRM obwPirPtRfXdsuO4D6zoxPJCTUeqf7rssoZl57EBN+mtIsX6z2J0aZJhWp2L1QW+MAbH x7yGBySNgcBZEyRak1THHC44GqG3pPJ9od8QcOQ0FYZVeBWPfYZ8jNCarvCF2SAJLH02 5R3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696567737; x=1697172537; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JxejygH5qmziLoyCgFqVOSem9ij83WNjHKlHtGyea/0=; b=iLlTca+l7z+IfbirHdtGsN9AIHl6B5ipoZnOoHULZkRo3fPadfEOxBSjoS4Qc3OqWK U7o9Q2xJHCTh//1V4USNvnYSnOUm6KdU1MSLuJLmLNwzH8/V2lifAYGBfvL7I3F4m0Pl k3MP1gzj0jDiKmDZ2OCzlgEbFmjnjwBS1yhcARd+7/2h7sGwy4KlRbr/b/jejrdPqfuk Jbo0FI2vCSSBhgf73DNdaWiJf0vWQSsEVCmlnMZvOdf5N+v5Bg9rhCuUZYqTNlVVPdlv zpLSLucdiSC4xHJg2dtV5l/OfirMBzmToVf8arIae4iYm+hkrWg0rXBPc/JzntapRYgQ u7ZA== X-Gm-Message-State: AOJu0YyuEHEl01ZWG/wtJAfbaL9IHODw6GDkZnry1csylKQEHhZhYHYQ vPQip1bStyHzmjnMg8OSnNzKO8IbNpzCaZ1FPAZRhw4Rj1Sk6uvRvMXjE4UImrt7LMwtbrLy/Uj XO/+Ohp+Fx52EJ3+aTw7x0MKC7salnIdL/oNMV5b7OF6IQnk48Pzjbj5iwzbTBWg8/VgWecZid9 J0IF0= X-Received: from whalechang-p620.tpe.corp.google.com ([2401:fa00:1:17:2858:46bd:751:759d]) (user=whalechang job=sendgmr) by 2002:a81:aa4d:0:b0:59f:3cde:b33a with SMTP id z13-20020a81aa4d000000b0059f3cdeb33amr126492ywk.6.1696567737168; Thu, 05 Oct 2023 21:48:57 -0700 (PDT) Date: Fri, 6 Oct 2023 12:48:49 +0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog Message-ID: <20231006044852.4181022-1-whalechang@google.com> Subject: [PATCH] ALSA: usb-audio: Fix microphone sound on Opencomm2 Headset From: Whale Chang To: LKML Cc: WhaleChang , Ai Chao , Jaroslav Kysela , John Keeping , Jussi Laako , Takashi Iwai , alsa-devel@alsa-project.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 05 Oct 2023 21:49:16 -0700 (PDT) From: WhaleChang When a Opencomm2 Headset is connected to a Bluetooth USB dongle, the audio playback functions properly, but the microphone does not work. In the dmesg logs, there are messages indicating that the init_pitch function fails when the capture process begins. The microphone only functions when the ep pitch control is not set. Toggling the pitch control off bypasses the init_piatch function and allows the microphone to work. Signed-off-by: WhaleChang --- sound/usb/quirks.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 598659d761cc..d4bbef70d2f7 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1994,7 +1994,11 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip, /* mic works only when ep packet size is set to wMaxPacketSize */ fp->attributes |= UAC_EP_CS_ATTR_FILL_MAX; break; - + case USB_ID(0x3511, 0x2b1e): /* Opencomm2 UC USB Bluetooth dongle */ + /* mic works only when ep pitch control is not set */ + if (stream == SNDRV_PCM_STREAM_CAPTURE) + fp->attributes &= ~UAC_EP_CS_ATTR_PITCH_CONTROL; + break; } } -- 2.42.0.609.gbb76f46606-goog