OSDN Git Service

Modify the wake reasons accounting API\'s
[android-x86/hardware-libhardware_legacy.git] / audio / audio_hw_hal.cpp
index 9b1f1a3..d15044a 100644 (file)
@@ -28,6 +28,8 @@
 
 namespace android_audio_legacy {
 
+class AudioHardwareInterface;
+
 extern "C" {
 
 struct legacy_audio_module {
@@ -37,7 +39,7 @@ struct legacy_audio_module {
 struct legacy_audio_device {
     struct audio_hw_device device;
 
-    struct AudioHardwareInterface *hwif;
+    AudioHardwareInterface *hwif;
 };
 
 struct legacy_stream_out {
@@ -480,7 +482,7 @@ static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
 {
     const struct legacy_audio_device *ladev = to_cladev(dev);
     return ladev->hwif->getInputBufferSize(config->sample_rate, (int) config->format,
-                                           popcount(config->channel_mask));
+                                           audio_channel_count_from_in_mask(config->channel_mask));
 }
 
 static int adev_open_output_stream(struct audio_hw_device *dev,
@@ -488,7 +490,8 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
                                    audio_devices_t devices,
                                    audio_output_flags_t flags,
                                    struct audio_config *config,
-                                   struct audio_stream_out **stream_out)
+                                   struct audio_stream_out **stream_out,
+                                   const char *address __unused)
 {
     struct legacy_audio_device *ladev = to_ladev(dev);
     status_t status;
@@ -552,7 +555,10 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
                                   audio_io_handle_t handle,
                                   audio_devices_t devices,
                                   struct audio_config *config,
-                                  struct audio_stream_in **stream_in)
+                                  struct audio_stream_in **stream_in,
+                                  audio_input_flags_t flags __unused,
+                                  const char *address __unused,
+                                  audio_source_t source __unused)
 {
     struct legacy_audio_device *ladev = to_ladev(dev);
     status_t status;