2007-10-20 02:10:24

by KyoYin

[permalink] [raw]
Subject: Re: [Bluez-devel] bluetooth headset not working



hi johan

>Actually bluetoothd-service-audio takes care of both A2DP and HSP.
>Unless you specified explicitly the profile to use in your .asoundrc
>(e.g. "profile a2dp") the selection process goes as such that A2DP is
>used if available and otherwise HSP.

Do u mean the bluetoothd-service-audio will read .asoundrc?
could you tell me how to write .asoundrc if i want to use a2dp and
hsp.now my .asoundrc is:

pcm.headset {
type bluetooth
}

ctl.headset {
type bluetooth
}

pcm.bluetooth {
type bluetooth
device 00:0D:3C:EB:53:F0
}

when i use "aplay -D bluetooth -f S16_LE /1.wav ",i will get the following
error.


audio[837]: Accepted new client connection on unix socket (fd=7)
audio[837]: Package PKT_TYPE_CFG_REQ:0
audio[837]: avdtp_ref(0x37ef8): ref=2
audio[837]: a2dp_source_request_stream: selected SEP 0x376b8
audio[837]: avdtp_ref(0x37ef8): ref=3
hcid[825]: link_key_request (sba=00:80:E1:00:AB:BA, dba=00:0D:3C:EB:53:F0)
hcid[825]: pin_code_request (sba=00:80:E1:00:AB:BA, dba=00:0D:3C:EB:53:F0)
hcid[825]: link_key_notify (sba=00:80:E1:00:AB:BA, dba=00:0D:3C:EB:53:F0)
audio[837]: AVDTP: connected signaling channel to 00:0D:3C:EB:53:F0
audio[837]: session_cb
audio[837]: DISCOVER request succeeded
audio[837]: seid 1 type 1 media 0 in use 0
audio[837]: seid 2 type 1 media 0 in use 0
audio[837]: session_cb
audio[837]: GET_CAPABILITIES request succeeded
audio[837]: seid 1 type 1 media 0
hcid[825]: link_key_request (sba=00:80:E1:00:AB:BA, dba=00:0D:3C:EB:53:F0)
audio[837]: session_cb
audio[837]: GET_CAPABILITIES request succeeded
audio[837]: seid 2 type 1 media 0
audio[837]: Discovery complete
audio[837]: avdtp_set_configuration(0x37ef8): int_seid=1, acp_seid=1
audio[837]: session_cb
audio[837]: SET_CONFIGURATION request succeeded
audio[837]: SBC Source: Set_Configuration_Cfm
audio[837]: avdtp_ref(0x37ef8): ref=4
audio[837]: stream state changed: IDLE -> CONFIGURED
audio[837]: session_cb
audio[837]: OPEN request succeeded
audio[837]: stream state changed: CONFIGURED -> OPEN
audio[837]: AVDTP: connected transport channel to 00:0D:3C:EB:53:F0
audio[837]: SBC Source: Open_Cfm
audio[837]: session_cb
audio[837]: START request succAlignment trap: bluetoothd-serv (837)
PC=0x0001ce50 Instr=0xe1c320b0 Address=0xbe871a89 FSR 0x813
eeded
audio[837]: SBC Source: Start_Cfm
audio[837]: SBC Source SEP 0x376b8 locked
hcid[825]: Service owner exited: :1.1
hcid[825]: Removing record with handle 0x10000
hcid[825]: Service classes 0x08
hcid[825]: Removing record with handle 0x10001
hcid[825]: Service classes 0x00
aplay: main:546: audio open error: Input/output error
hcid[825]: Audio service (audio) was killed by signal 7
/ $ hcid[825]: link_key_request (sba=00:80:E1:00:AB:BA,
dba=00:0D:3C:EB:53:F0)
hcid[825]: link_key_request (sba=00:80:E1:00:AB:BA, dba=00:0D:3C:EB:53:F0)

i do not know the reason,and i have used alsa-lib-1.0.15/alsa-utils-1.0.15
/dbus-1.02/dbus-glib-0.74/glib-2.12.13/blueZ-lib-3.20/blueZ-utils-3.20
if i lack some lib?or my configure is wrong?

thanks


kyo



