Bluedroid: handsfree sound decoding source code

914 Views Asked by At

I'm trying to find a place in cyanogenmod source code, where sound, received from handsfree during a call, is decoded before directing it to phone line. And I need help with it.

As far, as I understand, SCO transport is used to carry voice data in HFP, and SCO itself uses HCI. So I tried to hook hci_recv_frame function in net/bluetooth_mgmt/hci_core.c in kernel, but it seems, it is not used during the call.

Links to bluedroid architecture overviews are also appreciated.

UPDATE

I understood, that bluedroid has no parts in kernel. That's why my modification didn't work.

But I still need to find a place in source code (in user space libraries ?), where sound data can be intercepted after receiving from Bt but before sending to telephone line.

1

There are 1 best solutions below

0
On

As I know SCO link data is not transfered through HCI interface in many Bluetooth controller chips. Most of these chips has a dedicated audio interface (like PCM/I2S etc.) and SCO data will be send to host through the interface. Host then receive SCO audio data and process them in its audio subsystem. You can refer to Android audio system related source files like audio manager/audio policy/audio HAL.