diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2020-03-08 02:00:46 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-03-09 18:38:01 +0200 |
commit | 4ebae93d9cd93c4b77d11f28eeca787cc86d49d0 (patch) | |
tree | 3261001e83245d0fd21e94b60a88ec30a629632d | |
parent | d102156692ac80963173d68ea114bf20b6802af1 (diff) | |
parent | 1656b4902f22bb474ffc466606daf6e9d6799667 (diff) | |
download | android_vendor_qcom_opensource_interfaces-4ebae93d9cd93c4b77d11f28eeca787cc86d49d0.tar.gz android_vendor_qcom_opensource_interfaces-4ebae93d9cd93c4b77d11f28eeca787cc86d49d0.tar.bz2 android_vendor_qcom_opensource_interfaces-4ebae93d9cd93c4b77d11f28eeca787cc86d49d0.zip |
Merge tag 'LA.UM.8.1.r1-14300-sm8150.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/interfaces into lineage-17.1
"LA.UM.8.1.r1-14300-sm8150.0"
Change-Id: I6f0c07e7e8127754291a28da75ccf21f97f756e8
23 files changed, 1261 insertions, 2 deletions
@@ -44,3 +44,8 @@ hidl_package_root { name: "vendor.qti.hardware.bluetooth_dun", path: "vendor/qcom/opensource/interfaces/bluetooth_dun", } + +hidl_package_root { + name: "vendor.qti.hardware.fstman", + path: "vendor/qcom/opensource/interfaces/fstman", +} diff --git a/camera/current.txt b/camera/current.txt new file mode 100644 index 0000000..235cde6 --- /dev/null +++ b/camera/current.txt @@ -0,0 +1,33 @@ +#Copyright (c) 2019, The Linux Foundation. All rights reserved. + +#Redistribution and use in source and binary forms, with or without +#modification, are permitted provided that the following conditions are +#met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +#THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +#WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +#BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +#BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +#WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +#IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Postproc HIDL interface +8e82153c316275c570e7e803be447308745dfd84a8ef19c26e4f66e38612b27b vendor.qti.hardware.camera.postproc@1.0::types +1f128a60e07e9750d93ba106e74cd2ab38268994ca8c53816659ae2abce31176 vendor.qti.hardware.camera.postproc@1.0::IPostProcService +129c97e20ef36e8ac4ec9b2b8a2083849bc5932a62e434af2eb977f1ab8594db vendor.qti.hardware.camera.postproc@1.0::IPostProcServiceCallBacks +df8ddeff86819bb9775c2d1ee4c6d3adb55f1c9c9964d730f99d37136b0a2f5d vendor.qti.hardware.camera.postproc@1.0::IPostProcSession + diff --git a/camera/postproc/1.0/IPostProcService.hal b/camera/postproc/1.0/IPostProcService.hal new file mode 100644 index 0000000..623261f --- /dev/null +++ b/camera/postproc/1.0/IPostProcService.hal @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.qti.hardware.camera.postproc@1.0; + +import @1.0::types; +import @1.0::IPostProcSession; +import @1.0::IPostProcServiceCallBacks; + +interface IPostProcService { + /** API to get list of postproc types supported */ + getPostprocTypes() generates (vec<PostProcType> proctypes); + /** API to get capabilities of a particular postprocessor. */ + getCapabilities(PostProcType postprocenum) generates (PostProcCapabilities encCapabilities); + /** API to create postproc instance */ + createPostProcessor(CreateParams createParams, IPostProcServiceCallBacks callback) generates (IPostProcSession postprocinstance); +}; diff --git a/camera/postproc/1.0/IPostProcServiceCallBacks.hal b/camera/postproc/1.0/IPostProcServiceCallBacks.hal new file mode 100644 index 0000000..9b24fa5 --- /dev/null +++ b/camera/postproc/1.0/IPostProcServiceCallBacks.hal @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.qti.hardware.camera.postproc@1.0; + +import @1.0::types; + +/** These functions needs to be implemented by Client and register Callback pointer */ +interface IPostProcServiceCallBacks { + notifyResult(Error error, PostProcResult result); +}; diff --git a/camera/postproc/1.0/IPostProcSession.hal b/camera/postproc/1.0/IPostProcSession.hal new file mode 100644 index 0000000..7dec117 --- /dev/null +++ b/camera/postproc/1.0/IPostProcSession.hal @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.qti.hardware.camera.postproc@1.0; + +import @1.0::types; +import @1.0::IPostProcServiceCallBacks; + +interface IPostProcSession { + /** API to provide parameters for postprocessing. requestId given will be used in notifyresult in callback API. + It is expected that client will keep this value to associate which handle to free. */ + process(ProcessRequestParams postprocParam) generates (uint32_t requestId, Error error); + /** API to abort all the encode requests in Queue */ + abort() generates (Error error); +}; diff --git a/camera/postproc/1.0/types.hal b/camera/postproc/1.0/types.hal new file mode 100644 index 0000000..40ea130 --- /dev/null +++ b/camera/postproc/1.0/types.hal @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.qti.hardware.camera.postproc@1.0; + +/** Camera metadata is provided as byte array. */ +typedef vec<uint8_t> CameraMetadata; + +/** This is generic Error enum */ +enum Error : int32_t +{ + /** Success */ + NONE = 0, + /** StreamId out of range */ + BAD_STREAMID = 1, + /** Maximum Sessions are in Queue */ + MAX_SESSIONS = 2, + /** Handle pointer is invalid */ + INVALID_HANDLE = 3, + /** postproc Session Create Failed */ + SESSION_NOT_INIT = 4, + /** Malloc failed */ + MALLOC_FAIL = 5, + /** Post Processor failed */ + POSTPROC_FAIL = 6, + /** Device is in bad state */ + DEVICE_BAD_STATE = 7, + /** CB Pointer is invalid */ + INVALID_CALLBACK_PTR = 8, + /** PostProc Aborted */ + ABORT = 9, + /** Unsupported Resolution */ + UNSUPPORTED_RESOLUTION = 10, +}; + +/** PostProcessor types supported by the service */ +enum PostProcType : int32_t +{ + /** YUV2Jpeg Conversion */ + JPEG = 0, +}; + +/* This struct contains WxH parameters */ +struct Resolution +{ + /** Width */ + uint32_t width; + /** Height */ + uint32_t height; +}; + +/** This struct contains JPEG postproc capabilities. + Dynamic update of resolution is supported. */ +struct JpegCapabilities +{ + /** Max number of streams supported */ + uint32_t maxStreamsSupported; + /** Max Resolution supported */ + Resolution maxResoultion; + /** Min Resolution supported */ + Resolution minResolution; + /** Gralloc Formats supported */ + vec<uint32_t> formats; +}; + +/** This structure contains generic PostProc capabilities info. + This will be updated based on different postproc features supported */ +struct PostProcCapabilities +{ + /** JPEG stream capabilities */ + JpegCapabilities jpegStream; +}; + +/** This struct contains Input and output Buffer generic properties */ +struct BufferParams +{ + /** Gralloc Format for handle */ + uint32_t format; + /** Width */ + uint32_t width; + /** Height */ + uint32_t height; +}; + +/** This struct contains parameters for postproc initialization */ +struct CreateParams +{ + /** Postproc type value */ + PostProcType postProcTypeVal; + /** Parameters for input */ + vec<BufferParams> input; + /** Parameters for output */ + vec<BufferParams> output; +}; + +/** Client can dynamically choose to update resolution for JPEG encode. + If Client choose to use same resolution, then same parameters as CreateParams can be used */ +struct HandleParams +{ + /** Gralloc Format for handle */ + uint32_t format; + /** Width */ + uint32_t width; + /** Height */ + uint32_t height; + /** handle pointer */ + handle bufHandle; +}; + +/** This structure contains parameters given during postproc process request */ +struct ProcessRequestParams +{ + /** Array of input handles */ + vec<HandleParams> input; + /** Arry of output handles. */ + vec<HandleParams> output; + /** Stream id, This indicates which index parameters provided during Init to use for encoding. */ + uint32_t streamId; + /** Metadata related to Camera */ + CameraMetadata metadata; +}; + +/** JPEG PostProc Result structure */ +struct JpegResult +{ + /** Encoded frame size */ + uint32_t frameSize; +}; + +/** This is generic result structure. + Based on PostProcType, corresponding result structre will be used. */ +struct PostProcResult +{ + /** requestId given to client as part of process API */ + uint32_t requestId; + /** stream */ + uint32_t streamId; + /** Postproc Type Value */ + PostProcType postProcTypeVal; + /** JPEG Result structure */ + JpegResult jpegResult; +}; diff --git a/display/composer/2.0/IQtiComposerClient.hal b/display/composer/2.0/IQtiComposerClient.hal index 48eadaa..b856041 100644 --- a/display/composer/2.0/IQtiComposerClient.hal +++ b/display/composer/2.0/IQtiComposerClient.hal @@ -33,5 +33,26 @@ import android.hardware.graphics.composer@2.3::IComposerClient; interface IQtiComposerClient extends IComposerClient { + enum LayerType : uint32_t { + UNKNOWN = 0, + APP = 1, + GAME = 2, + BROWSER = 3, + }; + + /** + * SET_LAYER_TYPE has this pseudo prototype + * setLayerType(uint32_t type); + * + * param type is the layer type. + * 0 - Unknown + * 1 - APP + * 2 - Game + * 3 - Browser + */ + enum Command : @2.3::IComposerClient.Command { + SET_LAYER_TYPE = 0x800 << @2.3::IComposerClient.Command:OPCODE_SHIFT, + }; + }; diff --git a/display/composer/2.1/IQtiComposer.hal b/display/composer/2.1/IQtiComposer.hal new file mode 100644 index 0000000..d784c70 --- /dev/null +++ b/display/composer/2.1/IQtiComposer.hal @@ -0,0 +1,37 @@ +/* +* Copyright (c) 2019 The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation. nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +package vendor.qti.hardware.display.composer@2.1; + +import @2.0::IQtiComposer; + +interface IQtiComposer extends @2.0::IQtiComposer { + +}; + diff --git a/display/composer/2.1/IQtiComposerClient.hal b/display/composer/2.1/IQtiComposerClient.hal new file mode 100644 index 0000000..d4054d3 --- /dev/null +++ b/display/composer/2.1/IQtiComposerClient.hal @@ -0,0 +1,47 @@ +/* +* Copyright (c) 2019 The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation. nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +package vendor.qti.hardware.display.composer@2.1; + +import @2.0::IQtiComposerClient; + +interface IQtiComposerClient extends @2.0::IQtiComposerClient { + + enum Command : @2.0::IQtiComposerClient.Command { + /** + * SET_DISPLAY_ELAPSE_TIME has this pseudo prototype + * setDisplayElapseTime(s64 time); + * + * param type is of int64_t which specifies system time in ns. + */ + SET_DISPLAY_ELAPSE_TIME = 0x801 << @2.0::IQtiComposerClient.Command:OPCODE_SHIFT, + }; + +}; + diff --git a/display/composer/2.1/hidl_gen_version b/display/composer/2.1/hidl_gen_version new file mode 100644 index 0000000..badc32f --- /dev/null +++ b/display/composer/2.1/hidl_gen_version @@ -0,0 +1 @@ +version=2 diff --git a/display/config/1.12/IDisplayConfig.hal b/display/config/1.12/IDisplayConfig.hal new file mode 100644 index 0000000..175fcff --- /dev/null +++ b/display/config/1.12/IDisplayConfig.hal @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.display.config@1.12; + +import @1.11::IDisplayConfig; + +interface IDisplayConfig extends @1.11::IDisplayConfig { + /* + * Query if the specified DisplayConfig has Smart Panel. + * + * @param disp_id Display Id. + * + * @param config_id DisplayConfig Id. + * + * @return is_smart True if the DisplayConfig has Smart Panel. + */ + @callflow(next="*") + isSmartPanelConfig(uint32_t disp_id, uint32_t config_id) generates (bool is_smart); +}; diff --git a/display/config/1.13/IDisplayConfig.hal b/display/config/1.13/IDisplayConfig.hal new file mode 100644 index 0000000..a475a4c --- /dev/null +++ b/display/config/1.13/IDisplayConfig.hal @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.display.config@1.13; + +import @1.12::IDisplayConfig; + +interface IDisplayConfig extends @1.12::IDisplayConfig { + /* + * Query if asynchronous Virtual Display Creation is supported + * @return is_supported true if async Virtual display creation is supported + */ + @callflow(next="*") + isAsyncVDSCreationSupported() generates (bool is_supported); + + /* + * Creates Virtual Display based on width, height, format parameters. + * + * @param width Width of the virtual display. + * @param height Height of the virtual display. + * @param format Pixel format of the virtual display. + * @return error is NONE on successful creation of display + */ + @callflow(next="*") + createVirtualDisplay(uint32_t width, uint32_t height, int32_t format) generates (int32_t error); +}; diff --git a/display/config/1.14/IDisplayConfig.hal b/display/config/1.14/IDisplayConfig.hal new file mode 100644 index 0000000..a37fa7f --- /dev/null +++ b/display/config/1.14/IDisplayConfig.hal @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.display.config@1.14; + +import @1.13::IDisplayConfig; + +interface IDisplayConfig extends @1.13::IDisplayConfig { + /* + * Returns true if the given format is supported by rotator otherwise false + * + * @param format Pass HAL_PIXEL_FORMAT for the validation + * @param ubwc true if the given format is ubwc format otherwise false + * + * @return supported true if supported or false. + */ + @callflow(next="*") + isRotatorSupportedFormat(int32_t format, bool ubwc) generates (bool supported); +}; diff --git a/display/config/1.15/IDisplayConfig.hal b/display/config/1.15/IDisplayConfig.hal new file mode 100644 index 0000000..f4d84e3 --- /dev/null +++ b/display/config/1.15/IDisplayConfig.hal @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.display.config@1.15; + +import @1.14::IDisplayConfig; +import IDisplayQsyncCallback; + +interface IDisplayConfig extends @1.14::IDisplayConfig { + /* + * Register a callback which will be invoked when there is a change + * in the Qsync configuration. + * + * @param callback is the IDisplayQsyncCallback object. + * + * @return error is NONE upon success. + */ + @callflow(next="*") + registerQsyncCallback(IDisplayQsyncCallback callback) generates (int32_t error); +}; diff --git a/display/config/1.15/IDisplayQsyncCallback.hal b/display/config/1.15/IDisplayQsyncCallback.hal new file mode 100644 index 0000000..1da47f7 --- /dev/null +++ b/display/config/1.15/IDisplayQsyncCallback.hal @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.display.config@1.15; + +interface IDisplayQsyncCallback { + /* + * Notifies the client that Qsync has been re-configured. + * + * @param enabled specifies if qsync is enabled/disabled. + * @param fps specifies the current fps of the display. + * @param qsync_fps specifies the minimum qsync fps. + */ + @callflow(next="*") + oneway onQsyncReconfigured(bool enabled, int32_t fps, int32_t qsync_fps); +}; diff --git a/display/config/2.0/IDisplayConfig.hal b/display/config/2.0/IDisplayConfig.hal new file mode 100644 index 0000000..33d5be3 --- /dev/null +++ b/display/config/2.0/IDisplayConfig.hal @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2020 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.display.config@2.0; + +import IDisplayConfigCallback; + +interface IDisplayConfig { + /* + * Registers a client with the IDisplayConfig service. The client name will be a combination + * of the original name of the client and possibly the client's PID. This is needed to ensure + * unique identification of the client by the service. This can happen in cases where the + * client restarts and re-registers which causes multiple registration with the service. + * + * @param clientName String representing the unique name of the client. + * @param callback is the HIDL callback if any, for the callback operations to the client. + * @return error is the error code of the RegisterClient call to the service. + * @return clientHandle is a unique unsigned integer assigned to the client by service. + */ + @callflow(next="*") + registerClient(string clientName, IDisplayConfigCallback callback) + generates (int32_t error, uint64_t clientHandle); + + /* + * Perform API for the client to handle multiple requests by the IDisplayConfig service. + * + * @param clientHandle the unique unsigned integer assigned to client by service. + * @param opCode is the identifier for the operation requested by client. + * @param inputParams vector of input data structures. + * @param inputHandles vector of input buffer handles, if any. + * @return error is the error code of the requested operation. + * @return outputParams is vector of output data as part of sync API execution, if any. + * @return outputHandles is vector of output buffer handles, if any. + */ + @callflow(next="*") + perform(uint64_t clientHandle, uint32_t opCode, vec<uint8_t> inputParams, + vec<handle> inputHandles) generates (int32_t error, vec<uint8_t> outputParams, + vec<handle> outputHandles); +}; diff --git a/display/config/2.0/IDisplayConfigCallback.hal b/display/config/2.0/IDisplayConfigCallback.hal new file mode 100644 index 0000000..ff145fc --- /dev/null +++ b/display/config/2.0/IDisplayConfigCallback.hal @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2020 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package vendor.display.config@2.0; + +interface IDisplayConfigCallback { + /* + * Notifies the client with the output data and handles as part of async API execution. + * This callback is registered with the service as part of the registerClient API. + * + * @param opCode is the identifier of the Perform request for which the callback is performed. + * @param callbackParams is the vector of data passed to the client, if any. + * @param callbackHandles is the vector of buffer handles passed to the client, if any. + */ + @callflow(next="*") + oneway perform(uint32_t opCode, vec<uint8_t> callbackParams, vec<handle> callbackHandles); +}; diff --git a/display/current.txt b/display/current.txt index 9f66234..9df322a 100644 --- a/display/current.txt +++ b/display/current.txt @@ -33,9 +33,11 @@ fcc31b8e0d422752cf4f4c69618488ea9cd5a4e0f21404adca087dc4ef23d6df vendor.display. #HAL released in Android P 44a03774c9931f3779affaa88bb0217a3666420c38ca0c98170a7cf40a581419 vendor.qti.hardware.display.allocator@1.0::IQtiAllocator -f5c217947f9e7ddc9b20d339928adfb4c84fb91969119b2479e9993ca3e4db08 vendor.qti.hardware.display.composer@1.0::IQtiComposer -6a1ce8d44bf75d2102ae54bddce02f2bc7bd064444c30402b6dea741114703de vendor.qti.hardware.display.composer@1.0::IQtiComposerClient db19f93c419a59c901c1530a9241480b047a0f026b2eef7fe0c55cf3874c56c0 vendor.qti.hardware.display.mapper@1.0::IQtiMapper +60c78b8bb8728d6826d8a57dd5d8112120541c2be130d7d7cd62345c3e9eaf1a vendor.qti.hardware.display.composer@2.0::IQtiComposer +c22f5d631432b98b5f40a845a0797b5ed0fe42e9facb517fc8a98811835fb4a2 vendor.qti.hardware.display.composer@2.0::IQtiComposerClient +5c479b5d32d3d5eb669904dd05c004895625d79e0f2d65a307f43c3dd0fc5c44 vendor.qti.hardware.display.composer@2.1::IQtiComposer +97befe9b69d6ec918fdb76bee572aa95b07b789aa70ec3711c0c9a3e45a35fbe vendor.qti.hardware.display.composer@2.1::IQtiComposerClient f955d3cd7704809f64a6e1f5b1e6cf92b3765386af5e7e485ec4563c975467ba vendor.qti.hardware.display.mapper@1.1::IQtiMapper 503415d1b4d8aefe231fd751cc36e374e91d561f3d3dd3459f31f3a67aa6dfe5 vendor.display.config@1.2::IDisplayConfig e89567ed6383dc0e5fd168babaf046352962b571f47fba26804c2c7690256b1f vendor.display.config@1.3::IDisplayConfig @@ -48,3 +50,18 @@ fd36f8dbe80403d93f0e94651ae4efa1aa22053351e7783f5d99457cff9dbacc vendor.display. f78bba2991501438ad9ca1a0812f6a2a3991cb178bec4c00bd8eec841777d8d9 vendor.display.config@1.10::IDisplayConfig 50369a070405a1f0cac44648f39ca32864c1339896d6eb16524b32fff9e95f03 vendor.display.config@1.10::IDisplayCWBCallback 10a290fc22df7680d00c53370870d5e941b7d60afcb94e90d2dd03369e7ccebc vendor.display.config@1.11::IDisplayConfig +ec808064f9829b3c124edf70042b651aac29ec0c3ebc842626c42da4a327ff2c vendor.display.config@1.12::IDisplayConfig +c3ee03cf51ea11b6093a67d78be71085f1b5208e4ffbdbced1013c02246edc96 vendor.display.config@1.13::IDisplayConfig +fe3a84ee6c6231badb64b5331813fd29aa8df5146113cca0490255102a15a1be vendor.display.config@1.14::IDisplayConfig + +#HAL released in Android Q +72889f3c7812efb6e00cd59d17dca3ee392b029eef83622758d206e1e835722c vendor.qti.hardware.display.mapper@3.0::IQtiMapper +7a1372c94ff50960e4f3c3c4262021527eb77c6d4eb8726ebdea9c36dc82eb56 vendor.qti.hardware.display.allocator@3.0::IQtiAllocator +9e960ad971bfeb1ccc3102caf0a2d94e95457a1ff9ff0c72156faa94f2500c5d vendor.qti.hardware.display.mapperextensions@1.1::IQtiMapperExtensions +b750c6dd2233e7d102f0a4f3d5124e358d134b80dfc86066d84e6f0722615881 vendor.qti.hardware.display.mapperextensions@1.0::types +13eca267916c940ad44e08ee5e43e22bb24fa6afe7f2b824ea9d6c753d17e1d9 vendor.qti.hardware.display.mapperextensions@1.0::IQtiMapperExtensions +cc81da1cfc8f045fa4183a7ab2f5f34cb863b310b8d04bf7db661a58ec9ea5c3 vendor.display.config@1.15::IDisplayConfig +be4de6eea1098375e80d26bd86d0e239a3d739ec7dfa43b1b2fa5e6f75c86966 vendor.display.config@1.15::IDisplayQsyncCallback +5862c0c085c9e0b6d8b8a11e4a9765a6a9250874d7c1a9b0f6b566598da31593 vendor.display.config@2.0::IDisplayConfig +14fcf170f04a9878bf085b2aa4d75ef5e3d241926bef18e58d6d254e000ff689 vendor.display.config@2.0::IDisplayConfigCallback + diff --git a/fstman/1.0/IFstGroup.hal b/fstman/1.0/IFstGroup.hal new file mode 100644 index 0000000..9fd10c8 --- /dev/null +++ b/fstman/1.0/IFstGroup.hal @@ -0,0 +1,213 @@ +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ + + +package vendor.qti.hardware.fstman@1.0; + +import IFstGroupCallback; + +/** + * Interface exposed by the supplicant for each FST group (e.g bond0) + * it controls. + */ +interface IFstGroup { + + /** + * Retrieves the name of the FST group. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN| + * @return name Name of the FST group, e.g., bond0 + */ + getName() generates (FstManagerStatus status, string name); + + /** + * Register for callbacks from this group. + * + * These callbacks are invoked for events that are specific to this group. + * Registration of multiple callback objects is supported. These objects must + * be automatically deleted when the corresponding client process is dead or + * if this group is removed. + * + * @param callback An instance of the |IFstGroupCallback| HIDL + * interface object. + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + */ + registerCallback(IFstGroupCallback callback) + generates (FstManagerStatus status); + + /** + * Retrieve a list of all interfaces belonging to this group. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN| + * @return ifaceNames List of names for interfaces belonging to this group. + */ + listInterfaces() generates (FstManagerStatus status, vec<string> ifaceNames); + + /** + * check if FST mode is supported for this group. + * When FST mode is supported, framework should detect FST-capable AP by + * checking for presence of MB IE in probe response. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + * @return supported true if FST mode is supported, false if not. + */ + isFstModeSupported() generates (FstManagerStatus status, bool supported); + + /** + * check if WIFI SON mode is supported for this group. + * When SON mode is supported, framework should detect SON-capable AP by + * checking for presence of SON IE in probe response. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + * @return supported true if WIFI SON mode supported, false if not. + */ + isWifiSonModeSupported() generates (FstManagerStatus status, bool supported); + + /** + * get the name of the MUX interface used by this group. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + * @return name name of the MUX interface (such as bond0) + */ + getMuxInterfaceName() generates (FstManagerStatus status, string name); + + /** + * set the name of the MUX interface used by this group. + * The group must not have any enslaved interfaces or active connection. + * + * @param name new name for the MUX interface. + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + */ + setMuxInterfaceName(string name) generates (FstManagerStatus status); + + /** + * Enslave or release a group interface. + * When enslaving, interface will be added to master + * interface as a slave. + * When releasing, interface will be detached from + * master interface and no longer be a slave. + * When releasing, fst-manager will also disconnect + * any active connection on the interface (via supplicant) + * + * @param ifname interface name, must be one of the group interfaces. + * @param enslave true to enslave, false to release + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_ARGS_INVALID|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + */ + enslave(string ifname, bool enslave) + generates (FstManagerStatus status); + + /** + * check if the interface is currently enslaved under the + * MUX interface. + * + * @param ifname interface name, must be one of the group interfaces. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_ARGS_INVALID|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + * @return enslaved true if interface is enslaved, false if not. + */ + isEnslaved(string ifname) + generates (FstManagerStatus status, bool enslaved); + + /** + * Changes the MAC address of the group master interface + * and its underlying interfaces. + * + * @param mac MAC address to change into. + * @return status WifiStatus of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + */ + setMacAddress(MacAddress mac) generates (FstManagerStatus status); + + /** + * check if the specified interface is the rate upgrade master for + * this group. The rate upgrade master is typically the "always on" + * connection which is used as a fallback when the faster (but less + * reliable) interface is not available. + * + * @param ifname interface name, must be one of the group interfaces. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_ARGS_INVALID|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + * @return isMaster true if interface is rate upgrade master, false if not. + */ + isRateUpgradeMaster(string ifname) + generates (FstManagerStatus status, bool isMaster); + + /** + * rename one of the group interfaces. + * The interface must not be enslaved, and the group must + * not have an active connection. + * + * @param ifname interface name, must be one of the group interfaces. + * @param newifname new interface name for this interface. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_ARGS_INVALID|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + */ + renameInterface(string ifname, string newifname) + generates (FstManagerStatus status); +}; diff --git a/fstman/1.0/IFstGroupCallback.hal b/fstman/1.0/IFstGroupCallback.hal new file mode 100644 index 0000000..ae6de9b --- /dev/null +++ b/fstman/1.0/IFstGroupCallback.hal @@ -0,0 +1,42 @@ +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ + +package vendor.qti.hardware.fstman@1.0; + +/** + * Callback Interface exposed by the fst-manager service + * for each FST group (IFstGroup). + * + * Clients need to host an instance of this HIDL interface object and + * pass a reference of the object to the supplicant via the + * corresponding |IFstGroup.registerCallback| method. + */ +interface IFstGroupCallback { + +}; diff --git a/fstman/1.0/IFstManager.hal b/fstman/1.0/IFstManager.hal new file mode 100644 index 0000000..3909703 --- /dev/null +++ b/fstman/1.0/IFstManager.hal @@ -0,0 +1,118 @@ +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +package vendor.qti.hardware.fstman@1.0; + +import IFstGroup; + +/** + * interface for communicating with fst-manager + */ +interface IFstManager { + + /** + * Debug levels for the fst-manager. + * Only log messages with a level greater than the set level + * (via |setDebugParams|) will be logged. + */ + enum DebugLevel : uint32_t { + EXCESSIVE = 0, + MSGDUMP = 1, + DEBUG = 2, + INFO = 3, + WARNING = 4, + ERROR = 5 + }; + + /** + * Gets a HIDL interface object for the group corresponding to group + * name which the fst-manager already controls. + * + * @param groupName The group name. + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN|, + * |FstManagerStatusCode.FAILURE_GROUP_UNKOWN| + * @return group HIDL interface object representing the group if + * successful, null otherwise. + */ + getGroup(string groupName) + generates (FstManagerStatus status, IFstGroup group); + + /** + * Retrieve a list of all the groups controlled by the fst-manager. + * + * The corresponding |IFstGroup| object for any group can be + * retrieved using |getGroup| method. + * + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN| + * @return groupNames List of all group names controlled by the fst-manager. + */ + listGroups() generates (FstManagerStatus status, vec<string> groupNames); + + /** + * Set debug parameters for the fst-manager. + * + * @param level Debug logging level for the fst-manager. + * (one of |DebugLevel| values). + * @param timestamp Determines whether to show timestamps in logs or + * not. + * @return status Status of the operation. + * Possible status codes: + * |FstManagerStatusCode.SUCCESS|, + * |FstManagerStatusCode.FAILURE_UNKNOWN| + */ + setDebugParams(DebugLevel level, bool showTimestamp) + generates (FstManagerStatus status); + + /** + * Get the debug level set. + * + * @return level one of |DebugLevel| values. + */ + getDebugLevel() generates (DebugLevel level); + + /** + * Get whether the timestamps are shown in the debug logs or not. + * + * @return enabled true if set, false otherwise. + */ + isDebugShowTimestampEnabled() generates (bool enabled); + + /** + * Terminate the service. + * This must de-register the service and clear all state. If this HAL + * supports the lazy HAL protocol, then this may trigger daemon to exit and + * wait to be restarted. + */ + oneway terminate(); +}; diff --git a/fstman/1.0/types.hal b/fstman/1.0/types.hal new file mode 100644 index 0000000..824a4cd --- /dev/null +++ b/fstman/1.0/types.hal @@ -0,0 +1,61 @@ +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ + +package vendor.qti.hardware.fstman@1.0; +/** + * Enum values indicating the status of any FST manager operation. + */ +enum FstManagerStatusCode : uint32_t { + /** No errors. */ + SUCCESS, + /** Unknown failure occured. */ + FAILURE_UNKNOWN, + /** One of the incoming args is invalid. */ + FAILURE_ARGS_INVALID, + /** Unknown FST group */ + FAILURE_GROUP_UNKNOWN, +}; + +/** + * Generic structure to return the status of any FST manager operation. + */ +struct FstManagerStatus { + FstManagerStatusCode code; + /** + * A vendor specific error message to provide more information beyond the + * status code. + * This will be used for debbuging purposes only. + */ + string debugMessage; +}; + +/** + * Mac Address type. 6 octets representing physical address of a device. + */ +typedef uint8_t[6] MacAddress; diff --git a/fstman/current.txt b/fstman/current.txt new file mode 100644 index 0000000..dd02587 --- /dev/null +++ b/fstman/current.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2019, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# + + +######HAL released in Android Q###### +a916925177373b896bf211eb00faaeae7063ef40351286a64f4bec8e0079e6db vendor.qti.hardware.fstman@1.0::types +951b29cb64137afe92a225d85af245d96c89405dae56c6af5339f13f4c4e2904 vendor.qti.hardware.fstman@1.0::IFstGroup +24bd58f69a5d3be9294f9a671b81da1f36120ff17954d0ec94fbbff14f968a62 vendor.qti.hardware.fstman@1.0::IFstGroupCallback +d9f95a2ba931ce60b39b564d52ae4644e875b10e7ec27ce42da83a95dcff4e81 vendor.qti.hardware.fstman@1.0::IFstManager + |