Commit Graph

145 Commits

Author SHA1 Message Date
Vinicius Costa Gomes f09a57d799 hfpmodem: Add version defines for HFP 1.6 2013-01-17 11:21:16 -06:00
Denis Kenzior fb1d1c3426 hfp: use ofono_handsfree_battchg_notify 2012-12-17 09:50:22 -06:00
Michael Brudevold ef25cf1adf hfpmodem: use full CLCC handling in dialing case
A call that moves from the dialing to active state before the +CLCC response
will not properly be added as a voicecall. This is because the dialing callback
was using simplified handling and only looked for calls in the dialing or
alerting state.

AT sequence that exhibited the failure (AG device was an iPhone accessing
visual voicemail):

> +CIND: ("service",(0-1)),("call",(0-1)),("callsetup",(0-3)),
("battchg",(0-5)),("signal",(0-5)),("roam",(0-1)),("callheld",(0-2))
...
> +CIEV: 3,2
< AT+CLCC
> +CIEV: 2,1
> +CIEV: 3,0
> +CLCC: 1,0,0,0,0,"**21153**",129,"Voicemail"
2012-04-11 23:54:38 -05:00
Mikel Astiz 3f41ebe5c7 hfpmodem: Report features supported by AG 2011-10-21 13:56:43 -05:00
Mikel Astiz bab9de3843 hfpmodem: devinfo atom added to export BT address 2011-10-21 13:19:17 -05:00
Mikel Astiz 7100435142 hfpmodem: Avoid segfault in handsfree
The use of g_idle_add can cause a segmentation fault if the object is
destroyed in the meantime.
2011-10-21 13:17:40 -05:00
Mikel Astiz 6e5edc8ead hfpmodem: Avoid segfault in call-volume
The use of g_idle_add can cause a segmentation fault if the object is
destroyed in the meantime.
2011-10-21 13:17:17 -05:00
Mikel Astiz c1ed32db9d hfpmodem: Avoid segfault in network-registration
The use of g_idle_add can cause a segmentation fault if the object is
destroyed in the meantime.
2011-10-21 13:17:13 -05:00
Mikel Astiz bb0bcef256 hfpmodem: Support for AT+BVRA 2011-10-21 13:14:19 -05:00
Mikel Astiz 2cafaeed13 hfpmodem: minor whitespace fix 2011-10-20 12:57:36 -05:00
Mikel Astiz 813405500b hfpmodem: Support for +BSIR unsolicited responses 2011-10-20 12:53:34 -05:00
Marcel Holtmann 48190bdc11 drivers: Some more copyright fixes 2011-10-15 12:21:30 -07:00
Denis Kenzior 066690b17f handsfree: Pass the error information to the core
if available.  This is the preferred way, so that the core can take into
account the error information in the future if required.
2011-10-13 13:47:56 -05:00
Mikel Astiz 86cb93d410 hfpmodem: Support of number requests (AT+BINP=1) 2011-10-13 13:37:12 -05:00
Denis Kenzior 9a53aca0ab handsfree: Set in-band ringing before registering
Avoid an extra signal emission
2011-10-13 13:06:35 -05:00
Mikel Astiz f05a78a450 hfpmodem: Set initial state for inband ringing
According to the HFP specification, inband ringing will be enabled by
default if the AG supports it. This setting could later be changed by
the unsolicited result code +BSIR.
2011-10-13 13:01:14 -05:00
Mikel Astiz eb361d874c hfpmodem: Copyright statement correction 2011-10-13 12:27:27 -05:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Denis Kenzior 586a2a294a call-volume: Use g_idle_add to register 2011-09-09 01:05:47 -05:00
Mikel Astiz 7d5b57e47c hfpmodem: Add skeleton driver implemenetation 2011-09-09 00:30:14 -05:00
Denis Kenzior 6b5761f5f0 hfpmodem: Use an enum 2011-08-08 10:16:21 -05:00
Frédéric Danis b8730eb47d hfpmodem: fix hf features
check audio gateway version and only set right features
2011-08-08 10:16:21 -05:00
Frédéric Dalleau f13b3d3a6b hfpmodem: Fix g_at_chat leak 2011-08-05 17:02:36 -05:00
Frédéric Danis c6c7fc3b16 hfpmodem: fix network status
When receiving roaming indicator update to 0 (no roaming) network
registration status should be updated with latest value of service
indicator.
2011-07-25 23:07:54 -05:00
Frédéric Danis 3b00f5aad7 hfpmodem: fix callheld indicator
Callheld move from 1 (active and held calls) to 2 (all calls on hold) may
result of:
- active call has been dropped by remote,
- an intermediate state during a call swap which will be followed by a
  move back to 1.
