From a075db4ff9b086ac2885df77bb6da0869293df92 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Tue, 6 Mar 2012 11:22:44 -0800 Subject: IAudioFlinger::createTrack and openRecord flags createTrack and openRecord don't need the "old" flags parameter, which was either audio_policy_output_t or audio_in_acoustics_t shifted left by 16 bits. But they do need "new" flags, which are defined by the application use case. Initially, the only application use case flag is timed output, but others are planned. For output, the audio_policy_output_t flags are passed to AudioSystem::getOutput, which returns an audio_io_handle_t, and that handle is then passed to createTrack. So createTrack doesn't need the old flags parameter. For input, the audio_in_acoustics_t flags are passed to AudioSystem::getInput, which returns an audio_io_handle_t, and that handle is then passed to openRecord. So openRecord doesn't need the old flags parameter. Change-Id: I18a9870911846cca69d420c19fe6a9face2fe8c4 --- media/libmedia/IAudioFlinger.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'media/libmedia/IAudioFlinger.cpp') diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index 07b12e4..ce10c8e 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -87,10 +87,9 @@ public: audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + track_flags_t flags, const sp& sharedBuffer, audio_io_handle_t output, - bool isTimed, int *sessionId, status_t *status) { @@ -103,10 +102,9 @@ public: data.writeInt32(format); data.writeInt32(channelMask); data.writeInt32(frameCount); - data.writeInt32(flags); + data.writeInt32((int32_t) flags); data.writeStrongBinder(sharedBuffer->asBinder()); data.writeInt32((int32_t) output); - data.writeInt32(isTimed); int lSessionId = 0; if (sessionId != NULL) { lSessionId = *sessionId; @@ -136,7 +134,7 @@ public: audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + track_flags_t flags, int *sessionId, status_t *status) { @@ -688,15 +686,14 @@ status_t BnAudioFlinger::onTransact( audio_format_t format = (audio_format_t) data.readInt32(); int channelCount = data.readInt32(); size_t bufferCount = data.readInt32(); - uint32_t flags = data.readInt32(); + track_flags_t flags = (track_flags_t) data.readInt32(); sp buffer = interface_cast(data.readStrongBinder()); audio_io_handle_t output = (audio_io_handle_t) data.readInt32(); - bool isTimed = data.readInt32(); int sessionId = data.readInt32(); status_t status; sp track = createTrack(pid, (audio_stream_type_t) streamType, sampleRate, format, - channelCount, bufferCount, flags, buffer, output, isTimed, &sessionId, &status); + channelCount, bufferCount, flags, buffer, output, &sessionId, &status); reply->writeInt32(sessionId); reply->writeInt32(status); reply->writeStrongBinder(track->asBinder()); @@ -710,7 +707,7 @@ status_t BnAudioFlinger::onTransact( audio_format_t format = (audio_format_t) data.readInt32(); int channelCount = data.readInt32(); size_t bufferCount = data.readInt32(); - uint32_t flags = data.readInt32(); + track_flags_t flags = (track_flags_t) data.readInt32(); int sessionId = data.readInt32(); status_t status; sp record = openRecord(pid, input, -- cgit v1.1