• Home
  • History
  • Annotate
  • only in /hardware/msm7k/libaudio/
History log of /hardware/msm7k/libaudio/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9d5cb0ab6a94985f12b0ec4122a2e540703d8fd8 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I7ed4d5a084b06ecf1cca6226c2b39d6b460c0171
ndroid.mk
8dd179b07f00e35208dd4cf48e14264717e8d5a0 19-Mar-2010 Jean-Baptiste Queru <jbq@google.com> Add tags and notices where appropriate.

Also tweak copyright notices as appropriate.

Bug: 2084753
Change-Id: Ifbf795b8b16dbc45cf5ac9a72b97f2b74cbf3550
udioHardware.cpp
udioHardware.h
ODULE_LICENSE_APACHE2
OTICE
15512dd4e7c00a0cb680c98d163cf32c449c3fa4 19-Feb-2010 Eric Laurent <elaurent@google.com> Issue 2071329: audio track is shorter than video track for video capture on sholes

Add API to retrieve number of frames dropped by audio input kernel driver.

Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
udioHardware.h
11c6a166fa684a2e44d22a142aad106f74a9409f 02-Feb-2010 Eric Laurent <elaurent@google.com> Fix issue 2410159: Camcorder: audio capture is sometimes silent when a wired headset is plugged on Passion.

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.
udioHardware.cpp
udioHardware.h
3b9744cccd99fd9f32ae3b99fbc8d6898b118a43 20-Jan-2010 Eric Laurent <elaurent@google.com> Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync

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.
udioHardware.cpp
udioHardware.h
59ba5f108773b4fb2b8018000eb848af4920a973 10-Dec-2009 Eric Laurent <elaurent@google.com> Create base class for audio policy manager.

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.
ndroid.mk
udioPolicyManager.cpp
udioPolicyManager.h
7500eded35ce173525d7fc1e8172679188d3b33a 17-Dec-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
1470dcd7fa90b3367dac9c8dd866d472f2e7ad55 08-Dec-2009 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 2111240 When docked to a BT dock, give priority to wired
accessories over BT, and don't duplicate outputs for notifications.
udioPolicyManager.cpp
0a6561450eddb6b13f56392fb116d6ed2ef3694f 27-Nov-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
979de023050ebe82680c665259fc833b0a17d3f5 13-Nov-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
udioPolicyManager.h
dd65e38951ed174f9d3d34886795438440f7eea0 12-Nov-2009 Eric Laurent <elaurent@google.com> 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.
udioHardware.cpp
udioPolicyManager.cpp
108ada59a8b049a395cbe2f66c267dca7f533173 31-Oct-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
udioPolicyManager.h
739de5f36523862a7caa15590bd6b680b6cd2854 05-Nov-2009 Jean-Michel Trivi <jmtrivi@google.com> 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.
udioPolicyManager.cpp
63e2c0ab3b3cfac68ed3832adfbf4e5a0b32ed8f 03-Nov-2009 Eric Laurent <elaurent@google.com> Log for issue 2203561.

Added detailed dump for AudioPolicyManager when AudioPolicyService is dumped.
udioPolicyManager.cpp
udioPolicyManager.h
da9d5ab10524c32d7949363a10fde1bec5fdf9fa 31-Oct-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
0bf3ac2c797fc9e1a327f867d69bbb0b54a68ffa 16-Oct-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
7eda9410e218b2f2ff3f776897fbc1b679b6132d 21-Oct-2009 Eric Laurent <elaurent@google.com> 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)
udioPolicyManager.cpp
udioPolicyManager.h
34a989e873c51c4fbef5beaf068283e82f41ff29 10-Oct-2009 Eric Laurent <elaurent@google.com> Fix issue 2172934: AudioHardware for msm7k: some file descriptor tests must be fixed.
udioHardware.cpp
ee997372b7d4aea4966d0c27cbd11fe43de31197 25-Sep-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
udioPolicyManager.h
3afbbd67f3ebb93e7f59209591dbb8f2c76b8f7d 25-Sep-2009 Jean-Michel Trivi <jmtrivi@google.com> 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.
udioPolicyManager.cpp
dc4d5ad6482f97e33366f32ad2afd2a304810fb7 15-Sep-2009 Eric Laurent <elaurent@google.com> 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.
udioPolicyManager.cpp
cbf64e4727d014ec7d380aa7e55471662d7c3998 04-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 2100324: Limit ringtone and notifications volume when a headset is connected.

