OSDN Git Service

android-x86/external-bluetooth-bluez.git
12 years agoConvert unit tests from GLib to GNU Check
Johan Hedberg [Mon, 24 Oct 2011 21:37:34 +0000 (23:37 +0200)]
Convert unit tests from GLib to GNU Check

12 years agoAdd get_le/get_be helpers
Andrei Emeltchenko [Mon, 24 Oct 2011 09:20:04 +0000 (12:20 +0300)]
Add get_le/get_be helpers

Helpers to access LE / BE values. In different Bluetooth
protocols/profiles there is a mixture of LE / BE byte order.

12 years agoMake whitespace usage consistent in mgmt-api.txt
Johan Hedberg [Mon, 24 Oct 2011 20:48:14 +0000 (22:48 +0200)]
Make whitespace usage consistent in mgmt-api.txt

12 years agomgmt: Rename Name Info command to match corresponding flag
Johan Hedberg [Mon, 24 Oct 2011 20:44:50 +0000 (22:44 +0200)]
mgmt: Rename Name Info command to match corresponding flag

12 years agomgmt: Allow specifying discovery type for Start Discovery
Johan Hedberg [Mon, 24 Oct 2011 16:09:01 +0000 (18:09 +0200)]
mgmt: Allow specifying discovery type for Start Discovery

12 years agoAdd new command and event for LTK storage support
Vinicius Costa Gomes [Mon, 24 Oct 2011 13:33:32 +0000 (15:33 +0200)]
Add new command and event for LTK storage support

This documents the new command and event that are to be added to
the Management API to add support for persistent pairing of LE
devices.

12 years agoAdd device type to found and connected mgmt events
Johan Hedberg [Mon, 24 Oct 2011 12:25:58 +0000 (14:25 +0200)]
Add device type to found and connected mgmt events

12 years agoAdd User Passkey commands and events to mgmt
Johan Hedberg [Mon, 24 Oct 2011 12:25:34 +0000 (14:25 +0200)]
Add User Passkey commands and events to mgmt

12 years agoRename mgmt key commands and events
Johan Hedberg [Mon, 24 Oct 2011 12:24:53 +0000 (14:24 +0200)]
Rename mgmt key commands and events

12 years agoAdd timeout to Set Discoverable mgmt command
Johan Hedberg [Mon, 24 Oct 2011 12:14:53 +0000 (14:14 +0200)]
Add timeout to Set Discoverable mgmt command

12 years agoUpdate controller info command with current plan
Johan Hedberg [Mon, 24 Oct 2011 12:14:16 +0000 (14:14 +0200)]
Update controller info command with current plan

12 years agoFix whitespace for fast connectable mgmt command doc
Johan Hedberg [Mon, 24 Oct 2011 10:56:55 +0000 (12:56 +0200)]
Fix whitespace for fast connectable mgmt command doc

12 years agoAdd (legacy) name resolution handling to mgmt API
Johan Hedberg [Mon, 24 Oct 2011 10:16:18 +0000 (12:16 +0200)]
Add (legacy) name resolution handling to mgmt API

12 years agoUnregister players' events when disconnected
Lucas De Marchi [Fri, 21 Oct 2011 17:58:27 +0000 (15:58 -0200)]
Unregister players' events when disconnected

12 years agoFix leak of GTimer
Lucas De Marchi [Fri, 21 Oct 2011 17:58:26 +0000 (15:58 -0200)]
Fix leak of GTimer

12 years agoAdd missing TRACK-REACHED-START event
Lucas De Marchi [Fri, 21 Oct 2011 17:58:25 +0000 (15:58 -0200)]
Add missing TRACK-REACHED-START event

When track is changed, we automatically start to play it, therefore we
need to notify CT regarding this event.

12 years agoFix handling of dbus signals
Lucas De Marchi [Fri, 21 Oct 2011 17:58:24 +0000 (15:58 -0200)]
Fix handling of dbus signals