So, wait a little before checking calls state.
2011-07-25 23:06:16 -05:00
Denis Kenzior b33d6b5fcb hfp_hf: Reorganize common code into hfpmodem 2011-07-21 03:49:27 -05:00
Denis Kenzior 191570a1ba hfpmodem: Minor whitespace fix 2011-07-20 08:22:25 -05:00
Frédéric Danis 6db88b21d0 hfpmodem: remove previous HFP defines 2011-06-20 04:21:30 -05:00
Denis Kenzior 1bc1e52751 hfp: Fix some whitespace issues 2011-03-17 16:11:02 -05:00
Jeevaka Badrappan a4c3733314 hfpmodem: M16 coding style fix 2011-02-05 07:04:17 -08:00
Jeevaka Badrappan 3fef7a3d26 hfpmodem: Use defined call_status enum 2011-02-05 05:07:42 -08:00
Lucas De Marchi a6d15c6a64 hfpmodem: use ofono_call initializer 2011-02-01 18:31:28 +01:00
Jeevaka Badrappan ae9feb72e9 hfpmodem: fix memory leak 2011-01-29 12:43:17 -06:00
Jeevaka Badrappan 0f4b44d5cf hfpmodem: remove NULL check 2011-01-29 18:39:37 +01:00
Jeevaka Badrappan 12c3cf6969 voicecall: remove ofono_cug_option 2011-01-26 16:38:15 -06:00
Helen Clemson fa576435a5 hfpmodem: Incorrect string length in dtmf buf.
Strlen includes a NULL character.
2011-01-14 14:26:37 +01:00
Jeevaka Badrappan 7e52569104 hfpmodem: M15 coding style fix 2011-01-12 08:06:58 -08:00
Lucas De Marchi b82a7f8511 drivers: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 11:37:09 -06:00
Lucas De Marchi 74125ff5d4 Fix common misspellings in drivers
Fix common misspellings by using the list available at
http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

From the list cited above, the substitution script found the following
misspellings:

subsidary(-ies)->subsidiary(-ies)
transfering->transferring
2010-09-14 16:00:16 +09:00
Marcel Holtmann 41133da001 hfpmodem: Remove useless NULL checks before g_free 2010-08-16 22:06:24 +02:00
Sjur Brændeland dde0a4ccb5 voicecall: Rename hangup to hangup_active 2010-08-12 11:32:12 -05:00
Gustavo F. Padovan 160161e6bc Remove hfpmodem's header guard 2010-06-10 16:17:21 -05:00
Zhenhua Zhang 00262e36db Fix Don't check CLIR CUG option in hfp_dial
For HFP call, no need to check CLIR & CUG option. It doesn't affect dial
out string.
2010-03-09 10:33:13 -06:00
Denis Kenzior 766a0bcfa5 Fix: Unregistering the agent in disable is wrong
What we really want to do here is set a flag that the agent has not been
released yet.  If this is the case we should send the Disconnect call on
disable.
2010-02-12 20:10:29 -06:00
Denis Kenzior c98b951fe6 Refactor: Remove atutil dump_response
No longer needed now that we have nice AT command tracing using
OFONO_AT_DEBUG=1
2010-02-08 12:28:23 -06:00
Denis Kenzior 7f9a9b0cdc Fix: Don't use ofono_debug directly in plugins 2010-02-08 12:09:01 -06:00
Denis Kenzior d223243913 Fix: Use snprintf instead of sprintf in HFP 2010-02-05 12:00:14 -06:00
Denis Kenzior 5a6bbd113d Cleanup: Refactor handling of failed connections 2010-02-04 13:49:36 -06:00
Denis Kenzior c9b80a73c1 Fix: Don't send undefined values to the core 2010-02-04 00:26:20 -06:00
Gustavo F. Padovan ac6672e9b3 Add HFP support through BlueZ
It uses BlueZ through to get HFP working following the
org.bluez.HandsfreeGateway and org.bluez.HandsfreeAgent from
the BlueZ D-Bus API.

