Searched refs:device (Results 1 - 25 of 28) sorted by relevance

12

/system/core/include/usbhost/
H A Dusbhost.h64 /* Callback indicating that initial device discovery is done.
78 * added_cb will be called immediately for each existing USB device,
79 * and subsequently each time a new device is added.
90 /* Creates a usb_device object for a USB device */
93 /* Releases all resources associated with the USB device */
94 void usb_device_close(struct usb_device *device);
96 /* Creates a usb_device object for already open USB device */
100 int usb_device_get_fd(struct usb_device *device);
102 /* Returns the name for the USB device, which is the same as
105 const char* usb_device_get_name(struct usb_device *device);
[all...]
/system/core/libusbhost/
H A Dusbhost.c148 D("Created device discovery thread\n");
193 D("new device %s\n", path);
196 D("gone device %s\n", path);
237 void usb_device_close(struct usb_device *device) argument
239 close(device->fd);
240 free(device);
245 struct usb_device *device = calloc(1, sizeof(struct usb_device)); local
252 length = read(fd, device->desc, sizeof(device->desc));
257 strncpy(device
270 usb_device_reopen_writeable(struct usb_device *device) argument
286 usb_device_get_fd(struct usb_device *device) argument
293 usb_device_get_name(struct usb_device *device) argument
298 usb_device_get_unique_id(struct usb_device *device) argument
321 usb_device_get_vendor_id(struct usb_device *device) argument
327 usb_device_get_product_id(struct usb_device *device) argument
333 usb_device_get_device_descriptor(struct usb_device *device) argument
338 usb_device_get_string(struct usb_device *device, int id) argument
376 usb_device_get_manufacturer_name(struct usb_device *device) argument
386 usb_device_get_product_name(struct usb_device *device) argument
396 usb_device_get_serial(struct usb_device *device) argument
406 usb_device_is_writeable(struct usb_device *device) argument
411 usb_descriptor_iter_init(struct usb_device *device, struct usb_descriptor_iter *iter) argument
428 usb_device_claim_interface(struct usb_device *device, unsigned int interface) argument
433 usb_device_release_interface(struct usb_device *device, unsigned int interface) argument
438 usb_device_connect_kernel_driver(struct usb_device *device, unsigned int interface, int connect) argument
449 usb_device_control_transfer(struct usb_device *device, int requestType, int request, int value, int index, void* buffer, int length, unsigned int timeout) argument
475 usb_device_bulk_transfer(struct usb_device *device, int endpoint, void* buffer, int length, unsigned int timeout) argument
[all...]
/system/core/toolbox/
H A Dumount.c32 char device[256]; local
45 count = fscanf(f, "%255s %255s %255s\n", device, mount_path, rest);
47 if (is_loop(device) && strcmp(path, mount_path) == 0) {
48 strlcpy(loopdev, device, LOOPDEV_MAXLEN);
76 // free the loop device
79 fprintf(stderr, "open loop device failed: %s\n", strerror(errno));
H A Dgetevent.c294 static int open_device(const char *device, int print_flags) argument
305 fd = open(device, O_RDWR);
308 fprintf(stderr, "could not open %s, %s\n", device, strerror(errno));
314 fprintf(stderr, "could not get driver version for %s, %s\n", device, strerror(errno));
319 fprintf(stderr, "could not get driver id for %s, %s\n", device, strerror(errno));
326 //fprintf(stderr, "could not get device name for %s, %s\n", device, strerror(errno));
330 //fprintf(stderr, "could not get location for %s, %s\n", device, strerror(errno));
334 //fprintf(stderr, "could not get idstring for %s, %s\n", device, strerror(errno));
352 printf("add device
387 close_device(const char *device, int print_flags) argument
508 const char *device = NULL; local
[all...]
H A Dlsof.c106 char device[10]; local
116 while (fscanf(maps, "%*x-%*x %*s %zx %5s %ld %s\n", &offset, device, &inode,
119 if (inode == 0 || !strcmp(device, "00:00"))
124 "???", device, offset, inode, file);
/system/core/include/system/
H A Daudio.h336 static inline bool audio_is_output_device(audio_devices_t device) argument
338 if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_OUT_ALL) == 0))
344 static inline bool audio_is_input_device(audio_devices_t device) argument
346 if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_IN_ALL) == 0))
352 static inline bool audio_is_a2dp_device(audio_devices_t device) argument
354 if ((popcount(device) == 1) && (device & AUDIO_DEVICE_OUT_ALL_A2DP))
360 static inline bool audio_is_bluetooth_sco_device(audio_devices_t device) argument
[all...]
/system/core/libzipfile/
H A DAndroid.mk19 # build device static library
/system/extras/tests/bionic/libstdc++/
H A DAndroid.mk24 # device executable.
29 define device-test
41 # same as 'device-test' but builds a host executable instead
77 # compiler flags, so only build this test for device/Bionic
82 $(call device-test, $(sources))
/system/core/libdiskconfig/
H A Ddiskconfig.c167 if (!(devroot = config_find(root, "device"))) {
168 LOGE("Could not find device section in config file '%s'", fn);
174 LOGE("device path is requried");
177 dinfo->device = strdup(tmp);
232 if (dinfo->device)
233 free(dinfo->device);
283 if ((fd = open(dinfo->device, O_RDWR)) < 0) {
284 LOGE("Cannot open device '%s' (errno=%d)", dinfo->device, errno);
289 LOGE("Cannot stat file '%s', errno=%d.", dinfo->device, errn
[all...]
H A Dconfig_mbr.c290 /* Returns the device path of the partition referred to by 'name'
317 num = snprintf(dev_name, MAX_NAME_LEN, "%s%d", dinfo->device, num);
/system/core/fastboot/
H A Dusb_osx.c52 /** An open usb device */
95 // Get an iterator for the interfaces on the device
99 ERR("Couldn't create a device interface iterator: (%08x)\n", kr);
257 /** Try out the given device and see if there's a match. Returns 0 on
260 static int try_device(io_service_t device, usb_handle *handle) { argument
269 kr = IOCreatePlugInInterfaceForService(device,
279 // Now create the device interface.
283 ERR("Couldn't create a device interface (%08x)\n", (int) result);
288 * We don't need the intermediate interface after the device interface
293 // So, we have a device, finall
412 io_service_t device = IOIteratorNext(iterator); local
[all...]
/system/core/debuggerd/
H A Dgetevent.c19 static int open_device(const char *device) argument
30 fd = open(device, O_RDWR);
45 //fprintf(stderr, "could not get device name for %s, %s\n", device, strerror(errno));
49 //fprintf(stderr, "could not get location for %s, %s\n", device, strerror(errno));
53 //fprintf(stderr, "could not get idstring for %s, %s\n", device, strerror(errno));
71 device_names[nfds] = strdup(device);
77 int close_device(const char *device) argument
81 if(strcmp(device_names[i], device) == 0) {
/system/core/gpttool/
H A Dgpttool.c261 const char *device; local
270 device = argv[2];
285 if (!strcmp(device, "/dev/sda") ||
286 !strcmp(device, "/dev/sdb")) {
291 fd = open(device, O_RDWR);
293 fprintf(stderr,"error: cannot open '%s'\n", device);
297 fprintf(stderr,"error: cannot query block device size\n");
/system/extras/tests/bionic/libc/
H A DAndroid.mk23 # device executable.
28 define device-test
43 # same as 'device-test' but builds a host executable instead
91 $(call device-test, $(sources))
127 $(call device-test, $(sources))
135 $(call device-test, $(sources))
148 $(call device-test, $(sources))
165 $(call device-test, $(sources))
253 #$(call device-test, $(sources))
/system/media/wilhelm/src/
H A Ddata.c66 SLObjectItf device = pDataLocator->mIODevice.device; local
67 if (NULL != device) {
88 pDataLocator->mIODevice.device = NULL;
93 // check that device has the correct object ID and is realized,
95 result = AcquireStrongRef((IObject *) device, expectedObjectID);
97 SL_LOGE("%s: locatorType=IODEVICE, but device field %p has wrong " \
98 "object ID or is not realized", name, device);
99 pDataLocator->mIODevice.device = NULL;
124 // no default device I
[all...]
/system/core/adb/
H A DAndroid.mk95 # adbd device daemon
148 # adb host tool for device-as-host
H A Dusb_linux.c92 // set mark flag to indicate this device is still alive
107 // kick any devices in the device list that were not found in the device scan
155 struct usb_device_descriptor* device; local
179 // should have device and configuration descriptors, and atleast two endpoints
186 device = (struct usb_device_descriptor*)bufptr;
189 if((device->bLength != USB_DT_DEVICE_SIZE) || (device->bDescriptorType != USB_DT_DEVICE)) {
194 vid = device->idVendor;
195 pid = device
[all...]
/system/core/include/diskconfig/
H A Ddiskconfig.h89 char *device; member in struct:disk_info
/system/core/init/
H A Ddevices.c187 * device node. Unforunately changing the euid would prevent creation of
188 * some device nodes, so the uid has to be set with chown() and is still
212 INFO("adding platform device %s\n", name);
221 * given a name that may start with a platform device, find the length of the
222 * platform device prefix. If it doesn't start with a platform device, return
250 INFO("removing platform device %s\n", name);
348 /* skip root hub name and device. use device interface */
379 const char *device; local
[all...]
/system/core/logcat/
H A Dlogcat.cpp56 char* device; member in struct:log_device_t
66 device = d;
224 snprintf(buf, sizeof(buf), "--------- beginning of %s\n", dev->device);
588 /* in an emulated device only. it basically looks for androidboot.logcat= */
732 dev->fd = open(dev->device, mode);
734 fprintf(stderr, "Unable to open log device '%s': %s\n",
735 dev->device, strerror(errno));
764 "max entry is %db, max payload is %db\n", dev->device,
/system/vold/
H A DVolume.cpp232 // Only initialize the MBR if we are formatting the entire device
263 char device[256]; local
276 sscanf(line, "%255s %255s %255s\n", device, mount_path, rest);
332 SLOGE("Failed to get device nodes (%s)\n", strerror(errno));
337 * and vold is asking to mount the primaryStorage device, then we need to decrypt
339 * block device
351 /* We only expect one device node returned when mounting encryptable volumes */
352 SLOGE("Too many device nodes returned when mounting %d\n", getMountpoint());
362 /* We now have the new sysfs path for the decrypted block device, and the
363 * majore and minor numbers for it. So, create the device, updat
[all...]
H A DVolumeManager.cpp129 /* Lookup a volume to handle this device */
281 SLOGE("ASEC loop device creation failed (%s)", strerror(errno));
294 SLOGE("ASEC device mapping failed (%s)", strerror(errno));
311 SLOGE("Failed to open new DM device for superblock write (%s)", strerror(errno));
560 SLOGW("Failed to find loop device for {%s} (%s)", fileName, strerror(errno));
628 SLOGE("ASEC loop device creation failed (%s)", strerror(errno));
632 SLOGD("New loop device created at %s", loopDevice);
693 SLOGE("ASEC device mapping failed (%s)", strerror(errno));
762 SLOGE("Image loop device creation failed (%s)", strerror(errno));
766 SLOGD("New loop device create
855 char device[256]; local
1135 char device[256]; local
[all...]
/system/core/rootdir/
H A DAndroid.mk20 # which are device-specific. However, these builds require at the moment
/system/media/wilhelm/tests/examples/
H A DslesTestRecBuffQueue.cpp196 ioDevice.device = NULL;
H A DslesTestFeedback.cpp18 // It will generate feedback (Larsen effect) if played through on-device speakers,
336 // Create an audio recorder with microphone device source and buffer queue sink.
344 locator_iodevice.device = NULL;

Completed in 279 milliseconds

12