Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4850527pxu; Tue, 22 Dec 2020 02:22:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzptMUqQQMjSVTy1jZ/5+NF2SU8gzpdc/IqN6WqoPCdq9xDmqfA3Th5vN+Bt2+L6N7uTVrm X-Received: by 2002:a17:906:8051:: with SMTP id x17mr18604260ejw.430.1608632520071; Tue, 22 Dec 2020 02:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608632520; cv=none; d=google.com; s=arc-20160816; b=YbYsWFo9no+bViODHFaqKOPzxnLA2vCc4IfVHU+2QXQjtQ9CriL4JuKzSUxxrCli07 IEhsOxC5HUzuksyacmrnpKP89v94stT0udYhZVB/YP04BrNpJwZK87oLviedLisu9xZu oMBK8LjG+Dz9cVN61r0oFLAPJ9xLvHIrWsuRfET1NiP7O4QCI2d1mNuf473bKDXLsxKD RqHjSSKD3mLZXvGAteCNV0qKr3Y6ne9NGFi75YW9LJCR1PeMBkhmfM6rt+Z5yJCyhWnE nF4A8jWWyEvbiNHWrZNemfx3sNBxwCGTzwhYVxbIDk0L7aFfxE9Tq8YFWX1Y0WL7we5/ 7Kyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=uRlr91ysEzg94DyBOt5e8zL8BH4K8FMRl51cnB9nN40=; b=FmvZeEHZiZDSWhm29w/YKlgu1LmvKG/ifHXxJGKOpnTr592fG7RunareoQqNkZQ+wB bcsiWoju8Cotucj/hTCDTJiqBn7SyIOqt+smS5YpBaaOUACwMN5eHQRc8j7T67bSSYXm UPyW/sXQAbG4pjgR8kZai372pj+9KUWAUSGS0kAAWctqSN/NXsM4frZ/U6XO69fz4rMb 9Mh12SL2hmRJ3uC2AJRqXAAo6FHfp5N5CxnNjqavfo5kiexWU/riyPqp1nxOcfPU1+ak oXIkbf6576UKtvZqOqyQjGCZMwYcBV81/mZ+eM1D4R5Gj9dtfPxIVaBOzriAWerqKeTt 7UQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PMzqHC/I"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr10si10017404ejc.306.2020.12.22.02.21.28; Tue, 22 Dec 2020 02:22:00 -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=@kernel.org header.s=k20201202 header.b="PMzqHC/I"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbgLVKUO (ORCPT + 99 others); Tue, 22 Dec 2020 05:20:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:36858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbgLVKUO (ORCPT ); Tue, 22 Dec 2020 05:20:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F31C522AAC; Tue, 22 Dec 2020 10:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608632373; bh=fnFESCrIYqaC4XtvJBjfzmhzwKYExEDcvCgvEHtqX8U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PMzqHC/I6lYsNLAk1Nku7yqs6J1rr9euzzdPb4wfAPA0EjtjXSJy9mAhLN6jDQGBK KcVNYyyRcAAd7SNS0tdrEMvWM+oSHocF0COsjF9DPHpfpl8kmiqAj5xx0iEhOUNh2v U8NYyVLxQMcPu9QBVhho4SLchPXh6WA9VZoY0pXayJcGjw7YBYM+HwPqM61KeIcZN6 druRl7SP0Wc5JqHKj/o2zk9AvUkFqTsLd3mGYd2tjrUFRlgFjL5x7opffBAmcSb5a3 IsoVP5TApYHYxQZJtNvNcA16VIcULCZKIVUF8CVW9Z5ewrEW8Wt3N84IGE1Aix5kig btQ8gBjn8jORg== Received: by pali.im (Postfix) id 811D7848; Tue, 22 Dec 2020 11:19:30 +0100 (CET) Date: Tue, 22 Dec 2020 11:19:30 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Marcel Holtmann Cc: Luiz Augusto von Dentz , Joakim Tjernlund , "linux-bluetooth@vger.kernel.org" Subject: Re: Default to HW mSBC on capable controllers ? Message-ID: <20201222101930.awcxtsgltrrde2d3@pali> References: <20201221211437.4s27cl6t4v27sugh@pali> <20201222092100.ru5inf45v55qoa4m@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Tuesday 22 December 2020 11:05:19 Marcel Holtmann wrote: > 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. Hello! This is not fully truth. You can use also use CVSD between Controller and Host. Enhanced Setup Synchronous Connection HCI allows you to do it. > Only with mSBC you have both air codec and Controller<->Host running with mSBC. No, you can use it also with other codecs. With all transparent codecs and CVSD, alaw and ulaw based on capabilities of your bluetooth adapters. > Regards > > Marcel > >