Merge commit 'f3fcb7952818bddefda84b49f0ec5a550effffcf'
* commit 'f3fcb7952818bddefda84b49f0ec5a550effffcf':
Fix issue 2418435: Device is rebooted after pairing with A2DP/Bluetooth and made a call to other phone.
Merge commit '04b67c8c9fadfc174fb66aef3a31544707bd4b0d' into eclair-plus-aosp
* commit '04b67c8c9fadfc174fb66aef3a31544707bd4b0d':
Fix issue 2418435: Device is rebooted after pairing with A2DP/Bluetooth and made a call to other phone.
AudioHardware receives TTY mode selection from HeadsetObserver by means of the setParameters() method.
Whenever the audio mode is MODE_IN_CALL and a headset is connected, the sound device selection
is modified by TTY mode in order to select TTY full, VCO ot HCO oudio routes and a1026 configuations accordingly.
This change fixes two issues:
1 There is a problem with the mutex mA1026Lock protecting access to Audience chip configuration. The mutex is always locked
after the driver is opened and unlocked before the driver is closed. There is a risk that the driver is closed by an instance
of doAudience_A1026_Control() ready to exit while it had already been tested as opened by another instance of doAudience_A1026_Control()
entering and waiting for mA1026Lock to be released. This is what happens when a record is starting and that at the same time the output routing
is changed because the record jingle is playing.
The fix consists in locking mA1026Lock before opening the driver and unlocking it after closing the driver.
2 There is a problem on both 7k and 8k with the way doRouting() handles the routing requests for inputs and outputs. Current implementation
of doRouting() has a parameter indicating if the requestest comes from an input or from an output. The input device is only considered if the
request comes from this particular input. This creates a problem when the input is already active and a routing request is received on an output.
In this case, the new device is chosen as if no record was active resulting in potential change in input routing and a1026 configuration.
The fix consists in checking if at least one input is active when entering doRouting() and always take its device selection into account.
If no input is active, the device selected for the output is used.
For 8k platform, also call doRouting() instead of doAudience_A1026_Control() when record is started or stopped to make sure that all audio path and
accoustic parameters are properly selected and not only the A1026 configuraiton applied.
Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames
written by DSP to DAC.
This API is not yet implemented on 7k and 8k kernel drivers.
make sure to reject incompatible buffers in special function
GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER
we use ioctl(PMEM_GET_SIZE) to validate that the given buffer is indeed
a pmem buffer.
Merge commit 'c42d5b9bd789034e4e10679b24a7bd38e68f4556' into eclair-plus-aosp
* commit 'c42d5b9bd789034e4e10679b24a7bd38e68f4556':
Fix issue 2378103: Bluetooth car kit partly handled by Passion AudioHardware implementation.
libaudio: handle audio path SND_DEVICE_CARKIT.
Submitted on behalf of HK Chen <HK_Chen@htc.com>
Added missing code from HK patch in A1026 configuration.
Merge commit '3964d4ed448b00791bc1b574913be24f44b45f0f' into eclair-plus-aosp
* commit '3964d4ed448b00791bc1b574913be24f44b45f0f':
Fix issue 2199233: ERD16 Incall volume with headset is crazy loud / volume buttons have no effect
A regression was introduced by commit 372b6255604d1c54d31e79f1ea31472fe5bc8956 fixing issue 2336461:
voice call volume still needs to be updated when entering IN_CALL mode.
First implementations of audio policy manager in Eclair branch have shown that most code is common to all platforms.
Creating AudioPolicyManagerBase base class will improve code maintainability and readability.
This change reverts modifications made earlier on software voice volume control in audio policy manager.
These modifications are not needed anymore and are partly responsible of this issue now that voice volume is controlled by audio DSP.
Add new config values for usage AudioSystem::FOR_DOCK in setForceUse() to differenciate car and desk docks.
For the desk dock, the sonification strategy will use the phone speaker only as there is no guaranty that
a device is connected to the dock's output jack.
For the car dock, the sonification strategy will use the A2DP output as before.
Merge commit 'eb3af645781d858eea3bccfe193411e23474e11d'
* commit 'eb3af645781d858eea3bccfe193411e23474e11d':
Use the media.enable1026 system property to indicate whether the
Merge commit '9ffa86825c57c8bf82669b438bd0e8feb865d4b7' into eclair-plus-aosp
* commit '9ffa86825c57c8bf82669b438bd0e8feb865d4b7':
Use the media.enable1026 system property to indicate whether the