Hi Frederic,
2011/3/17 Frédéric Dalleau <frederic.dalleau(a)linux.intel.com>:
This patch will start providing an HSP profile implementation
in oFono. This is work in progress, and based of what was done for
HFP profile. Finally added the audio connection, that will provide
a base for discussion. To avoid emulator depend upon btio, there is
a callback fom the emulator to the hsp plugin to connect audio,
Some question remains :
* How should pulse audio be notified?
I suppose we should use the Media API to notify PA, it is already
upstream, in that case oFono doesn't need to deal with SCO at all. If
that is the plan then I suggest we first define a D-Bus spec on how to
signal things like SLC and NREC to BlueZ, the record and socket
listening/connection handling logic could also be done in BlueZ side
so we use D-Bus to transfer the fd to oFono.
* What is the behavior of hsp when receiving CKPD=200?
This is what oFono does in BlueZ:
void telephony_key_press_req(void *telephony_device, const char *keys)
{
struct voice_call *active, *waiting;
int err;
DBG("telephony-ofono: got key press request for %s", keys);
waiting = find_vc_with_status(CALL_STATUS_INCOMING);
if (!waiting)
waiting = find_vc_with_status(CALL_STATUS_DIALING);
active = find_vc_with_status(CALL_STATUS_ACTIVE);
if (waiting)
err = answer_call(waiting);
else if (active)
err = release_call(active);
else
err = 0;
if (err < 0)
telephony_key_press_rsp(telephony_device,
CME_ERROR_AG_FAILURE);
else
telephony_key_press_rsp(telephony_device, CME_ERROR_NONE);
}
Next step will be to dial/hangup a call.
Frédéric Dalleau (9):
bluetooth: add functions for sco connection
emulator: add hsp emulator type
hsp_ag: add hsp atom type
hsp_ag: Initial plugin commit
hsp_ag: add modem watch
emulator: add CKPD support
emulator: add audio connection API
emulator: implement audio connection API
hsp_ag: add audio connection support
Makefile.am | 3 +
include/emulator.h | 8 ++
plugins/bluetooth.c | 122 +++++++++++++++++++++++++++++++
plugins/bluetooth.h | 7 ++
plugins/hsp_ag.c | 200 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/emulator.c | 50 +++++++++++++
src/ofono.h | 1 +
7 files changed, 391 insertions(+), 0 deletions(-)
create mode 100644 plugins/hsp_ag.c
_______________________________________________
ofono mailing list
ofono(a)ofono.org
http://lists.ofono.org/listinfo/ofono
--
Luiz Augusto von Dentz
Computer Engineer