Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4965305pxu; Tue, 22 Dec 2020 05:22:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcm14oZ3Ok6ZIPOOpO8lOSjB6vL0DHBHGMFBpplLp0RYOptT64r+HE7fMevH0FBF3mvXvY X-Received: by 2002:a17:906:718b:: with SMTP id h11mr19704891ejk.241.1608643370311; Tue, 22 Dec 2020 05:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608643370; cv=none; d=google.com; s=arc-20160816; b=e/Yd+uFnZjhpBIMoILzSLcCJCS99MTCYoh4Pcvf0MIcuQm1B8itm4xY//4Ppj6lEdk VJ00le5/rVxg2ZuVY41s7+VBgGekM6MKNALTQXv9WtuaCn8yArDmJEqCaNgvNXpIaplC Ut8chyEJxk46abcaJMwgFuQrF+syc6whRpumfoKr9/XcVbEx/6BGUCfKgu2gO4esK32A EcC/72ghA4eGwf0k+9Dne6Rol2pyXlCwQoOvzrkZ4IyyVcab3ybpghnBCaqSKu8W5UtI sF+jcEYSKV7BPCHL+vBiZL8K/nfrJlnxLeBP0eqQ5X2Wu8qy4OdVy2Re7l+zgbViGxZ3 yIUg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9PjFhCIuWraSv/8CJfEm6E2/lOFNbDcCiTCVeUfqjDE=; b=dRMw6oD5Q41VWTJM9GV7JZSJOGFqmd2DvUvojt11bGtW7tozcoS4H+zjDSZT6JMZHM hMaWB8/w+/mfN5c/YBLaJCW7s0GNAnwpfMbg/hHgtdwJDHwZEEk4qWGMM4tuClx611fC +Iro8cvNpCO1dHyOxVa0+pJ83wRHPKPUBjzaCI4HZ+9y/Hy7uHw3Etq+TO06s20WIJpy 8OWap5rmUoPv5/I7kAiET6x5CTGHQhYRvJoCzOfWDm3/A9Y4Z7yGZVFUaeVc9n8NCDnc hP6ADyFY4ELIh6cWm7bXGe9e4RDvfNVU3V2qJgDoPGE3kk+LP35rhL1mZ6aCjWcGtNjW Umrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VwiWaMzW; 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 p22si10482831eji.449.2020.12.22.05.22.27; Tue, 22 Dec 2020 05:22:50 -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=VwiWaMzW; 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 S1727118AbgLVNVc (ORCPT + 99 others); Tue, 22 Dec 2020 08:21:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:42642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbgLVNVc (ORCPT ); Tue, 22 Dec 2020 08:21:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C34632251E; Tue, 22 Dec 2020 13:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608643251; bh=fVxI/FsMGbpVNtGwSmjiqBW+7gDtAS2BbFKIse/x5rs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VwiWaMzWuv0OvHDYbaAC0VW8IV/26LAyHiE4Z/imiOMRhyKLHIvLi7ELQF9y3GE4x fdW+SFrae4felB0gzCS1YJddBlTXDFvEtGTw9qfUb7sYcIRuC3Tq71s7MxU6JjY8dt z/psKsU82NlGjccDnj/x0T5tDHeYOhFXEfUsz7ldMw+WpapmbKPvAsU8lMjPU6onY4 iUCCQ+FPHsyF/WKhlaLe1zmSSbV0cZDIZXboxQH6XdsTSl2+M5a2LsGDaBPdKZwIGk GccQ+qcUHQUeI5HjBHw9H2vMKFU8X6LOMZWK+FKwOc2s0aOkxCBCYEQOZbjHM6SGT8 BnenqZbc8Npkg== Received: by pali.im (Postfix) id DC68E8B8; Tue, 22 Dec 2020 14:20:49 +0100 (CET) Date: Tue, 22 Dec 2020 14:20:49 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Pasi =?utf-8?B?S8Okcmtrw6RpbmVu?= Cc: Joakim Tjernlund , "linux-bluetooth@vger.kernel.org" Subject: Re: Default to HW mSBC on capable controllers ? Message-ID: <20201222132049.de24v7rarpuf7hoh@pali> References: <20201221210707.evrdeyiki45pivux@pali> <20201222114024.GG20371@reaktio.net> <20201222114940.egjhi3jangsqvpnb@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201222114940.egjhi3jangsqvpnb@pali> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Tuesday 22 December 2020 12:49:40 Pali Rohár wrote: > On Tuesday 22 December 2020 13:40:24 Pasi Kärkkäinen wrote: > > Hello Pali, > > > > On Mon, Dec 21, 2020 at 10:07:07PM +0100, Pali Rohár wrote: > > > > > > > Any idea if one could patch the kernel to default to HW mSBC and user apps like bluealsa/pulseaudio would just use it automatically? > > > > > > For usage mSBC hw encoder you need to use Enhanced Setup Synchronous > > > Connection HCI command for establishing SCO connection. > > > > > > For using HW encoder you need to stop feeding socket with mSBC encoded > > > data and instead put into this socket RAW pcm samples. Also you need > > > somehow inform kernel about this change. > > > > > > For both things I designed new setsockopt() API which I described in: > > > https://lore.kernel.org/linux-bluetooth/20200419234937.4zozkqgpt557m3o6@pali/ > > > > > > > In that thread Luiz asked for changes to the patch, eg. kernel module option is needed which allows enabling new/experimental features, and your changes should be enabled only when experimental option is given while loading the module. > > > > See here: > > https://lore.kernel.org/linux-bluetooth/CABBYNZJTBM87Yr+rqUm6MwwSR60YNe+UFr0HHj5T2DkY7LqJqA@mail.gmail.com/ > > > > Could you please add that kernel module option, and re-send the patch ? Pasi, I understood that Marcel is against it. But if bluetooth maintainers approve this API, I may try to implement it. If API must be hidden under compile time CONFIG_* kernel option it is also possible. Just I need to know exact answer "yes" or "no". > I have not implemented it. I just proposed API between userspace and > kernel. But I have not implemented this API yet.