summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-266-228/+228
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Fix 5487571: Make sure shutter sound is played when it's enforcedChih-Chung Chang2011-10-201-8/+2
| | | | Change-Id: I0c7adf452217b8308243836b40b1fba8f2029240
* Fix issue 381905: BassBoostTest CTS tests fail...Eric Laurent2011-10-192-4/+15
| | | | | | | | | | | | | | | | | | | When AudioEffectTest is executed, an Equalizer is created and enabled on a MediaPlayer session. Effects on the output mix are therefore suspended. Then the MediaPlayer is released with the effect still enabled. In this case, Audioflinger::purgeStaleEffects_l() fails to restore the suspended effects when the effect attached to the released audio session is removed. When subsequent tests are executed on output mix effects, these effects cannot be enabled as they are still suspended. Fixed purgeStaleEffects_l() to restore suspended effects if the effect removed is enabled. Also fixed EffectHandle::disconnect() to only restore suspended effects if the disconnected handle actually has control over the effect. Change-Id: I67232e7c34680b0cc01abfd57d5d510a524e5d4f
* Limit AudioFlinger log.Eric Laurent2011-10-181-3/+7
| | | | | | | | | | | | | | | AudioFlinger logs a warning when a write to the audio HAL takes too long to return. The threshold for this warning is a rule of thumb based on the assumption that the audio HAL will consume buffers at a regular pace. The introduction of low power audio mode with larger buffers and writes occuring in bursts makes that this threshold is often exceeded resulting in excessive and misleading warnings. The threshold is raised to remove unwanted warnings but we should reconsider the usefulness of this warning altogether. Change-Id: I5ef6898ea28d879cede3e47da542a64092a3cca4
* Fix 5468644: Use the proper audio stream type to play sound.Chih-Chung Chang2011-10-172-14/+16
| | | | Change-Id: I80dd37da277b1810959a2dbdd852078b26f70cf5
* Add initialize method to CameraHardwareInterfaceTyler Luu2011-10-072-14/+28
| | | | | | | | | | | | Add intialize() method to CameraHardwareInterface so we can return a proper error value to CameraService if open of camera hardware module fails. b/5405235 Change-Id: I09c627034ddd22a5753c5163392c4fcff301e0b9 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "Allow shutter/recording sound to be adjusted unless it's forced."Chih-Chung Chang2011-10-071-1/+12
|\
| * Allow shutter/recording sound to be adjusted unless it's forced.Chih-Chung Chang2011-10-071-1/+12
| | | | | | | | Change-Id: I7080d5f50a87f92c8e9395d4cf8f927a6760fa70
* | Merge "Allow Camera.setDisplayOrientation to be called when preview is active."Wu-cheng Li2011-10-071-4/+4
|\ \ | |/ |/|
| * Allow Camera.setDisplayOrientation to be called when preview is active.Wu-cheng Li2011-10-071-4/+4
| | | | | | | | | | | | bug:5422679 Change-Id: I4c936ab00428fc158b5947fe8f10b1028869bbdb
* | Fix issue 5381089: problem with A2DP music volumeEric Laurent2011-10-052-2/+17
|/ | | | | | | | | | | | This problem only occurs when audio effects are present and the music volume is applied by one effect engine. When connecting or disconnecting A2DP, audio effects are moved from one mixer thread to another. When removed from the source thread, the effect is stopped but it is not restarted when added to the destination thread. This regression was introduced by commit 21b5c47e. Change-Id: I4cc578d8d760ec65b185032b6fda98c739d331bc
* Fix issue 5373658: memory leak in AudioFlinger.Eric Laurent2011-09-271-0/+4
| | | | | | | Unlink PowerManagerService binder interface death recipient in ThreadBase destructor. Change-Id: Iab06ae9a8a6737bb002b6416a157b0fb50c11ad5
* Fix issue 5355047: Automated effect tests fail.Eric Laurent2011-09-231-1/+10
| | | | | | | | | | | | | | | Fixed several regressions in automated audio effect tests due to changes in effect framework and visualizer FFT output range. - Do not suspend Volume effect on session 0 when effects are enabled on specific sessions. - Adapt energy detection thresholds to new visualizer FFT range. - Leave more time for BassBoost and Virtualizer effects to ramp up before measuring the effect. - Removed second insert reverb left by mistake on the player session in preset reverb test. Change-Id: I7a1ad1372d783fa7900eb9dd1d3b47f54d8d766f
* AudioResampler: use relative instead of absolute labelsNick Kralevich2011-09-161-8/+8
| | | | | | | This change is needed to allow Android to compile with -fPIE Bug: 5328392 Change-Id: I84d947975776800a7b79c6ac75a881af461a631c
* Issue 4345021: Audio routed to multiple devices...Eric Laurent2011-09-131-4/+12
| | | | | | | | | | | | There is a possiblility that the condition on which RecordThread::checkForNewParameters_l() waits after updating the command completion status is never signalled. This happens if the thread executing ThreadBase::setParameters() has timed out waiting for the status (for instance if the audio HAL takes too long to execute the setParameters() command. Then the RecordThread is stuck forever. The fix consists in waiting for the condition with a timeout in RecordThread::checkForNewParameters_l(). Change-Id: I7fc671bc2fc43ba4acb65a2beb33ee05742f091e
* Add video snapshot camera parameter.Wu-cheng Li2011-09-011-5/+0
| | | | | | | | The API is still hidden. bug:5187868 Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
* Merge "226483: A2DP connected, but music out to speaker"Eric Laurent2011-08-302-1/+25
|\
| * 226483: A2DP connected, but music out to speakerEric Laurent2011-08-302-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the A2DP headset is connected, there is a possible race condition when the audio tracks are moved from the mixer thread attached to the speaker output to the thread attached to A2DP output. As the request to clear the stream type to output mapping cache in the client process is asynchronous, it is possible that the flag indicating to the client audio track to re-create the IAudioTrack on the new thread is processed before the cache is invalidated. In this case, the track will be attached to the old thread and music will continue playing over the device speaker instead of being redirected to A2DP headset. Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
* | Audioflinger: reverse logic of BT NREC indicationEric Laurent2011-08-292-9/+9
|/ | | | | | | | The interpretation of BT NREC by AudioFlinger to enable or disable AEC and NS was wrong: NREC to ON (default) means the phone (Audio Gateway) must enable local AEC and NS. Change-Id: I88a264e7fc9831c43bbace4f6b585baec73f2006
* AudioFlinger: add check for audio HAL init failureEric Laurent2011-08-231-3/+31
| | | | | | | Do not call audio HAL functions on the primary HW interface if it could not be initialized properly. Change-Id: If54059c8fd188d6c1686f9e0439994fe9411478a
* Issue 5081351: isWiredHeadsetOn() permission.Eric Laurent2011-08-121-9/+0
| | | | | | | | | AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS. Remove permission checks on all getters in audio policy manager as permission enforcement is really usefull for setters. Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive. Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
* Don't remove effects on session 0Marco Nelissen2011-08-121-1/+3
| | | | | b/5159902 Change-Id: Id6f29fb1c687069f7480dd81d4745a558f202226
* Audio effects: track CPU and memory use separatelyEric Laurent2011-08-114-26/+66
| | | | | | | | | | | | | | | | | | | | | | 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
* Keep effects sessions active when the caller dies.Marco Nelissen2011-08-092-28/+192
| | | | | | | | Don't remove effects until the session they are in goes away or all AudioEffects have been explicitly released. This allows the control panel process to die without stopping the effects. Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
* Merge "AudioFlinger: protect input/output stream access"Eric Laurent2011-08-082-21/+106
|\
| * AudioFlinger: protect input/output stream accessEric Laurent2011-08-082-21/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some methods would not check that the output orinput stream of a thread was still valid before calling functions on its interface. This could cause a crash if those methods where called while the output or input was being closed by another thread. Make sure that the output or input stream pointer is cleared before closing the stream. Always check that the output or input pointer is not null before calling functions at the stream interface. Generalize the use of initCheck() method to verify that the output or input stream is not null. Change-Id: I9d9ca6b744d011bcf3a7bbacb4a581ac1477bfa5
* | AudioFlinger: disable AEC and NS with BT headsetsEric Laurent2011-08-032-3/+52
| | | | | | | | | | | | | | Disable AEC and NS when the Bluetooth SCO headset in use indicates it implements those pre processings. Change-Id: I93f3d10b0a27243d5dbff7182639576fc0c6d862
* | Audio Effect Framework: add effect suspend/restoreEric Laurent2011-08-022-35/+498
|/ | | | | | | | | | Add the possibility for the effect framework to suspend (temporarily disable process) and restore audio effects. This feature will be usefull to disable pre processing under certain conditions and better control coexistence of audio effects on output mix and specific sources. Change-Id: I79b195982cc48748d5708308fb1647b9c3c34cc6
* Pass camera frame metadata from camera service to Java.Wu-cheng Li2011-08-022-22/+28
| | | | | bug:4460717 Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
* connect/disconnect is now called from our EGL wrapperMathias Agopian2011-08-011-4/+4
| | | | | | | | | | | the original connect/disconnect hooks are deprecated and replace by api_connect/api_disconnect. the original hooks are no no-ops. api_connect/api_disconnect is now only called from the android framework. Bug: 5057915 Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
* Merge "Add frame metadata parameter to camera data_callback."Wu-cheng Li2011-07-284-6/+9
|\
| * Add frame metadata parameter to camera data_callback.Wu-cheng Li2011-07-294-6/+9
| | | | | | | | | | bug:4460717 Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
* | Fix issue 5090721: audio record brokenEric Laurent2011-07-281-1/+1
|/ | | | | | | Commit 6dbdc40 introduced a deadlock when exiting the AudioFlinger RecordThread. Change-Id: I1f63e54c5aeff05da4e4d028b53f734c62c78677
* libcameraservice: call put_parameters on camera HALIliyan Malchev2011-07-271-1/+4
| | | | | Change-Id: I492d1034ade50f9e157141debaa9783a90a04a91 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "AudioFlinger: fix crash when deleting pre process."Eric Laurent2011-07-272-15/+27
|\
| * AudioFlinger: fix crash when deleting pre process.Eric Laurent2011-07-262-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a pre processing effect is detroyed while enabled and capture is active, there was a possibility that the effect engine is released by the framework while still processed by the audio HAL. The fix consists in not releasing the engine in EffectModule::removeHandle() but just flag the effect as being detroyed to avoid further calls to functions on the engine effect interface. The effect interface is then removed from the audio HAL safely in EffectChain::removeEffect_l() while holding the EffectChain mutex. Change-Id: I71fab30d9145062af8644f545a1f1d4d3e7e7f02
* | Fix issue 4604090: notification sound interrupted.Eric Laurent2011-07-253-14/+132
|/ | | | | | | | | | | | | The problem is that the audio HAL fails to acquire the wake lock when playing the notification. This is because of a change that removed the mediaserver process form the system group for honeycomb. The fix consists in requesting the wake lock from PowerManagerService when AudioFlinger mixer wakes up. A consequence of this change is that audio HALs or pcm drivers do not have to hold wake locks anymore as in the past. Change-Id: I4fb3cc84816c9c408ab7fec75886baf801e1ecb5
* Added APIs for audio preprocessingEric Laurent2011-07-252-0/+40
| | | | | | | | | | | | | | | 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
* AudioFlinger: add dump of audio pre processing.Eric Laurent2011-07-242-19/+21
| | | | | | | | Dump of media.audio_flinger service was only listing effects on output threads. Moved the dump of effect chains from PlaybackThread to ThreadBase class so that pre processings on RecordThread are also listed. Change-Id: If8bc74023c12b9c2371f1b300743b156ceca7b87
* Fix issue 4988574: 8 bit PCM audio playback broken.Eric Laurent2011-07-211-1/+1
| | | | | | | Fixed regression in audio track control block frame size calculation introduced by commit c310dcb. Change-Id: Ia731b946ae4e43316b98d80229e3b08a696e47d6
* Merge "Audio framework: support for audio pre processing"Eric Laurent2011-07-204-213/+924
|\
| * Audio framework: support for audio pre processingEric Laurent2011-07-184-213/+924
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Disconnect the native window in CameraService::Client::disconnect."Wu-cheng Li2011-07-191-11/+12
|\ \
| * | Disconnect the native window in CameraService::Client::disconnect.Wu-cheng Li2011-07-201-11/+12
| | | | | | | | | | | | | | | bug:5048372 Change-Id: I6886907a672ddf5580b988ca5bc13e3dc26d4385
* | | use SurfaceTexture new scaling mode in SFMathias Agopian2011-07-191-0/+4
|/ / | | | | | | | | | | | | SF now obeys SurfaceTexture's scaling mode instead of inferring it from the buffer's size Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
* | Merge "CameraService: (dis)connect from preview windows"Jamie Gennis2011-07-182-46/+55
|\ \ | |/ |/|
| * CameraService: (dis)connect from preview windowsJamie Gennis2011-07-142-46/+55
| | | | | | | | | | | | | | This change makes CameraService connect and disconnect from preview windows (Surfaces and SurfaceTextures) that get set. Change-Id: I726971688367d5ce0d9aa90c44168037bce33deb
* | Merge "Log CPU usage"Glenn Kasten2011-07-152-0/+35
|\ \
| * | Log CPU usageGlenn Kasten2011-07-152-0/+35
| | | | | | | | | | | | Change-Id: Ie447e59be139153e526b7ad467c46c659d26816f
* | | Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator buildMike Lockwood2011-07-131-3/+0
| | | | | | | | | | | | | | | Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba Signed-off-by: Mike Lockwood <lockwood@android.com>