We're previously leaking a D-Bus message and always returning that
the signal was not handled.

12 years agoAdd EIR length parameter to eir_parse()
Frédéric Danis [Fri, 21 Oct 2011 10:10:23 +0000 (12:10 +0200)]
Add EIR length parameter to eir_parse()

LE uses shorter EIR (31 bytes) than HCI (240 bytes)

12 years agoAdd btohll / htobll macros
Andrei Emeltchenko [Tue, 18 Oct 2011 08:23:11 +0000 (11:23 +0300)]
Add btohll / htobll macros

Handle 64 bit swap

12 years agoAdd definitions for L2CAP fixed channels
Andrei Emeltchenko [Tue, 18 Oct 2011 08:23:10 +0000 (11:23 +0300)]
Add definitions for L2CAP fixed channels

12 years agoSimplify eir_parse_uuid* functions
Frédéric Danis [Thu, 20 Oct 2011 12:53:04 +0000 (14:53 +0200)]
Simplify eir_parse_uuid* functions

12 years agoAdd unit/test-eir to .gitignore
Frédéric Danis [Thu, 20 Oct 2011 08:53:37 +0000 (10:53 +0200)]
Add unit/test-eir to .gitignore

12 years agoSimplify eir_parse function
Frédéric Danis [Thu, 20 Oct 2011 08:53:36 +0000 (10:53 +0200)]
Simplify eir_parse function

12 years agoFix MediaPlayer documentation
Lucas De Marchi [Wed, 19 Oct 2011 12:05:00 +0000 (10:05 -0200)]
Fix MediaPlayer documentation

12 years agoFix leak of dbus message
Lucas De Marchi [Tue, 18 Oct 2011 23:24:39 +0000 (21:24 -0200)]
Fix leak of dbus message

12 years agoFix release all sessions on powering adapter off
Dmitriy Paliy [Wed, 19 Oct 2011 08:19:58 +0000 (11:19 +0300)]
Fix release all sessions on powering adapter off

When adapter is powered off, all sessions should be released without
changing mode, which is contrary to what session_remove does. This
prevents from such situation when powering off leads to new mode
derived from mode_sessions.

Currently, if there are multiple mode sessions requested by different
clients, powering adapter off results in powering immediately it on.

12 years agosbc: Reduce for-loop induced indentation in sbc_unpack_frame
Johan Hedberg [Wed, 19 Oct 2011 08:09:13 +0000 (11:09 +0300)]
sbc: Reduce for-loop induced indentation in sbc_unpack_frame

12 years agosbc: overflow bugfix and audio decoding quality improvement
Siarhei Siamashka [Mon, 17 Oct 2011 01:24:38 +0000 (04:24 +0300)]
sbc: overflow bugfix and audio decoding quality improvement

The "(((audio_sample << 1) | 1) << frame->scale_factor[ch][sb])"
part of expression
    "frame->sb_sample[blk][ch][sb] =
        (((audio_sample << 1) | 1) << frame->scale_factor[ch][sb]) /
        levels[ch][sb] - (1 << frame->scale_factor[ch][sb])"
in "sbc_unpack_frame" function can sometimes overflow 32-bit signed int.
This problem can be reproduced by first using bitpool 128 and encoding
some random noise data, and then feeding it to sbc decoder. The obvious
thing to do would be to change "audio_sample" variable type to uint32_t.

However the problem is a little bit more complicated. According
to the section "12.6.2 Scale Factors" of A2DP spec:
    scalefactor[ch][sb] = pow(2.0, (scale_factor[ch][sb] + 1))

And according to "12.6.4 Reconstruction of the Subband Samples":
    sb_sample[blk][ch][sb] = scalefactor[ch][sb] *
        ((audio_sample[blk][ch][sb]*2.0+1.0) / levels[ch][sb]-1.0);

