2008-08-22 07:36:28

by martin f krafft

[permalink] [raw]
Subject: [Bluez-devel] SCO flowcontrol patch v4.4 on 2.6.25/6 causes hardlocks when connecting to BT device

also sprach martin f krafft <[email protected]> [2008.04.11.0932 +0200]:
> I have just compiled a Debian 2.6.24 with the v4.4 patch: it applied
> and compiled cleanly.
>
> And it works most of the time with my BT500v headset (sco)! Thank
> you for that.

So I used to have a working Bluetooth setup with 2.6.24, and it also
still works. However, the kernel developers have moved on, and even
though the sco-flowcontrol v4.4 patch applies to 2.6.25/6 as well
[0], the resulting 2.6.25 and 2.6.26 kernels both freeze hard when
I try to connect to the headset.

0. http://bugs.debian.org/493098

Does anyone have an idea what could be going on? How can I help
debug this? Is there a newer patch floating around somewhere?

--
martin | http://madduck.net/ | http://two.sentenc.es/

"we did rate the microsoft security researcher as
less-bad than the people who prepare the carcasses for dissection in
biology laboratories."
-- michael moyer, executive editor of _popular science_

spamtraps: [email protected]


Attachments:
(No filename) (0.00 B)
(No filename) (363.00 B)
(No filename) (164.00 B)
Download all attachments

2008-08-27 21:03:14

by martin f krafft

[permalink] [raw]
Subject: Re: [Bluez-devel] btusb+sco failing to play sound through Jabra BT500v headset (was: SCO flowcontrol patch v4.4 on 2.6.25/6 causes) hardlocks when connecting to BT device

also sprach Marcel Holtmann <[email protected]> [2008.08.27.0618 +0100]:
> you don't have to. The bluez-utils-3.36 comes with an audio plugin
> that does all this for you. You just have to add 4 magic lines
> into .asoundrc. See wiki.bluez.org for these for it.

So I added

pcm.bluetooth {
type bluetooth
device 00:1A:45:14:EE:D7
}

to .asoundrc and if I try to play something with aplay, I am told that

Playing WAVE '/usr/share/twinkle/ringback.wav' : Unsigned 8 bit,
Rate 8287 Hz, Mono aplay: set_params:918: Sample format non
available

Trying to use the device with twinkle, the programme starts up
taking ages trying to connect (http://bugs.debian.org/475962) and
eventually just says that it cannot access the speaker/microphone.
When twinkle tries to talk to the headset, the bluetooth LED starts
to blink, the headset makes the
noise it makes when a connection is established, and after a while,
twinkle tells me

snd_pcm_hw_params failed: Invalid argument

and then

snd_pcm_hw_params failed: Input/output error

The bluetooth LED continues blinking and the headset will not make
the disconnection sound until I turn bluetooth off. Once I turn it
back on, the headset disconnects, and the cycle repeats.

I am using 2.6.27-rc4 and bluez-utils 3.36-1.

Any ideas what may be wrong?

--
martin | http://madduck.net/ | http://two.sentenc.es/

"it isn't pollution that's harming the environment.
it's the impurities in our air and water that are doing it."
- dan quayle

spamtraps: [email protected]


Attachments:
(No filename) (0.00 B)
(No filename) (363.00 B)
(No filename) (164.00 B)
Download all attachments

2008-08-27 05:18:53

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] btusb+sco failing to play sound through Jabra BT500v headset (was: SCO flowcontrol patch v4.4 on 2.6.25/6 causes) hardlocks when connecting to BT device

Hi Martin,

>> don't use headsetd. Use the audio stuff that comes with
>> bluez-utils.
>
> The dbus API documented at /usr/share/doc/bluez-utils/audio-api.txt?
> How would I make existing applications speak to that?
>
> Sorry, but dpkg -L bluez-utils (3.36-1) doesn't list anything else
> audio-related. Is the version outdated?

you don't have to. The bluez-utils-3.36 comes with an audio plugin
that does all this for you. You just have to add 4 magic lines
into .asoundrc. See wiki.bluez.org for these for it.

We have native support for ALSA and GStreamer with the audio plugin
and it can either use the headset profile or A2DP. And native
PulseAudio support is in the making :)

Regards

Marcel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-08-26 20:34:51

by martin f krafft

[permalink] [raw]
Subject: Re: [Bluez-devel] btusb+sco failing to play sound through Jabra BT500v headset (was: SCO flowcontrol patch v4.4 on 2.6.25/6 causes) hardlocks when connecting to BT device

also sprach Marcel Holtmann <[email protected]> [2008.08.26.1819 +0100]:
> don't use headsetd. Use the audio stuff that comes with
> bluez-utils.

