272 Commits

Author SHA1 Message Date
Jean-Michel Trivi
969ee5df65 am 739de5f3: Fix bug 2194140 Add support for the voice recognition mode. The voice recognition mode is enabled when using the AUDIO_SOURCE_VOICE_RECOGNITION audio recording source. The intended behavior is to use the same microphone input as the default input, but to
Merge commit '739de5f36523862a7caa15590bd6b680b6cd2854' into eclair-plus-aosp

* commit '739de5f36523862a7caa15590bd6b680b6cd2854':
  Fix bug 2194140 Add support for the voice recognition mode.
2009-11-05 10:52:01 -08:00
Jean-Michel Trivi
f49a990555 Fix bug 2194140 Add support for the voice recognition mode.
The voice recognition mode is enabled when using the
AUDIO_SOURCE_VOICE_RECOGNITION audio recording source. The intended
behavior is to use the same microphone input as the default input,
but to configure the A1026 chip in the special mode tuned for
voice recognition, for the matching input. For testing purposes,
two settings will be available for each input, the choice of which
one is used will be dependent on the vr_uses_ns property.
The availability of the voice rec mode is dependent on the enable1026
system property.
Note that the final A1026 configuration modes are not used yet
(not available) but the ones to use are specified in the comments
of the AudioHardware::doAudience_A1026_Control() function at line
952 of AudioHardware.cpp for instance.
Upon availability of other presets, the enable1026 property could
be used to disable or enable even more of the 1026 features.
2009-11-05 10:32:48 -08:00
Eric Laurent
aa5c23e6e5 am d1dc8c30: Fix issue: no audio after media_server process crash while in call.
Merge commit 'd1dc8c30a969ec3539fc21b940789b2f23197756' into eclair-plus-aosp

* commit 'd1dc8c30a969ec3539fc21b940789b2f23197756':
  Fix issue: no audio after media_server process crash while in call.
2009-11-05 01:27:30 -08:00
Eric Laurent
850c6e0214 Fix issue: no audio after media_server process crash while in call.
Reset audio ctl driver voice mode when AudioHardware is initialized in case media_server process crashed while in call.
2009-11-05 00:56:21 -08:00
Eric Laurent
c072d1b099 am 63e2c0ab: Log for issue 2203561.
Merge commit '63e2c0ab3b3cfac68ed3832adfbf4e5a0b32ed8f' into eclair-plus-aosp

* commit '63e2c0ab3b3cfac68ed3832adfbf4e5a0b32ed8f':
  Log for issue 2203561.
2009-11-03 10:33:02 -08:00
Eric Laurent
3262f5a8b3 Log for issue 2203561.
Added detailed dump for AudioPolicyManager when AudioPolicyService is dumped.
2009-11-03 09:18:39 -08:00
Jean-Michel Trivi
83655b8325 am 10254cc3: HTC update: add attenuation to avoid distortion, and compensate in acoustic parameters.
Merge commit '10254cc35f5cb7ebe2c7ef452815486cb8e92a33' into eclair-plus-aosp

* commit '10254cc35f5cb7ebe2c7ef452815486cb8e92a33':
  HTC update: add attenuation to avoid distortion, and compensate in
2009-11-02 19:10:33 -08:00
Jean-Michel Trivi
541bf8c3ad HTC update: add attenuation to avoid distortion, and compensate in
acoustic parameters.
2009-11-02 15:01:45 -08:00
Eric Laurent
4e5029a3e1 am da9d5ab1: Fix issue 2194140: [Passion] Support Audience chip.
Merge commit 'da9d5ab10524c32d7949363a10fde1bec5fdf9fa' into eclair-plus-aosp

* commit 'da9d5ab10524c32d7949363a10fde1bec5fdf9fa':
  Fix issue 2194140: [Passion] Support Audience chip.
2009-11-02 12:40:33 -08:00
Eric Laurent
98ca4ba21d am 0f2f4d0a: Fix issue 2194140, Part 1.
Merge commit '0f2f4d0a60cf93a7a281e217408a4249715f5748' into eclair-plus-aosp