Hence the current code for calculating "sb_sample[blk][ch][sb]" is
not quite correct, because it loses one least significant bit of
sample data and passes twice smaller sample values to the synthesis
filter (the filter also deviates from the spec to compensate this).
This all has quite a noticeable impact on audio quality. Moreover,
it makes sense to keep a few extra bits of precision here in order
to minimize rounding errors. So the proposed patch introduces a new
SBCDEC_FIXED_EXTRA_BITS constant and uses uint64_t data type
for intermediate calculations in order to safeguard against
overflows. This patch intentionally addresses only the quality
issue, but performance can be also improved later (like replacing
division with multiplication by reciprocal).

Test for the difference of sbc encoding/decoding roundtrip vs.
the original audio file for joint stereo, bitpool 128, 8 subbands
and http://media.xiph.org/sintel/sintel-master-st.flac sample
demonstrates some quality improvement:

=== before ===
    --- comparing original / sbc_encoder.exe + sbcdec ---
    stddev:    4.64 PSNR: 82.97 bytes:170495708/170496000
=== after ===
    --- comparing original / sbc_encoder.exe + sbcdec ---
    stddev:    1.95 PSNR: 90.50 bytes:170495708/170496000

12 years agoUse color output for unit tests
Marcel Holtmann [Tue, 18 Oct 2011 22:48:36 +0000 (15:48 -0700)]
Use color output for unit tests

12 years agoAdd basic unit tests framework for EIR parsing
Johan Hedberg [Tue, 18 Oct 2011 11:33:32 +0000 (14:33 +0300)]
Add basic unit tests framework for EIR parsing

12 years agoFix implicit declaration of 'g_slist_free_full'
Frédéric Danis [Tue, 18 Oct 2011 10:10:53 +0000 (12:10 +0200)]
Fix implicit declaration of 'g_slist_free_full'

audio/avrcp.c: In function 'avrcp_unregister':
audio/avrcp.c:1253: error: implicit declaration of function 'g_slist_free_full'

thermometer/thermometer.c: In function 'destroy_char':
thermometer/thermometer.c:79: error: implicit declaration of function 'g_slist_free_full'

12 years agoMove SDP client functions from glib-helper.c to sdp-client.c
Johan Hedberg [Tue, 18 Oct 2011 08:15:23 +0000 (11:15 +0300)]
Move SDP client functions from glib-helper.c to sdp-client.c

12 years agoAdd glib-compat.h to deal with issues in old GLib versions
Johan Hedberg [Tue, 18 Oct 2011 07:57:06 +0000 (10:57 +0300)]
Add glib-compat.h to deal with issues in old GLib versions

12 years agoAVRCP: Implement RequestContinuingResponse PDU
Lucas De Marchi [Mon, 17 Oct 2011 20:34:31 +0000 (18:34 -0200)]
AVRCP: Implement RequestContinuingResponse PDU

12 years agoAVRCP: Implement AbortContinuingResponse PDU
Lucas De Marchi [Mon, 17 Oct 2011 20:34:30 +0000 (18:34 -0200)]
AVRCP: Implement AbortContinuingResponse PDU

12 years agoAVRCP: respond with UINT32_MAX if duration is not available
Lucas De Marchi [Mon, 17 Oct 2011 20:34:29 +0000 (18:34 -0200)]
AVRCP: respond with UINT32_MAX if duration is not available

Section 5.4.1 of AVRCP 1.3 spec says:

If TG does not support SongLength And SongPosition on TG, then TG shall
return 0xFFFFFFFF.

SongPosition is always available, but song length depends on user to
provied it.

12 years agoAVRCP: implement TRACK-REACHED-START event
Lucas De Marchi [Mon, 17 Oct 2011 20:34:28 +0000 (18:34 -0200)]
AVRCP: implement TRACK-REACHED-START event

12 years agoAVRCP: Use track's UID in event notification
Lucas De Marchi [Mon, 17 Oct 2011 20:34:27 +0000 (18:34 -0200)]
AVRCP: Use track's UID in event notification

