On 09/28/2010 09:33 PM, Moises Silva wrote:
On Mon, Sep 27, 2010 at 9:26 PM, Zhang, Zhenhua
> Right. See bluez/audio/unix.c for BlueZ part SCO code that cooperate with pulseaudio.
BlueZ sends SCO fd to pulseaudio via UNIX
> type socks.
This put me in the right direction and I have a clearer idea of how to
do it. I found odd though that it seems I need to copy the ipc.c and
ipc.h files into my own app. Any reason they are not part of
Another thing that puzzles me is that supposedly DBUS >= 1.3 is needed
to be able to pass file descriptors. However as you pointed out and
per ipc.c the file descriptor is sent using a unix socket. Why the
need for DBUS file descriptor passing?
There are two descriptors involved here. DBus 1.3 is needed to have
BlueZ pass the RFCOMM file descriptor to oFono for the control socket.
E.g. the socket where AT commands are being passed. This is done by
using HandsfreeGateway and HandsfreeAgent. See doc/hfp-api.txt in BlueZ.
The second descriptor (what ipc.c and ipc.h deal with) is used to pass
the SCO fd to PulseAudio or gStreamer. This fd is used for Audio.
Marcel or Johan might know better, but I think the reason for ipc.c and
ipc.h was that DBus did not support fd-passing at the time BlueZ audio
integration work was being done.