summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
Commit message (Collapse)AuthorAgeFilesLines
* Add EFFECT_CMD_SET_PARAM parameter checkingAndy Hung2016-08-251-0/+23
| | | | | | Bug: 30204301 Change-Id: Ib9c3ee1c2f23c96f8f7092dd9e146bc453d7a290 (cherry picked from commit e4a1d91501d47931dbae19c47815952378787ab6)
* Check effect command reply size in AudioFlingerAndy Hung2016-06-231-0/+6
| | | | | Bug: 29251553 Change-Id: I1bcc1281f1f0542bb645f6358ce31631f2a8ffbf
* Merge "audioflinger: increase shared memory heap size" into mnc-dr-devEric Laurent2015-10-142-4/+14
|\
| * audioflinger: increase shared memory heap sizeEric Laurent2015-10-142-4/+14
| | | | | | | | | | | | Bug: 21093153. Change-Id: I389af11451b01ce49fdb8957e2f322ba1925a62e (cherry picked from commit da73b6c7474aaa5616f0214e238776f12717f32b)
* | For static obtainBuffer(), do not set mUnreleased if acknowledging flush.Andy Hung2015-10-131-0/+1
|/ | | | | | | static audio tracks use obtainBuffer() to update position in start(). Bug: 22938515 Change-Id: I8ae32f6cce4d122386d2cf8982e158049b04ba9a
* am 4c6e77ff: AudioFlinger: Clear record buffers when starting RecordThreadAndy Hung2015-10-132-2/+7
|\ | | | | | | | | * commit '4c6e77ff8e18a1551320a6b42f6a45e19dcce748': AudioFlinger: Clear record buffers when starting RecordThread
| * AudioFlinger: Clear record buffers when starting RecordThreadAndy Hung2015-10-132-2/+7
| | | | | | | | | | | | Bug: 24211743 Bug: 24267152 Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba
* | CameraService: Use SCHED_FIFO for request queue thread in HFREino-Ville Talvala2015-09-266-232/+3
| | | | | | | | | | | | | | | | | | | | - Move SchedulingPolicyService from audioservice to mediautils - When starting up a high speed stream config, set request queue thread to SCHED_FIFO using SchedulingPolicyService Bug: 24227252 Change-Id: I224b59142bd111caf563779f55cddd62385b9bac
* | Merge "Workaround static fast track start-after-stop issue" into mnc-dr-devAndy Hung2015-09-121-1/+4
|\ \
| * | Workaround static fast track start-after-stop issueAndy Hung2015-09-111-1/+4
| | | | | | | | | | | | | | | | | | | | | Bug: 23291988 Bug: 23614327 Bug: 23924081 Change-Id: Id1a519ed4bb2a6f4cb197da8450f7069b55c0d48
* | | audio flinger: force audio path start from normal mixerEric Laurent2015-09-101-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The audio HAL wakes up and configures the audio path when receiving the first write() in standby state. This causes a certain amount of process to take place in the mixer threads which is problematic for fast mixer running at FIFO priority. We now force a fake write() of 0 bytes from normal mixer to trigger the audio path configuration before starting the fast mixer. Bug: 23791972. Change-Id: I54311b337fda956444846f5d2f53a3263d54e04b
* | Revert "Do not acknowledge flush() on start() for static tracks"Eric Laurent2015-09-091-6/+3
| | | | | | | | | | | | | | This reverts commit cafe86a9cb6625bb1ec6383e16e28e4c9e455f87. Bug: 23924093. Change-Id: I186d1013b06a286eca93c30bb9b3545dc36695ff
* | Do not acknowledge flush() on start() for static tracksAndy Hung2015-08-241-3/+6
|/ | | | | Bug: 22938515 Change-Id: I1de653de169a3fbbaa693da6057897ea57772447
* TimestretchBufferProvider: getNextBuffer should follow APIAndy Hung2015-08-211-23/+26
| | | | | | | If no data, should return 0 frame count and NULL ptr. Bug: 23293002 Change-Id: Ib5364e5bceb15c2dddc4a16e85299b409cf4e137
* AudioFlinger: tell HAL the PCM is non-audioPhil Burk2015-08-041-1/+2
| | | | | | | | | | | Add a bit to tell the HAL that the PCM data is really encoded audio wrapped in a data burst. Otherwise the device may try to play the encoded data directly which will sound like modulated white noise. Bug: 22576112 Change-Id: Ib140da96876e849023858fe2510612310501d1ee Signed-off-by: Phil Burk <philburk@google.com>
* Merge "Fix capture overruns at non-primary sample rate" into mnc-devGlenn Kasten2015-07-243-20/+7
|\
| * Fix capture overruns at non-primary sample rateGlenn Kasten2015-07-223-20/+7
| | | | | | | | | | | | | | | | | | and small buffer size. Also: Pull out the magic number "12 ms" to a named constant. Remove obsolete AudioFlinger::mPrimaryOutputSampleRate. Bug: 22662814 Change-Id: I261f75a222c4505a84aad2493d251bd2dea59f68
* | Fix record memory buffer allocation for legacy upmix/downmixAndy Hung2015-07-221-1/+1
|/ | | | | Bug: 22173057 Change-Id: I8f5056ff5a1252c71a3d3b354440551bcd9fd466
* AudioFlinger: fix repeated underruns for compressed audioPhil Burk2015-07-175-16/+79
| | | | | | | | | | | | | | | | | | | | | | The AudioFlinger kept pausing the audio when playing compressed AC3 or DTS. This caused pause/resume loops that were hard to break out of. The AudioFlinger was thinking that the compressed audio was PCM because the HAL was in PCM mode playing SPDIF data bursts. It also thought that EAC3 was at 192000 Hz instead of 48000 Hz because the data bursts are played at a higher rate. This CL adds more calls to the shim that separates the AudioFlinger. Now the AudioFlinger gets information about the HAL sample rate, channel masks and format from the shim instead of calling the HAL directly. The AudioFlinger now uses a different threshold for detecting underruns when the audio is compressed. Bug: 19938315 Bug: 20891646 Change-Id: Ib16f539346d1c7a273ea4feb3d3afcc3dc60237d Signed-off-by: Phil Burk <philburk@google.com>
* Merge "audioflinger: flush HAL when transitioning to next direct track" into ↵Eric Laurent2015-07-131-9/+12
|\ | | | | | | mnc-dev
| * audioflinger: flush HAL when transitioning to next direct trackEric Laurent2015-07-071-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Send flush command to the audio HAL when transtioning to next track on direct output thread, even if both tracks are in the same audio session. Commit 43b4dcc to fix issue 21145353 did only flush the HAL if the audio session was different for the new track because the logic was copied from the offload thread. Bug: 22019044. Change-Id: I89b217580023ed7449a58e9bf3dc068ce7a84487
* | audio: several fixes in audio routing callbacksEric Laurent2015-07-104-36/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - audio policy: Force device change to ensure new audio patch creation upon first track activity on a given output. Fix function device_distinguishes_on_address() which could mistake some output device with remote submix input device. - audio flinger: Reduce number of binder calls upon new client registration by only sending ioConfigChanged() callbacks to newly registered client. Fix first patch after output thread creation not triggering an ioConfigChanged() callback. -audio system: Force client registration upon routing callback installation to force new ioConfigChanged() callback from audio flinger. Bug: 22381136. Change-Id: Ieb0d9f92f563a40552eb31bc0499c8ac65f78ce4
* | Merge "AudioFlinger: reset frame position on standby" into mnc-devPhil Burk2015-07-084-67/+87
|\ \ | |/ |/|
| * AudioFlinger: reset frame position on standbyPhil Burk2015-07-074-67/+87
| | | | | | | | | | | | | | | | | | | | | | The HAL does not reset the frame position on standby(). But applications expect the frame position to be reset. So we subtract the position at standby from the current position. Bug: 21724210 Bug: 21930805 Change-Id: I0c4520ba1c6c06a580f45f6bafc8cf1d56969f07 Signed-off-by: Phil Burk <philburk@google.com>
* | audio: Do not delete PatchRecord before Peer is stoppedEric Laurent2015-07-061-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | PatchPanel::clearPatchConnections deletes PatchRecord before the peer PatchTrack is stopped. This can cause an access to already free'ed memory leading to a crash in PatchTrack::getNextBuffer. Fix is to delete PatchRecord and PatchTrack only after removing both of them from active tracks list Bug: 22304526. Change-Id: I7003756d3d2dd8912ce5e3b2fc31f5e82f455888
* | audio: add definitions for devices connected over IPEric Laurent2015-07-061-0/+2
|/ | | | | Bug: 22068684. Change-Id: Idde0eaf7121d2e43f32eee3e6b10e99d8cff4912
* reduce number of binder calls from mediaserverEric Laurent2015-06-262-3/+13
| | | | | | | | | | | | | | | Reduce the number of audio port, audio patch and IO config changed binder calls from mediaserver to client processes: - Do not call IO config changed callback if selected device is the same as previously selected one on a given audio flinger playback or capture thread. - Do not call the audio port or audo patch list update callback on a client if this client as no listener registered. Bug: 22045560. Change-Id: If780e105404de79b7cb5c80c27b793ceb6b1c423
* Merge "Using centralized isAudioPlaybackRateValid to validate parameters" ↵Ricardo Garcia2015-06-233-10/+9
|\ | | | | | | into mnc-dev
| * Using centralized isAudioPlaybackRateValid to validate parametersRicardo Garcia2015-06-223-10/+9
| | | | | | | | | | | | | | Centralized validation code bug: 20701446 Change-Id: I9d9941c7639c05b2afe069ff4f858c693c910bfe
* | Merge "Fix FastMixer high bit depth Hal support" into mnc-devAndy Hung2015-06-221-0/+4
|\ \
| * | Fix FastMixer high bit depth Hal supportAndy Hung2015-06-191-0/+4
| | | | | | | | | | | | | | | Bug: 21959591 Change-Id: Ia3351ea5644b36852a1f0dad1314beac97d840e1
* | | Merge "AudioFlinger: reset SPDIF encoder on flush" into mnc-devPhil Burk2015-06-201-1/+2
|\ \ \
| * | | AudioFlinger: reset SPDIF encoder on flushPhil Burk2015-06-191-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | This may prevent corrupt data from reaching the AVR. Bug: 19604395 Change-Id: I3dbdd002326917b9f14dda46a3e5170e1ec799bb Signed-off-by: Phil Burk <philburk@google.com>
* | | Merge "Fix clamp issue with AudioMixer with float input and int16 output" ↵Andy Hung2015-06-191-3/+2
|\ \ \ | |_|/ |/| | | | | into mnc-dev
| * | Fix clamp issue with AudioMixer with float input and int16 outputAndy Hung2015-06-181-3/+2
| |/ | | | | | | | | Bug: 20706338 Change-Id: I7e3ab0da96901870cc57fbe2e79163bc81157465
* | Reduce log messages on AudioFlinger throttleAndy Hung2015-06-182-2/+17
|/ | | | | Bug: 21858740 Change-Id: I8f291b64c1033867bb57ffceaa3b7d94aa998715
* Merge "Fix AudioRecord cleanup if construction fails" into mnc-devAndy Hung2015-06-131-1/+3
|\
| * Fix AudioRecord cleanup if construction failsAndy Hung2015-06-121-1/+3
| | | | | | | | | | Bug: 11671194 Change-Id: Id48350264f8b5ce53bf7ce2b308bf4ba21e59241
* | Merge "AudioFlinger: flush stream when switching tracks" into mnc-devPhil Burk2015-06-112-24/+45
|\ \
| * | AudioFlinger: flush stream when switching tracksPhil Burk2015-06-112-24/+45
| |/ | | | | | | | | | | | | | | | | For direct threads, when recycling a stream, perform a flush so that the frame position is reset. Bug: 21145353 Change-Id: I08611cd64bb249a9659c44f9e4c47e7455f4838f Signed-off-by: Phil Burk <philburk@google.com>
* | Take advantage of audio_channel_in_mask_from_countGlenn Kasten2015-06-091-5/+3
|/ | | | | | Bug: 21375533 Bug: 21721483 Change-Id: I1ccd5d1d68a25f415dc4a62bf7a44d9db12a256b
* Merge "Throttle MixerThread data pull to no more than twice expected rate" ↵Andy Hung2015-06-032-3/+38
|\ | | | | | | into mnc-dev
| * Throttle MixerThread data pull to no more than twice expected rateAndy Hung2015-06-032-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | This helps prevent underruns with NuPlayer and other applications which set up buffers that are close to minimum size or use deep buffers, and rely on a double-buffering sleep strategy to fill. Enabled by default. Disabled by setting af.thread.throttle 0 Bug: 19062223 Bug: 21198655 Change-Id: Ia52b48e0c99588af5db53c43fede2afd775b8899
* | Fix buildGlenn Kasten2015-06-021-0/+1
| | | | | | | | Change-Id: I4d1e396d812b6a22087d35156633451d5c1c36bc
* | Allow capture by root for command-line native testingGlenn Kasten2015-06-021-0/+4
|/ | | | Change-Id: I3cafd70b7770c7e4b578d39a8d570572829f2c59
* Merge "Add more device codes for symbolic display" into mnc-devGlenn Kasten2015-05-291-0/+34
|\
| * Add more device codes for symbolic displayGlenn Kasten2015-05-271-0/+34
| | | | | | | | Change-Id: I08553f0e94d0a0931ccf98ee04f53686b96c8b03
* | Merge "Fix for audio effects in offload path for mono content" into mnc-devRicardo Garcia2015-05-291-1/+9
|\ \
| * | Fix for audio effects in offload path for mono contentRicardo Garcia2015-05-281-1/+9
| |/ | | | | | | | | | | | | | | Effects path is always stereo, and it should be initialized as thus even if the source is mono. Fixed condition check before initialization. bug: 18157592 Change-Id: Idd7241931e4ba6085fd804345128d898c8511e11
* | audio flinger: add suffix to time variables namesEric Laurent2015-05-272-56/+56
| | | | | | | | | | | | | | | | | | | | | | Add suffix to clarify units for the following variables: standbyTime -> mStandbyTimeNs standbyDelay -> mStandbyDelayNs activeSleepTime -> mActiveSleepTimeUs idleSleepTime -> mIdleSleepTimeUs sleepTime -> mSleepTimeUs Change-Id: I7f5d602c39e0ef3f6fe9ef99eaf1b351c7bd4fc3