summaryrefslogtreecommitdiff
path: root/profiles
Commit message (Collapse)AuthorAgeFilesLines
...
* HDP: Fix checking always constant error codeAndrei Emeltchenko2014-06-251-4/+1
| | | | | sdp_set_access_protos() always returns 0, there is no sense to check for error code. Fixes compile warnings.
* HDP: Remove extra debug statementsAndrei Emeltchenko2014-06-251-9/+11
| | | | DBG() includes function name by default, so including it is not needed.
* bnep: Fix redundant checkAndrei Emeltchenko2014-06-231-1/+1
|
* HDP: Add length checkAndrei Emeltchenko2014-06-181-0/+3
| | | | | Fixes static analyzer warnings related to casting possible error code to unsigned.
* HDP: trivial: Make code more readableAndrei Emeltchenko2014-06-181-1/+1
|
* profiles/health/hdp: Fix memory leak in SDP record preparationRavi kumar Veeramally2014-06-171-0/+2
| | | | | | | | | | | | | | | | | | | Sdp record preparation part is copied to android/health.c from profiles/health/hdp_utils.c. Memory leak is noticed while testing. Memory summay is from android daemon, but code snippet is same. It is already fixed in android/health.c while submitting android related patches. ==12515== 286 (16 direct, 270 indirect) bytes in 1 blocks are definitely lost in loss record 158 of 165 ==12515== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==12515== by 0x44AC45: sdp_list_append (sdp.c:1743) ==12515== by 0x4398F9: register_features (health.c:381) ==12515== by 0x4091CC: queue_foreach (queue.c:219) ==12515== by 0x43A31F: bt_health_mdep_cfg_data (health.c:398) ==12515== by 0x418B50: cmd_watch_cb (ipc.c:144) ==12515== by 0x4E7FCE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0) ==12515== by 0x4E80047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0) ==12515== by 0x4E80309: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0) ==12515== by 0x4044F2: main (main.c:538)
* HDP: Set error message on error conditionAndrei Emeltchenko2014-06-131-1/+4
| | | | | | | | | | | Fixes clang warning: ... CC profiles/health/bluetoothd-hdp.o profiles/health/hdp.c:1778:13: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'gerr') "%s", gerr->message); ^~~~~~~~~~~~~ ...
* HDP: trivial: Fix redundant debug printAndrei Emeltchenko2014-06-131-1/+2
|
* input: Fix access to uninitialized data when authorizing connectionsJohan Hedberg2014-06-101-22/+23
| | | | | | | | | There were bt_io_get() failure code paths in two places that would access "src" and "dst" when they are uninitialized. This would happen e.g. if the HID device disconnects before we've authorized the connection. To fix this we now save the remote address in a more complete confirm context and use the source address already available in the server context.
* profiles/audio: Fix propagation of EHOSTDOWN errorAndrzej Kaczmarek2014-06-042-10/+16
| | | | | | EHOSTDOWN error is now overwritten by EIO and once it's passed to device_profile_connected it triggers connection of another profiles while it should actually stop connecting them.
* audio/media: Check if setting value is already setLuiz Augusto von Dentz2014-06-031-1/+6
| | | | If the setting value is already set the is no need to send anything.
* audio/media: Fix crash while changing repeat modeLuiz Augusto von Dentz2014-06-031-0/+2
| | | | | | | | | | By changing repeat mode to 'group' which does not have a direct translation to MPRIS LoopStatus will cause the following crash: _dbus_abort () from /usr/lib/libdbus-1.so.3 _dbus_warn_check_failed () from /usr/lib/libdbus-1.so.3 dbus_message_iter_append_basic () from /usr/lib/libdbus-1.so.3 set_repeat_setting (key=0x80d6a87 "Repeat", value=0x80d8079 "group", user_data=0x984ab40) at profiles/audio/media.c:1050
* input: Do not send UHID_DESTROYLuiz Augusto von Dentz2014-05-302-26/+1
| | | | | | | | Accourding to uHID documentation when diconnecting the kernel will take care of cleaning up any device created: "If you close() the fd, the device is automatically unregistered and destroyed internally."
* gatt: Fix not freeing GError on failureJakub Tyszkowski2014-05-271-0/+5
|
* audio: Add definitions for aptXAndrzej Kaczmarek2014-05-271-5/+28
|
* audio: Add macros to access MPEG-2,4 AAC codec infoAndrzej Kaczmarek2014-05-271-0/+24
| | | | | This patch provides helper macros to get, set and init-in-struct both frequency and bitrate fields in codec info structs for MPEG-2,4 AAC.
* audio: Add definitions for MPEG-2,4 AAC codecAndrzej Kaczmarek2014-05-271-0/+45
| | | | | | frequency and bitrate bit-fields are splitted into separate bytes since they span across byte-boundary and cannot be set easily on LE arch anyway.
* audio: Fix a2dp_vendor_codec_t declarationAndrzej Kaczmarek2014-05-272-10/+6
| | | | | | | As per A2DP spec, both Vendor ID (4.7.2.1) and Codec ID (4.7.2.2) are defined as 32-bit and 16-bit values respectively rather that array of bytes. Also changing to uint types will make using these values in code much easier.
* input: Update uhid_copy.h to version from Linux 3.14Szymon Janc2014-05-251-2/+4
|
* input/hog: Rework uHID code to use bt_uhidLuiz Augusto von Dentz2014-05-231-185/+90
|
* input/device: Fix warnings when disconnectingLuiz Augusto von Dentz2014-05-231-25/+5
| | | | | | Since the introdution of btd_profile there is a dedicated callback for disconnecting profiles which should never be mixed with device_add_disconnect_watch since they serve the same purpose.
* input/device: Rework uHID code to use bt_uhidLuiz Augusto von Dentz2014-05-231-184/+71
|
* hog: Fix compilation error on 32 bit machineSzymon Janc2014-05-141-1/+1
| | | | | | | | | | | | Fix following with GCC version 4.8.2 (Debian 4.8.2-21): CC profiles/input/bluetoothd-hog.o profiles/input/hog.c: In function ‘report_value_cb’: profiles/input/hog.c:149:8: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Werror=format=] status, sizeof(ev)); ^
* input: Fix compilation errors on 32 bit machineSzymon Janc2014-05-141-2/+2
| | | | | | | | | | | | | | | | | | Fix following with GCC version 4.8.2 (Debian 4.8.2-21): CC profiles/input/bluetoothd-device.o profiles/input/device.c: In function ‘uhid_send_feature_answer’: profiles/input/device.c:232:8: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Werror=format=] len, sizeof(ev)); ^ profiles/input/device.c: In function ‘uhid_send_input_report’: profiles/input/device.c:274:8: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Werror=format=] len, sizeof(ev)); ^
* hog: Fix report_value_cb() buffer overflowPetri Gynther2014-05-091-9/+14
| | | | | Fix buffer overflow that would happen in the case: hogdev->has_report_id == TRUE && report_size == UHID_DATA_MAX
* hog: Improve report_value_cb() uHID error handlingPetri Gynther2014-05-091-5/+16
| | | | | Use similar uHID error handling and debug messages as uhid_send_input_report() in profiles/input/device.c.
* hog: Fix report_value_cb() signaturePetri Gynther2014-05-091-2/+1
| | | | Fix report_value_cb() signature to match GAttribNotifyFunc.
* audio/player: Fix accepting invalid folders in ChangeFolderLuiz Augusto von Dentz2014-05-091-0/+8
| | | | | | When navigating on VFS ChangeFolder should only accept folders that are one level away for the current one as it does use ChangePath which can only navigate one level up/down in the virtual filesystem.
* input: Fix minor coding style issuesJohan Hedberg2014-05-081-24/+28
|
* input: Add userspace HID supportPetri Gynther2014-05-085-16/+752
| | | | | | | | | | | | | | | | | | | Enable HID protocol handling in userspace when UserspaceHID=true in input.conf. Benefits of userspace HID: 1. Persistent HID/input pipeline For a Bluetooth HID device, the corresponding kernel HID/input devices are created only once when the Bluetooth HID device is used the first time. The HID/input pipeline is not destroyed and recreated every time when the Bluetooth HID device disconnects and reconnects. 2. HID vs HoG parity Enables HID and HoG devices to operate the same way in BlueZ stack, using uHID kernel module (/dev/uhid) to pass HID report data between bluetoothd and kernel HID subsystem. 3. Debugging It is easier to debug HID protocol in userspace than in HIDP kernel module.
* hog: Remove redundant structAndrzej Kaczmarek2014-05-051-20/+5
| | | | | | Since complete descriptor discovery is now performed inside gatt code, there's no need to store end handle for characteristics and thus we can remove disc_desc_cb_data.
* thermometer: Discover descriptors using gatt_discover_descAndrzej Kaczmarek2014-05-051-23/+5
|
* cyclingspeed: Discover CCC using gatt_discover_descAndrzej Kaczmarek2014-05-051-47/+26
|
* heartrate: Discover CCC using gatt_discover_descAndrzej Kaczmarek2014-05-051-40/+19
|
* scan: Discover CCC using gatt_discover_descAndrzej Kaczmarek2014-05-051-21/+13
|
* hog: Discover descriptors using gatt_discover_descAndrzej Kaczmarek2014-05-051-40/+12
|
* gas: Discover CCC using gatt_discover_descAndrzej Kaczmarek2014-05-051-27/+13
|
* hog: Improve report map debuggingAndrzej Kaczmarek2014-04-301-26/+38
| | | | | | | | | | | | Now that we can split report map into items it's convenient to have it printed with items structure preserved which makes it more useful for debugging. Up to 5 bytes are printed for each item which is enough for short items and for long items continuation mark ('...') is printed if necessary. This is because as for now there are no long item tags defined except for some vendor defined thus we can safely "ignore" them and avoid overly complicated code.
* hog: Fix checking for Report ID item presenceAndrzej Kaczmarek2014-04-301-5/+62
| | | | | | | | | | | | | | | | Report ID item in Report Descriptor is now detected by simply looking for applicable item prefixes anywhere in data and does not take items structure into consideration. This could lead to false-positive detections in case value we look for is just part of item data, not an actual item prefix. As defined in Device Class Definition for HID (6.2.2.7), Report ID is a short item with prefix 100001nn (binary) thus we do not need to do complete parsing of Report Descriptor but only need to check items prefixes in order to find Report ID items reliably. This patch checks Report Descriptor item by item looking for item prefix which matches Report ID, as defined in spec above.
* audio/player: Fix properties Browsable/SearchableLuiz Augusto von Dentz2014-04-231-3/+3
| | | | | | | Those properties are set before the initial scope has been set so checking for scope will always cause them to be invalidated, instead check if any folder exists which indicates that MediaFolder interface will be created shortly.
* input: Use proper bool type for boolean variableJohan Hedberg2014-04-051-7/+7
|
* input: Refactor HIDP kernel module interactionPetri Gynther2014-04-051-53/+64
| | | | Refactor HIDP kernel module interaction to ioctl_xxx routines.
* input: Fix input.conf IdleTimeout handlingPetri Gynther2014-04-051-7/+6
| | | | | | IdleTimeout is an optional config item in input.conf. Don't complain if it is not defined. Instead, do the opposite and show its value in debug logs only when it is defined.
* Remove unneeded headers includeClaudio Takahasi2014-04-042-3/+0
|
* proximity: Remove att_put_u8() usageClaudio Takahasi2014-03-251-1/+1
|
* gatt: Move Characteristic properties to attrib/gatt.hClaudio Takahasi2014-03-257-22/+22
| | | | | | Properties are defined by GATT specification. This patch moves and renames the defines related to Characteristic properties bits from attrib/att.h to attrib/gatt.h
* Replace att_put_u16() by put_le16()Claudio Takahasi2014-03-247-23/+25
|
* Replace att_get_u16() by get_le16()Claudio Takahasi2014-03-247-31/+36
|
* Replace att_put_u32() by put_le32()Claudio Takahasi2014-03-241-1/+1
|
* Replace att_get_u32() by get_le32()Claudio Takahasi2014-03-242-2/+4
|