- Fix error in getACDB() when reading battery temperature:
Return value of get_batt_temp() has changed and calling code must be corrected.
- Fix handling of echo cancellation and noise reduction for car kits:
doAudioRouteOrMute() should not force SND_DEVICE_BT_EC_OFF sound device if
current device is SND_DEVICE_CARKIT.
Submitted on behalf of HK Chen <HK_Chen@htc.com>
- in doAudience_A1026_Control(): if setting a new path ID on the A1026
has failed several times, the A1026 will be reset by a call to
doA1026_init(). However after a reset, the file descriptor for the
A1026 configuration will be invalid (-1), so the device needs to
be reopened for the configuration to be successfully reapplied
after a reset.
- in setParameters(): after setting the noise suppression param,
the A1026 file descriptor is closed, and needs to be reset to a
negative value, as this is used in other places in the code to
indicate it's closed.
This change is the user space half of the modification allowing to adapt the input and output
buffer size to the sampling rate. This allows for similar latencies for all sampling rates
with a buffer duration of around 20ms.
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.