When registering for TRACK_CHANGED event, CT expects the track's UID in
the INTERIM and CHANGED responses. According to AVRCP 1.3 spec, there
are only 2 possible values:
1) 0: there's a track selected
2) UINT32_MAX: there's no track selected

AVRCP 1.4 reserves the value UINT64_MAX for the second case. Since this
later value is the one used in certification process for best IOP
we return UINT64_MAX instead of the former.

This implementation allows to pass PTS test TP/NFY/BV-05-C.

12 years agohciops: fix discov_state when powering off an adapter
Johan Hedberg [Mon, 17 Oct 2011 15:11:01 +0000 (18:11 +0300)]
hciops: fix discov_state when powering off an adapter

12 years agoSimplify property variable usage in btd_adapter_stop
Johan Hedberg [Mon, 17 Oct 2011 14:43:01 +0000 (17:43 +0300)]
Simplify property variable usage in btd_adapter_stop

12 years agoFix updating Adapter.Discovering property when powering off
Johan Hedberg [Mon, 17 Oct 2011 14:38:56 +0000 (17:38 +0300)]
Fix updating Adapter.Discovering property when powering off

12 years agoFix input pending connect handling
Chan-yeol Park [Mon, 17 Oct 2011 12:07:37 +0000 (21:07 +0900)]
Fix input pending connect handling

iconn->pending_connect needs to be freed after sending the error reply

12 years agohciops: fix adapter initialization when commands are missed
Luiz Augusto von Dentz [Mon, 17 Oct 2011 09:47:28 +0000 (12:47 +0300)]
hciops: fix adapter initialization when commands are missed

Sometimes after e.g, suspend we miss some initialization commands from
the kernel, even though we had a workaround for this it doesn't really
work as expected since the adapter must be up in order to resend.

To fix this problem the resend logic is moved after DEVUP.

12 years agoSimplify process_thermometer_char() logic
Johan Hedberg [Mon, 17 Oct 2011 08:25:25 +0000 (11:25 +0300)]
Simplify process_thermometer_char() logic

12 years agoFix thermometer Intermediate property changes
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:22 +0000 (17:29 +0200)]
Fix thermometer Intermediate property changes

Set Intermediate property if intermediate temperature characteristic is
supported

12 years agoRead measurement interval characteristic
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:21 +0000 (17:29 +0200)]
Read measurement interval characteristic

12 years agoRead temperature type characteristic
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:20 +0000 (17:29 +0200)]
Read temperature type characteristic

12 years agoGet all characteristics in thermometer service
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:19 +0000 (17:29 +0200)]
Get all characteristics in thermometer service

12 years agoAdd handler function to manage GATT indications
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:18 +0000 (17:29 +0200)]
Add handler function to manage GATT indications

12 years agoAdd functions to manage attio callbacks
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:17 +0000 (17:29 +0200)]
Add functions to manage attio callbacks

12 years agoUnregister Health Thermometer Interface
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:16 +0000 (17:29 +0200)]
Unregister Health Thermometer Interface

12 years agoRegister Health Thermometer Interface
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:15 +0000 (17:29 +0200)]
Register Health Thermometer Interface

12 years agoGet thermometer service range to load the driver.
Santiago Carot-Nemesio [Thu, 13 Oct 2011 15:29:14 +0000 (17:29 +0200)]
Get thermometer service range to load the driver.

12 years agohcitool: Fix EIR parsing
Johan Hedberg [Fri, 14 Oct 2011 11:23:05 +0000 (14:23 +0300)]
hcitool: Fix EIR parsing

There were missing buffer size checks and wrong assumptions about the
EIR data length (core spec 4.0 defines it to be max 31 bytes, so the
name can be max 29 bytes).

12 years agoFix leaks and buffer overflows in EIR parsing
Johan Hedberg [Fri, 14 Oct 2011 08:15:14 +0000 (11:15 +0300)]
Fix leaks and buffer overflows in EIR parsing

