summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in creation of EffectHandle when out of memoryGlenn Kasten2013-11-203-9/+15
| | | | | | | | If there is insufficient client memory to create the EffectHandle, it was returning a handle which would be useless. Now it correctly reports the out-of-memory error back to client. Change-Id: I894e65d5d17df39383032c1527be6ccd35f578bb
* Consistent error checking for sp<IMemory> and pointer()Glenn Kasten2013-11-202-5/+15
| | | | | | | | | | | | | | | | | | | | | 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
* Code simplification for timed allocateGlenn Kasten2013-11-201-5/+2
| | | | Change-Id: I5acccd7418c5b4a4dc0112147c750fef9f74bf33
* Merge "Camera3: add systraces for hal open/close"Zhijun He2013-11-191-0/+4
|\
| * Camera3: add systraces for hal open/closeZhijun He2013-11-191-0/+4
| | | | | | | | | | Bug: 10901465 Change-Id: I32fb96aa0f9efd423bdb9a3d92c142a096a7a47f
* | Merge "camera3: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS references"Igor Murashkin2013-11-185-8/+30
|\ \
| * | camera3: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS referencesIgor Murashkin2013-11-185-8/+30
| | | | | | | | | | | | Change-Id: I4730ac7849e915e88d3b8fc8aa869f53a8242501
* | | am 06d62548: am d7e59228: audioflinger: do not use raw pointer for tracksEric Laurent2013-11-152-8/+8
|\ \ \ | | | | | | | | | | | | | | | | * commit '06d6254823b8f7a46690369e57b5f149c94c9f65': audioflinger: do not use raw pointer for tracks
| * | | audioflinger: do not use raw pointer for tracksEric Laurent2013-11-152-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9da3d95 surfaced a problem caused by the use of a raw pointer to a track in offload thread implementation. Pointers to tracks should always be weak or strong pointers. Bug: 11708529. Change-Id: Ic48632532d186c9be8261f73cefdf824b9fbbd2b
* | | | am 0f1ecc2e: am d8a62e25: Camera2: Rework the FPS range vs. FPS single ↵Eino-Ville Talvala2013-11-142-33/+20
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | setting detection * commit '0f1ecc2e2ff84144d5293f7f79ba895538d27f9b': Camera2: Rework the FPS range vs. FPS single setting detection
| * | | Camera2: Rework the FPS range vs. FPS single setting detectionEino-Ville Talvala2013-11-142-33/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Give up on current approach of writing out consistent FPS values into parameters that will be read back by the app. - Preserve app's latest set parameters exactly, and compare against them when detecting if a new FPS range or single FPS value has been selected. - Since get() returns exactly what was set(), it doesn't matter if the app calls getParameters() before its next setParameters(), in terms of retriggering FPS selection logic. Before, the behavior varied depending on whether the app re-read the parameters. - As before, if app changes both range and single FPS in a single set call, the range set wins. Otherwise, the value that has changed more recently is used. Bug: 11570973 Change-Id: I72b5e60c3f60e88d55127dd1bda87e26eaf929c6
* | | | am 307aa870: am 4215e616: Merge "audioflinger: fix offload track transition" ↵Eric Laurent2013-11-141-17/+24
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | into klp-dev * commit '307aa87038017dff8ae1dd0262c0ff87723894d7': audioflinger: fix offload track transition
| * | | audioflinger: fix offload track transitionEric Laurent2013-11-121-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that when transitioning from one active offloaded track to the next we flush DSP content if both tracks are not on the same audio session. This happens when switching between two applications playing the same type of content (e.g MP3, stereo, 44.1). In this case, we reuse the same output thread because the track formats are compatible. Bug: 11247103. Change-Id: I2b9031591149adeb70766da5e0d21ff2933a37e8
* | | | am b50fa77b: am 9f357f31: Merge "audioflinger: fix offload resume after ↵Eric Laurent2013-11-141-5/+9
|\ \ \ \ | |/ / / | | / / | |/ / |/| | | | | | | | drain" into klp-dev * commit 'b50fa77b2cc7dadae1b8ebb591d42976879ac43c': audioflinger: fix offload resume after drain
| * | audioflinger: fix offload resume after drainEric Laurent2013-11-121-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pausing and resuming during the drain, the drain sequence number shuold not be modified otherwise the drain callback will be ignored. This causes failure to notify end of stream to audio player and transition to next song. Bug: 11247103. Change-Id: I2a35c5cc3fd6aa667cdd257f9e9cc8715cef5159
* | | am 5c2379fd: am 184dfe4e: Camera API2: Add support for partial result quirkEino-Ville Talvala2013-11-125-14/+29
|\ \ \ | |/ / | | / | |/ |/| * commit '5c2379fdf93029c683c8bcf41b7b663b9940c921': Camera API2: Add support for partial result quirk
| * Camera API2: Add support for partial result quirkEino-Ville Talvala2013-11-125-14/+29
| | | | | | | | | | | | | | | | | | - Camera3Device: Include requestId in partial 3A results - FrameProcessorBase: Add support for partial result listeners - CameraDeviceClient: Listen and forward partial results to client Bug: 11115603 Change-Id: If1cc6bbc32932742ac142c058688761ebf6a8024
* | Fix buildGlenn Kasten2013-11-081-1/+1
| | | | | | | | Change-Id: I1ecccada22047d9c828152a53ad68b5599ff8827
* | Pull HAL reads out of RecordThread resampleGlenn Kasten2013-11-083-59/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Channel counts are uint32_t"Glenn Kasten2013-11-082-3/+3
|\ \
| * | Channel counts are uint32_tGlenn Kasten2013-11-062-3/+3
| | | | | | | | | | | | Change-Id: I5676b6a291b72d7db6326f7eaf6d17588de51b05
* | | am d9d8b7b6: am fd6ecdd3: Camera HAL3/API1: Add support for the partial ↵Eino-Ville Talvala2013-11-068-86/+432
|\ \ \ | | |/ | |/| | | | | | | | | | | | | result quirk. * commit 'd9d8b7b63514ceea143968b3f114c52755dda9ef': Camera HAL3/API1: Add support for the partial result quirk.
| * | Camera HAL3/API1: Add support for the partial result quirk.Eino-Ville Talvala2013-11-068-86/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Camera2Client: - Detect partial result quirk - Camera3Device: - Accumulate all partial results together - Fire off 3A-only result once all 3A states are available - FrameProcessorBase: - Filter out partials, don't send to listeners - FrameProcessor: - Skip face detect on partials - Make sure to only handle a 3A update for a given frame once - Trigger AF notifications when AF mode or trigger changes, to properly detect all AF transitions. Bug: 11115603 Change-Id: Iea8aa73c568701562a46071f7ea100624251d10b
* | | Merge "Rename standby methods"Glenn Kasten2013-11-062-5/+5
|\ \ \
| * | | Rename standby methodsGlenn Kasten2013-11-042-5/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ThreadBase::standby() returns the value of mStandby. RecordThread::standby() "overrode" ThreadBase::standby(), but with a different meaning and no return value. This meant you couldn't access the parent's class definition within RecordThread. This could be confusing, so this CL renames RecordThread::standby() to standbyIfNotAlreadyInStandby(). Change-Id: I9196ee12701dd2dccdfaed922af2d7b8e8774676
* | | Simplify track 'needs' bitsGlenn Kasten2013-11-062-26/+20
| | | | | | | | | | | | | | | | | | | | | Use more standard coding convention for bit masks, and add a FIXME about max channel count. Change-Id: I856784016703417ee480b92ae73757c472f9cf95
* | | Remove redundant this->Glenn Kasten2013-11-061-2/+2
| | | | | | | | | | | | Change-Id: Id783201e802b6ce294fa92f4bbe492adfb446686
* | | Remove dead codeGlenn Kasten2013-11-061-2/+0
| | | | | | | | | | | | Change-Id: Ide9196aa348cd3846b5c71d51fe6538f38ea8dc2
* | | Merge "Fix race condition in initializing downmix"Glenn Kasten2013-11-062-27/+28
|\ \ \
| * | | Fix race condition in initializing downmixGlenn Kasten2013-11-062-27/+28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code that initializes downmix GUID searches for an effect of the right type. If two or more AudioMixers are created, there is a possibility that the GUID will temporarily have the wrong value. Now the initialization is only done once, regardless of how many AudioMixers there are. Other minor changes: - use naming convention of leading 's' for static member variables - log message for no downmix effect is now a warning instead of an error, since it is not an error until there is actual content to downmix without a downmix effect Change-Id: I33ab0e51cf9d24ecaf8ae868883736b0772178c4
* | | Merge "Move local declarations to point of first use"Glenn Kasten2013-11-061-2/+1
|\ \ \
| * | | Move local declarations to point of first useGlenn Kasten2013-11-041-2/+1
| |/ / | | | | | | | | | Change-Id: I8a078386e371caab5174fc07b47f48fb9f21609a
* | | am 44dc9155: am 48b6cd98: Merge "audioflinger: fix direct output underrun" ↵Eric Laurent2013-11-061-0/+6
|\ \ \ | | |/ | |/| | | | | | | | | | | | | into klp-dev * commit '44dc91554521eaab478674a7f812cb8a4fa4f809': audioflinger: fix direct output underrun
| * | audioflinger: fix direct output underrunEric Laurent2013-11-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Underruns on tracks handled by a direct or offloaded threads were not properly reported to the applications causing a failure to automatically recover. Bug: 11535001. Change-Id: I7a8696b4d646f78b16710addfe7c108d0dd0038d
* | | Merge "Rename TrackPaused to trackPaused"Glenn Kasten2013-11-061-3/+3
|\ \ \
| * | | Rename TrackPaused to trackPausedGlenn Kasten2013-11-041-3/+3
| | |/ | |/| | | | | | | Change-Id: I3b38e0c9a6bbb6e18cb5b1f72670139a3071cb8f
* | | Merge "Use const more places"Glenn Kasten2013-11-062-3/+3
|\ \ \
| * | | Use const more placesGlenn Kasten2013-11-042-3/+3
| |/ / | | | | | | | | | Change-Id: Ibc068d319d6fff26f2d11248e17481d8f7f027e0
* | | am 4cf799fb: am 5c7ffaed: Merge "AudioFlinger: fix duplicating thread ↵Eric Laurent2013-10-311-0/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | standby." into klp-dev * commit '4cf799fbbb74de102d34ccb014ba7fbd9bfa5e14': AudioFlinger: fix duplicating thread standby.
| * | Merge "AudioFlinger: fix duplicating thread standby." into klp-devEric Laurent2013-10-311-0/+1
| |\ \
| | * | AudioFlinger: fix duplicating thread standby.Eric Laurent2013-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fd47797 fixing issue 11247103 introduced a regression where the duplicating thread does not exit standby state as expected. This in turn prevents the tracks sending audio to other threads to complete their activity cycle normally. The fix conists in clearing mStandby state also in the specialized threadLoop_write() method of DuplicatingThread subclass. Bug: 11451415. Change-Id: Ie8a92c819a56a2834ea25fa70a8b7b2125721775
* | | | am 34790c86: am 3ff5792a: Merge "camera: Collect stack traces when bad ↵Igor Murashkin2013-10-305-0/+171
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | things happen, print with dumpsys" into klp-dev * commit '34790c866cdc309e3779b811db43f63aa7eae7ef': camera: Collect stack traces when bad things happen, print with dumpsys
| * | | Merge "camera: Collect stack traces when bad things happen, print with ↵Igor Murashkin2013-10-305-0/+171
| |\ \ \ | | | | | | | | | | | | | | | dumpsys" into klp-dev
| | * | | camera: Collect stack traces when bad things happen, print with dumpsysIgor Murashkin2013-10-295-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 11324229 Change-Id: Ic920e170a8f5a389fc139bbf5416c0e3186c7fb6
* | | | | am ce275b7d: am 1c594b63: Merge "audioflinger: enable effects after ↵Eric Laurent2013-10-292-0/+3
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | | | | | | | | | 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-302-0/+3
| |\ \ \ | | |_|/ | |/| |
| | * | audioflinger: enable effects after registration if neededEric Laurent2013-10-122-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am 7f8f7585: am fd477974: AudioFlinger: more fixes for offload audio lostEric Laurent2013-10-282-14/+26
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '7f8f758506a95d6fe5c0e52aa7b5ef82fb18861a': AudioFlinger: more fixes for offload audio lost
| * | | AudioFlinger: more fixes for offload audio lostEric Laurent2013-10-282-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mStandby being false was not a reliable indication that something had been written to audio HAL. Considering the last track in mActiveTracks vector as the latest activated track was wrong as this is a SortedVector. Bug: 11247103. Change-Id: I397d011c5afcdd779def3fe25aaae7669a472cfc
| * | | Assign blame for playback wakelocks.Marco Nelissen2013-10-258-35/+130
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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