am f1ee67e1: camera3: Update the HAL spec for raw cropping behavior

* commit 'f1ee67e1ea6d55e4621bbd418c15fdc1aac32a84':
  camera3: Update the HAL spec for raw cropping behavior
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index 6c28def..d0648b7 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -54,7 +54,10 @@
 #define AUDIO_DEVICE_API_VERSION_0_0 HARDWARE_DEVICE_API_VERSION(0, 0)
 #define AUDIO_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0)
 #define AUDIO_DEVICE_API_VERSION_2_0 HARDWARE_DEVICE_API_VERSION(2, 0)
-#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_2_0
+#define AUDIO_DEVICE_API_VERSION_3_0 HARDWARE_DEVICE_API_VERSION(3, 0)
+#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_0
+/* Minimal audio HAL version supported by the audio framework */
+#define AUDIO_DEVICE_API_VERSION_MIN AUDIO_DEVICE_API_VERSION_2_0
 
 /**
  * List of known audio HAL modules. This is the base name of the audio HAL
@@ -561,6 +564,38 @@
      * method may leave it set to NULL.
      */
     int (*get_master_mute)(struct audio_hw_device *dev, bool *mute);
+
+    /**
+     * Routing control
+     */
+
+    /* Creates an audio patch between several source and sink ports.
+     * The handle is allocated by the HAL and should be unique for this
+     * audio HAL module. */
+    int (*create_audio_patch)(struct audio_hw_device *dev,
+                               unsigned int num_sources,
+                               const struct audio_port_config *sources,
+                               unsigned int num_sinks,
+                               const struct audio_port_config *sinks,
+                               audio_patch_handle_t *handle);
+
+    /* Release an audio patch */
+    int (*release_audio_patch)(struct audio_hw_device *dev,
+                               audio_patch_handle_t handle);
+
+    /* Fills the list of supported attributes for a given audio port.
+     * As input, "port" contains the information (type, role, address etc...)
+     * needed by the HAL to identify the port.
+     * As output, "port" contains possible attributes (sampling rates, formats,
+     * channel masks, gain controllers...) for this port.
+     */
+    int (*get_audio_port)(struct audio_hw_device *dev,
+                          struct audio_port *port);
+
+    /* Set audio port configuration */
+    int (*set_audio_port_config)(struct audio_hw_device *dev,
+                         const struct audio_port_config *config);
+
 };
 typedef struct audio_hw_device audio_hw_device_t;
 
diff --git a/include/hardware/audio_policy.h b/include/hardware/audio_policy.h
index 0e88361..99cb044 100644
--- a/include/hardware/audio_policy.h
+++ b/include/hardware/audio_policy.h
@@ -248,9 +248,6 @@
                                 const audio_offload_info_t *info);
 };
 
-/* audio hw module handle used by load_hw_module(), open_output_on_module()
- * and open_input_on_module() */
-typedef int audio_module_handle_t;
 
 struct audio_policy_service_ops {
     /*
diff --git a/modules/camera/Camera.cpp b/modules/camera/Camera.cpp
index 1f22e00..de3ae78 100644
--- a/modules/camera/Camera.cpp
+++ b/modules/camera/Camera.cpp
@@ -473,14 +473,14 @@
     ATRACE_CALL();
     android::Mutex::Autolock al(mDeviceLock);
 
-    fdprintf(fd, "Camera ID: %d (Busy: %d)\n", mId, mBusy);
+    dprintf(fd, "Camera ID: %d (Busy: %d)\n", mId, mBusy);
 
     // TODO: dump all settings
-    fdprintf(fd, "Most Recent Settings: (%p)\n", mSettings);
+    dprintf(fd, "Most Recent Settings: (%p)\n", mSettings);
 
-    fdprintf(fd, "Number of streams: %d\n", mNumStreams);
+    dprintf(fd, "Number of streams: %d\n", mNumStreams);
     for (int i = 0; i < mNumStreams; i++) {
-        fdprintf(fd, "Stream %d/%d:\n", i, mNumStreams);
+        dprintf(fd, "Stream %d/%d:\n", i, mNumStreams);
         mStreams[i]->dump(fd);
     }
 }
diff --git a/modules/camera/Stream.cpp b/modules/camera/Stream.cpp
index b846a71..2db3ed2 100644
--- a/modules/camera/Stream.cpp
+++ b/modules/camera/Stream.cpp
@@ -225,18 +225,18 @@
 {
     android::Mutex::Autolock al(mLock);
 
-    fdprintf(fd, "Stream ID: %d (%p)\n", mId, mStream);
-    fdprintf(fd, "Stream Type: %s (%d)\n", typeToString(mType), mType);
-    fdprintf(fd, "Width: %"PRIu32" Height: %"PRIu32"\n", mWidth, mHeight);
-    fdprintf(fd, "Stream Format: %s (%d)", formatToString(mFormat), mFormat);
+    dprintf(fd, "Stream ID: %d (%p)\n", mId, mStream);
+    dprintf(fd, "Stream Type: %s (%d)\n", typeToString(mType), mType);
+    dprintf(fd, "Width: %"PRIu32" Height: %"PRIu32"\n", mWidth, mHeight);
+    dprintf(fd, "Stream Format: %s (%d)", formatToString(mFormat), mFormat);
     // ToDo: prettyprint usage mask flags
-    fdprintf(fd, "Gralloc Usage Mask: %#"PRIx32"\n", mUsage);
-    fdprintf(fd, "Max Buffer Count: %"PRIu32"\n", mMaxBuffers);
-    fdprintf(fd, "Buffers Registered: %s\n", mRegistered ? "true" : "false");
-    fdprintf(fd, "Number of Buffers: %"PRIu32"\n", mNumBuffers);
+    dprintf(fd, "Gralloc Usage Mask: %#"PRIx32"\n", mUsage);
+    dprintf(fd, "Max Buffer Count: %"PRIu32"\n", mMaxBuffers);
+    dprintf(fd, "Buffers Registered: %s\n", mRegistered ? "true" : "false");
+    dprintf(fd, "Number of Buffers: %"PRIu32"\n", mNumBuffers);
     for (uint32_t i = 0; i < mNumBuffers; i++) {
-        fdprintf(fd, "Buffer %"PRIu32"/%"PRIu32": %p\n", i, mNumBuffers,
-                                                                mBuffers[i]);
+        dprintf(fd, "Buffer %"PRIu32"/%"PRIu32": %p\n", i, mNumBuffers,
+                mBuffers[i]);
     }
 }