summaryrefslogtreecommitdiffstats
path: root/audio
Commit message (Collapse)AuthorAgeFilesLines
* Convert audio effect hal test to use VtsHalHidlTargetTestEnvBaseZhuoyao Zhang2018-02-081-3/+26
| | | | | | | | Bug: 64203181 Test: make vts vts-tradefed run vts -m VtsHalAudioEffectV2_0Target Change-Id: Ifbdbfe5d5627f9281ba773cbeac718488d997efd
* Audio V4: Create audio V4.0 .hal makefilesKevin Rocard2018-02-013-0/+143
| | | | | | | | | Run update-makefiles.sh to create all HAL makefiles. Test: update-makefiles.sh Bug: 38184704 Change-Id: I2532c4b9d1f0f6252ceaffbfb0c5d0a615400c72 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: More fixes of the audio 2.0 APIKevin Rocard2018-02-0110-57/+10
| | | | | | | | | | | | | | Remove unnecessary Result typedef. Make bufferSizeFrames and burstSizeFrames unsigned as they should not be negative. Remove legacy AudioInterleave. Remove implicit callflow annotation. Make EffectConfigParameters a bitfield. Bug: 38184704 Test: hardware/interfaces/update-makefiles.py Change-Id: I33e6f7869d20ca0cad4123f32347754e5a514caa Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Support query microphones informationRicardo Garcia2018-02-013-0/+145
| | | | | | | | | | | | | Get list of all/currently active microphones from hardware. Part of the device enumeration feature. Bug: 64038649 Test: test/vts-testcase/hal/script/update_makefiles.py Change-Id: I08051f1d6013672dea8f3866776864e87ff35297 Rebased for 4.0 by: Signed-off-by: Kevin Rocard <krocard@google.com> Originally written by: Signed-off-by: Ricardo Garcia <rago@google.com>
* Audio V4: Only expose one notification usageKevin Rocard2018-02-011-4/+1
| | | | | | | | | | | | | Too many usages detail were previously exposed to the HAL. All usages that should be handled identically by the HAL are now the same value. - All notification types are now the same usages Test: build Bug: 38184704 Change-Id: I2096f995e249ab02bc29449c6d1a65b521dc13f7 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Add new api in XSDEric Laurent2018-02-011-5/+56
| | | | | | | | | | | Allow multiple concurrent opened profiles. Allow mixPort to declare their preferred usage. Allow to declare the default devicePort for a device type. Bug: 38184704 Test: xmllint --noout --schema hardware/interfaces/audio/4.0/config/audio_policy_configuration.xsd --xinclude out/target/product/taimen/vendor/etc/audio_policy_configuration.xml Change-Id: If2afd9e83f8b023e6229496759dc525497af8d72 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Copy audio_policy_configure.xsd 2.0 to 4.0Kevin Rocard2018-02-011-0/+543
| | | | | | | | | That will make it easier to review the changes between 2.0 and 4.0. Bug: 38184704 Test: none Change-Id: Icb36a5b6e74ad89fb05dfe3ceee7b7f81801918d Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Forward tracks attributes to the halKevin Rocard2018-02-015-2/+62
| | | | | | | | | | | | | | | | Forward to the HAL the audio usage, audio content types and volume of playback tracks to the stream out they are playing to. Forward to the HAL the audio source and volume of record tracks to the stream in they are playing to. This will allow the HAL to better tune its effects and remove the need to inject a fake effect (volume listener) to get the tracks volume. Bug: 38184704 Test: none Change-Id: Iede0f7aa518608c3b3ce1497f059f672aac109b2 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Remove deprecated function and enumKevin Rocard2018-02-014-38/+0
| | | | | | | | | | | | | The debugDump function was deprecated by the introduction of the debug method in the IBase. AudioMode CURRENT and INVALID should not be passed to the vendor. Bug: 38184704 Test: none Change-Id: I0e14c71ce7216524587a6ba28cae0cdb821bae23 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: bitfield enum now use the bitfield classKevin Rocard2018-02-016-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | The audio HAL has lots of enums were each value is a specific bit pattern (usually a single bit) and are expected to be used as a combination of value (kind of like a bitfield). Nevertheless the 2.0 methods only had the enums themselves in their signatures which leads the HIDL API checkers to warn that invalid values were passed. Currently, there are no way to express a value which is a combination of enum values. The closest thing is the bitfield type. Thus transition all enums combination to bitfield. Note that AudioDevice as NOT been transition systematically as both the enums and the combination are meaningful: - the enum is one device - the combination is a list of device. Test: none Bug: 38184704 Change-Id: I155cf7bc5d88fc5cf8954903d55aa8d7ca458a4b Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Add MSD formats and DeviceDean Wheatley2018-01-312-1/+38
| | | | | | | | | | | | | | | | Add MAT 1.0, 2.0, 2.1 audio formats Add 5.1.2, 5.1.4, 7.1.2, 7.1.4 output channel masks Add E_AC3_JOC audio format Add MSD Device to allow an MSD HAL implementation separated from the primary. Bug: 38184704 Test: none Change-Id: I2f488462614114e4c82149460b030585981ae15e Original author: Signed-off-by: Dean Wheatley <dwhea@dolby.com> Ported to HAL 4.0: Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Add new Audio HAL APIKevin Rocard2018-01-313-6/+43
| | | | | | | | | | | | | | | | | | | | | | Add new device to the device factory to allow vendors to split their HAL implementations more. AudioDevice bitfield is now 64bit to allow more devices to be added. Add a new AudioDevice to support playing music to distant during voice call. A HAL can now declare if its MMAP buffer can be securely accessed directly by untrusted apps. Add AAC_XHE format. Add BLE input source. Bug: 38184704 Test: none Change-Id: Ic2fbec4db71c7f688c8847ba39c72f51480c0727 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Remove all non extensible enum valueKevin Rocard2018-01-311-95/+5
| | | | | | | | | | | | | | | | | | The CNT, MAX enum values had two drawbacks: - they were invalid enum value that were part of the enum thus enum validity check would validate them although those values are only expected to be use in loops/validation code. - they are not extensible by vendors The *_ALL enum values were not extensible by vendors. Those values can instead be replaced by treble enum iterator and helper functions. Bug: 38184704 Test: none Change-Id: I1a9527bb7311088e0abe22eceee92d21d9171ca4 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Fix doc comments for hidl-docKevin Rocard2018-01-311-16/+20
| | | | | | | | | | | | | | | hidl-doc does not support two consecutive documentation comments /** ... */ /** ... */ In such case make the first one a non-doc comment. This is a port of: http://android-review.googlesource.com/432140 Bug: 38184704 Test: none Change-Id: I86cb10c655036ca49055ee007813c3e5af743eb5 Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Fix documentation and useable/untestable bugsKevin Rocard2018-01-317-18/+102
| | | | | | | | | | | | | Add missing documentation, especially for failure cases and methods that are optional. Add missing operation status for testability. Add format for getSupported* methods as they could not be implemented in 2.0 for multi-format stream (HDMI). Test: compile Bug: 38184704 Change-Id: I14ee5e02ef70a82df6de732f88b065810e9b032f Signed-off-by: Kevin Rocard <krocard@google.com>
* Audio V4: Copy 2.0 .hal files in 4.0Kevin Rocard2018-01-3125-2/+3823
| | | | | | | | | | | | | | | | | | | | | | | That will ease review of the changes. The only changes are: - replace all @2.0 by 4.0 $ sed -i 's/@2\.0/@4\.0/g' */4.0/*.hal - replace all licence 2016 by 2018 $ sed -i 's/2016/2018/g' */4.0/*.hal Moving the .hal in a subfolder forces the package name and the namespace to change. This mean that the audio HAL 2.0 and 4.0 will not be consider different version of the same HAL but two different HALs. As a result to minimize code change due to tight deadline, keep the 4.0 core in the audio folder. Bug: 38184704 Test: hardware/interfaces/update-makefiles.sh Change-Id: I7c7a826270c9933091f037b795806787e1284583 Signed-off-by: Kevin Rocard <krocard@google.com>
* Convert audio hal test to use VtsHalHidlTargetTestEnvBaseZhuoyao Zhang2018-01-232-5/+13
| | | | | | | | Bug: 64203181 Test: make vts vts-tradefed run vts -m VtsHalAudioV2_0Target Change-Id: I1f85216c992eabf70f7e907b5d2afc4fb59cbb4a
* Merge "soundtrigger: Fall back to V2.0 if V2.1 is not present"TreeHugger Robot2018-01-222-6/+9
|\
| * soundtrigger: Fall back to V2.0 if V2.1 is not presentMikhail Naganov2018-01-222-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Audio V4: move 2.0/vts to core/2.0/vts to match effect's vtsKevin Rocard2018-01-204-0/+0
| | | | | | | | | | | | | | | | | | 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>
* | Audio V4: Fix issues in the core vts raised by clang-formatKevin Rocard2018-01-202-233/+135
| | | | | | | | | | | | | | | | | | 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>
* | Audio V4: Rename audio/device to audio/coreKevin Rocard2018-01-2039-46/+46
| | | | | | | | | | | | | | | | | | | | The name device has already too many meaning, thus rename the main audio api to core. Bug: 38184704 Test: compile Change-Id: I178dfef05af8f8579196affbe2cbc5f6c3f9af55 Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Make effect default wrapper device independentKevin Rocard2018-01-2062-388/+1106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What was done in this patch: # move headers in all-versions/default folder for qualified inclusion mkdir -p audio/effect/all-versions/include/effect/all-versions/default/ mv audio/effect/all-versions/*[hp] $_ # Go in the all-versions header folder cd $_ # Use a macro for the version sed -i '/^#/!s/V2_0/AUDIO_HAL_VERSION/g' * #Remove 2.0 includes sed -i "/include.*2.0/d" * # Add include guard to make sure AUDIO_HAL_VERSION is set sed -i '/limitations under the License/!b;N;a\n#include <common/all-versions/IncludeGuard.h>' * # Remove guard include macro sed -i '/^#.*[H_]$/d' * # Remove LOG_TAG sed -i '/LOG_TAG/d' * # Remove local include (include "XXX") sed -i '/include.*"/{N;/\n$/d;D}' * # Replace implementation with inclusion cd audio/effect/2.0/ git checkout HEAD^^ ls *h *cpp| sed -r 's/.*h$/\0 \0/;s/(.*)cpp/\1impl.h \0/' |xargs -L1 printf '1h;2,$H;$!d;g;s$namespace.*}[^\\n]*$#define AUDIO_HAL_VERSION V2_0\\\n#include <effect/all-versions/default/%s>\\\n#undef AUDIO_HAL_VERSION$\000%s\000'|xargs -0 -n2 sed -i + manual update of Android.bp and removal of duplicate include Bug: 38184704 Test: compile Change-Id: If99871516f3069fcb9e699ab670a665d7d507e7d
* | Audio V4: Move the legacy effect wrapper before refactorKevin Rocard2018-01-2032-0/+3
| | | | | | | | | | | | | | | | | | This will make diff much more clear and allow git to follow the files. Bug: 38184704 Test: compile Change-Id: I90deaad883a52ef8fbcd3109937f90d46d458f8c Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Fix issues in the effect legacy wrapper raised by clang-formatKevin Rocard2018-01-2030-1722/+1325
| | | | | | | | | | | | | | | | | | This patch only contains cosmetic reformatting imposed by clang-format. Bug: 38184704 Test: compile Change-Id: If5e61eecd0a67fec19997792c9db73936ce7be2e Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Make device default wrapper device independentKevin Rocard2018-01-2038-228/+645
| | | | | | | | | | | | | | Bug: 38184704 Test: compile Change-Id: I077d2d6176ba5d60c1994345b3164641ed5b4608 Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Move the legacy wrapper before refactorKevin Rocard2018-01-2019-0/+0
| | | | | | | | | | | | | | | | | | 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>
* | Audio V4: Fix issues in the legacy wrapper raised by clang-formatKevin Rocard2018-01-2015-564/+458
| | | | | | | | | | | | | | | | | | 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>
* | Audio V4: Transition legacy wrapper to Android.bpKevin Rocard2018-01-202-40/+47
| | | | | | | | | | | | | | Bug: 38184704 Test: compile Change-Id: I950b3c38e1ae8093414ce1054a8530047a81ccca Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Move common test code in common folderKevin Rocard2018-01-2012-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous patch made the test independent of the HAL version As a result, move them in the version common folder. Note that this patch is separated from the previous patch to ease review. Bug: 38184704 Test: compile Change-Id: I98a46eb0b88ea786656200ab613afd2d36ed222d Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Make test helper version independentKevin Rocard2018-01-206-48/+45
| | | | | | | | | | | | Bug: 38184704 Test: compile Change-Id: Ia9ec81ccbad1d7411fdc570ae6dd728dd1520065
* | Audio V4: Make common helper version independentKevin Rocard2018-01-2015-38/+154
| | | | | | | | | | | | | | | | | | The implementation uses the version provided by macro. Bug: 38184704 Test: compile Change-Id: Ib5565bdf77ed9e42fc8271a4317eb88681aefcd5 Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Move common files before refactorKevin Rocard2018-01-209-0/+49
| | | | | | | | | | | | | | | | | | This will make diff much more clear and allow git to follow the files. Bug: 38184704 Test: compile Change-Id: I41ccb41c334aa56d3935be333e6227dd99773766 Signed-off-by: Kevin Rocard <krocard@google.com>
* | Audio V4: Fix issues in common raised by clang-formatKevin Rocard2018-01-209-98/+97
|/ | | | | | | | | This patch only contains cosmetic reformatting imposed by clang-format. Bug: 38184704 Test: compile Change-Id: I2f8c74d1b976e1e4e74f85dd0e8350f9b16fb31a Signed-off-by: Kevin Rocard <krocard@google.com>
* soundtrigger: Switch audio service to load soundtrigger 2.1Mikhail Naganov2018-01-192-5/+5
| | | | | | Bug: 68823037 Test: check /proc/.../maps of android.hardware.audio@2.0-service Change-Id: Ie244ca4ea548bdad8116d0a9f267bb41a6a6d50d
* Merge "Update makefiles for audio." am: e5b3e4b869 am: b87db68677Steven Moreland2018-01-181-0/+1
|\ | | | | | | | | | | am: 55113b8256 Change-Id: I7c99c9450f8ac12fcd08cded9da31b1c89a6b474
| * Merge "Update makefiles for audio." am: e5b3e4b869Steven Moreland2018-01-181-0/+1
| |\ | | | | | | | | | | | | | | | am: b87db68677 Change-Id: I30ba693f50ce05e4fe083e24be17bb5f8a3f13dd
| | * Update makefiles for audio.Steven Moreland2018-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This dependency is imported but not used, so it should technically go in the Android.bp file. Bug: 71863483 Test: none Change-Id: I3ee391bdea47182689156b3243b75a3572f7d8bf
* | | audio: Fix StreamOut ownership in default wrapper am: 718b510080 am: 890deeed1eMikhail Naganov2017-12-221-6/+19
|\| | | | | | | | | | | | | | | | | am: 9a58cc7b4c Change-Id: Id350abe5d8d7b88334cbe11b56a4a37864c8f397
| * | audio: Fix StreamOut ownership in default wrapper am: 718b510080Mikhail Naganov2017-12-221-6/+19
| |\| | | | | | | | | | | | | | | | am: 890deeed1e Change-Id: I8a45ce49f6f0695a2be2f74e4a103efd6ce3483a
| | * audio: Fix StreamOut ownership in default wrapperMikhail Naganov2017-12-211-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge changes from topic "b/69811500" into oc-dev am: 61ae0a1fc7 am: ↵Kevin Rocard2017-12-071-14/+24
|\| | | | | | | | | | | | | | | | | | | | | | | d7d5d7a22d am: abec925f05 am: d7042bba2b Change-Id: I7265aa584b13ddc16e690b94f1976f6aaf5b91fa
| * | Merge changes from topic "b/69811500" into oc-dev am: 61ae0a1fc7 am: d7d5d7a22dKevin Rocard2017-12-061-14/+24
| |\ \ | | | | | | | | | | | | | | | | | | | | am: abec925f05 Change-Id: If1f7ce2a3bf45bfa5b147fe8f21eac21b5516f0b
| | * \ Merge changes from topic "b/69811500" into oc-dev am: 61ae0a1fc7Kevin Rocard2017-12-061-14/+24
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | am: d7d5d7a22d Change-Id: Id4c64ec8339a7a4112b482a3cef33095c3dabc79
| | | * \ Merge changes from topic "b/69811500" into oc-devKevin Rocard2017-12-061-14/+24
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 61ae0a1fc7 Change-Id: I8d3e90d9695330b87f8e93dff84b752ec18e5254
| | | | * \ Merge changes from topic "b/69811500" into oc-devTreeHugger Robot2017-12-061-14/+24
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Audio HAL: Allow setters to not be implemented Audio VTS: HAL can support more than the native sampling rates
| | | | | * | Audio HAL: Allow setters to not be implementedKevin Rocard2017-12-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | | * | Audio VTS: HAL can support more than the native sampling ratesKevin Rocard2017-12-051-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | Audio policy config: remove cross-module device port name uniqueness am: ↵Kevin Rocard2017-12-071-7/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 503c3e0a4e am: c5ce355c24 am: e8e9cdcf5e am: a0e6bbe78b Change-Id: I7291fcf545bea544cafb81c47339de78ae9518db
| * | | | | | Audio policy config: remove cross-module device port name uniqueness am: ↵Kevin Rocard2017-12-061-7/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 503c3e0a4e am: c5ce355c24 am: e8e9cdcf5e Change-Id: Ieec5791e1864d87ea26a1743f4543d0ff07c2825