By calling g_utf8_validate and allocating eir->name inside the parsing
loop the code was exposing itself to buffer overflows and memory leaks.
This is because the check for incorrect length fields is only done after
exiting the loop (if (len > HCI_MAX_EIR_LENGTH)). By only setting a
pointer to the name and doing the processing after checking the length
validity both issues can be avoided.

12 years agoAdd support for parsing the remote name during LE Scan
Vinicius Costa Gomes [Thu, 13 Oct 2011 21:39:07 +0000 (18:39 -0300)]
Add support for parsing the remote name during LE Scan

12 years agoMake title always available in metadata
Lucas De Marchi [Thu, 13 Oct 2011 12:57:03 +0000 (09:57 -0300)]
Make title always available in metadata

12 years agoDon't overwrite metadata when changing track
Lucas De Marchi [Thu, 13 Oct 2011 12:57:02 +0000 (09:57 -0300)]
Don't overwrite metadata when changing track

If we use the same hash table to set the new metadata, we have 2
undesired behaviors:

1) New track may contain fields from previous track if it didn't set all
the fields
2) If we fail on parsing the signal, we will still change some of the
fields

12 years agoFix +CLCC in maemo6 during CSD_CALL_STATUS_COMING
Dmitriy Paliy [Thu, 13 Oct 2011 10:25:51 +0000 (13:25 +0300)]
Fix +CLCC in maemo6 during CSD_CALL_STATUS_COMING

This fixes the same issue as in 8a6119ea1c685fc61419ee444a5967596f524c1c
but for CSD_CALL_STATUS_COMING. Call status change sequence in csd is
IDLE to COMING, COMING to PROCEEDING, and PROCEEDING to WAITING.

Returned 'state of the call' value after CSD_CALL_STATUS_COMING, as well
as after CSD_CALL_STATUS_PROCEEDING, in +CLCC shall be 5 (waiting, MT
call) instead of 4 (incoming, MT call) in maemo6 telephony driver for the
second incoming call.

12 years agoFix crash on power off in maemo6 after sending DTMF
Dmitriy Paliy [Thu, 13 Oct 2011 10:02:38 +0000 (13:02 +0300)]
Fix crash on power off in maemo6 after sending DTMF

This fixes regression introduced in
b48e610314fb466035b198f594c5b6a68126fcf1. Crash happens when powering
off adapter after sending DTMF tone.

12 years agoImprove test/simple-player to allow user interaction
Lucas De Marchi [Wed, 12 Oct 2011 15:11:22 +0000 (12:11 -0300)]
Improve test/simple-player to allow user interaction

Allow user to trigger TrackChanged and PropertyChanged. Calls made by
remote side (coming from D-Bus) are printed to stderr while the ones to
interact with user go to stdout.

12 years agoRefactor to share code
Lucas De Marchi [Wed, 12 Oct 2011 15:11:21 +0000 (12:11 -0300)]
Refactor to share code

Refactor code when we are 'listing selected attributes' to share code
with 'listing all attributes'. This way we always keep the list of
attributes in a GList, and call player_get_media_attribute() in only one
place.

12 years agoAVRCP: Only return available metadata attributes
Lucas De Marchi [Wed, 12 Oct 2011 15:11:20 +0000 (12:11 -0300)]
AVRCP: Only return available metadata attributes

When remote side requests all available metadata (i.e. it gives number
attributes equals to 0) do not return zero-length strings for
unavailable items. The only exception is title, that must be always present.

12 years agoAVRCP: Check if len matches number of IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:19 +0000 (12:11 -0300)]
AVRCP: Check if len matches number of IDs

If number of attributes remote side provided is larger than the length
we read, we would read garbage from stack memory.

12 years agoAVRCP: Return error for invalid metadata IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:18 +0000 (12:11 -0300)]
AVRCP: Return error for invalid metadata IDs

