public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] skype and bluetooth
@ 2007-05-14 17:14 John H.
  2007-05-14 18:02 ` John H.
  2007-05-15  0:00 ` Robert Huitl
  0 siblings, 2 replies; 10+ messages in thread
From: John H. @ 2007-05-14 17:14 UTC (permalink / raw)
  To: BlueZ development

Hi,

Motorola h700.

I have plugz installed, and the corresponding asound.conf from it.

fc6 and headset paired.

I tell new alpha skype 1.4 to use headset for in, out and ring(as
headsetd is running)

When i try test call, it says problem with audio playback?  However,
the headset beeps at this time, so there's definitely some kind of
communication.

What to do?  Am I supposed to be using hijacker?

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-14 17:14 [Bluez-devel] skype and bluetooth John H.
@ 2007-05-14 18:02 ` John H.
  2007-05-15  0:00 ` Robert Huitl
  1 sibling, 0 replies; 10+ messages in thread
From: John H. @ 2007-05-14 18:02 UTC (permalink / raw)
  To: BlueZ development

Here's the output of headsetd, which "connects" after i hit button on
headset, but the rest is what outputs when I try to use skype with it.


headsetd -n
headsetd[20485]: Bluetooth headset daemon version 0.5
headsetd[20485]: Incoming RFCOMM hs connection from 00:16:8F:F9:97:BB accepted
headsetd[20485]: Changing state: Idle-->Connected
headsetd[20485]: Changing state: Connected-->Ready
headsetd[20485]: Changing state: Ready-->Opening
headsetd[20485]: SCO channel opened handle=0x0031 mtu=64
headsetd[20485]: Changing state: Opening-->Streaming
headsetd[20485]: Appli closed socket
headsetd[20485]: Changing state: Streaming-->Zombie
headsetd[20485]: Changing state: Zombie-->Streaming
headsetd[20485]: Appli closed socket
headsetd[20485]: Changing state: Streaming-->Zombie
headsetd[20485]: Changing state: Zombie-->Streaming
headsetd[20485]: Appli closed socket
headsetd[20485]: Changing state: Streaming-->Zombie
headsetd[20485]: Changing state: Zombie-->Streaming
headsetd[20485]: Appli closed socket
headsetd[20485]: Changing state: Streaming-->Zombie
headsetd[20485]: Changing state: Zombie-->Streaming
headsetd[20485]: Appli closed socket
headsetd[20485]: Changing state: Streaming-->Zombie
headsetd[20485]: Changing state: Zombie-->Streaming
headsetd[20485]: Appli closed socket
headsetd[20485]: Changing state: Streaming-->Zombie
headsetd[20485]: Changing state: Zombie-->Streaming
headsetd[20485]: Appli closed socket
headsetd[20485]: Changing state: Streaming-->Zombie
headsetd[20485]: Nobody uses SCO channel anymore, closing it.
headsetd[20485]: Changing state: Zombie-->Connected


On 5/14/07, John H. <mistamaila@gmail.com> wrote:
> Hi,
>
> Motorola h700.
>
> I have plugz installed, and the corresponding asound.conf from it.
>
> fc6 and headset paired.
>
> I tell new alpha skype 1.4 to use headset for in, out and ring(as
> headsetd is running)
>
> When i try test call, it says problem with audio playback?  However,
> the headset beeps at this time, so there's definitely some kind of
> communication.
>
> What to do?  Am I supposed to be using hijacker?
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-14 17:14 [Bluez-devel] skype and bluetooth John H.
  2007-05-14 18:02 ` John H.
@ 2007-05-15  0:00 ` Robert Huitl
  2007-05-15  0:16   ` Robert Huitl
  2007-05-15 20:22   ` Robert Huitl
  1 sibling, 2 replies; 10+ messages in thread
From: Robert Huitl @ 2007-05-15  0:00 UTC (permalink / raw)
  To: BlueZ development

