Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2308260pxb; Fri, 5 Feb 2021 14:35:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJykvppZm0oWz344r0cy3mP7SfwF8ElskfMTKcHnr3zQvNivVdm8Rk5a4f5ugGLsS+UBIwBw X-Received: by 2002:a17:906:7f06:: with SMTP id d6mr5894315ejr.169.1612564551562; Fri, 05 Feb 2021 14:35:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612564551; cv=none; d=google.com; s=arc-20160816; b=LKFovkE6nKB8E4n9e2RUqBgnIWVc2bZzYm0zB1D5Ka3MnRilvkMXDKcL4Q+pfiWKwM 8JnlzLxj6s2HNVgDdd5p7/3lFvL/zwUcQuDA6Tl+oQR35o+ZhRDVodTskK+C/lGtoK9f 21HOvmfCVpdDDRQlakqBSQKmKcrvgOypkezFkhQwX9htL3HmD/VE3FNeb3PrgPnNhWOc wtQClG+idRRz+GIX8ZJ+ycJ751SvrgwD3mcDTo0QyWtSLhOr5ferkj1GHKstqvm8QycK qXcouNIqevjFgAPgfAv1ZdzioTifXy8KgN0ED4zEKBYglZ9BKTCn7W1LXRt8Ui+ucjMZ 6u7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=7xx8pWkh3n+iBuXpmAVObC559q53Rc9MHbJQRudHTKg=; b=BoNPZEdUiM0kW1DVAEnp/N4IFW4BVkkRVgGLMFpW8V+pxOBgDmgt+zDQFh+xvUoJDZ U+r4myFIRFTnSfRI5aPp9GhNozZ25gHIjpBuc1TBthpEJFIWKw8dyzHhE5jV8Y1vrLo8 P4AIYEs149UlYhJPxS+zL89SVX5J/w1GaGc4OZtmcqN0+ly8VKMa0VyndmhQ+FrKxbme uQhFk086WBrEPzmWw6VxFlneGGFRcGPT7+aSN1BF4C2nrVTWwC7JOxNmOCuJAiROn2JX AeEEifXd210xzEEz6MfTAqTIMV2ntfZotrtwtRu3jxO1OY1yrk1TG2mCujrEcfJFtep3 /wfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l7vkxPNq; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s22si6100832ejd.59.2021.02.05.14.35.09; Fri, 05 Feb 2021 14:35:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l7vkxPNq; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232496AbhBEWcG (ORCPT + 99 others); Fri, 5 Feb 2021 17:32:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbhBEOOq (ORCPT ); Fri, 5 Feb 2021 09:14:46 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 805FDC061A86 for ; Fri, 5 Feb 2021 07:52:27 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id d13so3781683plg.0 for ; Fri, 05 Feb 2021 07:52:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=7xx8pWkh3n+iBuXpmAVObC559q53Rc9MHbJQRudHTKg=; b=l7vkxPNqqCooCkc9U1eVJ6xEP90+iPReCEdUI9A4vpVs8AZpV3G/C9CZ2lbM2vmN5e nLjgJ+CFsZAW3fPlguz8qv9iSnNWeOTKzLyYmxK6WrGpBM/O++ahoA+I6d2HF7UXB+rY heO1aLzAIMtKIdMksopP5veqx2zgVfxQT4DcMGQi+cVMHUu4Z9g6ZvszCQjqdsUL76UT LoVOb782UX1AdA6iL4zMwVUzdfqdFp/ARlQOXtTAW9fErSBrJibAtBAlE5QYd3BGBjp0 KpHCcUrxoW0HVdWr77D/ylRqjVKq/HP/gQomZVarYDfgpjkyEINE68Cj4wMlYFZESDrX ruXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=7xx8pWkh3n+iBuXpmAVObC559q53Rc9MHbJQRudHTKg=; b=EhEqz+sqQ3TaJbmlLs/+lVkg4GI4RQTJVB6WexT8iC6d7RDD4cJpJTYee9kQsYBd/y JLR0PYdyEQOnt96IXZ15MqNu+blBAfPG4uZHqxCLBA3LYxspsM/5uIoZaA05LablCObo ggqBYOjHPKGrM1iBuXJwoEPo+TlTCGRMXcfc88j4kn/Tv86WPOgWOHQERFsbNk5rp4b0 Ts/yCt2q/G4OlIRrnaKQxbjVN2W0fIDTGx6G9LuNmLbLuflqjOpsgC0ThFK7dX/AmYjb 1/a1qHC/Td1Mde75JL3jjqRD0W6s2IADm2sIT5/2BNUC6jW8MS+yHGsy6XP2M52QkF5N /RGA== X-Gm-Message-State: AOAM531CgDZ6TU+r5hxUrN+2U+/sKrF/Xsv4Sq3DMzn8QtaYr6w2iqEK QHKSsn7SdmNwFLXSU/2w98htL0hlA8k= X-Received: by 2002:a17:90b:17c8:: with SMTP id me8mr4982655pjb.197.1612540346777; Fri, 05 Feb 2021 07:52:26 -0800 (PST) Received: from localhost ([122.172.229.231]) by smtp.gmail.com with ESMTPSA id u31sm12056408pgl.9.2021.02.05.07.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 07:52:26 -0800 (PST) Date: Fri, 5 Feb 2021 21:22:23 +0530 From: Sanchayan To: linux-bluetooth@vger.kernel.org Cc: "Igor V. Kovalenko" Subject: Query on the patch series "define HCI packet size of USB Alts" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hello, We currently have an opened merge request on adding mSBC support to PulseAudio. https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/254 There currently seems to be an issue in getting the correct MTU. In the test setup it works with the ofono backend, except for the assumed MTU. For getting it to work, we had to use a MTU of 24. 48 does not work and renders silence. getsockopt(card->fd, SOL_SCO, SCO_OPTIONS ... returns 64 which is too large. The missing bits on the kernel side seems to be the below patch. https://lore.kernel.org/patchwork/patch/1303411/ Second patch in the above series seem to have been applied but not the first. The first patch in the series above, when applied seems to fix getsockopt returning 24 bytes for the MTU. An additional correction on top of that below diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index fd0dcfa9a390..35f9c0743014 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -1669,6 +1669,8 @@ static int btusb_switch_alt_setting(struct hci_dev *hdev, int new_alts) err = __set_isoc_interface(hdev, new_alts); if (err < 0) return err; + + hdev->sco_mtu = hci_packet_size_usb_alt[new_alts]; } if (!test_and_set_bit(BTUSB_ISOC_RUNNING, &data->flags)) { seems to make it work for all bluetooth usb devices. Has there been any further development or way to push this forward? - Sanchayan.