12 years agoAdd callback to list available metadata IDs
Lucas De Marchi [Wed, 12 Oct 2011 15:11:17 +0000 (12:11 -0300)]
Add callback to list available metadata IDs

12 years agoAVRCP: Do not list values for unsupported attributes
Lucas De Marchi [Wed, 12 Oct 2011 15:11:16 +0000 (12:11 -0300)]
AVRCP: Do not list values for unsupported attributes

12 years agoMove debug messages to their correspondent getters
Lucas De Marchi [Wed, 12 Oct 2011 15:11:15 +0000 (12:11 -0300)]
Move debug messages to their correspondent getters

12 years agoFix typo on doc
Lucas De Marchi [Wed, 12 Oct 2011 15:11:12 +0000 (12:11 -0300)]
Fix typo on doc

12 years agoAdd mpris-player to .gitignore
Lucas De Marchi [Wed, 12 Oct 2011 15:11:11 +0000 (12:11 -0300)]
Add mpris-player to .gitignore

12 years agoAdd Szymon Janc to AUTHORS
Johan Hedberg [Wed, 12 Oct 2011 13:53:58 +0000 (16:53 +0300)]
Add Szymon Janc to AUTHORS

12 years agoAdd Lucas De Marchi to AUTHORS
Johan Hedberg [Wed, 12 Oct 2011 13:52:29 +0000 (16:52 +0300)]
Add Lucas De Marchi to AUTHORS

12 years agoRemove leftover code of primary service storage
Claudio Takahasi [Tue, 11 Oct 2011 18:47:36 +0000 (15:47 -0300)]
Remove leftover code of primary service storage

Primary services related to a given address is already being removed
in delete_device_service() function.

12 years agoRemove leftover code of device type storage
Claudio Takahasi [Tue, 11 Oct 2011 18:47:35 +0000 (15:47 -0300)]
Remove leftover code of device type storage

12 years agoUpdate control documentation to reflect the implementation
Luiz Augusto von Dentz [Mon, 10 Oct 2011 11:07:40 +0000 (14:07 +0300)]
Update control documentation to reflect the implementation

Many of the methods and signal don't make much sense since we now have
a dedicated interfaces that are Media and MediaPlayer.

12 years agoFix call status in +CLCC for maemo6 telephony
Dmitriy Paliy [Tue, 11 Oct 2011 11:34:58 +0000 (14:34 +0300)]
Fix call status in +CLCC for maemo6 telephony

If list current calls is requested when there is second incoming call
and csd call status is CSD_CALL_STATUS_PROCEEDING, then returned 'state
of the call' value in +CLCC is 4 (incoming, MT call), which is incorrect.
Indication than proceeds from incoming to waiting state.

This patch sets the corresponding value to 5 (waiting, MT call) in
maemo6 telephony driver for the second call.

12 years agoFix compilation error on 32-bit systems
Johan Hedberg [Tue, 11 Oct 2011 21:48:59 +0000 (00:48 +0300)]
Fix compilation error on 32-bit systems

This fixes the following compilation error with GLib on 32-bit sytems:

audio/media.c: In function 'get_setting':
audio/media.c:1109:44: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
audio/media.c: In function 'set_setting':
audio/media.c:1132:41: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

12 years agoAdd mpris-player to test
Luiz Augusto von Dentz [Thu, 6 Oct 2011 12:46:31 +0000 (15:46 +0300)]
Add mpris-player to test

It gather information from players implementing mpris spec and convert
to org.bluez.MediaPlayer spec.

12 years agoAdd support for cancelling a LE Scan with Control-C
Vinicius Costa Gomes [Thu, 6 Oct 2011 18:03:27 +0000 (15:03 -0300)]
Add support for cancelling a LE Scan with Control-C

12 years agoFix using the attribute struct for encoding ATT pdus
Vinicius Costa Gomes [Thu, 6 Oct 2011 18:01:48 +0000 (15:01 -0300)]
Fix using the attribute struct for encoding ATT pdus

