19 Commits

Author SHA1 Message Date
Mike Lockwood
6b524d9b45 Add accessorytest Linux host tool for testing USB accessory audio and HID support.
The tool supports testing USB audio by default.
It reads audio from the ALSA device for the android phone in accessory mode
and outputs it to the ALSA device for the PC's speaker.
The default values work on my PC, but can be changed via command line options.

When the -a option is specified, accessorytest also acts as the host side of the
AccessoryChat test, so audio can be tested side by side with the accessory bulk endpoint support.

When the -h option is specified, accessorytest will look for HID devices on the PC and proxy them
to the phone over the accessory protocol. This requires running accessorytest as root.

Change-Id: I1ea06d7201cd845b95a92a42594464783a90189b
2014-08-04 15:29:18 -07:00
Narayan Kamath
ecd072161e resolved conflicts for merge of 22d07464 to master
Change-Id: Ic037261eedd6e224938c960d2b4597590c81ed9d
2014-03-27 14:22:47 +00:00
Ashok Bhat
f5df700e6c AArch64: Make frameworks/base code more portable
Changes in this patch include

[x] Use %zu for size_t, %zd for ssize_t

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

Change-Id: Id1aaa7894a7d0b85ac7ecd7b2bfd8cc40374261f
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2014-03-27 12:30:42 +00:00
Mike Lockwood
2280c18826 Fix accessorychat test program
Change-Id: Ib51b880f64b13e860721d594c900b45d5725b718
2014-02-25 11:00:41 -08:00
Simon Wilson
c92e6f14f9 AccessoryChat: use platform APIs and support Galaxy Nexus
Change-Id: I171c2781f3d447bec46f0179351e1b18721b1b89
2012-02-07 14:36:06 -08:00
Mike Lockwood
9e13c7e5d7 am 9645081c: am 43707a83: UsbManager: minor Javadoc tweak
* commit '9645081cc7f31e1151fedbcd5932a100719e91e4':
  UsbManager: minor Javadoc tweak
2011-04-11 14:24:11 -07:00
Mike Lockwood
43707a83ec UsbManager: minor Javadoc tweak
Change-Id: I44efc54cd2a0991465aabe0ecea1b8a3291014c2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-01 17:28:45 -04:00
Mike Lockwood
638d7cb3ee DO NOT MERGE: Backport more USB accessory changes from honeycomb
Change-Id: I8459c5ab9fbf0b3cad752041484a5de44ca9badd
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-15 16:50:18 -04:00
Mike Lockwood
ad5f83e91b USB Manager string clean up:
- Use "Cancel" instead of "Ignore"
- Customize the text for the "always use" checkbox for devices and accessories
- Clean up strings for AccessoryChat test program

Bug: 4074719

Change-Id: Ideec838e4c1f1a82ef4ae411c9124417ffb63165
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-15 16:23:40 -04:00
Mike Lockwood
015b1ecaec Add support for USB accessory serial numbers
Change-Id: I47b79f091b300ced60bfc61eff2f771139663aae
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-14 20:10:47 -04:00
Mike Lockwood
2cc0377200 DO NOT MERGE: backport recent USB accessory changes from honeycomb
Bug: 4082651

Change-Id: Ie7c2fc796dd3c64f803acbd14210e5949683f4ed
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11 20:02:43 -05:00
Mike Lockwood
62cfeeb821 USB: minor cleanup work
Bug: 4067029

Change-Id: Icd8f912ab8732b5f770a217b9b3731092597ce02
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11 18:51:29 -05:00
Mike Lockwood
ac36d7c715 UsbAccessory: Add URI string, replace type string with description
This is a first step toward adding USB accessory URI support

BUG: 4073248

Modified USB accessory matching logic to look only at manufacturer, model and version
(description and URI are not considered when matching apps to accessories)

Also added test for USB accessory protocol version to accessorytest

BUG: 4080288

Change-Id: I992a3433c74efa7a7db37bf030f02c1f0c92f9e2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 22:12:49 -05:00
Mike Lockwood
580b641117 Update USB accessory compatibility library to support new requestPermission API
BUG: 4069037

Change-Id: Ieadb86fed577eeb7697d524e8a684ea6ea632f39
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 16:46:35 -05:00
Mike Lockwood
1110748b2d DO NOT MERGE: USB accessory support library
This provides a mechanism for developing applications to work with
USB accessories in versions of android prior to the introduction
of the android.hardware.UsbManager APIs.

Applications should link against the com.android.future.usb.accessory
library to use this support.

Change-Id: I0b61e20b63eec42c506f0895a0c9a439bdfdf7f5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-02 15:23:41 -08:00
Mike Lockwood
b547fc297f Combine the USB accessory support library with the platform feature
Also renamed the support library to com.android.future.usb.accessory.jar

Change-Id: Id6226991ce73f75dfedc497adf1c25bffb670243
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-02 13:59:56 -08:00
Mike Lockwood
40bbf9295d DO NOT MERGE: Backport USB accessory support to gingerbread
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 23:09:12 -08:00
Mike Lockwood
c4308f01c9 Move USB framework support from android.hardware to android.hardware.usb package
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 08:07:20 -08:00
Mike Lockwood
2755531562 USB accessory support library
This provides a mechanism for developing applications to work with
USB accessories in versions of android prior to the introduction
of the android.hardware.UsbManager APIs.

Applications should link against the com.google.android.usb library
to use this support.

Change-Id: I48ff80467fd9a6667aa84a758eca754132f546b9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-28 17:25:57 -08:00