Hello,
My current setup have following versions:
PulseAudio : 6
Ofono: 1.15
bluez5: 5.25
A2DP profile is working fine, I can listen phone media sound through my system,
but when I switching to headset profile, I am getting -
root@imx6qsabresd:~# pactl set-card-profile bluez_card.34_BB_26_93_BC_B3
headset_audio_gateway
Failure: Input/Output error
I have used one patch, which registers mediaendpoint for HSP and HFP profiles,
after applying the patch pulseaudio is now registering mediaendpoint for hsp
and hfp but audio is not routed from phone to system, when I make a call to my
phone. I have attached that patch with this mail.
ofono log:
Dec 30 07:07:42 imx6qsabresd systemd[1]: Starting Telephony service...
Dec 30 07:07:42 imx6qsabresd ofonod[343]: oFono version 1.15
Dec 30 07:07:42 imx6qsabresd systemd[1]: Started Telephony service.
Feb 03 06:54:52 imx6qsabresd ofonod[343]: Service level connection established
Feb 03 07:19:19 imx6qsabresd ofonod[343]: Service level connection established
Feb 03 07:20:01 imx6qsabresd ofonod[343]: Reject SCO: Agent not registered
Feb 03 07:20:22 imx6qsabresd ofonod[343]: Reject SCO: Agent not registered
Attaching:
pulseaudio.log, bluetooth.log, pactl_list.log, device-info.log,
headset-mediapoint.patch
Can you please help me out to make HFP work.
Thanks & Regards,
Abhishek
root@imx6qsabresd:~# pulseaudio -vvvv
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: setpriority() worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 6.0
D: [pulseaudio] main.c: Compilation host: arm-poky-linux-gnueabi
D: [pulseaudio] main.c: Compilation CFLAGS: -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux armv7l 3.14.28-1.0.0_ga+g91cf351 #1 SMP PREEMPT Wed Dec 30 12:55:19 IST 2015
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 6678f0bbeba44bc2b04a66cab88024ee.
I: [pulseaudio] main.c: Using runtime directory /home/root/.config/pulse/6678f0bbeba44bc2b04a66cab88024ee-runtime.
I: [pulseaudio] main.c: Using state directory /home/root/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-6.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496
I: [pulseaudio] cpu-arm.c: CPU flags: V6 V7 VFP EDSP NEON VFPV3
I: [pulseaudio] svolume_arm.c: Initialising ARM optimized volume functions.
I: [pulseaudio] sconv_neon.c: Initialising ARM NEON optimized conversions.
I: [pulseaudio] mix_neon.c: Initialising ARM NEON optimized mixing functions.
I: [pulseaudio] remap_neon.c: Initialising ARM NEON optimized remappers.
I: [pulseaudio] module-device-restore.c: Successfully opened database file '/home/root/.config/pulse/6678f0bbeba44bc2b04a66cab88024ee-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/home/root/.config/pulse/6678f0bbeba44bc2b04a66cab88024ee-stream-volumes'.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry0
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry1
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry2
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
I: [pulseaudio] module-card-restore.c: Successfully opened database file '/home/root/.config/pulse/6678f0bbeba44bc2b04a66cab88024ee-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #3; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-6.0/modules/module-bluetooth-policy.so': success
I: [pulseaudio] module.c: Loaded "module-bluetooth-policy" (index: #4; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-6.0/modules/module-bluetooth-discover.so': success
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-6.0/modules/module-bluez5-discover.so': success
D: [pulseaudio] dbus-util.c: Successfully connected to D-Bus system bus 7081eb1714ada7a79ba0ba74568382bd as :1.15
I: [pulseaudio] module.c: Loaded "module-bluez5-discover" (index: #6; argument: "headset=ofono").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-6.0/modules/module-bluez4-discover.so': failure
I: [pulseaudio] module.c: Loaded "module-bluetooth-discover" (index: #5; argument: "headset=ofono").
I: [pulseaudio] module.c: Loaded "module-native-protocol-tcp" (index: #7; argument: "auth-ip-acl=127.0.0.1").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-6.0/modules/module-dbus-protocol.so': failure
D: [pulseaudio] alsa-util.c: Trying hw:0,0 with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open hw:0,0
I: [pulseaudio] alsa-util.c: Cannot disable ALSA period wakeups
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 371 ms
D: [pulseaudio] alsa-util.c: Set buffer size first (to 88200 samples), period size second (to 88200 samples).
I: [pulseaudio] alsa-util.c: ALSA period wakeups were not disabled
I: [pulseaudio] alsa-sink.c: Successfully opened device hw:0,0.
I: [pulseaudio] alsa-sink.c: Successfully enabled mmap() mode.
I: [pulseaudio] alsa-sink.c: Successfully enabled timer-based scheduling mode.
I: [pulseaudio] sink.c: Created sink 0 "alsa_output.hw_0_0" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c: alsa.resolution_bits = "16"
I: [pulseaudio] sink.c: device.api = "alsa"
I: [pulseaudio] sink.c: device.class = "sound"
I: [pulseaudio] sink.c: alsa.class = "generic"
I: [pulseaudio] sink.c: alsa.subclass = "generic-mix"
I: [pulseaudio] sink.c: alsa.name = ""
I: [pulseaudio] sink.c: alsa.id = "HiFi wm8962-0"
I: [pulseaudio] sink.c: alsa.subdevice = "0"
I: [pulseaudio] sink.c: alsa.subdevice_name = "subdevice #0"
I: [pulseaudio] sink.c: alsa.device = "0"
I: [pulseaudio] sink.c: alsa.card = "0"
I: [pulseaudio] sink.c: alsa.card_name = "wm8962-audio"
I: [pulseaudio] sink.c: alsa.long_card_name = "wm8962-audio"
I: [pulseaudio] sink.c: device.bus_path = "platform-sound.22"
I: [pulseaudio] sink.c: sysfs.path = "/devices/soc0/sound.22/sound/card0"
I: [pulseaudio] sink.c: device.string = "hw:0,0"
I: [pulseaudio] sink.c: device.buffering.buffer_size = "65536"
I: [pulseaudio] sink.c: device.buffering.fragment_size = "32768"
I: [pulseaudio] sink.c: device.access_mode = "mmap+timer"
I: [pulseaudio] sink.c: device.description = "wm8962-audio"
I: [pulseaudio] sink.c: device.icon_name = "audio-card"
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
I: [pulseaudio] source.c: Created source 0 "alsa_output.hw_0_0.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c: device.description = "Monitor of wm8962-audio"
I: [pulseaudio] source.c: device.class = "monitor"
I: [pulseaudio] source.c: device.icon_name = "audio-input-microphone"
I: [pulseaudio] alsa-sink.c: Using 2.0 fragments of size 32768 bytes (185.76ms), buffer size is 65536 bytes (371.52ms)
I: [pulseaudio] alsa-sink.c: Time scheduling watermark is 20.00ms
D: [pulseaudio] alsa-sink.c: hwbuf_unused=0
D: [pulseaudio] alsa-sink.c: setting avail_min=15502
D: [pulseaudio] alsa-util.c: snd_pcm_dump():
D: [pulseaudio] alsa-util.c: Hardware PCM card 0 'wm8962-audio' device 0 subdevice 0
D: [pulseaudio] alsa-util.c: Its setup is:
D: [pulseaudio] alsa-util.c: stream : PLAYBACK
D: [pulseaudio] alsa-util.c: access : MMAP_INTERLEAVED
D: [pulseaudio] alsa-util.c: format : S16_LE
D: [pulseaudio] alsa-util.c: subformat : STD
D: [pulseaudio] alsa-util.c: channels : 2
D: [pulseaudio] alsa-util.c: rate : 44100
D: [pulseaudio] alsa-util.c: exact rate : 44100 (44100/1)
D: [pulseaudio] alsa-util.c: msbits : 16
D: [pulseaudio] alsa-util.c: buffer_size : 16384
D: [pulseaudio] alsa-util.c: period_size : 8192
D: [pulseaudio] alsa-util.c: period_time : 185759
D: [pulseaudio] alsa-util.c: tstamp_mode : ENABLE
D: [pulseaudio] alsa-util.c: tstamp_type : MONOTONIC
D: [pulseaudio] alsa-util.c: period_step : 1
D: [pulseaudio] alsa-util.c: avail_min : 15502
D: [pulseaudio] alsa-util.c: period_event : 0
D: [pulseaudio] alsa-util.c: start_threshold : -1
D: [pulseaudio] alsa-util.c: stop_threshold : 1073741824
D: [pulseaudio] alsa-util.c: silence_threshold: 0
D: [pulseaudio] alsa-util.c: silence_size : 0
D: [pulseaudio] alsa-util.c: boundary : 1073741824
D: [pulseaudio] alsa-util.c: appl_ptr : 0
D: [pulseaudio] alsa-util.c: hw_ptr : 0
D: [alsa-sink-HiFi wm8962-0] alsa-sink.c: Thread starting up
D: [alsa-sink-HiFi wm8962-0] core-util.c: SCHED_RR|SCHED_RESET_ON_FORK worked.
I: [alsa-sink-HiFi wm8962-0] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [alsa-sink-HiFi wm8962-0] alsa-sink.c: Starting playback.
D: [alsa-sink-HiFi wm8962-0] alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: [alsa-sink-HiFi wm8962-0] alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: [pulseaudio] module-device-restore.c: Could not set format on sink alsa_output.hw_0_0
I: [pulseaudio] module.c: Loaded "module-alsa-sink" (index: #8; argument: "device=hw:0,0").
W: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
W: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
I: [pulseaudio] main.c: Daemon startup complete.
D: [pulseaudio] bluez5-util.c: Unknown interface org.freedesktop.DBus.Introspectable found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.bluez.AgentManager1 found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.bluez.ProfileManager1 found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.freedesktop.DBus.Introspectable found, skipping
D: [pulseaudio] bluez5-util.c: Adapter /org/bluez/hci0 found
D: [pulseaudio] bluez5-util.c: Registering /MediaEndpoint/A2DPSource on adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Registering /MediaEndpoint/A2DPSink on adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Registering /MediaEndpoint/HSPHeadUnit on adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Registering /MediaEndpoint/HSPAudioGateway on adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Registering /MediaEndpoint/HFPHeadUnit on adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Registering /MediaEndpoint/HFPAudioGateway on adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Unknown interface org.freedesktop.DBus.Properties found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.bluez.Media1 found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.bluez.NetworkServer1 found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.freedesktop.DBus.Introspectable found, skipping
D: [pulseaudio] bluez5-util.c: Device /org/bluez/hci0/dev_34_BB_26_93_BC_B3 found
D: [pulseaudio] bluez5-util.c: Address: 34:BB:26:93:BC:B3
D: [pulseaudio] bluez5-util.c: Alias: Abhishek-XT1033
D: [pulseaudio] bluez5-util.c: Class: 5898764
D: [pulseaudio] bluez5-util.c: UUIDs: 00001105-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 0000110d-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 00001112-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 00001116-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 00001132-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 00001200-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 00001800-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: UUIDs: 00001801-0000-1000-8000-00805f9b34fb
D: [pulseaudio] bluez5-util.c: Adapter: /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Unknown interface org.freedesktop.DBus.Properties found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.bluez.Network1 found, skipping
D: [pulseaudio] bluez5-util.c: Unknown interface org.bluez.MediaControl1 found, skipping
D: [pulseaudio] backend-native.c: Bluetooth Headset Backend API support using the native backend
D: [pulseaudio] backend-native.c: Registering Profile /Profile/HSPAGProfile
D: [pulseaudio] bluez5-util.c: Properties changed in adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Properties changed in adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Properties changed in adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Properties changed in adapter /org/bluez/hci0
D: [pulseaudio] bluez5-util.c: Properties changed in adapter /org/bluez/hci0
D: [alsa-sink-HiFi wm8962-0] alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: [alsa-sink-HiFi wm8962-0] alsa-sink.c: Wakeup from ALSA!
D: [alsa-sink-HiFi wm8962-0] alsa-sink.c: Wakeup from ALSA!
Module #0
Name: module-device-restore
Argument:
Usage counter: n/a
Properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore the volume/mute state of devices"
module.version = "6.0"
Module #1
Name: module-stream-restore
Argument:
Usage counter: n/a
Properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore the volume/mute/device state of streams"
module.version = "6.0"
Module #2
Name: module-card-restore
Argument:
Usage counter: n/a
Properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore profile of cards"
module.version = "6.0"
Module #3
Name: module-switch-on-port-available
Argument:
Usage counter: n/a
Properties:
Module #4
Name: module-bluetooth-policy
Argument:
Usage counter: n/a
Properties:
module.author = "Frédéric Dalleau"
module.description = "When a bluetooth sink or source is added, load module-loopback"
module.version = "6.0"
Module #5
Name: module-bluetooth-discover
Argument: headset=ofono
Usage counter: n/a
Properties:
module.author = "João Paulo Rechi Vita"
module.description = "Detect available Bluetooth daemon and load the corresponding discovery module"
module.version = "6.0"
Module #6
Name: module-bluez5-discover
Argument: headset=ofono
Usage counter: n/a
Properties:
module.author = "João Paulo Rechi Vita"
module.description = "Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers"
module.version = "6.0"
Module #7
Name: module-native-protocol-tcp
Argument: auth-ip-acl=127.0.0.1
Usage counter: n/a
Properties:
module.author = "Lennart Poettering"
module.description = "Native protocol (TCP sockets)"
module.version = "6.0"
Module #8
Name: module-alsa-sink
Argument: device=hw:0,0
Usage counter: 1
Properties:
module.author = "Lennart Poettering"
module.description = "ALSA Sink"
module.version = "6.0"
Module #9
Name: module-bluez5-device
Argument: path=/org/bluez/hci0/dev_34_BB_26_93_BC_B3
Usage counter: 1
Properties:
module.author = "João Paulo Rechi Vita"
module.description = "BlueZ 5 Bluetooth audio sink and source"
module.version = "6.0"
Module #10
Name: module-loopback
Argument: source="bluez_source.34_BB_26_93_BC_B3" source_dont_move="true" sink_input_properties="media.role=music"
Usage counter: n/a
Properties:
module.author = "Pierre-Louis Bossart"
module.description = "Loopback from source to sink"
module.version = "6.0"
Sink #0
State: IDLE
Name: alsa_output.hw_0_0
Description: wm8962-audio
Driver: module-alsa-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 8
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.hw_0_0.monitor
Latency: 5030 usec, configured 186000 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HiFi wm8962-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "wm8962-audio"
alsa.long_card_name = "wm8962-audio"
device.bus_path = "platform-sound.22"
sysfs.path = "/devices/soc0/sound.22/sound/card0"
device.string = "hw:0,0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.description = "wm8962-audio"
device.icon_name = "audio-card"
Formats:
pcm
Source #0
State: IDLE
Name: alsa_output.hw_0_0.monitor
Description: Monitor of wm8962-audio
Driver: module-alsa-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 8
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: alsa_output.hw_0_0
Latency: 0 usec, configured 371519 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Monitor of wm8962-audio"
device.class = "monitor"
device.icon_name = "audio-input-microphone"
Formats:
pcm
Source #1
State: SUSPENDED
Name: bluez_source.34_BB_26_93_BC_B3
Description: Abhishek-XT1033
Driver: module-bluez5-device.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 9
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
bluetooth.protocol = "a2dp_source"
device.description = "Abhishek-XT1033"
device.string = "34:BB:26:93:BC:B3"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "phone"
bluez.path = "/org/bluez/hci0/dev_34_BB_26_93_BC_B3"
bluez.class = "0x5a020c"
bluez.alias = "Abhishek-XT1033"
device.icon_name = "audio-card-bluetooth"
Ports:
phone-input: Phone (priority: 0)
Active Port: phone-input
Formats:
pcm
Sink Input #0
Driver: module-loopback.c
Owner Module: 10
Client: n/a
Sink: 0
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "2" format.channel_map = "\"front-left,front-right\""
Corked: yes
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 3919 usec
Resample method: speex-float-1
Properties:
media.role = "music"
module-stream-restore.id = "sink-input-by-media-role:music"
media.name = "Loopback from Abhishek-XT1033"
media.icon_name = "audio-card-bluetooth"
Source Output #0
Driver: module-loopback.c
Owner Module: 10
Client: n/a
Source: 1
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "2" format.channel_map = "\"front-left,front-right\""
Corked: no
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 0 usec
Source Latency: 0 usec
Resample method: n/a
Properties:
media.role = "abstract"
module-stream-restore.id = "source-output-by-media-role:abstract"
media.name = "Loopback to wm8962-audio"
media.icon_name = "audio-card"
Client #0
Driver: protocol-native.c
Owner Module: 7
Properties:
application.name = "pactl"
native-protocol.peer = "TCP/IP client from 127.0.0.1:55555"
native-protocol.version = "30"
application.process.id = "397"
application.process.user = "root"
application.process.host = "imx6qsabresd"
application.process.binary = "pactl"
application.language = "C"
application.process.machine_id = "6678f0bbeba44bc2b04a66cab88024ee"
Card #0
Name: bluez_card.34_BB_26_93_BC_B3
Driver: module-bluez5-device.c
Owner Module: 9
Properties:
device.description = "Abhishek-XT1033"
device.string = "34:BB:26:93:BC:B3"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "phone"
bluez.path = "/org/bluez/hci0/dev_34_BB_26_93_BC_B3"
bluez.class = "0x5a020c"
bluez.alias = "Abhishek-XT1033"
device.icon_name = "audio-card-bluetooth"
Profiles:
a2dp_source: High Fidelity Capture (A2DP Source) (sinks: 0, sources: 1, priority: 10, available: yes)
headset_audio_gateway: Headset Audio Gateway (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: no)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: a2dp_source
Ports:
phone-output: Phone (priority: 0, latency offset: 0 usec, not available)
Part of profile(s): headset_audio_gateway
phone-input: Phone (priority: 0, latency offset: 0 usec)
Part of profile(s): a2dp_source, headset_audio_gateway
Device 34:BB:26:93:BC:B3
Name: Abhishek-XT1033
Alias: Abhishek-XT1033
Class: 0x5a020c
Icon: phone
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: OBEX Object Push (00001105-0000-1000-8000-00805f9b34fb)
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb)
UUID: NAP (00001116-0000-1000-8000-00805f9b34fb)
UUID: Handsfree Audio Gateway (0000111f-0000-1000-8000-00805f9b34fb)
UUID: Phonebook Access Server (0000112f-0000-1000-8000-00805f9b34fb)
UUID: Message Access Server (00001132-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
Modalias: bluetooth:v001Dp1200d1436
root@imx6qsabresd:~# journalctl -f -u bluetooth
-- Logs begin at Thu 1970-01-01 02:30:04 UTC. --
Dec 30 07:07:41 imx6qsabresd bluetoothd[285]: Bluetooth management interface 1.4 initialized
Dec 30 07:07:41 imx6qsabresd bluetoothd[285]: hci0 Load Connection Parameters failed: Unknown Command (0x01)
Dec 30 07:07:42 imx6qsabresd bluetoothd[285]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/A2DPSource
Dec 30 07:07:42 imx6qsabresd bluetoothd[285]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/A2DPSink
Dec 30 07:07:42 imx6qsabresd bluetoothd[285]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/HSPHeadUnit
Dec 30 07:07:42 imx6qsabresd bluetoothd[285]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/HSPAudioGateway
Dec 30 07:07:42 imx6qsabresd bluetoothd[285]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/HFPHeadUnit
Dec 30 07:07:42 imx6qsabresd bluetoothd[285]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/HFPAudioGateway
Feb 03 07:25:25 imx6qsabresd bluetoothd[285]: Can't open input device: No such file or directory (2)
Feb 03 07:25:25 imx6qsabresd bluetoothd[285]: AVRCP: failed to init uinput for 34:BB:26:93:BC:B3
diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
index 142617c..ab0a02b 100644
--- a/src/modules/bluetooth/bluez5-util.c
+++ b/src/modules/bluetooth/bluez5-util.c
@@ -48,6 +48,10 @@
#define A2DP_SOURCE_ENDPOINT "/MediaEndpoint/A2DPSource"
#define A2DP_SINK_ENDPOINT "/MediaEndpoint/A2DPSink"
+#define HSP_AG_ENDPOINT "/MediaEndpoint/HSPAudioGateway"
+#define HSP_HS_ENDPOINT "/MediaEndpoint/HSPHeadUnit"
+#define HFP_AG_ENDPOINT "/MediaEndpoint/HFPAudioGateway"
+#define HFP_HF_ENDPOINT "/MediaEndpoint/HFPHeadUnit"
#define ENDPOINT_INTROSPECT_XML \
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
@@ -794,6 +798,10 @@ static void parse_interfaces_and_properties(pa_bluetooth_discovery *y, DBusMessa
register_endpoint(y, path, A2DP_SOURCE_ENDPOINT, PA_BLUETOOTH_UUID_A2DP_SOURCE);
register_endpoint(y, path, A2DP_SINK_ENDPOINT, PA_BLUETOOTH_UUID_A2DP_SINK);
+ register_endpoint(y, path, HSP_HS_ENDPOINT, PA_BLUETOOTH_UUID_HSP_HS);
+ register_endpoint(y, path, HSP_AG_ENDPOINT, PA_BLUETOOTH_UUID_HSP_AG);
+ register_endpoint(y, path, HFP_HF_ENDPOINT, PA_BLUETOOTH_UUID_HFP_HF);
+ register_endpoint(y, path, HFP_AG_ENDPOINT, PA_BLUETOOTH_UUID_HFP_AG);
} else if (pa_streq(interface, BLUEZ_DEVICE_INTERFACE)) {
@@ -1162,6 +1170,18 @@ static DBusMessage *endpoint_set_configuration(DBusConnection *conn, DBusMessage
} else if (pa_streq(endpoint_path, A2DP_SINK_ENDPOINT)) {
if (pa_streq(uuid, PA_BLUETOOTH_UUID_A2DP_SINK))
p = PA_BLUETOOTH_PROFILE_A2DP_SOURCE;
+ } else if (strcasecmp(endpoint_path, HSP_HS_ENDPOINT) == 0) {
+ if (strcasecmp(uuid, PA_BLUETOOTH_UUID_HSP_HS) == 0)
+ p = PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY;
+ } else if (strcasecmp(endpoint_path, HFP_HF_ENDPOINT) == 0) {
+ if (strcasecmp(uuid, PA_BLUETOOTH_UUID_HFP_HF) == 0)
+ p = PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY;
+ } else if (strcasecmp(endpoint_path, HSP_AG_ENDPOINT) == 0) {
+ if (strcasecmp(uuid, PA_BLUETOOTH_UUID_HSP_AG) == 0)
+ p = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT;
+ } else if (strcasecmp(endpoint_path, HFP_AG_ENDPOINT) == 0) {
+ if (strcasecmp(uuid, PA_BLUETOOTH_UUID_HFP_AG) == 0)
+ p = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT;
}
if (p == PA_BLUETOOTH_PROFILE_OFF) {
@@ -1495,6 +1515,18 @@ static void endpoint_init(pa_bluetooth_discovery *y, pa_bluetooth_profile_t prof
pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(y->connection), A2DP_SINK_ENDPOINT,
&vtable_endpoint, y));
break;
+ case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
+ pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(y->connection), HSP_AG_ENDPOINT,
+ &vtable_endpoint, y));
+ pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(y->connection), HFP_AG_ENDPOINT,
+ &vtable_endpoint, y));
+ break;
+ case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY:
+ pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(y->connection), HSP_HS_ENDPOINT,
+ &vtable_endpoint, y));
+ pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(y->connection), HFP_HF_ENDPOINT,
+ &vtable_endpoint, y));
+ break;
default:
pa_assert_not_reached();
break;
@@ -1511,6 +1543,14 @@ static void endpoint_done(pa_bluetooth_discovery *y, pa_bluetooth_profile_t prof
case PA_BLUETOOTH_PROFILE_A2DP_SOURCE:
dbus_connection_unregister_object_path(pa_dbus_connection_get(y->connection), A2DP_SINK_ENDPOINT);
break;
+ case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
+ dbus_connection_unregister_object_path(pa_dbus_connection_get(y->connection), HSP_AG_ENDPOINT);
+ dbus_connection_unregister_object_path(pa_dbus_connection_get(y->connection), HFP_AG_ENDPOINT);
+ break;
+ case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY:
+ dbus_connection_unregister_object_path(pa_dbus_connection_get(y->connection), HSP_HS_ENDPOINT);
+ dbus_connection_unregister_object_path(pa_dbus_connection_get(y->connection), HFP_HF_ENDPOINT);
+ break;
default:
pa_assert_not_reached();
break;
@@ -1574,6 +1614,8 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) {
endpoint_init(y, PA_BLUETOOTH_PROFILE_A2DP_SINK);
endpoint_init(y, PA_BLUETOOTH_PROFILE_A2DP_SOURCE);
+ endpoint_init(y, PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT);
+ endpoint_init(y, PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY);
get_managed_objects(y);
@@ -1638,6 +1680,8 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) {
endpoint_done(y, PA_BLUETOOTH_PROFILE_A2DP_SINK);
endpoint_done(y, PA_BLUETOOTH_PROFILE_A2DP_SOURCE);
+ endpoint_done(y, PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT);
+ endpoint_done(y, PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY);
pa_dbus_connection_unref(y->connection);
}
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss