summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Don't ask policy manager about invalid stream type"Glenn Kasten2012-03-091-1/+1
|\
| * Don't ask policy manager about invalid stream typeGlenn Kasten2012-03-071-1/+1
| | | | | | | | Change-Id: If50fbff9d34045d1398984da48da7e6428a74491
* | Merge "AudioPolicyService InputDesc minor cleanup"Glenn Kasten2012-03-092-9/+7
|\ \
| * | AudioPolicyService InputDesc minor cleanupGlenn Kasten2012-03-082-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a non-default constructor to set the mSessionId, and make mSessionId const. Remove explicit clear on mEffects - it is automatically cleared by the destructor. AudioPolicyService::setPreProcessorEnabled: - parameter is const * - use an alias instead of making a Vector copy Destructor doesn't need to be virtual since there are no subclasses. Change-Id: Ibc3c3bea8259839430b1cf5356186c7d96f1082f
* | | Merge "audio policy: use audio_devices_t when appropriate"Eric Laurent2012-03-082-3/+5
|\ \ \ | |/ / |/| |
| * | audio policy: use audio_devices_t when appropriateEric Laurent2012-03-082-3/+5
| | | | | | | | | | | | Change-Id: I1b3a5879e81c789fb53d356af3d3a1ee2dca955f
* | | Mixer status cleanupGlenn Kasten2012-03-082-33/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use mPrevMixerStatus for DirectOutputThread also. Remove the MIXER_CONTINUE logic and use MIXER_IDLE instead. Rename the field mixerStatus to mMixerStatus. Rename local variable back to mixerStatus. Change-Id: I0a8145fc856c6c5ff8b784b6176ef3c4d8eb7408
* | | Cleanup DirectOutputThread::mActiveTrackGlenn Kasten2012-03-072-17/+7
| |/ |/| | | | | | | | | | | | | | | Rename activeTrack to mActiveTrack. Release the reference earlier, at the end of threadLoop_mix(). This allows the field to be made private and to move the declaration from PlaybackThread to DirectOutputThread. Change-Id: I02be7a254638f7d85e92aaf0002d20ca0092a5c3
* | Merge "IAudioFlingerClient::ioConfigChanged param2 const"Glenn Kasten2012-03-072-2/+2
|\ \
| * | IAudioFlingerClient::ioConfigChanged param2 constGlenn Kasten2012-03-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 3rd parameter (param2) to AudioFlingerClient::ioConfigChanged is used as an input. So changed it from void * to const void *. It is then cast to const OutputDescriptor * or const audio_stream_type_t * depending on the event. Change-Id: Ieec0d284f139b74b3389b5ef69c7935a8e5650ee
* | | Isolate references to outputTracks/mOutputTracksGlenn Kasten2012-03-072-19/+24
| |/ |/| | | | | | | | | | | | | | | | | | | Move all references to DuplicatingThread::outputTracks and DuplicatingThread::mOutputTracks from the common threadLoop() into virtual methods. This allows them to be moved from PlaybackThread to DuplicatingThread, and to be marked private. Also use vector assignment to copy mOutputTracks to outputTracks. Change-Id: Ieb1cf1ad36b8a65143e61e6c92a65fb43427e5e2
* | Merge "Make applyVolume private to DirectOutputThread"Glenn Kasten2012-03-072-9/+4
|\ \
| * | Make applyVolume private to DirectOutputThreadGlenn Kasten2012-03-072-9/+4
| | | | | | | | | | | | Change-Id: I7ca4a59505857cbd106b6f274c66e9580dead271
* | | Merge "Add comments about sequence for setting parameters"Glenn Kasten2012-03-071-0/+24
|\ \ \ | |/ / |/| |
| * | Add comments about sequence for setting parametersGlenn Kasten2012-03-061-0/+24
| | | | | | | | | | | | Change-Id: Iffa59a34c3c47bdc1d3234cdcb4d8ff99c102825
* | | Merge the calls to prepareTracks_lGlenn Kasten2012-03-072-29/+14
| |/ |/| | | | | Change-Id: I1dd759581333e2908d980180d44db7bf5ed6591d
* | Merge "Rename fields of AudioSessionRef"Glenn Kasten2012-03-062-20/+19
|\ \ | |/ |/|
| * Rename fields of AudioSessionRefGlenn Kasten2012-03-062-20/+19
| | | | | | | | Change-Id: I9f2a66094135c4ac6bec2d3e9db3ac5fbf988ede
* | Merge "Fix indentation for re-organized code"Glenn Kasten2012-03-061-236/+236
|\ \
| * | Fix indentation for re-organized codeGlenn Kasten2012-03-061-236/+236
| |/ | | | | | | Change-Id: I63471cebdbd095b7ad4e481611b785f9b02c7941
* | Rename updateWaitTime since a lock is heldGlenn Kasten2012-03-062-8/+9
|/ | | | Change-Id: I9bb978cbd0debf5b21676467060f72eebafea3e6
* threadLoop mergeGlenn Kasten2012-03-052-392/+329
| | | | Change-Id: Id8e6330ac6be76f9c2debba94f856de87e2d98f7
* renamed audio policy output flag.Eric Laurent2012-03-011-1/+1
| | | | | | | Renamed AUDIO_POLICY_OUTPUT_FLAG_INDIRECT to AUDIO_POLICY_OUTPUT_FLAG_NONE which is more appropriate. Change-Id: Ia14d60397df0f2dcd9bea0186400a09da35bc104
* Merge "Shorten thread names"Glenn Kasten2012-02-293-5/+5
|\
| * Shorten thread namesGlenn Kasten2012-02-283-5/+5
| | | | | | | | | | | | | | | | prctl(PR_SET_NAME) limits to 15 characters. Before we had names like "Binder Thread #" and the counter was cut off :-( Also remove redundant "thread" at end of name; it's always a thread. Change-Id: I1f99c2730ba0787ed9b59c15914356cddf698e2f
* | Prepare for threadLoop merge - active tracksGlenn Kasten2012-02-292-17/+19
| | | | | | | | | | | | | | | | | | | | Continued work on making the copies of threadLoop more similar: - Remove alias for mActiveTracks in MixerThread and DuplicatingThread. - Pull in declaration of activeTrack in DirectOutputThread. - Remove redundant parameter of prepareTracks_l(). - Comment prepareTracks_l(). Change-Id: If1087c1902b454acec01ddfdd9f055f0ca7abf04
* | Merge "Update AudioFlinger comments"Glenn Kasten2012-02-291-4/+7
|\ \
| * | Update AudioFlinger commentsGlenn Kasten2012-02-291-4/+7
| |/ | | | | | | | | | | | | | | Add comments to enum mixer_state Note side-effect of lockEffectChains_l Fix a typo Change-Id: Ibd51678bac2193201cbcbe081ff5664046fbc494
* | Merge "Pull in declaration of effectChains to inner block"Glenn Kasten2012-02-291-2/+13
|\ \
| * | Pull in declaration of effectChains to inner blockGlenn Kasten2012-02-291-2/+13
| | | | | | | | | | | | Change-Id: I09eacf72124942abd604132b9f4e774b1236fcf3
* | | mSuspend comments and usageGlenn Kasten2012-02-292-11/+11
|/ / | | | | | | | | | | Emphasize that playbackthread::mSuspend is a counter, not a bool Change-Id: I7188e56814e1c54dbc65e560f3627f138257d644
* | Mark similar and different sections in threadLoopGlenn Kasten2012-02-291-9/+78
|/ | | | | | | | | Most of these comments will be removed after the threadLoop merge. Note: the trivial change in assignments to mixBufferSize, and the comments about "tracks to remove" is to make them all identical. Change-Id: I3b1a33a7f2cd12ad557a1986bb71f6171161974a
* Merge "Unlock effect chains in the middle of two if's"Glenn Kasten2012-02-281-13/+25
|\
| * Unlock effect chains in the middle of two if'sGlenn Kasten2012-02-241-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the upcoming threadLoop() merge, this CL makes it clearer what are the similar and different parts before and after unlocking effect chains. In each threadLoop(), the old code was: if (sleepTime == 0) { // A unlockEffectChains(effectChains); // B } else { unlockEffectChains(effectChains); // C } The new code is: if (sleepTime == 0) { // A } unlockEffectChains(effectChains); if (sleepTime == 0) { // B } else { // C } Also this is slightly slower by one "if", it has the advantage of making it much more obvious about what is done before and after the unlock, and also to see the similarities and differences among the various copies of threadLoop(). Change-Id: I7bf4369d2dcb072573ec43b7e52c637f0097dc00
* | Merge "Simplify removeNotificationClient"Glenn Kasten2012-02-281-6/+1
|\ \
| * | Simplify removeNotificationClientGlenn Kasten2012-02-241-6/+1
| | | | | | | | | | | | | | | | | | | | | No need to check for presence of item before removing (but we do lose the log of the previous value). Change-Id: I2838430824de5f257f2ee15db0c22b1920c67d08
* | | Merge "AudioFlinger const methods and parameters"Glenn Kasten2012-02-282-10/+11
|\ \ \
| * | | AudioFlinger const methods and parametersGlenn Kasten2012-02-242-10/+11
| |/ / | | | | | | | | | Change-Id: I93ec28024005ed23aa141518092a012a4a7c44c5
* | | Merge "Fix theoretical race condition in addOutputTrack"Glenn Kasten2012-02-281-0/+1
|\ \ \
| * | | Fix theoretical race condition in addOutputTrackGlenn Kasten2012-02-241-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not a real race, because addOutputTrack was only called in two places, and in both places there could be no other threads referencing the DuplicatingThread instance. Those two places are: - the DuplicatingThread constructor, which is of course safe - openDuplicateOutput - this is safe because it's called immediately after the new DuplicatingThread, and there are no sp<> either in the constructor or here which could cause onFirstRef() to do Thread::run(). But for safety in case addOutputTrack is ever called somewhere else, or there are sp<> created earlier, it is safer to take the thread lock. Change-Id: I1502d014fa37ec5dbf4bf40d3e2884af311cd5e9
* | | Merge "AudioBufferProvider comments and cleanup"Glenn Kasten2012-02-286-53/+31
|\ \ \
| * | | AudioBufferProvider comments and cleanupGlenn Kasten2012-02-246-53/+31
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add comments about which methods implement the AudioBufferProvider interface. Simplified the definition of kInvalidPts. <stdint.h> is very hard to work with, there seems to be no way to use it reliably to get INT64_MAX without having a separate source file, which is ugly because it means kInvalidPts is not a compile-time constant. So I just deleted AudioBufferProvider.cpp and used a hard-coded constant instead. Added a default constructor for Buffer so that the fields aren't random (especially .raw which is used to determine if the buffer is valid). Make the pts for getNextBuffer default to kInvalidPTS so code that doesn't need a pts doesn't have to specify a value. Rename the parameter to AudioMixer::setBufferProvider to make it clearer. Change-Id: I87e7290884d4ed975b019f62d1ab6ae2bc5065a5
* | | Merge "Fix tracking of hardware state for dump"Glenn Kasten2012-02-272-29/+37
|\ \ \
| * | | Fix tracking of hardware state for dumpGlenn Kasten2012-02-242-29/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At end of AudioFlinger::onFirstRef(), the hardware status was being left in wrong state. It should be AUDIO_HW_IDLE but was AUDIO_HW_INIT. mHardwareStatus was being set to AUDIO_HW_OUTPUT_OPEN too early, and so a return would leave it in the wrong state until next hardware operation. Take the hardware lock for dev->get_parameters, and update mHardwareStatus before and after. Keep hardware lock only for the duration of the dev->set_parameters. Rename two constants in enum hardware_call_state to have the prefix AUDIO_HW so they follow the naming conventions. Add comments. Change-Id: I6c7450b11f9b13adaeef9cec874333e478a58fc0
* | | fix libgui header locationMathias Agopian2012-02-273-3/+1
| | | | | | | | | | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* | | Merge "Make threadLoop() logs identical"Glenn Kasten2012-02-271-9/+11
|\ \ \
| * | | Make threadLoop() logs identicalGlenn Kasten2012-02-241-9/+11
| | |/ | |/| | | | | | | | | | | | | | | | Change the wording of the logs in the various copies of threadLoop() to be identical. This will make it easier to merge them soon. Change-Id: Idfa181e437738712c784dc7f746cac79f83d2931
* | | Merge "Move declaration of mixerStatus to inner block"Glenn Kasten2012-02-271-7/+3
|\ \ \
| * | | Move declaration of mixerStatus to inner blockGlenn Kasten2012-02-241-7/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | mixerStatus was being declared (and initialized) too early, which also resulted in a duplicate initialization. Moved the declaration into the block where it is actually used. Change-Id: Ifdcfefe362a5efe3493dd616cdb44645c6f9aed5
* | | Merge "remove dependency on android_native{s_priv|buffer}.h"Mathias Agopian2012-02-241-1/+0
|\ \ \ | |_|/ |/| |