* commit '0f2f4d0a60cf93a7a281e217408a4249715f5748':
  Fix issue 2194140, Part 1.
2009-11-02 10:31:01 -08:00
Eric Laurent
d861f3a7a3 Fix issue 2194140: [Passion] Support Audience chip.
AudioHardware QSD8k:
- Add setParameters comment to control noise suppression states via new IOCTL A1026_SET_NS_STATE implemented in a1026 driver.
- Add support for new input device DEVICE_IN_BACK_MIC.
AudioPolicyManager:
- Add support for audio source AUDIO_SOURCE_CAMCORDER.
2009-11-02 05:26:06 -08:00
Eric Laurent
6bb9f88291 Fix issue 2194140, Part 1.
Submitted on behalf of HK Chen <hk_chen@htc.com>

1) implement ACDB dynamic update for 1) audio playback, 2) audio recording, 3) BT headsets.
2) implement A1026 hard reset recovery mechanism
2009-10-31 00:51:56 -07:00
Mathias Agopian
c369d93e95 am 87ea1dfa: fix[2222341] Soft reset while going back from camcorder settings
Merge commit '87ea1dfa60cf130fafdbab8e94cb2ce9ff8d0975' into eclair-plus-aosp

* commit '87ea1dfa60cf130fafdbab8e94cb2ce9ff8d0975':
  fix[2222341] Soft reset while going back from camcorder settings
2009-10-30 15:02:03 -07:00
Mathias Agopian
b73f40535f fix[2222341] Soft reset while going back from camcorder settings
add a way to convert a mapped "pushbuffer" buffer to a gralloc handle
which then can be safely used by surfaceflinger

also make sure to not send empty rectangles to the MDP.
2009-10-30 14:52:52 -07:00
Jean-Michel Trivi
d43526b1ba am e26fd757: Fix bug 2210203 where Music volume is reduced after reducing in-call volume. This is the combination of two issues: - on QSD8K, the voice volume affects all streams, even when not in call. This is fixed by setting the voice volume to unity gain whenever
Merge commit 'e26fd7576c0c0963ac7e11c249db8f56a8c08a92' into eclair-plus-aosp

* commit 'e26fd7576c0c0963ac7e11c249db8f56a8c08a92':
  Fix bug 2210203 where Music volume is reduced after reducing in-call volume.
2009-10-29 09:13:11 -07:00
Jean-Michel Trivi
b8dba8904e Fix bug 2210203 where Music volume is reduced after reducing in-call volume.
This is the combination of two issues:
- on QSD8K, the voice volume affects all streams, even when not in call.
 This is fixed by setting the voice volume to unity gain whenever
 exiting a call.
- another related issue was that when entering a call with no audio
 playing, the in-call volume would be at its max. This is due to
the audio driver resetting the gain to unity when creating a new
output. AudioPolicyManager::setPhoneState() would sometimes fail
to force the reset of the audio volumes when entering a call, causing
the driver to use the unity gain, not the in-call volume set by the
user. This is fixed by testing whether is call is starting or ending
independently from the logic to determine the new ouput device.
2009-10-28 17:24:53 -07:00
Dave Sparks
3c6102afd3 am 5d89308f: Add wakelock to audio HAL. Bug 2218158.
Merge commit '5d89308f2e1252eff2743bf823bf558dbb0de2fa' into eclair-plus-aosp

* commit '5d89308f2e1252eff2743bf823bf558dbb0de2fa':
  Add wakelock to audio HAL. Bug 2218158.
2009-10-27 17:14:12 -07:00
Dave Sparks
61e76b47a1 Add wakelock to audio HAL. Bug 2218158.
Applications are supposed to hold a wakelock. However, since 1.0,
the audio driver and/or HAL has held a partial wakelock. That means
that many apps will be broken if we don't hold a wakelock while
audio is playing. This patch holds a wakelock while the audio
driver is open and releases it when it goes to standby mode.
2009-10-27 16:27:04 -07:00
Eric Laurent
3f87274759 am 0bf3ac2c: do not merge - Fix for issue 2184627 cherry picked from eclair-mr2
Merge commit '0bf3ac2c797fc9e1a327f867d69bbb0b54a68ffa' into eclair-plus-aosp