|---------+----------------------------------------->
| | Johan Hedberg |
| | <[email protected]> |
| | Sent by: |
| | [email protected]|
| | ceforge.net |
| | |
| | |
| | 2007-10-20 00:42 |
| | Please respond to BlueZ |
| | development |
| | |
|---------+----------------------------------------->
>-------------------------------------------------------------------------------------------------------------------------------|
| |
| To: BlueZ development <[email protected]> |
| cc: |
| Subject: Re: [Bluez-devel] bluetooth headset not working |
>-------------------------------------------------------------------------------------------------------------------------------|





On Oct 19, 2007, at 19:03, Jim Carter wrote:
> I've seen a similar message when I didn't have bluetoothd-service-
> audio
> configured to autostart and forgot to start it manually. Do you
> have the
> corresponding protocol/profile daemon running? I don't have my laptop
> handy to look up the name of this daemon but I think it's
> bluetoothd-service-sco.

Actually bluetoothd-service-audio takes care of both A2DP and HSP.
Unless you specified explicitly the profile to use in your .asoundrc
(e.g. "profile a2dp") the selection process goes as such that A2DP is
used if available and otherwise HSP.

Johan

-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel




-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2007-10-23 10:02:06

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] bluetooth headset not working


On Oct 23, 2007, at 10:53, [email protected] wrote:
> the crash of bluetoothd-service-audio has been resolved now.i
> think it is a bug.in avdtp_stream_get_transport(),the mtu pointer
> will be unaccessible.
> In a2dp_setup_complete(),avdtp_stream_get_transport() wants to pass
> the address of cfg->pkt_len.but the cfg is a packed struct.so the
> normal pointer of uint16(pointer mtu in avdtp_stream_get_transport
> is this type) should not be used here.of cause my cpu is arm.

Thanks for this info. It should now be fixed in the CVS.

Johan


-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-10-23 07:53:55

by KyoYin

[permalink] [raw]
Subject: Re: [Bluez-devel] bluetooth headset not working

hi Johan
the crash of bluetoothd-service-audio has been resolved now.i think it
is a bug.in avdtp_stream_get_transport(),the mtu pointer will be
unaccessible.
In a2dp_setup_complete(),avdtp_stream_get_transport() wants to pass the
address of cfg->pkt_len.but the cfg is a packed struct.so the normal
pointer of uint16(pointer mtu in avdtp_stream_get_transport is this type)
should not be used here.of cause my cpu is arm.


thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kyo Yin(Jian)
MXIC Technology Co.,Ltd.
NO.5, Xinhai street, Suzhou Industrial Park
Tel: 86-512-87650888-3463
E-Mail: [email protected]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Johan Hedberg <[email protected]>
Sent by: [email protected]
2007-10-23 00:22
Please respond to
BlueZ development <[email protected]>


To
BlueZ development <[email protected]>
cc

Subject
Re: [Bluez-devel] bluetooth headset not working






(resending since the first try seems to have gotten stuck somewhere
between gmail and sourceforge)

On Oct 20, 2007, at 5:10, [email protected] wrote:
> Do u mean the bluetoothd-service-audio will read .asoundrc?

No. The values in .asoundrc are given to the bluetooth alsa plugin
which then passes them over to the audio service using a unix socket.

> could you tell me how to write .asoundrc if i want to use
> a2dp and
> hsp.now my .asoundrc is:
>
> pcm.headset {
> type bluetooth
> }
>
> ctl.headset {
> type bluetooth
> }
>
> pcm.bluetooth {
> type bluetooth
> device 00:0D:3C:EB:53:F0
> }

If you want to have one alsa device for A2DP and another for HSP it
might be a good idea to explicitly state the profile you want to use
for each device. You do this by providing a line such as "profile
a2dp" in addition to the device and type lines. I just checked the
code and the plugin will map "hifi" and "a2dp" to A2DP and "voice"
and "hfp" to HSP (it's actually a bug that it doesn't recognize "hsp").

> when i use "aplay -D bluetooth -f S16_LE /1.wav ",i will get the
> following
> error.
<snip>
> audio[837]: START request succAlignment trap: bluetoothd-serv (837)
> PC=0x0001ce50 Instr=0xe1c320b0 Address=0xbe871a89 FSR 0x813
> eeded
> audio[837]: SBC Source: Start_Cfm
> audio[837]: SBC Source SEP 0x376b8 locked
> hcid[825]: Service owner exited: :1.1