You need the HFP suport into BlueZ and the new D-Bus 1.3 or
later with fd-passing support.

Many thanks to Zhenhua Zhang <zhenhua.zhang@intel.com> for its
prototype on this code.
2010-01-27 21:18:07 +01:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Denis Kenzior 6cb038fafb Style: Repeat for drivers 2009-12-17 21:45:40 -06:00
Denis Kenzior b95025ab01 Style: Fix style issues in hfpmodem 2009-12-09 02:41:16 -06:00
Zhenhua Zhang aeaf9b4a55 Add clip_timeout for notify incoming call
Schedule a clip_timeout in the ring notify. If CLIP comes right
after RING, we cancel the timer. If doesn't, we notify the call
without phone number.
2009-12-09 02:37:07 -06:00
Zhenhua Zhang c7902b83e6 Add poll_clcc if we are in multiparty call
If we are in multiparty call, remote AG won't update indicator
if any call in multiparty call is released by CHLD=1x. So we
have to poll it periodically.
2009-12-09 02:37:02 -06:00
Zhenhua Zhang 7f9e4038a2 Add multiparty call support for hfpmodem
Add CHLD=3, 2x and 4 to create multiparty call, private chat and
call transfer.
2009-12-09 02:36:43 -06:00
Zhenhua Zhang 5dbb2f424a Add hfp_release_specific to release specific call
Use AT+CHLD=1x to release a specific call if AG supports that.
2009-12-09 02:36:28 -06:00
Denis Kenzior e049862b51 Style: Remove empty line 2009-12-08 22:17:51 -06:00
Zhenhua Zhang bd81a13493 Fix update hfp_hangup to release active call
In HFP, AT+CHUP is intended to release the current active call.
2009-12-08 04:29:14 -06:00
Denis Kenzior 18e8c906c5 Make sure to list calls in HFP voicecall driver 2009-12-04 16:52:32 -06:00
Zhenhua Zhang d90c657bd4 Add hfp_send_dtmf to send tones for hfpmodem 2009-12-04 16:52:32 -06:00
Denis Kenzior a3539b5988 Update HFP voicecall driver to new world order 2009-12-04 16:52:31 -06:00
Denis Kenzior 8e258ff54b Get rid of list_calls in hfp driver 2009-12-04 16:52:31 -06:00
Zhenhua Zhang 64015ff4b8 Fix: Move CHLD from voicecall driver to plugin
According HFP v1.5 spec, AT+CHLD=? should be a part of SLC
connection. So we should not do it after SLC connection is
created.
2009-11-24 20:43:41 -06:00
Zhenhua Zhang bbc2eecd6f Fix: Poll CLCC to replace the code in call_held=1
When using CHLD=2x in multiparty call, call_held is 1 and we
should not swap all active->held. So we cannot save this pull
in private chat.
2009-11-20 09:37:37 +01:00
Denis Kenzior 39b043a40a Fix: Report status & tech in hfpmodem 2009-11-18 13:02:26 -06:00
Denis Kenzior 1c3d41fafc Fix: Don't drop dialing calls when call=0 signaled 2009-11-16 11:47:42 -06:00
Denis Kenzior 77b3048325 Fix: Don't double-swap calls when 3-way dialing 2009-11-16 11:23:48 -06:00
Denis Kenzior 534d7f89d2 Fix: Update the status to held properly 2009-11-16 11:19:23 -06:00
Denis Kenzior 957fc90d37 Refactor: Move repeated code to a function 2009-11-16 11:15:31 -06:00
Zhenhua Zhang 5e1067b8a2 Fix: Handle callsetup=0 when no waiting or dialing call
When call=1 and callsetup=0, if no waiting or dialing call, the call
is active and no need to notify status change.
2009-11-16 11:09:21 -06:00
Zhenhua Zhang 2cbb307013 Fix: Ignore repeated CCWA notify if have
Some phone like iPhone repeats CCWA notify. So we need to ignore
it when we already have waiting call.
2009-11-16 10:17:05 -06:00
Denis Kenzior ea29ea9bd5 Fix: Set current element properly
When removing an element from the list, the current iterator was not
being updated properly.  Most likely leading to double free.
2009-11-16 10:09:48 -06:00
Denis Kenzior 83ee938312 Style: Spacing 2009-11-16 10:02:52 -06:00
Denis Kenzior d5ae0e557f Add three-way calling support to HFP voice driver 2009-11-13 22:47:10 -06:00
Zhenhua Zhang e620a058fb Fix: Fill in the phone number info for outgoing call
There're two cases of outgoing call: dial from HF or dial from
phone. We could receive callsetup=2 indicator in both case. So
adding AT+CLCC query to sync the outgoing call.

