From: "Pali Rohár" <pali.rohar@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: Is BT_VOICE_TRANSPARENT correctly defined?
Date: Fri, 7 Jun 2019 17:29:15 +0200 [thread overview]
Message-ID: <20190607152915.5m2z3gwvlkivr3ms@pali> (raw)
In-Reply-To: <CABBYNZ+JPvvk1eACkp+cM9MtDZq+M78QLAtFcq-qrhR+8DsjnA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]
On Friday 07 June 2019 18:03:50 Luiz Augusto von Dentz wrote:
> Hi Pali,
>
> On Fri, Jun 7, 2019 at 4:43 PM Pali Rohár <pali.rohar@gmail.com> wrote:
> >
> > On Sunday 19 May 2019 12:18:54 Pali Rohár wrote:
> > > Hello!
> > >
> > > Now I'm looking at BT_VOICE_TRANSPARENT definition which comes from file
> > > include/net/bluetooth/bluetooth.h and it has value 0x0003. It is really
> > > correct? Because it means following format:
> > >
> > > Linear Coding, 8-bit without padding bits, 1's complement
> > >
> > > I think that usage of 1's complement is not easy as there is no C type
> > > which matches it. Should not it be 2's complement or rather Unsigned
> > > type?
> > >
> > > Seems that main usage of BT_VOICE_TRANSPARENT is mSBC codec and I doubt
> > > that it uses 1's complement signed format (specially as it should be
> > > modification of SBC codec which encode bytes as unsigned type).
> > >
> > > There is another define BT_VOICE_CVSD_16BIT with value 0x0060 which
> > > seems to be correct as it means Linear Coding, 16-bit without padding
> > > bits, 2's complement and encoded by CVSD codec.
> >
> > Hello, can somebody look at this BT_VOICE_TRANSPARENT definition and
> > verify that it really should be defined as unsigned or 2's complement?
>
> Are you talking about these:
>
> https://elixir.bootlin.com/linux/latest/source/include/net/bluetooth/bluetooth.h#L119
Yes, exactly.
> Which is used in ofono:
>
> https://github.com/DynamicDevices/ofono/blob/master/src/handsfree-audio.c#L93
>
> Afaik these values work as intended with mSBC/WBS.
And I suspect that definition is wrong. mSBC does not use 1's complement
format.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2019-06-07 15:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-19 10:18 Is BT_VOICE_TRANSPARENT correctly defined? Pali Rohár
2019-06-07 12:59 ` Pali Rohár
2019-06-07 15:03 ` Luiz Augusto von Dentz
2019-06-07 15:29 ` Pali Rohár [this message]
2019-10-14 11:07 ` Pali Rohár
2019-10-16 18:57 ` Marcel Holtmann
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=20190607152915.5m2z3gwvlkivr3ms@pali \
--to=pali.rohar@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox