Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4842607pxu; Tue, 22 Dec 2020 02:07:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYIpT5+Blmxf5UrPTOuijbUNhQcLn1H4aLNnZjrueqyAJ9K3Hl4Kx1kn0kDrVmsvCTzqUu X-Received: by 2002:a50:e80c:: with SMTP id e12mr19087471edn.288.1608631662457; Tue, 22 Dec 2020 02:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608631662; cv=none; d=google.com; s=arc-20160816; b=s6z8MYn4fwWRgi+CHBLOlxIIje4CMlJ1IhOQtXp3FyE6qMfCBTct/DWrtl921JYwaD h4iZthFv2aq284IuSRCYtsR4o+mh6ohaTRhZ8ybgKqYy5TUtrU+AK/zS1sJ5IqYQiihp 9G400dZF1FslZ1kPFmRgGzSDBuLez+VHyjYI+X6+ACTtx8i+3/iW+qjUOZ8ikxtoJu0A sR/WUPUu5rOukSCMJJbk8J8r8nTlHCIKYiF3NYBGG2Uww0uE0GvNfVLhjQgw3fiHYaov /dMZwr31KJ5+XQ4reoUGdXZ9aoFUTW5CVgL+fjYUuqfRfbrYq62Cb0B0wnXa2ZXsbthg RZ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=SpMd2Z/ZivukEzsLUBS/W60n+AuS3oIAuUVT9dpz6e8=; b=SBTCnX1F48DQBWtXhcbjy0I683rMd5ecA6EyhtjgKgDQYQSJGx7ea1PT7dFiaSeu/o nap3QQ1KTmwo6S1JQShjBVU+baXr2In/e5CKDiIxUB0xBGXptGpKoZhTpuC9tydoTMLB rXLhzrO3roaXQDrn7tcsE7/b+I76uypMYAXPwUVukwJsMSlpUsWFxOF+xu2HrIQYw0Lq Tk8bwp1dSEcLH3Nr1Pz+2x45gomzJVF+O5lXGJ7/SJ08ZTVGM1CGUwSssUDoMLz8C+Bq GLzilpAggm9WfxK7Zl6RP9sStTQptnW2RNTOjg1V2jdFBxCB/agtZQKT2qX0h+DDH/gA xjIw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ox26si11252368ejb.629.2020.12.22.02.07.18; Tue, 22 Dec 2020 02:07:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726329AbgLVKGB convert rfc822-to-8bit (ORCPT + 99 others); Tue, 22 Dec 2020 05:06:01 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:51857 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbgLVKGA (ORCPT ); Tue, 22 Dec 2020 05:06:00 -0500 Received: from mac-pro.holtmann.net (p4ff9fbc9.dip0.t-ipconnect.de [79.249.251.201]) by mail.holtmann.org (Postfix) with ESMTPSA id 456E2CED09; Tue, 22 Dec 2020 11:12:37 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: Default to HW mSBC on capable controllers ? From: Marcel Holtmann In-Reply-To: <20201222092100.ru5inf45v55qoa4m@pali> Date: Tue, 22 Dec 2020 11:05:19 +0100 Cc: Luiz Augusto von Dentz , Joakim Tjernlund , "linux-bluetooth@vger.kernel.org" Content-Transfer-Encoding: 8BIT Message-Id: References: <20201221211437.4s27cl6t4v27sugh@pali> <20201222092100.ru5inf45v55qoa4m@pali> To: =?utf-8?Q?Pali_Roh=C3=A1r?= X-Mailer: Apple Mail (2.3654.40.0.2.32) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Pali, >>>>> There seems to be quite a few USB controllers gaining the BTUSB_WIDEBAND_SPEECH which I guess means HW mSBC but currently there is no way to select this mode. >>>>> Any idea if one could patch the kernel to default to HW mSBC and user apps like bluealsa/pulseaudio would just use it automatically? >>>> >>>> It is in our plan to support HW offloading, but that doesn't mean all >>>> platforms will be supported since that depends on the PCM lines being >>>> connected to BT controller in the first place. >>> >>> Dedicated PCM lines are used in embedded world and maybe also still in >>> some mobile segment. I remember that e.g. Nokia N900 had this setup. And >>> it was quite crazy how it was finally configured... but it worked! >>> >>> But this is nothing for classic x86 laptops with USB bluetooth >>> controllers on classic intel bluetooth+wifi mPCIe cards where SCO >>> traffic is routed via HCI (over USB). And not via dedicated PCM pins. >>> Moreover I think there are not any mainstream laptop which have PCM pins >>> on mPCIe slots usable for such bluetooth mPCIe cards. >>> >>> For classic desktop / laptop it is needed to deal with fact that SCO >>> audio is routed via HCI (like A2DP) and therefore support for Enhanced >>> Setup Synchronous Connection HCI command. >>> >>> AFAIK even for routing SCO over PCM when mSBC hw encoder is used, >>> Enhanced Setup Synchronous Connection HCI command is required. >> >> So you are saying that we should do PCM over HCI and that would >> actually work (meaning we have enough bandwidth)? > > This is something which needs to be tested. And without full > implementation (with control of all parameters) we cannot say YES or NO. > > And if you are aware of bandwidth, Enhanced Setup Synchronous Connection > HCI command allows you to use also software based CVSD codec. Meaning > that CVSD encoding/decoding can be done by application and therefore > decreasing amount of data to transfer to bluetooth adapter. > > As I said this command is needed also if you want to use mSBC hw encoder > over PCM, so I think usage of Enhanced Setup Synchronous Connection HCI > command always have benefits to implement it (I have unfinished and > untested implementation). CVSD is an air codec only. Controller<->Host is PCM in that case. Only with mSBC you have both air codec and Controller<->Host running with mSBC. Regards Marcel