[pulseaudio-discuss] Module module-bluetooth-policy on embedded system

Paolo Tagliavini paolo.tagliavini at gmail.com
Tue Jul 2 03:43:27 PDT 2013


Dear all,

I'm using: bluez 4.101, ofono 1.9 and pulseaudio 3.0 on an embedded imx23.
My system work fine connecting to a andoid or ios smartphone in a2dp sink
and I can play tracks
without any kinds of problem.

Module module-bluetooth-policy  automatically select : right BT profile and
right source/sink module-loopback:

# pactl list short
0       module-device-restore
1       module-stream-restore
2       module-card-restore
3       module-augment-properties
4       module-alsa-sink        device=hw:0,0
5       module-alsa-source      device=hw:0,0
6       module-udev-detect
7       module-bluetooth-discover
8       module-esound-protocol-unix
9       module-native-protocol-unix
10      module-default-device-restore
11      module-rescue-streams
12      module-always-sink
13      module-intended-roles
14      module-role-cork
15      module-dbus-protocol
16      module-switch-on-port-available
17      module-bluetooth-device address="50:EA:D6:3B:76:5D"
path="/org/bluez/619/hci0/dev_50_EA_D6"
18      module-bluetooth-policy
19      module-loopback source="bluez_source.50_EA_D6_3B_76_5D"
source_dont_move="true" sink_input"
0       alsa_output.hw_0_0      module-alsa-sink.c      s16le 2ch 44100Hz
    RUNNING
0       alsa_output.hw_0_0.monitor      module-alsa-sink.c      s16le 2ch
44100Hz       IDLE
1       alsa_input.hw_0_0       module-alsa-source.c    s16le 2ch 44100Hz
    IDLE
4       bluez_source.50_EA_D6_3B_76_5D  module-bluetooth-device.c
s16le 2ch 44100Hz       RUG
0       0       -       module-loopback.c       s16le 2ch 44049Hz
0       4       -       module-loopback.c       s16le 2ch 44100Hz
5       protocol-native.c       pactl
0       bluez_card.50_EA_D6_3B_76_5D    module-bluetooth-device.c


When try to change to hfgw profile making a phone call from smartphone,
module-bluetooth-policy change right to new profile but fail
to set correct loopback sources/sinks:

0       module-device-restore
1       module-stream-restore
2       module-card-restore
3       module-augment-properties
4       module-alsa-sink        device=hw:0,0
5       module-alsa-source      device=hw:0,0
6       module-udev-detect
7       module-bluetooth-discover
8       module-esound-protocol-unix
9       module-native-protocol-unix
10      module-default-device-restore
11      module-rescue-streams
12      module-always-sink
13      module-intended-roles
14      module-role-cork
15      module-dbus-protocol
16      module-switch-on-port-available
17      module-bluetooth-device address="50:EA:D6:3B:76:5D"
path="/org/bluez/619/hci0/dev_50_EA_D6"
18      module-bluetooth-policy
20      module-loopback sink="bluez_sink.50_EA_D6_3B_76_5D"
sink_dont_move="true" source_output_pr"
21      module-loopback source="bluez_source.50_EA_D6_3B_76_5D"
source_dont_move="true" sink_input"
0       alsa_output.hw_0_0      module-alsa-sink.c      s16le 2ch 44100Hz
    IDLE
2       bluez_sink.50_EA_D6_3B_76_5D    module-bluetooth-device.c
s16le 1ch 8000Hz        RUG
0       alsa_output.hw_0_0.monitor      module-alsa-sink.c      s16le 2ch
44100Hz       IDLE
1       alsa_input.hw_0_0       module-alsa-source.c    s16le 2ch 48000Hz
    SUSPENDED
5       bluez_sink.50_EA_D6_3B_76_5D.monitor    module-bluetooth-device.c
    s16le 1ch 8000Hz  E
6       bluez_source.50_EA_D6_3B_76_5D  module-bluetooth-device.c
s16le 1ch 8000Hz        RUG
1       2       -       module-loopback.c       s16le 1ch 8000Hz
2       2       -       module-loopback.c       s16le 1ch 8000Hz
1       1       -       module-loopback.c       s16le 1ch 8000Hz
2       6       -       module-loopback.c       s16le 1ch 8000Hz
6       protocol-native.c       pactl
0       bluez_card.50_EA_D6_3B_76_5D    module-bluetooth-device.c

I suppose that right Source/Sinks  must be:  6 (BT source)  0 (alsa sink)
 for first loopback and 1 (alsa input source) 5 ( BT sink) for second
loopback
Is my assumption correct ?

Setting by hand (pactl load-module module-llopback source=....  sink=.... )
the two loopbacks, I'm able to hear scratch on my embedded headsphone but
not right phone call.
I noticed that in this way not right bitrate is set for BT source/alsa
sink: it is set to 44100Hz instead of 8000Hz .


Can you help me to fix these behaviors

Best regards

Paolo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20130702/4765c403/attachment.html>


More information about the pulseaudio-discuss mailing list