summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Android.mk
Commit message (Collapse)AuthorAgeFilesLines
* Start pulling bits of FastMixer up to FastThreadGlenn Kasten2014-04-281-1/+2
| | | | Change-Id: I4c6f7b8f88fcf107bb29ee6432feecd4ab6554d2
* Add FastThreadStateGlenn Kasten2014-03-311-1/+1
| | | | Change-Id: I3f07493375ace6e5cfdcd02ad90c4b6fad543b0c
* resolved conflicts for merge of f40c4c56 to masterGlenn Kasten2014-03-191-9/+19
|\ | | | | | | Change-Id: Ifd5385ad42a81e02e6a6afc6281f09fbff361671
| * Add libaudioresamplerGlenn Kasten2014-03-191-11/+18
| | | | | | | | | | | | | | | | libaudioresampler is available in both 32-bit and 64-bit, unlike libaudioflinger which is currently 32-bit only. Bug: 8141282 Change-Id: I839f7b4e6aaed6984012ca6d514323f927669df6
* | Merge "move audio policy service to a separate library"Eric Laurent2014-03-181-3/+13
|\ \
| * | move audio policy service to a separate libraryEric Laurent2014-03-111-3/+13
| | | | | | | | | | | | Change-Id: Ibc3ef07aa9860b7fd4f9aaff27b0dbe0dcbf1cbf
* | | resolved conflicts for merge of 3c780188 to masterGlenn Kasten2014-03-141-0/+1
|\ \ \ | |/ / |/| / | |/ Change-Id: Ic579d346c27ff05ea6444faaa60fa6caaec86fbf
| * mediaserver and associated services are 32-bit onlyGlenn Kasten2014-03-121-0/+1
| | | | | | | | | | | | also 32-bit only command-line apps Change-Id: I9ac557a8d02bbf6986a9b5c3cdce23d400b306a3
* | Audio resampler update to add S16 filtersAndy Hung2013-12-271-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | This does not affect the existing resamplers. New resampler accessed through additional quality settings: DYN_LOW_QUALITY = 5 DYN_MED_QUALITY = 6 DYN_HIGH_QUALITY = 7 Change-Id: Iebbd31871e808a4a6dee3f3abfd7e9dcf77c48e1 Signed-off-by: Andy Hung <hunga@google.com>
* | Use libsndfile to write .wav filesGlenn Kasten2013-12-171-0/+7
|/ | | | | | | This will reduce code duplication, and allow us take advantage of more advanced capabilities of libsndfile in the future. Change-Id: I25fa2b6d0c21e325aeaf05bda62cf7aab0c5deb4
* Make AudioFlinger::instantiate() more resilient when called from separate moduleGlenn Kasten2013-07-191-18/+1
| | | | | Bug: 8834855 Change-Id: I4cd842cdfb09d2aaaaab9df9ac3bec6179709bd3
* make libaudioflinger symbols visibility hiddenMathias Agopian2013-05-091-0/+2
| | | | | | | we export only symbols needed by clients of this library. this saves about 130KB (1/3rd of the lib size) Change-Id: Id81f3ecb299ee3abc0811915cf6efe87180bf15c
* Add liblogYing Wang2013-04-091-3/+5
| | | | | Bug: 8580410 Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
* Add template class SingleStateQueueGlenn Kasten2013-03-051-1/+0
| | | | Change-Id: If7e2bc9b2a216524ee9cbb68682e2634933b4973
* Remove tee sink debugging at compile timeGlenn Kasten2013-02-261-0/+3
| | | | | Bug: 8223560 Change-Id: Iddbfb06c45d43d9f20bb428215dd4094931e19a7
* Update tee sinkGlenn Kasten2013-02-221-8/+0
| | | | | | | | | | Implement rotation to reduce long-term storage use. Implement optional per-track tee. Dynamically enable at runtime based on property, instead of at compile-time. Dynamic frame count not yet implemented. Bug: 8223560 Change-Id: I3706443c6ec0cb0c6656dc288715a02ad5fea63a
* audioflinger: define ANDROID_SMP, remove conditional tracingAlex Ray2012-11-301-0/+7
| | | | | | | | With ANDROID_SMP set, tracing functionality is completely inline, and without the performance hits of external library calls, tracing does not need to be conditionally compiled. Change-Id: I4b29a9a52c403f0d2ea137c5b7bc05a518a7ca4b
* Remove conditional compilation of ATRACE functionsAlex Ray2012-11-301-3/+0
| | | | | | | Tracing functions are meant to be dynamically controlled via sysprops. Conditional compilation removes this functionality. Change-Id: I26bc473d104d0b3c50a228dddfda3fa2428d157a
* AudioFlinger files reorganizationEric Laurent2012-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Audioflinger.cpp and Audioflinger.h files must be split to improve readability and maintainability. This CL splits the files as follows: AudioFlinger.cpp split into: - AudioFlinger.cpp: implementation of IAudioflinger interface and global methods - AFThreads.cpp: implementation of ThreadBase, PlaybackThread, MixerThread, DuplicatingThread, DirectOutputThread and RecordThread. - AFTracks.cpp: implementation of TrackBase, Track, TimedTrack, OutputTrack, RecordTrack, TrackHandle and RecordHandle. - AFEffects.cpp: implementation of EffectModule, EffectChain and EffectHandle. AudioFlinger.h is modified by inline inclusion of header files containing the declaration of complex inner classes: - AFThreads.h: ThreadBase, PlaybackThread, MixerThread, DuplicatingThread, DirectOutputThread and RecordThread - AFEffects.h: EffectModule, EffectChain and EffectHandle AFThreads.h includes the follownig headers inline: - AFTrackBase.h: TrackBase - AFPlaybackTracks: Track, TimedTrack, OutputTrack - AFRecordTracks: RecordTrack Change-Id: I512ebc3a51813ab7a4afccc9a538b18125165c4c
* Save copy of mic input, disabled by defaultGlenn Kasten2012-11-011-0/+4
| | | | Change-Id: I4f5e95a5ddf016530d1b2747a0a5ca0962caabda
* Remove obsolete references to libmedia_nativeGlenn Kasten2012-10-301-2/+0
| | | | | Bug: 6654403 Change-Id: I3993d62987cf0dd85db10bf002a5cce53d4f01bd
* a test app for the resamplersMathias Agopian2012-10-261-0/+23
| | | | Change-Id: I66852d90d384f1d9e77b51ad1a1ebdbaf61d0607
* reenable the cubic resamplerMathias Agopian2012-10-261-3/+1
| | | | | | | | | | | | | cubic resampler was disabled because it hadn't been qualified, however after I did some tests, it does improve significantly the sound quality over the order-1 resampler, even if it is still quite bad. also HIGH_QUALITY resampler was partially disabled, it's now fully enabled. It's a big improvement over the cubic resampler in terms of aliasing noise (it's not as good in the pass-band). Change-Id: I70e3658c255896588642697be9eb594ff4ec0f8b
* audioflinger/resampler: add build source for libaudio-resamplerty.lee2012-10-071-0/+2
| | | | | | | Bug: 7229644 Change-Id: I93bde36be1c3ec84174a4c98423e28f8b3d8782f Signed-off-by: ty.lee <ty.lee@lge.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* Integrate improved coefficient sinc resampler: VHQGlenn Kasten2012-10-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1, and uses low quality for all other use cases. Track estimated CPU load and throttles the quality based on load; as currently configured it should allow up to 2 instances of very high quality. Medium quality and high quality are currently disabled unless explicitly requested. Details: Only load .so the first time it is needed. Cleanup code style: formatting, indentation, whitespace. Restore medium quality resampler, but it is not used (see next line). Fix memory leak for sinc resampler. Check sample rate in resampler constructor. Add logs for debugging. Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels. Renumber VERY_HIGH_QUALITY from 255 to 4. Use enum src_quality consistently. Improve parsing of property af.resampler.quality. Fix reentrancy bug - allow an instance of high quality and an instance of very high quality to both be active concurrently. Bug: 7229644 Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7
* Disable audio watchdogGlenn Kasten2012-09-301-2/+2
| | | | | | | It's not critical, and is wasting power Bug: 7241714 Change-Id: I6ad4375f0000c92529688723dbe0ff0caa809c5d
* audioflinger: use resample coefficients from audio-resampler library.SathishKumar Mani2012-09-261-2/+2
| | | | | | | | | | | -Add a separate quality VERY_HIGH_QUALITY in resampler -Use resample coefficients audio-resampler library for quality VERY_HIGH_QUALITY. -This improves the quality of resampled output. Bug: 7024293 Change-Id: Ia44142413bed5f5963d7eab7846eec877a2415e4 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Move libnbaio out of AudioFlingerGlenn Kasten2012-08-301-27/+1
| | | | | | | | | | libnbaio is now a separate shared library from AudioFlinger, rather than a static library used only by AudioFlinger. AudioBufferProvider interface is now also independent of AudioFlinger, moved to include/media/ Change-Id: I9bb62ffbc38d42a38b0af76e66da5e9ab1e0e21b
* Remove debug code HAVE_REQUEST_PRIORITY and SOAKERGlenn Kasten2012-07-031-1/+1
| | | | Change-Id: I73a2afe72d8acb53e57e6b4e6fb5133e22b7875a
* Make CPU frequency statistics optionalGlenn Kasten2012-06-141-0/+3
| | | | | | | | | | Certain CPUs with dynamic cluster swapping and hotplug don't report CPU frequency accurately. The file descriptors used to read the frequency become stale and report bogus data. So make this feature a build time option for debugging only. This will also improve performance of the fast mixer loop. Change-Id: I602f81ec3281a37992769208be08084ed1469e8c
* Add audio watchdog threadGlenn Kasten2012-06-111-0/+4
| | | | Change-Id: I4ed62087bd6554179abb8258d2da606050e762c0
* Reduce underruns in screen off, esp. with EQGlenn Kasten2012-06-081-0/+3
| | | | | | | | | | | | Add MonoPipe APIs to specify setpoint. Use screen state to configure pipe setpoint. Fix a long-standing bug where pipe sleep time was excessive, which interacted poorly with governor and low clock frequencies. Now it deducts the elapsed time since last write(), which was significant when there was EQ and low clock frequency. Bug: 6618373 Change-Id: I6f3b0072c2244aeb033ef0795ad164491a164ff5
* State queue dumpGlenn Kasten2012-06-041-0/+3
| | | | | Bug: 6591648 Change-Id: Iac75e5ea64e86640b3d890c46a636641b9733c6d
* Keep a copy of most recent audio playedGlenn Kasten2012-05-211-0/+4
| | | | Change-Id: I6b2f97881c39998a2fae9ab79d669af6c0a37e94
* systrace for audioGlenn Kasten2012-05-171-0/+3
| | | | | | | | | | Trace fast track buffer fill status for underruns etc. Move the definition of macro to Android.mk. No overhead if disabled. Change-Id: If0e83e21b61b059ca38f543f8a6ffb58e08c79ee
* Use scheduling policy serviceGlenn Kasten2012-04-241-1/+13
| | | | Change-Id: I3c09da1dc0de5039d0c15ce7fb2bc373fa398712
* AudioFlinger normal mixer uses FastMixerGlenn Kasten2012-04-231-1/+1
| | | | Change-Id: I3131bb22d2d057e9197a2ebfa6aa1cfaab9e5321
* Configure policy of mediaserver threadsGlenn Kasten2012-04-221-0/+2
| | | | Change-Id: Ifd825590ba36996064a458f64453a94b84722cb0
* FastMixer updateGlenn Kasten2012-04-201-1/+1
| | | | | | | | | | Updates: - Add support for mono fast tracks - Add support for optional sample rate conversion on fast tracks - Log sample rate and frame count - Enable statistics Change-Id: Ife014edf4f452da361f3eaaae19209ef6ff6958b
* Fast mixerGlenn Kasten2012-04-181-0/+6
| | | | Change-Id: I61552f83507e08e4c706076b9fb15362869e6265
* Add template class StateQueueGlenn Kasten2012-04-181-0/+2
| | | | Change-Id: Iccc5eb42bc295a22b2e429a4551f083cd7b6831a
* Non-blocking audio I/O interface, WIPGlenn Kasten2012-04-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet another abstraction similar to AudioTrack::Buffer and AudioBufferProvider, but with support for streaming, non-blocking, and eventually PTS. This is intended to be used as follows: - primary HAL output stream implements a Sink - primary HAL input stream implements a Source - Pipe implements a Sink - PipeReader implements a Source or TimedSource (not shown yet), which supports "read at PTS" - fast AudioTrack on server side will implement a Source using cblk - normal AudioTrack on server side will not be changed initially - fast AudioRecord on server side will implement a Sink using cblk - normal AudioRecord on server side will not be changed initially - fast mixer thread will read from Sources and write to a Sink, or (unlikely) implement a Source and multiple Sinks - Visualization and PCM logger will read from Source or TimedSource - A2DP normal mixer will be connected directly to its output stream and there will be a kind of OutputTrack for duplication that will read from a Sink with non-blocking write fed by the fast mixer. Patch set 3 changes: - Add more implementations of NBAIO interfaces: added SourceAudioBufferProvider, MonoPipe, MonoPipeReader. - Added Format_sampleRate and Format_channelCount. - Extract out the roundUp() method. - Respond to most comments from previous code review. - The new classes are untested. Patch set 4 changes: - Fix bugs in MonoPipe::write() and MonoPipeReader::read() - Fix bug initializing mFrameBitShift too early - renamed roundUp() to roundup() - Fix Android.mk - Add LOG_TAG an LOG_NDEBUG, use ALOG_ASSERT and utils/Log.h instead of assert - Fix build warnings - Move constructor and destructor bodies from .h to .cpp - Line length 100 - Following naming conventions for #include double-include protector macros - Include what you use - More NBAIO logging - MonoPipe write can be blocking Patch set 5 changes: - Address code review comments - Use a static library so unused implementations don't take memory - Comment out libsndfile dependency - Remove debugging LOGV and LOG_NDEBUG Patch set 6 changes (would be 6 at old location, actually 2 at new location): - Address code review comments on patchset 5 - For MonoPipe, allow the full pipe to be used, no need to omit one slot - Don't do atomic releasing stores unless needed Still to do: - I'm not happy with the Pipe class names - Update build/ for new static library? Change-Id: Ie6c61f05ce06b676b033be448a8ef9025a2ffcfd
* 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
* Add libmedia_nativeGlenn Kasten2012-03-191-0/+2
| | | | Change-Id: I3ac357c78fb89f108d15c6e5b9fa317de0e9fb9a
* Remove dependency on audio_* locationGlenn Kasten2012-03-141-2/+2
| | | | Change-Id: I4bc66115fcb9ba22b057bd72db3f561dcb18a0d8
* AudioBufferProvider comments and cleanupGlenn Kasten2012-02-241-1/+0
| | | | | | | | | | | | | | | | | | | | 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
* Upintegrate Audio Flinger changes from ICS_AAHJohn Grossman2012-02-161-0/+2
| | | | | | | | Bring in changes to audio flinger made to support timed audio tracks and HW master volume control. Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae Signed-off-by: John Grossman <johngro@google.com>
* Factor out and speed up permission-checking codeGlenn Kasten2012-02-131-1/+2
| | | | | | | | | | | | | Use the caching permission check for dump to save IPC. Cache getpid() to save kernel call for other permission checks. The C runtime library getpid() can't cache due to a fork race condition, but we know that mediaserver doesn't fork. Don't construct String16 on the stack. Change-Id: I6be6161dae5155d39ba6ed6228e7683e67be34ed
* Disable HQ resamplers for now until qualifiedGlenn Kasten2012-02-091-2/+2
| | | | | | This saves about 6500 bytes. Change-Id: I87102fe561c95c19c9e615dea3de914f96639257