libv4l2: LOG* -> ALOG*

Change-Id: Ib1fcd8daf8aadb0a1cc9d82d262734a28d340d94
Signed-off-by: Dima Zavin <dima@android.com>
diff --git a/libv4l2/exynos_mc.c b/libv4l2/exynos_mc.c
index 2cca6f1..f615a4e 100644
--- a/libv4l2/exynos_mc.c
+++ b/libv4l2/exynos_mc.c
@@ -98,7 +98,7 @@
 
 static int __media_enum_links(struct media_device *media)
 {
-    LOGD("%s: start", __func__);
+    ALOGD("%s: start", __func__);
     __u32 id;
     int ret = 0;
 
@@ -112,7 +112,7 @@
         links.links = (struct media_link_desc*)malloc(entity->info.links * sizeof(struct media_link_desc));
 
         if (ioctl(media->fd, MEDIA_IOC_ENUM_LINKS, &links) < 0) {
-            LOGE("Unable to enumerate pads and links (%s)", strerror(errno));
+            ALOGE("Unable to enumerate pads and links (%s)", strerror(errno));
             free(links.pads);
             free(links.links);
             return -errno;
@@ -134,7 +134,7 @@
             source = exynos_media_get_entity_by_id(media, link->source.entity);
             sink = exynos_media_get_entity_by_id(media, link->sink.entity);
             if (source == NULL || sink == NULL) {
-                LOGE("WARNING entity %u link %u from %u/%u to %u/%u is invalid!",
+                ALOGE("WARNING entity %u link %u from %u/%u to %u/%u is invalid!",
                       id, i, link->source.entity,
                       link->source.index,
                       link->sink.entity,
@@ -198,15 +198,15 @@
     char *ptr;
     char media_buf[6];
 
-    LOGD("%s: %s", __func__, filename);
+    ALOGD("%s: %s", __func__, filename);
 
     media->fd = open(filename, O_RDWR, 0);
     if (media->fd < 0) {
-        LOGE("Open sysfs media device failed, media->fd: %d", media->fd);
+        ALOGE("Open sysfs media device failed, media->fd: %d", media->fd);
         return -1;
     }
 
-    LOGD("%s: media->fd: %d", __func__, media->fd);
+    ALOGD("%s: media->fd: %d", __func__, media->fd);
 
     return media->fd;
 
@@ -259,7 +259,7 @@
         /* Fall back to get the device name via sysfs */
         __media_get_devname_sysfs(entity);
         if (ret < 0)
-            LOGE("media_get_devname failed");
+            ALOGE("media_get_devname failed");
     }
 
     return ret;
@@ -275,37 +275,37 @@
 
     media = (struct media_device *)calloc(1, sizeof(struct media_device));
     if (media == NULL) {
-        LOGE("media: %p", media);
+        ALOGE("media: %p", media);
         return NULL;
     }
 
     __media_debug_set_handler(media, debug_handler, debug_priv);
 
-    LOGD("%s: Opening media device %s", __func__, filename);
-    LOGD("%s: media: %p", __func__, media);
+    ALOGD("%s: Opening media device %s", __func__, filename);
+    ALOGD("%s: media: %p", __func__, media);
 
     media->fd = __media_get_media_fd(filename, media);
     if (media->fd < 0) {
         exynos_media_close(media);
-        LOGE("failed __media_get_media_fd %s", filename);
+        ALOGE("failed __media_get_media_fd %s", filename);
         return NULL;
     }
 
-    LOGD("%s: media->fd: %d", __func__, media->fd);
+    ALOGD("%s: media->fd: %d", __func__, media->fd);
     ret = __media_enum_entities(media);
 
     if (ret < 0) {
-        LOGE("Unable to enumerate entities for device %s (%s)", filename, strerror(-ret));
+        ALOGE("Unable to enumerate entities for device %s (%s)", filename, strerror(-ret));
         exynos_media_close(media);
         return NULL;
     }
 
-    LOGD("%s: Found %u entities", __func__, media->entities_count);
-    LOGD("%s: Enumerating pads and links", __func__);
+    ALOGD("%s: Found %u entities", __func__, media->entities_count);
+    ALOGD("%s: Enumerating pads and links", __func__);
 
     ret = __media_enum_links(media);
     if (ret < 0) {
-        LOGE("Unable to enumerate pads and links for device %s", filename);
+        ALOGE("Unable to enumerate pads and links for device %s", filename);
         exynos_media_close(media);
         return NULL;
     }
@@ -475,7 +475,7 @@
     }
 
     if (i == source->entity->num_links) {
-        LOGE("Link not found");
+        ALOGE("Link not found");
         return -ENOENT;
     }
 
@@ -493,7 +493,7 @@
 
     ret = ioctl(media->fd, MEDIA_IOC_SETUP_LINK, &ulink);
     if (ret == -1) {
-        LOGE("Unable to setup link (%s)", strerror(errno));
+        ALOGE("Unable to setup link (%s)", strerror(errno));
         return -errno;
     }
 
@@ -566,7 +566,7 @@
         return -EINVAL;
 
     devnum = makedev(entity->info.v4l.major, entity->info.v4l.minor);
-    LOGE("looking up device: %u:%u",
+    ALOGE("looking up device: %u:%u",
           major(devnum), minor(devnum));
     device = udev_device_new_from_devnum(udev, 'c', devnum);
     if (device) {
@@ -721,27 +721,27 @@
 
     link = exynos_media_parse_link(media, p, &end);
     if (link == NULL) {
-        LOGE("Unable to parse link");
+        ALOGE("Unable to parse link");
         return -EINVAL;
     }
 
     p = end;
     if (*p++ != '[') {
-        LOGE("Unable to parse link flags");
+        ALOGE("Unable to parse link flags");
         return -EINVAL;
     }
 
     flags = strtoul(p, &end, 10);
     for (p = end; isspace(*p); p++);
     if (*p++ != ']') {
-        LOGE("Unable to parse link flags");
+        ALOGE("Unable to parse link flags");
         return -EINVAL;
     }
 
     for (; isspace(*p); p++);
     *endp = (char *)p;
 
-    LOGD("%s: Setting up link %u:%u -> %u:%u [%u]", __func__,
+    ALOGD("%s: Setting up link %u:%u -> %u:%u [%u]", __func__,
           link->source->entity->info.id, link->source->index,
           link->sink->entity->info.id, link->sink->index,
           flags);
diff --git a/libv4l2/exynos_subdev.c b/libv4l2/exynos_subdev.c
index 371036c..4686863 100644
--- a/libv4l2/exynos_subdev.c
+++ b/libv4l2/exynos_subdev.c
@@ -88,12 +88,12 @@
         if ((lstat(filename, &s) == 0) && S_ISCHR(s.st_mode) &&
                 ((int)((unsigned short)(s.st_rdev) >> 8) == 81)) {
             minor = (int)((unsigned short)(s.st_rdev & 0x3f));
-            LOGD("try node: %s, minor: %d", filename, minor);
+            ALOGD("try node: %s, minor: %d", filename, minor);
             /* open sysfs entry */
             sprintf(filename, "/sys/class/video4linux/v4l-subdev%d/name", minor);
             stream_fd = fopen(filename, "r");
             if (stream_fd < 0) {
-                LOGE("failed to open sysfs entry for subdev");
+                ALOGE("failed to open sysfs entry for subdev");
                 continue;   /* try next */
             }
 
@@ -103,11 +103,11 @@
 
             /* check read size */
             if (size == 0) {
-                LOGE("failed to read sysfs entry for subdev");
+                ALOGE("failed to read sysfs entry for subdev");
             } else {
                 /* matched */
                 if (strncmp(name, devname, strlen(devname)) == 0) {
-                    LOGI("node found for device %s: /dev/v4l-subdev%d", devname, minor);
+                    ALOGI("node found for device %s: /dev/v4l-subdev%d", devname, minor);
                     found = true;
                 }
             }
@@ -121,11 +121,11 @@
         va_end(ap);
 
         if (fd > 0)
-            LOGI("open subdev device %s", filename);
+            ALOGI("open subdev device %s", filename);
         else
-            LOGE("failed to open subdev device %s", filename);
+            ALOGE("failed to open subdev device %s", filename);
     } else {
-        LOGE("no subdev device found");
+        ALOGE("no subdev device found");
     }
 
     return fd;
@@ -140,18 +140,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!frame_size_enum) {
-        LOGE("%s: frame_size_enum is NULL", __func__);
+        ALOGE("%s: frame_size_enum is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, frame_size_enum);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_ENUM_FRAME_SIZE");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_ENUM_FRAME_SIZE");
         return ret;
     }
 
@@ -167,18 +167,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!fmt) {
-        LOGE("%s: fmt is NULL", __func__);
+        ALOGE("%s: fmt is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_G_FMT, fmt);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_G_FMT");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_G_FMT");
         return ret;
     }
 
@@ -194,18 +194,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!fmt) {
-        LOGE("%s: fmt is NULL", __func__);
+        ALOGE("%s: fmt is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_S_FMT, fmt);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_S_FMT");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_S_FMT");
         return ret;
     }
 
@@ -221,18 +221,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!crop) {
-        LOGE("%s: crop is NULL", __func__);
+        ALOGE("%s: crop is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_G_CROP, crop);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_G_CROP");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_G_CROP");
         return ret;
     }
 
@@ -248,18 +248,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!crop) {
-        LOGE("%s: crop is NULL", __func__);
+        ALOGE("%s: crop is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_S_CROP, crop);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_S_CROP");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_S_CROP");
         return ret;
     }
 
@@ -275,18 +275,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!frame_internval_enum) {
-        LOGE("%s: frame_internval_enum is NULL", __func__);
+        ALOGE("%s: frame_internval_enum is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, frame_internval_enum);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL");
         return ret;
     }
 
