Use audio_channel_mask_t more consistently
In IAudioFlinger::createTrack() and IAudioFlinger::openRecord(),
declare input parameter to use correct type audio_channel_mask_t.
In IAudioFlinger::getInputBufferSize(), input parameter is now channel mask
instead of channel count.
Remove unused IAudioFlinger::channelCount(audio_io_handle_t).
In AudioRecord::getMinFrameCount() and AudioSystem::getInputBufferSize(),
input parameter is channel mask instead of channel count.
Change-Id: Ib2f1c29bea70f016b3cfce83942ba292190ac965
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 0662244..18c9c92 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -110,8 +110,8 @@
static bool routedToA2dpOutput(audio_stream_type_t streamType);
- static status_t getInputBufferSize(uint32_t sampleRate, audio_format_t format, int channelCount,
- size_t* buffSize);
+ static status_t getInputBufferSize(uint32_t sampleRate, audio_format_t format,
+ audio_channel_mask_t channelMask, size_t* buffSize);
static status_t setVoiceVolume(float volume);
@@ -276,7 +276,7 @@
// previous parameters for recording buffer size queries
static uint32_t gPrevInSamplingRate;
static audio_format_t gPrevInFormat;
- static int gPrevInChannelCount;
+ static audio_channel_mask_t gPrevInChannelMask;
static sp<IAudioPolicyService> gAudioPolicyService;