summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fix volume and effect enable delay on offloaded tracksEric Laurent2013-09-308-6/+63
| | | | | | | | | | | | | Volume: add a method to wake up the mediaserver playback thread when a volume command is received on an offloaded track. Effects: call effect chain process on offloaded playback threads asynchronously from writes to allow effect state updates while waiting for async write callback. Bug: 10796540. Change-Id: Id2747ae88783575d1d7ffd6fc86fbd054ab2c739
* fix oflload effect proxy commmand handlingEric Laurent2013-09-272-46/+54
| | | | | | | | | Implement a more generic command handling in offload effect proxy. All commands are sent to both sub effects but only the reply from the active one is returned to the caller. Bug: 8174034. Change-Id: I28aa0f0d806e846332bc29801ee40d34e4ea0c43
* fix command handling in effect offload proxyEric Laurent2013-09-271-11/+48
| | | | | | | | | | Fix some issues in effect proxy related to handling of effect commands to offloaded and non offloaded effects. Also fixed a bug on capture index in software Visualizer effect. Bug: 8174034. Change-Id: I119458fea597cc3acbc0ef9ec315f67aa211cbd9
* Effect Offload Proxy for effects offloadjpadmana2013-09-274-1/+408
| | | | | | | | | | | | Effect Proxy abstracts the sub effects to the upper layers. It has the following functionalities: - creation and release of sub effects - routing the effect commands and process to the appropriate sub effect Bug: 8174034. Change-Id: Iec34b61104f0bbec4ef67c62f0710a5536dc325b Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
* Effects Factory changes for effects offloadjpadmana2013-09-274-2/+298
| | | | | | | | | | | | | | | | | | | | | | audio_effects.conf - commented changes to illustrate the addition of Proxy and sub effects to the conf file Added an effectFactoryApi - EffectGetSubEffects for querying the sub effect descriptors from the factory. This api is used by the Proxy to get the sub effects Added functions and data structures in factory code for loading the sub effects gSubEffectList - has the Proxies and their corresponding sub effects - addSubEffect() - reads a sub effect node and adds to the gSubEffectList - findSubEffect() - searches through the gSubEffectList to find a SubEffect Bug: 8174034. Change-Id: Id7f6aa67c41db370d32beaf43a979ba4ac925928 Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
* Revert "Effects Factory changes for effects offload"Eric Laurent2013-09-274-298/+2
| | | | | | This reverts commit 284c17e73bbff51cb5b1adcee98386d47733757a. Change-Id: I31db21e1ad4758b21356bfe4c4c64f15b2da8737
* Revert "Effect Offload Proxy for effects offload"Eric Laurent2013-09-274-453/+1
| | | | | | This reverts commit 60c60df7db278d2fa5c90b0fa14f99a61d50272b. Change-Id: Iafba9e02a9f3bfde6248d802e96c4e649686a87d
* Merge "fix playback position after switching to offload" into klp-devEric Laurent2013-09-272-13/+28
|\
| * fix playback position after switching to offloadEric Laurent2013-09-272-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After switching from offloaded track to PCM track while paused (e.g. when connecting A2DP), playback restarts from the beginning of the song when resuming. Save current position before recreating an AudioPlayer in AwesomePlayer::play_l() and seek to the saved position before starting playback. Also fix a problem where the position is not reported properly by AudioPlayer if a seek is pending and queried just after start and before the first buffer is read from the MediaSource. Bug: 8174034. Change-Id: I254e65418ff903a9bf2e2111b89a00e2e54876c5
* | Merge "LoudnessEnhancer compatible with stereo imaging" into klp-devJean-Michel Trivi2013-09-274-26/+56
|\ \
| * | LoudnessEnhancer compatible with stereo imagingJean-Michel Trivi2013-09-264-26/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use a single compressor for both channels. Envelope of signal is determined by looking at both channels. Bug 8413913 Change-Id: Ia9b6f34923d2977c60a3352500b858dfa1fab33c
* | | Merge "Don't call audio effect process on offloaded playback threads" into ↵Jean-Michel Trivi2013-09-271-3/+4
|\ \ \ | |/ / | | / | |/ |/| klp-dev
| * Don't call audio effect process on offloaded playback threadsJean-Michel Trivi2013-09-261-3/+4
| | | | | | | | | | | | | | | | | | An audio effect process command is not meant to be called for playback threads belonging to offloaded playback. Bug 10933817 Change-Id: Idc7b6a0224791bbf8d61648474d3c288617c498f
* | Merge "audioflinger: fix crash when starting offload thread" into klp-devEric Laurent2013-09-262-13/+13
|\ \
| * | audioflinger: fix crash when starting offload threadEric Laurent2013-09-262-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a sp to parent thread to AsyncCallbackThread() constructor causes a strong reference to be acquired on the OffloadThread inside its constructor which causes an early launch of the thread loop with unpredictable consequences. Pass a wp to parent thread instead. Also move the creation of the AsyncCallbackThread to readOutputParameters() where mUseAsyncWrite is initialized which makes more sense. Also change the type of AsyncCallbackThread parent thread to PlaybackThread instead of OffloadThread to allow a broder use of non blocking write which in theory is not limited to audio offload use case. Bug: 8174034. Change-Id: I4b093b022030cd4f5eb8b8e477333e91098a6549
* | | Camera2 API: Hack: Always use async mode with GLConsumerEino-Ville Talvala2013-09-261-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | Until a cleaner solution is implemented, force buffer queues to consumers that set USAGE_HW_TEXTURE usage to be asynchronous. Bug: 10949105 Change-Id: I69e6b02b773831396767c282ce8c5936c5d41f03
* | | Merge "Camera: Implement getCameraCharacteristics" into klp-devZhijun He2013-09-254-0/+80
|\ \ \ | |/ / |/| |
| * | Camera: Implement getCameraCharacteristicsZhijun He2013-09-254-0/+80
| |/ | | | | | | | | | | Bug: 10904541 Bug: 10360518 Change-Id: Ie9ca6b3b0b5f2fe529e6b0decc193096e770a017
* | Merge "fix deadlock in audioflinger::createEffect()" into klp-devEric Laurent2013-09-252-21/+22
|\ \
| * | fix deadlock in audioflinger::createEffect()Eric Laurent2013-09-252-21/+22
| |/ | | | | | | | | | | | | | | | | | | commit 5baf2af5 introduced a regression by calling getOutputForEffect() with AudioFLinger main mutex locked. The locking order must always be AudioPolicyService mutex then AudioFlinger then ThreadBase mutex. Bug: 10916796. Change-Id: Ide34a2d84dbb06dbb35abd0640d91b01b0ac4d40
* | Merge "Camera2/3: Support new PASSIVE_UNFOCUSED AF state" into klp-devEino-Ville Talvala2013-09-251-0/+3
|\ \
| * | Camera2/3: Support new PASSIVE_UNFOCUSED AF stateEino-Ville Talvala2013-09-201-0/+3
| | | | | | | | | | | | | | | Bug: 10860639 Change-Id: I39be64abaf79b49b2d1f74e1c2ab2adf718ae701
* | | Merge "Send kWhatConnected in onTimeUpdate() before first access unit" into ↵Chong Zhang2013-09-251-17/+23
|\ \ \ | |_|/ |/| | | | | klp-dev
| * | Send kWhatConnected in onTimeUpdate() before first access unitChong Zhang2013-09-241-17/+23
| | | | | | | | | | | | | | | Bug: 10642588 Change-Id: If2b4fbbf250d5307e304f31c7aa4ac480e279484
* | | Merge "Fix log typos in Visualizer effect" into klp-devJean-Michel Trivi2013-09-241-9/+7
|\ \ \
| * | | Fix log typos in Visualizer effectJean-Michel Trivi2013-09-241-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix errors in logs for Visualizer. Set loop counters on 32 bits Bug 8413913 Change-Id: Iad2140d003d15d45be46826a5e89baff14fe9e77
* | | | fix oflload effect proxy commmand handlingEric Laurent2013-09-242-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a more generic command handling in offload effect proxy. All commands are sent to both sub effects but only the reply from the active one is returned to the caller. Bug: 8174034. Change-Id: Ia45f9933b3bf338257ec70b37732fa1578d26b9f
* | | | Merge "soundpool: allocate shared memory heap by client" into klp-devEric Laurent2013-09-249-83/+162
|\ \ \ \
| * | | | soundpool: allocate shared memory heap by clientEric Laurent2013-09-249-83/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current SoundPool implementation allocates the shared memory heap containing decoded PCM samples in mediaserver process. When mediaserver process crashes, the shared memory heaps allocated by AudioCache cannot be mapped anymore in the new instance of mediaserver. This causes a silent failure to end playback of new sounds because AudioFlinger believes the new AudioTracks are opened in streaming mode and not static mode: it sees a NULL shared memory pointer when the track is created. The fix consists in allocating the memory heap in the client process. Thus the heap is not lost when mediaserver restarts. The global memory usage is the same as this is shared memory. Also added a way to detect that a shared memory is passed when the track is created but cannot be mapped on mediaserver side. Also fix a crash in SoundPool when ALOGV is enabled. Bug: 10894793. Change-Id: Ice6c66ec3b2a409d75dc903a508b6c6fbfb2e8a7
* | | | | Merge "Camera2/3: Properly disambiguate FPS range vs. single FPS setting" ↵Eino-Ville Talvala2013-09-242-5/+19
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | into klp-dev
| * | | | Camera2/3: Properly disambiguate FPS range vs. single FPS settingEino-Ville Talvala2013-09-202-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The camera1 API allows for either setPreviewFrameRate or setPreviewFPSRange, so both values may or may not change in a single setParameter call. The disambiguation of which setting has been changed since the last setParameter() call was not fully correct, so a sequence of changes that only changed setPreviewFPSRange or didn't change either could be interpreted as as a change to setPreviewFrameRate. Bug: 10842868 Change-Id: I40baeced80a58f09f8a1742ece8dd5e141e9c1e3
* | | | | audioflinger: fix ro.audio.silent in offload againEric Laurent2013-09-231-0/+2
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1abbdb4 was not working 100% of the times because it is possible that the offload thread loop never sleeps after being created in which case the property is never read. The loop now reads the property once when starting. Bug: 10899309. Change-Id: I2e2ca332f2d7086e59d65f6010378c4d9618ba9e
* | | | Merge "Add support for level measurements in Visualizer" into klp-devJean-Michel Trivi2013-09-233-17/+214
|\ \ \ \
| * | | | Add support for level measurements in VisualizerJean-Michel Trivi2013-09-233-17/+214
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New commands to set a measurement mode and perform peak + RMS measurements. Bug 8413913 Change-Id: Ib25254065c79d365ebb34f9dc9caa0490e2d300d
* | | | Merge "AudioTrack: fix music resume" into klp-devEric Laurent2013-09-232-4/+6
|\ \ \ \
| * | | | AudioTrack: fix music resumeEric Laurent2013-09-232-4/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by commit 5a6cd22 in AudioTrack resume: the callback thread was not signaled if paused internaly. Bug: 10895013. Change-Id: Ic356b115132d6fccbcee2d9bb855e92671dc20c5
* | | | fix incoming call audio start time.Eric Laurent2013-09-231-9/+10
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit cec4abb fixing issue 6720482 had a flaw that would insert commmands at the wrong position in the audio policy service command thread queue causing other commands to be delayed more than expected. A change in track stop timing introduced by commit bfb1b83 made this issue visible when answering a call. Bug: 10860012. Change-Id: Iec769112f14e13d13b64628b808e43663e33771c
* | | Merge "Revert "Workaround slow AudioTrack destruction"" into klp-devGlenn Kasten2013-09-201-23/+0
|\ \ \
| * | | Revert "Workaround slow AudioTrack destruction"Glenn Kasten2013-09-201-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8bbbd7da02fac3de40139af19f7cf7a7cc3cc824. Change-Id: I269a6c445cbce33451b6a9e74223e36e6abbdbe0
* | | | Merge "Fix slow AudioTrack and AudioRecord destruction" into klp-devGlenn Kasten2013-09-204-56/+71
|\ \ \ \
| * | | | Fix slow AudioTrack and AudioRecord destructionGlenn Kasten2013-09-204-56/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two causes for the slowness: When thread was paused, it used nanosleep and sleep. These usually run to completion (except for POSIX signal, which we avoid because it is low-level). Instead, replace the nanosleep and sleep by condition timed wait, as that can be made to return early by a condition signal. Another advantage of condition timed wait is that a condition wait was already being used at top of thread loop, so it is a simpler change. The AudioRecord destructor was missing a proxy interrupt that was correct in AudioTrack. This proxy interrupt is needed in case another thread is blocked in proxy obtainBuffer. Does not address the 1 second polling for NS_WHENEVER. Bug: 10822765 Change-Id: Id665994551e87e4d7da9c7b015f424fd7a0b5560
* | | | | Merge "Camera2/3: For still captures, use widest FPS range available." into ↵Eino-Ville Talvala2013-09-203-2/+43
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| | klp-dev
| * | | Camera2/3: For still captures, use widest FPS range available.Eino-Ville Talvala2013-09-203-2/+43
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the application-selected preview FPS range for still captures, select the widest FPS range advertised by the device and use it for still captures instead, to give the HAL the widest range of exposure values to choose from possible. Bug: 10842868 Change-Id: I0e24f5eb713a4f8df116cd5979a84390cc0974d7
* | | Merge "audioflinger: implement getTimestamp() for offloaded tracks" into klp-devEric Laurent2013-09-203-12/+34
|\ \ \ | |/ / |/| |
| * | audioflinger: implement getTimestamp() for offloaded tracksEric Laurent2013-09-203-12/+34
| | | | | | | | | | | | | | | Bug: 9587132. Change-Id: Ie9d5f4cca96306d08bc9a2dbd6edd8953096702d
* | | Merge "audioflinger: fix lost offload thread resume event" into klp-devEric Laurent2013-09-203-30/+37
|\ \ \
| * | | audioflinger: fix lost offload thread resume eventEric Laurent2013-09-193-30/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible that a resume request signaled by addTrack_l() while waiting for an async write callback is lost. This is because mSignalPending was not set and waitingAsyncCallback_l() would pause the thread loop before executing prepareTracks_l(). The fix consists in using signal_l() method to wake the thread loop o that mSignalPending is set. Also make sure that sleepTime is reset to 0 when resuming to make sure that we write any remaining bytes to the HAL. Bug: 10810347. Change-Id: If9a3b22cc3b9e6eb384a56c48c40e6258d0896ad
* | | Merge "Rotate fallback size" into klp-devAndy McFadden2013-09-191-5/+9
|\ \ \
| * | | Rotate fallback sizeAndy McFadden2013-09-191-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If configuring the encoder for display-size recording fails, we drop back to 720p. This was done a bit too literally, and didn't look good in portrait mode. Rotate the fallback size as needed. Bug 10826876 Change-Id: Id3130471fc1467afa8bf91d75c9d4a49245253c3
* | | | Merge "camera2: Tell all streams to ignore global device UI rotation" into ↵Igor Murashkin2013-09-192-0/+83
|\ \ \ \ | | | | | | | | | | | | | | | klp-dev