summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
Commit message (Collapse)AuthorAgeFilesLines
* Deleted the media, camera, drm related files since they are relocatedJames Dong2012-03-2816-14657/+0
| | | | Change-Id: I9bc5573ee07e30b305b5b879023aa9ec69e10b91
* Merge "IAudioFlinger::createTrack and openRecord flags"Glenn Kasten2012-03-262-8/+5
|\
| * IAudioFlinger::createTrack and openRecord flagsGlenn Kasten2012-03-192-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Revert "AudioFlinger does not need libmedia any more"Glenn Kasten2012-03-231-0/+1
| | | | | | This reverts commit c920dee060ac69684be33210ee44b99a5fc3e8b2
* | AudioFlinger does not need libmedia any moreGlenn Kasten2012-03-221-1/+0
| | | | | | | | Change-Id: Ifd2c61882109ec36ca68072a2bf6506e08c8cf34
* | Merge "Clean up Track constructor"Glenn Kasten2012-03-212-12/+16
|\ \
| * | Clean up Track constructorGlenn Kasten2012-03-202-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'thread' parameter can never be NULL. Use constructor initialization list when possible. Make more members const. Only put the relevant code under "if (mCblk != NULL)". Add comment about track name leak. Change-Id: Ib963390a69bed1999638cc982a759edd1d5f4712
* | | Merge "AudioMixer can be configured for fewer max tracks"Glenn Kasten2012-03-212-4/+14
|\ \ \
| * | | AudioMixer can be configured for fewer max tracksGlenn Kasten2012-03-202-4/+14
| |/ / | | | | | | | | | Change-Id: I371b17cef071d083eecf35cd3627a3adff907a33
| * | Add libmedia_nativeGlenn Kasten2012-03-161-0/+1
| |/ | | | | | | Change-Id: Ib8cff8abd73723b793f08da99ad59549f219e0e7
* | Merge "Update comments"Glenn Kasten2012-03-214-3/+14
|\ \
| * | Update commentsGlenn Kasten2012-03-194-3/+14
| |/ | | | | | | Change-Id: I327663a020670d0a72ff57bd0b682e2ce0528650
* | Merge "Whitespace"Glenn Kasten2012-03-212-17/+18
|\ \
| * | WhitespaceGlenn Kasten2012-03-192-17/+18
| |/ | | | | | | | | | | Fix indentation, and add blank lines in key places for clarity Change-Id: I57a0a8142394f83203161aa9b8aa9276abf3ed7c
* | Merge "new doesn't fail on Android"Glenn Kasten2012-03-211-8/+1
|\ \
| * | new doesn't fail on AndroidGlenn Kasten2012-03-191-8/+1
| |/ | | | | | | Change-Id: I5079a3bf31097dd0807b2d806d5f8d3cff2077ab
* | am a48285c4: am 165ee4c5: am 14958e21: Merge "audioflinger: fix issue with ↵Eric Laurent2012-03-201-1/+2
|\ \ | | | | | | | | | | | | | | | | | | camcorder and A2DP" into ics-mr1 * commit 'a48285c4f22ffc43f1771ebd1ff35dcec48db2c7': audioflinger: fix issue with camcorder and A2DP
| * \ am 14958e21: Merge "audioflinger: fix issue with camcorder and A2DP" into ↵Eric Laurent2012-03-191-1/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | ics-mr1 * commit '14958e21c12f922d7501d32c3bec05109eb342d5': audioflinger: fix issue with camcorder and A2DP
| | * | audioflinger: fix issue with camcorder and A2DPEric Laurent2012-03-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some audio HALs do not support well a device selection of 0 (no device) received on an input stream. This can happen because of a problem in the audioflinger code that handles the forwarding of the output device selection to the record thread for use by the pre processing modules that need it. If the output device is 0 (meaning no op, which happens when stopping playback over A2DP) audioflinger could not detect it was an output device selection and would forward it to the input stream (see AudioFlinger::setParameters() and RecordThread::checkForNewParameters_l(). Issue 6179641. Change-Id: Idae534521866538e0d12ba259a2834f402a922e2
* | | | Add libmedia_nativeGlenn Kasten2012-03-191-0/+2
| |_|/ |/| | | | | | | | Change-Id: I3ac357c78fb89f108d15c6e5b9fa317de0e9fb9a
* | | Remove dependency on audio_* locationGlenn Kasten2012-03-141-2/+2
| | | | | | | | | | | | Change-Id: I4bc66115fcb9ba22b057bd72db3f561dcb18a0d8
* | | Merge "AudioFlinger playback thread CPU measurement in Hz"Glenn Kasten2012-03-141-22/+82
|\ \ \
| * | | AudioFlinger playback thread CPU measurement in HzGlenn Kasten2012-03-141-22/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log statistics on CPU usage in Hz in addition to wall clock time Use CPU statistics for all playback threads, not just MIXER (but they are disabled by default by a compile-time debug macro). ThreadCpuUsage library: - Move statistics out of the library and leave that up to the caller - Add API to determine a CPU's frequency Change-Id: Ia1011123146e641fcf210ef26e78ae2b4d3b64ad
* | | | Merge "audioflinger: more info in dumpsys"Eric Laurent2012-03-141-0/+4
|\ \ \ \
| * | | | audioflinger: more info in dumpsysEric Laurent2012-03-141-0/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | Added TID and io handle to AudioFlinger threads dump. Change-Id: Ib1a856f3bad55c73e4c395b5e59d57435f4b9a4c
* | | | Break circular dependency on media player serviceGlenn Kasten2012-03-131-0/+16
|/ / / | | | | | | | | | | | | Bug: 6165157 Change-Id: I3c85bbcaf31f3cb9a009e273f7b6284015eb3bd8
* | | Whitespace and indentationGlenn Kasten2012-03-138-142/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix indentation to be multiple of 4. Make it easier to search: sp< not sp < to "switch (...)" instead of "switch(...)" (also "if" and "while") Remove redundant blank line at start or EOF. Remove whitespace at end of line. Remove extra blank lines where they don't add value. Use git diff -b or -w to verify. Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
* | | Merge "Clean up assertion checks"Glenn Kasten2012-03-132-27/+25
|\ \ \
| * | | Clean up assertion checksGlenn Kasten2012-03-122-27/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ALOG_ASSERT instead of assert. Use compile-time asserts where appropriate. Fix typo in an ALOGV. Change-Id: I58f1c1ffc14319a022c88b5a88b8d0368660da8b
* | | | Fix bug where mMixerStatus was set to IDLEGlenn Kasten2012-03-121-2/+1
|/ / / | | | | | | | | | Change-Id: I55df1738fb7ba17ba6caeea6a17557526eac17a7
* | | Inline applyVolume() into threadLoop_mix()Glenn Kasten2012-03-122-80/+73
| | | | | | | | | | | | | | | | | | Also the declaration of applyVolume in PlaybackThread was dead. Change-Id: I4b1a9848d07d3d7f340baea05b17f667c78df868
* | | Merge "Remove unnecessary friend declarations"Glenn Kasten2012-03-121-42/+10
|\ \ \
| * | | Remove unnecessary friend declarationsGlenn Kasten2012-03-091-42/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add comments to the remaining friends, so we know what is left if we decide to remove them later. Change-Id: I1de929257dc4700960f77902cda3d303177c72cf
* | | | Merge "Remove virtual from methods that don't need it"Glenn Kasten2012-03-121-3/+4
|\ \ \ \
| * | | | Remove virtual from methods that don't need itGlenn Kasten2012-03-091-3/+4
| |/ / / | | | | | | | | | | | | Change-Id: I30e17e61aae25b036436c0e270313c80c43e5f06
* | | | Merge dup code at thread entry and param changeGlenn Kasten2012-03-122-52/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL is mostly just cleanup, but there are a couple of fixes marked "FIX" below. Merge the duplicate code that was at the beginning of threadLoop() and after a parameter change. cacheParameters_l() is now called at entry to threadLoop() and after any parameter change. It re-calculates all values that are derived from parameters, and caches them in instance variables. updateWaitTime_l(): - FIX activeSleepTime depends on mWaitTimeMs, which was initially set to infinity. updateWaitTime_l() was not called at entry to threadLoop(), so activeSleepTime was not set correctly before the first parameter change. - FIX reversed the order of calls after parameter change for the same reason so that updateWaitTime_l() is called before calculating values that are derived from wait time. - marked it private since now it's only called from DuplicatingThread Change-Id: If2607d2ed66c6893d910433e48208a93c41fb7e9
* | | | Use audio_policy_output_flags_t consistentlyGlenn Kasten2012-03-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affects: - IAudioFlinger::openOutput - AudioTrack::AudioTrack - AudioTrack::set - apps that call these Change-Id: I26fb281bac6cb87593d17697bc9cb37a835af205
* | | | Merge "Replace hard-coded 3 by FCC_2 to simplify searches"Glenn Kasten2012-03-092-4/+13
|\ \ \ \ | |/ / / |/| | |
| * | | Replace hard-coded 3 by FCC_2 to simplify searchesGlenn Kasten2012-03-082-4/+13
| | | | | | | | | | | | | | | | Change-Id: I92881d04e8378307f849fb343071a58d181a68b4
* | | | 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