Commit Graph

2377 Commits

Author SHA1 Message Date
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 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
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
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
Vinicius Costa Gomes 12df4fca94 handsfree-audio: Keep track whether defer_setup is enabled
'defer_setup' will be one of the inputs when enabling or disabling
support for wideband speech codecs, we will only enable wideband
speech support if the kernel supports deferred setup.

So, we have to have this information available, in this case it means
a global variable.
2013-04-15 07:07:23 -05:00
Claudio Takahasi f65070b377 handsfree-audio: Send the selected codec
This patch removes the hard-coded CVSD codec, and adds the selected
codec in the NewConnection method call, notifying the agent the codec
previously selected for the audio connection.
2013-04-15 07:01:59 -05:00
Vinicius Costa Gomes 9ef5953a56 handsfree-audio: Implement ofono_handsfree_card_set_codec() 2013-04-15 06:58:03 -05:00
Denis Kenzior e130f22715 handsfree-audio: Move codec enums to hfp.h 2013-04-09 14:33:41 -05:00
Denis Kenzior ad43b3d248 core: Include hfp.h 2013-04-09 14:33:41 -05:00
Denis Kenzior 2cdccd4e42 core: Add hfp.h
This will serve as a collection point for all HFP related definitions.
2013-04-09 14:33:41 -05:00
Vinicius Costa Gomes b2273d313f handsfree-audio: Remove unused 'codecs' field from agent
Now that we only keep track whether we support wideband speech or not, we
don't have to keep track of the list of codecs supported by the Agent.
2013-04-09 14:33:41 -05:00
Vinicius Costa Gomes 1c51856434 handsfree-audio: Implement ofono_handsfree_audio_has_wideband 2013-04-09 14:33:41 -05:00
Forest Bond 0e0eb227f2 modem: Support modem property "AlwaysOnline"
This can be set by the modem driver to indicate that the device is
always in the online state when it is enabled.  This is useful for
modem drivers that handle both CDMA and GSM devices.
2013-04-01 21:41:58 -05:00
Forest Bond b0ad1ecb8f modem: Allow setting boolean properties 2013-03-28 09:47:32 -05:00
Vinicius Costa Gomes 9dd7bb365f handsfree-audio: Add .Connect using the card driver
Now each handsfree implementation may be notified that a card wants
its audio to be connected.
2013-03-28 09:34:39 -05:00
Vinicius Costa Gomes 4f02f03abb handsfree-audio: Add ofono_handsfree_card_connect_sco 2013-03-28 09:34:03 -05:00
Vinicius Costa Gomes 798ff5887b handsfree-audio: Reject .Connect() from other senders
Only the agent should be able to call .Connect() on the card.
2013-03-26 23:24:18 -05:00
Vinicius Costa Gomes cc5a86f1db handsfree-audio: Add support for sending the SCO socket
Send the SCO socket to the agent associated with the card that
just got connected.
2013-03-26 23:23:58 -05:00
Vinicius Costa Gomes c3cd427ee8 handsfree-audio: Add support for initiating SCO connections
When calling the card's .Connect() method, we should be able to
establish a SCO connection.

