summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | frameworks/base: updates for camera HAL memory managementIliyan Malchev2011-06-071-18/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- when the camera HAL allocates memory -- it requests is as N buffers by S bytes each -- it may specify a file descriptor to get mmapped; if -1, then we use ashmem -- when issuing data and data-timestamp callbacks, the camera HAL specifies a buffer index -- range checking is performed on the buffer indices -- memory requested by a camera HAL is not incStrong'ed, and needs to be expliciftly released by the camera HAL (by calling the release method on the camera_memory_t handle) Change-Id: I0f09603aa786c238590e7288388ab673787e6032 Signed-off-by: Iliyan Malchev <malchev@google.com>
* | Remove dead code related to gettidGlenn Kasten2011-06-032-14/+0
| | | | | | | | | | | | The gettid system call is always available now. Change-Id: Ib78b41781eda182dc8605daf456bbea7ff7c2dc0
* | Use channel mask instead of channel count for track creationJean-Michel Trivi2011-06-014-79/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Record and playback objects (resp AudioRecord and AudioTrack) are created using a channel mask, but this information is lost in the mixer because only the channel count is known to AudioFlinger. A channel count can always be derived from a channel mask. The change consists in: - disambiguiting variable names for channel masks and counts - passing the mask information from the client to AudioFlinger and the mixer. - when using the DIRECT ouput, only verifying the format of the track is compatible with the output's for PCM. Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
* | Removed interface to load audio effects librariesEric Laurent2011-05-272-26/+0
| | | | | | | | | | | | | | Removed unused functions allowing dynamic loading of audio effects libraries from effects factory API. Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
* | New effect library APIEric Laurent2011-05-272-79/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved and renamed media/EffectApi.h to hardware/audio_effect.h Modified the effect library API to expose a library info structure containing an interface functions table. Also removed enums for audio channels, audio format and devices from effect API and use values from system/audio.h instead. Modified effects factory to support new library interface format and load libraries and efffects listed in audio_effects.conf file. The file audio_effects.conf is first loaded from /vendor/etc and then from /system/etc/audio_effects.conf if not found. Modified existing effect libraries to implement the new library interface. Change-Id: Ie52351e071b6d352fa2fbc06c3846686f8c45df9
* | Merge "HAVE_ANDROID_OS AUDIOFLINGER_SECURITY_ENABLED dead"Glenn Kasten2011-05-231-20/+0
|\ \ | |/ |/|
| * HAVE_ANDROID_OS AUDIOFLINGER_SECURITY_ENABLED deadGlenn Kasten2011-05-051-20/+0
| | | | | | | | | | | | Remove dead code from the days when Android ran in emulator. Change-Id: Ibadbbde0538239ad9b2811a3a2e8f8a6d3b6389c
* | Merge "Fix audio effect framework issues"Eric Laurent2011-05-132-28/+55
|\ \
| * | Fix audio effect framework issuesEric Laurent2011-05-132-28/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two issues in audio effect framework reported by partners. 1 - Fixed duplicated audio buffer sent to effect process function when pausing a track. Modified Effectchain::process_l() function to clear the effect chain input buffer before calling the effect process functions when no track is active on the session. Previous code was clearing the buffer after calling the process functions and when transitioning from active to inactive, the last processed buffer was passed again once to effect process function before being cleared. 2 - Fixed potential mutex cross deadlock when disconnecting an effect while playback is active. This is because EffectChain::process_l() was calling PlaybackThread::hasAudioSession() thus creating an inversion in the mutex lock order (EffectChain mutex locked before ThreadBase mutex). The fix consists in removing the call to hasAudioSession() from process_l() and requires each effect chain to keep count of the number of audio tracks attached to it (previously only the active tracks were accounted for). Change-Id: Iee4246694ea8c7a66c012120c629d72dd38f9c35
* | | update for new audio.h header locationDima Zavin2011-05-124-4/+4
|/ / | | | | | | | | Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876 Signed-off-by: Dima Zavin <dima@android.com>
* | frameworks/base: android_native_buffer_t -> ANativeWindowBufferIliyan Malchev2011-05-031-7/+7
| | | | | | | | | | Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417 Signed-off-by: Iliyan Malchev <malchev@google.com>
* | frameworks/base: switch CameraService to a HAL moduleIliyan Malchev2011-05-034-67/+675
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes CameraService to load a camera HAL module, instead of linking directly against a library that implements the CameraHardwareInterface class. CameraHardwareInterface no longer defines the API to the camera HAL. Instead, this is now in HAL header hardware/camera.h. We keep CamerHardwareInterface as a class local to CameraService, which wraps around the new HAL calls. In the future, we may remove this class entirely and have CameraService call the HAL methods directly. Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641 Signed-off-by: Iliyan Malchev <malchev@google.com>
* | frameworks/base: include system/core header camera.h in Camera.hIliyan Malchev2011-05-032-13/+13
|/ | | | | | | | | | | | We define struct CameraInfo in this camera/Camera.h, even though an identical struct camera_info is defined in hardware/camera.h (but not in hardware/camera_defs.h). We may not export struct definitions from the HAL into headers which may find their way into the NDK. This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx. Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8 Signed-off-by: Iliyan Malchev <malchev@google.com>
* audioflinger: don't do work in constructor, instead do it in onFirstRefDima Zavin2011-04-272-2/+15
| | | | | Change-Id: I22d9e01821816c3beb52b014330386c7fd2f0411 Signed-off-by: Dima Zavin <dima@android.com>
* audioflinger: enumerate all the possible audio interfacesDima Zavin2011-04-272-129/+230
| | | | | | | | Keep track of the primary interface that handles the master volume, etc. Change-Id: Ib0701fccff8d8783a99035a241ab7c8ec75c00ac Signed-off-by: Dima Zavin <dima@android.com>
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-276-511/+628
| | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* audioflinger: move legacy audio hw/policy out to libhardware_legacyDima Zavin2011-04-2711-4813/+0
| | | | | Change-Id: I4adcec73d3c08bcbe15bb19e1ba2ff18b195af45 Signed-off-by: Dima Zavin <dima@android.com>
* am 48dca4de: am 969357e3: am 223995dc: Fix issue 4335692: HDMI media volumeEric Laurent2011-04-261-0/+7
|\ | | | | | | | | * commit '48dca4de70890d324b5830a58bb9fa273164151a': Fix issue 4335692: HDMI media volume
| * am 969357e3: am 223995dc: Fix issue 4335692: HDMI media volumeEric Laurent2011-04-261-0/+7
| |\ | | | | | | | | | | | | * commit '969357e31c93e168e7a4cb3b41c33a6ec26f4a26': Fix issue 4335692: HDMI media volume
| | * Fix issue 4335692: HDMI media volumeEric Laurent2011-04-251-0/+7
| | | | | | | | | | | | | | | | | | Forced music stream volume to max when not muted and output device is HDMI. Change-Id: Ibd287cea8ae1d3f36fea6651a113bd5cf2dbad13
* | | am 07c25b65: am 4430670f: am ca7ad44a: Merge "audioflinger: Enable ARMv5TE ↵Brad Fitzpatrick2011-04-111-2/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | optimized resampler" * commit '07c25b651216daac884bd503c02b788418165b50': audioflinger: Enable ARMv5TE optimized resampler
| * | am 4430670f: am ca7ad44a: Merge "audioflinger: Enable ARMv5TE optimized ↵Brad Fitzpatrick2011-04-111-2/+6
| |\ \ | | |/ | |/| | | | | | | | | | | | | resampler" * commit '4430670f48f75661293371dab8db55865f5f56e0': audioflinger: Enable ARMv5TE optimized resampler
| | * audioflinger: Enable ARMv5TE optimized resamplerJim Huang2011-04-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the optimized asm option is only enabled when __ARM_ARCH_5E__ is defined, which is assigned in armv5te.mk rather than armv7-a series targets. This patch checks the ARM CPU feature about half-word multiply instructions to enable ARMv5TE resampler optimization routines properly. Change-Id: I4c5a5d8c932416f23bedb0b389db958349f21ea4
* | | Merge "Miscellaneous code cleanup in audio framework"Glenn Kasten2011-04-062-5/+6
|\ \ \
| * | | Miscellaneous code cleanup in audio frameworkGlenn Kasten2011-04-062-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Move declaration of kClassPathName to top of file so it can be used in more than one place, instead of "android/media/AudioSystem". - Make private methods static. - Add comment to stream_type, audio_mode, force_use types that they must match values in AudioSystem.java. - Add comment about unused types mp3_sub_format and vorbis_sub_format. - Fix typos. - Use @ in javadoc comments. - Delete dead APIs setMode, getMode, setRouting, getRouting in AudioSystem.java (they are all hidden, deprecated, and unused by rest of framework) - Delete unused private log method. - Fix pathname for android_media_AudioSystem.cpp. - Improve code formatting for space after == and !=. - Add logging of delta for changing audio policy manager ref count. Change-Id: I18037c7beb8ab76d1fda08c11e589f6e591d36e1
* | | | Merge "remove more unused references to ISurface"Mathias Agopian2011-04-062-17/+3
|\ \ \ \
| * | | | remove more unused references to ISurfaceMathias Agopian2011-04-052-17/+3
| |/ / / | | | | | | | | | | | | Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
* | | | New fix for issue 4111672: control block flagsEric Laurent2011-04-051-24/+16
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first fix (commit 913af0b4) is problematic because it makes threads in mediaserver process block on the cblk mutex. This is not permitted as it can cause audio to skip or worse have a malicious application prevent all audio playback by keeping the mutex locked. The fix consists in using atomic operations when modifying the control block flags. Also fixed audio_track_cblk_t::framesReady() so that it doesn't block when called from AudioFlinger (only applies when a loop is active). Change-Id: Ibf0abb562ced3e9f64118afdd5036854bb959428
* | | frameworks/base: some camera-interface cleanupIliyan Malchev2011-03-282-21/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct image_rect_struct are no longer used (instead, the necessary information is passed through ANativeWindow.) Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb Signed-off-by: Iliyan Malchev <malchev@google.com>
* | | merge libsurfaceflinger_client into libguiMathias Agopian2011-03-252-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is the first step in unifying surfacetexture and surface. for this reason the header files were not moved, as most of them will eventually go away. NOTE: currently we keep libsurfaceflinger_client.so as an empty library to workaround prebuilt binaries wrongly linking against it. Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
* | | Merge "Fix issue 4111672: AudioTrack control block flags"Eric Laurent2011-03-181-9/+14
|\ \ \ | |/ / |/| |
| * | Fix issue 4111672: AudioTrack control block flagsEric Laurent2011-03-181-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that all read/modify/write operations on the AudioTrack and AudioRecord control block flags field are protected by the control block's mutex. Also fix potential infinite loop in AudioTrack::write() if the written size is not a multiple of frame size. Change-Id: Ib3d557eb45dcc3abeb32c9aa56058e2873afee27
* | | Fix missing AOSP copyright headers for more filesJames Dong2011-03-172-0/+32
|/ / | | | | | | | | | | | | | | | | | | o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp because these two files were moved from other places to the current location, and were actually created in 2010. bug - 4119349 Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
* | Improvement for issue 3489986: BT SCO volumeEric Laurent2011-03-151-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This change makes sure that the VOICE_CALL stream volume tracks the BLUETOOTH_SCO stream volume when SCO audio is enabled. The down link audio volume now reflects what is being displayed when pressing volume hard keys on the device while in a video chat with a BT SCO headset. Volume settings on the headset and the device are still independent as we do not support handsfree profile yet. Change-Id: Ie0d2714730ea359b9318b9cbe6f0b2557ef0f976
* | Merge "- To track the usage of all audio output devices - To track the ↵Gloria Wang2011-03-021-0/+50
|\ \ | | | | | | | | | currently used audio device - The devices are separated as speaker and other audio devices - Provide the collected data to battery application through pullBatteryData()"
| * | - To track the usage of all audio output devicesGloria Wang2011-03-021-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | - To track the currently used audio device - The devices are separated as speaker and other audio devices - Provide the collected data to battery application through pullBatteryData() Change-Id: I374c755266b5ac6b1c6c630400f4daf901ea8acc
* | | Merge "Fix issue 3388775."Eric Laurent2011-03-021-6/+6
|\ \ \ | |/ / |/| |
| * | Fix issue 3388775.Eric Laurent2011-03-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not select A2DP output for media strategy when it is suspended because BT SCO is active. Media audio will be routed to speakers or SCO HS (depending on phone state and activity on stream VOICE_CALL) which is less confusing than not hearing anything while music progress bar is moving. Change-Id: Iff8cc1ea9bf9bde0b33035c4d91398db0934b836
* | | Merge "Fix issue 3479042."Eric Laurent2011-03-015-1/+28
|\ \ \ | |/ / |/| |
| * | Fix issue 3479042.Eric Laurent2011-02-285-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when an AudioRecord using the resampler is restarted, the resampler state is not reset (as there is no reset function in the resampler). The consequence is that the first time the record thread loop runs, it calls the resampler which consumes the remaining data in the input buffer and when this buffer is released the input index is incremented over the limit. The fix consists in implementing a reset function in the resampler. A similar problem was also present for playback but unoticed because the track buffer is always drained by the mixer when a track stops. The only problem for playback was that the initial phase fraction was wrong when restarting a track after stop (it was correct after a pause). Change-Id: Ifc2585d685f4402d29f4afc63f6efd1d69265de3