Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4905106pxu; Tue, 22 Dec 2020 03:51:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1SdhokmPDgpYNrYdafa+lZTJoIOQJb1KtslXqf1ngzgvj7XbRslwzuEsNwgjws+fmb17N X-Received: by 2002:a17:906:417:: with SMTP id d23mr19452197eja.19.1608637915604; Tue, 22 Dec 2020 03:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608637915; cv=none; d=google.com; s=arc-20160816; b=oAsqKoFzNrUlAbfdOQZ5GngbMynETedCwosvt0pe0S9vD/PFILKzhKxR7YBZ8d2k6K MSURlIIokHsQQplOELUuM+mtY2+n1pR94ZCftE/wPzNZ5+geMgvwz3s9Mrs56HPlQnq1 EkMs5voam03duttovd6/mI3S3KWlHRBC8XXTC+kXXlbL2nigj0OW3WhYb2hyCD374cjD BvQEEjqOx9BaOiXtmQJF6ao4+LwEdgscFarUtah+Drk0BqlCu4aOgWoyczKjMEtTwCPl 7m7/fVGdvPIKi3tuSVCYaEo1VCzJffmNImj0d9Tv1lERyQkoXaZpGQjMrJFZID0bN/Mq Ah2Q== 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=pdgPSeSWcAf01DCWzvL/DMmZHEn+vdQTb94lpwKEZqA=; b=yTeGW1Q88Zd8zv5CfgTG5nSrAopd0MFUttr7i0gf0BoVa0uwoHLeKBpjvyUi2pPmIn 8Fv48uwF7XV0d9FE7uylUYii3J+bCJD7Uv+78AiDNDyiWLx27p/YZLfwZ1Dd208O1klJ BK0hmC81Uq6ZwkXdf4J7joDsrMnAeaOzJCtIkuNlAnqr8YBFZu0SGeESQ0ztwbm6sAT6 xUZLtTGk2CI8NmemNwULlmBEfrMofUZsMpQL7d3hVv79Dmo4p48nL78Aer+gV4lUF4oX XO6LFNJFbNqkrCw86nhMxgsa8rbIimsyqobWEe1Le1ML4TktP93LcvWny7UIQGShN5RP mEwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lY2SO9CB; 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 n23si10132678ejr.321.2020.12.22.03.51.32; Tue, 22 Dec 2020 03:51:55 -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=lY2SO9CB; 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 S1726282AbgLVLuY (ORCPT + 99 others); Tue, 22 Dec 2020 06:50:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:57198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726131AbgLVLuY (ORCPT ); Tue, 22 Dec 2020 06:50:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0EEF12311D; Tue, 22 Dec 2020 11:49:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608637783; bh=oK0OHThwNyYMlAq3CsvAEPYB7f7apr8xylr5mleYPcQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lY2SO9CBr5m5NQDnvz13clxe1UzYtU8u4y1qpwHI0K9ITv94fiuDOHu4JXs6llTtK AbsXWIJmoO7uVs26H9y0qEZPhBIXRLhLvDrpIK6uyMz6Fardl8dl4bl08Zuq8zES7x Wf555cFJtlli3yI18YpcXz6lWV/Giu/K0qAnVUYNETMga0GaoBPpp01kSoO7dxMI4M 34nbGinwbAqSonSOuC7Vm4gmG0yM2iREjzySLEUmpKEYon41bUVWt2I9+qSEu/Mhy3 6bu47HNUWwPuvSnF5cqfRRgaki5nkPs9WteUunRNPU2NWBxBQ+DKD94NbsaBX3RpGK VwiTXfaPnbBxA== Received: by pali.im (Postfix) id B5BB8848; Tue, 22 Dec 2020 12:49:40 +0100 (CET) Date: Tue, 22 Dec 2020 12:49:40 +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: <20201222114940.egjhi3jangsqvpnb@pali> References: <20201221210707.evrdeyiki45pivux@pali> <20201222114024.GG20371@reaktio.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201222114024.GG20371@reaktio.net> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 ? I have not implemented it. I just proposed API between userspace and kernel. But I have not implemented this API yet.