hidl-generated makefiles are now generated such that bpfmt(file) == file.
Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
The HAL audio service entry point is not version dependant
and is common to core and effect.
Bug: 38184704
Test: compile
Change-Id: I143cf28490afc978791ccd7e8aeee2106cbb2ebd
Merged-In: I143cf28490afc978791ccd7e8aeee2106cbb2ebd
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
Initialize processtate with vndbinder to allow
vendor components to talk via vndbinder
Test: re-launch android.hardware.audio@2.0 service
Change-Id: I9fafff157c5e497a8125b13741b56e0852534ffa
A device may not be configured to ship with ST V2.1 impl,
in this case the device will stuck in a boot loop because the
framework will be attempting to instantiate ST, but the
service will not have ST server side registered.
Since the service code is the same for all devices,
allow a fallback to ST V2.0. This way, if only V2.0 is present
on the device, it will be registered, and the framework
will find it. The actual version used can be determined by
examining output of 'lshal' command.
Also remove obsolete dependency on broadcast radio.
Bug: 63600413
Bug: 68823037
Test: Try taimen both with ST V2.0 and V2.1 impls
Change-Id: I484659b1df5a7e4b11db91d0cf75a7079786c766
Move in order to adhere to the new folder organisation.
Bug: 38184704
Test: compile
Change-Id: I7398cab951ee628782f81098b57b04a1402b4041
Signed-off-by: Kevin Rocard <krocard@google.com>
This patch only contains cosmetic reformatting imposed by clang-format.
Bug: 38184704
Test: compile
Change-Id: Ic2a2386b976cf1df1e4e062b45688cd6115541d3
Signed-off-by: Kevin Rocard <krocard@google.com>
This will make diff much more clear and allow git to follow the files.
Bug: 38184704
Test: compile
Change-Id: I946b20254dcda1cb31b48898d0b5f46b185ebafe
Signed-off-by: Kevin Rocard <krocard@google.com>
This patch only contains cosmetic reformatting imposed by clang-format.
Bug: 38184704
Test: compile
Change-Id: I57545f2b8de1e982028ef4794328741d91682e0c
Signed-off-by: Kevin Rocard <krocard@google.com>
The implementation uses the version provided by macro.
Bug: 38184704
Test: compile
Change-Id: Ib5565bdf77ed9e42fc8271a4317eb88681aefcd5
Signed-off-by: Kevin Rocard <krocard@google.com>
This dependency is imported but not used, so it should technically
go in the Android.bp file.
Bug: 71863483
Test: none
Change-Id: I3ee391bdea47182689156b3243b75a3572f7d8bf
StreamOut::asyncCallback could became an owner of StreamOut
causing the destructor to be called on the offload callback
thread, while the legacy HAL is holding a mutex, which resulted
in a deadlock.
Removed erroneous usage of sp<StreamOut> in asyncCallback.
The legacy HAL joins the offload callback thread when closing
output stream, thus StreamOut destructor is guaranteed to finish
only after the offload callback thread has exited, and using
a raw pointer to StreamOut inside asyncCallback is correct.
Bug: 70863217
Change-Id: I0d77018cf3df5ad07251732733288d425dd836eb
Test: manual
setSampleRate, setChannelMask, setFormat
may not be implemented by the HAL, although this is not documented in
the HAL API.
Currently the VTS test requires their implementation if the respective
getSupported{SampleRate,ChannelMask,Format} are supported.
Relax this requirement as the framework never calls those setters.
Note that the optionality of those functions will be documented
in the next HAL API version.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 69811500
Change-Id: I3a390ae925cabd99e7f1ed4a627e71ad87b1b437
Signed-off-by: Kevin Rocard <krocard@google.com>
getSupportedSampleRate should return the native sampling rates,
(IE. the sampling rates that can be played without resampling)
but other sampling rates can be supported by the HAL.
The test was too strict as it was failing if HALs were supporting more
sample rates than there native (optimized) ones.
For example, a HAL might have its best performance (no resampling)
on 48kHz but still support 16kHz through resampling.
Note: getSupportedSampleRate might be renamed to getNativeSampleRate in
the next major HAL revision to avoid ambiguity.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 69811500
Change-Id: I1ec1ce422bc5039637463c6641060508f4ee892b
Signed-off-by: Kevin Rocard <krocard@google.com>
This constraint was added due to an incorrect assumption
that device ports were identified by names whereas
they are by the (module,type,address) triplet.
Bug: 69442986
Test: xmllint validates an XML with two identically named devices in
different modules.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Change-Id: I66d890d3c967bead4f2a287202c259009217996a
Signed-off-by: Kevin Rocard <krocard@google.com>
Device port are not identified by names but by their type and address
and the module they are in.
As a result, enforce this constraint in the XSD. Violating it results in
a policy parsing crash.
Bug: 69442986
Test: xmllint invalidates an XML with two devices of the same type
and address
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Change-Id: I84245f0fa80fef786a002c98073c166b6aaf2be4
Signed-off-by: Kevin Rocard <krocard@google.com>
Vendor are currently not allowed to extend the XML format.
As some enumeration are allowed to be extended, this mean that
the format must allow some extension mechanism.
This patch relaxes the definition of the module name field.
AOSP names are still allowed, but a vendor can add its own name
if prefixed with "vx_". Eg:
<module name="vx_google_vr" halVersion="3.0">
Test: xmllint --xinclude --noout --schema hardware/interfaces/audio/2.0/config/audio_policy_configuration.xsd audio_policy_configuration.xml
with audio_policy_configuration.xml containing a module named vx_google_vr
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
on Pixel 2
Bug: 69442986
Signed-off-by: Kevin Rocard <krocard@google.com>
Change-Id: I4ead38535cce89bb8fe44cf23fa1146acd1271d6
This was preventing getCapturePosition() being called from
the default HIDL implementation.
Test: cts-tradefed run cts -m CtsMediaTestCases \
-t android.media.cts.AudioRecordTest
Change-Id: I9c920108f68fb895a7f7a9d2ea27c291a91c1afb