Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4909197pxu; Tue, 22 Dec 2020 04:00:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjeovaZY0wcREwoyvpplQLeAxO/qDxY2BLc9JITFyTrzkRpRXA/FVRlf0E+F8JG5TMQDMj X-Received: by 2002:a17:907:c29:: with SMTP id ga41mr12679098ejc.28.1608638403045; Tue, 22 Dec 2020 04:00:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608638403; cv=none; d=google.com; s=arc-20160816; b=UfY1qTcPH7yRyaAeSpGHr2ysQwr3ELVbnw7dvR/R7rzrLN3931rDp6jVbfkG0K6ecx GsBOm0IgdrXKtEDriSeaT8qJUZ5PMSTEh/IFcpoGn4CI4qcTnXd7IDt+tjMiNOb9zfMT qdmJCVn0T6cxAT1DIiDZgbbeDOrW2S59tczDpb24ZPvUFXtTgDtC8m6XtLPGP4IgGXHo uviXLJb+0N7aX83pP2M7UlcfO6vUnI/clMTjOIPJSmRjUhkCcS5tWcn52vdA0qE1DqUn 3Bx0U5KjoOMsZiO72A45giqV7rkboqyBzhJsL49goQXbTZAtmCfsmlVyE0WO9lrHr+sg Ksew== 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; bh=cnfCzovrkk8yWbwiqGAMlssiadDaeOQnAs2tHi5owLI=; b=NDggFQkzkNvP3fx066eMpk0xnMVT46aBHOELwJmGTJPGtMHQJbUm2csvrkRFiBvwwl LIwM+lGw64oevLCbiN2FbT23oQsgFUbxVQqigUfV4prEeueqEq+DwPhunumZORnJZ9J1 a3CXgVeu88UMpMkCzL1RW/PO2pEMvncVHNZUoN4WnVpGCXmPLyPl9K+2lonhPI6Jd2pC JYQVxJX7Pfi0+5+QhbD6RIQPxWh3FNQCOBNd/Pq1RTsnulgEIXTUan22Ti+o7gVqyy+D Z3pcXofbMt2dSf5WQ+iFYXiBswue2PhB0UDRy9jn/85sVBAVmbM6ktbzJwOiLTvjqRMe vrjA== 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 i5si12212631edv.542.2020.12.22.03.59.38; Tue, 22 Dec 2020 04:00:03 -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 S1726340AbgLVL6b (ORCPT + 99 others); Tue, 22 Dec 2020 06:58:31 -0500 Received: from fgw23-4.mail.saunalahti.fi ([62.142.5.110]:41854 "EHLO fgw23-4.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbgLVL6b (ORCPT ); Tue, 22 Dec 2020 06:58:31 -0500 X-Greylist: delayed 1043 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Dec 2020 06:58:30 EST Received: from ydin.reaktio.net (reaktio.net [85.76.255.15]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id 7b7399c2-444a-11eb-8ccd-005056bdfda7; Tue, 22 Dec 2020 13:40:25 +0200 (EET) Received: by ydin.reaktio.net (Postfix, from userid 1001) id 6970736C0F6; Tue, 22 Dec 2020 13:40:25 +0200 (EET) Date: Tue, 22 Dec 2020 13:40:24 +0200 From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Joakim Tjernlund , "linux-bluetooth@vger.kernel.org" Subject: Re: Default to HW mSBC on capable controllers ? Message-ID: <20201222114024.GG20371@reaktio.net> References: <20201221210707.evrdeyiki45pivux@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201221210707.evrdeyiki45pivux@pali> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 ? Thanks, -- Pasi