Apply the following rules to ring tones and notifications to avoid sound level bursts in user's ears:
- always attenuate ring tones and notifications volume by 6dB
- if music is playing, always limit the volume to current music volume, with a minimum threshold at -36dB so that notification is always perceived.
udioPolicyManager.cpp
udioPolicyManager.h
0067987bcb374646df59338eeeaec01e9b8bb73d 01-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 2091594: music chirp after disconnecting A2DP.

Mute media streams during 2 seconds while the music is being switched from A2DP output to hardware output and before it is paused by the music application.
Also improve code readability by using pointers to output descriptors.
udioPolicyManager.cpp
5cc0bbfaab4dcaf01f103f4110da592113092366 31-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2085730: AudioPolicyManager: The A2DP output descriptor is not released if the associated duplicated output cannot be opened.

The fix consists in deallocating the A2DP output descriptor when the duplicated output opening fails in AudioPolicyManager::setDeviceConnectionState().
udioPolicyManager.cpp
aa1d75e66a38efdce21e944b5ddbe42ad634480f 31-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2085911: Volume control is broken when A2DP headset is connected.

A regression on volume control was introduced by change 22899. When a volume change was requested on 2 different outputs for the same stream, the change on the second output was ignored because the requested value was the same as current one.
The fix consists in storing current stream volume for each output instead of globally for all outputs.
udioPolicyManager.cpp
udioPolicyManager.h
63ca66ea9da5ea61806ee547f3aa1c498ac235fe 27-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2080258: audio routing is not reset when call ends.

Modify AudioPolicyManager::setPhoneState() to force a routing command to audio output when call ends or starts even if the same device is selected.
Implement AudioHardware::setMode() to force routing change to be taken into account when phone state changes.
udioHardware.cpp
udioHardware.h
udioPolicyManager.cpp
ab33521bf196ab29cc308d745f53ecadfd4a4499 27-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.

The problem is partly due to the fact that if music is playing in the headset, a routing change is done to play the shutter sound in both headset+speaker. When the shutter sound ends, the routing is reset to headset, but the change is immediate and there is still audio data pertaining to the shutter sound in the audio hardware buffer queue. As the shutter sound is short, sometimes none of it is output to the speaker before the audio path is reset to the headset.
Another factor is the long time taken by the audio hardware to execute some routing or volume change commands (especially in call volume). Current AudioPolicyManager design reapplies all stream volumes when the output device is changed which adds an unecessary delay in the routing command execution.
Another side problem is that althoough the music is muted while the shutter sound is played, the audio latency makes that some music is heard briefly before the shutter sound in the speaker.
In addition a regression in change 21083 broke the mute mechanism.

This fix consists in:
1 Delay the routing change when the shutter sound stops by a duration longer than the audio output latency.
2 Do not send unecessary volume changes by comparing current value with requested value.
3 Wait until the music is muted before proceding with the reset of the audio routing change when starting the shutter sound.
4 fix mute regression
udioPolicyManager.cpp
udioPolicyManager.h
c3f6bc2515358f41a93a70059c4d71dfacd199ac 13-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2001369 take 2.

The fix in build 8601 did not address the in call mode.
We now consider the headphones without mic as a valid device for phone strategy.
udioPolicyManager.cpp
f4e887e4566c429c2184ee4707c3cdacc57e18f4 13-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2051565.

AudioPolicyManager must prevent that VOICE_CALL stream volume is changed while BT SCO route is on for voice call and also that BLUETOOTH_SCO stream volume is changed when BT SCO route is off.
This rule was only applied to volume change requests coming from outside AudioPolicyManager.
Make sure that this rule applies also to internal requests.
udioPolicyManager.cpp
udioPolicyManager.h
d4660a06ca581ddb50cebfbd8c37ee0ce13c49b9 12-Aug-2009 Eric Laurent <elaurent@google.com> Workaround for issue 2046783.

Apparently the problem is caused by the fact that A2dpAudioStreamOut::standby() calls a2dp_stop() after the headset has been powered down.
The workaround consists in indicating to A2DP audio hardware that a close request is pending and that stanby() must be bypassed.
udioPolicyManager.cpp
16327daa90dffd97f03d24c59ec0a4d38aa94b90 06-Aug-2009 Eric Laurent <elaurent@google.com> Added support for bluetooth car kit.
udioHardware.cpp
udioPolicyManager.cpp
ba82e89c4f28c62a58d71499ce2107eecfddaf13 07-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 9654

