Commit Graph

23 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
8fb123e8d9 android/avctp: Add avctp_send_browsing function
This function can be used to send responses over browsing channel.
2014-04-25 15:05:23 +03:00
Luiz Augusto von Dentz
c621375e83 android/avctp: Add proper checks for invalid browsing PDUs 2014-04-25 15:05:23 +03:00
Luiz Augusto von Dentz
35cbfa9387 android/avctp: Make browsing handler return ssize_t
This makes possible to return errors such as -EAGAIN to indicate the
request would block and a response will be sent asynchronously.
2014-04-25 15:05:23 +03:00
Luiz Augusto von Dentz
87f8d3fd62 android/avctp: Make avctp_send_vendor to take struct iovec
This makes it possible to pass data without copying.
2014-04-15 11:13:38 +03:00
Luiz Augusto von Dentz
8679e40051 android/avctp: Make avctp_send_vendor_req to take struct iovec
This makes it possible to pass data without copying.
2014-04-15 11:13:38 +03:00
Luiz Augusto von Dentz
14e46aae16 android/avctp: Make avctp_send_browsing_req to take struct iovec
This makes it possible to pass data without copying.
2014-04-15 11:13:38 +03:00
Andrei Emeltchenko
ebf14feae9 android/avctp: Add parameters to avctp passthrough send
This allows to use vendor unique commands
2014-03-13 13:04:41 +02:00
Luiz Augusto von Dentz
d17cf9905f AVCTP: Fix sending wrong response format
Reject and Not Implemented responses of PASS THROUGH commands shall
contain the data of the previous frame accourding to AVC Panel Subunit
specification page 87.
2014-03-04 18:03:27 +02:00
Luiz Augusto von Dentz
7efeeb014e android/avctp: Make handler return ssize_t
This makes possible to return errors such as -EAGAIN to indicate the
request would block and a response will be sent asynchronously.
2014-03-04 11:32:42 +02:00
Luiz Augusto von Dentz
8a50b1f2eb android/avctp: Fix leaking passthrough handler
In case the handler is not destroyed by the owner automatically free it
as there is no use for it after the session is freed.
2014-03-02 20:42:57 +02:00
Luiz Augusto von Dentz
1e8a6d5b4d android/avctp: Checks error on send_event
In case of EINTR retry sending the event otherwise print the errno.
2014-02-24 17:02:11 +01:00
Luiz Augusto von Dentz
569685b752 android/avctp: Fix failing silently if uinput is not initialized
This adds a check for uinput before attempting to use send_key and if it
is not initialized response with AVC_CTYPE_NOT_IMPLEMENTED which is the
same code used when a unkown key is received.
2014-02-24 17:02:11 +01:00
Andrei Emeltchenko
6f51c94e27 android/avctp: Set uinput to invalid fd when creating session
When AVCTP session was created uinput was zero which is valid file
descriptor and that was conflicting with socketpair() fds.
2014-02-24 17:02:11 +01:00
Luiz Augusto von Dentz
cbce18be22 audio/AVCTP: Lookup key name from key_map table
The key_map table already contain the key name.
2014-02-05 16:23:42 +02:00
Luiz Augusto von Dentz
b47d64f7a5 audio/AVCTP: Add keys that can be mapped to uinput
This adds the remaining AV/C keys that can be mapped to uinput.
2014-02-05 16:22:22 +02:00
Andrei Emeltchenko
4e6071ffe3 android/avctp: Move AVC_HEADER_LENGTH from avctp header
There is currently inconsistence in the avctp code with
AVC_HEADER_LENGTH defined in avctp.h but AVCTP_HEADER_LENGTH defined in
avctp.c. Move definition to place it is actually used in consistent way.
2014-01-29 09:05:30 -08:00
Andrei Emeltchenko
632b388cd7 android/avctp: Fix wrong error message 2014-01-29 09:05:29 -08:00
Andrei Emeltchenko
e315d10828 android/avctp: Use predefined HEADER_LENGTH instead of sizeof
Make code consistent with using HEADER_LENGTH defined. Remove also type
conversion.
2014-01-29 09:05:29 -08:00
Andrei Emeltchenko
1d1f856b74 android/avctp: Trivial cleanup code
Avoid extra header calculation and fix wrong line indentation.
2014-01-27 11:30:12 -08:00
Luiz Augusto von Dentz
dc675d8252 android/AVRCP: Add initial socket handling
This adds the initial socket listening and handling incoming connections.
2014-01-26 16:19:24 -08:00
Luiz Augusto von Dentz
5826775ee8 android/AVCTP: Add avctp_set_destroy_cb
This adds avctp_set_destroy_cb that can be use to set a callback when
the AVCTP has been disconnected.
2014-01-26 16:19:24 -08:00
Luiz Augusto von Dentz
51753d8e6e android/AVCTP: Strip dependencies
This strips AVCTP code of any dependency of core and btio to make it
transport agnostic.
2014-01-26 16:19:24 -08:00
Luiz Augusto von Dentz
7dbdc87e66 android: Add copy of current AVCTP implemention
These files are not added to any makefile on purpose because they still
have external dependencies.
2014-01-26 16:19:24 -08:00