In the first case, we only need to sync the phone number.  In
the second case, the phone is dialing from phone and we know
nothing. Create a new call and notify the core.

If phone does not support AT+CLCC and there's no call dialing
from HF, we fake a new call for it.
2009-11-13 11:15:13 -06:00
Zhenhua Zhang 3003ebd066 Fix: Set data to NULL in hfpmodem drivers 2009-11-12 11:21:00 -06:00
Zhenhua Zhang c7fd6d13b6 Style: Use 1 instead of 0x1 2009-11-11 16:27:26 -06:00
Zhenhua Zhang 28c6bbb558 Add call volume support for hfpmodem
The call volume driver listens the speaker volume and microphone
gain from the AG. It also allow to synchronze the speaker and
microphone volume changes with the AG through AT+VGS and AT+VGM.

Volume level synchronization from HFP spec 1.5 Section 4.28.2
is performed on startup.
2009-11-11 15:53:55 -06:00
Denis Kenzior c63a0413cd Fix: Minor style issues 2009-11-03 11:57:43 -06:00
Gustavo F. Padovan 1acd7f8b75 Create network registration driver for hfpmodem
This driver handles phone informations about registration status, signal
strength and roaming status listening +CIEV commands.  It also gets the
Network Operator name with +COPS commands.
2009-11-03 11:49:35 -06:00
Zhenhua Zhang ff2a8e6f7c Fix: The use of cind_val / cind_pos was wrong 2009-11-03 11:26:08 -06:00
Zhenhua Zhang 2185106b32 Refactor: Get rid of mpty_call variable 2009-11-03 11:22:23 -06:00
Zhenhua Zhang c40657216d Fix: Remove some dead code 2009-11-03 11:19:39 -06:00
Denis Kenzior 30cc6d6f4b Fix: This hack is no longer necessary 2009-10-28 23:40:04 -05:00
Denis Kenzior b3dccdfd54 Fix: Don't pass the indexes
These can be obtained inside the function anyway
2009-10-28 19:23:25 -05:00
Denis Kenzior 2c5ea9d4ee Fix: No need to set this to NULL 2009-10-28 17:40:35 -05:00
Denis Kenzior c41a8ced81 Cleanup: Fixup style 2009-10-28 17:40:06 -05:00
Zhenhua Zhang 4a36fc7c82 Add voicecall driver for Bluetooth HFP
HFP voicecall driver uses AT+CIEV indicator to notify call status
update according to Bluetooth HFP spec v1.5. This patch only adds single
call support.
2009-10-28 17:33:33 -05:00
Zhang, Zhenhua fa10070bf9 Replace Glib type with standard C type 2009-10-23 13:40:49 -05:00
Denis Kenzior f726596860 Rename: drivers/hfpmodem/hfp.[ch] to hfpmodem.[ch]
Be more consistent with other drivers
2009-10-19 22:13:19 -05:00
Denis Kenzior c4594d2543 Fix: Make 'make distcheck' happy again 2009-10-19 17:07:23 -05:00
Denis Kenzior 5635703141 Refactor: Setup the HF features bitmap
Do not use magic numbers unless strictly necessary
2009-10-19 16:59:44 -05:00
Denis Kenzior 0ca88b36e7 Refactor: Don't store indicator names
We already know the indicators we're interested in from the
specification, malloc/free-ing the indicator names is thus pointless.
Instead save off the indicator index positions in an array.  Parse the
current values instead of storing the unparsed list.
2009-10-19 16:58:13 -05:00
Zhenhua Zhang fb0c157c11 Add initial glue code for hfp driver 2009-10-19 15:48:07 -05:00