summaryrefslogtreecommitdiffstats
path: root/modules/usbaudio
Commit message (Collapse)AuthorAgeFilesLines
* Add USB out_get_presentation_position() for timestampsAndy Hung2015-08-061-2/+10
| | | | | Bug: 21196672 Change-Id: Ic509e91a9c0d3421b78371207d7e63425e895e71
* audio HAL: reverse mutex locking orderEric Laurent2015-06-191-26/+51
| | | | | | | | | | | | Do not use main audio HAL mutex but a specific stream mutex when preventing control thread starvation by playback or capture threads. This will prevent systematic locking of main HAL mutex in read ot write and avoid glitches. Bug: 21880828. Bug: 18489202. Change-Id: I3054e0d93b823bd9d2fb84a49e9c5bbbe728262a
* Update USB channel mask handlingAndy Hung2015-06-101-2/+8
| | | | | | | | 1 and 2 channels will default to mono and stereo n > 2 will default to channel index masks Bug: 16245854 Change-Id: I39f9d43385a93f48e323653fbde2e38a99b6256f
* Remove unused data conversion functions from usb halAndy Hung2015-05-111-68/+0
| | | | Change-Id: I4ccf8441171ad796e8954b1960f76411ebb86e9d
* Add output channel index mask to USB halAndy Hung2015-05-111-7/+18
| | | | Change-Id: I17818ac89f7ca591422cadfaa388590ff9c08613
* Add multichannel input to USB halAndy Hung2015-05-111-65/+35
| | | | Change-Id: I297669f7ba5a711923cf2f371d161819fad04740
* Back out locking order and (over) simplification in out_write(), in_read().Paul McLean2015-02-201-3/+4
| | | | Change-Id: I96954f883798f8e10adce56d9c33b70574999d1c
* USB device disconnect latencyPaul McLean2015-02-201-42/+3
| | | | | | | | | Eliminated unnecessay locking/unlocking in adev_set_parameters(). Corrected and simplified lock/unlock order in out_write() and in_read(). Bugs 19363750 Change-Id: Iede9a95f5f17645d9780b344fd5ee009cd9fa94d
* Improve locking/unlocking in *_set_params().Paul McLean2015-02-181-21/+27
| | | | | | | | | | Also clean up logging. This doesn't completely fix the referenced bug, but substantially reduces the instances of long latency on USB device disconnect. Bug: 19363750 Change-Id: If0a6d64c4973277ae2474e121198e47df973965e
* Technical Debt Paydown - move/rename filesPaul McLean2015-01-1310-1096/+6
| | | | | | | | 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
* am e6499429: Merge commit \'83b47a68\' into manualmergeEric Laurent2015-01-101-2/+4
|\ | | | | | | | | * commit 'e64994292cb02fae66f04002e1121d29979503d1': usb audio: Fix incorrect bytes returned for recording
| * Merge commit '83b47a68' into manualmergeEric Laurent2015-01-091-2/+4
| |\
| | * usb audio: Fix incorrect bytes returned for recordingPavan Chikkala2015-01-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 MERGE - fix: memory leaksoon1.choi2014-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | free momory for str_parms to prevent memory leak. cherry-pcik from aosp c357157e28dc0ffd069b80aeba9bf8b9eed72c9a Bug: 18798194. Change-Id: I7df5567d665554dbd4646c881f0f48b0c568c5fe
* | | Merge "Multi-USB device support & read device on open."Paul McLean2015-01-092-34/+63
|\ \ \
| * | | Multi-USB device support & read device on open.Paul McLean2015-01-082-34/+63
| | | | | | | | | | | | | | | | Change-Id: I8b6dd33be1915db764eeaefec5a5da1e9d02dc87
* | | | am 7e9abab1: am b338957d: Merge "usbaudio: Return 0 bytes on failure in capture"Eric Laurent2015-01-091-0/+4
|\ \ \ \ | |/ / / |/| / / | |/ / | | | * commit '7e9abab1940091b4c4d7589160855870fdda437e': usbaudio: Return 0 bytes on failure in capture
| * | am b338957d: Merge "usbaudio: Return 0 bytes on failure in capture"Eric Laurent2015-01-091-0/+4
| |\ \ | | | | | | | | | | | | | | | | * commit 'b338957d02528e5b51a15c5ce21e96fad4ff4a6f': usbaudio: Return 0 bytes on failure in capture
| | * | usbaudio: Return 0 bytes on failure in captureViswanath L2015-01-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Return 0 bytes from in_read() in failure conditions so that invalid data is not recorded. Change-Id: I9a6294e4162fa642fd7e160a32d1ad16f255ff62
* | | | Merge "Line length 100"Glenn Kasten2014-12-301-1/+2
|\ \ \ \
| * | | | Line length 100Glenn Kasten2014-12-301-1/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Iaef5bcaec19a9e383432c8c8460bcdf1115f1072
* | | | | am 06fcfc50: am 02e30945: Merge "Fix missing #includes in hardware/libhardware."Elliott Hughes2014-12-301-0/+2
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | * commit '06fcfc506c44724bbd8089e8971b77aa8edfdde8': Fix missing #includes in hardware/libhardware.
| * | | am 02e30945: Merge "Fix missing #includes in hardware/libhardware."Elliott Hughes2014-12-301-0/+2
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit '02e3094598ced8b05c9614d6070556d20328ef43': Fix missing #includes in hardware/libhardware.
| | * | Fix missing #includes in hardware/libhardware.Elliott Hughes2014-12-291-0/+2
| | | | | | | | | | | | | | | | Change-Id: If7c72054bf79b89c3d7a544956da671c3b404269
* | | | am 68be24b1: am ce0bbb97: Merge "fix: memory leak"Eric Laurent2014-12-181-0/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '68be24b1cc2bad01d9257f76faabd92dbfc6c3e8': fix: memory leak
| * | | am ce0bbb97: Merge "fix: memory leak"Eric Laurent2014-12-181-0/+2
| |\ \ \ | | |/ / | | | / | | |/ | |/| * commit 'ce0bbb97c12b712b75d0df42ce2f6e3f35d8db72': fix: memory leak
| | * fix: memory leaksoon1.choi2014-12-181-0/+2
| | | | | | | | | | | | | | | | | | free momory for str_parms to prevent memory leak. Change-Id: I7df5567d665554dbd4646c881f0f48b0c568c5fe
* | | Renaming generic-sounding filenames to indicate "audio".Paul McLean2014-12-158-14/+14
| | | | | | | | | | | | Change-Id: Iba6403a3493379c39d22d23b438f028efc2e15b7
* | | Technical debt paydownPaul McLean2014-12-153-87/+2
|/ / | | | | | | | | | | | | | | Removed unused function. Removed unused data table. Cleaned up TAG strings. Change-Id: I4c5dbd72f7363dd0a7a60eb2498e122adda43211
* | usbaudio: reset profile on device disconnectHaynes Mathew George2014-12-111-3/+8
| | | | | | | | | | | | | | | | | | | | Reset ALSA device profile on disconnect event. Entries like supported sample rates, channel counts, formats will be repopulated on next connect. CRs-Fixed: 765434 Change-Id: I27d3b7fd7ff22646996f58c53de08547b1a1fb6a Bug: 18606219
* | Support MONO and STERO USB inputs. Allow "dynamic" flag in audio_policy.conf.Paul McLean2014-09-172-46/+34
|/ | | | | | Bug 17526569 Change-Id: I64b00fd338eb937303b41608728a18341ee78820
* usb audio: implement microphone mute.Eric Laurent2014-09-141-0/+10
| | | | | Bug: 17321604. Change-Id: I8e3daf2636dfd5f85d990c0093c52c908064afac
* Merge "Fix problem with dropouts with multiple USB audio streams." into lmp-devPaul McLean2014-08-284-23/+58
|\
| * Fix problem with dropouts with multiple USB audio streams.Paul McLean2014-08-284-24/+58
| | | | | | | | | | | | Bug 17136569 Change-Id: I94bdbe037533a3fd77f249fdd42f4d828d3bf87f
* | Fixing non-playback on USB devices with support for MONO playback.Paul McLean2014-08-282-6/+14
|/ | | | | | Bug 17136854 Change-Id: Ia0136fa8f9b4789d538b2dccb3f6071ae5062010
* Merge "Quick hack fix for USB accessory audio support" into lmp-devGlenn Kasten2014-08-211-0/+7
|\
| * Quick hack fix for USB accessory audio supportMike Lockwood2014-08-211-0/+7
| | | | | | | | | | | | | | | | | | | | tinyalsa fails to retrieve the correct value for the period count from the f_audio_source driver and tries to use zero instead. This wasn't a problem before because the usb audio HAL used hard coded values that were compatible with the driver. Bug: 16799652 Change-Id: I6f5b907a0699c58b071e9f419ed8e053a7d9dc77
* | Fix problem with reloading config of new capture devicesPaul McLean2014-08-131-2/+1
|/ | | | | | | with same card/device numbers. Bug: 17012657 Change-Id: I7cb50aedc538d8c648e7f66c8e153cf47ce12577
* Fix problem with reloading config of new devices with same card/device numbers.Paul McLean2014-08-122-3/+2
| | | | | | Bug 16981885 Change-Id: I65c6c418ee0d0f42c87379b614f64302d27f8e77
* usb audio: fix set_parameters read/write concurrencyEric Laurent2014-08-061-30/+52
| | | | | | | | | | | | | 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
* Merge "Pass multichannel capability to AudioPolicyManager" into lmp-devAndy Hung2014-07-291-40/+35
|\
| * Pass multichannel capability to AudioPolicyManagerAndy Hung2014-07-291-40/+35
| | | | | | | | Change-Id: Ifcfe5e9e0c01ccb0e9af25e0c718ea5f04181ae4
* | Merge "Add multichannel USB handshaking with AudioFlinger" into lmp-devAndy Hung2014-07-281-66/+45
|\ \ | |/
| * Add multichannel USB handshaking with AudioFlingerAndy Hung2014-07-281-66/+45
| | | | | | | | | | | | | | | | 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
* | audio HAL: add parameters to open streamEric Laurent2014-07-281-2/+5
|/ | | | | | | | Pass device address (and audio source for inputs) to open_output_stream() and open_input_stream() audio HAL functions. Bug: 14815883. Change-Id: I5535677db3f3027917a31a7ed5c0a4c6bc013639
* Refactor USB HAL (audio_hw.c)Paul McLean2014-07-2510-780/+1462
| | | | | | | | | | | | | | 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
* Merge "Move channel expansion/contraction functions to ↵Paul McLean2014-07-172-259/+5
|\ | | | | | | audio_utils/channels.h/.c" into lmp-dev
| * Move channel expansion/contraction functions to audio_utils/channels.h/.cPaul McLean2014-07-162-259/+5
| | | | | | | | Change-Id: I967a062f6c1cb5ae6acb6e92f4f3df00a0336733
* | Add audio_input_flags_t to HAL open_input_streamGlenn Kasten2014-07-161-1/+2
| | | | | | | | Change-Id: I3519bfa45809e064d19473ebe6489c5249d306a8
* | Marking invalid PCM formats with PCM_FORMAT_INVALID, shrinking format table.Paul McLean2014-07-161-51/+52
|/ | | | Change-Id: I57da4ed85fe128e88e63c03be4fe836f8de76ac8