Commit graph

20 commits

Author SHA1 Message Date
Tri Vo
5bf2109d29 Build audio.usb.default with BOARD_VNDK_VERSION
Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j64 audio.usb.default
Change-Id: I0be8ad7283e200bf36100eca38b28af4220530fd
Merged-In: I0be8ad7283e200bf36100eca38b28af4220530fd
2017-09-05 17:43:16 -07:00
Eric Laurent
981f774496 usb audio: check proxy_prepare() errors in opne_input_stream()
Make sure that open_input_stream() reflects audio parameters
modifications done by proxy_prepare() and returns an error with
proposed parameters if needed.
Alos do not overwrite adev->device_sample_rate when opening an
input stream as this is driven by the output stream.

Bug: 37949012
Test: audio capture, playback and calls over USB headset.
Change-Id: I45fcd895b9a95e7673f2232b4a98c74be0548d0d
2017-05-03 12:53:06 -07:00
Paul McLean
64345f8f2e Simplify and clarify channel count/mask calculation for stream open routines.
Bug: 29154372
Change-Id: I849c02da0cc500e906cbda97b7258a3acf1e38f2
2016-06-13 13:59:59 -06:00
Paul McLean
994ac07b96 replace naked pthread_mutex_ functions with semantics-explicit lock/unlock functions.
Bug: 29103653
Change-Id: Ic91f75f8653f7946790b8b433236fd918b41f3a6
2016-06-02 15:33:24 -06:00
Paul McLean
76dba68c96 Fix up inconsistent variable names.
Bug: 29065081
Change-Id: I1c8305afdebd7e1eedb4afafb0d06003c6a9e576
2016-06-01 13:14:02 -06:00
Paul McLean
6a75e4e06a Add dump() (i.e dumpsys media.audio_flinger) functionality to USB HAL
Bug: 28960293

Change-Id: Ia3a2b966079633d9357e5ae96247b771073f2de6
2016-06-01 07:24:21 -06:00
Paul McLean
9a1c30572b Ensure we get a default sample rate for "query" cases in open_input_device().
Bug: 28474561
Change-Id: I2946dda95ab47bd38a582f49e566541bc4e20bbf
2016-05-25 14:45:47 -06:00
Paul McLean
1d585cc7ab Lock input and output sample rates
Bug: 28474561
Change-Id: I551d346aea9c4f36b51a9c1a1c557c5e2757334b
2016-05-25 10:37:03 -06:00
Glenn Kasten
6d2cb933e0 Use FCC_2 and FCC_8 to highlight channel count assumptions
Bug: 21656069
Change-Id: Id2ef8e4ec716bf037a47da5ff7aec5d7ce35a1bf
2016-01-05 10:44:16 -08:00
Paul McLean
698dbd76b9 USB MONOtization issue fix.
Fix problem with defaulting to MONO playback on USB devices that
report 1 & 2 channels.

Bug: 24366970
Change-Id: I6ee1376be998ad1aade66927bf64ff5a2518c0f4
2015-11-05 01:28:39 +00:00
Andy Hung
c9515ce60d Add USB out_get_presentation_position() for timestamps
Bug: 21196672
Change-Id: Ic509e91a9c0d3421b78371207d7e63425e895e71
2015-08-06 11:16:45 -07:00
Eric Laurent
703180998f audio HAL: reverse mutex locking order
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
2015-06-19 17:50:00 -07:00
Andy Hung
5e58a30b6f Update USB channel mask handling
1 and 2 channels will default to mono and stereo
n > 2 will default to channel index masks

Bug: 16245854
Change-Id: I39f9d43385a93f48e323653fbde2e38a99b6256f
2015-06-10 15:18:56 -07:00
Andy Hung
f90f8f8ada Remove unused data conversion functions from usb hal
Change-Id: I4ccf8441171ad796e8954b1960f76411ebb86e9d
2015-05-11 12:19:37 -07:00
Andy Hung
182ddc7d13 Add output channel index mask to USB hal
Change-Id: I17818ac89f7ca591422cadfaa388590ff9c08613
2015-05-11 12:18:04 -07:00
Andy Hung
780f1f8149 Add multichannel input to USB hal
Change-Id: I297669f7ba5a711923cf2f371d161819fad04740
2015-05-11 12:13:25 -07:00
Paul McLean
f55fdb2d55 Back out locking order and (over) simplification in out_write(), in_read().
Change-Id: I96954f883798f8e10adce56d9c33b70574999d1c
2015-02-20 15:39:59 -08:00
Paul McLean
3546c8d66b USB device disconnect latency
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
2015-02-20 14:46:50 -08:00
Paul McLean
65ec72b72b Improve locking/unlocking in *_set_params().
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
2015-02-18 12:22:20 -08:00
Paul McLean
9ab869acfd Technical Debt Paydown - move/rename files
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
2015-01-13 09:37:06 -08:00
Renamed from modules/usbaudio/audio_hw.c (Browse further)