summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | | get rid of overlay HALMathias Agopian2011-07-121-10/+0
| | | | | | | | | | | | Change-Id: I461f633d172ab10e05326ef10544c67dea664c0e
* | | Remove the simulator target from all makefiles.Jeff Brown2011-07-111-13/+2
| | | | | | | | | | | | | | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* | | Eliminate single-process mode.Jeff Brown2011-07-081-8/+1
| |/ |/| | | | | | | | | Bug: 5010576 Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
* | Merge "Fix build warning; LOG_TAG was misplaced"Glenn Kasten2011-07-081-2/+2
|\ \
| * | Fix build warning; LOG_TAG was misplacedGlenn Kasten2011-07-081-2/+2
| |/ | | | | | | Change-Id: I4fb0590f626445188f9053367707878b2fa0fa30
* | Moved and renamed effect API header filesEric Laurent2011-07-072-1/+4
|/ | | | | | | | Moved specific effect header files to system/media/audio_effects/include/audio_effects and renamed to lower case (effect_xxx.h). Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
* CameraService: Decouple dequeue and lockSundar Raman2011-06-271-7/+11
| | | | | | | | Decouple lockBuffer from dequeueBuffer. Add lock_buffer to preview_stream_ops, so HALs will be fully in charge of managing buffers. Change-Id: I7b53487d618bdf08ba904c5a0f41af462a7ca773 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Add framework support for camcorder zoom.Wu-cheng Li2011-06-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to allow applications using the camera during recording. Camera service allows only one client at a time. Since camcorder application needs to own the camera to do things like zoom, the media recorder cannot access the camera directly during recording. So ICameraRecordingProxy is a proxy of ICamera, which allows the media recorder to start/stop the recording and release recording frames. ICameraRecordingProxyListener is an interface that allows the recorder to receive video frames during recording. ICameraRecordingProxy startRecording() stopRecording() releaseRecordingFrame() ICameraRecordingProxyListener dataCallbackTimestamp() The camcorder app opens the camera and starts the preview. The app passes ICamera and ICameraRecordingProxy to the media recorder by MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in MediaRecorder::start(). After setup, the recorder disconnects from camera service. The recorder calls ICameraRecordingProxy::startRecording() and passes a ICameraRecordingProxyListener to the app. The app connects back to camera service and starts the recording. The app owns the camera and can do things like zoom. The media recorder receives the video frames from the listener and releases them by ICameraRecordingProxy::releaseRecordingFrame. The recorder calls ICameraRecordingProxy::stopRecording() to stop the recording. The call sequences are as follows: 1. The app: Camera.unlock(). 2. The app: MediaRecorder.setCamera(). 3. Start recording (1) The app: MediaRecorder.start(). (2) The recorder: ICamera.unlock() and ICamera.disconnect(). (3) The recorder: ICameraRecordingProxy.startRecording(). (4) The app: ICamera.reconnect(). (5) The app: ICamera.startRecording(). 4. During recording (1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp() (2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame(). 5. Stop recording (1) The app: MediaRecorder.stop() (2) The recorder: ICameraRecordingProxy.stopRecording(). (3) The app: ICamera.stopRecording(). bug:2644213 Change-Id: I15269397defc25cbbcae16abc071c8349c123122
* Added audio_bytes_per_sample() helper functionEric Laurent2011-06-171-1/+1
| | | | Change-Id: Ibfcd75c4c241a53d5f052c25ada091904991048a
* Merge "Allow camera to be disabled via Device Policy Manager"Wu-cheng Li2011-06-161-0/+8
|\
| * Allow camera to be disabled via Device Policy ManagerWu-cheng Li2011-05-301-0/+8
| | | | | | | | | | | | bug:4185309 Change-Id: I8be89d892b8f540fd05913c93f97b92346a0a282
* | audio: update for audio/audio_policy header names/locationsDima Zavin2011-06-134-4/+4
| | | | | | | | | | Change-Id: I36c49352eee57559403cd1597f56a8485a360289 Signed-off-by: Dima Zavin <dima@android.com>
* | CameraService: return stide when dequeueing a bufferIliyan Malchev2011-06-111-2/+4
| | | | | | | | | | Change-Id: I11c7f0b57f7d619cdc392b2d34c538ae898de7ac Signed-off-by: Iliyan Malchev <malchev@google.com>