@@ -302,18 +302,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!frame_internval) {
-        LOGE("%s: frame_internval is NULL", __func__);
+        ALOGE("%s: frame_internval is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_G_FRAME_INTERVAL, frame_internval);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_G_FRAME_INTERVAL");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_G_FRAME_INTERVAL");
         return ret;
     }
 
@@ -329,18 +329,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!frame_internval) {
-        LOGE("%s: frame_internval is NULL", __func__);
+        ALOGE("%s: frame_internval is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_S_FRAME_INTERVAL, frame_internval);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_S_FRAME_INTERVAL");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_S_FRAME_INTERVAL");
         return ret;
     }
 
@@ -356,18 +356,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!mbus_code_enum) {
-        LOGE("%s: mbus_code_enum is NULL", __func__);
+        ALOGE("%s: mbus_code_enum is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_SUBDEV_ENUM_MBUS_CODE, mbus_code_enum);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE");
+        ALOGE("failed to ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE");
         return ret;
     }
 
diff --git a/libv4l2/exynos_v4l2.c b/libv4l2/exynos_v4l2.c
index e8c5029..8f57a68 100644
--- a/libv4l2/exynos_v4l2.c
+++ b/libv4l2/exynos_v4l2.c
@@ -110,12 +110,12 @@
         if ((lstat(filename, &s) == 0) && S_ISCHR(s.st_mode) &&
                 ((int)((unsigned short)(s.st_rdev) >> 8) == 81)) {
             minor = (int)((unsigned short)(s.st_rdev & 0x3f));
-            LOGD("try node: %s, minor: %d", filename, minor);
+            ALOGD("try node: %s, minor: %d", filename, minor);
             /* open sysfs entry */
             sprintf(filename, "/sys/class/video4linux/video%d/name", minor);
             stream_fd = fopen(filename, "r");
             if (stream_fd < 0) {
-                LOGE("failed to open sysfs entry for videodev");
+                ALOGE("failed to open sysfs entry for videodev");
                 continue;   /* try next */
             }
 
@@ -125,11 +125,11 @@
 
             /* check read size */
             if (size == 0) {
-                LOGE("failed to read sysfs entry for videodev");
+                ALOGE("failed to read sysfs entry for videodev");
             } else {
                 /* matched */
                 if (strncmp(name, devname, strlen(devname)) == 0) {
-                    LOGI("node found for device %s: /dev/video%d", devname, minor);
+                    ALOGI("node found for device %s: /dev/video%d", devname, minor);
                     found = true;
                 }
             }
@@ -143,11 +143,11 @@
         va_end(ap);
 
         if (fd > 0)
-            LOGI("open video device %s", filename);
+            ALOGI("open video device %s", filename);
         else
-            LOGE("failed to open video device %s", filename);
+            ALOGE("failed to open video device %s", filename);
     } else {
-        LOGE("no video device found");
+        ALOGE("no video device found");
     }
 
     return fd;