* commit '0bf3ac2c797fc9e1a327f867d69bbb0b54a68ffa':
  do not merge - Fix for issue 2184627 cherry picked from eclair-mr2
2009-10-26 10:58:27 -07:00
Eric Laurent
52af604c93 do not merge - Fix for issue 2184627 cherry picked from eclair-mr2
Bluetooth A2DP suspend-resume improvements.

This change will reduce the occurence rate of A2DP sink suspend resume failures observed in issues 2184627, 2181005 and possibly 2189628.

Suspend A2DP output when phone state is not NORMAL and not only when it is RINGTONE.
Update A2DP suspend state when an A2DP or SCO device is connected or disconnected while phone state is not NORMAL.
2009-10-26 09:07:41 -07:00
Eric Laurent
faeabb29a5 am 7eda9410: Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
Merge commit '7eda9410e218b2f2ff3f776897fbc1b679b6132d' into eclair-plus-aosp

* commit '7eda9410e218b2f2ff3f776897fbc1b679b6132d':
  Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
2009-10-24 01:38:54 -07:00
Eric Laurent
7996f999be Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
Modified checkAndSetVolume() method to adjust VOICE_CALL, BLUETOOTH_SCO and DTMF stream volumes to match audio hardware behavior (never 0).
Also do the following adjustments on stream volumes:
- VOICE_CALL:
	if in call, force software volume to max to avoid applying the volume twice (software mixer + audio hardware)
	send setVoiceVolume() to set in call volume in audio hardware
- BLUETOOTH_SCO:
	send setVoiceVolume() with max value because volume is applied by BT headset and should not be also applied by audio hardware.
- DTMF:
	if in call and not using the BT SCO device, force software volume to max to avoid applying the volume twice (software mixer + audio hardware)
2009-10-21 08:19:36 -07:00
HK Chen
72278d4e00 am 3cb88645: qsd8k: fix set_mic_mute() in AudioHardware.
Merge commit '3cb8864598e72c04859f410bb03f242cf3965dbe' into eclair-plus-aosp

* commit '3cb8864598e72c04859f410bb03f242cf3965dbe':
  qsd8k: fix set_mic_mute() in AudioHardware.
2009-10-15 02:33:35 -07:00
HK Chen
b5075dd3df qsd8k: fix set_mic_mute() in AudioHardware.
Signed-off-by: Brian Swetland <swetland@google.com>
2009-10-15 01:23:48 -07:00
Eric Laurent
dd3deeed9d am ba8101e9: Merge change I34a989e8 into eclair
Merge commit 'ba8101e944ec0ffea2b89739667d3ce731d6e818' into eclair-plus-aosp

* commit 'ba8101e944ec0ffea2b89739667d3ce731d6e818':
  Fix issue 2172934: AudioHardware for msm7k: some file descriptor tests must be fixed.
2009-10-12 09:48:13 -07:00
Android (Google) Code Review
7c65dd73a3 Merge change I34a989e8 into eclair
* changes:
  Fix issue 2172934: AudioHardware for msm7k: some file descriptor tests must be fixed.
2009-10-12 12:42:51 -04:00
Jean-Michel Trivi
f91bd47a25 am 195d08b5: Fix bug 2172716. Align AudioPolicyManager code in msm7k/libaudio and msm7k/libaudio-qsd8k
Merge commit '195d08b5a1d93025464f7347280f182e5da7fda7' into eclair-plus-aosp

* commit '195d08b5a1d93025464f7347280f182e5da7fda7':
  Fix bug 2172716. Align AudioPolicyManager code in msm7k/libaudio and msm7k/libaudio-qsd8k
2009-10-12 09:03:37 -07:00
Eric Laurent
0933f47098 Fix issue 2172934: AudioHardware for msm7k: some file descriptor tests must be fixed. 2009-10-09 18:18:47 -07:00
Jean-Michel Trivi
fcc698f9b4 Fix bug 2172716. Align AudioPolicyManager code in msm7k/libaudio and msm7k/libaudio-qsd8k 2009-10-09 16:58:34 -07:00
Dima Zavin
7567fe11a4 am a6537357: gralloc-qsd8k: Call glFinish on composition complete.
Merge commit 'a653735759df4b8338475d79044c6494b238e681' into eclair-plus-aosp