The enconding and decoding of ATT pdus should be kept as much
free of dependences from other parts of the code as possible, so
it can be used in many contexts.

In this case, for encoding and decoding notifications and indications
we did have to pass an instance of an attribute instead of direct
values.

12 years agoFix crash while registering player
Luiz Augusto von Dentz [Thu, 6 Oct 2011 15:35:17 +0000 (18:35 +0300)]
Fix crash while registering player

Crash is caused by not removed freed player from the list:

Invalid read of size 8
   at 0x13E7B5: media_adapter_find_player (media.c:861)
   by 0x13FEBC: register_player (media.c:1561)
   by 0x120DFE: process_message (object.c:224)
   by 0x4F6E9A0: ??? (in /lib64/libdbus-1.so.3.5.6)
   by 0x4F6092F: dbus_connection_dispatch (in /lib64/libdbus-1.so.3.5.6)
   by 0x11F787: message_dispatch (mainloop.c:80)
   by 0x4C762CA: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C74ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C752D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C75824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x11EE4B: main (main.c:485)
 Address 0x642ef30 is 16 bytes inside a block of size 80 free'd
   at 0x4A0662E: free (vg_replace_malloc.c:366)
   by 0x4C7B7F2: g_free (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x12D292: player_destroy (avrcp.c:1099)
   by 0x120C38: service_filter (watch.c:477)
   by 0x120950: message_filter (watch.c:527)
   by 0x4F608E5: dbus_connection_dispatch (in /lib64/libdbus-1.so.3.5.6)
   by 0x11F787: message_dispatch (mainloop.c:80)
   by 0x4C762CA: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C74ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C752D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4C75824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x11EE4B: main (main.c:485)

12 years agoFix not being able to unregister player via UnregisterPlayer
Luiz Augusto von Dentz [Thu, 6 Oct 2011 15:35:16 +0000 (18:35 +0300)]
Fix not being able to unregister player via UnregisterPlayer

12 years agoAVRCP: do not allow CT to set a property not supported
Lucas De Marchi [Thu, 6 Oct 2011 11:49:45 +0000 (08:49 -0300)]
AVRCP: do not allow CT to set a property not supported

If player never set a property, it means it doesn't support it. Doesn't
allow the remote side to set it and send a REJECTED response.

12 years agoAVRCP: fix loop over number of application settings
Lucas De Marchi [Thu, 6 Oct 2011 11:49:44 +0000 (08:49 -0300)]
AVRCP: fix loop over number of application settings

12 years agoRemove test-media-player
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:18 +0000 (23:02 +0300)]
Remove test-media-player

12 years agoRemove MediaPlayer interface from control-api.txt
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:17 +0000 (23:02 +0300)]
Remove MediaPlayer interface from control-api.txt

12 years agoAdd simple-player test script
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:16 +0000 (23:02 +0300)]
Add simple-player test script

12 years agoAVRCP: move MediaPlayer to adapter object
Luiz Augusto von Dentz [Wed, 5 Oct 2011 20:02:15 +0000 (23:02 +0300)]
AVRCP: move MediaPlayer to adapter object

This move the MediaPlayer registration to adapter object on Media
interface so we can track players properly.

12 years agoAdd automatic connect timeout config option
Claudio Takahasi [Tue, 4 Oct 2011 18:32:22 +0000 (15:32 -0300)]
Add automatic connect timeout config option

Add new option in main.conf allowing change the default automatic
connection timer. This value defines how many seconds re-connection
for bonded devices will be active when a platform/user event triggers
the automatic re-connections.

12 years agoEnable re-connection if reason is Timeout
Anderson Briglia [Tue, 4 Oct 2011 18:32:16 +0000 (15:32 -0300)]
Enable re-connection if reason is Timeout

The re-connection timer must be added just when the disconnection reason
was "Connection timeout" for GATT based profiles.

12 years agoAdd an interval between connection attempts
Claudio Takahasi [Tue, 4 Oct 2011 18:32:04 +0000 (15:32 -0300)]
Add an interval between connection attempts

