summaryrefslogtreecommitdiffstats
path: root/libaudio
Commit message (Collapse)AuthorAgeFilesLines
* am de21127c: Merge "libaudio: increase audio buffer size" into ics-mr1Eric Laurent2011-11-111-2/+2
|\ | | | | | | | | * commit 'de21127cf8438adbd481978fe874314433a06b30': libaudio: increase audio buffer size
| * libaudio: increase audio buffer sizeEric Laurent2011-11-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | Bring playback and capture buffer size back to their initial size. Current size was dictated by constraints in early voice processing implementation but is not necessary anymore. Increasing buffer size will help in power consumption and limit possible occurence of audio skipping during playback and capture. Change-Id: I7837c62e11700ed5c9a26f52fb27170add09721d
* | Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-55/+55
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I73e1ab4f4eadb55e747b3b2be4b6c1824dce7b2c
* audio HWL: removed unused code.Eric Laurent2011-10-104-745/+0
| | | | | | | Removed C++ implementations of echo reference and resampler not needed anymore now that libaudioutils is used. Change-Id: Ibedf96fbaeeb38ea06b35adf7c95ed49cbafa916
* audio HAL: fix some audio mode transitionsEric Laurent2011-09-081-3/+5
| | | | | | | | | The logic controlling the CP clock and audio path in setMode() was incorrect for certain transitions. In particular, the sequence IN_CALL -> RINGTONE -> IN_COMMUNICATION -> IN_CALL would cause a loss of call audio. Change-Id: I4a6bcca32e6e33f965874ad2219f2728b9035e4a
* audio HAL: C interface to libaudioutils.Eric Laurent2011-08-243-92/+142
| | | | | | | | Modifications for new C interface to echo reference and resampler. Also release echo reference if needed when closing an output stream. Change-Id: I9e8b524effad66798a61e80b5fec1779558cce1e
* Create library for common audio HAL functionsEric Laurent2011-08-182-21/+6
| | | | | | | Moved echo reference and resampler code to audio utils library so that they can be shared by other audio HALs. Change-Id: I7ab88843cc58ecc276bc4ccbbdc826c8c0b4a430
* audio HAL: new echo reference designAndy Gough2011-08-124-139/+225
| | | | | | | | The echo reference discards or inserts (silent) frames according to underruns or overruns. It always returns an echo buffer which delay from current capture buffer is 0. Change-Id: Ifea06a47fe87f2b75d4d04737c495a9867d1c4bd
* audio HAL: Update to latest tinyalsaEric Laurent2011-08-011-0/+6
| | | | | | add control for ALSA thresholds in pcm_config structure. Change-Id: I07f6f623b4102bfcb31dd772d93c8443a2d7f236
* Fix issue 4604090: notification sound interrupted.Eric Laurent2011-07-251-10/+0
| | | | | | | Removed wake lock acquisition from audio HAL. This is now done by AudioFlinger via PowerManagerService. Change-Id: I548a35eaf65fb27ea2cbed67cf89bef8f7eff830
* Audio HAL: added echo referenceEric Laurent2011-07-258-222/+1055
| | | | | | | | | | | Added EchoReference class enabling the input stream to access the audio data written to the output stream and push it as echo reference to the AEC. Also added methods to calculate the echo delay. Moved ReSampler class to a separate source file. Change-Id: I9c3388f39101d567240545eab271eb61c97e7b56
* Audio HAL: added audio pre processingEric Laurent2011-07-172-68/+177
| | | | | | Added calls to audio preprocessings for input streams. Change-Id: I1c655005b62b235e5d5d671634227f4a99eee43e
* Merge "Remove the simulator target from all makefiles. Bug: 5010576"Jeff Brown2011-07-121-5/+1
|\
| * Remove the simulator target from all makefiles.Jeff Brown2011-07-111-5/+1
| | | | | | | | | | | | Bug: 5010576 Change-Id: Ie6fa05f8d72bdf6da3b743a7f8c2464f9febc868
* | Audio HAL: added interface for audio preprocessingEric Laurent2011-07-112-26/+41
|/ | | | Change-Id: I0fcfbbddc9716e5c39b3d78032222c7babaa46bd
* Audio HAL: replaced downsampler by speex resamplerEric Laurent2011-07-053-385/+151
| | | | | | | Use speex resampler for more flexibility and prepare integration of audio pre processing which require upsampling. Change-Id: I7dd234bd89116d028655a043c84c1a18faf3bc67
* Use tinyalsa libraryEric Laurent2011-07-0510-2070/+45
| | | | | | | | | | Audio HAL now uses tinyalsa library to interface to alsa kernel drivers. Removed local thin alsa user space implementation. Also modified value of AUDIO_HW_IN_SAMPLERATE to match actual sampling rate when reading from kernel pcm device. Change-Id: Id0b2d166f3ab2f2291bf49b36c7085b21135ceea
* crespo/audio: build hal modules instead of libaudioDima Zavin2011-04-205-18/+27
| | | | | Change-Id: Ia4134c310a8e854d85c3584907a4da07355cc2b3 Signed-off-by: Dima Zavin <dima@android.com>
* am f127e463: am 2aedd44b: Merge "Fix issue 4126225: setMicMute() execution ↵Eric Laurent2011-03-181-9/+20
|\ | | | | | | | | | | | | time" into gingerbread * commit 'f127e46304c21af95f3e17e70db4581b40d46e02': Fix issue 4126225: setMicMute() execution time
| * Fix issue 4126225: setMicMute() execution timeEric Laurent2011-03-171-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | The cause is that the thread executing setMicMute() can wait for several seconds before acquiring the input thread mutex when audio capture is active. The fix consists in forcing a sleep of the capture thread when standby() (called by setMicMute()) wants the mutex. Applied the same fix to output stream and to setParameters() function. Change-Id: I3e55670d2aad16b67d44ca8582ed16398143ff6e
* | am e8106736: am d7657374: SOUND: set incall volume when user starts call.UK KIM2011-03-052-4/+17
|\ \ | |/ | | | | | | * commit 'e8106736688d60b730873969dba4b60a64cae5e3': SOUND: set incall volume when user starts call.
| * SOUND: set incall volume when user starts call.UK KIM2011-03-032-4/+17
| | | | | | | | | | | | | | | | | | modem side doesn't store volume setting when device is rebooted. When audio mode is incall, set current voice volume to modem. Current incall volume is stored when upper layer sets or AudioService is started. Change-Id: Icfeb0273dda55354e207d464884ef99f41c5fdec Signed-off-by: UK KIM <w0806.kim@samsung.com>
* | am 8164eaba: am d9e21463: Add additional statements to accept the crespo4g ↵Maarten Hooft2011-03-011-1/+1
|\ \ | |/ | | | | | | | | | | product * commit '8164eaba5b4846431997aa545f44bd158916b9e3': Add additional statements to accept the crespo4g product
| * Add additional statements to accept the crespo4g productMaarten Hooft2011-02-281-1/+1
| | | | | | | | Change-Id: I0e410d7b641c19a773c3bc57cb78e8aa3e27a3ff
* | am 2c9d4f75: am 303e0247: Merge "Fix issue 3436738." into gingerbreadEric Laurent2011-02-101-8/+10
|\ \ | |/ | | | | | | * commit '2c9d4f757248cae8ac673930f6ed2126f4ec3362': Fix issue 3436738.
| * Fix issue 3436738.Eric Laurent2011-02-091-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the AudioPolicyManager refreshes the device attached to the hardware output stream every time another output stops (in this case A2DP output). As there is no active stream on the HW output, the selected device is 0. As the shutter sound is short and there is some additional delay to setup the A2DP output, the sound is not yet out of the AudioFlinger mixer when the device is set to 0. On Crespo, device 0 is a valid audio path (means audio off) which is not the case on other platforms and therefore the output is disabled while the shutter sound is actually playing. The fix consists in ignoring requests to set the output device to 0 in the audio HAL. Change-Id: I7366e359a7d3a0f8207e7a5c879ced9078224002
* | am 4b36da0e: am 962f66ca: Added support for TTYEric Laurent2011-02-022-4/+56
|\ \ | |/ | | | | | | * commit '4b36da0e37942aa0547d2e31731f88b947f48a64': Added support for TTY
| * Added support for TTYEric Laurent2011-02-012-4/+56
| | | | | | | | Change-Id: I60e8ae30da4c3879bdd6a272dd65f6add4d1f520
| * do not merge bug 3370834 Cherrypick from master CL 79417Jean-Michel Trivi2011-01-214-44/+46
| | | | | | | | | | | | | | | | | | | | | | | | Rely on the audio input source parameter for mixer configuration. The generic APM implementation now passes the audio recording source as a configuration parameter, and uses the enum defined in mediarecorder.h. But the driver uses a string to define the "input source state". This change maps the input source to the string used by the driver. Change-Id: I5fce44579a3cda01ed73f67fb8c3091ef05cce76
* | am 92786a1c: am 27cc0c78: Merge "Fix issue 3305305." into gingerbreadEric Laurent2011-01-212-16/+62
|\ \ | |/ | | | | | | * commit '92786a1ce7e7dd078d1a5c05411715d4a617dc57': Fix issue 3305305.
| * Fix issue 3305305.Eric Laurent2011-01-182-16/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when the voice search tone is started, audio capture is still active and the output stream write function needs to place the input stream in standby to reconfigure the kernel driver. To do so it has to acquire the input stream mutex but as the input stream thread holds the lock most of the time while sleeping in the driver waiting for more data, this is very difficult and can take several seconds. The fix consists in forcing a sleep in the next read() when another function needs to acquire the input stream lock. The same change is done for output stream write() function. Also removed the workaround for issue 3201189 in setMode() (thread priority bump) as this change addresses the same problem. Change-Id: I3a5e672717752f83dfedce822a18748b165b0a5a
* | am 8e805326: am ee0ab929: Fix issue 3198397Eric Laurent2010-12-011-5/+6
|\ \ | |/ | | | | | | * commit '8e8053263ab53b1200d7204f44c6a480e5459862': Fix issue 3198397
| * Fix issue 3198397Eric Laurent2010-11-301-5/+6
| | | | | | | | | | | | | | | | Use only 15 bits for fractional part of the increment in resample_441_320() to avoid overflow when multiplying by the difference between previous and next samples in interpolated value computation. Change-Id: I9f5a726d11f6b051db390df3d13312f1ee782d3a
* | resolved conflicts for merge of d59093ec to masterEric Laurent2010-12-0115-3327/+4439
|\ \ | |/ | | | | Change-Id: Iab2b74f8eb505e3f474f2d768b1e00964c214526
| * Removed ALSA user space library and utilitiesEric Laurent2010-11-3016-3327/+4441
|/ | | | Change-Id: I0a6492f7c834ea572531e77f75486bcc385e345b
* Fix issue 3119463.Eric Laurent2010-10-221-2/+2
| | | | | | | | | | There is no call audio uplink when headphones w/o mic are connected. This change together with a corresponding change in the kernel driver adds a separate device for headphonjes without mic: output is routed to headphones and input is routed from built-in mic. Change-Id: I19955f76ece19f661ae25d6a42bbcbe235a9e652
* Several audio HAL fixes:Eric Laurent2010-10-212-18/+72
| | | | | | | | | Anton Rogozin <ant.rogozin@samsung.com> - Move RIL clock sync to starting of ringtone mode as requested by modem team - BT noise reduction turning off support Change-Id: I95a8157ca0da7a4432fe0d5bc3a4adba94cdb19a
* Fix issue 3113477.Eric Laurent2010-10-201-2/+3
| | | | | | | | | | Fix problem in audio HAL AudioStreamInALSA::read() function when the down sampler is used and a read error from kernel driver occurs: the requested frame count should be reset before calling the resampler again otherwise we loop for ever requesting 0 frames. Change-Id: Ie85f7a1db4e417f5c1d97c0f0e0f5a28a62ee92a
* Issue 3058745: fix audio HAL downsampler.Eric Laurent2010-10-181-6/+9
| | | | | | | | | | | Latest audio HAL downsampler implementation had a problem that caused one sample to be dropped if the input buffer size was odd while downsampling by a factor of 2. This explains why record timing was correct for 22 and 16kHz but not for 11 or 8kHz: in the later case, the second stage of resampling (22 to 11) receives 503 frames for each buffer. Change-Id: Ib8fcba3ddfbbab50a908e6b0a6cdc2b398acd862
* Issue 3060335: new input stream resampler.Eric Laurent2010-10-152-48/+543
| | | | | | | | | | Previous input stream downsampler implementation was very cheap and for functional tests only. The quality was not suitable to voice recognition. Integrated a higher quality resampler handling conversions from 44100Hz down to 22020,16000,11025 and 8000 Hz. Change-Id: I5d6de5c137717e02ca6024c852c9a67285fd2df5
* Contribute to fixing bug 3060335 Make Crespo honour voice rec modeJean-Michel Trivi2010-10-151-1/+1
| | | | | | | | | Crespo libaudio fails to use the Voice Recognition configuration when doing a recording on the VOICE_RECOGNITION input because the associated setParameter always returns before the value is set due to a cast error. Change-Id: Icc7c7edb5f680de82140d6ece4e536c0d9cb2419
* S5PC11X: SOUND: changed amix name for recognition and deleted unused codesDooHyunHwang2010-10-142-16/+5
| | | | | Change-Id: Ia714d2f16205773c7e30db1d9e03aba6b8f08cf7 Signed-off-by: DooHyunHwang <dh0421.hwang@samsung.com>
* Several Audio HAL fixes:Eric Laurent2010-10-132-19/+36
| | | | | | | | | | | | | | | | | | | Lakkyung Jung <lakkyung.jung@samsung.com>: S5PC11X: SOUND: Change h/w parameters setting in setDevice(). Audio input/output stream will be used snd_pcm_hw_params_set_period_size() and snd_pcm_hw_params_get_period_size() when setting h/w params. because we already know period values by bufferSize / periodSize. So we don't need to set period values. audio input stream will be used period value 4. Anton Rogozin<ant.rogozin@samsung.com> libaudio: RIL clock functionality RIL clock functionality was added. Change-Id: I9f8f8d8b2851562e3c1bed3e4c7ae896d7865331
* Fix audio record brokenEric Laurent2010-10-111-5/+6
| | | | | | | | | | Audio input stream can not be opened because function snd_pcm_hw_params_get_period_size() now returns an error. Probably due to one of the recent kernel commits. The result of this call was not used anyway with current patch so removed it. Change-Id: I36f2dbdc94e6ec726d9c0df063d0ec3702c1b94a
* only build the alsalib libaudio if the board uses alsalibBrian Swetland2010-10-101-0/+2
| | | | Change-Id: I6819ea28e0d16f163a00f8d25ba77506b144a886
* Fix several in call audio issues.Eric Laurent2010-10-082-113/+183
| | | | | | | | | | | | - 1: make sure that we restore normal mode in codec when the call is ended. - 2: make sure that we set in call mode in codec when the call is started even if output stream is playing. Merged support for special mic gain setting for voice recognition. Some more cleanup. Change-Id: I00ab773ec294f7b186b463177372ece5b520a386
* libaudio: code cleanup & RIL interface updateAnton Rogozin2010-10-075-1052/+563
| | | | | | | | | | | | | | | | Anton Rogozin <ant.rogozin@samsung.com>: Unused code removed, dynamic loading of RIL lib, alsa lib resampler turning on UK KIM <w0806.kim@samsung.com>: 1. deleted unneeded standby_l() and set_wakelock func() in each stream class. 2. use StreamOPS:close() to close stream. 3. reference new libaudio. Eric Laurent <elaurent@google.com>: Some more cleanup Fixed clicks when playing call ended tone Change-Id: Ieea1319262576b2f6680c675957643eacbab9c11
* Workaround in audio HAL to fix audio inputEric Laurent2010-10-012-313/+423
| | | | | | | | | Patched audio HAL to allow minimal audio input functionality until real fixes are submitted. This will allow features like voice search, VoIP, camcorder and mms audio record to work (with poor audio quality). Change-Id: I18acb120c5c398ccaeac11c462d629d41e33eef4
* Restore use of AudioPolicyManagerBase class.Eric Laurent2010-10-014-4135/+17
| | | | | | | | | AudioPolicyManager implementation must use AudioPolicyManagerBase for all default behavior. Crespo was using an implementation of AudioPolicyManager based on a pre Eclair version that did not derive from AudioPolicyManagerBase and thus was missing a lot of improvements and bug fixes. Change-Id: I0dd8de15047109d1534e532c924e9beb46fd23e6
* Better handling of libsecril stub.Jean-Baptiste Queru2010-09-261-1/+5
| | | | | | | | | | | Use a different name for the stub than for the real library, so that the real library still appears in the list of proprietary files. Also, use the real library instead of the stub when building an open-source build with the proprietary files. Change-Id: I570e7b86be5be5c8e18326c9438b5736f6019d44