summaryrefslogtreecommitdiffstats
path: root/audio
Commit message (Collapse)AuthorAgeFilesLines
...
* audio: always use PORT_MM2_UL for captureSimon Wilson2011-09-061-29/+15
| | | | | | | | | | | | PORT_VX and PORT_MM2_UL cannot be opened at the same time, and doing so causes loss of audio. When a voice call is taken when a video call is in progress, the modem is opened before the capture stream is ended so the problem occurs. Using PORT_MM2_UL ensures we don't hit this case. Fixes bug 5221406 Change-Id: Id6aa26e5321e74375a51b455aa55723df2287c35
* audio HAL: add audio pre processing.Eric Laurent2011-09-062-136/+744
| | | | | | | | | | | | | | | | | | Added support for audio pre processing and echo reference for AEC. Also: - added defines for ABE ports sampling rates - always select sub mic for camcorder and VoIP on speakerphone even if headset with mic is present - change mutex locking order: first hw device then stream. This allows calling functions on active output and input streams without releasing the hw device mutex. Aquiring the hw device mutex systematically in dtream read and write guarantees that a low priority thread waiting on the stream mutex will get it in a timely manner. Change-Id: I4abc9e56b30e7b72109db1961af76c6fd4c03be0
* audio: specify analog volumes in dBSimon Wilson2011-09-061-5/+8
| | | | | | | | | | This change applies conversions so that analog codec volumes can be specified in dB. It also restores the DL2 ABE gain to 0dB now that the ABE kernel code has been patched to prevent speaker distortion. The headset and speaker volumes are adjusted to take this change into account. Change-Id: I5cfe465e30e0c6a2424bd05e4a412eae8d878eba
* audio: enable sidetone for toro device when using earpieceSimon Wilson2011-09-021-1/+42
| | | | Change-Id: I4ea7f3795ba571fdd395f3fff4cd3e485d0e89a8
* Revert "audio: change pcm_config_vx channel from 1 to 2"Simon Wilson2011-09-011-1/+1
| | | | | | | | | This change causes bluetooth SCO audio during a call to be unreliable: often there is no call audio. Reverting this causes the downlink (bluetooth earpiece) audio to sound robotic, but the audio is more reliable. This reverts commit 3772f57d8332e7b2113bd35cd297b8fe00d20d15.
* audio: turn off output stages when not in useSimon Wilson2011-08-261-15/+36
| | | | | | | | The DAC widgets are turned off when not in use in order to save power. They must not be turned off when the output goes into standby if a call is in progress. Change-Id: I3d294a85a86e45c8acc257a8d92b92d7d9b2d4c3
* audio: check for active_input != NULL before followingSimon Wilson2011-08-261-3/+3
| | | | | | Fixes bug 5223164 Change-Id: I95557589b6d17df96de4235e8003157c6324917a
* audio HAL: use resampler from libaudioutils.Eric Laurent2011-08-262-47/+47
| | | | | | | Use resampler from libaudioutils instead of speex resampler directly. This change prepares integration of audio pre processing. Change-Id: Id985f7e46284fa038f16ecccaaa002b75e375a0f
* audio: set input volume based on use-caseSimon Wilson2011-08-261-35/+115
| | | | | | - Input volume is set based on capture, voip or voice call modes Change-Id: I8be69b6ac7a9c34aa27acbf69c42418256e2158d
* audio: change pcm_config_vx channel from 1 to 2Lee Min2011-08-251-1/+1
| | | | | | | | | | Actually, modem and bluetooth devices in tuna use I2S mode. If channel is setted 1, McBSP is setted PCM mode. On the other hand, if channel is setted 2, McBSP is setted I2S mode. To use I2S mode, We have to change channel from 1 to 2. Change-Id: I0c56ffd03805060783c428b4c70094103480bb4f Signed-off-by: Lee Min <min47.lee@samsung.com>
* audio: reduce DL2 ABE gain to reduce handsfree distortionSimon Wilson2011-08-241-3/+3
| | | | | | Also increase the codec volume to compensate. Change-Id: I34bd16141d70cd154df23ff815800bbace887e88
* audio: change time and method to change clock and audio pathUK KIM2011-08-221-3/+34
| | | | | | | 1. clock sync: after AP (mcbsp2) is enabled 2. audio path: according to AP's output device Change-Id: I5e0214bea31a722ce43fe92fb1d54bffb291cae9
* audio: reduce headset volumeSimon Wilson2011-08-181-1/+1
| | | | | | | | | | The headset volume needs to be reduced for two reasons: 1. Loud volumes trigger headset detection interrupts. 2. The current volume can damage hearing even on low sensitivity and high impedance headphones. Change-Id: I639bc8bc1505b6d2f22a8f5581c16583a721770c
* audio HAL: added support for TTY feature.Eric Laurent2011-08-091-1/+89
| | | | Change-Id: Ia38d9bea3c9abcd1ea505e7302382cb9f6b016c2
* audio HAL: implement microphone mute.Eric Laurent2011-08-091-2/+14
| | | | | | This fixes issue 5099308: AudioManager.isMicrophoneMute() always returns true on Prime. Change-Id: I7edf7aade2f46725e1fa9685744f21d63a4529a6
* audio: route to sub mic for audio captureSimon Wilson2011-08-091-6/+27
| | | | Change-Id: I5b3ef5b111bb4b50fd6d2100f0ed34f47f85cbe3
* audio: fix mic path when headphones are usedSimon Wilson2011-08-091-6/+8
| | | | | | | Fixes bug 5118167 - when headphones without a mic are connected, use the main microphone during a voice call. Change-Id: I846d923d71e88e65adf43001ab13a4d1927a696d
* audio: use sub mic for handsfree voice callsSimon Wilson2011-08-081-9/+31
| | | | | | | Using the sub mic is necessary to avoid echo due to the physical placement of the main mic. Change-Id: I716db818ec439d812f162b3f4170195c98c51539
* audio: use 0dB gain for all mixersSimon Wilson2011-08-031-6/+5
| | | | | | | | | A mixer gain of 118 (-2dB) was used to avoid noise caused by saturation in the ABE. However, this has been fixed with ABE firmware 9.46, so these gains can be restored to 0dB for maximum dynamic range. Change-Id: Id6a6ae5faeac8673faad3444d5e46e6469d5bd2d
* audio: rename earpiece enable control nameSimon Wilson2011-08-021-8/+10
| | | | | | | | In the latest ASoC kernel code, the earpiece enable control name has been renamed. Make the corresponding change in the HAL and print an error if all controls are not found to aid debugging. Change-Id: Idc56c383ab9d7b45afad4f54c02237cc4d0db236
* audio: add input routing supportChris Kelly2011-08-011-70/+174
| | | | | | | | | | | | | input routing supports switching between MM_UL2/VX_UL supported capture paths main mic, sub mic, headset mic and BT. If in call, the input is selected based on the current ouput device. This also manages the selected device per stream. Sub-mic capture path not tested. Change-Id: Ic6da0ef56cfa073b6383fcc389c5ad01a39a7c48 Signed-off-by: Chris Kelly <c-kelly@ti.com>
* audio: correct output set parametersChris Kelly2011-08-011-3/+4
| | | | | Change-Id: I90c957ce7436b52d2aa4339b21d91921e9e612ad Signed-off-by: Chris Kelly <c-kelly@ti.com>
* audio: use per-device maximum RIL volumeSimon Wilson2011-07-293-8/+21
| | | | | | | | | | The maguro and toro devices have different radios, each supporting a different maximum volume. Determine the maximum volume for the device from the ro.config.vc_call_vol_steps property and use that to calculate the volume to send to the RIL. Change-Id: I02921ed41ddbae90f8d3a149c05d37d3e87deab0
* audio: add missing locksSimon Wilson2011-07-251-0/+4
| | | | | | | | | | The device lock must be held when using the mixer because mixer_* calls are not thread safe. This fixes a bug where some mixer controls including the earpiece volume were not being set at boot. Bug: 5073076 Change-Id: Ide060ccad49e7276b7555428d2ff3ab399a5ce40
* Revert "audio: disable output stage when going into standby"Simon Wilson2011-07-221-33/+26
| | | | | | | | The audio output is put into standby during a call so this causes the earpiece and other output routes not to function in that state. Reverting until a better fix is ready. This reverts commit b1695f85e6d4a0baaf8bd3d190d02fe20d537824.
* audio HAL: added resampler on input streamEric Laurent2011-07-221-47/+129
| | | | | | Now supports capture at 8000, 11025, 16000, 22050, 24000, 32000, 44100 and 48000 Hz. Change-Id: I61526e94b8f0d315a1bf8d7587363a44c7d643ae
* audio: disable output stage when going into standbySimon Wilson2011-07-211-26/+33
| | | | | | | | | This should eliminate random clicks and pops heard when audio enters standby since the output stage is disabled before closing the PCM. In addition, this should provide a power savings in standby. Change-Id: Ief0a193e0b31e9ee2f03a58641eaebd2a0d344cb
* audio: reorganize route paths and add BT DL pathChris Kelly2011-07-201-40/+101
| | | | | | | | | | | | | | To better support multiple paths and prepare for input routing, the mixer controls were reorganized into front end and back end paths for the supported routes. BT-SCO downlink was also added. This allows more flexibiity in setting controls but does sacrifice some amunt of abstraction of the underliying ABE design. Change-Id: Ie225ae5bf90b1727178093a5f06636e6b17a737b Signed-off-by: Chris Kelly <c-kelly@ti.com>
* audio: correct low power port idChris Kelly2011-07-201-1/+1
| | | | | Change-Id: I48ffc54219360fbb5f22c695dea63ca269e6fb68 Signed-off-by: Chris Kelly <c-kelly@ti.com>
* audio: set in-call volume when user starts callUK KIM2011-07-191-1/+7
| | | | | | | | The RIL needs to have its voice volume reset every time a call is made, not every time the volume is changed from the upper layer. Change-Id: Id042da241de65f9dfb8d5c52e1b4bb910c7c0219
* audio: check for ril presence before calling into itKim Uk2011-07-193-56/+93
| | | | | | This prevents a seg fault if no ril is present. Change-Id: I5f9443e31bdcab07df21d9f12ed2dd92807300f8
* Fix issue 5048624: Native crash in video chat.Eric Laurent2011-07-191-1/+1
| | | | | | | | The problem is that the audio HAL returns a NULL string when get_parameters() is called from AudioFlinger. It should return return an empty string. Change-Id: I99365b54eb5f3c3b6694cb3e122842dff1799bfd
* audio: reselect output device when changing modeSimon Wilson2011-07-171-4/+8
| | | | | | | | | | | | | It's necessary to reselect the output device when changing from the AUDIO_MODE_IN_CALL state to AUDIO_MODE_NORMAL, otherwise the ASoC driver cannot find a route from the PCM to the endpoint. This is possibly a workaround for a bug in the ASoC driver. Also, this change means the audio HAL will no longer disable the multimedia mixer routes when in a call. This is because audio can be played during a call. Change-Id: I58c4b23289f8d6f9ad53b436215ec9a5d48f4fe1
* audio: use MM_UL2 port for 48kHz audio captureEric Laurent2011-07-141-9/+72
| | | | Change-Id: I0b45cbe4b1007c621c1c61491f94b7e3355eeb64
* audio: fix latency and buffer size calculationEric Laurent2011-07-141-11/+14
| | | | | | | | | | | | out_get_buffer_size() was returning the total buffer size in frames instead of the period size in bytes. It should also take the resampling into account so that the audio flinger buffer duration somehow matches the period duration. The calculation in out_get_latency() was assuming the period size in the pcm config structure is in bytes whereas it is in frames. Change-Id: I2025a89e753355bd321865faa726013e0a97912f
* audio: add support for multiple output devicesSimon Wilson2011-07-121-128/+51
| | | | Change-Id: I3cc1d6bd414301e82002153c08fa530c31527e48
* audio: put pcm into standby before changing output deviceSimon Wilson2011-07-121-2/+1
| | | | | | | | | | This avoids the high-pitched whine when changing the route from speaker to headset by ensuring that no bytes are being transferred through the ABE while the route is altered. It also means the workaround to avoid the kernel panic when exiting standby in out_write() can be removed. Change-Id: I67d391d003bd90892622a212b45a394e2d15ff70
* Audio HAL: added interface for audio preprocessingEric Laurent2011-07-111-0/+24
| | | | Change-Id: Ic784c7fa0e82f6ef398548741b603b55d902ae5c
* audio: output standby supportSimon Wilson2011-07-101-11/+36
| | | | Change-Id: I34894e039311e82feda05b0ac58b93518072244c
* audio: capture supportSimon Wilson2011-07-101-12/+130
| | | | | | | | - Enable start and standby of input stream - Not tested sample rates other than 8/16 - Capture causes a kernel panic if a sound is not played first Change-Id: I44ec338c7fb77c43b12f4d0ee19b9f12c7cc4ad6
* Fix audio output to play audio other than 44k stereoJean-Michel Trivi2011-06-281-0/+4
| | | | | | | | | | | | | | | When opening an output stream, the driver needs to return its format, sample rate and channel mask. Failure to do so will cause AudioFlinger to create the ouput as DIRECT, regardless of the output flags. The consequence of the output thread being in DIRECT mode is that no mixing is done (one sound at a time), and only audio that plays at the HAL's expected audio characteristics (44k 16bit stereo) can be played. The fix consists in returning the format, chanel mask and sample rate values when opening the output stream. Change-Id: Ib26e3337fe199efdba7a70b40df93518aceec04a
* audio: workaround ABE microphone disable problemSimon Wilson2011-06-271-6/+10
| | | | | | | | | The analog microphone uplink stops working if any downlink route is changed when the modem PCMs are open, so as a workaround, only modify the earpiece route when the modem PCMs are closed. Change-Id: Ib725a28da5130546015a9e05da4fca4955ce90bd
* audio: add headset output deviceSimon Wilson2011-06-271-11/+20
| | | | Change-Id: I0f5cb58d0f1fc0372f459a6fb55f30683da414d9
* audio: improve audio routing in voice callSimon Wilson2011-06-271-123/+192
| | | | | | | | With this change, the microphone now works during a voicecall. The handsfree (speaker) route also works but it currently uses the main mic instead of the sub mic. Change-Id: I37aaaefc523b5a6ebc88058c58ccb5443428e3fa
* audio: voice call supportSimon Wilson2011-06-244-31/+269
| | | | | | | - Also ensured that PRODUCT_PACKAGES is set so that the HAL is copied into the filesystem. Change-Id: I89790e5aec1d6beb7d4650316ec070503a35c436
* Enable audio supportSimon Wilson2011-06-202-0/+850
- PCM output works via music player - Sometimes ringtones fail to play - Modem routing is untested but present - PCM input needs to be implemented Change-Id: Ib58bef9674e1c9bb896be521c3d95c4e07e0442b