For connection attempts to the same remote device, add 5 seconds
interval until the next connect attempt. At the moment, the behaviour
depends on if address is found in the advertising kernel cache only.

Passive scanning kernel patches are not upstream yet. LE scanning will
be executed in background during a short period of time until it finds
the address or EHOSTDOWN is returned to the connection attempt.

12 years agoSet auto connect from maemo6 plugin
Claudio Takahasi [Tue, 4 Oct 2011 18:31:54 +0000 (15:31 -0300)]
Set auto connect from maemo6 plugin

Inform the adapter that the system has been unlocked when the MCE
sends the tklock_mode_ind signal. This signal will trigger the
automatic re-connections for the devices selected by the profiles.
Profiles register ATTIO callbacks to indicate that ATT connection
is required.

12 years agoAdd display lock watcher on maemo6 plugin
Anderson Briglia [Tue, 4 Oct 2011 18:31:43 +0000 (15:31 -0300)]
Add display lock watcher on maemo6 plugin

Implements display status signal watcher in maemo6 plugin.

12 years agoDisable automatic connections after 60 seconds
Claudio Takahasi [Tue, 4 Oct 2011 18:31:32 +0000 (15:31 -0300)]
Disable automatic connections after 60 seconds

12 years agoFix repeated connection attempt to the same remote
Claudio Takahasi [Tue, 4 Oct 2011 18:31:21 +0000 (15:31 -0300)]
Fix repeated connection attempt to the same remote

Avoids queue dupplicated requests connects for the same device. Sources
can be triggered by auto connect or on demand connection request when a
given profile registers ATTIO connection callbacks.

12 years agoAdd checking if profiles are requesting connection
Claudio Takahasi [Tue, 4 Oct 2011 18:31:09 +0000 (15:31 -0300)]
Add checking if profiles are requesting connection

Before triggering automatic ATTIO connections driven by platform event,
the device needs to check if there is at least one entry in the ATTIO
connection callback, meaning that there is profile requesting connection
and the state is auto connection.

12 years agoAdd continuous connection attempt
Claudio Takahasi [Tue, 4 Oct 2011 18:30:57 +0000 (15:30 -0300)]
Add continuous connection attempt

If auto connect is enabled, queue another connection attempt until
the adapter sets auto connect to FALSE. The behaviour depends on if the
address is found in the advertising cache or not.

12 years agoAdd set auto connect in device
Claudio Takahasi [Tue, 4 Oct 2011 18:30:46 +0000 (15:30 -0300)]
Add set auto connect in device

Skeleton of automatic connections driven by platform/user event.
Two layers will manage connections: Profiles can request on demand
connections registering ATTIO connection callbacks(one attempt) for
a given device and platform/user action can trigger automatic
connections for devices with ATTIO callbacks registered.

12 years agoRemove timer to trigger connection attempts
Claudio Takahasi [Tue, 4 Oct 2011 18:30:29 +0000 (15:30 -0300)]
Remove timer to trigger connection attempts

Removes continuous timer for ATTIO connection attempts. A new approach
is being implemented managing scanning and connection attempts driven
by platform/user actions. eg: screen unlocked.

12 years agoFix crash when remote connects to AVRCP without having a record
Luiz Augusto von Dentz [Wed, 5 Oct 2011 14:24:50 +0000 (17:24 +0300)]
Fix crash when remote connects to AVRCP without having a record

Device object may exist but control wont be initialized causing the
following crash:

Invalid read of size 8
   at 0x12B510: state_changed (control.c:90)
   by 0x12BA20: avctp_set_state (avctp.c:367)
   by 0x12C0DC: avctp_confirm_cb (avctp.c:733)
   by 0x166481: server_cb (btio.c:200)
   by 0x4E75ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4E762D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4E76824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x11ED19: main (main.c:473)
 Address 0x8 is not stack'd, malloc'd or (recently) free'd