Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7158467ybi; Mon, 8 Jul 2019 15:50:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1jgaAf/7lnNCp9U+IvCFBmjPMPN0Ee0F0PVBAzWSUTWnarJX6AIVS8oT0QcBPDPlQs+KL X-Received: by 2002:a65:62c4:: with SMTP id m4mr25993845pgv.243.1562626226373; Mon, 08 Jul 2019 15:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562626226; cv=none; d=google.com; s=arc-20160816; b=INZLepvzOND0qeAKbpQREGkAszOkNMDodU9SRXczoZ9YApKE9LxK46NquL4ozUNT1W DtL+oCMy3M0GeoZ+/WNZYuagyC32aOKjxPccNzg5lrBmoqXnjJY7AbD5bFgTPA5ElBVE qF4xWPEiOgF8+e0XX2XSi3MNjtQwE+Tle+87jqa++GsY5CucqORxW4bDO8NW10oMYcw/ X4ZtkYg0g6kMSMTNtOPJcybAw0mEqAWU6CuDO2ZCXCJMiriOD/RCvvmWv38EZpOq7dvC bNQ/AnZQsvuAwUWgx8GhDKPhekD/7sYYgZqFsNK28m4RhStUPrfyqZL2YL5z3PLNNWx8 x6Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NN2kMLuaO04GeJiW+YpmB2NShr1+6XXref8en5TcIRQ=; b=T5qKgRGTVIhPIrY/5xAETYL1RY5koEEcAV1tCpe4D0iLDAVWUEspsHJ3RNsTc2ybUS vXrGv1toRvBREYA3eOVVenMBhrQEb77ynNinhjIpjyVpTYyYX8wYAaXDiW6kILssiJih K+/jdxxl+7pJpH7xOwK7IRgb3AKcJui4H8kHtNNca/JgBlYbImjrlDn7XwjxZTq4wlPg xJ1dHMJ1I5fuhGhVEkHeF/K3JfdMC/AWu+oA46tpl191wGbJjnA0+OvZRUZmcWhG8tS+ v/AUw8DxuWxghYPvDq4sp9JfSDNyIzqUbdmq+7khTG1qUbZu0Id56X3HSt6+DoNge3Ge QVIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PirSs1eG; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si15987513pgj.223.2019.07.08.15.50.11; Mon, 08 Jul 2019 15:50:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PirSs1eG; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404136AbfGHVGV (ORCPT + 99 others); Mon, 8 Jul 2019 17:06:21 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41511 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728720AbfGHVGV (ORCPT ); Mon, 8 Jul 2019 17:06:21 -0400 Received: by mail-wr1-f68.google.com with SMTP id c2so18615764wrm.8 for ; Mon, 08 Jul 2019 14:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NN2kMLuaO04GeJiW+YpmB2NShr1+6XXref8en5TcIRQ=; b=PirSs1eGvjARb6PnWgMIoyoH2WfbjXYBtFaFPPoPrjkzPw6lOaNxaOaEPVy5gz0qh2 GCxJn7F64nBorD9Q7GgIvGNmQWC2LxlXHuwgi1dQo5sNzsvLUVR+sfNW1wKmNIEb/eMI mEvrQfGcWOkr2EgiK61KElm5nBS6QL7jOZMuEvt1T3rXIgdcvL0T9EfqP8gScCuAAyd0 lFllHhPsLjWVpWJ+nWSUeLh1/H30vUoqxGTMYG8HfPbzoEBABJlFRdcUMbTrq2+8KmNt NBv5cB4B8EZ3A62Ar6zC4cLS0zVYLAwEL5Y/UUAH97LagtpQySi68pk+Tg3sUGoiwTil K1VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NN2kMLuaO04GeJiW+YpmB2NShr1+6XXref8en5TcIRQ=; b=nXTmXvA2CCle9HZkd6Q0XsohgLpOrCTfIcnoI0VCdnrCFOilPSrBDzY+80Xk8ggNrX Rhtoy/MK7vCjUENO4I39NxIjQsKmMHWX9FYUp2xizv+q8ZnUVU7FnWlGaRw01PmlD7wC 1l/9myQV9qc+1aDCogPYKY/QfJSQUWkWpw3PDzK20CjWtp/uSejKS0GOSyzrqeJ+67zU nhEBNxNFowa79gEPG1it+cYqOG9nlmFamlHgc9i+8RtxUoDgM7zhykfhYZMTCRKMHIO+ VqVeo0kl3b4WjWVXNeXi5+mym99nBiDHSEUyT1DAyWVolja1gX7elwkfIsxTyMfLh0qy F5pw== X-Gm-Message-State: APjAAAWrhms7JSok5gfsobvF9ONsyNwdzspDdavI9ZqvEqw6o/aTUjeK T72aRZGb3C3HjEG8kjpM8BgC1uua X-Received: by 2002:adf:e28a:: with SMTP id v10mr21211183wri.178.1562619978721; Mon, 08 Jul 2019 14:06:18 -0700 (PDT) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id s3sm899366wmh.27.2019.07.08.14.06.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jul 2019 14:06:17 -0700 (PDT) Date: Mon, 8 Jul 2019 23:06:16 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Marcel Holtmann Cc: Pavel Machek , Luiz Augusto von Dentz , "linux-bluetooth@vger.kernel.org" , Johan Hedberg Subject: Re: HCI Set custom bandwidth for AuriStream SCO codec Message-ID: <20190708210616.x2dlnzjhnplu37bz@pali> References: <20190506151651.pu2us2fgsf7w2vos@pali> <20190516183429.ql3hxtnmiabcq7tj@pali> <20190519082305.q7y4gpmdhvx3vzvo@pali> <20190519212157.GB31403@amd> <20190607130245.mv4ch6dxnuptzdki@pali> <20190708122512.qqfvtm455ltxxg3h@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gieebdnoy2n5cdez" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --gieebdnoy2n5cdez Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Monday 08 July 2019 15:23:06 Marcel Holtmann wrote: > Hi Pali, >=20 > >>>>>>> to be honest, I would rather see WBS implementation finally > >>>>>>> reach PA before we start digging into this. > >>>>>>=20 > >>>>>> First I want to finish improving A2DP codec support in pulseaudio.= Later > >>>>>> I can look at HSP/HFP profiles. Ideally it should have modular/plu= gin > >>>>>> extensible design. So the aim is that adding new codec would be ve= ry > >>>>>> simple, without need to hack something related to mSBC/WBC, AuriSt= ream > >>>>>> or any other codec. > >>>>>=20 > >>>>> Well HSP don't have support for codec negotiation, but yes a modular > >>>>> design is probably recommended. > >>>>>=20 > >>>>>> But for AuriStream I need to set custom SCO parameters as described > >>>>>> below and currently kernel does not support it. This is why I'm as= king > >>>>>> how kernel can export for userspace configuration of SCO parameter= s... > >>>>>=20 > >>>>> We can always come up with socket options but we got to see the val= ue > >>>>> it would bring since AuriStream don't look that popular among > >>>>> headsets, at least Ive never seem any device advertising it like > >>>>> apt-X, etc. > >>>>=20 > >>>> Pali clearly has such device and he is willing to work on it. Surely > >>>> that means it is popular enough to be supported...? > >>>=20 > >>> Just put AT+CSRSF=3D0,0,0,0,0,7 to google search and you would see th= at > >>> not only I have such device... > >>>=20 > >>> So I would really would like to see that kernel finally stops blocking > >>> usage of this AuriStream codec. > >>=20 > >> we need to figure out on how we do the kernel API to allow you this sp= ecific setting. > >=20 > > Hi Marcel! Kernel API for userspace should be simple. Just add two > > ioctls for retrieving and setting structure with custom parameters: > >=20 > > syncPktTypes =3D 0x003F > > bandwidth =3D 4000 > > max_latency =3D 16 > > voice_settings =3D 0x63 > > retx_effort =3D 2 > >=20 > > Or add more ioctls, one ioctl per parameter. There is already only ioctl > > for voice settings and moreover it is whitelisted only for two values. >=20 > it is not that simple actually. Most profiles define a certain set of par= ameters and then they try to configure better settings and only fallback to= a specification defined default as last resort. Ok. I see that there is another "example" configuration for AuriStream with just different syncPktTypes =3D 0x02BF and bandwidth =3D 3850. So it really is not simple as it can be seen. > >> We have kept is really simple since there was only CVSD and mSBC as of= now. > >=20 > > Seems that custom codecs are already widely used, so it would be great > > it Linux kernel allows to use also other codecs in future without need > > to explicitly whitelist them. >=20 > This is an overstatement. I see only one custom codec being used. Unless = you have heard from others. However as stated above, I think we need to pro= vide an array of settings that are similar defined to what the HFP spec doe= s. Then we just load the whole set into the kernel. CVSD and mSBC are in use. IIRC specification also mandates ulaw a alaw codecs but I have not seen it used. Has somebody tried to implement it? I think just replacing voice_settings should be enough as encoding / decoding should be done in bluetooth firmware / hardware. And then there is AuriStream which based on google results it supported by lot of headsets. So at least 3 different codecs are widely supported by headset. > >> I am also curious on what the assumptions are for the USB driver alter= nate settings are when using a different codec. > >=20 > > I did all above tests and kernel changes with USB bluetooth chip which > > is integrated in notebook's combo bt+wifi intel minipci-e card. >=20 > Good to know. Since for mSBC in theory they need a new alternate settings= that wasn=E2=80=99t really available. I understood that both mSBC and AuriStream uses "transparent" mode of transport and bluetooth chip itself does not know if it transmit mSBC or AuriStream as it does not do any encoding... --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --gieebdnoy2n5cdez Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCXSOwRgAKCRCL8Mk9A+RD UpDYAKCEVvpSQc5v+9+4XfAvNY8iBnCoeQCfW5W4UcZC2M+2svfcSs75bmQFLXE= =nZmi -----END PGP SIGNATURE----- --gieebdnoy2n5cdez--