* commit 'a653735759df4b8338475d79044c6494b238e681':
  gralloc-qsd8k: Call glFinish on composition complete.
2009-10-08 01:20:12 -07:00
Dima Zavin
ef7776257a gralloc-qsd8k: Call glFinish on composition complete.
Change-Id: I09c8287bcaf89f3f8bcaa4108631641a0fcc397b
Signed-off-by: Dima Zavin <dima@android.com>
2009-10-08 01:13:51 -07:00
Eric Laurent
33575214c1 am ee997372: Fix issue 2146459:AudioPolicyManager: notification and ringtone streams can remain muted.
Merge commit 'ee997372b7d4aea4966d0c27cbd11fe43de31197' into eclair-plus-aosp

* commit 'ee997372b7d4aea4966d0c27cbd11fe43de31197':
  Fix issue 2146459:AudioPolicyManager: notification and ringtone streams can remain muted.
2009-09-29 15:13:18 -07:00
Eric Laurent
addb2c56fc Fix issue 2146459:AudioPolicyManager: notification and ringtone streams can remain muted.
The fix consists in adding a parameter to handleIncallSonification() indicating that it is called from setPhoneState() in which case the stream mute or unmute is called as many times as there are active tracks on the output.

Also change the time when handleIncallSonification() is called in setPhoneState() to make sure that both mPhoneSate and the selected device are coherent with the IN_CALL state when the fucntion is called.
2009-09-29 15:04:46 -07:00
HK Chen
c4bc52ded6 am 7161d052: Fix get_snd_dev() in AudioHardware.
Merge commit '7161d052ce69228825bd5deca3bfa4a213a99f06' into eclair-plus-aosp

* commit '7161d052ce69228825bd5deca3bfa4a213a99f06':
  Fix get_snd_dev() in AudioHardware.
2009-09-28 16:18:53 -07:00
HK Chen
2d2802d283 Fix get_snd_dev() in AudioHardware. 2009-09-28 14:58:06 -07:00
Jean-Michel Trivi
500868d0c0 am 9b5caf53: Merge change 27062 into eclair
Merge commit '9b5caf539136ccc1106b49155f531f5e70b41ba0' into eclair-plus-aosp

* commit '9b5caf539136ccc1106b49155f531f5e70b41ba0':
  Fix bug 2146274. Modify the Audio Policy Manager
2009-09-25 15:10:38 -07:00
Android (Google) Code Review
ac5de163ca Merge change 27062 into eclair
* changes:
  Fix bug 2146274. Modify the Audio Policy Manager to support dynamic rerouting of STREAM_VOICE_CALL streams when using AudioManager.setSpeakerphoneOn(bool) even when not in call.
2009-09-25 18:01:44 -04:00
Jean-Michel Trivi
5312b467f3 Fix bug 2146274. Modify the Audio Policy Manager
to support dynamic rerouting of STREAM_VOICE_CALL streams when using
AudioManager.setSpeakerphoneOn(bool) even when not in call.

The setSpeakerphoneOn() method is mapped in the AudioPolicyManager to
a call to setForceUse for the AudioSystem::FOR_COMMUNICATION usage.
This was only updating the output device when the current mode
was MODE_IN_CALL. The change consists in changing the routing
also when there is an active stream of type AudioSystem::VOICE_CALL
as we allow that stream type to be used not just for telephony streams,
but for communications in general.
2009-09-25 10:53:27 -07:00
HK Chen
9be14a004c am 31923bb6: qsd8k: audio: remove pre-filling buffers for pcm playback.
Merge commit '31923bb6797ec304d26395acf6d946ab8e44aa6e' into eclair-plus-aosp

* commit '31923bb6797ec304d26395acf6d946ab8e44aa6e':
  qsd8k: audio: remove pre-filling buffers for pcm playback.
