From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: From: Mikael Bengtsson To: BlueZ development Date: Thu, 6 Sep 2007 13:03:17 +0200 In-Reply-To: <1187957213.15402.137.camel@violet> References: <076BF2A0-A0AF-44B5-9A4D-2BC3EBBE2940@cadvium.net> <1187957213.15402.137.camel@violet> MIME-Version: 1.0 Subject: Re: [Bluez-devel] SCO Question Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0216044624==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============0216044624== Content-Type: multipart/alternative; boundary="_956886a9-23f5-45ed-8665-da668a52aff2_" --_956886a9-23f5-45ed-8665-da668a52aff2_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have now redirected SCO to ALSA. I setup ALSA as a player, that is, sound= shall be played on the soundcard. The hardest part in ALSA was to set the = correct number of frames and number of periods, but with the help of tutori= als on the web it worked out. =20 Now I have set up ALSA to play 32 frames, 2 periods, mono, 8 kHz, S16_LE (s= igned 16 bits little endian on my Intel XScale PXA255). This means 64 bytes= of data (one frame =3D one sample is 2 bytes when mono). This corresponds = to sound from SCO. =20 Unfortunately, on my system SCO delivers only 60 bytes of data per read ope= ration, HV3 delivers 30 bytes in one package, which doesn't add up with the= soundcard. The soundcard (AC97-based) wants 16, 32, 64 bytes and so on. Th= erefore the sound isn't of good quality. On other soundcards it may be poss= ible to set a frame size which corresponds exactly to SCO. =20 I think I will have to do some buffering from SCO before allowing ALSA to p= lay sound.=20 =20 -Mikael > From: marcel@holtmann.org> To: bluez-devel@lists.sourceforge.net> Date: F= ri, 24 Aug 2007 14:06:53 +0200> Subject: Re: [Bluez-devel] SCO Question> > = Hi Robert,> > > How would I go about redirecting incoming SCO data to an al= sa device, > > and transmit incoming audio data out as SCO?> > > > I have r= ead the following pages,> > http://wiki.bluez.org/wiki/Audio> > http://wiki= .bluez.org/wiki/HOWTO/AudioDevices> > > > but everything described seems to= do too much. I would prefer to > > handle the RFCOMM channel, and SDP regi= stration elsewhere. > > Presently, I just want to determine how to redirect= the SCO traffic.> > actually you can't really do SCO without a profile. In= theory you can,> but that is to compatible with out devices. Since this ki= nd of> application doesn't really make sense for most people we didn't focu= s on> it and so nothing like that is available. However hstest.c and other = SCO> demos can be used to quickly write something like that. The hardest pa= rt> is to get the ALSA thing right. Again, you have to write that by> yours= elf since we have no need for this right now.> > Regards> > Marcel> > > > -= ------------------------------------------------------------------------> T= his SF.net email is sponsored by: Splunk Inc.> Still grepping through log f= iles to find problems? Stop.> Now Search log events and configuration files= using AJAX and a browser.> Download your FREE copy of Splunk now >> http:/= /get.splunk.com/> _______________________________________________> Bluez-de= vel mailing list> Bluez-devel@lists.sourceforge.net> https://lists.sourcefo= rge.net/lists/listinfo/bluez-devel _________________________________________________________________ Nu kan du f=E5r Messenger i mobilen, l=E4s mer! http://www.mobil.msn.se/= --_956886a9-23f5-45ed-8665-da668a52aff2_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have now redirected SCO to ALSA. I setup ALSA as a player, that is, sound= shall be played on the soundcard. The hardest part in ALSA was to set the = correct number of frames and number of periods, but with the help of tutori= als on the web it worked out.
 
Now I have set up ALSA to play 32 frames, 2 periods, mono, 8 kHz, S16_LE (s= igned 16 bits little endian on my Intel XScale PXA255). This means 64 bytes= of data (one frame =3D one sample is 2 bytes when mono). This corresponds = to sound from SCO.
 
Unfortunately, on my system SCO delivers only 60 bytes of data per read ope= ration, HV3 delivers 30 bytes in one package, which doesn't add u= p with the soundcard. The soundcard (AC97-based) wants 16, 32, 64 bytes and= so on. Therefore the sound isn't of good quality. On other soundcards it m= ay be possible to set a frame size which corresponds exactly to SCO.
 
I think I will have to do some buffering from SCO before allowing ALSA to p= lay sound.
 
-Mikael

> From: marcel@holtmann.org
> To: bluez-devel@lists.sourceforg= e.net
> Date: Fri, 24 Aug 2007 14:06:53 +0200
> Subject: Re: [B= luez-devel] SCO Question
>
> Hi Robert,
>
> > = How would I go about redirecting incoming SCO data to an alsa device,
&= gt; > and transmit incoming audio data out as SCO?
> >
>= > I have read the following pages,
> > http://wiki.bluez.org/w= iki/Audio
> > http://wiki.bluez.org/wiki/HOWTO/AudioDevices
>= ; >
> > but everything described seems to do too much. I would= prefer to
> > handle the RFCOMM channel, and SDP registration el= sewhere.
> > Presently, I just want to determine how to redirect = the SCO traffic.
>
> actually you can't really do SCO without = a profile. In theory you can,
> but that is to compatible with out de= vices. Since this kind of
> application doesn't really make sense for= most people we didn't focus on
> it and so nothing like that is avai= lable. However hstest.c and other SCO
> demos can be used to quickly = write something like that. The hardest part
> is to get the ALSA thin= g right. Again, you have to write that by
> yourself since we have no= need for this right now.
>
> Regards
>
> Marcel<= BR>>
>
>
> ----------------------------------------= ---------------------------------
> This SF.net email is sponsored by= : Splunk Inc.
> Still grepping through log files to find problems? St= op.
> Now Search log events and configuration files using AJAX and a = browser.
> Download your FREE copy of Splunk now >> http://get.= splunk.com/
> _______________________________________________
>= Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
>= https://lists.sourceforge.net/lists/listinfo/bluez-devel



Skapa ditt personliga s=F6kdjur och g=F6r dina s=F6kningar lite roligare = med SearchPet! SearchP= et = --_956886a9-23f5-45ed-8665-da668a52aff2_-- --===============0216044624== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============0216044624== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============0216044624==--