On Montag, 14. Mai 2007, John H. wrote:
> Motorola h700.

Jabra BT.620S here

> I have plugz installed, and the corresponding asound.conf from it.
>
> fc6 and headset paired.
>
> I tell new alpha skype 1.4 to use headset for in, out and ring(as
> headsetd is running)
>
> When i try test call, it says problem with audio playback?  However,
> the headset beeps at this time, so there's definitely some kind of
> communication.

I can confirm this problem with Skype 1.4 Build 58. I tried setting only one 
of the devices to use headsetd, but it works for neither playback nor 
capturing.

I noticed that Skype seems to probe all devices when I initiate a call, 
because headsetd establishes a connection even though all three (input, 
output, ringing) devices are set to "default" (i.e. the internal sound card).

> What to do?  Am I supposed to be using hijacker?

I tried to get headsetd working with other programs, for example arecord. This 
might point to a problem with headsetd not supporting the sample format Skype 
requests:

$ arecord -Dheadset-sco
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
arecord: set_params:900: Sample format non available

Trying a different sample format reminds me of a kernel patch you can find on 
this list. It is required for reliable SCO communication:

$ arecord -Dheadset-sco -f s16_le
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
ALSA lib pcm_sco.c:277:(sco_headset_hw_params) Unable to set number of SCO 
buffers : please upgrade your Kernel !
arecord: set_params:961: Unable to install hw params:
[...]

In both cases arecord fails to use the headsetd sound device.

So either
1) Skype tries to use a sample format that is not supported at all or
2) the sample format is okay but it fails because of the missing kernel patch
3) there's some other problem ;-)

You could try the patch to see if it helps.

Regards,
  Robert

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-15  0:00 ` Robert Huitl
@ 2007-05-15  0:16   ` Robert Huitl
  2007-05-15 20:22   ` Robert Huitl
  1 sibling, 0 replies; 10+ messages in thread
From: Robert Huitl @ 2007-05-15  0:16 UTC (permalink / raw)
  To: BlueZ development

On Dienstag, 15. Mai 2007, Robert Huitl wrote:
> So either
> 1) Skype tries to use a sample format that is not supported at all or
> 2) the sample format is okay but it fails because of the missing kernel
> patch 3) there's some other problem ;-)
>
> You could try the patch to see if it helps.

Okay I just tried the patch myself. arecord works fine with the s16_le sample 
format, but Skype does not.

Robert

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-15  0:00 ` Robert Huitl
  2007-05-15  0:16   ` Robert Huitl
@ 2007-05-15 20:22   ` Robert Huitl
  2007-05-15 21:20     ` Tim Chick
  1 sibling, 1 reply; 10+ messages in thread
From: Robert Huitl @ 2007-05-15 20:22 UTC (permalink / raw)
  To: BlueZ development

Okay after some debugging I know what the problem is.

On Dienstag, 15. Mai 2007, Robert Huitl wrote:
> 1) Skype tries to use a sample format that is not supported at all or

Skype uses the sample format SND_PCM_FORMAT_S16_LE which is supported by the 
pcm_sco plugin, but it also requests a sampling rate of 48 KHz, which is not.

Having patched alsa-lib to trace the calls to snd_pcm_hw_params_set_rate*(), I 
get the following output when I try to initiate a call:

DEBUG: snd_pcm_hw_params_set_rate_near(48000)
DEBUG: snd_pcm_hw_params_set_rate(48000)
[pause]
DEBUG: snd_pcm_hw_params_set_rate(48000)
[error message appears]

When I change SCO_RATE in pcm_sco.c from 8000 to 48000 and set the headset as 
the input device only, Skype goes past the "problem with audio" message (the 
recorded sound is garbage, of course).

So to conclude,
1.) 48 kHz is, to say the least, a rather high value for sampling from a 
microphone. This is probably not intended by Skype and might just very well 
be a bug as it's an alpha version.

2.) Offering more sampling rates than 8 kHz would be nice to have, but I'm not 
familiar with the design philosophies around ALSA. It's probably not a good 
idea to implement resampling in each and every sound plugin like pcm_sco. 
Does ALSA have some resampling facilities that can be plugged in between an 
application and a plugin? Maybe some magic lines in .asoundrc?

Regards,
  Robert

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-15 20:22   ` Robert Huitl
@ 2007-05-15 21:20     ` Tim Chick
  2007-05-16  0:21       ` Robert Huitl
  0 siblings, 1 reply; 10+ messages in thread
