2005-09-24 11:52:19

by Ivy

[permalink] [raw]
Subject: Re: [Bluez-devel] Voice setting for U-law and A-law.




--- Andreas Beck <[email protected]> wrote:
> Ivy <[email protected]> wrote:
> > > > xxxxxxxxxx1xxxxx Input Sample Size: 16 bit (Can i use 8 bit ?)
> > > IMHO you should, if you want alaw/ulaw.
> > You meant to use 16 Bit or 8 bit ?..
>
> 8 bit.
>
> > > > xxxxxxxxxxx010xx # of bits padding at MSB: 2 (if i use 16 Bit,
> > > > 2bit's of MSB is needed for padding, coz only 14bits are enough
> > > > for u-law)
> > > AFAIK 8 bits are enough - could you explain?
> > U-LAW takes 14bits of linear PCM data as input and generates 8 bit
> > compressed data. Am i correct ?
>
> Yes. That is correct.
>
> > Thatswhy i assume that it needs 16 bits for INPUT Sample size and
> > 2 bit offset in MSB position.
>
> No - I suppose this is a misunderstanding about "input".
>
> The SCM link via bluetooth uses its own encoding anyway (see the
> comment about on air coding at the end of the list).
>

SCO LInk via bluetooh uses CVSD encoding...

> INPUT means what you feed in/get out at the driver side.
>
> That is, if you choose alaw, you already feed alaw data.
>
> Otherwise you could just use linear anyway. There would be no use in
> converting to alaw first and then again to the air coding format.
>
> Basically you will want to use alaw/ulaw, if you want to feed the
> received data directly into a device that wants this data format anyway,
> saving unnecessary conversions.
>

xxxxxx01xxxxxxxx Input Coding: u-law
xxxxxxxx01xxxxxx Input Data Format: 2"s complement
xxxxxxxxxx0xxxxx Input Sample Size: 8 bit
xxxxxxxxxxx000xx # of bits padding at MSB: 0
xxxxxxxxxxxxxx00 Air Coding Format: CVSD

0101000000 = 0x140 is the correct value ?. isnt it ?
hciconfig hci0 voice 0x140. Is it necessary to change my USB alternate setting for the above changes ?. Right now it is placed in alternate setting 2. (Endpoint value 17). Thanks for bare with me

Thanks
-IVY



>
> CU, ANdy
>
>
> -------------------------------------------------------
> 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

__________________________
Free 3000MB email. Stops spam 100%. No banner ads. No popup ads. http://www.cashette.com


-------------------------------------------------------
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