summaryrefslogtreecommitdiffstats
path: root/media/mtp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-01-27 10:47:40 -0800
committerMike Lockwood <lockwood@android.com>2011-01-27 16:22:15 -0800
commitf41ef0ee0da4c497352df42d09c3d89940c25e14 (patch)
tree61b326463ac9122bf55196d354420cf2ca2c5306 /media/mtp
parent6cfacdf97708bc3a0e3d1ed3e07e71caae9a194e (diff)
downloadframeworks_av-f41ef0ee0da4c497352df42d09c3d89940c25e14.zip
frameworks_av-f41ef0ee0da4c497352df42d09c3d89940c25e14.tar.gz
frameworks_av-f41ef0ee0da4c497352df42d09c3d89940c25e14.tar.bz2
Add support for synchronous bulk USB transfers
Change-Id: Id5de49e4d728a702fa1583ecc24f83f36cc57d21 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp')
-rw-r--r--media/mtp/MtpDevice.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index d02ed90..4383b5f 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -92,16 +92,16 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
// some music players need to see this before entering MTP mode.
char buffer[256];
memset(buffer, 0, sizeof(buffer));
- int ret = usb_device_send_control(device,
+ int ret = usb_device_control_transfer(device,
USB_DIR_IN|USB_RECIP_DEVICE|USB_TYPE_STANDARD,
USB_REQ_GET_DESCRIPTOR, (USB_DT_STRING << 8) | 0xEE,
- 0, sizeof(buffer), buffer);
- printf("usb_device_send_control returned %d errno: %d\n", ret, errno);
+ 0, buffer, sizeof(buffer), 0);
+ printf("usb_device_control_transfer returned %d errno: %d\n", ret, errno);
if (ret > 0) {
printf("got MTP string %s\n", buffer);
- ret = usb_device_send_control(device,
+ ret = usb_device_control_transfer(device,
USB_DIR_IN|USB_RECIP_DEVICE|USB_TYPE_VENDOR, 1,
- 0, 4, sizeof(buffer), buffer);
+ 0, 4, buffer, sizeof(buffer), 0);
printf("OS descriptor got %d\n", ret);
} else {
printf("no MTP string\n");