OSDN Git Service

Use audio_channel_mask_t consistently
authorGlenn Kasten <gkasten@google.com>
Tue, 19 Jun 2012 19:16:04 +0000 (12:16 -0700)
committerGlenn Kasten <gkasten@google.com>
Mon, 25 Jun 2012 17:45:43 +0000 (10:45 -0700)
Change-Id: Ib832c0b707b1e0b82adf4ab3d4d18a2dc459d240

include/hardware/audio_effect.h
include/hardware/audio_policy.h
modules/audio/audio_hw.c
modules/audio/audio_policy.c

index 65eba36..4037bbb 100644 (file)
@@ -784,8 +784,8 @@ enum effect_feature_e {
 // EFFECT_FEATURE_AUX_CHANNELS feature configuration descriptor. Describe a combination
 // of main and auxiliary channels supported
 typedef struct channel_config_s {
-    uint32_t   main_channels;   // channel mask for main channels
-    uint32_t   aux_channels;    // channel mask for auxiliary channels
+    audio_channel_mask_t main_channels; // channel mask for main channels
+    audio_channel_mask_t aux_channels;  // channel mask for auxiliary channels
 } channel_config_t;
 
 
index 78a1a62..8924dd1 100644 (file)
@@ -132,7 +132,7 @@ struct audio_policy {
                                     audio_stream_type_t stream,
                                     uint32_t samplingRate,
                                     audio_format_t format,
-                                    uint32_t channels,
+                                    audio_channel_mask_t channelMask,
                                     audio_output_flags_t flags);
 
     /* indicates to the audio policy manager that the output starts being used
@@ -157,7 +157,7 @@ struct audio_policy {
     audio_io_handle_t (*get_input)(struct audio_policy *pol, audio_source_t inputSource,
                                    uint32_t samplingRate,
                                    audio_format_t format,
-                                   uint32_t channels,
+                                   audio_channel_mask_t channelMask,
                                    audio_in_acoustics_t acoustics);
 
     /* indicates to the audio policy manager that the input starts being used */
index d860437..15e9920 100644 (file)
@@ -55,7 +55,7 @@ static size_t out_get_buffer_size(const struct audio_stream *stream)
     return 4096;
 }
 
-static uint32_t out_get_channels(const struct audio_stream *stream)
+static audio_channel_mask_t out_get_channels(const struct audio_stream *stream)
 {
     return AUDIO_CHANNEL_OUT_STEREO;
 }
@@ -148,7 +148,7 @@ static size_t in_get_buffer_size(const struct audio_stream *stream)
     return 320;
 }
 
-static uint32_t in_get_channels(const struct audio_stream *stream)
+static audio_channel_mask_t in_get_channels(const struct audio_stream *stream)
 {
     return AUDIO_CHANNEL_IN_MONO;
 }
index ee95e92..a44ea77 100644 (file)
@@ -98,7 +98,7 @@ static audio_io_handle_t ap_get_output(struct audio_policy *pol,
                                        audio_stream_type_t stream,
                                        uint32_t sampling_rate,
                                        audio_format_t format,
-                                       uint32_t channels,
+                                       audio_channel_mask_t channelMask,
                                        audio_output_flags_t flags)
 {
     return 0;
@@ -124,7 +124,7 @@ static void ap_release_output(struct audio_policy *pol,
 static audio_io_handle_t ap_get_input(struct audio_policy *pol, audio_source_t inputSource,
                                       uint32_t sampling_rate,
                                       audio_format_t format,
-                                      uint32_t channels,
+                                      audio_channel_mask_t channelMask,
                                       audio_in_acoustics_t acoustics)
 {
     return 0;