Merge "audio effects: add auxiliary channel feature"
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index ed97728..80eb1a7 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -215,9 +215,9 @@
/**
* return the frame size (number of bytes per sample).
*/
-static inline uint32_t audio_stream_frame_size(struct audio_stream *s)
+static inline size_t audio_stream_frame_size(struct audio_stream *s)
{
- int chan_samp_sz;
+ size_t chan_samp_sz;
switch (s->get_format(s)) {
case AUDIO_FORMAT_PCM_16_BIT:
@@ -272,12 +272,11 @@
int (*set_master_volume)(struct audio_hw_device *dev, float volume);
/**
- * setMode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
+ * set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
* is for standard audio playback, AUDIO_MODE_RINGTONE when a ringtone is
* playing, and AUDIO_MODE_IN_CALL when a call is in progress.
- * Actual type of mode is enum audio_mode_t defined in <system/audio.h>.
*/
- int (*set_mode)(struct audio_hw_device *dev, int mode);
+ int (*set_mode)(struct audio_hw_device *dev, audio_mode_t mode);
/* mic mute */
int (*set_mic_mute)(struct audio_hw_device *dev, bool state);
diff --git a/include/hardware/audio_policy.h b/include/hardware/audio_policy.h
index fc56e5e..51e0fda 100644
--- a/include/hardware/audio_policy.h
+++ b/include/hardware/audio_policy.h
@@ -99,7 +99,7 @@
/* indicate a change in phone state. Valid phones states are defined
* by audio_mode_t */
- void (*set_phone_state)(struct audio_policy *pol, int state);
+ void (*set_phone_state)(struct audio_policy *pol, audio_mode_t state);
/* indicate a change in ringer mode */
void (*set_ringer_mode)(struct audio_policy *pol, uint32_t mode,
@@ -215,7 +215,7 @@
int (*set_effect_enabled)(struct audio_policy *pol, int id, bool enabled);
bool (*is_stream_active)(const struct audio_policy *pol,
- int stream,
+ audio_stream_type_t stream,
uint32_t in_past_ms);
/* dump state */
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index a482604..6465df9 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -278,7 +278,7 @@
return -ENOSYS;
}
-static int adev_set_mode(struct audio_hw_device *dev, int mode)
+static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode)
{
return 0;
}
diff --git a/modules/audio/audio_policy.c b/modules/audio/audio_policy.c
index 409f0a1..c805601 100644
--- a/modules/audio/audio_policy.c
+++ b/modules/audio/audio_policy.c
@@ -58,7 +58,7 @@
return AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE;
}
-static void ap_set_phone_state(struct audio_policy *pol, int state)
+static void ap_set_phone_state(struct audio_policy *pol, audio_mode_t state)
{
}
@@ -201,7 +201,7 @@
return -ENOSYS;
}
-static bool ap_is_stream_active(const struct audio_policy *pol, int stream,
+static bool ap_is_stream_active(const struct audio_policy *pol, audio_stream_type_t stream,
uint32_t in_past_ms)
{
return false;