@@ -158,7 +158,7 @@
     int ret = -1;
 
     if (fd < 0)
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
     else
         ret = close(fd);
 
@@ -171,18 +171,18 @@
     struct v4l2_input input;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return NULL;
     }
 
     input.index = index;
     ret = ioctl(fd, VIDIOC_ENUMINPUT, &input);
     if (ret) {
-        LOGE("%s: no matching index founds", __func__);
+        ALOGE("%s: no matching index founds", __func__);
         return false;
     }
 
-    LOGI("Name of input channel[%d] is %s", input.index, input.name);
+    ALOGI("Name of input channel[%d] is %s", input.index, input.name);
 
     strcpy(input_name_buf, (const char *)input.name);
 
@@ -195,7 +195,7 @@
     struct v4l2_input input;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
@@ -203,7 +203,7 @@
 
     ret = ioctl(fd, VIDIOC_S_INPUT, &input);
     if (ret){
-        LOGE("failed to ioctl: VIDIOC_S_INPUT (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_S_INPUT (%d)", ret);
         return ret;
     }
 
@@ -216,7 +216,7 @@
     int ret;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return false;
     }
 
@@ -225,7 +225,7 @@
             !(need_caps & V4L2_CAP_VIDEO_OUTPUT) &&
             !(need_caps & V4L2_CAP_VIDEO_OUTPUT_MPLANE) &&
             !(need_caps & V4L2_CAP_VIDEO_OVERLAY)) {
-        LOGE("%s: unsupported capabilities", __func__);
+        ALOGE("%s: unsupported capabilities", __func__);
         return false;
     }
 
