summaryrefslogtreecommitdiff
path: root/android/handsfree.c
Commit message (Collapse)AuthorAgeFilesLines
* android: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- Apache-2.0 : 80 LGPL-2.1-or-later : 42 GPL-2.0-or-later : 9 License: Apache-2.0 android/bluetoothd-wrapper.c android/tester-hidhost.c android/tester-map-client.c android/hal-audio-aptx.c android/hal-audio.c android/hal-handsfree-client.c android/tester-gatt.c android/hal-pan.c android/hal-socket.c android/tester-hdp.c android/tester-pan.c android/tester-avrcp.c android/hal-a2dp-sink.c android/hal-gatt.c android/hal-avrcp.c android/tester-a2dp.c android/hal-audio.h android/hal-bluetooth.c android/tester-socket.c android/hal-health.c android/hal-a2dp.c android/hal-ipc.c android/hal-avrcp-ctrl.c android/hal-sco.c android/hal-ipc.h android/tester-main.c android/hal-audio-sbc.c android/hal-utils.c android/hal-map-client.c android/hal-handsfree.c android/hal-log.h android/hal.h android/hal-utils.h android/tester-bluetooth.c android/hal-hidhost.c android/audio_utils/resampler.h android/audio_utils/resampler.c android/system/audio.h android/hardware/bt_sock.h android/hardware/bt_gatt_client.h android/hardware/bt_hh.h android/hardware/bluetooth.h android/hardware/hardware.h android/hardware/bt_hf_client.h android/hardware/bt_rc.h android/hardware/bt_hf.h android/hardware/bt_pan.h android/hardware/bt_gatt_types.h android/hardware/hardware.c android/hardware/audio_effect.h android/hardware/audio.h android/hardware/bt_gatt_server.h android/hardware/bt_gatt.h android/hardware/bt_hl.h android/hardware/bt_mce.h android/hardware/bt_av.h android/client/if-hh.c android/client/if-sco.c android/client/pollhandler.h android/client/haltest.c android/client/tabcompletion.c android/client/if-hf-client.c android/client/history.h android/client/if-audio.c android/client/terminal.h android/client/if-av.c android/client/if-main.h android/client/if-av-sink.c android/client/terminal.c android/client/if-mce.c android/client/if-hf.c android/client/pollhandler.c android/client/if-sock.c android/client/if-rc-ctrl.c android/client/if-rc.c android/client/history.c android/client/if-pan.c android/client/if-gatt.c android/client/if-bt.c android/client/if-hl.c License: LGPL-2.1-or-later android/sco.h android/socket.c android/tester-main.h android/hidhost.h android/map-client.h android/utils.h android/hal-msg.h android/health.h android/avrcp-lib.c android/bluetoothd-snoop.c android/a2dp.c android/bluetooth.h android/a2dp-sink.c android/handsfree-client.c android/audio-msg.h android/main.c android/pan.c android/ipc-tester.c android/health.c android/socket.h android/handsfree.h android/avrcp-lib.h android/a2dp-sink.h android/system-emulator.c android/gatt.c android/avrcp.h android/pan.h android/test-ipc.c android/hidhost.c android/a2dp.h android/avrcp.c android/sco-msg.h android/bluetooth.c android/map-client.c android/handsfree-client.h android/ipc.c android/handsfree.c android/gatt.h android/ipc.h android/ipc-common.h android/compat/wordexp.h android/cutils/properties.h License: GPL-2.0-or-later android/avdtp.h android/avctp.c android/avdtptest.c android/sco.c android/log.c android/avdtp.c android/avctp.h android/compat/readline/history.h android/compat/readline/readline.h
* android/handsfree: Fix unaligned struct accessBastien Nocera2019-05-131-1/+3
| | | | | | | android/handsfree.c: In function ‘bt_sco_get_fd’: android/handsfree.c:2913:47: error: taking address of packed member of ‘struct sco_rsp_get_fd’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 2913 | if (!dev || !bt_sco_get_fd_and_mtu(sco, &fd, &rsp.mtu)) | ^~~~~~~~
* android: Remove dead codeSzymon Janc2015-10-301-8/+1
| | | | | This removes dead code due to memory allocation with new0 not being able to fail.
* android/handsfree: Fix missing HFP WBS callbackWill Wang2015-09-011-0/+7
|
* android/handsfree: Fix invalid size of SCO_OP_GET_FD commandSzymon Janc2015-06-121-1/+1
|
* android/handsfree: Fix SCO disconnection while dialingMariusz Skamra2015-02-201-0/+4
| | | | | If we decide to hang up while dialing or alerting, SCO needs to be closed. Fixes: TC_AG_TCA_BV_04_C
* android/handsfree: Fix not sending proper call hold statusMariusz Skamra2015-02-201-1/+4
| | | | | | | | | | | | | | | | | This patch fixes not sending callheld=1 +CIEV to HF in Lollipop after accepting waiting call and placing active call on hold. On KitKat phone_state_change calls looks as follows: state=4 active=1 held=0 <= we have another connection state=6 active=1 held=1 <= swapped connections On Lollipop there is additional bogus state: state=4 active=1 held=0 state=4 active=0 held=1 <= hold current call state=6 active=1 held=1 so the "if (num_held > dev->num_held)" condition is no longer applicable. Fixed TC: TC_AG_ECS_BV_03_I, TC_AG_TWC_BV_03_I, TC_AG_TWC_BV_04_I
* android/handsfree: Fix no indicators after rejected incoming callSzymon Janc2015-02-201-6/+32
| | | | | | | | | | | | | | | | | | | | On KitKat there were some bogus phone_state_change calls after incoming call was rejected from the phone: active=0 hold=0 state=idle active=0 hold=0 state=incoming active=0 hold=0 state=idle active=0 hold=0 state=idle On Lollipop this seems to be fixed and after call is rejected we only get single call with state idle: active=0 hold=0 state=idle So simply reverting workaround commit "Track if incoming call is being rejected" would break KK. Instead, add short timeout after incoming call was rejected. Durring that period we ignore any phone state change to 'incoming' state. If we get any other state change (ie. outgoing call) timer is cleared.
* android/handsfree: Refactor connect_sco_cbSzymon Janc2015-02-171-14/+11
| | | | | | This is to avoid unnecessary connecting->disconnected and disconnected->connecting transitions when doing fallback to CVSD codec.
* android/handsfree: Fix possible invalid memory writeSzymon Janc2015-02-091-1/+2
| | | | Copy command to IPC buffer only after checking string size.
* android/handsfree: Relax AT+CMER handlingSzymon Janc2015-02-091-2/+5
| | | | | | | | Spec says that HF may (not should) use AT+CMER=3,0,0,1 command to activate indicators. Since AT+CMER has additional bfr parameter that may be send by HF we should just skip it instead of failing. This fix connection with Jaguar XF 2009 carkit.
* android/handsfree: Don't disconnect on unknown command in SLCSzymon Janc2015-02-091-7/+2
| | | | | | | | When connecting HFP simply reply with ERROR to any command not related to SLC creation but don't disconnect in such case. This fix connection issue with Jaguar XF 2009 carkit that sends AT+CPIN? command before AT+BRSF.
* android/handsfree: Fix not selecting correct SDP HSP recordSzymon Janc2015-02-031-18/+12
| | | | | | If remote device has both HSP AG and HSP HF records then we were always selecting first record. This could result in not being able to connect to HF if AG record happens to be first one.
* android/handsfree: Fix not selecting correct SDP HFP recordSzymon Janc2015-02-031-20/+14
| | | | | | | | If remote device has both HFP AG and HFP HF records then we were always selecting first record. This could result in not being able to connect to HF if AG record happens to be first one. Issue found on UPF 50.
* android/handsfree: Fix removing invalid glib sourceSzymon Janc2015-01-291-1/+3
| | | | | | | | | dev->ring is only valid if there is incoming call and AG is sending RING indications. Fix following: external/bluetooth/bluez/android/handsfree.c:disconnect_watch() g_source_remove: assertion `tag > 0' failed
* android/handsfree: Fix handling invalid configure_wbs commandSzymon Janc2015-01-021-1/+1
| | | | Passing invalid WBS mode should result in error response.
* android/handsfree: Add support for configure WBS commandSzymon Janc2014-12-191-1/+35
| | | | This allows to disable/enable WBS on specific headset.
* android/handsfree: Add initial support for configure WBS commmandSzymon Janc2014-12-191-0/+21
| | | | This adds required IPC message and handler for configure WBS command.
* android/handsfree: Simplify codec selectionLukasz Rymanowski2014-12-031-3/+2
| | | | Voice settings 0 is legacy, lets use BT_VOICE_CVSD_16BIT instead.
* android/handsfree: Use bt_sco lib in HFP AG codeLukasz Rymanowski2014-12-031-136/+44
|
* android/handsfree: Fix invalid size check for VR commandsSzymon Janc2014-11-221-2/+2
| | | | Invalid check was resulting in IPC error and daemon shutdown.
* android/handsfree: Open code find_default_device functionSzymon Janc2014-11-221-8/+1
| | | | | It was only used in single place with no benefit comparing to open coding it.
* android/handsfree: Add support for multiple HF instancesSzymon Janc2014-11-221-5/+11
| | | | This allows to have concurent connections to multiple headsets.
* android/handsfree: Send phone state to all connected devicesLukasz Rymanowski2014-11-131-22/+29
|
* android/handsfree: Send indicator notif to all connected devicesLukasz Rymanowski2014-11-131-7/+14
|
* android/handsfree: Use bdaddr provided for find_device()Andrei Emeltchenko2014-11-061-3/+7
|
* android/handsfree: Return default device for zero bdaddrAndrei Emeltchenko2014-11-061-0/+3
| | | | For the old Android API use find_default_device() function.
* android/handsfree: Add support for new API for key_pressed_cmd_cbAndrei Emeltchenko2014-11-061-1/+5
| | | | Key Pressed Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for unknown_at_cmd_cbAndrei Emeltchenko2014-11-061-0/+2
| | | | Unknown AT Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for clcc_cmd_cbAndrei Emeltchenko2014-11-061-1/+4
| | | | CLCC Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for cops_cmd_cbAndrei Emeltchenko2014-11-061-1/+4
| | | | COPS Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for cind_cmd_cbAndrei Emeltchenko2014-11-061-1/+4
| | | | | CIND Command notification callback has new parameter bdaddr. Currently use global device bdaddr.
* android/handsfree: Add support for new API for cnum_cmd_cbAndrei Emeltchenko2014-11-061-1/+4
| | | | | CNUM Command notification callback has new parameter bdaddr. Currently use global device bdaddr.
* android/handsfree: Add support for new API for chld_cmd_cbAndrei Emeltchenko2014-11-061-0/+1
| | | | CHLD Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for nrec_cmd_cbAndrei Emeltchenko2014-11-061-0/+1
| | | | NREC Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for handle_dtmfAndrei Emeltchenko2014-11-061-0/+1
| | | | DTMF Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for dial_call_cmd_cbAndrei Emeltchenko2014-11-061-0/+3
| | | | Dial Call Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for volume_cmd_cbAndrei Emeltchenko2014-11-061-0/+2
| | | | Volume Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for hangup_call_cmd_cbAndrei Emeltchenko2014-11-061-1/+4
| | | | | Hangup Call Command notification callback has new parameter bdaddr. Currently use global device bdaddr.
* android/handsfree: Add support for new API for handle_answerAndrei Emeltchenko2014-11-061-1/+4
| | | | | Answer Call Command notification callback has new parameter bdaddr. Currently use global device bdaddr.
* android/handsfree: Add support for new API for vr_cmd_cbAndrei Emeltchenko2014-11-061-0/+2
| | | | Voice Recognition Command notification callback has new parameter bdaddr.
* android/handsfree: Add support for new API for clcc_responseAndrei Emeltchenko2014-11-061-1/+4
| | | | clcc_response has new parameter bdaddr in new Android API.
* android/handsfree: Add support for new API for at_responseAndrei Emeltchenko2014-11-061-1/+4
| | | | at_response has new parameter bdaddr in new Android API.
* android/handsfree: Add support for new API for formatted_at_responseAndrei Emeltchenko2014-11-061-1/+4
| | | | formatted_at_response has new parameter bdaddr in new Android API.
* android/handsfree: Add support for new API for cind_responseAndrei Emeltchenko2014-11-061-1/+4
| | | | cind_response has new parameter bdaddr in new Android API.
* android/handsfree: Add support for new API for cops_responseAndrei Emeltchenko2014-11-061-1/+4
| | | | cops_response has new parameter bdaddr in new Android API.
* android/handsfree: Add support for new API for volume_controlAndrei Emeltchenko2014-11-061-1/+4
| | | | volume_control() in new Android API has bd_addr parameter.
* android/handsfree: Add support for new API for stop_vrAndrei Emeltchenko2014-11-061-1/+5
| | | | stop_voice_recognition() in new Android API has bd_addr parameter.
* android/handsfree: Add support for new API for start_vrAndrei Emeltchenko2014-11-061-1/+5
| | | | start_voice_recognition() in new Android API has bd_addr parameter.
* android/handsfree: Add support for new API for handsfree initAndrei Emeltchenko2014-11-061-1/+4
| | | | Add max_client parameter to IPC following new parameter for HF init().