For input stream, the sample rate should be set as requested one if it
matches the device sample rate and is valid.
Bug: 282816698
Test: TH
Change-Id: Iebee2b269062609ff7bcd460f48714ca64980e68
* changes:
Intermittently Audio is not heard in USB Head set, while disconnecting /connecting the usb audio headset.
Set standby as false when the stream is started successfully.
disconnecting /connecting the usb audio headset.
In usb audio_hal.c, out-stream standby status was not aligned in
adev_create_audio_patch(), so that stream was considered being in
standby after open.
fix: Align the standby status.
change: correct update for review comments.
Test: usb headset open works fine with huge times insert/remove.
Change-Id: I89798eeee33d8c5019e7510c23371cb18a00ed32
When the audio patch is created and the stream is started, set the
standby as false. In that case, if there is a simultaneous request for
read or write data, it is no need to start the stream again.
Bug: 212509560
Test: repo steps in the bug
Change-Id: Ic3dbab3134bc761271b6b2ac8619135ef08075bc
Merged-In: Ic3dbab3134bc761271b6b2ac8619135ef08075bc
When opening bit-perfect output stream, the HAL should require the HAL
configuration match the request exactly.
Bug: 262581771
Test: manually
Change-Id: I2f79d41ad42b0c662d28667bde6ae115575d41e1
Merged-In: I2f79d41ad42b0c662d28667bde6ae115575d41e1
When the stream is open with bit-perfect output flag, the volume command
may be sent to the HAL. Use volume control from the mixer when it is
present.
Bug: 262581771
Test: adjust volume
Change-Id: I11e76450a2c3dbcad0ddbd56bd3db1ea83f10f2b
Merged-In: I11e76450a2c3dbcad0ddbd56bd3db1ea83f10f2b
Minimizes intermittent failures when a device is in sniff mode.
Fixes: 245881714
Test: enable/disable with spatial audio feature enabled
Change-Id: I5fb5b9ff37a6f8a245678c87ee82e2032dc845f2
The new 6.0 kernel headers changed all variable length
structures from [0] to []. This causes a clang warning to
trigger, so rewrite the affected data structure using a
union to avoid having a variable sized array in the middle
of the structure.
Test: Builds.
Change-Id: I60c6d31a93566c4aa9f7501f39f88543ee76ce91
specifically, interpret HID data value as unsigned if minValue is
positive
Fix: 238391386
Test: See "Testing Done" in comments in ag/19889364
Change-Id: I715c2189ad90ee71e022ae131354354157694556
Bug: 228369656
Test: Used uhid-sample to add a dynamic sensor and verified correct
min/max sample rate.
Change-Id: I88a1bec26a03a97ee7a3c590d2601151b89ee545
Bug: 226012902
Test: Used uhid-sample to add a dynamic sensor and verified it can be
sampled.
Test: Simulated start sampling ioctl timeout and verified operation
completes with a timeout and eventually cleans up.
Test: Simulated start sampling ioctl timeout with device removal before
completion and verified operation completes with a timeout and
eventually cleans up.
Change-Id: I9a957bc1e4000b2c587278146ecbe6e903010616
Adapt the pipe size based on the sample rate.
Behavior is unchanged for the default sample rate (48kHz), size
is adjusted by the ratio relative to the default rate.
Bug: 141604269
Test: atest AudioHostTest#testTwoChannelCapturingMediaConversion
Change-Id: I0ba45af18ef02dc0ef77d480e1203d2cd1db9864
Also, don't require 16-bit strings for HID name, manufacturer, and
unique ID. Also change dump of HID unique ID to be in hex.
Bug: 213483369
Test: Verified that the standard Android head tracker sensor uses the
HID unique ID for the sensor UUID.
Test: Verified that custom Android sensors use a fabricated UUID.
Change-Id: I125f84187868543dccab758e22dce744c013578e
We no longer set force_pipe_creation after the removal of
legacy code for in-pipe conversions, so we remove it.
Test: TreeHugger
Bug: 141604269
Change-Id: I82393ba0ad3142aa75d482cc6b0edbaeebbd8116
Old hacky uses of this HAL required channel and sample
rate conversion, which were never expected when this HAL
is used for its real application as the backend for
dynamic audio policies. In that context conversions are
performed in audio_flinger in the mixer.
Bug: 141604269
Test: atest AudioHostTest#testTwoChannelCapturing
Change-Id: I333e981fb3db403ab2da6f77debe49bc7d132ebc
Bug: 207008609
Test: Verified dynamic sensor sampling with proposed standard Android
head tracker.
Change-Id: I163b79c2c99f02961adebcb5dcb7e39603944e24
Add config to set the NUM_BUFFERS. Set NUM_BUFFERS to 1 can
prevent page flipping and set it to a larger number can allow
userspace to fill up the following frame earlier.
Bug: 205917753
Change-Id: Ibf4a52a1e35f4a2404008a48b637cb82c4b46365
Bug: 205041452
Test: Verified that multiple subscriptions can be made with sensor_test
to a dynamic sensor without hanging.
Change-Id: Ie7671df8294bee04a0ebe1940242c2a83105f897