Commit Graph

7294 Commits

Author SHA1 Message Date
Denis Kenzior 9e112379b5 handsfree-audio: Make sure to reset has_wideband
When Agent is unregistered we do not know whether the wideband speech is
supported.  Default to false.
2013-08-07 16:37:23 -05:00
Denis Kenzior b131cfde52 atmodem: Fix whitespace violation 2013-07-22 15:56:28 -05:00
Anthony Viallard d3e8218b50 SIMCOM: add a quirk to fix crsm request 2013-07-22 15:49:59 -05:00
Anthony Viallard d1ac1ba3d4 SIMCOM: add a quirk for signal strength reporting
We must tell we want the signal strength reporting using
AT+AUTOCSQ command (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §10.7").
2013-07-22 15:48:59 -05:00
Anthony Viallard 8c6eea3385 SIMCOM: add a quirk for AT+CNMI command building
Use mode=1 otherwise it fails (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §6.9")
2013-07-22 15:48:59 -05:00
Marcel Holtmann aacc10271e build: Use dummy=yes assignment for pkg-config check 2013-07-19 08:30:19 -07:00
Jesper Larsen dff2657093 sim900: Use SIM900 quirk for gprs context
Use the module specific quirk for gprs by using the vendor entry
OFONO_VENDOR_SIMCOM_SIM900
2013-07-19 09:01:09 -05:00
Jesper Larsen ff2051053c atmodem: Add gprs-context quirk for SIM900
The SIM900 module from SIMCOM does have a AT+CGDATA command.
However, it is not possible to make a ppp connection when CGDATA
has been used to bring up the gprs context.

This patch adds a quirk that uses the alternative ATD*99***<cid>#
command instead.
2013-07-18 14:10:38 -05:00
Jesper Larsen f6930db19c atmodem: Add vendor entry for SIM900 module 2013-07-18 14:10:38 -05:00
Marcel Holtmann 1edf7d5b5e build: Build a simpler version of libgdbus-internal 2013-07-18 08:04:22 -07:00
Lucas De Marchi ba9d78d229 build-sys: Use libgdbus-internal.la
With the current approach if we have different CFLAGS for each binary we would
build gdbus several times for no reason.

Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
a convenience library thas is used internally only, thus with a "-internal"
suffix.
2013-07-18 07:54:17 -07:00
Jesper Larsen cf031b11f9 sim900: Fix order of dlc prefixes
The order of the defines for the dlc prefixes does not match
the order of the array containing the strings to print.
2013-07-17 10:28:24 -05:00
Denis Kenzior 0bc4e32db1 AUTHORS: Mention Jesper's contributions 2013-07-17 10:19:58 -05:00
Jesper Larsen 33b4645f41 sim900: Enable serial receiver
The read option must be set to 'on' in order for two-way
communication with SIM900 module to work.
2013-07-17 10:19:11 -05:00
Gustavo Padovan a96aa11bb5 dundee: return error if there is a connection procedure ongoing 2013-06-29 21:10:21 +02:00
Frederic Danis d6a601f8d1 hfp_hf_bluez5: Fix SDP record with correct features 2013-06-26 10:39:11 -05:00
Frederic Danis 8fb70d6271 hfpmodem: Fix ECNR HF feature 2013-06-26 10:39:08 -05:00
Henrique Dante de Almeida 2e2b588a46 gdbus: Remove proxies when client disconnects
Remove proxies and generate proxy_removed callbacks even when there are
no corresponding InterfaceRemoved signals.

This patch fixes having zombie gdbus proxy object when a server
disconnects without sending InterfaceRemoved signals. These objects
may interact with new server instances, for example, making
InterfaceAdded signals of new objects with the same name be filtered
out as duplicated, or staying allocated, but unused, if the new server
doesn't reuse the object paths. Note that as a side-effect, the
lifetime of a gdbus proxy becomes stricter: it lives at most for the
duration of a single connection to a single instance of a server
process.
2013-06-19 08:11:35 +02:00
Lucas De Marchi 53a0fa8c7c common: Fix parsing SS control string
It's not possible to be both greater than '9' and less than '0'. This
would lead to accepting things like "#$33#" as activation and "*$33#" as
deactivation, even though the string makes no sense.
2013-05-22 21:40:19 -05:00
Lucas De Marchi 816b6946f7 gitignore: Ignore file generated by Automake 1.13
Automake >= 1.13 enables parallel-tests option by default which uses a
test-driver script (copied by automake). Ignore this file and the files
generated by this script.
2013-05-22 21:38:48 -05:00
Lucas De Marchi 874a9ee285 stk: Fix sizeof on memcpy
src/stk.c: In function ‘__ofono_cbs_sim_download’:
src/stk.c:283:45: error: argument to ‘sizeof’ in ‘memcpy’ call is the
same expression as the source; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
  memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
                                               ^
2013-05-22 21:37:52 -05:00
Anderson Lizardo 1c75edf59a gdbus: Fix using NULL DBusPendingCall when disconnected from D-Bus
From D-Bus documentation for dbus_connection_send_with_reply():

"Warning: if the connection is disconnected or you try to send Unix file
descriptors on a connection that does not support them, the
DBusPendingCall will be set to NULL, so be careful with this."

Fix these errors when killing D-Bus daemon with the client still
running:

process 5712: arguments to dbus_pending_call_set_notify() were
incorrect, assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 596.
This is normally a bug in some application using the D-Bus library.
process 5712: arguments to dbus_pending_call_unref() were incorrect,
assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 572.
This is normally a bug in some application using the D-Bus library.
2013-05-08 11:28:11 +02:00
Anderson Lizardo 4059dd878c gdbus: Fix segfault when D-Bus daemon exits
Fix this crash if D-Bus exits while the client is still connected to it:

==5570== Invalid read of size 1
==5570==    at 0x402D28E: strcmp (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==5570==    by 0x4070E22: g_str_equal (ghash.c:1704)
==5570==    by 0x8055F61: message_filter (client.c:1123)
==5570==    by 0x4141500: dbus_connection_dispatch (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==5570==    by 0x80506F7: message_dispatch (mainloop.c:76)
==5570==    by 0x4081A7E: g_timeout_dispatch (gmain.c:3882)
==5570==    by 0x4080D85: g_main_context_dispatch (gmain.c:2539)
==5570==    by 0x4081124: g_main_context_iterate.isra.21 (gmain.c:3146)
==5570==    by 0x408156A: g_main_loop_run (gmain.c:3340)
==5570==    by 0x41BF4D2: (below main) (libc-start.c:226)
==5570==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==5570==
==5570==
2013-05-08 11:28:11 +02:00
Luiz Augusto von Dentz 0ecd3562a0 gdbus: Fix calling GetManagedObjects twice in a row
Calling g_dbus_client_new followed by g_dbus_client_set_proxy_handlers
cause two calls to GetManagedObjects in a row as GetNameOwner reply is
asyncronously it triggers the second call because the handlers have
been set by g_dbus_client_set_proxy_handlers.
2013-05-03 23:43:06 -07:00
Vinicius Costa Gomes 8caf91bf0f handsfree-audio: Fix replying to an empty D-Bus message
In the case that ofono_handsfree_card_connect_sco() is called outside the
context of a .Connect() call, there's no message we need to reply.  This
happens, for example, when the HFP AG plugin initiates a SCO connection when
it receives an AT+BCC command from the HF.
2013-05-03 11:31:44 -05:00
Vinicius Costa Gomes 856a884052 hfp_hf_bluez5: Enable WB only with defer_setup
When setting the SDP features, only enable wideband speech support if
the kernel has defer setup for SCO.

It is possible that even if defer setup is supported the kernel is
not able to use Transparent Mode for SCO.
2013-04-25 17:51:59 -05:00
Vinicius Costa Gomes 4b067e6ffa handsfree-audio: Implement ofono_handsfree_audio_has_defer_setup() 2013-04-25 17:51:15 -05:00
Vinicius Costa Gomes 66225c5ebd include: Add ofono_handsfree_audio_has_defer_setup() 2013-04-25 17:49:27 -05:00
Denis Kenzior ff27e74eee Revert "hfp_hf_bluez5: UUIDs can change after Pairing"
This reverts commit 456b8c9723.
2013-04-25 17:47:05 -05:00
Vinicius Costa Gomes e1de3c7f2e hfp_hf_bluez5: Register the SDP record with correct features 2013-04-25 03:40:19 -05:00
Vinicius Costa Gomes c07a2fc24c hfp: Add defines for HFP SDP feature bits 2013-04-25 03:38:44 -05:00
Vinicius Costa Gomes 48cb2e5249 bluez5: Unify bt_register_profile_* into a single function
It was a cause of confusion for little gain to have separate
functions for registering profiles with extra information, for
example "role" and "features". We remove those helper functions
in favor of a single one with more parameters, "role" and
"feature" when NULL, will be ignored.
2013-04-25 03:38:11 -05:00
Claudio Takahasi 9a3cfcd109 core: Add SetProperty for EchoCancelingNoiseReduction
This patch extends SetProperty method of the Handsfree interface
allowing to disable echo canceling and noise reduction feature in
the audio gateway through a D-Bus method call. Once disabled, it
is not allowed to enable it using this procedure.
2013-04-23 10:30:15 -05:00
Claudio Takahasi cf6dce3445 hfpmodem: Add EchoCancelingNoiseReduction
This patch adds echo canceling and noise reduction implementation to
hfpmodem. It adds the implementation to send the command "AT+NREC=0"
to the AG.
2013-04-23 10:28:46 -05:00
Claudio Takahasi c90b703289 include: Add disable_nrec to handsfree driver
This patch extends the handsfree driver adding echo canceling and noise
reduction callback to allow disabling this feature in the audio gateway.
2013-04-23 10:20:22 -05:00
Claudio Takahasi 275fe0df81 core: Set EchoCancelingNoiseReduction to TRUE by default
According to Bluetooth HFP spec: By default, if the AG supports its
own embedded echo canceling and/or noise reduction functions, it shall
have them activated until the AT+NREC command is received. The
configuration set by the HF shall by used by the AG while the Service
Level Connection is active.

Since there isn't a command to query the current value, it is being
assumed that Echo Canceling and Noise Reduction is enabled when the
connection is established and the gateway supports this feature.
2013-04-23 10:20:02 -05:00
Claudio Takahasi 6ef7d4fa88 core: Add EchoCancelingNoiseReduction to GetProperties
This patch adds EchoCancelingNoiseReduction property to GetProperties
method of Handsfree interface.
2013-04-23 10:19:35 -05:00
Claudio Takahasi 1b355c4232 core: Add "echo-canceling-and-noise-reduction"
This patch adds "echo-canceling-and-noise-reduction" to "Features"
property of the Handsfree interface.
2013-04-23 10:19:07 -05:00
Claudio Takahasi dcf2ca0c41 doc: Add EchoCancelingNoiseReduction to Handsfree
This patch adds echo canceling and noise reduction property to Handsfree
interface, allowing the handsfree unit to disable this feature in the
audio gateway. The HFP spec defines the procedure to turn off echo
canceling and noise reduction only, it is not allowed to enable this
feature from the HF unit.

According to Bluetooth HFP 1.6 spec: By default, if the AG supports its
own embedded echo canceling and/or noise reduction functions, it shall
have them activated until the AT+NREC command is received from the HF
unit. From then on, and until the current Service Level Connection is
dropped for any reason, the AG shall disable these functions every time
an Audio Connection is established.
2013-04-23 10:18:47 -05:00
Paulo Borges 7b56ca2730 hfp_ag_bluez5: Implement RequestDisconnection()
When a RequestDisconnect() is received, the socket must be closed.
This way, the related emulator will be freed.
2013-04-22 03:55:21 -05:00
Paulo Borges 9332299bb7 hfp_ag_bluez5: Add watch for G_IO_HUP when connect
A watch to G_IO_HUP is added to remove the file descriptor when the
emulator is automatically disconnected when its GAtServer closes.

We use a dupped file descriptor because the events aren't delivered to
the file descriptor who originated them.
2013-04-22 03:54:24 -05:00
Paulo Borges d062d485d6 hfp_ag_bluez5: Create a hash to store connections
We need to store active connections so we can disconnect them at
RequestDisconnect().

When we remove a connection from the hash, we also close it.
2013-04-22 03:53:42 -05:00
Paulo Borges fc7de0f6e1 hfp_ag_bluez5: Remove unused includes 2013-04-18 08:43:25 -05:00
Paulo Borges 2e9cb14e26 hfp: Move HFP versions definitions to hfp.h
hfp.h should store all HFP related definitions.
2013-04-18 08:43:21 -05:00
Paulo Borges 4245df6200 hfp_ag_bluez5: Include hfp.h 2013-04-18 08:42:44 -05:00
Paulo Borges f1e29338ba phonesim: Include hfp.h 2013-04-18 08:42:28 -05:00
Vinicius Costa Gomes 456b8c9723 hfp_hf_bluez5: UUIDs can change after Pairing
For example, in the case of a remote-initiated pairing, the device may
be created and Paired first, then the UUID array is emitted later.
2013-04-18 08:37:17 -05:00
João Paulo Rechi Vita a2d0f434fa handsfree-audio: Add debug logging
Print debug messages when Handsfree Audio Agent registers or unregisters
itself.
2013-04-16 14:20:40 -05:00
Paulo Borges 82909259c4 emulator: Change feature check to attend HFP 1.6
HFP 1.6 adds a new feature called Codec Negotitation. For the HF Role,
this feature is stored in bit 8 of the supported features
bitmap.

This patch changes the range of valid HF feature bitmaps to 2^8-1.
2013-04-15 07:23:28 -05:00
Vinicius Costa Gomes 600539ed2a handsfree-audio: Toggle wideband support when the agent registers
Each time an agent registers itself, we check if we support deferred
setup and if the agent has mSBC as a codec, if both checks are true,
we enable wideband speech support.
2013-04-15 07:08:26 -05:00