OSDN Git Service
Eder Ruiz Maria [Tue, 16 Apr 2013 15:49:54 +0000 (11:49 -0400)]
gatttool: Use GError to propage error messages to caller
Handle runtime errors outside gatt_connect(), using GError to propagate
error messages to caller.
Johan Hedberg [Tue, 16 Apr 2013 17:34:29 +0000 (20:34 +0300)]
monitor: Remove bogus entries from event mask table
The event mask is 64 bits so any bit offsets greater than that do not
make sense.
João Paulo Rechi Vita [Fri, 12 Apr 2013 22:34:24 +0000 (19:34 -0300)]
audio: Remove unused constants
Removes the never used constants AUDIO_SINK_INTERFACE and
AUDIO_SOURCE_INTERFACE which are defined to "org.bluez.AudioSink" and
"org.bluez.AudioSource", respectively.
João Paulo Rechi Vita [Fri, 12 Apr 2013 22:34:23 +0000 (19:34 -0300)]
audio: Remove unused function
Removes the never used function audio_device_is_active.
João Paulo Rechi Vita [Fri, 12 Apr 2013 22:34:22 +0000 (19:34 -0300)]
audio: Remove unused constant
Removes the never used constant AUDIO_INTERFACE which is defined to
"org.bluez.Audio".
Marcel Holtmann [Thu, 11 Apr 2013 05:50:12 +0000 (22:50 -0700)]
Release 5.4
Marcel Holtmann [Thu, 11 Apr 2013 05:24:32 +0000 (22:24 -0700)]
build: Update library version
Marcel Holtmann [Thu, 11 Apr 2013 05:23:49 +0000 (22:23 -0700)]
lib: Update list of company identifiers
Christian Fetzer [Tue, 9 Apr 2013 11:51:37 +0000 (13:51 +0200)]
obexd: Automatically setup notification connection for MAP client
This automatically establishes the MNS connection when the MAS client
session is started and terminates the MNS connection when the MAS client
session is closed.
The MAP client controls the notification channel using the
SetNotificationRegistration function. The MSE will connect/disconnect
the MNS connection accordingly.
Christian Fetzer [Tue, 9 Apr 2013 11:51:36 +0000 (13:51 +0200)]
obexd: Enable MNS server
Christian Fetzer [Tue, 9 Apr 2013 11:51:35 +0000 (13:51 +0200)]
build: Add support for building MNS server
Christian Fetzer [Tue, 9 Apr 2013 11:51:34 +0000 (13:51 +0200)]
obexd: Add Message Notification Service (MNS) server
This implements the server role of the MAP Message Notification Service
(MNS) which is part of the MAP Client Equipment (MCE) device.
After successful registration, the MNS will receive event reports,
notifying about state changes on the server side.
Possible events are: NewMessages, DeliverySuccess, SendingSuccess,
DeliveryFailure, SendingFailure, MemoryFull, MemoryAvailable,
MessageDeleted, MessageShift
Christian Fetzer [Tue, 9 Apr 2013 11:51:33 +0000 (13:51 +0200)]
profile: Add MNS server record
This adds the MNS server record to the profile default settings.
Lucas De Marchi [Mon, 8 Apr 2013 20:56:22 +0000 (17:56 -0300)]
shared: Use gcc builtin instead of g_atomic
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
Lucas De Marchi [Mon, 8 Apr 2013 20:56:21 +0000 (17:56 -0300)]
obexd: Use gcc builtin instead of g_atomic
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
Most of the uses of atomic operations were wrong. They were fixed as
well. If we are using atomic operations, reading the variable again
later for logging is not an option, we should use the return of the
atomic function used to fetch the variable.
Lucas De Marchi [Mon, 8 Apr 2013 20:56:20 +0000 (17:56 -0300)]
gobex: Use gcc builtin instead of g_atomic
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
Most of the uses of atomic operations were wrong. They were fixed as
well. If we are using atomic operations, reading the variable again
later for logging is not an option, we should use the return of the
atomic function used to fetch the variable.
Lucas De Marchi [Mon, 8 Apr 2013 20:56:19 +0000 (17:56 -0300)]
attrib: Use gcc builtin instead of g_atomic
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
Most of the uses of atomic operations were wrong. They were fixed as
well. If we are using atomic operations, reading the variable again
later for logging is not an option, we should use the return of the
atomic function used to fetch the variable.
Lucas De Marchi [Mon, 8 Apr 2013 20:56:18 +0000 (17:56 -0300)]
gdbus: Use gcc builtin instead of g_atomic
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.
gdbus/client.c: In function ‘g_dbus_client_ref’:
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
Lucas De Marchi [Mon, 8 Apr 2013 20:56:17 +0000 (17:56 -0300)]
gitignore: Ignore file generated by Automake 1.13
Automake >= 1.13 enables parallel-tests option which uses a test-driver
script (copied by automake). Ignore this file.
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:20 +0000 (19:31 -0400)]
gatttool: Remove check for bluetooth address parameter on gatt_connect()
This check is more appropriate to be done by callers of gatt_connect().
This is already done on interactive mode in attrib/interactive.c and is
now also done in non-interactive mode.
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:19 +0000 (19:31 -0400)]
gatttool: Remote address is mandatory for non-interactive gatttool
For gatttool non-interactive mode, command line parameter with
bluetooth remote address is mandatory.
Jefferson Delfes [Tue, 2 Apr 2013 23:31:18 +0000 (19:31 -0400)]
gatttool: Fix memory leak after parsing input line
The callback is responsible for freeing input line buffer that comes
from rl_callback_handler_install().
Yegor Yefremov [Wed, 27 Mar 2013 14:49:09 +0000 (15:49 +0100)]
tools/hciattach: Fix TI firmware path
Change firmware path to /lib/firmware/ti-connectivity/ to be
conform with linux-firmware folder structure. All wl1xxx firmware
resides in ti-connectivity. See linux-firmware repository
https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/
for reference.
Luiz Augusto von Dentz [Mon, 18 Mar 2013 13:03:26 +0000 (10:03 -0300)]
audio: Track connections to AVRCP roles separately
Currently the code assumes when one role connects the other must be
connected as well which is bogus and can create problems.
Arkadiusz Lichwa [Thu, 4 Apr 2013 14:09:33 +0000 (16:09 +0200)]
lib: Fix invalid memory access in sdp_service_search_attr_req
Browsing services using sdptool can lead to writing to invalid heap
locations.
valgrind's output of exemplary call: sdptool browse local
==2203== HEAP SUMMARY:
==2203== in use at exit: 0 bytes in 0 blocks
==2203== total heap usage: 251 allocs, 251 frees, 140,156 bytes allocated
==2203==
==2203== All heap blocks were freed -- no leaks are possible
==2203==
==2203== ERROR SUMMARY: 6 errors from 2 contexts (suppressed: 0 from 0)
==2203==
==2203== 1 errors in context 1 of 2:
==2203== Invalid write of size 2
==2203== at 0x805B882: bt_put_be16 (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8062BD0: sdp_service_search_attr_req (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8052457: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x80525AE: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x805277F: cmd_browse (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8053199: main (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== Address 0x4391359 is 7 bytes before a block of size 2,048 alloc'd
==2203== at 0x402B6A8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==2203== by 0x8062B4B: sdp_service_search_attr_req (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8052457: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x80525AE: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x805277F: cmd_browse (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8053199: main (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203==
==2203==
==2203== 5 errors in context 2 of 2:
==2203== Invalid write of size 1
==2203== at 0x402D363: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==2203== by 0x80613E7: gen_dataseq_pdu (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8061472: gen_attridseq_pdu (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8062C00: sdp_service_search_attr_req (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8052457: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x80525AE: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x805277F: cmd_browse (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8053199: main (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== Address 0x439135b is 5 bytes before a block of size 2,048 alloc'd
==2203== at 0x402B6A8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==2203== by 0x8062B4B: sdp_service_search_attr_req (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8052457: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x80525AE: do_search (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x805277F: cmd_browse (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203== by 0x8053199: main (in /home/xpu/gits/bluez.bin/bin/sdptool)
==2203==
==2203== ERROR SUMMARY: 6 errors from 2 contexts (suppressed: 0 from 0)
Anderson Lizardo [Tue, 2 Apr 2013 15:07:45 +0000 (11:07 -0400)]
attrib: Fix status on memory allocation failure
If memory allocation fails, ATT_ECODE_INSUFF_RESOURCES should be
reported to the callback.
Anderson Lizardo [Tue, 2 Apr 2013 15:07:44 +0000 (11:07 -0400)]
attrib: Fix coding style in read_char_helper()
Anderson Lizardo [Tue, 2 Apr 2013 15:07:43 +0000 (11:07 -0400)]
attrib: Fix memory leak on low memory condition
If g_try_new0() fails due to low memory condition, "list" should be
freed before returning from primary_all_cb().
Luiz Augusto von Dentz [Wed, 3 Apr 2013 15:05:05 +0000 (12:05 -0300)]
AVCTP: Add mapping for mandatory pass-through operations
This add mapping for mandatory pass-through operations for categories
supported and a few other operations considered useful.
Alvaro Silva [Tue, 2 Apr 2013 23:35:00 +0000 (19:35 -0400)]
tools/mgmt-tester: Refine stop discovery test case
Add HCI test and discovering event test for stop discovery.
Alvaro Silva [Tue, 2 Apr 2013 23:34:59 +0000 (19:34 -0400)]
tools/mgmt-tester: Refine start discovery test case
Add HCI command test and discovering event test for start discovery.
Jaganath Kanakkassery [Mon, 1 Apr 2013 09:38:01 +0000 (15:08 +0530)]
attrib: Fix use after free of attrib
If attrib is freed in cmd->func(), then it will be used if either
request or response queue has some data to send.
This patch moves calling wake_up_sender() which increases the ref
count of attrib so that it wont get freed in cmd->func().
Jaganath Kanakkassery [Mon, 1 Apr 2013 09:38:00 +0000 (15:08 +0530)]
attrib: Remove norequests and noresponses variables
Passing NULL is fine to g_queue_is_empty(), so removing these
variables makes the code more readable
Alex Deymo [Mon, 1 Apr 2013 18:14:04 +0000 (11:14 -0700)]
core: Fix a double free on adapter_stop
The discovery_list list has the list of current discovery clients and is
removed on adapter_stop (for example due a "power off" command). The
g_slist_free_full will call discovery_free on every element of the list
and remove the nodes of the list, but discovery_destroy (called by
discovery_free) will not only free the element, but also remove it from
the list. This causes the list node to be freed twice, once by
g_slist_free_full and once by g_slist_remove.
This fix calls successively discovery_destroy and lets it remove the
list's elements one by one.
Alex Deymo [Fri, 29 Mar 2013 21:19:43 +0000 (14:19 -0700)]
core: Memory leak on device_free for eir_uuids field.
The eir_uuids list is usually freed by device_svc_resolved, but that
doesn't happen if the device is removed before a SDP browse ends.
This fix deletes the eir_uuids list on device_free.
Arkadiusz Lichwa [Tue, 26 Mar 2013 11:31:08 +0000 (12:31 +0100)]
sdptool: Fix mem leak in do_search
Jefferson Delfes [Mon, 4 Mar 2013 20:42:55 +0000 (16:42 -0400)]
gatttool: fix parameter type/name from le to psm
The parameter le was changed to psm and its type was modified from
boolean to int, but header was unmodified. That change occurred in commit
0cc24599637ed6666469c68d55f4e42ff722e447.
Alex Deymo [Thu, 21 Mar 2013 22:04:56 +0000 (15:04 -0700)]
client: Agent's RequestPasskey implementation
Implements the uint32 RequestPasskey(object device) method.
Alex Deymo [Thu, 21 Mar 2013 22:04:55 +0000 (15:04 -0700)]
client: Agent's DisplayPasskey implementation
Implements the DisplayPasskey(object device, uint32 passkey, uint16 entered)
method.
Alex Deymo [Thu, 21 Mar 2013 22:04:54 +0000 (15:04 -0700)]
client: Agent's DisplayPincode implementation
Implements the DisplayPinCode(object device, string pincode) method.
Alex Deymo [Thu, 21 Mar 2013 22:04:53 +0000 (15:04 -0700)]
client: "agent" command capability argument and autocompletion
This patch enables argument autocompletion for the agent command with
the list of capabilities an agent can have, adding also "on" (for the
default "") and "off". The command passes the argument (parsing and
verifying it) to the dbus method call.
Alex Deymo [Thu, 21 Mar 2013 22:04:52 +0000 (15:04 -0700)]
client: Right prompt management on agent input
Registering an agent shares the user input interface with the normal console
command interface. The way it is implemented (using rl_message, rl_save_prompt
and rl_restore_prompt) conflicts with the rl_printf calls that may appear
while waiting for user input, loosing the [bluetooth]# prompt.
This patch fixes this and makes clear if the expected input is a command or an
agent reply changing the color and text of the prompt.
Alex Deymo [Thu, 21 Mar 2013 22:04:51 +0000 (15:04 -0700)]
client: Add color modifiers to NEW, CHG and DEL events.
Events like [NEW], [CHG] and [DEL] can appear in the command console at
any time, even when the user is typing a command. The last line is kept
making the event line appear just before it, something that can be
unnoticed. This patch add meaningful colors for those three event to make
it easier to see them.
David Herrmann [Mon, 18 Mar 2013 17:41:02 +0000 (18:41 +0100)]
sdptool: Fix recursive search
When doing recursive SDP searches, we must not overwrite our own values
after we retrieved them from SDP. Otherwise, the UUID test will always we
false.
Marcel Holtmann [Thu, 21 Mar 2013 18:48:13 +0000 (11:48 -0700)]
lib: Update list of company identifiers
Alex Deymo [Thu, 21 Mar 2013 07:04:41 +0000 (00:04 -0700)]
core: Fix wrong argument on agent *_cb functions.
The last argument for the functions pincode_cb, passkey_cb and
confirm_cb is a user data pointer with the "void *". Those functions
expect a "struct authentication_req *", but insted a "struct
btd_device*" without any complaint from the compiler due the void* cast.
This fix passes the right argument to those functions.
Other uses of those functions as callbacks (agent_request_passkey,
agent_request_pincode, agent_request_authorization and
agent_request_confirmation) pass the right struct authentication_req *.
Luiz Augusto von Dentz [Mon, 18 Mar 2013 13:14:40 +0000 (10:14 -0300)]
AVRCP: Fallback to GetElementAttributes if GetItemAttributes fails
If GetItemAttributes fails with error set to player not browsable
fallback to GetElementAttributes.
Luiz Augusto von Dentz [Mon, 18 Mar 2013 13:14:39 +0000 (10:14 -0300)]
AVRCP: Reduce number of request to refresh the player list
In case the addressed player changes but it features is already known
the list of players don't need to be refreshed.
Luiz Augusto von Dentz [Mon, 18 Mar 2013 13:14:38 +0000 (10:14 -0300)]
player: Check if values really changed before emitting signals
Luiz Augusto von Dentz [Mon, 18 Mar 2013 13:14:37 +0000 (10:14 -0300)]
AVRCP: Add support for available player changed event for CT role
This adds support for registering to available player changed event if
supported by TG.
Bruna Moreira [Mon, 18 Mar 2013 20:53:06 +0000 (16:53 -0400)]
tools: Add basic invalid parameters test for stop discovery
Bruna Moreira [Mon, 18 Mar 2013 20:53:05 +0000 (16:53 -0400)]
tools: Add basic rejected test for stop discovery
Bruna Moreira [Mon, 18 Mar 2013 20:53:04 +0000 (16:53 -0400)]
tools: Add basic success test for stop discovery
Bruna Moreira [Mon, 18 Mar 2013 20:53:03 +0000 (16:53 -0400)]
tools: Add basic success test for start discovery
Alex Deymo [Fri, 15 Mar 2013 21:29:19 +0000 (16:29 -0500)]
textfile: Fix a pointer arithmetic logic bug in read_key()
A substraction of pointers ends up in a wrong computation of the size
passed to strnpbrk() in read_key(). This patch fixes the pointer logic.
Alex Deymo [Fri, 15 Mar 2013 21:27:20 +0000 (16:27 -0500)]
textfile: find_key parsing nit
The find_key function should return a pointer to the begining of the
line in the config file (map) that has the given keyword. This patch
fixes a wrong logic when the another keyword has the given keyword as a
prefix and appears in the first line of the file.
Luiz Augusto von Dentz [Fri, 8 Mar 2013 11:56:18 +0000 (13:56 +0200)]
tools: Reduce verbosity of mpris-player
Luiz Augusto von Dentz [Fri, 8 Mar 2013 11:37:20 +0000 (13:37 +0200)]
tools: Fix not using player name in the Identity property
This fixes the format of player Identity property, also use Name property
when available.
Mikel Astiz [Fri, 1 Mar 2013 13:59:13 +0000 (14:59 +0100)]
profile: Limit to one remote UUID per profile
The code can be considerably simplified by constraining struct
btd_profile to one single remote UUID.
Mikel Astiz [Fri, 1 Mar 2013 13:59:12 +0000 (14:59 +0100)]
health: Split health into two btd_profile
Register a separate btd_profile for each health device role.
Mikel Astiz [Fri, 1 Mar 2013 13:59:11 +0000 (14:59 +0100)]
gatt: List only GATT_UUID as remote UUID
The probe function checks if both UUIDs are present, so there is no
need to list both in btd_profile.
Mikel Astiz [Fri, 1 Mar 2013 13:59:10 +0000 (14:59 +0100)]
proximity: Split monitor into three btd_profile
Split into three btd_profile such that each of them handles one single
UUID.
Mikel Astiz [Fri, 1 Mar 2013 13:59:09 +0000 (14:59 +0100)]
proximity: Split internal monitor registration API
Split the monitor registration API into three independent registrations
each of them taking one specific GATT primary.
Mikel Astiz [Fri, 1 Mar 2013 13:59:08 +0000 (14:59 +0100)]
audio: Split AVRCP into two btd_profile
Register a separate btd_profile for each role of AVRCP.
Mikel Astiz [Fri, 1 Mar 2013 13:59:07 +0000 (14:59 +0100)]
avrcp: Refactor server registration
Use a helper function to install the AVRCP server, just like other audio
profiles such as in a2dp.c do.
Johan Hedberg [Thu, 7 Mar 2013 17:00:09 +0000 (19:00 +0200)]
emulator: Allow multiple vhci adapter creation with btvirt
Johan Hedberg [Thu, 7 Mar 2013 16:30:59 +0000 (18:30 +0200)]
emulator: Fix unique bdaddr creation for multiple vhci_open() calls
Luiz Augusto von Dentz [Thu, 7 Mar 2013 15:11:59 +0000 (17:11 +0200)]
AVRCP: Fix not checking for invalid player items
This adds checks for invalid size in the media player list returned by
GetFolderItems that could cause crashes.
Luiz Augusto von Dentz [Thu, 7 Mar 2013 15:11:58 +0000 (17:11 +0200)]
AVRCP: Fix not checking for invalid player name length
This adds checks for invalid player name length that could cause crashes
while reading invalid memory.
Luiz Augusto von Dentz [Thu, 7 Mar 2013 15:11:57 +0000 (17:11 +0200)]
AVRCP: Fix not checking for invalid folder length
This adds checks for invalid folder length in SetBrowsedPlayer that
could cause crashes while reading invalid memory.
Luiz Augusto von Dentz [Thu, 7 Mar 2013 15:11:56 +0000 (17:11 +0200)]
AVRCP: Fix not parsing player name properly
Player name length field is 2 bytes long not 1.
Luiz Augusto von Dentz [Thu, 7 Mar 2013 15:11:55 +0000 (17:11 +0200)]
AVRCP: Fix reading wrong field as folder depth
Folder depth is bit 10 of the parameters not the PDU operands
Luiz Augusto von Dentz [Thu, 7 Mar 2013 09:41:23 +0000 (11:41 +0200)]
audio: Fix not using opposite role for local servers
Local role should be the opposite of the remote role otherwise if either
audio-source or audio-sink is disabled none will work.
Luiz Augusto von Dentz [Thu, 7 Mar 2013 09:41:22 +0000 (11:41 +0200)]
audio: Remove profile enabling/disabling logic
This should be handle by the core for all profiles
Luiz Augusto von Dentz [Wed, 6 Mar 2013 14:49:02 +0000 (16:49 +0200)]
tools: Fix AVRCP parsing of GetFolderItems for media players
Length of name is 2 bytes not 1
Luiz Augusto von Dentz [Wed, 6 Mar 2013 14:48:07 +0000 (16:48 +0200)]
tools: Fix not unregistering all interface when a player disappear
Szymon Janc [Tue, 5 Mar 2013 14:59:55 +0000 (15:59 +0100)]
source: Register state callback for specified audio device
State callback will now be registered and called for specified device
only. This will allow for more cleaner callback register/unregister
in roles code.
Szymon Janc [Tue, 5 Mar 2013 14:59:54 +0000 (15:59 +0100)]
sink: Register state callback for specified audio device
State callback will now be registered and called for specified device
only. This will allow for more cleaner callback register/unregister
in roles code.
Fix following valgrind reports:
16 bytes in 1 blocks are still reachable in loss record 42 of 219
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E93FC2: g_slist_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x41F31D: sink_add_state_cb (sink.c:456)
by 0x41DD67: audio_device_register (device.c:314)
by 0x416ECA: manager_get_audio_device (manager.c:491)
by 0x4171A8: a2dp_sink_probe (manager.c:131)
by 0x46A801: dev_probe (device.c:2347)
by 0x468C9E: btd_profile_foreach (profile.c:599)
by 0x46BB95: device_probe_profiles (device.c:2423)
by 0x461438: load_devices (adapter.c:2549)
24 bytes in 1 blocks are still reachable in loss record 56 of 219
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x41F2F2: sink_add_state_cb (sink.c:451)
by 0x41DD67: audio_device_register (device.c:314)
by 0x416ECA: manager_get_audio_device (manager.c:491)
by 0x4171A8: a2dp_sink_probe (manager.c:131)
by 0x46A801: dev_probe (device.c:2347)
by 0x468C9E: btd_profile_foreach (profile.c:599)
by 0x46BB95: device_probe_profiles (device.c:2423)
by 0x461438: load_devices (adapter.c:2549)
by 0x465066: read_info_complete (adapter.c:5514)
by 0x471381: request_complete (mgmt.c:221)
Szymon Janc [Tue, 5 Mar 2013 14:59:53 +0000 (15:59 +0100)]
avctp: Remove user data from avctp_session_state_cb
All users pass NULL as user data so there is no need to keep that.
Szymon Janc [Tue, 5 Mar 2013 14:59:52 +0000 (15:59 +0100)]
avctp: Allow to register state callback for specified audio device
State callback can now be registered and called for specified device
only (or all devices if NULL is passed). This will allow for more
cleaner callback register/unregister in roles code.
Fix following valgrind reports:
16 bytes in 1 blocks are still reachable in loss record 43 of 223
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E93FC2: g_slist_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x419ABD: avctp_add_state_cb (avctp.c:1652)
by 0x41DD87: audio_device_register (device.c:320)
by 0x416ECA: manager_get_audio_device (manager.c:491)
by 0x4171A8: a2dp_sink_probe (manager.c:131)
by 0x46A821: dev_probe (device.c:2347)
by 0x468CBE: btd_profile_foreach (profile.c:599)
by 0x46BBB5: device_probe_profiles (device.c:2423)
by 0x461458: load_devices (adapter.c:2549)
16 bytes in 1 blocks are still reachable in loss record 44 of 223
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E93FC2: g_slist_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x419ABD: avctp_add_state_cb (avctp.c:1652)
by 0x417791: control_init (control.c:290)
by 0x417097: avrcp_probe (manager.c:156)
by 0x46A821: dev_probe (device.c:2347)
by 0x468CBE: btd_profile_foreach (profile.c:599)
by 0x46BBB5: device_probe_profiles (device.c:2423)
by 0x461458: load_devices (adapter.c:2549)
by 0x465086: read_info_complete (adapter.c:5514)
24 bytes in 1 blocks are still reachable in loss record 59 of 223
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x419A92: avctp_add_state_cb (avctp.c:1647)
by 0x41DD87: audio_device_register (device.c:320)
by 0x416ECA: manager_get_audio_device (manager.c:491)
by 0x4171A8: a2dp_sink_probe (manager.c:131)
by 0x46A821: dev_probe (device.c:2347)
by 0x468CBE: btd_profile_foreach (profile.c:599)
by 0x46BBB5: device_probe_profiles (device.c:2423)
by 0x461458: load_devices (adapter.c:2549)
by 0x465086: read_info_complete (adapter.c:5514)
by 0x4713A1: request_complete (mgmt.c:221)
24 bytes in 1 blocks are still reachable in loss record 60 of 223
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x419A92: avctp_add_state_cb (avctp.c:1647)
by 0x417791: control_init (control.c:290)
by 0x417097: avrcp_probe (manager.c:156)
by 0x46A821: dev_probe (device.c:2347)
by 0x468CBE: btd_profile_foreach (profile.c:599)
by 0x46BBB5: device_probe_profiles (device.c:2423)
by 0x461458: load_devices (adapter.c:2549)
by 0x465086: read_info_complete (adapter.c:5514)
by 0x4713A1: request_complete (mgmt.c:221)
by 0x47175B: received_data (mgmt.c:319)
Szymon Janc [Tue, 5 Mar 2013 14:59:51 +0000 (15:59 +0100)]
avdtp: Remove user data from avdtp_session_state_cb
All users pass NULL as user data so there is no need to keep that.
Szymon Janc [Tue, 5 Mar 2013 14:59:50 +0000 (15:59 +0100)]
avdtp: Register state callback for specified audio device
State callback will now be registered and called for specified device
only. This will allow for more cleaner callback register/unregister
in roles code.
Fix following valgrind reports:
16 bytes in 1 blocks are still reachable in loss record 43 of 227
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E93FC2: g_slist_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4278BD: avdtp_add_state_cb (avdtp.c:3931)
by 0x41DDA3: audio_device_register (device.c:315)
by 0x416ECA: manager_get_audio_device (manager.c:491)
by 0x4171A8: a2dp_sink_probe (manager.c:131)
by 0x46A7B1: dev_probe (device.c:2347)
by 0x468C4E: btd_profile_foreach (profile.c:599)
by 0x46BB45: device_probe_profiles (device.c:2423)
by 0x4613E8: load_devices (adapter.c:2549)
16 bytes in 1 blocks are still reachable in loss record 45 of 227
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E93FC2: g_slist_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4278BD: avdtp_add_state_cb (avdtp.c:3931)
by 0x41F112: sink_init (sink.c:380)
by 0x4171B8: a2dp_sink_probe (manager.c:137)
by 0x46A7B1: dev_probe (device.c:2347)
by 0x468C4E: btd_profile_foreach (profile.c:599)
by 0x46BB45: device_probe_profiles (device.c:2423)
by 0x4613E8: load_devices (adapter.c:2549)
by 0x465016: read_info_complete (adapter.c:5514)
24 bytes in 1 blocks are still reachable in loss record 61 of 227
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x427892: avdtp_add_state_cb (avdtp.c:3926)
by 0x41DDA3: audio_device_register (device.c:315)
by 0x416ECA: manager_get_audio_device (manager.c:491)
by 0x4171A8: a2dp_sink_probe (manager.c:131)
by 0x46A7B1: dev_probe (device.c:2347)
by 0x468C4E: btd_profile_foreach (profile.c:599)
by 0x46BB45: device_probe_profiles (device.c:2423)
by 0x4613E8: load_devices (adapter.c:2549)
by 0x465016: read_info_complete (adapter.c:5514)
by 0x471331: request_complete (mgmt.c:221)
24 bytes in 1 blocks are still reachable in loss record 63 of 227
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x427892: avdtp_add_state_cb (avdtp.c:3926)
by 0x41F112: sink_init (sink.c:380)
by 0x4171B8: a2dp_sink_probe (manager.c:137)
by 0x46A7B1: dev_probe (device.c:2347)
by 0x468C4E: btd_profile_foreach (profile.c:599)
by 0x46BB45: device_probe_profiles (device.c:2423)
by 0x4613E8: load_devices (adapter.c:2549)
by 0x465016: read_info_complete (adapter.c:5514)
by 0x471331: request_complete (mgmt.c:221)
by 0x4716EB: received_data (mgmt.c:319)
Luiz Augusto von Dentz [Tue, 5 Mar 2013 10:39:17 +0000 (12:39 +0200)]
media-api: Fix mentioning MediaLibrary instead of MediaFolder
Luiz Augusto von Dentz [Wed, 27 Feb 2013 13:03:08 +0000 (15:03 +0200)]
AVRCP: Fix storing wrong UID counter
By the AVRCP spec all messages uses big endian not little endian.
Luiz Augusto von Dentz [Wed, 27 Feb 2013 13:01:41 +0000 (15:01 +0200)]
AVRCP: Add support to UIDs changed event for CT role
This adds support for registering to UIDs changed event if supported by
TG.
Luiz Augusto von Dentz [Tue, 26 Feb 2013 12:36:22 +0000 (14:36 +0200)]
player: Only expose Track property if there is metadata
If no metadata is set there is no point in exposing it.
Luiz Augusto von Dentz [Tue, 26 Feb 2013 12:33:42 +0000 (14:33 +0200)]
player: Only emit PropertiesChanged for Position if track exists
Luiz Augusto von Dentz [Mon, 25 Feb 2013 13:31:08 +0000 (15:31 +0200)]
AVRCP: Fix changing track metadata too many times
Certain stacks may respond to GetPlayStatus before GetItemAttributes
(e.g iOS 6), which may cause Track to be changed due to duration being
different.
To fix this the code now only attempt to do GetPlayStatus once
GetItemAttributes completes, in addition to this do not require a exact
match of the duration because they can be different as can be observed
bellow:
> L2CAP(d): cid 0x0044 len 141 ctrl 0x0c16 fcs 0xa5ad [psm 27]
I-frame: Unsegmented TxSeq 11 ReqSeq 12
AVCTP Browsing: Response : pt 0x00 transaction 11 pid 0x110e
AVRCP: GetItemAttributes: len 0x0083
...
AttributeID: 0x00000007 (Track duration)
CharsetID: 0x006a (UTF-8)
AttributeLength: 0x0006 (6)
AttributeValue: 222641
...
> L2CAP(d): cid 0x0043 len 22 [psm 23]
AVCTP Control: Response : pt 0x00 transaction 2 pid 0x110e
AV/C: Stable: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: GetPlayStatus: pt Single len 0x0009
SongLength: 0x00036597 (222615 miliseconds)
SongPosition: 0x00000000 (0 miliconds)
PlayStatus: 0x02 (PAUSED)
Luiz Augusto von Dentz [Mon, 25 Feb 2013 12:23:28 +0000 (14:23 +0200)]
player: Fix not emitting PropertiesChanged for Browsable and Searchable
Browsable and Searchable should emit PropertiesChanged when their values
changes.
Luiz Augusto von Dentz [Mon, 25 Feb 2013 12:18:54 +0000 (14:18 +0200)]
player: Add Playlist property
Playlist property refer to the folder where the list of items being
played can be found.
Luiz Augusto von Dentz [Thu, 28 Feb 2013 14:29:50 +0000 (16:29 +0200)]
player: Add enums for item types and folder types
This avoid having to allocate memory just to store string representation
of these types.
Luiz Augusto von Dentz [Thu, 28 Feb 2013 11:32:57 +0000 (13:32 +0200)]
media: Rework MediaItem Type property
Type now can assume the value "folder" so it is no longer necessary to
have Folder property, FolderType in introduced to provide the folder type
that before was on the Type itself.
In addition to this add proper documentation what properties are optional
and under what condition they are available.
Luiz Augusto von Dentz [Mon, 25 Feb 2013 10:34:43 +0000 (12:34 +0200)]
player: Fix property Device type
Device property should be an objecy path not a string.
Johan Hedberg [Mon, 4 Mar 2013 13:47:33 +0000 (15:47 +0200)]
tools/mgmt-tester: Add basic Set Fast Connectable test case
Johan Hedberg [Mon, 4 Mar 2013 13:34:42 +0000 (15:34 +0200)]
emulator: Fix missing break statement for LE Read White List Size
Johan Hedberg [Mon, 4 Mar 2013 13:27:52 +0000 (15:27 +0200)]
emulator: Add Page Scan Type HCI command support
Johan Hedberg [Mon, 4 Mar 2013 13:19:25 +0000 (15:19 +0200)]
emulator: Add Page Scan Activity HCI command support
Johan Hedberg [Mon, 4 Mar 2013 13:13:29 +0000 (15:13 +0200)]
monitor: Add full decoding of Page Scan Type HCI commands
Johan Hedberg [Mon, 4 Mar 2013 13:12:58 +0000 (15:12 +0200)]
monitor: Add full decoding of Page Scan Activity HCI commands
Johan Hedberg [Mon, 4 Mar 2013 08:36:39 +0000 (10:36 +0200)]
tools/btmgmt: Add fast-conn command for fast connectable mode