summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* audio: Legacy: Use monotonic clock for presentation positionMisael Lopez Cruz2015-01-071-5/+13
| | | | | | | | | | The timestamp returned by AudioHAL's get_presentation_position() must be from the MONOTONIC clock. An additional flag has to be passed when opening the pcm ports in tinyalsa in order to get timestamps from the monotonic clock. Change-Id: Ib06c686985ae9229df59a2756c5da35e858e2d0e Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Use pcm_update_avail for voice input framesMisael Lopez Cruz2014-12-041-3/+2
| | | | | | | | | | | | | | | | | | | The pcm input stream is said to be "steady" when the ALSA buffer has available frames to read. However, the input stream could go into the XRUN state when the voice thread takes too long between explicitly starting the stream and querying the number of available frames. For the purpose of determining whether the input stream is ready, the XRUN state means that the ALSA buffer is full and the audio frames can be read immediately. The number of available frames was previously queried using the pcm_get_htimestamp() function which returns an error when the stream is in overrun state and doesn't update the number of available frames. The pcm_update_avail() function does return the amount of available frames regardless of the stream state. Change-Id: I3afbb6f3d274b5f4fbd7133e48d2cbe51c223ccc Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Use smaller ALSA buffersMisael Lopez Cruz2014-11-261-3/+3
| | | | | | | | Reduce the size of the ALSA buffers in order to reduce the audio latency. The new buffer sizes allow using fast tracks. Change-Id: I40f3af55cde72b1183d6fc8ffa8e01ecbef71a42 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Use BT sound cardMisael Lopez Cruz2014-11-261-9/+25
| | | | | | | | | | Starting in kernel-3.14, Bluetooth SCO audio has a separate sound card. Previously, BT SCO was a PCM device of the primary card. The index of the BT SCO card is found dynamically when present in the system. Change-Id: I5c24e07df48b836473ce56170f9b12e5aac9f975 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Zero-initialize allocated structsMisael Lopez Cruz2014-11-261-5/+5
| | | | | | | | | | Initialize to zeros the different structs used in the HAL. The HAL uses non-NULL checks to free temporary audio buffers. There were some aborts caused by freeing unallocated memory because the audio buffer pointers were not zero-initialized. Change-Id: I75ae704d5469e9e028bc7b67ef84b6a4047a7409 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Remove BT SCO workaroundMisael Lopez Cruz2014-11-261-16/+1
| | | | | | | | | | WiLink 8 is now able to provide the PCM clocks until the voice call is completely terminated, so there is no risk of blocking read() and write() calls anymore. The workaround is no longer needed, so it is removed. Change-Id: Idb9c4d9dc9e2940c9ce6a9f49448a2fa9ad76ae2 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Replace deprecated macros and methodsMisael Lopez Cruz2014-11-261-19/+9
| | | | | | | | | | | Replace deprecated macro audio_stream_frame_size() with the new per-stream direction macro: audio_stream_*_frame_size(). The get_supported_devices() method is also dropped as it's not required for API version 2.0. Change-Id: Ia7c1b6b020832401a0a6a018f704444ad465f78f Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Fix input channel mask macroMisael Lopez Cruz2014-11-261-1/+1
| | | | | | | | | An incorrect channel mask macro was used to report the input channel mask. The correct macro is: audio_channel_in_mask_from_count(). Change-Id: I1b5c10980ddc7b034654d899d159df80ccc50b81 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* jacinto6evm: update bluedroid configurationVishal Mahaveer2014-11-141-0/+8
| | | | | | | | | Update bluedroid device configuration to enable car related Bluetooth profiles. Reference patch taken from device/lge/hammerhead. Change-Id: Idc3a00c98ce5a0f89153ad248d45994ad414ef0d Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* Merge remote-tracking branch 'omap-mirror/d-kitkat-mr2.1-release-k3.14' into ↵Vishal Mahaveer2014-11-121-0/+1
|\ | | | | | | sync
| * audio: Legacy: Add DRA7xxEVM to supported cardsMisael Lopez Cruz2014-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an audio driver for the DRA7 EVM that supports a single PCM device (McASP3). The name of the card created by this driver is "DRA7xxEVM", so this name has to be added to the cards supported by this Audio HAL. The IN_CALL mode is supported in the Audio HAL but won't work with the "DRA7xxEVM" card because the PCM device used for BT is not implemented by the driver. Change-Id: Iacee36175cd4c90e74fce57f41cc6ca7c07291b9 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* | audio: Legacy: add parameters to open stream functionsVishal Mahaveer2014-11-051-2/+6
|/ | | | | | | Add new parameters needed in lollipop for open stream functions Change-Id: I69073c1fa908ef37d9097ed50fedc72cdd409a6d Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* audio: Legacy: Fix leave voice callMisael Lopez Cruz2014-08-281-1/+1
| | | | | | | | | The AudioHAL must leave the voice call only when it's no longer in the IN_CALL state. Previously, the voice call leave sequence was incorrectly executed when entering other modes (e.g. RINGTONE). Change-Id: Id0134706fcf1f5999a765c5152ff77ba15d86015 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: BT SCO voice call supportMisael Lopez Cruz2014-06-031-24/+507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Bluetooth SCO voice call has the following data flow: Uplink: +----------- SRC -----------+ | | McASP7 McASP3 | | Bluetooth Mic Downlink: +----------- SRC -----------+ | | McASP7 McASP3 | | Bluetooth Speaker The voice call uses the ALSA PCM devices that are normally used by the primary output and input. The primary output is switched to a null/dummy sink when the voice call starts, and switched back to the ALSA devices when the call ends. The null/dummy sink consumes the data at the same rate than an actual PCM device does, but does not render anything to an output device (e.g. speaker). Change-Id: I63a41de96c4ed34b60aab9240d10ad83c06c69ac Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Use audio_route for kcontrol settingsMisael Lopez Cruz2014-06-032-154/+10
| | | | | | | | | Simplify the kcontrol settings through the audio_route library. The control settings are now moved to a XML audio paths file. Change-Id: I72670523968a6646aea28e1625798b04f7a7799f Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Legacy: Initialize Variables to NULLAngela Stegmaier2014-06-031-0/+2
| | | | | | | | | If uninitialized, then a crash may result if they were not successfully allocated during the constructor and then the destructor runs. Change-Id: Iad15e558fe6ba9b42aab482511cd30c1476f0f18 Signed-off-by: Angela Stegmaier <a0866189@ti.com>
* audio: Legacy: Implement get_presentation_position()Misael Lopez Cruz2014-02-041-0/+28
| | | | | | | | | Implement the get_presentation_position() operation in the legacy AudioHAL of jacinto6evm. get_presentation_position() is a new stream out operation added in AudioHAL interface 3.0. Change-Id: Ifbaac4239596d03c7880695c0ec32290dc2fa64e Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Fix inverted mic mute stateMisael Lopez Cruz2014-01-131-1/+1
| | | | | | | | | "rs_capture" array holds the controls for the non-muted state, so set_route_by_array() requires the inverted value of the "mute" state parameter. Change-Id: I9274e7000ce6905fe54e79be4dce9c05e296855a Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Add OMAP_ENHANCEMENT to card name queryMisael Lopez Cruz2013-11-251-1/+3
| | | | | | | | | | | | | Primary audio HAL uses mixer_get_card_name() function (from tinyalsa which is under OMAP_ENHANCEMENT) to dynamically find the id of the McASP-based sound card. The dynamic search of the card must also be dependent on OMAP_ENHANCEMENT and provide a default card id if the flag is not defined. Change-Id: Id2c610e85d65bc5d559a0c9d1dda0359893a12fa Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* audio: Make audio_policy.conf a Pre-builtAngela Stegmaier2013-11-011-0/+8
| | | | | | | | | | | | Make audio_policy.conf a pre-built. This allows for a different audio_policy.conf to be copied based on which audio hal is used (legacy or other). The audio_policy.conf file is removed from the PRODUCT_COPY_FILES list and added to the PRODUCT_PACKAGES list. Change-Id: I0bde7c6b01e69cf184354fc354f63c652fdbc212 Signed-off-by: Angela Stegmaier <a0866189@ti.com>
* audio: Move jacinto6evm Audio HAL to new folderAngela Stegmaier2013-11-013-0/+1436
The existing Audio HAL is moved to a new folder named "legacy". This change is done in preparation for adding the multizone support to the same audio folder. Change-Id: Id8c7417a1b5f4fba59ab021bc136e7f451aac551 Signed-off-by: Angela Stegmaier <a0866189@ti.com>