Merge "IAudioFlingerClient::ioConfigChanged param2 const"
This commit is contained in:
@@ -218,8 +218,8 @@ private:
|
||||
// IAudioFlingerClient
|
||||
|
||||
// indicate a change in the configuration of an output or input: keeps the cached
|
||||
// values for output/input parameters upto date in client process
|
||||
virtual void ioConfigChanged(int event, audio_io_handle_t ioHandle, void *param2);
|
||||
// values for output/input parameters up-to-date in client process
|
||||
virtual void ioConfigChanged(int event, audio_io_handle_t ioHandle, const void *param2);
|
||||
};
|
||||
|
||||
class AudioPolicyServiceClient: public IBinder::DeathRecipient
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
DECLARE_META_INTERFACE(AudioFlingerClient);
|
||||
|
||||
// Notifies a change of audio input/output configuration.
|
||||
virtual void ioConfigChanged(int event, audio_io_handle_t ioHandle, void *param2) = 0;
|
||||
virtual void ioConfigChanged(int event, audio_io_handle_t ioHandle, const void *param2) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -405,9 +405,9 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) {
|
||||
}
|
||||
|
||||
void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle_t ioHandle,
|
||||
void *param2) {
|
||||
const void *param2) {
|
||||
ALOGV("ioConfigChanged() event %d", event);
|
||||
OutputDescriptor *desc;
|
||||
const OutputDescriptor *desc;
|
||||
audio_stream_type_t stream;
|
||||
|
||||
if (ioHandle == 0) return;
|
||||
@@ -417,7 +417,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle
|
||||
switch (event) {
|
||||
case STREAM_CONFIG_CHANGED:
|
||||
if (param2 == NULL) break;
|
||||
stream = *(audio_stream_type_t *)param2;
|
||||
stream = *(const audio_stream_type_t *)param2;
|
||||
ALOGV("ioConfigChanged() STREAM_CONFIG_CHANGED stream %d, output %d", stream, ioHandle);
|
||||
if (gStreamOutputMap.indexOfKey(stream) >= 0) {
|
||||
gStreamOutputMap.replaceValueFor(stream, ioHandle);
|
||||
@@ -429,7 +429,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle
|
||||
break;
|
||||
}
|
||||
if (param2 == NULL) break;
|
||||
desc = (OutputDescriptor *)param2;
|
||||
desc = (const OutputDescriptor *)param2;
|
||||
|
||||
OutputDescriptor *outputDesc = new OutputDescriptor(*desc);
|
||||
gOutputs.add(ioHandle, outputDesc);
|
||||
@@ -458,7 +458,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle
|
||||
break;
|
||||
}
|
||||
if (param2 == NULL) break;
|
||||
desc = (OutputDescriptor *)param2;
|
||||
desc = (const OutputDescriptor *)param2;
|
||||
|
||||
ALOGV("ioConfigChanged() new config for output %d samplingRate %d, format %d channels %d frameCount %d latency %d",
|
||||
ioHandle, desc->samplingRate, desc->format,
|
||||
|
||||
@@ -39,18 +39,18 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void ioConfigChanged(int event, audio_io_handle_t ioHandle, void *param2)
|
||||
void ioConfigChanged(int event, audio_io_handle_t ioHandle, const void *param2)
|
||||
{
|
||||
Parcel data, reply;
|
||||
data.writeInterfaceToken(IAudioFlingerClient::getInterfaceDescriptor());
|
||||
data.writeInt32(event);
|
||||
data.writeInt32((int32_t) ioHandle);
|
||||
if (event == AudioSystem::STREAM_CONFIG_CHANGED) {
|
||||
uint32_t stream = *(uint32_t *)param2;
|
||||
uint32_t stream = *(const uint32_t *)param2;
|
||||
ALOGV("ioConfigChanged stream %d", stream);
|
||||
data.writeInt32(stream);
|
||||
} else if (event != AudioSystem::OUTPUT_CLOSED && event != AudioSystem::INPUT_CLOSED) {
|
||||
AudioSystem::OutputDescriptor *desc = (AudioSystem::OutputDescriptor *)param2;
|
||||
const AudioSystem::OutputDescriptor *desc = (const AudioSystem::OutputDescriptor *)param2;
|
||||
data.writeInt32(desc->samplingRate);
|
||||
data.writeInt32(desc->format);
|
||||
data.writeInt32(desc->channels);
|
||||
@@ -73,7 +73,7 @@ status_t BnAudioFlingerClient::onTransact(
|
||||
CHECK_INTERFACE(IAudioFlingerClient, data, reply);
|
||||
int event = data.readInt32();
|
||||
audio_io_handle_t ioHandle = (audio_io_handle_t) data.readInt32();
|
||||
void *param2 = NULL;
|
||||
const void *param2 = NULL;
|
||||
AudioSystem::OutputDescriptor desc;
|
||||
uint32_t stream;
|
||||
if (event == AudioSystem::STREAM_CONFIG_CHANGED) {
|
||||
|
||||
@@ -1053,7 +1053,7 @@ void AudioFlinger::removeNotificationClient(pid_t pid)
|
||||
}
|
||||
|
||||
// audioConfigChanged_l() must be called with AudioFlinger::mLock held
|
||||
void AudioFlinger::audioConfigChanged_l(int event, audio_io_handle_t ioHandle, void *param2)
|
||||
void AudioFlinger::audioConfigChanged_l(int event, audio_io_handle_t ioHandle, const void *param2)
|
||||
{
|
||||
size_t size = mNotificationClients.size();
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
|
||||
@@ -1090,7 +1090,7 @@ private:
|
||||
// no range check, doesn't check per-thread stream volume, AudioFlinger::mLock held
|
||||
float streamVolume_l(audio_stream_type_t stream) const
|
||||
{ return mStreamTypes[stream].volume; }
|
||||
void audioConfigChanged_l(int event, audio_io_handle_t ioHandle, void *param2);
|
||||
void audioConfigChanged_l(int event, audio_io_handle_t ioHandle, const void *param2);
|
||||
|
||||
// allocate an audio_io_handle_t, session ID, or effect ID
|
||||
uint32_t nextUniqueId();
|
||||
|
||||
Reference in New Issue
Block a user