Right now, we only have support for establishing the SCO connection
directly, this is what is expected from HFP 1.5 HF/AG devices.
2013-03-26 23:23:39 -05:00
Vinicius Costa Gomes c735b26c06 ofono.conf: Punch hole for HandsfreeAudioAgent 2013-03-19 22:23:40 -05:00
Denis Kenzior 32ea0c683a handsfree_audio: Call driver remove() on removal 2013-03-18 14:06:56 -05:00
Claudio Takahasi 5d0ba72d04 core: Add bt_str2ba() to bluetooth.h
This patch adds a utility Bluetooth function to convert Bluetooth
address from string to bdaddr_t.
2013-03-18 14:00:15 -05:00
Denis Kenzior c86fcc3a70 handsfree-audio: Match new card API 2013-03-18 13:42:46 -05:00
Denis Kenzior f54ced9992 handsfree-audio: Implement get/set data 2013-03-18 13:42:46 -05:00
Denis Kenzior d081e3d5ea handsfree-audio: Add card driver registration 2013-03-18 13:42:46 -05:00
Claudio Takahasi 241e3ca74c handsfree-audio: Reject SCO if agent is unavailable
This patch rejects the incoming SCO connection if there isn't a
Handsfree Audio Agent registered.
2013-03-04 16:41:51 -06:00
Claudio Takahasi a6874a64b2 handsfree-audio: Reject SCO if Card is not ready
The Audio Card is being created when the NewConnection from BlueZ
Profile is received, and registered when the service level connection
negotiation finishes. This patch rejects SCO connection if the SCO
incoming connection arrives when the service level negotiation is
ongoing.
2013-03-04 16:41:51 -06:00
Claudio Takahasi 2c4015278d handsfree-audio: Check local SCO address
This patch verifies if the local Bluetooth address of the incoming
connection also matches with one of available audio cards.
2013-03-04 16:41:51 -06:00
Claudio Takahasi 4a6ecaf28b handsfree-audio: Add NewConnection
This patch adds Agent NewConnection call. The card object path, the SCO
file descriptor, and the codec are being passed to the agent. This
initial version supports CVSD codec only.
2013-03-04 16:41:51 -06:00
Claudio Takahasi 9504427173 handsfree-audio: Add SCO handling
Unlike the previous implementation in the plugin, the SCO/SLC matching
is done based on the Audio Card objects.

Audio Cards are created when the RFCOMM fd descriptor is received, and
registered when the service level connetion is established.
2013-03-04 16:39:53 -06:00
Claudio Takahasi 1095e4a126 core: Add new Bluetooth header
This patch adds the Bluetooth utility funtions and socket type
declarations to a new header src/bluetooth.h, allowing to share it
between core, and plugins.
2013-03-04 16:08:59 -06:00
Claudio Takahasi 4fcd084859 handsfree-audio: Check CVSD when registering agent
This patch makes CVSD codec mandatory when registering a Handsfree
Audio Agent.
2013-03-01 13:32:11 -06:00
Denis Kenzior c7a3f3990a handsfree-audio: properly increment next_card_id 2013-02-26 15:47:08 -06:00
Denis Kenzior ff2d68f2eb handsfree-audio: Impelement CardRemoved signal 2013-02-26 14:14:46 -06:00
Denis Kenzior dfacb14968 handsfree-audio: Implement CardAdded signal 2013-02-26 14:14:46 -06:00
Denis Kenzior b76bb56dae handsfree-audio: Implement the GetCards method 2013-02-26 14:14:46 -06:00
Denis Kenzior 1c75912380 handsfree-audio: Implement card GetProperties 2013-02-26 14:14:46 -06:00
Denis Kenzior 44281e53a9 handsfree-audio: Unregister from DBus on removal 2013-02-26 14:14:46 -06:00
Denis Kenzior f3a7069c47 handsfree-audio: Add skeleton D-Bus registration
For HandsfreeAudioCard objects
2013-02-26 14:14:46 -06:00
Denis Kenzior b179adf879 handsfree-audio: Don't hardcode '/' path
Use OFONO_MANAGER_PATH instead
2013-02-26 14:14:46 -06:00
Denis Kenzior dfeb91fc08 handsfree-audio: Implement card create / remove 2013-02-26 11:09:48 -06:00
Claudio Takahasi 82fae93ca1 audio-settings: Fix unneeded async for GetProperties
GetProperties method call for Audio settings returns the reply in the
same iteraction, it doesn't need to be asynchronous.
2013-02-25 12:21:35 -06:00
Denis Kenzior 951e03dfea handsfree-audio: Add ref / unref support 2013-02-21 08:27:55 -06:00
Denis Kenzior 5f787fed4e handsfree-audio: Don't go over 80 characters 2013-02-20 21:28:01 -06:00
Claudio Takahasi 555a883ecb handsfree-audio: Add Agent tracking
This patch tracks when the Handsfree Audio Agent leaves the system BUS,
and free agent allocated resources.
2013-02-20 21:27:01 -06:00
Claudio Takahasi 7a7bb7399a handsfree-audio: Call Agent "Release" when exiting
This patch notifies the Agent implementation that it is no longer
registered to the service daemon.
2013-02-20 21:26:57 -06:00