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@xxxxxxxxxxxxxx/ > > 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.