Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Pavel Machek <pavel@ucw.cz>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	Johan Hedberg <johan.hedberg@gmail.com>
Subject: Re: HCI Set custom bandwidth for AuriStream SCO codec
Date: Mon, 8 Jul 2019 14:25:12 +0200
Message-ID: <20190708122512.qqfvtm455ltxxg3h@pali> (raw)
In-Reply-To: <ED456CCA-CF85-48D9-B7E9-9B0BF02A32FC@holtmann.org>

On Saturday 06 July 2019 15:45:03 Marcel Holtmann wrote:
> Hi Pali,
> 
> >>>>> to be honest, I would rather see WBS implementation finally
> >>>>> reach PA before we start digging into this.
> >>>> 
> >>>> First I want to finish improving A2DP codec support in pulseaudio. Later
> >>>> I can look at HSP/HFP profiles. Ideally it should have modular/plugin
> >>>> extensible design. So the aim is that adding new codec would be very
> >>>> simple, without need to hack something related to mSBC/WBC, AuriStream
> >>>> or any other codec.
> >>> 
> >>> Well HSP don't have support for codec negotiation, but yes a modular
> >>> design is probably recommended.
> >>> 
> >>>> 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 asking
> >>>> how kernel can export for userspace configuration of SCO parameters...
> >>> 
> >>> We can always come up with socket options but we got to see the value
> >>> 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.
> >> 
> >> Pali clearly has such device and he is willing to work on it. Surely
> >> that means it is popular enough to be supported...?
> > 
> > Just put AT+CSRSF=0,0,0,0,0,7 to google search and you would see that
> > not only I have such device...
> > 
> > So I would really would like to see that kernel finally stops blocking
> > usage of this AuriStream codec.
> 
> we need to figure out on how we do the kernel API to allow you this specific setting.

Hi Marcel! Kernel API for userspace should be simple. Just add two
ioctls for retrieving and setting structure with custom parameters:

  syncPktTypes = 0x003F
  bandwidth = 4000
  max_latency = 16
  voice_settings = 0x63
  retx_effort = 2

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.

> We have kept is really simple since there was only CVSD and mSBC as of now.

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.

> I am also curious on what the assumptions are for the USB driver alternate settings are when using a different codec.

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.

-- 
Pali Rohár
pali.rohar@gmail.com

  reply index

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-04 17:15 Pali Rohár
2019-05-06 15:16 ` Pali Rohár
2019-05-16 18:34   ` Pali Rohár
2019-05-19  8:16     ` Luiz Augusto von Dentz
2019-05-19  8:23       ` Pali Rohár
2019-05-19  8:45         ` Luiz Augusto von Dentz
2019-05-19  8:54           ` Pali Rohár
2019-05-19 21:21           ` Pavel Machek
2019-06-07 13:02             ` Pali Rohár
2019-06-07 15:19               ` Luiz Augusto von Dentz
2019-07-06 13:45               ` Marcel Holtmann
2019-07-08 12:25                 ` Pali Rohár [this message]
2019-07-08 13:23                   ` Marcel Holtmann
2019-07-08 21:06                     ` Pali Rohár
2019-07-12 18:59                       ` Marcel Holtmann
2019-07-18 10:09                         ` Pali Rohár
2019-07-18 20:06                           ` Marcel Holtmann
2019-11-21 23:00                             ` Pali Rohár
2019-11-24 11:02                               ` Marcel Holtmann
2019-10-27 22:09                           ` Pali Rohár
2019-11-12 21:06                             ` Pavel Machek
2019-11-13  9:22                               ` Pali Rohár
2019-11-21 22:47                                 ` Pali Rohár
2019-11-19 17:04                             ` Marcel Holtmann
2019-11-19 17:13                               ` Pali Rohár
2019-11-19 23:47                                 ` Marcel Holtmann
2019-11-20  7:44                                   ` Pali Rohár
2019-11-21 22:44                                     ` Pali Rohár
2019-11-24 11:04                                       ` Marcel Holtmann
2019-11-24 11:13                                         ` Pali Rohár
2019-11-26  7:24                                           ` Marcel Holtmann
2019-11-26  7:46                                             ` Pali Rohár
2019-11-26  7:58                                               ` Marcel Holtmann
2019-11-26  8:00                                                 ` Pali Rohár
2019-11-26  9:41                                                   ` Luiz Augusto von Dentz
2019-11-26  9:58                                                     ` Pali Rohár
2019-12-05  9:28                                                       ` Pali Rohár
2019-12-11 14:40                                                         ` Pali Rohár
2020-01-04 10:04                                                         ` Marcel Holtmann
2020-01-04 10:37                                                           ` Pali Rohár
2020-02-09 12:59                                                             ` Pali Rohár
2020-02-19 12:09                                                           ` David Heidelberg
2020-04-19 23:49                                                             ` Bluetooth: Allow to use configure SCO socket codec parameters Pali Rohár
2020-04-20 23:54                                                               ` Luiz Augusto von Dentz
2020-04-21  8:53                                                                 ` Pali Rohár
2020-05-14 19:49                                                               ` Aleksandar Kostadinov
2020-05-15 22:46                                                                 ` Andrew Fuller
2020-05-15 23:08                                                                   ` Luiz Augusto von Dentz
2020-05-16  7:50                                                                     ` Aleksandar Kostadinov
2020-05-16  7:53                                                                     ` Pali Rohár
2020-05-18 16:43                                                                       ` Luiz Augusto von Dentz
2020-05-18 16:50                                                                         ` Pali Rohár
2020-05-27 12:18                                                                           ` Ujjwal Sharma
2020-05-27 15:48                                                                             ` Luiz Augusto von Dentz
2020-05-27 16:24                                                                               ` Ujjwal Sharma
2020-06-04 20:43                                                                                 ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708122512.qqfvtm455ltxxg3h@pali \
    --to=pali.rohar@gmail.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git