summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix issue 3425342."Eric Laurent2011-02-111-28/+24
|\
| * Fix issue 3425342.Eric Laurent2011-02-111-28/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Change the device selection order as follows to enable easier use of A2DP while the device is docked: 1 - wired Headset 2 - A2DP Headset 3 - SPDIF/HDMI 4 - Dock Also do not limit notifications volume when on dock. Change-Id: I55ea6bea9f2d9ff284b54023e541b2788d0f1eb8
* | Bug 3352047 Wrong message when adjusting volumeGlenn Kasten2011-02-103-0/+23
|/ | | | | | Add hidden AudioManager.getDevicesForStream and output device codes. Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
* am be806fe8: am cc8f87e9: am f664d6f9: am b083d3b8: Merge "Initialize ↵Brad Fitzpatrick2011-02-071-1/+1
|\ | | | | | | | | | | | | resampling buffer per track." * commit 'be806fe8c1c7bb3ae70ae27dce41d672410af26a': Initialize resampling buffer per track.
| * am cc8f87e9: am f664d6f9: am b083d3b8: Merge "Initialize resampling buffer ↵Brad Fitzpatrick2011-02-041-1/+1
| |\ | | | | | | | | | | | | | | | | | | per track." * commit 'cc8f87e9410dd4de9a2fda4738429e6c6087c789': Initialize resampling buffer per track.
| | * am b083d3b8: Merge "Initialize resampling buffer per track."Brad Fitzpatrick2011-02-041-1/+1
| | |\ | | | | | | | | | | | | | | | | * commit 'b083d3b816378ef3b9dceb33b2c2e20510b2632b': Initialize resampling buffer per track.
| | | * Initialize resampling buffer per track.Yuuhi Yamaguchi2011-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resampling too short sound, AudioMixer uses previous tracks buffer. So we re-initialize the temporary buffer per loop to avoid it. Change-Id: I55a59a3b14faa8445e09c450478fe79cef704760
* | | | Merge "Bug 3366668 Use BinderService template"Glenn Kasten2011-02-042-17/+8
|\ \ \ \
| * | | | Bug 3366668 Use BinderService templateGlenn Kasten2011-02-032-17/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: I93d7f3fc9dc9b6a365723d8a51a73a5aabdb4f93
* | | | | Merge "Bug 3366885 Remove LVMX switch"Glenn Kasten2011-02-033-141/+0
|\ \ \ \ \
| * | | | | Bug 3366885 Remove LVMX switchGlenn Kasten2011-02-033-141/+0
| |/ / / / | | | | | | | | | | | | | | | Change-Id: I0bf98c6f85f00b3296874571e1c049dcc4e2fcca
* | | | | am 6f1bd261: am 9c0a1003: Merge "Fix issue 3371080" into honeycombEric Laurent2011-02-035-39/+31
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | * commit '6f1bd261b7fd86ac7817ca061dfb55b95150b836': Fix issue 3371080
| * | | Fix issue 3371080Eric Laurent2011-02-035-39/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified default volume control logic in AudioService: 1 IN_CALL volume if in video/audio chat 2 NOTIFICATION if notification is playing or was playing less than 5s ago. 3 MUSIC Modified silent mode: - now also affect MUSIC stream type - entering silent mode when VOL- hard key is pressed once while selected stream volume is already at 0 (except for VOICE_CALL stream). - exiting silent mode when pressing VOL+ hard key while in silent mode Play sound FX (audible selections, keyboard clicks) at a fixed volume. Modified audio framework: - isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger) - iStreamActive() now specifies a time window during which the stream is considered active after it actually stopped. Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
| * | | Merge 0ef57993 from gingerbreadJean-Baptiste Queru2011-01-291-1/+2
| |\ \ \ | | |/ / | | | | | | | | Change-Id: If10fee1ae387a8130356dd62fe678495402d5edf
* | | | am 4eeb1047: Merge 13212f83 from gingerbread-plus-aospJean-Baptiste Queru2011-01-291-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * commit '4eeb10470ffafe8c508027f363ac66b58da5bf00': Fix issue 2988031.
| * \ \ \ Merge 13212f83 from gingerbread-plus-aospJean-Baptiste Queru2011-01-291-1/+2
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / Change-Id: I9a8ee0c7e7896aea85e7a7c18ee82927091cb670
| | * | Fix issue 2988031.Eric Laurent2011-01-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Limit SYSTEM stream volume when a headset is connected and music is playing. Change-Id: Ieb44ae5bb53ffa9cd5fe8e317798eed279b78df8
| | * | do not merge bug 3370834 Cherrypick from masterJean-Michel Trivi2011-01-263-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherripick from master CL 79833, 79417, 78864, 80332, 87500 Add new audio mode and recording source for audio communications other than telelphony. The audio mode MODE_IN_CALL signals the system the device a phone call is currently underway. There was no way for audio video chat or VoIP applications to signal a call is underway, but not using the telephony resources. This change introduces a new mode to address this. Changes in other parts of the system (java and native) are required to take this new mode into account. The generic AudioPolicyManager is updated to not use its phone state variable directly, but to use two new convenience methods, isInCall() and isStateInCall(int) instead. Add a recording source used to designate a recording stream for voice communications such as VoIP. Update the platform-independent audio policy manager to pass the nature of the audio recording source to the audio policy client interface through the AudioPolicyClientInterface::setParameters() method. SIP calls should set the audio mode to MODE_IN_COMMUNICATION, Audio mode MODE_IN_CALL is reserved for telephony. SIP: Enable built-in echo canceler if available. 1. Always initialize AudioRecord with VOICE_COMMUNICATION. 2. If echo canceler is available, disable our echo suppressor. Note that this CL is intentionally not correcting the getAudioSourceMax() return value in MediaRecorder.java as the new source is hidden here. Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
| | * | do not merge - Fix issue 3371096.Eric Laurent2011-01-201-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | EffectModule::process() was copying effect chain input buffer to output buffer if no effect was active instead of accumulating it. Change-Id: If4ca75601ea69a088d0f71d88aec53e90a1dec89
| | * | Fix issue 2641884: Bluetooth volume is dependent on in call volume.Eric Laurent2010-12-011-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the code in AudioPolicyManagerBase::checkAndSetVolume() that forces voice volume to max when setting bluetooth SCO volume is not called if the bluetooth stream volume did not actually change. So even if we re apply volumes when switching to bluetooth device, the volume voice volume is not changed and remains what it was when routed to earpiece What makes things worse on Passion is that stream volumes are limited when connected to bluetooth and their actual value does not change as soon as they exceed the limit threshold. Change-Id: Id7c317db45b392a1c20dca2859678e3c64a371ed
* | | | Bug 3376700 Add support in APM for stream-specific volume curvesJean-Michel Trivi2011-01-251-2/+60
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stream volume was handled the same way for all different stream, the only potential difference between each of them being the number of steps available to the user to change the volume. This was mapped to 99 steps of 0.5dB amplitude, offering a maximum attenuation of -49.5dB. This change consists in defining for each stream a curve with two knees (3 segments) for conversion from volume index to attenuation. This curve is defined in the AudioPolicyManager in initializeVolumeCurves(), and can therefore be overridden by the platform. Note that this change doesn't modify the volume curves: this CL enables the curves to be changed by overriding this default behavior. Change-Id: I575b66799c52df2906db248943b15120b8a79ea2
* | | Fix issue 3371096.Eric Laurent2011-01-191-8/+10
| | | | | | | | | | | | | | | | | | | | | EffectModule::process() was copying effect chain input buffer to output buffer if no effect was active instead of accumulating it. Change-Id: I2838af2e7b6654d0a76547625929a5453da68d02
* | | Tentative fix for issue 3362362.Eric Laurent2011-01-193-31/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is likely that one method is called on the AudioPolicyManagerBase instance while it is still being constructed by AudioPolicyService. To avoid this, the AudioPolicyService mutex is held by the constructor until the platform specific AudioPolicyManager is constructed and the member mpPolicyManager initialized. Also added an initCheck() method to AudioPolicyInterface to verify successful initialization of AudioPolicyManager. A similar change is done in AudioFlinger constructor. Also added some missing protections in AudioFlinger methods where the playback thread list is parsed. Change-Id: I006b244ec057e1bb0aa5ebe426ef006e3b171056
* | | Fix issue 3317627.Eric Laurent2011-01-091-0/+8
| | | | | | | | | | | | | | | | | | | | | The fix consists in selecting the digital audio device (SPDIF/HDMI) when available if the routing strategy is STRATEGY_PHONE. Change-Id: Ie500ae92f5c01f2511988543852ba559c6e5994b
* | | Add camera service support for SurfaceTexture.Jamie Gennis2011-01-063-25/+50
| | | | | | | | | | | | | | | | | | | | | This change enables the use of a SurfaceTexture in place of a Surface as the destination of camera preview frames. Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
* | | Fix issue 3217707.Eric Laurent2010-12-172-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when the A2DP headset is disconnected, there is a transition period during which the A2DP sink pumps data at a very high pace. This makes that: 1 the audio flinger mixer thread spins and starves binder threads thus delaying the completion of the A2DP output stream shutdown 2 we read the audio http audio stream faster than normal and we reach the end of stream for audio while video is still playing if the streamed file is small enough. The fix consists in detecting abnormal short write intervals and sleep to restore a normal write pace. Change-Id: Iab127882494ab0e26266371dc0ce5c2ff6fa476e
* | | Fix speakerphone routing to analog dockEric Laurent2010-12-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The audio routing policy when speakerphone is on and a dock with built-in speakers is connected should be to output audio to teh dock speakers Also removed route to SCO car kit if forced usage is not SCO as the SCO socket might not be established. Change-Id: I1aa2954092e28de935304b90f7a7a64d661934c7
* | | Change audio routing policy for HDMIEric Laurent2010-12-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HDMI device should have a higher priority than analog dock audio but a lower priority than wired headsets. Also modified AudioService so that HDMI is mapped to DEVICE_OUT_AUX_DIGITAL device and not DEVICE_OUT_DGTL_DOCK_HEADSET as before to enable discrimination between SPDIF going to digital dock and SPIDF going to HDMI. Change-Id: I887d0c73479784dd2edaf41ce1a7d8d0bdcbb4bd
* | | Fix audio mode log.Eric Laurent2010-12-101-2/+3
| | | | | | | | | | | | | | | | | | | | | Since the new audio mode IN_COMMUNICATION was added, the audio mode log was broken. Change-Id: I4fdafc3b98a1b0ceb55058a9e47fed99b3dbe6ad
* | | We requires camera hal's implementation should not track the ref count of ↵James Dong2010-12-101-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | any outstanding video frames and ignore releaseRecordingFrame() call after it receives disableMsgType(CAMERA_MSG_VIDEO_FRAME). Change-Id: I2ecb9b3b11dab6bf868ccf8effda1b8df5bcde3c
* | | remove support for PUSH_BUFFER surfaces and overlaysMathias Agopian2010-12-082-104/+10
| | | | | | | | | | | | | | | | | | | | | the same functionality is now supported through the h/w composer HAL, and YUV support in the GPU. Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
* | | Don't drop video frames but to release them.James Dong2010-12-061-1/+4
| | | | | | | | | | | | | | | | | | bug - 3259009 Change-Id: Ib7634f10a7fe7b7ce7014b79b07957d194bae1a7
* | | resolved conflicts for merge of 0d28be68 to masterEric Laurent2010-12-011-50/+54
|\ \ \ | |/ / | | | | | | Change-Id: Iec5f810c366d3e1c14a6f6294b0aea4ffb30ae3e
| * | Fix issue 3142808.Eric Laurent2010-12-011-49/+52
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug in the way audio policy manager handles A2DP interface suspend/restore when SCO is used. This bug is not new but has been triggered by a change in the timing of the events received by audio policy manager when a call is setup and torn down introduced by commit 164a8f86c7e48992691368c4895709c3bdb835a4. The fix consists in grouping the control of A2DP suspended state in a single function that is called systematically when conditions affecting this state are changed: - call state change - device connection/disconnection - change in forced usage. Change-Id: I46ee2399ee5547b60511fc6cfd32e2720091b0f8
| * Remove the FLIP_H/ROT_90 workaround from CameraService.do not mergeWu-cheng Li2010-10-252-11/+5
| | | | | | | | | | | | Now overlay does flip before rotation. bug:3114236 Change-Id: I1780e56154566435a0ceeb2f101de7ed0a0613cb
| * Mirror the preview for front-facing cameras. do not mergeWu-cheng Li2010-10-202-19/+43
| | | | | | | | | | | | | | | | Now overlay does ROT_90 before FLIP_V or FLIP_H. It should be FLIP_V or FLIP_H first. The formula should be changed after overlay is fixed. bug:3059865 Change-Id: Ie4366bf7f1fcac7383e8dfc74b1b865997bbbcc6
* | Revert "Temporary workaround for issue 3187563"Eric Laurent2010-11-241-4/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 065299b58d1c00cd24e442fa192561decf7b1fec. The work around for issue 3187563 is not needed any more since the new kernel DMA driver implementation (commit 7953250be7c9a1c3417e21b20032b571d495d218) fixes the root cause. Change-Id: Ibaac2826b63c8e5825ae2e5cab2fb2f0e51ab7b4
* | Fix issue 3225810.Eric Laurent2010-11-242-34/+56
| | | | | | | | | | | | Take a wake lock whenever A2DP output stream is active. Change-Id: Ie50e6d4cb34c8a1ba97b301ef25e10aeb153d8f3
* | Fix issue 3157123.Eric Laurent2010-11-192-10/+12
| | | | | | | | | | | | | | Use a Mutex wherever atomic operations were used in AudioTrack, AudioRecord, AudioFlinger and AudioEffect classes. Change-Id: I6f55b2cabdcd93d64ef19446735b8f33720f8dbc
* | Add new audio mode for audio communications other than telelphony.Jean-Michel Trivi2010-11-162-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The audio mode MODE_IN_CALL signals the system the device a phone call is currently underway. There was no way for audio video chat or VoIP applications to signal a call is underway, but not using the telephony resources. This change introduces a new mode to address this. Changes in other parts of the system (java and native) are required to take this new mode into account. The generic AudioPolicyManager is updated to not use its phone state variable directly, but to use two new convenience methods, isInCall() and isStateInCall(int) instead. Change-Id: Id744cd26520ea1d1a4795eabe6a1f0c58789af76
* | Add support for audio recording source in generic audio policy mgr.Jean-Michel Trivi2010-11-121-4/+2
| | | | | | | | | | | | | | | | | | Update the platform-independent audio policy manager to pass the nature of the audio recording source to the audio policy client interface through the AudioPolicyClientInterface::setParameters() method. Change-Id: I6b4fd0f8a3acea0d7d30bbad98edd1977dc012bf
* | Temporary workaround for issue 3187563Eric Laurent2010-11-111-0/+4
| | | | | | | | | | | | | | | | | | | | The audio HAL does not always handle properly simultaneous input and output stream state changes. This happens in particular when starting video record because output stream starts and stops while input is active. Temporary disable the video record jingle the time the audio HAL issues are solved. Change-Id: I3b923d81af543a335deae9e22d7f396bb5791d91
* | Add recording source for voice communicationJean-Michel Trivi2010-11-091-0/+1
| | | | | | | | | | | | | | Add a recording source used to designate a recording stream for voice communications such as VoIP. Change-Id: I4091d67069b1a0170c1a5ca5e6acd51eb0aa08f9
* | Added support for dock headset observerPraveen Bharathi2010-11-011-3/+19
| | | | | | | | | | Change-Id: I06b2e65e3bfa10735e6c7fd3349afa9ae7d45292 Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
* | Mirror the camera preview if the camera is front-facing.Wu-cheng Li2010-10-252-27/+38
| | | | | | | | | | bug:3095272 Change-Id: Ib1c1d1edc06a33e9d4d2dcb42bc1dd2c25b1310c
* | Camera framework change required for 0-memcpy recordingJames Dong2010-10-192-1/+27
| | | | | | | | | | | | bug - 3042125 Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
* | Fix camera display orientation.Wu-cheng Li2010-10-122-1/+13
| | | | | | | | | | bug:3036262 Change-Id: I6fc3dc381fcfaceba09fd5bd14afb85045b3d676
* | am ce2e2184: am 37947afe: Merge "Fixed AudioFlinger not always pausing ↵Eric Laurent2010-10-071-3/+3
|\ \ | |/ | | | | | | | | | | | | | | tracks" into gingerbread Merge commit 'ce2e2184bbc5530f4fac3220fdf3d1b3fc08a4c3' * commit 'ce2e2184bbc5530f4fac3220fdf3d1b3fc08a4c3': Fixed AudioFlinger not always pausing tracks
| * Fixed AudioFlinger not always pausing tracksEric Laurent2010-10-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | If the pause request is received before the AudioTrack buffer was completelly filled and the track ready for mixing, the pause is not executed: the track just underruns and stays in pausing state. The fix consists in considering the track ready for mixing immediately if pausing. Change-Id: Ia6cb4703fee2126e41011a6400ea8eeb3a3e5456
* | am de12c3cf: am 220ab887: Merge "Issue 3032913: improve AudioTrack recovery ↵Eric Laurent2010-09-301-4/+13
|\ \ | |/ | | | | | | | | | | | | | | time" into gingerbread Merge commit 'de12c3cf56e3f27b2efc60eeae8b5e422747f2b9' * commit 'de12c3cf56e3f27b2efc60eeae8b5e422747f2b9': Issue 3032913: improve AudioTrack recovery time