summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-07-16 17:19:58 -0700
committerGlenn Kasten <gkasten@google.com>2013-07-24 17:49:04 -0700
commitfad226abd12435dbcd232f7de396f1a097b2bd5f (patch)
tree4e5214f8f5b142239a9583e79032b70330fa7c8e
parent39a60318dcd78b2cb406d2c7dba57cbe9c99c3e7 (diff)
downloadframeworks_av-fad226abd12435dbcd232f7de396f1a097b2bd5f.zip
frameworks_av-fad226abd12435dbcd232f7de396f1a097b2bd5f.tar.gz
frameworks_av-fad226abd12435dbcd232f7de396f1a097b2bd5f.tar.bz2
Use standard name and type for channel mask
Former name 'channels' was ambiguous with respect to channel count. Change-Id: I716f792d95a7e0c787d27514ad6e93dbcef8a415
-rw-r--r--include/media/AudioSystem.h4
-rw-r--r--media/libmedia/AudioSystem.cpp8
-rw-r--r--media/libmedia/IAudioFlingerClient.cpp4
-rw-r--r--services/audioflinger/Threads.cpp6
4 files changed, 11 insertions, 11 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index e7b85c0..f9e625e 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -155,11 +155,11 @@ public:
class OutputDescriptor {
public:
OutputDescriptor()
- : samplingRate(0), format(AUDIO_FORMAT_DEFAULT), channels(0), frameCount(0), latency(0) {}
+ : samplingRate(0), format(AUDIO_FORMAT_DEFAULT), channelMask(0), frameCount(0), latency(0) {}
uint32_t samplingRate;
int32_t format;
- int32_t channels;
+ audio_channel_mask_t channelMask;
size_t frameCount;
uint32_t latency;
};
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 0d59af0..a571fe4 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -447,9 +447,9 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle
OutputDescriptor *outputDesc = new OutputDescriptor(*desc);
gOutputs.add(ioHandle, outputDesc);
- ALOGV("ioConfigChanged() new output samplingRate %u, format %d channels %#x frameCount %u "
+ ALOGV("ioConfigChanged() new output samplingRate %u, format %d channel mask %#x frameCount %u "
"latency %d",
- outputDesc->samplingRate, outputDesc->format, outputDesc->channels,
+ outputDesc->samplingRate, outputDesc->format, outputDesc->channelMask,
outputDesc->frameCount, outputDesc->latency);
} break;
case OUTPUT_CLOSED: {
@@ -471,10 +471,10 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle
if (param2 == NULL) break;
desc = (const OutputDescriptor *)param2;
- ALOGV("ioConfigChanged() new config for output %d samplingRate %u, format %d channels %#x "
+ ALOGV("ioConfigChanged() new config for output %d samplingRate %u, format %d channel mask %#x "
"frameCount %d latency %d",
ioHandle, desc->samplingRate, desc->format,
- desc->channels, desc->frameCount, desc->latency);
+ desc->channelMask, desc->frameCount, desc->latency);
OutputDescriptor *outputDesc = gOutputs.valueAt(index);
delete outputDesc;
outputDesc = new OutputDescriptor(*desc);
diff --git a/media/libmedia/IAudioFlingerClient.cpp b/media/libmedia/IAudioFlingerClient.cpp
index 2d1e0f8..84a589a 100644
--- a/media/libmedia/IAudioFlingerClient.cpp
+++ b/media/libmedia/IAudioFlingerClient.cpp
@@ -54,7 +54,7 @@ public:
(const AudioSystem::OutputDescriptor *)param2;
data.writeInt32(desc->samplingRate);
data.writeInt32(desc->format);
- data.writeInt32(desc->channels);
+ data.writeInt32(desc->channelMask);
data.writeInt32(desc->frameCount);
data.writeInt32(desc->latency);
}
@@ -84,7 +84,7 @@ status_t BnAudioFlingerClient::onTransact(
} else if (event != AudioSystem::OUTPUT_CLOSED && event != AudioSystem::INPUT_CLOSED) {
desc.samplingRate = data.readInt32();
desc.format = data.readInt32();
- desc.channels = data.readInt32();
+ desc.channelMask = (audio_channel_mask_t) data.readInt32();
desc.frameCount = data.readInt32();
desc.latency = data.readInt32();
param2 = &desc;
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index f27d908..b6c8531 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -1410,7 +1410,7 @@ void AudioFlinger::PlaybackThread::audioConfigChanged_l(int event, int param) {
switch (event) {
case AudioSystem::OUTPUT_OPENED:
case AudioSystem::OUTPUT_CONFIG_CHANGED:
- desc.channels = mChannelMask;
+ desc.channelMask = mChannelMask;
desc.samplingRate = mSampleRate;
desc.format = mFormat;
desc.frameCount = mNormalFrameCount; // FIXME see
@@ -2974,7 +2974,7 @@ bool AudioFlinger::MixerThread::checkForNewParameters_l()
}
}
if (param.getInt(String8(AudioParameter::keyChannels), value) == NO_ERROR) {
- if (value != AUDIO_CHANNEL_OUT_STEREO) {
+ if ((audio_channel_mask_t) value != AUDIO_CHANNEL_OUT_STEREO) {
status = BAD_VALUE;
} else {
reconfig = true;
@@ -4338,7 +4338,7 @@ void AudioFlinger::RecordThread::audioConfigChanged_l(int event, int param) {
switch (event) {
case AudioSystem::INPUT_OPENED:
case AudioSystem::INPUT_CONFIG_CHANGED:
- desc.channels = mChannelMask;
+ desc.channelMask = mChannelMask;
desc.samplingRate = mSampleRate;
desc.format = mFormat;
desc.frameCount = mFrameCount;