Looks like the audio service crashed. What architecture are you
running this on and what compiler did you use? It would be good if
you could try to reproduce this by running bluetoothd-audio-service
through valgrind or gdb and get a proper backtrace of the crash. To
do this remove the /etc/bluetooth/audio.service file (hcid should
detect this and unregister the service but if it doesn't you need to
restart hcid), and run "/usr/lib/bluetooth/bluetoothd-service-audio -
s" either through gdb or valgrind.

Johan


-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


Attachments:
(No filename) (314.00 B)
(No filename) (164.00 B)
Download all attachments

2007-10-23 07:13:08

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] bluetooth headset not working

(resending since the first try seems to have gotten stuck somewhere
between gmail and sourceforge)

On Oct 20, 2007, at 5:10, [email protected] wrote:
> Do u mean the bluetoothd-service-audio will read .asoundrc?

No. The values in .asoundrc are given to the bluetooth alsa plugin
which then passes them over to the audio service using a unix socket.

> could you tell me how to write .asoundrc if i want to use
> a2dp and
> hsp.now my .asoundrc is:
>
> pcm.headset {
> type bluetooth
> }
>
> ctl.headset {
> type bluetooth
> }
>
> pcm.bluetooth {
> type bluetooth
> device 00:0D:3C:EB:53:F0
> }

If you want to have one alsa device for A2DP and another for HSP it
might be a good idea to explicitly state the profile you want to use
for each device. You do this by providing a line such as "profile
a2dp" in addition to the device and type lines. I just checked the
code and the plugin will map "hifi" and "a2dp" to A2DP and "voice"
and "hfp" to HSP (it's actually a bug that it doesn't recognize "hsp").

> when i use "aplay -D bluetooth -f S16_LE /1.wav ",i will get the
> following
> error.
<snip>
> audio[837]: START request succAlignment trap: bluetoothd-serv (837)
> PC=0x0001ce50 Instr=0xe1c320b0 Address=0xbe871a89 FSR 0x813
> eeded
> audio[837]: SBC Source: Start_Cfm
> audio[837]: SBC Source SEP 0x376b8 locked
> hcid[825]: Service owner exited: :1.1

Looks like the audio service crashed. What architecture are you
running this on and what compiler did you use? It would be good if
you could try to reproduce this by running bluetoothd-audio-service
through valgrind or gdb and get a proper backtrace of the crash. To
do this remove the /etc/bluetooth/audio.service file (hcid should
detect this and unregister the service but if it doesn't you need to
restart hcid), and run "/usr/lib/bluetooth/bluetoothd-service-audio -
s" either through gdb or valgrind.

Johan


-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-10-20 12:45:27

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] bluetooth headset not working


On Oct 20, 2007, at 5:10, [email protected] wrote:
> Do u mean the bluetoothd-service-audio will read .asoundrc?

No. The values in .asoundrc are given to the bluetooth alsa plugin
which then passes them over to the audio service using a unix socket.

> could you tell me how to write .asoundrc if i want to use
> a2dp and
> hsp.now my .asoundrc is:
>
> pcm.headset {
> type bluetooth
> }
>
> ctl.headset {
> type bluetooth
> }
>
> pcm.bluetooth {
> type bluetooth
> device 00:0D:3C:EB:53:F0
> }

If you want to have one alsa device for A2DP and another for HSP it
might be a good idea to explicitly state the profile you want to use
for each device. You do this by providing a line such as "profile
a2dp" in addition to the device and type lines. I just checked the
code and the plugin will map "hifi" and "a2dp" to A2DP and "voice"
and "hfp" to HSP (it's actually a bug that it doesn't recognize "hsp").

> when i use "aplay -D bluetooth -f S16_LE /1.wav ",i will get the
> following
> error.
<snip>
> audio[837]: START request succAlignment trap: bluetoothd-serv (837)
> PC=0x0001ce50 Instr=0xe1c320b0 Address=0xbe871a89 FSR 0x813
> eeded
> audio[837]: SBC Source: Start_Cfm
> audio[837]: SBC Source SEP 0x376b8 locked
> hcid[825]: Service owner exited: :1.1

Looks like the audio service crashed. What architecture are you
running this on and what compiler did you use? It would be good if
you could try to reproduce this by running bluetoothd-audio-service
through valgrind or gdb and get a proper backtrace of the crash. To
do this remove the /etc/bluetooth/audio.service file (hcid should
detect this and unregister the service but if it doesn't you need to
restart hcid), and run "/usr/lib/bluetooth/bluetoothd-service-audio -
s" either through gdb or valgrind.

Johan


-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel