summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Multi-client recording continuedGlenn Kasten2014-02-181-2/+0
| | | | | | | | | | | | | | | | | | Remove mReqChannelCount and mReqSampleRate. Increase number of input frames needed for sample rate converter. Add TODO comments to investigate later. Fix bugs in sample rate conversion. Change-Id: I3aa54b862843d518b6e4ece9a7f52fd27d741629
* | Track pid for each sessionMarco Nelissen2014-02-111-5/+11
| | | | | | | | | | | | so they can be properly freed. Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
* | resolved conflicts for merge of 566be7c3 to masterNarayan Kamath2014-02-111-1/+1
|\ \ | |/ | | | | Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
| * Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
* | Merge "Pretty up audioflinger dumpsys"Marco Nelissen2014-02-101-2/+23
|\ \
| * | Pretty up audioflinger dumpsysMarco Nelissen2014-02-101-2/+23
| | | | | | | | | | | | Change-Id: I57e44b4c36b99f7149542bbcf9645521c6152dfa
* | | Merge "Use printf format %#x for audio_format_t in logs"Glenn Kasten2014-02-101-3/+3
|\ \ \ | |/ / |/| |
| * | Use printf format %#x for audio_format_t in logsGlenn Kasten2014-02-071-3/+3
| | | | | | | | | | | | Change-Id: I1c611d1037685d52ccc84efe0fccd6413ec938e9
* | | Merge "Use Format_isValid() and Format_isEqual() instead of direct comparison"Glenn Kasten2014-02-071-1/+1
|\ \ \ | |/ / |/| |
| * | Use Format_isValid() and Format_isEqual() instead of direct comparisonGlenn Kasten2014-02-031-1/+1
| | | | | | | | | | | | Change-Id: Ie87607aa514976947540a77775e6425c4e56e7d9
* | | Merge "audioflinger: Fix for a deadlock in track creation"Glenn Kasten2014-02-051-2/+2
|\ \ \
| * | | audioflinger: Fix for a deadlock in track creationHaynes Mathew George2014-01-301-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | AudioFlinger enters a deadlock (with itself) on trying to free a RecordTrack or Track object that failed initialization. Clear this bad object from the caller instead. Bug: 12423233 Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16
* | | Fix unused parameter warnings in audioGlenn Kasten2014-02-031-4/+4
|/ / | | | | | | Change-Id: I665ba3358dd9502f0adec70d486e7bf8a2e1b0fe
* | Merge "Replace control block frameCount_ by explicit in/out parameter"Glenn Kasten2014-01-241-2/+2
|\ \
| * | Replace control block frameCount_ by explicit in/out parameterGlenn Kasten2013-12-201-2/+2
| | | | | | | | | | | | | | | | | | in IAudioFlinger::createTrack and IAudioFlinger::openRecord Change-Id: I09c644c80e92c8e744b1b99055988a2588b2a83d
* | | Merge "Cleanup createTrack error handling"Glenn Kasten2014-01-171-0/+1
|\ \ \
| * | | Cleanup createTrack error handlingGlenn Kasten2014-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to cleanup done earlier for openRecord in this CL: > Change-Id: I84897dd7d30b370640b54e928f230604b873cb68 Bug: 10888816 Change-Id: I804a47f898e0319a60a9bd58906bbb037e45cc25
* | | | AudioRecord::getInputFramesLost() cleanupGlenn Kasten2014-01-141-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug that if the binder call failed (for example if the IAudioFlinger binder is dead), then getInputFramesLost was returning garbage. Now it correctly returns zero, which is the error value for this method. The type declarations for getInputFramesLost were inconsistent: a mixture of unsigned int, size_t, and uint32_t. Now it returns uint32_t everywhere, which is what the underlying HAL API returns. Added a FIXME about the side effect behavior. This will need review for multi-client. Change-Id: Ifa2e117a87dbd0c1f2c892a31d1c3dd919bf1a0a
* | | Use AUDIO_SESSION_ALLOCATE instead of 0Glenn Kasten2013-12-201-2/+2
|/ / | | | | | | | | | | | | Also fix a couple of places where we were using AUDIO_SESSION_OUTPUT_MIX, which happens to also be equal to 0, but has a different meaning. Change-Id: I90e39be3b89f5021a96d9e3b8d10929013ca977f
* | Add RecordThread media.log and deferred deallocationGlenn Kasten2013-12-051-12/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows a media.log buffer for RecordThread. Unlike playback threads which stick around forever, the RecordThread comes and goes for every capture session. This means that the media.log buffer for a RecordThread would disappear too, and so was useless. Now when a thread exits, it's associated media.log buffer is just marked for deferred deallocation. It is only actually freed when the memory is needed. Other changes: - Fix bug in unregistering comparison, it was comparing the wrong pointers - Increased size of log area so we can log for RecordThread also Change-Id: If45d4c03a793b86390a0112ec3acc5d41b2e3635
* | Consistent error checking for sp<IMemory> and pointer()Glenn Kasten2013-11-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been concerns that an sp<IMemory> could be non-0, but the associated pointer() still be NULL. There are rumors this may happen when a non-0 sp<IMemory> is passed in by client but the shared memory cannot be re-mapped into mediaserver. There's also evidence in the early (2009/03/03) pre-git code of checking pointer() for NULL, after a local allocate() returned a non-0 sp<IMemory>. It's not clear if this is "cargo cult" paranoia, or if there was a genuine reason for the check. In any case, we now consistently check pointer() for sp<IMemory> input parameters in createTrack() and queueTimedBuffer(). We also check after successful allocate(). If allocate() returns a non-0 sp<> but NULL pointer(), then treat it as if the allocate() had returned 0. Change-Id: I3013ac5766b493d443ecef71711ec861076a623e
* | Pull HAL reads out of RecordThread resampleGlenn Kasten2013-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the resample was indirectly calling HAL read from within the BufferProvider's getNextBuffer. Now the HAL read is done ahead of time into a circular buffer, and the getNextBuffer just reads out of that memory. This change will permit some future planned features. Also removed the mono to mono resampling optimization, as that optimization will no longer be valid in the future. Change-Id: I59f5016a2df91078d697c37a7dec2d9d9f44542e
* | am ce275b7d: am 1c594b63: Merge "audioflinger: enable effects after ↵Eric Laurent2013-10-291-0/+2
|\ \ | |/ | | | | | | | | | | registration if needed" into klp-dev * commit 'ce275b7dd20e3d4781a46126c753e6eb998e6c0f': audioflinger: enable effects after registration if needed
| * Merge "audioflinger: enable effects after registration if needed" into klp-devEric Laurent2013-10-301-0/+2
| |\
| | * audioflinger: enable effects after registration if neededEric Laurent2013-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where effects were not properly reenabled after being moved from one playback thread to another. The effect is enabled but the audio policy manager sees it as disabled. Bug: 11181933. Change-Id: I19cac7acbaf61c546e667fd85ed7d4eda1c716d8
| * | Assign blame for playback wakelocks.Marco Nelissen2013-10-251-2/+7
| |/ | | | | | | | | | | | | | | | | | | | | Set a work source for the playback wakelock, so that playback is counted against the requesting app instead of the media server. Cherrypicked from master. b/9464621 Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
* | Assign blame for playback wakelocks.Marco Nelissen2013-10-251-2/+7
| | | | | | | | | | | | | | Set a work source for the playback wakelock, so that playback is counted against the requesting app instead of the media server. Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
* | resolved conflicts for merge of 9a7d11f0 to masterGlenn Kasten2013-10-071-0/+4
|\ \ | |/ | | | | Change-Id: Ie4d101185a93d37ec280f608813ad62a077a584e
| * Merge "Cleanup openRecord error handling" into klp-devGlenn Kasten2013-10-071-0/+4
| |\
| | * Cleanup openRecord error handlingGlenn Kasten2013-09-241-0/+4
| | | | | | | | | | | | | | | Bug: 10888816 Change-Id: I84897dd7d30b370640b54e928f230604b873cb68
* | | am 4e141a4f: am 1802399c: Merge "fix deadlock in ↵Eric Laurent2013-09-251-21/+18
|\ \ \ | |/ / | | | | | | | | | | | | | | | audioflinger::createEffect()" into klp-dev * commit '4e141a4f1303767f70ea983925ec01b034fe667b': fix deadlock in audioflinger::createEffect()
| * | fix deadlock in audioflinger::createEffect()Eric Laurent2013-09-251-21/+18
| |/ | | | | | | | | | | | | | | | | | | 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
* | am 87fb4f30: am d1b28d41: audioflniger: fix leaked audiosession referencesEric Laurent2013-09-191-1/+19
|\ \ | |/ | | | | | | * commit '87fb4f30077e7bcf78e65cf25fe95bd58238bad1': audioflniger: fix leaked audiosession references
| * audioflniger: fix leaked audiosession referencesEric Laurent2013-09-181-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | acquireAudioSessionId() should not create session references if the caller is not listed in the known notification clients. It happens when the MediaPlayer or AudioTrack is created by the mediaserver on behalf of a client (e.g CameraService). In this case releaseAudioSessionId() can be called from a different pid and the session reference will not be removed. Also we will not be able to remove the reference if the client process dies. Bug: 10606426. Change-Id: Ibb5e27518daeb484a2e66302e4c6221cbaca5b70
* | am bf5e2397: am 5baf2af5: more support for audio effect offloadEric Laurent2013-09-181-36/+53
|\ \ | |/ | | | | | | * commit 'bf5e23979a03da96ce1d63126c480103232f174b': more support for audio effect offload
| * more support for audio effect offloadEric Laurent2013-09-181-36/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offloading of audio effects is now enabled for offloaded output threads. If an effect not supporting offload is enabled, the AudioTrack is invalidated so that it can be recreated in PCM mode. 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: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce
* | am 8a910716: am 6ca83fad: Merge "audioflinger: no effects on offloaded ↵Eric Laurent2013-09-091-1/+39
|\ \ | |/ | | | | | | | | | | tracks" into klp-dev * commit '8a910716892d17a2ac62c7e9884af0e9d75b26bc': audioflinger: no effects on offloaded tracks
| * audioflinger: no effects on offloaded tracksEric Laurent2013-09-091-1/+39
| | | | | | | | | | | | | | | | | | | | | | Invalidate offloaded tracks when an effect is enabled so that the track is recreated in PCM mode and the effect can be applied. This is temporary until effect offloading is implemented. Bug: 8174034. Change-Id: I77b8b54a10db6cb8334be76d863ea7e720eaad09
* | am 0541b3bb: am c8b226f4: Merge "Enforce permission for recording from ↵Jeff Brown2013-08-191-0/+10
|\ \ | |/ | | | | | | | | | | remote submix." into klp-dev * commit '0541b3bb40fa23e97e0a4599463b6afc0e271939': Enforce permission for recording from remote submix.
| * Enforce permission for recording from remote submix.Jeff Brown2013-08-161-0/+10
| | | | | | | | | | Bug: 10265163 Change-Id: I2395036bac6e10baeaf6ea4bc3093bd9dd98742d
* | Move local variable declarations to point of first useGlenn Kasten2013-08-131-12/+7
| | | | | | | | Change-Id: Ia0fc4b099a3cf8bb5b67b287e7687e9dc9691e0e
* | Use curly braces in 'if' to make it easier to add logsGlenn Kasten2013-08-131-5/+10
| | | | | | | | Change-Id: I58b33fefdd8bf703647414157a99a3223be3531c
* | WhitespaceGlenn Kasten2013-08-131-2/+5
| | | | | | | | Change-Id: Id3ccc183a03421330d0498faaa62a45915cdc3d6
* | CommentsGlenn Kasten2013-08-131-1/+3
| | | | | | | | Change-Id: I56f82904cb3855bad6f33ad1ff4ddf66a61c5720
* | Clean up error handling in createTrack and openRecordGlenn Kasten2013-08-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Outside callers now use initCheck() to determine whether a TrackBase has been created successfully, instead of relying on internal knowledge. Previously, callers needed to know that a TrackBase was only valid if it's getCbk() != 0. For a Track (playback), they needed to know to also check the track's name (track index). Now, outsiders can just call initCheck(). Other changes: - Return a 0 reference if track creation fails - Remove a dead line of code in AudioFlinger::openRecord Change-Id: If374924a3f6fd27906f625aa83dd0a1e3f506e00
* | Status pointer passed by caller is always non-NULLGlenn Kasten2013-08-121-9/+3
| | | | | | | | | | | | | | in createTrack, openRecord, createEffect, createTrack_l, createRecordTrack_l, and createEffect_l. Change-Id: I2e459e4de9c78145f4d496e6abf289479a2f0941
* | Merge "Use 0 for sp<>, NULL for raw pointers"Glenn Kasten2013-08-091-1/+1
|\ \
| * | Use 0 for sp<>, NULL for raw pointersGlenn Kasten2013-08-061-1/+1
| |/ | | | | | | Change-Id: Ia0595afdc41e1dec428d7a3db73558b54c417bf3
* | Merge "Rename reqChannels to reqChannelMask"Glenn Kasten2013-08-091-4/+4
|\ \
| * | Rename reqChannels to reqChannelMaskGlenn Kasten2013-08-061-4/+4
| |/ | | | | | | | | | | This avoids potential ambiguity with channel count. Change-Id: I0db82efc4c14dd8189d65a1db29809a085acf528