The dbus API documented at /usr/share/doc/bluez-utils/audio-api.txt?
How would I make existing applications speak to that?

Sorry, but dpkg -L bluez-utils (3.36-1) doesn't list anything else
audio-related. Is the version outdated?

--
martin | http://madduck.net/ | http://two.sentenc.es/

a farmer is a man outstanding in his field.

spamtraps: [email protected]


Attachments:
(No filename) (0.00 B)
(No filename) (363.00 B)
(No filename) (164.00 B)
Download all attachments

2008-08-26 17:19:45

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] btusb+sco failing to play sound through Jabra BT500v headset (was: SCO flowcontrol patch v4.4 on 2.6.25/6 causes) hardlocks when connecting to BT device

Hi Martin,

>> what about not using that patch at all? I am using the new audio
>> interface without that patch. And you wanna use the btusb driver
>> and since 2.6.27-rc4 that one actually has SCO support.
>
> If I had known... :)
>
> Unfortunately, I have not yet succeeded. I modprobed 'sco' and then
> ran headsetd as before, but that just prints
>
> headsetd[9417]: Bluetooth headset daemon version 0.5
> headsetd[9417]: Configuration phase ended: target bdaddr is 00:1A:
> 45:14:EE:D7, timeout is 90000 ms
> headsetd[9417]: Changing state: Idle-->Paging
> headsetd[9417]: Changing state: Paging-->Connecting
> headsetd[9417]: Changing state: Connecting-->Ready
> headsetd[9417]: Changing state: Ready-->Opening

don't use headsetd. Use the audio stuff that comes with bluez-utils.

Regards

Marcel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-08-26 16:35:45

by martin f krafft

[permalink] [raw]
Subject: [Bluez-devel] btusb+sco failing to play sound through Jabra BT500v headset (was: SCO flowcontrol patch v4.4 on 2.6.25/6 causes) hardlocks when connecting to BT device

also sprach Marcel Holtmann <[email protected]> [2008.08.22.0933 +0100]:
> what about not using that patch at all? I am using the new audio
> interface without that patch. And you wanna use the btusb driver
> and since 2.6.27-rc4 that one actually has SCO support.

If I had known... :)

Unfortunately, I have not yet succeeded. I modprobed 'sco' and then
ran headsetd as before, but that just prints

headsetd[9417]: Bluetooth headset daemon version 0.5
headsetd[9417]: Configuration phase ended: target bdaddr is 00:1A:45:14:EE:D7, timeout is 90000 ms
headsetd[9417]: Changing state: Idle-->Paging
headsetd[9417]: Changing state: Paging-->Connecting
headsetd[9417]: Changing state: Connecting-->Ready
headsetd[9417]: Changing state: Ready-->Opening

At this point, the headset makes the sound it makes when
a connection is established, but there is no sound coming from it.

After about 40 seconds, the client says:

aplay: main:564: audio open error: Connection timed out

and headsetd writes:

headsetd[9417]: unable to open SCO channel to headset: Connection timed out
headsetd[9417]: Changing state: Opening-->ZombieAppl
headsetd[9417]: Appli closed socket
headsetd[9417]: Changing state: ZombieAppl-->Idle

So something's still broken... :(

--
martin | http://madduck.net/ | http://two.sentenc.es/

never underestimate the power of human stupidity.

spamtraps: [email protected]


Attachments:
(No filename) (0.00 B)
(No filename) (363.00 B)
(No filename) (164.00 B)
Download all attachments

2008-08-22 08:33:35

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] SCO flowcontrol patch v4.4 on 2.6.25/6 causes hardlocks when connecting to BT device

Hi Martin,

> > I have just compiled a Debian 2.6.24 with the v4.4 patch: it applied
> > and compiled cleanly.
> >
> > And it works most of the time with my BT500v headset (sco)! Thank
> > you for that.
>
> So I used to have a working Bluetooth setup with 2.6.24, and it also
> still works. However, the kernel developers have moved on, and even
> though the sco-flowcontrol v4.4 patch applies to 2.6.25/6 as well
> [0], the resulting 2.6.25 and 2.6.26 kernels both freeze hard when
> I try to connect to the headset.
>
> 0. http://bugs.debian.org/493098
>
> Does anyone have an idea what could be going on? How can I help
> debug this? Is there a newer patch floating around somewhere?

what about not using that patch at all? I am using the new audio
interface without that patch. And you wanna use the btusb driver and
since 2.6.27-rc4 that one actually has SCO support.

Regards

Marcel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-09-08 20:33:19

