302 Commits

Author SHA1 Message Date
Eric Laurent
ea53b07e8b Fix issue 2459650.
Modify input path for TTY VCO device from TTY_HEADSET_MIC to SPKR_PHONE_MIC.

Submitted on behalf of HK chen <HK_Chen@htc.com>
2010-02-22 08:50:12 -08:00
Eric Laurent
baa059dc44 Additional corrections for AudioHardware:
- 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>
2010-02-10 04:49:45 -08:00
Eric Laurent
4dc376fc19 Fix issue 2422322 again.
Correct merge error in previous commit ec78ad65a1110fe007c3bdaba824f66bbfe522e3: all changes sent by HTC were not included.
2010-02-09 09:51:58 -08:00
Iliyan Malchev
6052637fe6 libaudio-qsd8k: enable separate in-call TTY settings
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-08 15:58:37 -08:00
Eric Laurent
6c9e41a01b Partial fix 2422322: [Passion#VZW] audio issues found with release CL24761.
This Change fixes issues 1 and 2.1 reported by HTC.

Submitted on behalf of HK Chen <HK_Chen@htc.com>
2010-02-05 09:43:36 -08:00
Eric Laurent
9f78b4b74d Merge "Fix issue 2418435: Device is rebooted after pairing with A2DP/Bluetooth and made a call to other phone." into eclair 2010-02-05 09:31:13 -08:00
The Android Open Source Project
6390084fa4 reconcile main tree with open-source eclair 2010-02-05 08:09:38 -08:00
Eric Laurent
0b673f7c27 Fix issue 2418435: Device is rebooted after pairing with A2DP/Bluetooth and made a call to other phone.
This change removes the temporary fix for this issue.
The actual fix is in vendor/htc/passion/AudioBTID.csv.
2010-02-05 05:23:51 -08:00
Eric Laurent
3f6a9031d1 Temporary patch for issue 2419260.
Comment out code that causes kernel crash reported in issue 2419260 until HTC provides a real fix.
2010-02-04 11:52:15 -08:00
Eric Laurent
0cef292e23 Fix issue: 2413494: [Passion-c] Add TTY support.
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.
2010-02-03 23:35:06 -08:00
Iliyan Malchev
2b2d936767 libaudio-qsd8k: updates for passionc
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-02 13:46:58 -08:00
Iliyan Malchev
abb2ce35f7 libaudio-qsd8k: fix a1026.h kernel header include
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-02 12:27:15 -08:00
The Android Open Source Project
96112ea629 reconcile android-2.1_r1 snapshot 2010-01-29 14:09:19 -08:00
Eric Laurent
28d83cacec 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.
2010-01-20 07:35:43 -08:00
Eric Laurent
feb072009b 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.
2010-01-18 11:25:47 -08:00
Jean-Michel Trivi
54c67204c7 Patch from HTC: fine-tuned acoustic parameters for car-dock wasn't loaded correctly. 2010-01-13 16:11:52 -08:00
The Android Open Source Project
44311757be android-2.1_r1 snapshot 2010-01-12 15:19:05 -08:00
Eric Laurent
ad9454a375 Fix issue 2336461: [Passion] one issue about in-call downlink volume degration.
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.
2009-12-23 02:40:46 -08:00
Eric Laurent
747fe9dee4 Fix issues 2333450 and 2333559:
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.
2009-12-17 10:25:47 -08:00
Jean-Michel Trivi
44f3cda621 Use the media.enable1026 system property to indicate whether the
dual microphone noise suppression should be used during a phone call
in handset mode. The disabling is performed by using the same A1026
settings as those used in Voice Recognition when not using the
Noise Suppression algorithm. This mode uses the exact same input
and gains as the incall receiver mode (A1026_PATH_INCALL_RECEIVER)
A new mode (A1026_PATH_INCALL_NO_NS_RECEIVER) is defined for code
clarity.
2009-12-15 20:43:36 -08:00
Eric Laurent
c7e6a92679 Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
This correction in AudioPolicyManager does not directly fix the issue but a potential problem identified when working on the resolution.
The problem is that audio output path is not updated immediately when a headset is unplugged if music or notifications are active. This is however not observable because:
- music is paused by music app when the headset is unplugged, and correct path is re-established when music is resumed.
- ringtones and notifications are playing on both headset and speaker and are still audible on speaker when the headset is unplugged even if
the actual output path is not changed to speaker only.

There could be an impact on applications using MUSIC stream and not reacting to Intent AudioManager.ACTION_AUDIO_BECOMING_NOISY though.
2009-12-14 02:56:04 -08:00
Dima Zavin
7e8932dad3 gralloc-qsd8k: make sure that we never try to allocatio 0 bytes
Change-Id: Ic05b895c09a55d746c737aa0c3356edc511d7c96
Signed-off-by: Dima Zavin <dima@android.com>
2009-12-09 21:13:44 -08:00
Android (Google) Code Review
8451e38453 Merge change I667fff6d into eclair
* changes:
  Fix bug 2111240 When docked to a BT dock, give priority to wired accessories over BT, and don't duplicate outputs for notifications.
2009-12-09 11:47:01 -08:00
Jean-Michel Trivi
4fc9cbccc1 Fix bug 2111240 When docked to a BT dock, give priority to wired
accessories over BT, and don't duplicate outputs for notifications.
2009-12-09 10:32:03 -08:00
Mathias Agopian
e17d093d0c improve cache behavior of gralloc allocations on qsd8k
make sure to use cached buffers only when frequent cpu access is needed.
also, always flush buffers after they are allocated and cleared.
2009-12-08 19:34:43 -08:00
Eric Laurent
148f11328f Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
Fixed AudioPolicyManager::getInput() broken in change ddb78e7753be03937ad57ce7c3c842c52bdad65e
so that an invalid IO handle (0) is returned in case of failure.
Applied the same correction to getOutput().
2009-12-07 04:23:46 -08:00
Dima Zavin
6d4fd653ce gralloc-qsd8k: If using gpu composition, request rgba8888 instead of rgbx8888
Change-Id: Ic41d4854d6acbc21c85a03e82bd63af234273886
Signed-off-by: Dima Zavin <dima@android.com>
2009-12-04 20:22:41 -08:00
Dima Zavin
62447949f2 gralloc-qsd8k: Change composition_complete being a glfinish from stopship to a TODO
We really need to fix this eventually, but it's not a ship blocker.

Change-Id: I35f66988e7adba13e47c2a86e13a7425cc5aada3
Signed-off-by: Dima Zavin <dima@android.com>
2009-12-04 15:41:54 -08:00
Eric Laurent
5cc6387254 Fix issue 2304701: Media streams can remain muted on A2DP output.
The problem comes from the fact that when a notification is played on both headsets + speaker,
the media strategy is muted. It is only unmuted when a new device is selected on hardwate output
(for instance headset only when music starts).
If an A2DP output is created while music is muted, AudioFlinger with use the last value received
for music volume to initialize the music stream volume on the newly created A2DP output, which in
this case is 0. The code in audio policy manager that applies stream volumes after the A2DP output
has been created is inefficient here, because as music stream is muted, the request to change the
volume is ignored.
As next time music starts it is now played over A2DP output and not on HW output,
no device modification is done on HW output and the music streams remains muted.
This is also applicatble to SYSTEM and TTS streams.

The fix consists in keeping a stream mute count on each output separately instead of a global stream mute count.
Thus when the music volume is re applied after A2DP output creation, the request is not ignored as the music stream is not
muted on A2DP output.
2009-12-04 07:01:06 -08:00
Dima Zavin
be6f97aad3 libgralloc-qsd8k: Do not use the physical address of surfaces/framebuffer
The GPU now correctly maps everything throug hthe MMU so physical addresses
are no longer needed.

Change-Id: Id16a690f63d7141c8ee6694b246b1955f450b8ed
Signed-off-by: Dima Zavin <dima@android.com>
2009-12-02 21:15:33 -08:00
Android (Google) Code Review
3b81370104 Merge change I14a54ae2 into eclair
* changes:
  Patch from HTC: changes in libaudio - remove redundant ACDB updates for audio playback and recording. - remove redundant ACDB updates for audio route changes during playback or recording. Along with the matching audio driver change, this fixes b/2275992 and click before playback and AudioHardware is going to standby.
2009-11-30 16:24:27 -08:00
Eric Laurent
b65217ffe2 Fix issue 2192673: Music Pausing Even when notifications are set to silent.
If a stream cannot be muted (ENFORCED_AUDIBLE stream in some countries), make sure that getStreamVolumeIndex()
returns the actual stream volume.
2009-11-27 05:06:23 -08:00
Jean-Michel Trivi
e204be3647 Patch from HTC: changes in libaudio
- remove redundant ACDB updates for audio playback and recording.
- remove redundant ACDB updates for audio route changes during playback or recording.
Along with the matching audio driver change, this fixes b/2275992
and click before playback and AudioHardware is going to standby.
2009-11-24 16:40:49 -08:00
Mathias Agopian
1e1a87f0a5 part of fix [2186418] switch qsd8k devices to 24-bits framebuffer
Add support for 32 bits framebuffers
2009-11-23 23:19:54 -08:00
Eric Laurent
bbb5f58f76 Improvement for issue 2197683: English IME key-press latency is noticeably higher on passion than sholes.
Change audio buffer count to match number of buffers used by audio dsp.
Change buffer size from 4800 bytes to 3072 bytes to reduce output latency.
2009-11-21 00:45:02 -08:00
Eric Laurent
d8c81ab5d3 Issue 2276684: Kernel audio driver should fully support AUDIO_SET_CONFIG.
Align HAL audio input buffer size with kernel driver for the time being.

For mr2 release the driver shall support AUDIO_SET_CONFIG.
2009-11-20 09:57:40 -08:00
Jean-Michel Trivi
e00f5f2bb9 Patch from HTC related to use of camcorder with wired headset plugged in:
- libaudio: incorrect ACDB setting was used when starting to record
   with wired headset.
- libaudio: remove unnecessary audio path switch when camcorder is started
  with wired headset.
Submitted on behalf of HK Chen <hk_chen@htc.com>
2009-11-18 19:32:44 -08:00
Jean-Michel Trivi
b5f536cb89 Remove workaround introduced in 956f7ba5ee0f087c91b5fefd2718dae30f8c1e29
to fix issue 2229040. This workaround is considered no longer useful
by HTC since the changes in the A1026 configuration.
Removing workaround on behalf of HK Chen (HTC).
2009-11-15 13:48:42 -08:00
Eric Laurent
dc2b08fd2a Fix issue 2245963: incoming call rings in ringtone-volume level through a wired headset is while listening to music.
When the ringtone is not looped (non factory ringtone), a new AudioTrack is started every time the ringtone is repeated. The second time the track is started, the condition that triggers volume limitation is not true any more as music has been stopped for more than SONIFICATION_HEADSET_MUSIC_DELAY seconds and ringtone volume is not limited.

The fix consists in checking the condition (music playing or stopped for less than SONIFICATION_HEADSET_MUSIC_DELAY) when entering ringtone mode and latch it until we exit ringtone mode.
2009-11-13 02:57:12 -08:00
Jean-Baptiste Queru
81cd37b750 eclair snapshot 2009-11-12 18:46:07 -08:00
Eric Laurent
b0987a90f9 Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
Removed platform specific devices from the list of devices listed in AudioSystem.
2009-11-12 12:18:31 -08:00
Android (Google) Code Review
e961f58156 Merge change I42e2860a into eclair
* changes:
  should help [2223746] qsd8k MDP locks up, logs show copyBits failed (Connection timed out) in Passion camera zoom level 1
2009-11-11 16:45:41 -08:00
Mathias Agopian
ef686c51fd should help [2223746] qsd8k MDP locks up, logs show copyBits failed (Connection timed out) in Passion camera zoom level 1
make sure to return an error when mdp limits are exceeded
2009-11-11 16:28:21 -08:00
Eric Laurent
e210a8ccce Workaround for issue 2229040: [Passion] Audio driver stuck when changing input routing while recording is active.
This change avoids the audio driver lockup when changing audio input path configuration. It does not solve the root cause in audio driver or dsp.
When applied lockups observed in the folling use cases are eliminated:
- use back mic for camcorder recording (issue 2194140)
- switch input device when headset is plugged in or out during record (issue 2226658).

Also removes warnings.

	Submitted on behalf of H.K Chen <hk_chen@htc.com>
2009-11-11 10:49:32 -08:00
Android (Google) Code Review
a6675bb910 Merge change I08516fe5 into eclair
* changes:
  libaudio-qsd8k: update a1026.h header and improve firmware-loading code
2009-11-10 15:20:02 -08:00
Android (Google) Code Review
05a1ef9930 Merge change I108ada59 into eclair
* changes:
  Fix issue 2226658: Audio path not updated when a headset is plugged or unplugged while recording.
2009-11-09 22:39:39 -08:00
Mathias Agopian
9e8b8a119d enable mdp debugging on error, also check for invalid inputs 2009-11-09 20:15:50 -08:00
Iliyan Malchev
84abafaf65 libaudio-qsd8k: update a1026.h header and improve firmware-loading code
-- new a1026.h kernel header that contains just the user-space API and is
   sanitized through bionic/libc/kernel/tools/clean_header.py
-- AudioHardware.cpp:
	-- replace vr_mode with vr_mode_enabled, and use 0 and 1 instead of
	   A1026_VR_MODE_DISABLED/ENABLED, which is not defined in the kernel
	   header;
	-- in doA1026_init(), replace a fread() of 1 byte with a read that as
	   much as possible from the firmware file in as few as possible passes
	   before we call into the kernel
	-- Replace the size of the on-stack f/w buffer with A1026_MAX_FW_SIZE,
	   which now comes from the kernel header
	-- Fix up some signed-unsigned comparison warnings on mBluetoothIdTx

Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-11-09 16:06:57 -08:00
Eric Laurent
920fea9258 Fix issue 2226658: Audio path not updated when a headset is plugged or unplugged while recording.
Modified AudioPolicyManager::setDeviceConnectionState() so that the device on active audio input is updated when a device is connected or disconnected.
2009-11-09 11:57:59 -08:00
Jean-Michel Trivi
af1701fa98 When configuring the A10026 for microphone input outside of a call,
always use the A1026_xx_RECEIVER paths.
This prevents the use of the A1026_xx_SPEAKER paths for voice reco
modes for which the gain is too high.
2009-11-08 18:50:57 -08:00