From: Tim Chick @ 2007-05-15 21:20 UTC (permalink / raw)
  To: bluez-devel

On Tuesday 15 May 2007 21:22, Robert Huitl wrote:
> Okay after some debugging I know what the problem is.
> 2.) Offering more sampling rates than 8 kHz would be nice to have, but I'm
> not familiar with the design philosophies around ALSA. It's probably not a
> good idea to implement resampling in each and every sound plugin like
> pcm_sco. Does ALSA have some resampling facilities that can be plugged in
> between an application and a plugin? Maybe some magic lines in .asoundrc?
>
I do this with a2dp, I'm sure the same could apply to sco.
I use an .asoundrc file which looks like this:

pcm.a2dpd {
=A0=A0=A0=A0=A0=A0=A0=A0type a2dpd
}

pcm.rs0 {
=A0=A0=A0=A0=A0=A0=A0=A0type plug
=A0=A0=A0=A0=A0=A0=A0=A0slave {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pcm "a2dpd"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0rate 44100
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0format S16_LE
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0channels 2
=A0=A0=A0=A0=A0=A0=A0=A0}
}

pcm.!default {
=A0=A0=A0=A0=A0=A0=A0=A0type plug
=A0=A0=A0=A0=A0=A0=A0=A0slave.pcm "rs0"
}

----

It will resample the audio given to the a2dp plugin so it is always 44.1kHz.

Cheers,
Tim


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-15 21:20     ` Tim Chick
@ 2007-05-16  0:21       ` Robert Huitl
  2007-05-16  2:26         ` John H.
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Huitl @ 2007-05-16  0:21 UTC (permalink / raw)
  To: bluez-devel

On Dienstag, 15. Mai 2007, you wrote:
> On Tuesday 15 May 2007 21:22, Robert Huitl wrote:
> > Okay after some debugging I know what the problem is.
> > 2.) Offering more sampling rates than 8 kHz would be nice to have, but
> > I'm not familiar with the design philosophies around ALSA. It's probably
> > not a good idea to implement resampling in each and every sound plugin
> > like pcm_sco. Does ALSA have some resampling facilities that can be
> > plugged in between an application and a plugin? Maybe some magic lines in
> > .asoundrc?
>
> I do this with a2dp, I'm sure the same could apply to sco.
> I use an .asoundrc file which looks like this:

Thanks a lot for this configuration. I got Skype running with it, even though 
it's freezing almost always when I call the echo test service (and both input 
and output are set to headset-sco-resample). But in a few cases it actually 
worked very nicely.

However, if only input _or_ output is set to the headset device, it's quite 
stable. So recording is fine, playback is fine, but both of them at a time 
freeze Skype.

For reference, this is my .asoundrc:

pcm.headset-sco-resample {
        type plug
        slave {
                pcm "headset-sco"
                rate 8000
                format S16_LE
                channels 1
        }
}
pcm.headset-sco {
        @args [BDADDR TIMEOUT]
        @args.BDADDR {
                type string
                default "xx:xx:xx:xx:xx:xx" # Put your HS address here
        }
        @args.TIMEOUT {
                type integer
                default 6000
        }
        type        sco
        bdaddr      $BDADDR
        timeout     $TIMEOUT
}

Might be some problem with ALSA, though.

Regards,
  Robert

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-16  0:21       ` Robert Huitl
@ 2007-05-16  2:26         ` John H.
  2007-05-16  8:02           ` Robert Huitl
  0 siblings, 1 reply; 10+ messages in thread