2009-09-24 17:23:42 -07:00
HK Chen
c71bbda56f qsd8k: audio: remove pre-filling buffers for pcm playback.
Signed-off-by: Brian Swetland <swetland@google.com>
2009-09-24 17:09:27 -07:00
Dima Zavin
f5f80e0bf4 am afff0dae: copybit: hack to always request premultiplied alpha blend.
Merge commit 'afff0dae18bbea0b39ad151e73ae20cbc11e3edd' into eclair-plus-aosp

* commit 'afff0dae18bbea0b39ad151e73ae20cbc11e3edd':
  copybit: hack to always request premultiplied alpha blend.
2009-09-24 14:53:26 -07:00
Dima Zavin
d24467414b copybit: hack to always request premultiplied alpha blend.
The kernel will only do it for images with an alpha plane.

Change-Id: Idcba41945ed7d17daae0a5bcc48c64a82a49dded
Signed-off-by: Dima Zavin <dima@android.com>
2009-09-24 01:10:49 -07:00
Eric Laurent
d51416731c am dc4d5ad6: Fix issue 2118500: Ringer volume control broken after a call is terminated while a ring tone is playing and a BT headset is connected.
Merge commit 'dc4d5ad6482f97e33366f32ad2afd2a304810fb7' into eclair-plus-aosp

* commit 'dc4d5ad6482f97e33366f32ad2afd2a304810fb7':
  Fix issue 2118500: Ringer volume control broken after a call is terminated while a ring tone is playing and a BT headset is connected.
2009-09-15 09:23:40 -07:00
Eric Laurent
3dfe38ac24 Fix issue 2118500: Ringer volume control broken after a call is terminated while a ring tone is playing and a BT headset is connected.
There was a problem in the special management of notifications while incall when using a duplicated output (with A2DP headset connected). When in call, the notifications are not played on both A2DP + speaker outputs but replaced by a tone in the device used for in call audio. When the call ends while a notification or ring tone is playing, the notification was not moved back to duplicated output (A2DP+speaker).
We must also make sure that the code that unmutes notification playback and stops the tone is called before the notification stream is moved back to duplicated output as it handles the volume and routing on hardware output only.
Also fixed a potential problem in active tracks counting when moving DTMF stream from A2DP output to hardware output when changing cal
l state.
2009-09-15 08:22:39 -07:00
Eric Laurent
ca6233b9a4 am 56357dc9: Merge change 23947 into eclair
Merge commit '56357dc98d4b886dcaa7218fe9286eae8bb6b8ad' into eclair-plus-aosp

* commit '56357dc98d4b886dcaa7218fe9286eae8bb6b8ad':
  Fix issue 2100324: Limit ringtone and notifications volume when a headset is connected.
2009-09-08 22:42:23 -07:00
Android (Google) Code Review
0cbca01ed2 Merge change 23947 into eclair
* changes:
  Fix issue 2100324: Limit ringtone and notifications volume when a headset is connected.
2009-09-08 22:40:06 -07:00
Dima Zavin
6e1bc508f6 am c9410082: libcopybit: Fix typo, and the build
Merge commit 'c9410082453abfb6eaaf43e6c97e04711d0751c0' into eclair-plus-aosp

* commit 'c9410082453abfb6eaaf43e6c97e04711d0751c0':
  libcopybit: Fix typo, and the build
2009-09-08 18:56:15 -07:00
Dima Zavin
03f9cb24dd libcopybit: Fix typo, and the build
Change-Id: I4f75e7ee4eff4f6159099de92ae3b4501ad7474a
Signed-off-by: Dima Zavin <dima@android.com>
2009-09-08 18:49:41 -07:00
Mathias Agopian
b18946ebc9 am 3f204e86: QSD8K supports 8x scaling
Merge commit '3f204e86d4a4449fa6196ba26e668d345e24bfb1' into eclair-plus-aosp

* commit '3f204e86d4a4449fa6196ba26e668d345e24bfb1':
  QSD8K supports 8x scaling
2009-09-08 18:07:17 -07:00
Mathias Agopian
f2d52d61f9 QSD8K supports 8x scaling 2009-09-08 16:18:51 -07:00