by martin f krafft

[permalink] [raw]
Subject: Re: [Bluez-devel] "unable to install hw params" to bluetooth (SCO) headset (was: btusb+sco failing to play sound through Jabra BT500v headset)

also sprach Marcel Holtmann <[email protected]> [2008.09.05.1800 +0100]:
> actually I have none. It simply works for me. And I have tested it a
> lot. There are some rare conditions where the btusb driver is off on the
> 16-bit boundaries, but I am looking at a fix for it. However this will
> not disturb the audio service. You just don't here anything.

Where should we go from here? How can I help debug this?

--
martin | http://madduck.net/ | http://two.sentenc.es/

no cat has eight tails.
a cat has one tail more than no cat.
therefore, a cat has nine tails.

spamtraps: [email protected]


Attachments:
(No filename) (0.00 B)
(No filename) (363.00 B)
(No filename) (164.00 B)
Download all attachments

2008-09-05 17:00:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] "unable to install hw params" to bluetooth (SCO) headset (was: btusb+sco failing to play sound through Jabra BT500v headset)

Hi Martin,

> > don't use headsetd. Use the audio stuff that comes with bluez-utils.
>
> So I am trying, and I got a little further, installing the right
> lines into .asoundrc as per
> http://wiki.bluez.org/wiki/HOWTO/AudioDevices. I have gotten beyond
> issues of
>
> bt_audio_service_open: connect() failed: Connection refused (111)
> aplay: main:564: audio open error: Connection refused
>
> but it still doesn't want to work. If I execute
>
> arecord -D bt500v -f S16_LE | aplay -D bt500v -f S16_LE
>
> then the headset makes a noise, the bluetooth LED flashes and
> arecord prints
>
> Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
>
> But then after about 30 or 40 seconds, it all fails:
>
> ALSA lib pcm_bluetooth.c:464:(bluetooth_hsp_hw_params) BT_SETCONFIGURATION failed : Input/output error(5)
> arecord: set_params:979: Unable to install hw params:
> ACCESS: RW_INTERLEAVED
> FORMAT: S16_LE
> SUBFORMAT: STD
> SAMPLE_BITS: 16
> FRAME_BITS: 16
> CHANNELS: 1
> RATE: 8000
> PERIOD_TIME: 125000
> PERIOD_SIZE: 1000
> PERIOD_BYTES: 2000
> PERIODS: 4
> BUFFER_TIME: 500000
> BUFFER_SIZE: 4000
> BUFFER_BYTES: 8000
> TICK_TIME: [0 0]
> aplay: playback:2019: read error
>
> I have bluez-audio installed, but /etc/bluetooth/audio.conf is
> default. No PulseAudio or anything other than plain ALSA here...
>
> Any clues?

actually I have none. It simply works for me. And I have tested it a
lot. There are some rare conditions where the btusb driver is off on the
16-bit boundaries, but I am looking at a fix for it. However this will
not disturb the audio service. You just don't here anything.

Regards

Marcel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-09-05 16:26:54

by martin f krafft

[permalink] [raw]
Subject: [Bluez-devel] "unable to install hw params" to bluetooth (SCO) headset (was: btusb+sco failing to play sound through Jabra BT500v headset)

also sprach Marcel Holtmann <[email protected]> [2008.08.26.1819 +0100]:
> don't use headsetd. Use the audio stuff that comes with bluez-utils.

So I am trying, and I got a little further, installing the right
lines into .asoundrc as per
http://wiki.bluez.org/wiki/HOWTO/AudioDevices. I have gotten beyond
issues of

bt_audio_service_open: connect() failed: Connection refused (111)
aplay: main:564: audio open error: Connection refused

but it still doesn't want to work. If I execute

arecord -D bt500v -f S16_LE | aplay -D bt500v -f S16_LE

then the headset makes a noise, the bluetooth LED flashes and
arecord prints

Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

But then after about 30 or 40 seconds, it all fails:

ALSA lib pcm_bluetooth.c:464:(bluetooth_hsp_hw_params) BT_SETCONFIGURATION failed : Input/output error(5)
arecord: set_params:979: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 2000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 8000
TICK_TIME: [0 0]
aplay: playback:2019: read error

I have bluez-audio installed, but /etc/bluetooth/audio.conf is
default. No PulseAudio or anything other than plain ALSA here...

Any clues?

--
martin | http://madduck.net/ | http://two.sentenc.es/

"alas, i am dying beyond my means."
-- oscar wilde

spamtraps: [email protected]


Attachments:
(No filename) (0.00 B)
(No filename) (363.00 B)
(No filename) (164.00 B)
Download all attachments