summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Use struct assignment instead of explicit memcpyGlenn Kasten2012-07-172-6/+6
| | | | | | for POD structs effect_descriptor_t and effect_config_t Change-Id: Ib2fc47f85fb65ed91b0abb1f87217c49b5eb571d
* Run audio at priorities 2 and 3 above kernel 1Glenn Kasten2012-07-161-6/+10
| | | | | | | | | | | Also run the watchdog at same priority as the fast mixer. requestPriority() originally used only the caller's pid to decide which cgroup to assign, but in the future it might look at the priority also. So it's safer to use same priority as the fast mixer to be sure we run in the same cgroup. Bug: 6461925 Change-Id: Ia59c93e4b22dacbb6746bfa6ad491be7b72f2b8d
* Don't call virtual methods in destructorGlenn Kasten2012-07-162-6/+25
| | | | | | The result of calling virtual methods from a destructor is undefined. Change-Id: I0fd4a19626e5ae564a60b753315b5f6c4b8d1f2c
* Use atomic ops for thread suspend countGlenn Kasten2012-07-132-7/+24
| | | | | | | There was a theoretical but unlikely race if two binder threads executed suspend() or restore() concurrently. Also added comments. Change-Id: I0908acc810b83bdd66455b27ca3429de1662a2cd
* Camera2: Add recording supportEino-Ville Talvala2012-07-134-65/+487
| | | | | | | | | | - Support startRecording/stopRecording - Support lock/unlock/connect - Some rearrangement of class definitions for clarity/consistency Bug: 6243944 Change-Id: I00c600a798572d2f69bb3f2bab3d79e4bd9a91e5
* Add tid parameter to IAudioFlinger::openRecordGlenn Kasten2012-07-122-7/+10
| | | | | | Not yet implemented Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
* Simplify AudioRecord::getInputFramesLost()Glenn Kasten2012-07-121-4/+0
| | | | | | This also fixes a benign race in reading mActive without a lock. Change-Id: I19e953d4f275e5c266ca1ca3fece7b6c02ad1707
* Remove dead codeGlenn Kasten2012-07-112-9/+0
| | | | Change-Id: If22a6c4e572b0734eba0c5a7ce29a2c61c581e5d
* Fix check for invalid channel countGlenn Kasten2012-07-111-2/+2
| | | | Change-Id: Id9e3dce0e3d5971786212d3f70e17a17e32ce92b
* Record overflow cleanupGlenn Kasten2012-07-102-4/+5
| | | | | | Add comments and rename one method for clarity Change-Id: I04a9147e46e88a072256c0211b112d52202419e2
* Use audio_channel_mask_t more placesGlenn Kasten2012-07-105-45/+41
| | | | | | | | | | 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
* Merge "audio policy: fix delayed command insertion"Eric Laurent2012-07-101-17/+14
|\
| * audio policy: fix delayed command insertionEric Laurent2012-07-091-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When inserting a delayed command in the audio policy service command thread queue, later similar commands are filtered out. In case of volume commands and delayed unmuting, this can cause a problem where a new volume command can cause the timing of a delayed unmuting command to not be honored. This change makes that a volume command gets the time stamp of any delayed command it replaces. Bug 6720482. Change-Id: I216f85ac0ea46e4a046d3483e9e9b7ffe6c34a08
* | Add comments on use of volatile for track countGlenn Kasten2012-07-101-4/+7
| | | | | | | | | | | | and add acquire load at the read Change-Id: Ib41a58f5b1f6af87a8bd63d3f77d2ec0e48cb479
* | Remove 'volatile' from mMute and add commentsGlenn Kasten2012-07-101-2/+6
| | | | | | | | Change-Id: I386ba27b2305a397aba70331c6bf0d35ea727cf6
* | Whitespace and indentationGlenn Kasten2012-07-102-14/+11
| | | | | | | | Change-Id: I424052b4ff9218147a5cfc8e6dcd67fe8105d229
* | Move constant initializations from onFirstRef() to constructorGlenn Kasten2012-07-101-4/+2
| | | | | | | | Change-Id: I57f55b0bd1edee105c58c3a055f95f1e4a2c9646
* | AudioFlinger::getBuffer() always returns non-NULLGlenn Kasten2012-07-092-4/+7
| | | | | | | | Change-Id: I543d3db507597cacbfdad5d9ea71732137fe54fb
* | Fix buildGlenn Kasten2012-07-091-4/+4
| | | | | | | | | | | | Revert after system/core audio_devices_t is submitted Change-Id: I5a8ee1a7b711e834501e927f41c62efa6a6600b6
* | Only write to mDevice onceGlenn Kasten2012-07-092-11/+29
| | | | | | | | | | | | | | This fixes a bug where readers might see intermediate values. Also add comments about how mStandby and mDevice are used. Change-Id: Idc84e56c21381a45137a2ca5ff9c57d437201869
* | Remove debug code HAVE_REQUEST_PRIORITY and SOAKERGlenn Kasten2012-07-034-75/+1
|/ | | | Change-Id: I73a2afe72d8acb53e57e6b4e6fb5133e22b7875a
* audioflinger: fix effect disconnect deadlockEric Laurent2012-07-032-60/+97
| | | | | | | | | | | | | | | | Fix possible deadlock when several EffectHandles on the same EffectModule are destroyed simultaneously: A wp on an EffectHandle should not be promoted to a local sp with ThreadBase mutex held as the EffectHandle destructor can be called when the sp gets out of scope which will call ThreadBase::disconnectEffect() and try to acquire the mutex. Use raw pointers instead of weak pointers for the list of handles on an EffectModule. Bug 6679606. Change-Id: Ice8b602fb03a7d363c44ce3dced8a53540d96270
* Use audio_channel_mask_t more consistentlyGlenn Kasten2012-07-032-5/+7
| | | | | | | | | | | | | | | In IAudioFlinger::createTrack() and IAudioFlinger::openRecord(), declare input parameter to use correct type audio_channel_mask_t. In IAudioFlinger::getInputBufferSize(), input parameter is now channel mask instead of channel count. Remove unused IAudioFlinger::channelCount(audio_io_handle_t). In AudioRecord::getMinFrameCount() and AudioSystem::getInputBufferSize(), input parameter is channel mask instead of channel count. Change-Id: Ib2f1c29bea70f016b3cfce83942ba292190ac965
* Remove longStandbyExitGlenn Kasten2012-07-032-12/+2
| | | | | | It was never set (the assignment was within an "if" that was never true). Change-Id: I01cc68e9df6b190eece621b2aa9858b4361880ce
* Fix uninitialized field EffectModule::mPinnedGlenn Kasten2012-07-032-7/+11
| | | | | | | Also mark EffectModule::mId and EffectModule::mSessionId const, and document the initialization of other fields in EffectModule. Change-Id: Ic1ca008e75e9b5924743ffc35bef80057f3a0669
* Compare sp<> to 0 and raw pointers to NULLGlenn Kasten2012-07-021-8/+8
| | | | Change-Id: I50ff8a010d349d1d7e3dffa04a6331814c2128b0
* am dbbd5b86: am 109347d4: audioflinger: fix regression in attachAuxEffect().Eric Laurent2012-07-021-4/+1
|\ | | | | | | | | * commit 'dbbd5b860a3a26bea3376410f75f27530d9cd10b': audioflinger: fix regression in attachAuxEffect().
| * audioflinger: fix regression in attachAuxEffect().Eric Laurent2012-07-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | Commit 717e1286 introduced a regression in PlaybackThread::Track::attachAuxEffect() when called with an effect ID of 0 to detach the auxiliary effect. It is normal in this case that AudioFlinger::getEffectThread_l() returns 0. Bug 6768757. Change-Id: I7430bd1aad2f68da38f7c3e4794e7ad657bfc6be
* | am 651f9e7c: am 717e1286: audioflinger: fix auxiliary effect attachmentEric Laurent2012-07-012-0/+65
|\ \ | |/ | | | | | | * commit '651f9e7c972b58a49066081187161268bcf9237a': audioflinger: fix auxiliary effect attachment
| * audioflinger: fix auxiliary effect attachmentEric Laurent2012-06-292-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auxiliary effects (Reverb) are global effects and as such follow the default rule which is to attach them to the output thread that handles music streams by default. This causes a problem when several threads are eligible to handle music streams as tracks can be attached to either thread based on criteria unknown when teh effect is created. The fix consists in moving the auxiliary effect if necessary when an AudioTrack is attached to it and this track is not on the same output thread. Bug 6608561. Change-Id: Ib32c3cabc731b2046aba728be1771982999c6069
* | Merge "Remove acoustics from AudioSystem::getInput()"Glenn Kasten2012-06-252-5/+3
|\ \
| * | Remove acoustics from AudioSystem::getInput()Glenn Kasten2012-06-252-5/+3
| | | | | | | | | | | | Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
* | | Merge "audioflinger: fix setStreamOutput()"Eric Laurent2012-06-252-13/+4
|\ \ \ | |/ / |/| |
| * | audioflinger: fix setStreamOutput()Eric Laurent2012-06-202-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AudioFlinger::setStreamOutput() should also work for direct outputs. Also ignore the destination output specified to match the expected behavior which is to invalidate all tracks using the specified stream type so that they can be re created on the correct ouput thread. Do not send STREAM_CONFIG_CHANGED event wich is ignored by AudioSystem anyway since the stream to output cache has been removed. Change-Id: I13d9d47922923b630dd755717875424c16be4637
* | | Update ANativeWindow client code for syncJamie Gennis2012-06-213-21/+10
|/ / | | | | | | | | | | | | This change updates all the uses of ANativeWindow to use the new ANW functions that accept and return Sync HAL fence file descriptors. Change-Id: Id7db42d8d6380f8b440d88476ce9211c6225fb16
* | audio policy: acquire lock for volume functionsEric Laurent2012-06-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Acquire the AudioPolicyService mutex when executing setStreamVolumeIndex() and getStreamVolumeIndex(). These functions have become more complex and iterate on the list of opened outputs and it is safer to acquire the AudioPolicyService mutex to avoid concurrency with other functions. Bug 6626532. Change-Id: Ifdcbbbf13338fd9a59f694d43faa7ade143f94bf
* | am 4862d1ea: am eb15716b: Change definition of warmup periodGlenn Kasten2012-06-181-2/+5
|\ \ | |/ | | | | | | * commit '4862d1eaa6b3b2bad040d01fe090e8616685c12b': Change definition of warmup period
| * Change definition of warmup periodGlenn Kasten2012-06-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, warmup was considered done as soon as any write() took more than 0.5 nominal cycle time. In practice, this was always the first write() that turned on power to the output path, and it didn't accurately account for filling the full kernel buffer queue, or for buffering in the HAL sample rate conversion. Now warmup is considered done when a write() _after_ the first write takes more than 0.5 nominal cycle time. This will throttle the initial pull rate after coming out of standby. When combined with another change to throttle the pull rate for devices with HAL sample rate conversion, it may help reduce some of the notification glitches. The only downside is that it will increase the warmup time a bit. Bug: 6508317, 6650846, 6607056 Change-Id: I39f324c5195578170a55308e9601d3a1b41db3e0
* | am 16f07fb7: am 972af221: FastMixer compensates for SRC jitter in audio HALGlenn Kasten2012-06-181-6/+14
|\ \ | |/ | | | | | | * commit '16f07fb7bb4c284cc0b16f55fe5eabd4a4802590': FastMixer compensates for SRC jitter in audio HAL
| * FastMixer compensates for SRC jitter in audio HALGlenn Kasten2012-06-151-6/+14
| | | | | | | | | | | | | | Force a sleep if audio HAL write() returns too quickly. Bug: 6661275 Change-Id: Ie810f5a087b89fb24dab229a0e500af1dee53571
* | Camera2: Move per-frame verbose logs to separate log enableEino-Ville Talvala2012-06-181-7/+14
| | | | | | | | | | Bug: 6243944 Change-Id: I5850f8ceb2e603aa555cc71328f64d6a928694a0
* | Merge "Camera2: Handle preview orientation changes."Eino-Ville Talvala2012-06-184-3/+101
|\ \
| * | Camera2: Handle preview orientation changes.Eino-Ville Talvala2012-06-154-3/+101
| | | | | | | | | | | | | | | | | | | | | - Process sendCommand(CAMERA_CMD_SET_DISPLAY_ORIENTATION) Bug: 6243944 Change-Id: I92d3bb13312d475703325230487d660a1cb7e0e5
* | | Merge "Camera2: Connect camera parameters to HAL request entries."Eino-Ville Talvala2012-06-182-66/+426
|\ \ \ | |/ /
| * | Camera2: Connect camera parameters to HAL request entries.Eino-Ville Talvala2012-06-152-66/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All fields in Camera.Parameters are mapped to HAL2 entries, and communicated to the HAL. - Preview stream properly updated on parameter changes - Slight code rearrangment for improved clarity Bug: 6243944 Change-Id: I2a1db5c148809a62ba3524fb659dd6065affff8e
* | | Merge "Camera2: Minor parameter restructuring"Eino-Ville Talvala2012-06-152-51/+60
|\ \ \ | |/ /
| * | Camera2: Minor parameter restructuringEino-Ville Talvala2012-06-152-51/+60
| | | | | | | | | | | | | | | | | | | | | Will make it easier to update HAL-level parameters. Bug: 6243944 Change-Id: I3acac3c532de440d46755ce3e1d819ad5ed2e106
* | | am ff0fcb26: am 0a14c4ce: Make CPU frequency statistics optionalGlenn Kasten2012-06-153-4/+24
|\ \ \ | |/ / |/| / | |/ | | * commit 'ff0fcb2628613953f454875006bfb78c3fc087d3': Make CPU frequency statistics optional
| * Make CPU frequency statistics optionalGlenn Kasten2012-06-143-4/+24
| | | | | | | | | | | | | | | | | | | | 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
| * DO NOT MERGE Remove log spam for fast track deniedGlenn Kasten2012-06-141-1/+1
| | | | | | | | | | Bug: 6531054 Change-Id: Iedf58e810a157aae88b5900da27c81054c437058