* changes:
Fix getParameters() default implementation.
2de62442528dc6cb113c43635db5ef971c1ddbd9 30-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 001214: AudioFlinger and AudioPolicyService interfaces should not use pointers as handles to inputs and outputs.

Changed output handles format in logs.
udioPolicyManager.cpp
5367905c4fdf3c1e6ace9b82cc9705783264a328 05-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2035414: AudioPolicyManager: Possible audio routes must include the headset without mic + speaker combination.

Added headphone + speaker combination in AudioPolicyManager.
udioPolicyManager.cpp
ba77ed6e3c6006d2797867f14ffd01e99cafc03b 04-Aug-2009 Eric Laurent <elaurent@google.com> Fix getParameters() default implementation.

Do not return empty string but key value pairs with empty values.
udioHardware.cpp
c5993470d22166e714bf9db8dfe608c66c2c7fac 03-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2029923: DTMF tones not always routed to BT SCO.

Switch DTMF stream from/to A2DP output to/from hardware output when changing call state even if DTMF stream is
not active.
udioPolicyManager.cpp
d94f88e7b717bc4f5f523d64cf7f7270cc86a541 28-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2004229: DTMF tones play through earpiece (G1).
udioPolicyManager.cpp
c7b161f847ce167042ec1b4a9a30f5f85780281d 24-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2001204: libaudiopolicy.so and libaudiopolicygeneric.so libraries must be pre-linked.
ndroid.mk
2735e3b55bdaf33cfd0dbaa1b914231243933e92 17-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1795088 Improve audio routing code

Integrated comments after patch set 1 review.
Enabled tone playback instead of notifications while in call.
ndroid.mk
udioHardware.cpp
udioHardware.h
udioPolicyManager.cpp
udioPolicyManager.h
35f70b5d158659c59981365ecd8e2acfb09b3181 20-Jul-2009 Brian Swetland <swetland@google.com> libaudio: correctly start in absence of libhtc_acoustic.so

This exit path failed to set mInit = true;

Signed-off-by: Brian Swetland <swetland@google.com>
udioHardware.cpp
d498a9ce9863bd979d3403473568c6e1e38b7dae 17-Jul-2009 Brian Swetland <swetland@google.com> enable libaudio for qsd8k, and make it non-htc-device friendly

Currently libaudio supports an htc extension for audio parameter
adjusting (fine), but this extension breaks on non-htc devices (not
fine). This change makes nonexistence of the htc extension non-fatal.

Signed-off-by: Brian Swetland <swetland@google.com>
udioHardware.cpp
d3f960b7f4401fae773bca8d93c3c72b9df1476b 22-May-2009 Eric Laurent <elaurent@google.com> Fix issue 1846343 - part 1

This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
udioHardware.cpp
597296efb5c7727294b69c3c756d71ae1c509eb1 20-May-2009 Dave Sparks <davidsparks@android.com> Remove deprecated openInputStream factory method
udioHardware.cpp
udioHardware.h
9e8b6821afad923dcc616768f7582545c90a0bc6 19-May-2009 Dave Sparks <davidsparks@android.com> Modify openInputStream function to add inputSource type
Continuation of bug 1846343
udioHardware.cpp
udioHardware.h
d066973de83218a24c773e5de04d10ed2d730873 25-Mar-2009 Eric Laurent <> Automated import from //branches/donutburger/...@141204,141204
udioHardware.cpp
udioHardware.h
8b92ab9125682b71b5d7066b7818aa777402c8e0 13-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@138607
luetoothHeadsetTable.h
ODULE_LICENSE_APACHE2
OTICE
7510aaf4b3a3c545d943b09e0fb9f56ea2fc5e24 12-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
ndroid.mk
udioHardware.cpp
udioHardware.h
3ccfb0bb4f6f8c18d5b66b5568a9aa1d969a598a 04-Nov-2008 Iliyan Malchev <malchev@google.com> update libaudio to new snd-driver ioctls

Signed-off-by: Iliyan Malchev <malchev@google.com>
udioHardware.cpp
udioHardware.h
a3a947cc7e1bfaf7b5cfc85b71f602edf562836d 29-Oct-2008 Brian Swetland <swetland@google.com> msm7k hardware glue, initial checkin: libaudio
ndroid.mk
udioHardware.cpp
udioHardware.h
luetoothHeadsetTable.h
ODULE_LICENSE_APACHE2
OTICE