Moved audio (alsa actually) utils files to system/core/alsa_utils.
Renamed "audio" utilities to "alsa" to better relect their purpose.
Renamed audio_hw.c -> to audio_hal. c to better reflect its purpose.
Change-Id: I67c7d47ee02abafd3e12c4c99d605a62e0f59122
In a recording session , the number of bytes read is
not updated when pcm_read() fails. This results in
silence/invalid data being added during a device switch
from USB headset to handset.
Fix is to reset the number of bytes read if pcm_read()
returns an error indicating removal of USB headset.
Bug: 18611518
Change-Id: I10d578c3cf1037c90a891e63be2bd1c2b7e6126b
Do not read the ALSA PCM device configuration when playback
or capture is active.
Do not force ALSA profile update if card and device passed
to out/in_set_parameters() do not change.
Hold the main HAL lock when closing or opening the
ALSA PCM device.
Bug: 15520724.
Change-Id: I2b6087ed46ce7433de0b6dd8b24ec10de2e55d21
The number of channels can be "forced" using k_force_channels.
If the channel count proposed by AudioFlinger is not permitted
by the device, it is emulated.
Change-Id: Ib20e680c8f95adb84616a4fe52977f659cf4d6ca
Pass device address (and audio source for inputs) to
open_output_stream() and open_input_stream() audio HAL functions.
Bug: 14815883.
Change-Id: I5535677db3f3027917a31a7ed5c0a4c6bc013639
Refactoring alsa device attributes to alsa_device_profile.h/.c
Refactoring alsa device state to alsa_device_proxy.h/.c
Refactoring format functions into format.h/.c
Refactoring logging functions into logging.h/.c
Sundry (and extensive) code cleanup
Reworked locking on out_write() and in_read() to allow
simultaneous input/output
Bug: 15986827, 15856702, 12833166
Change-Id: I82c8d0ef252b2f95ee23f263dc175f4c883bfd64
Capture configuration was using cached_output_hardware_config
instead of cached_input_hardware_config.
Also enable mono capture by rejecting first attempt to open
an input stream in mono with -EINVAL error: AudioFlinger will reopen in
stereo and do the channel conversion.
Change-Id: Ibdf53be4aa88d47091745bc71daa1dec002535f8
out->dev->lock remains locked in error case in out_write()
Added pthread_mutex_unlock() in the error case
Bug: 12824374
Change-Id: Ibbbd5ced1f9d469cfba3b33a94414d0b94affa8f
Signed-off-by: Glenn Kasten <gkasten@google.com>
Changed audio device API version to 2.0 because of
new enums for audio input and output devices.
Removed implementations of get_supported_devices() in
stub and usb audio modules.
Change-Id: I09345d38929d931e5015e36d18259f5a5f950298
Also don't clear card and device when out_set_parameters is called
to set other parameters.
Change-Id: I4feda9f6a2e76cb45bbc8a8f8256bb1760302707
Signed-off-by: Mike Lockwood <lockwood@google.com>