bfb1b832079bbb9426f72f3863199a54aefd02da |
|
07-Jan-2013 |
Eric Laurent <elaurent@google.com> |
AudioFlinger: offload playback, non-blocking write - Added specialized playback thread class for offload playback, derived from directoutput thread. This thread type handles specific state transitions for offloaded tracks and offloading commands (pause/resume/drain/flush..) to audio HAL. As opposed to other threads, does not go to standby if the track is paused. - Added support for asynchronous write and drain operations at audio HAL. Use a thread to handle async callback events from HAL: this avoids locking playback thread mutex when executing the callback and cause deadlocks when calling audio HAL functions with the playback thread mutex locked. - Better accouting for track activity: call start/stop and release Output methods in audio policy manager when tracks are actually added and removed from the active tracks list. Added a command thread in audio policy service to handle stop/release commands asynchronously and avoid deadlocks with playback thread. - Track terminated status is not a state anymore. This condition is othogonal to state to permitted state transitions while terminated. Change-Id: Id157f4b3277620568d8eace7535d9186602564de
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
ad3af3305f024bcbbd55c894a4995e449498e1ba |
|
25-Mar-2013 |
Richard Fitzgerald <rf@opensource.wolfsonmicro.com> |
Public API changes for audio offload support. NOTE: this does _not_ include all private member variables added to classes as part of offload support. Only public/protected functions and stubs functions/variables needed to make the changes buildable. - isOffloadSupported() added to audio policy service A stub implementation is required to build, this always returns false - setParameters() added to IAudioTrack A stub implementation is required to build, this always returns INVALID_OPERATION - CBlk flag for stream end - Change AudioSystem::getRenderPosition() to take an audio_output_t so caller can specify which output to query - Add AudioSystem::isOffloadSupported() This is fully implemented down to the AudioFlinger function AudioPolicyServer::isOffloadSupported() which is just a stub that always returns false. - Add EVENT_STREAM_END to AudioTrack interface. STREAM_END is used to signal when the hardware has actually finished playing all the data it was sent. - Add event type enumeration to media player interface AudioSink callbacks so that the same callback can be used to handle multiple types of event. For offloaded tracks we also have to handle STREAM_END and TEAR_DOWN events - Pass audio_offload_info_t to various functions used for opening outputs, tracks and audio players. This passes additional information about the compressed stream down to the HAL when using offload. For publicly-available APIs this is an optional parameter (for some of the internal and low-level APIs around the HAL interface it is mandatory) - Add getParameters() and setParameters() API to AudioTrack Currently dummy implementations. - Change AudioPlayer contructor so that it takes a set of bitflags defining what options are required. This replaces the original bool which only specified whether to use deep buffering. - Changes to StageFright class definition related to handling tearing-down of an offloaded track when we need to switch back to software decode - Define new StageFright utility functions used for offloaded tracks Currently dummy implementations. - AudioFlinger changes to use extended audio_config_t. Fills in audio_offload_info_t member if this info is passed in when opening an output. - libvideoeditor changes required to add the new event type parameter to AudioSink callback functions - libmediaplayerservice changes required to add the new event type parameter to AudioSink callback functions Change-Id: I3ab41138aa1083d81fe83b886a9b1021ec7320f1 Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Eric Laurent <elaurent@google.com>
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
e762be91c3280d837b1d48455cba90459ced7511 |
|
10-May-2013 |
Mathias Agopian <mathias@google.com> |
make libaudioflinger symbols visibility hidden we export only symbols needed by clients of this library. this saves about 130KB (1/3rd of the lib size) Change-Id: Id81f3ecb299ee3abc0811915cf6efe87180bf15c
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
272ab546940054ad7991bef4b3a36f15175721cd |
|
05-Feb-2013 |
Jean-Michel Trivi <jmtrivi@google.com> |
Add support for querying if a stream is active remotely Bug 7485803 Change-Id: I0744374f130fd2dd0714102354cffed2fa915361
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
85ab62c4b433df3f1a9826bed1c9bec07a86c750 |
|
01-Nov-2012 |
Glenn Kasten <gkasten@google.com> |
Line length 100 Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
d7086030fcf731e4bcef6c033cc6418cd04e6b91 |
|
10-Oct-2012 |
Jean-Michel Trivi <jmtrivi@google.com> |
Support querying active record sources Add support for querying whether there is currently a recording underway from the specified audio source. Bug 7314859 Change-Id: I986b231a10ffd368b08ec2f9c7f348d28eaeb892
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
58e5aa34f01d663654d8bafad65db1dda42161ff |
|
20-Jun-2012 |
Glenn Kasten <gkasten@google.com> |
effect_descriptor_t const correctness Change-Id: Iad008f20d35a18acf500f773900164552fd0c19e
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
254af180475346b6186b49c297f340c9c4817511 |
|
03-Jul-2012 |
Glenn Kasten <gkasten@google.com> |
Use audio_channel_mask_t more places Use it in AudioSystem::getOutput(), AudioSystem::getInput(), IAudioPolicyService::getOutput(), IAudioPolicyService::getInput(), and various other places in AudioFlinger. Not done: AudioTrack and OutputDescriptor. Change-Id: I70e83455820bd8f05dafd30c63d636c6a47cd172
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
20010053daabfa43fcfe781bbf004473b4c08538 |
|
22-Jun-2012 |
Glenn Kasten <gkasten@google.com> |
Remove acoustics from AudioSystem::getInput() Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
0ca3cf94c0dfc173ad7886ae162c4b67067539f6 |
|
18-Apr-2012 |
Eric Laurent <elaurent@google.com> |
rename audio policy output flags Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
e53b9ead781c36e96d6b6f012ddffc93a3d80f0d |
|
13-Mar-2012 |
Glenn Kasten <gkasten@google.com> |
Whitespace and indentation 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
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
b3dfcf483a96816fe2e949dd86fed26e52ad7404 |
|
09-Mar-2012 |
Glenn Kasten <gkasten@google.com> |
Merge "AudioPolicyService InputDesc minor cleanup"
|
81872a2ce65653ae980621ba2907da56a83ba9a7 |
|
08-Mar-2012 |
Glenn Kasten <gkasten@google.com> |
AudioPolicyService InputDesc minor cleanup 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
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
6374252107fd6539397598195ea6defd5870fafb |
|
08-Mar-2012 |
Eric Laurent <elaurent@google.com> |
audio policy: use audio_devices_t when appropriate Change-Id: I1b3a5879e81c789fb53d356af3d3a1ee2dca955f
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
3030fcefcfcfc48789612659206b957cd0489a54 |
|
01-Mar-2012 |
Eric Laurent <elaurent@google.com> |
renamed audio policy output flag. Renamed AUDIO_POLICY_OUTPUT_FLAG_INDIRECT to AUDIO_POLICY_OUTPUT_FLAG_NONE which is more appropriate. Change-Id: Ia14d60397df0f2dcd9bea0186400a09da35bc104
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
9fda4b87441fe17d90d8144639c9de6d9022c3c0 |
|
02-Feb-2012 |
Glenn Kasten <gkasten@google.com> |
Fixed possible heap corruption in EffectDesc "EffectDesc *effect = new EffectDesc(*effects[i]);" was relying on the default copy constructor for EffectDesc, but the default copy constructor does a member-by-member copy. This works OK for mUuid, but a member copy of mName and mParams shares pointers. This could result in heap corruption later on due to a double free. Changed to add an explicit copy constructor that does a deep copy of both mName and mParams. A malloc() and strdup() were being freed by delete, but the correct matching API for these is free(). Fortunately our current memory runtime implementation ignores the difference. Changed to use free(). EffectDesc and InputSourceDesc member fields were being torn down by the code that does delete. Changed to do the tear-down in ~EffectDesc() and ~InputSourceDesc(). Added constructor EffectDesc() with name and UUID parameters, rather than having caller fill in the object after construction. Made ~EffectDesc() and ~InputSourceDesc() non-virtual to save memory, since they have no subclasses. Change-Id: Ibb5cc2e6760d72e0c4cf537068ac4432c717bafd
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
72ef00de10fa95bfcb948ed88ab9b7a177ed0b48 |
|
17-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use audio_io_handle_t consistently instead of int Other: - add a comment to nextUniqueId - made ThreadBase::mId const, since it is only assigned in constructor. Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
787bae0578fbaab6219ebf23494866b224d01438 |
|
03-Feb-2012 |
Glenn Kasten <gkasten@google.com> |
Merge "Use audio_in_acoustics_t consistently"
|
ff3c83e04ae459c4252b86dd4440b4e37ee92c16 |
|
03-Feb-2012 |
Glenn Kasten <gkasten@google.com> |
Merge "Use ToneGenerator::tone_type consistently"
|
3d2f877c1cb4e4ae4ddde7f57f4353de9341f11b |
|
28-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use ToneGenerator::tone_type consistently Also remove defaults in startToneCommand(), they're not needed and the default for tone type was nonsense. Change-Id: I70fa8cee4f3dbb8c66ceb3719c8d3d2f447f05b9
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
de9719b3ec71472e6bf75117152176af51d1a515 |
|
27-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use audio_in_acoustics_t consistently Change-Id: I0a9dd668fb2e57b1c3ece3190588194974b99062
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
eba51fb3a361f67a6a64d5a16eba6084fe27d60e |
|
23-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use audio_source_t consistently Was a mix of audio_source_t, uint8_t, and int. Related fixes: - fix comments in MediaRecorder.java - AudioPolicyService server side was not checking source parameter at all, so if the client wrapper was bypassed, invalid values could be passed into audio HAL - JNI android_media_AudioRecord_setup was checking source for positive values, but not negative values. This test is redundant, since already checked at Java and now checked by AudioPolicyService also, but might as well make it correct. Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
58f30210ea540b6ce5aa6a46330cd3499483cb97 |
|
12-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use audio_format_t consistently, continued Was int or uint32_t. When AudioFlinger::format can't determine the correct format, return INVALID rather than DEFAULT. Init mFormat to INVALID rather than DEFAULT in the constructor. Subclass constructors will set mFormat to the correct value. Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
ea3cc3bca949139e401b77f2ac0cce7ac6e76f8f |
|
20-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Merge "Remove dead setRingerMode(mode, mask)"
|
8dad0e31c2366c501bd1d600261d0af35a6ca786 |
|
09-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use const const strings for arrays and pointers to strings Change-Id: I0a073e17ebf6ad59e7edbedac104c6fa4bcaf9c9
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
0b07b8085d7b837b4dd5f09e0c8c39408f6bdbf7 |
|
18-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Remove dead setRingerMode(mode, mask) Change-Id: Ia4cc8be8424a40b3dcb7ebd0264fdff4e5247f7f
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
63ad6aacc6ce6b729bf25f41376cfea731a2c1eb |
|
18-Jan-2012 |
Eric Laurent <elaurent@google.com> |
Merge "audio framework: manage stream volume per device"
|
83844cc2f95dc279015b47fd1e18c7cb4eabe9a1 |
|
19-Nov-2011 |
Eric Laurent <elaurent@google.com> |
audio framework: manage stream volume per device Improve volume management by keeping track of volume for each type of device independently. Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained per device. The main changes are: - AudioService now keeps tracks of stream volumes per device: volume indexes are kept in a HashMap < device , index>. active device is queried from policy manager when a volume change request is received initalization, mute and unmute happen on all device simultaneously - Settings: suffixes is added to volume keys to store each device volume independently. - AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument to setStreamVolumeIndex() and getStreamVolumeIndex() to address each device independently. - AudioPolicyManagerBase: keep track of stream volumes for each device and apply volume according to current device selection. Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
0696400a6bb9abbed62b3b9c6aa105495dc600a2 |
|
17-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Merge "Use audio_mode_t consistently"
|
fff6d715a8db0daf08a50634f242c40268de3d49 |
|
13-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use audio_stream_type_t consistently At native level it was a mixture of audio_stream_type_t, int, uint32_t, and uint8_t. Java is still int. Also fixed a couple of hard-coded -1 instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0 instead of AUDIO_STREAM_VOICE_CALL. Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
f78aee70d15daf4690de7e7b4983ee68b0d1381d |
|
04-Jan-2012 |
Glenn Kasten <gkasten@google.com> |
Use audio_mode_t consistently It was int or uint32_t. Also make getMode() const. Change-Id: Ibe45aadbf413b9158e4dd17f2b3bcc6355288d37
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
d1d8f23dde239289ba8c0de0944baaca3586c880 |
|
08-Jul-2011 |
Glenn Kasten <gkasten@google.com> |
Fix includes Remove unused #include dlfcn.h Add #include String8.h Forward class declaration is only for references and pointers. In this case, we need the full class declaration, and were incorrectly depending on another header file to do it. Change-Id: Iff65cceb3982698cc1ebaeec405695fc190c03ff
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
db7c079f284f6e91266f6653ae0ec198b1c5006e |
|
10-Aug-2011 |
Eric Laurent <elaurent@google.com> |
Audio effects: track CPU and memory use separately Before this change, CPU and memory usage for an audio effect were registered and checked against the limit by audio policy manager upon effect instantiation. Even if an effect was not enabled it would prevent another effect to be created if the CPU load budget was exceeded, which was too restrictive. This change adds a method to register/unregister CPU load only when an effect is enabled or disabled. It also adds a mechanism to place all effects on the global output mix in suspend state (disabled) when an effect is enabled on a specific session. This will allow applications using session effects to have the priority over others using global effects. Also fixes some issues with suspend/restore mechanism: - avoid taking actions when an effect is disconnected and was not enabled. - do not remove a session from the suspended sessions list when corresponding effect chain is destroyed. Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
57dae99c9fcd6becd2b5ed0c53f277ba4d7dbcfc |
|
24-Jul-2011 |
Eric Laurent <elaurent@google.com> |
Added APIs for audio preprocessing Added APIs to control pre processes applied on captured audio. Those APIs are still hidden until reviewed by API council. Three types of standard pre processes are supported: - Automatic Gain Control (AGC) by AutomaticGainControl class - Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class - Noise Suppression (NS) by NoiseSuppressor class A method is added to AudioEffect class to query audio pre processings applied by default by the platform on a given AudioRecord session ID. Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
7c7f10bd4fda9a084e5e7f0eb3a040dfcbf01745 |
|
18-Jun-2011 |
Eric Laurent <elaurent@google.com> |
Audio framework: support for audio pre processing Audio effect framework is extended to suport effects on output and input audio path. AudioFlinger: Support for audio effects and effect chains is moved from PlaybackThread class to ThreadBase class so that RecordThread can manage effects. Effects of type pre processing are allowed on record thread only. When a pre processing is enabled, the effect interface handle is passed down to the input stream so that the audio HAL can call the process function. The record thread loop calls the effect chain process function that will only manage the effect state and commands and skip the process function. AudioRecord: The audio session is allocated before calling getInput() into audio policy serice so that the session is known before the input theead is created and pre processings can be created on the correct session. AudioPolicyService: default pre processing for a given input source are loaded from audio_effects.conf file. When an input is created, corresponding effects are created and enabled. Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
7394a4f358fa9908a9f0a7c954b65c399f4268e6 |
|
14-Jun-2011 |
Dima Zavin <dima@android.com> |
audio: update for audio/audio_policy header names/locations Change-Id: I36c49352eee57559403cd1597f56a8485a360289 Signed-off-by: Dima Zavin <dima@android.com>
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
64760240f931714858a59c1579f07264d7182ba2 |
|
11-May-2011 |
Dima Zavin <dima@android.com> |
update for new audio.h header location Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876 Signed-off-by: Dima Zavin <dima@android.com>
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
fce7a473248381cc83a01855f92581077d3c9ee2 |
|
20-Apr-2011 |
Dima Zavin <dima@android.com> |
audio/media: convert to using the audio HAL and new audio defs Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
6b2718c67aa7b1a8e3b0f25a73a0d5f72c59ffc3 |
|
04-Feb-2011 |
Glenn Kasten <gkasten@google.com> |
Bug 3352047 Wrong message when adjusting volume Add hidden AudioManager.getDevicesForStream and output device codes. Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
802da7bc462f6f9df6e681cc75c51dc0a056a4a1 |
|
04-Feb-2011 |
Glenn Kasten <gkasten@google.com> |
Merge "Bug 3366668 Use BinderService template"
|
d2dcb08808aed82218b258726fa66f8e095a3f9c |
|
04-Feb-2011 |
Glenn Kasten <gkasten@google.com> |
Bug 3366668 Use BinderService template Change-Id: I93d7f3fc9dc9b6a365723d8a51a73a5aabdb4f93
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
eda6c364c253ba97ee45a3adeb8c2b45db1f81db |
|
02-Feb-2011 |
Eric Laurent <elaurent@google.com> |
Fix issue 3371080 Modified default volume control logic in AudioService: 1 IN_CALL volume if in video/audio chat 2 NOTIFICATION if notification is playing or was playing less than 5s ago. 3 MUSIC Modified silent mode: - now also affect MUSIC stream type - entering silent mode when VOL- hard key is pressed once while selected stream volume is already at 0 (except for VOICE_CALL stream). - exiting silent mode when pressing VOL+ hard key while in silent mode Play sound FX (audible selections, keyboard clicks) at a fixed volume. Modified audio framework: - isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger) - iStreamActive() now specifies a time window during which the stream is considered active after it actually stopped. Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
de070137f11d346fba77605bd76a44c040a618fc |
|
13-Jul-2010 |
Eric Laurent <elaurent@google.com> |
Audio policy manager changes for audio effects Added methods for audio effects management by audio policy manager. - control of total CPU load and memory used by effect engines - selection of output stream for global effects - added audio session id in parameter list for startOutput() and stopOutput(). this is not used in default audio policy manager implementation. Modifications of audio effect framework in AudioFlinger to allow moving and reconfiguring effect engines from one output mixer thread to another when audio tracks in the same session are moved or when requested by audio policy manager. Also fixed mutex deadlock problem with effect chains locks. Change-Id: Ida43484b06e9b890d6b9e53c13958d042720ebdb
/frameworks/av/services/audioflinger/AudioPolicyService.h
|
65ab47156e1c7dfcd8cc4266253a5ff30219e7f0 |
|
15-Jul-2010 |
Mathias Agopian <mathias@google.com> |
move native services under services/ moved surfaceflinger, audioflinger, cameraservice all native services should now reside in this location. Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
/frameworks/av/services/audioflinger/AudioPolicyService.h
|