summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-10-07 09:27:06 -0700
committerGlenn Kasten <gkasten@google.com>2013-10-07 09:31:15 -0700
commit35295078ab59c8c5d143a54d5a55557c3ca62c51 (patch)
treeebe936c19f0de4024fa1982fcd286a803bc3b951 /services
parent61f58c0c8d02970ea6d94ff816c54bf606f755b7 (diff)
parent9a7d11f07dc19327892915f0bfecce758d2f4098 (diff)
downloadframeworks_av-35295078ab59c8c5d143a54d5a55557c3ca62c51.zip
frameworks_av-35295078ab59c8c5d143a54d5a55557c3ca62c51.tar.gz
frameworks_av-35295078ab59c8c5d143a54d5a55557c3ca62c51.tar.bz2
resolved conflicts for merge of 9a7d11f0 to master
Change-Id: Ie4d101185a93d37ec280f608813ad62a077a584e
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp4
-rw-r--r--services/audioflinger/Threads.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 04f0564..8fedc7f 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1247,6 +1247,7 @@ sp<IAudioRecord> AudioFlinger::openRecord(
// check calling permissions
if (!recordingAllowed()) {
+ ALOGE("openRecord() permission denied: recording not allowed");
lStatus = PERMISSION_DENIED;
goto Exit;
}
@@ -1262,12 +1263,14 @@ sp<IAudioRecord> AudioFlinger::openRecord(
Mutex::Autolock _l(mLock);
thread = checkRecordThread_l(input);
if (thread == NULL) {
+ ALOGE("openRecord() checkRecordThread_l failed");
lStatus = BAD_VALUE;
goto Exit;
}
if (deviceRequiresCaptureAudioOutputPermission(thread->inDevice())
&& !captureAudioOutputAllowed()) {
+ ALOGE("openRecord() permission denied: capture not allowed");
lStatus = PERMISSION_DENIED;
goto Exit;
}
@@ -1288,6 +1291,7 @@ sp<IAudioRecord> AudioFlinger::openRecord(
// The record track uses one track in mHardwareMixerThread by convention.
recordTrack = thread->createRecordTrack_l(client, sampleRate, format, channelMask,
frameCount, lSessionId, flags, tid, &lStatus);
+ LOG_ALWAYS_FATAL_IF((recordTrack != 0) != (lStatus == NO_ERROR));
}
if (lStatus != NO_ERROR) {
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index aaa9608..5e41dd2 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4607,7 +4607,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
lStatus = initCheck();
if (lStatus != NO_ERROR) {
- ALOGE("Audio driver not initialized.");
+ ALOGE("createRecordTrack_l() audio driver not initialized");
goto Exit;
}
// client expresses a preference for FAST, but we get the final say
@@ -4671,6 +4671,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
lStatus = track->initCheck();
if (lStatus != NO_ERROR) {
+ ALOGE("createRecordTrack_l() initCheck failed %d; no control block?", lStatus);
track.clear();
goto Exit;
}