@@ -233,12 +233,12 @@
 
     ret = ioctl(fd, VIDIOC_QUERYCAP, &cap);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_QUERYCAP (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_QUERYCAP (%d)", ret);
         return false;
     }
 
     if ((need_caps & cap.capabilities) != need_caps) {
-        LOGE("%s: unsupported capabilities", __func__);
+        ALOGE("%s: unsupported capabilities", __func__);
         return false;
     }
 
@@ -255,7 +255,7 @@
 
     while (ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc) == 0) {
         if (fmtdesc.pixelformat == fmt) {
-            LOGE("Passed fmt = %#x found pixel format[%d]: %s", fmt, fmtdesc.index, fmtdesc.description);
+            ALOGE("Passed fmt = %#x found pixel format[%d]: %s", fmt, fmtdesc.index, fmtdesc.description);
             found = 1;
             break;
         }
@@ -264,7 +264,7 @@
     }
 
     if (!found) {
-        LOGE("%s: unsupported pixel format", __func__);
+        ALOGE("%s: unsupported pixel format", __func__);
         return false;
     }
 
@@ -276,23 +276,23 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!fmt) {
-        LOGE("%s: fmt is NULL", __func__);
+        ALOGE("%s: fmt is NULL", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(fmt->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_G_FMT, fmt);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_G_FMT");
+        ALOGE("failed to ioctl: VIDIOC_G_FMT");
         return ret;
     }
 
@@ -304,25 +304,25 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!fmt) {
-        LOGE("%s: fmt is NULL", __func__);
+        ALOGE("%s: fmt is NULL", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(fmt->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     } else {
         ret = ioctl(fd, request, fmt);
         if (ret) {
             if (request == VIDIOC_TRY_FMT)
-                LOGE("failed to ioctl: VIDIOC_TRY_FMT (%d)", ret);
+                ALOGE("failed to ioctl: VIDIOC_TRY_FMT (%d)", ret);
             else
-                LOGE("failed to ioctl: VIDIOC_S_FMT (%d)", ret);
+                ALOGE("failed to ioctl: VIDIOC_S_FMT (%d)", ret);
 
             return ret;
         }
@@ -347,22 +347,22 @@
     unsigned int count;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!req) {
-        LOGE("%s: req is NULL", __func__);
+        ALOGE("%s: req is NULL", __func__);
         return ret;
     }
 
     if ((req->memory != V4L2_MEMORY_MMAP) && (req->memory != V4L2_MEMORY_USERPTR)) {
-        LOGE("%s: unsupported memory type", __func__);
+        ALOGE("%s: unsupported memory type", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(req->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
@@ -370,12 +370,12 @@
 
     ret = ioctl(fd, VIDIOC_REQBUFS, req);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_REQBUFS (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_REQBUFS (%d)", ret);
         return ret;
     }
 
     if (count != req->count) {
-        LOGW("number of buffers had been changed: %d => %d", count, req->count);
+        ALOGW("number of buffers had been changed: %d => %d", count, req->count);
     }
 
     return ret;
@@ -386,28 +386,28 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!buf) {
-        LOGE("%s: buf is NULL", __func__);
+        ALOGE("%s: buf is NULL", __func__);
         return ret;
     }
 
     if (buf->memory != V4L2_MEMORY_MMAP) {
-        LOGE("%s: unsupported memory type", __func__);
+        ALOGE("%s: unsupported memory type", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(buf->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_QUERYBUF, buf);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_QUERYBUF (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_QUERYBUF (%d)", ret);
         return ret;
     }
 
@@ -419,28 +419,28 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!buf) {
-        LOGE("%s: buf is NULL", __func__);
+        ALOGE("%s: buf is NULL", __func__);
         return ret;
     }
 
     if ((buf->memory != V4L2_MEMORY_MMAP) && (buf->memory != V4L2_MEMORY_USERPTR)) {
-        LOGE("%s: unsupported memory type", __func__);
+        ALOGE("%s: unsupported memory type", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(buf->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_QBUF, buf);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_QBUF (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_QBUF (%d)", ret);
         return ret;
     }
 
@@ -452,28 +452,28 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!buf) {
-        LOGE("%s: buf is NULL", __func__);
+        ALOGE("%s: buf is NULL", __func__);
         return ret;
     }
 
     if ((buf->memory != V4L2_MEMORY_MMAP) && (buf->memory != V4L2_MEMORY_USERPTR)) {
-        LOGE("%s: unsupported memory type", __func__);
+        ALOGE("%s: unsupported memory type", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(buf->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_DQBUF, buf);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_DQBUF (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_DQBUF (%d)", ret);
         return ret;
     }
 
@@ -485,18 +485,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (__v4l2_check_buf_type(type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_STREAMON, &type);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_STREAMON (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_STREAMON (%d)", ret);
         return ret;
     }
 
@@ -508,18 +508,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (__v4l2_check_buf_type(type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_STREAMOFF, &type);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_STREAMOFF (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_STREAMOFF (%d)", ret);
         return ret;
     }
 
@@ -531,23 +531,23 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!crop) {
-        LOGE("%s: crop is NULL", __func__);
+        ALOGE("%s: crop is NULL", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(crop->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_CROPCAP, crop);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_CROPCAP (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_CROPCAP (%d)", ret);
         return ret;
     }
 
@@ -559,23 +559,23 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!crop) {
-        LOGE("%s: crop is NULL", __func__);
+        ALOGE("%s: crop is NULL", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(crop->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_G_CROP, crop);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_G_CROP (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_G_CROP (%d)", ret);
         return ret;
     }
 
@@ -587,23 +587,23 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (!crop) {
-        LOGE("%s: crop is NULL", __func__);
+        ALOGE("%s: crop is NULL", __func__);
         return ret;
     }
 
     if (__v4l2_check_buf_type(crop->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_S_CROP, crop);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_S_CROP (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_S_CROP (%d)", ret);
         return ret;
     }
 
@@ -618,13 +618,13 @@
     ctrl.id = id;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_G_CTRL, &ctrl);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_G_CTRL (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_G_CTRL (%d)", ret);
         return ret;
     }
 
@@ -642,13 +642,13 @@
     ctrl.value = value;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_S_CTRL, &ctrl);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_S_CTRL (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_S_CTRL (%d)", ret);
         return ret;
     }
 
@@ -660,18 +660,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (__v4l2_check_buf_type(streamparm->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_G_PARM, streamparm);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_G_PARM (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_G_PARM (%d)", ret);
         return ret;
     }
 
@@ -683,18 +683,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (__v4l2_check_buf_type(streamparm->type) == false) {
-        LOGE("%s: unsupported buffer type", __func__);
+        ALOGE("%s: unsupported buffer type", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_S_PARM, streamparm);
     if (ret) {
-        LOGE("failed to ioctl: VIDIOC_S_PARM (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_S_PARM (%d)", ret);
         return ret;
     }
 
@@ -706,18 +706,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (ctrl == NULL) {
-        LOGE("%s: ctrl is NULL", __func__);
+        ALOGE("%s: ctrl is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_G_EXT_CTRLS, ctrl);
     if (ret)
-        LOGE("failed to ioctl: VIDIOC_G_EXT_CTRLS (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_G_EXT_CTRLS (%d)", ret);
 
     return ret;
 }
@@ -727,18 +727,18 @@
     int ret = -1;
 
     if (fd < 0) {
-        LOGE("%s: invalid fd: %d", __func__, fd);
+        ALOGE("%s: invalid fd: %d", __func__, fd);
         return ret;
     }
 
     if (ctrl == NULL) {
-        LOGE("%s: ctrl is NULL", __func__);
+        ALOGE("%s: ctrl is NULL", __func__);
         return ret;
     }
 
     ret = ioctl(fd, VIDIOC_S_EXT_CTRLS, ctrl);
     if (ret)
-        LOGE("failed to ioctl: VIDIOC_S_EXT_CTRLS (%d)", ret);
+        ALOGE("failed to ioctl: VIDIOC_S_EXT_CTRLS (%d)", ret);
 
     return ret;
 }