From: John H. @ 2007-05-16  2:26 UTC (permalink / raw)
  To: BlueZ development

Did you have to use the kernel patch?  I am trying to get h700 working
with skype without patching kernel.


On 5/15/07, Robert Huitl <bluez-devel@huitl.de> wrote:
> On Dienstag, 15. Mai 2007, you wrote:
> > On Tuesday 15 May 2007 21:22, Robert Huitl wrote:
> > > Okay after some debugging I know what the problem is.
> > > 2.) Offering more sampling rates than 8 kHz would be nice to have, but
> > > I'm not familiar with the design philosophies around ALSA. It's probably
> > > not a good idea to implement resampling in each and every sound plugin
> > > like pcm_sco. Does ALSA have some resampling facilities that can be
> > > plugged in between an application and a plugin? Maybe some magic lines in
> > > .asoundrc?
> >
> > I do this with a2dp, I'm sure the same could apply to sco.
> > I use an .asoundrc file which looks like this:
>
> Thanks a lot for this configuration. I got Skype running with it, even though
> it's freezing almost always when I call the echo test service (and both input
> and output are set to headset-sco-resample). But in a few cases it actually
> worked very nicely.
>
> However, if only input _or_ output is set to the headset device, it's quite
> stable. So recording is fine, playback is fine, but both of them at a time
> freeze Skype.
>
> For reference, this is my .asoundrc:
>
> pcm.headset-sco-resample {
>         type plug
>         slave {
>                 pcm "headset-sco"
>                 rate 8000
>                 format S16_LE
>                 channels 1
>         }
> }
> pcm.headset-sco {
>         @args [BDADDR TIMEOUT]
>         @args.BDADDR {
>                 type string
>                 default "xx:xx:xx:xx:xx:xx" # Put your HS address here
>         }
>         @args.TIMEOUT {
>                 type integer
>                 default 6000
>         }
>         type        sco
>         bdaddr      $BDADDR
>         timeout     $TIMEOUT
> }
>
> Might be some problem with ALSA, though.
>
> Regards,
>   Robert
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-16  2:26         ` John H.
@ 2007-05-16  8:02           ` Robert Huitl
  2007-05-16 21:37             ` John H.
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Huitl @ 2007-05-16  8:02 UTC (permalink / raw)
  To: bluez-devel

On Mittwoch, 16. Mai 2007, John H. wrote:
> Did you have to use the kernel patch?  I am trying to get h700 working
> with skype without patching kernel.

I did not test again without the patch. But it's strongly recommended to have 
it applied for using SCO.

Regards,
  Robert

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Bluez-devel] skype and bluetooth
  2007-05-16  8:02           ` Robert Huitl
@ 2007-05-16 21:37             ` John H.
  0 siblings, 0 replies; 10+ messages in thread
From: John H. @ 2007-05-16 21:37 UTC (permalink / raw)
  To: BlueZ development

Will 2.6.21 final still require the patch?

On 5/16/07, Robert Huitl <bluez-devel@huitl.de> wrote:
> On Mittwoch, 16. Mai 2007, John H. wrote:
> > Did you have to use the kernel patch?  I am trying to get h700 working
> > with skype without patching kernel.
>
> I did not test again without the patch. But it's strongly recommended to have
> it applied for using SCO.
>
> Regards,
>   Robert
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-05-16 21:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-14 17:14 [Bluez-devel] skype and bluetooth John H.
2007-05-14 18:02 ` John H.
2007-05-15  0:00 ` Robert Huitl
2007-05-15  0:16   ` Robert Huitl
2007-05-15 20:22   ` Robert Huitl
2007-05-15 21:20     ` Tim Chick
2007-05-16  0:21       ` Robert Huitl
2007-05-16  2:26         ` John H.
2007-05-16  8:02           ` Robert Huitl
2007-05-16 21:37             ` John H.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox