Loading include/media/IAudioFlinger.h +1 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public: track_flags_t *flags, pid_t tid, // -1 means unused, otherwise must be valid non-0 int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, // return value 0 means it follows cblk status_t *status) = 0; Loading media/libmedia/AudioRecord.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -495,6 +495,10 @@ status_t AudioRecord::openRecord_l(size_t epoch) size_t temp = frameCount; // temp may be replaced by a revised value of frameCount, // but we will still need the original value also int originalSessionId = mSessionId; // The notification frame count is the period between callbacks, as suggested by the server. size_t notificationFrames; sp<IMemory> iMem; // for cblk sp<IMemory> bufferMem; sp<IAudioRecord> record = audioFlinger->openRecord(input, Loading @@ -504,6 +508,7 @@ status_t AudioRecord::openRecord_l(size_t epoch) &trackFlags, tid, &mSessionId, ¬ificationFrames, iMem, bufferMem, &status); Loading media/libmedia/IAudioFlinger.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ public: track_flags_t *flags, pid_t tid, int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, status_t *status) Loading Loading @@ -214,6 +215,10 @@ public: if (sessionId != NULL) { *sessionId = lSessionId; } size_t lNotificationFrames = (size_t) reply.readInt64(); if (notificationFrames != NULL) { *notificationFrames = lNotificationFrames; } lStatus = reply.readInt32(); record = interface_cast<IAudioRecord>(reply.readStrongBinder()); cblk = interface_cast<IMemory>(reply.readStrongBinder()); Loading Loading @@ -959,16 +964,19 @@ status_t BnAudioFlinger::onTransact( track_flags_t flags = (track_flags_t) data.readInt32(); pid_t tid = (pid_t) data.readInt32(); int sessionId = data.readInt32(); size_t notificationFrames = 0; sp<IMemory> cblk; sp<IMemory> buffers; status_t status; sp<IAudioRecord> record = openRecord(input, sampleRate, format, channelMask, &frameCount, &flags, tid, &sessionId, ¬ificationFrames, cblk, buffers, &status); LOG_ALWAYS_FATAL_IF((record != 0) != (status == NO_ERROR)); reply->writeInt64(frameCount); reply->writeInt32(flags); reply->writeInt32(sessionId); reply->writeInt64(notificationFrames); reply->writeInt32(status); reply->writeStrongBinder(record->asBinder()); reply->writeStrongBinder(cblk->asBinder()); Loading services/audioflinger/AudioFlinger.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1333,6 +1333,7 @@ sp<IAudioRecord> AudioFlinger::openRecord( IAudioFlinger::track_flags_t *flags, pid_t tid, int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, status_t *status) Loading Loading @@ -1407,7 +1408,7 @@ sp<IAudioRecord> AudioFlinger::openRecord( // TODO: the uid should be passed in as a parameter to openRecord recordTrack = thread->createRecordTrack_l(client, sampleRate, format, channelMask, frameCount, lSessionId, frameCount, lSessionId, notificationFrames, IPCThreadState::self()->getCallingUid(), flags, tid, &lStatus); LOG_ALWAYS_FATAL_IF((lStatus == NO_ERROR) && (recordTrack == 0)); Loading services/audioflinger/AudioFlinger.h +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ public: IAudioFlinger::track_flags_t *flags, pid_t tid, int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, status_t *status /*non-NULL*/); Loading Loading
include/media/IAudioFlinger.h +1 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public: track_flags_t *flags, pid_t tid, // -1 means unused, otherwise must be valid non-0 int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, // return value 0 means it follows cblk status_t *status) = 0; Loading
media/libmedia/AudioRecord.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -495,6 +495,10 @@ status_t AudioRecord::openRecord_l(size_t epoch) size_t temp = frameCount; // temp may be replaced by a revised value of frameCount, // but we will still need the original value also int originalSessionId = mSessionId; // The notification frame count is the period between callbacks, as suggested by the server. size_t notificationFrames; sp<IMemory> iMem; // for cblk sp<IMemory> bufferMem; sp<IAudioRecord> record = audioFlinger->openRecord(input, Loading @@ -504,6 +508,7 @@ status_t AudioRecord::openRecord_l(size_t epoch) &trackFlags, tid, &mSessionId, ¬ificationFrames, iMem, bufferMem, &status); Loading
media/libmedia/IAudioFlinger.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ public: track_flags_t *flags, pid_t tid, int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, status_t *status) Loading Loading @@ -214,6 +215,10 @@ public: if (sessionId != NULL) { *sessionId = lSessionId; } size_t lNotificationFrames = (size_t) reply.readInt64(); if (notificationFrames != NULL) { *notificationFrames = lNotificationFrames; } lStatus = reply.readInt32(); record = interface_cast<IAudioRecord>(reply.readStrongBinder()); cblk = interface_cast<IMemory>(reply.readStrongBinder()); Loading Loading @@ -959,16 +964,19 @@ status_t BnAudioFlinger::onTransact( track_flags_t flags = (track_flags_t) data.readInt32(); pid_t tid = (pid_t) data.readInt32(); int sessionId = data.readInt32(); size_t notificationFrames = 0; sp<IMemory> cblk; sp<IMemory> buffers; status_t status; sp<IAudioRecord> record = openRecord(input, sampleRate, format, channelMask, &frameCount, &flags, tid, &sessionId, ¬ificationFrames, cblk, buffers, &status); LOG_ALWAYS_FATAL_IF((record != 0) != (status == NO_ERROR)); reply->writeInt64(frameCount); reply->writeInt32(flags); reply->writeInt32(sessionId); reply->writeInt64(notificationFrames); reply->writeInt32(status); reply->writeStrongBinder(record->asBinder()); reply->writeStrongBinder(cblk->asBinder()); Loading
services/audioflinger/AudioFlinger.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1333,6 +1333,7 @@ sp<IAudioRecord> AudioFlinger::openRecord( IAudioFlinger::track_flags_t *flags, pid_t tid, int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, status_t *status) Loading Loading @@ -1407,7 +1408,7 @@ sp<IAudioRecord> AudioFlinger::openRecord( // TODO: the uid should be passed in as a parameter to openRecord recordTrack = thread->createRecordTrack_l(client, sampleRate, format, channelMask, frameCount, lSessionId, frameCount, lSessionId, notificationFrames, IPCThreadState::self()->getCallingUid(), flags, tid, &lStatus); LOG_ALWAYS_FATAL_IF((lStatus == NO_ERROR) && (recordTrack == 0)); Loading
services/audioflinger/AudioFlinger.h +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ public: IAudioFlinger::track_flags_t *flags, pid_t tid, int *sessionId, size_t *notificationFrames, sp<IMemory>& cblk, sp<IMemory>& buffers, status_t *status /*non-NULL*/); Loading