No description
574cc909d4
The rest of the API (*::analyseStatus) returns NOT_SUPPORTED when the legacy API returns -ENOSYS. setParameter legacy -> treble shim did not follow this conversion due to the legacy API stating that for get_paramers, -ENOSYS should be returned if "the implementation does not accept a parameter change while the output is active but the parameter is acceptable otherwise", aka INVALID_STATE. Thus setParameter shim used to return - OK for OK - INVALID_STATE for -ENOSYS - INVALID_ARGUMENTS for everything else This leads to several problems: - an implementation of the legacy API can not report NOT_SUPPORTED - is inconsistent with the rest of the status_t conversion methods - shim methods implemented over getParameter can not distinguish failures error required by the .hal documentation Most importantly, on the system side, the Result is transformed to a status_t again but without any special logic for methods wrapping getParameter in the shim. See: analyzeResult in frameworks/av/media/libaudiohal/2.0/ConversionHelperHidl.cpp This can not be changed as the system can not know which methods are implemented with a legacy wrapper under the Treble API boundary. This mean that if: - hal return -ENOSYS () - shim converts it to INVALID_STATE - libaudiohal converts it to NOT_ENOUGH_DATA () Thus the checkForNewParameter_l's "status == INVALID_OPERATION" test in frameworks/av/services/audioflinger/Threads.cpp are now always false and broken. This has been broken since the introduction of the Treble shim for O. Thus setParam now converts status_t to Result in the same way as all the other shim methods. Bug: 72873273 Bug: 69811500 Bug: 69010523 Test: playback and record for media and voice call Change-Id: I41204c0807d2bd4675e941771cbc9a43d7d14855 Merged-In: I41328afce56ce31d4a26159ca2d4b16d14cce05b Signed-off-by: Kevin Rocard <krocard@google.com> |
||
---|---|---|
audio | ||
automotive | ||
biometrics/fingerprint/2.1 | ||
bluetooth | ||
boot/1.0 | ||
broadcastradio | ||
camera | ||
cas | ||
compatibility_matrices | ||
configstore | ||
contexthub/1.0 | ||
drm/1.0 | ||
dumpstate/1.0 | ||
gatekeeper/1.0 | ||
gnss/1.0 | ||
graphics | ||
health | ||
ir/1.0 | ||
keymaster/3.0 | ||
light | ||
media | ||
memtrack/1.0 | ||
neuralnetworks | ||
nfc | ||
oemlock/1.0 | ||
power | ||
radio | ||
renderscript/1.0 | ||
secure_element/1.0 | ||
sensors/1.0 | ||
soundtrigger/2.0 | ||
tests | ||
tetheroffload | ||
thermal | ||
tv | ||
usb | ||
vibrator | ||
vr/1.0 | ||
weaver/1.0 | ||
wifi | ||
.clang-format | ||
Android.bp | ||
CleanSpec.mk | ||
current.txt | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE | ||
OWNERS | ||
PREUPLOAD.cfg | ||
update-base-files.sh | ||
update-makefiles.sh |