2005-09-14 07:51:06

by Luca Pizzamiglio

[permalink] [raw]
Subject: [Bluez-devel] SCO & btsco

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi to all.

I'm using btsco with a headset and it works very well.
Now I'm trying to record audio from another bt device (es. a phone):
using socket SCO interface I read data and I write it in a file (sound.raw);
I'm trying to understand what audio formats I receive.

bt specification says that bluetooth supports three audio formats:
- - CVSD
- - u-law
- - a-law

hciconfig hci0 voice command reports:

hci0: Type: USB
BD Address: 00:09:DD:10:4C:C6 ACL MTU: 192:8 SCO MTU: 64:8
Voice setting: 0x0060 (Default Condition)
Input Coding: Linear
Input Data Format: 2's complement
Input Sample Size: 16 bit
# of bits padding at MSB: 0
Air Coding Format: CVSD

I see from btsco sources that btsco support only mu-law format (it is a
comment), but the code check if voice setting is equal to 0x0060 (CVSD).
So, btsco support CVSD? There's a CVSD codec in btsco source code or I
have to implement a Bluez CVSD codec?

Cheers,
Pizza

- -------------------------------------------
Luca Pizzamiglio
CEFRIEL - Embedded Systems Design Unit
Via Fucini, 2 - 20133 MILANO (ITALY)
Phone: +39 02 23954 343
e-mail: [email protected]
ICQ: 5046978
- -------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDJ9ZqAoUy56ORfbERAiCgAJ99Bu1+gXGwGnaoigrmtlQCziMWJQCfVtMc
K7t5kgaiP17l2Q4uivDMQvE=
=KAmk
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-09-14 13:21:23

by Luca Pizzamiglio

[permalink] [raw]
Subject: Re: [Bluez-devel] SCO & btsco

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks, Steven.
I'm sorry for confusion I created.

with sox:

sox -t raw -r 8000 -s -w sound.raw pippo.wav

I build a transformation chain that works.

Thank you.

Cheers,
Pizza


Steven Singer wrote:
> Luca Pizzamiglio wrote:
>
>>bt specification says that bluetooth supports three audio formats:
>>- CVSD
>>- u-law
>>- a-law
>
>
> That's not what the BT spec says, you need to read it more carefully.
>
> BT supports 3 *air* formats: u-law, A-law and CVSD, however, that's
> irrelevant as far as interfacing with the chip is concerned as the
> chip will transcode to and from those formats from and to the HCI
> format (aka the input format).
>
> BT supports the following HCI formats:
>
> 2's complement linear
> 1's complement linear
> sign-magnitude
> unsigned (some devices only)
> u-law
> A-law
>
> The linear formats can be 8 bit, 16 bit or 9..15 bit right aligned
> in a 16 bit word.
>
> The default format - 0x0060 - is CVSD on the air and 16 bit 2's
> complement linear signed on the wire as the output of hciconfig
> clearly states.
>
> Always keep the air format set to CVSD (as the two sides need to agree
> on the air format in order to be able to make a connection and most,
> if not all, Bluetooth devices are set up for CVSD). Make the HCI
> format whatever your program supports.
>
> - Steven


- --
- -------------------------------------------
Luca Pizzamiglio
CEFRIEL - Embedded Systems Design Unit
Via Fucini, 2 - 20133 MILANO (ITALY)
Phone: +39 02 23954 343
e-mail: [email protected]
ICQ: 5046978
- -------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDKCPTAoUy56ORfbERAv+XAKCjAVKqVVugB0wTSZFMMjQPFGcIQwCgtdr7
XyCn4ayjOeATXi0ckPA0Njk=
=6h94
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-09-14 11:36:21

by Steven Singer

[permalink] [raw]
Subject: Re: [Bluez-devel] SCO & btsco

Luca Pizzamiglio wrote:
> bt specification says that bluetooth supports three audio formats:
> - CVSD
> - u-law
> - a-law

That's not what the BT spec says, you need to read it more carefully.

BT supports 3 *air* formats: u-law, A-law and CVSD, however, that's
irrelevant as far as interfacing with the chip is concerned as the
chip will transcode to and from those formats from and to the HCI
format (aka the input format).

BT supports the following HCI formats:

2's complement linear
1's complement linear
sign-magnitude
unsigned (some devices only)
u-law
A-law

The linear formats can be 8 bit, 16 bit or 9..15 bit right aligned
in a 16 bit word.

The default format - 0x0060 - is CVSD on the air and 16 bit 2's
complement linear signed on the wire as the output of hciconfig
clearly states.

Always keep the air format set to CVSD (as the two sides need to agree
on the air format in order to be able to make a connection and most,
if not all, Bluetooth devices are set up for CVSD). Make the HCI
format whatever your program supports.

- Steven
--


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel