From a8eed8f2aadd47e587df1ee8143f7faf7f360afe Mon Sep 17 00:00:00 2001 From: roynatech2544 Date: Wed, 5 Oct 2022 09:59:31 +0000 Subject: [PATCH] universal7885: fm-hidl -> fm-aidl --- .../apps/aidl-support/fm/Android.bp | 9 +++++ .../eureka/hardware/fmradio/Direction.aidl | 21 ++++++++++++ .../eureka/hardware/fmradio/IFMRadio.aidl | 33 +++++++++++++++++++ .../vendor/eureka/hardware/fmradio/Space.aidl | 24 ++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 universal7885-common/apps/aidl-support/fm/Android.bp create mode 100644 universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Direction.aidl create mode 100644 universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/IFMRadio.aidl create mode 100644 universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Space.aidl diff --git a/universal7885-common/apps/aidl-support/fm/Android.bp b/universal7885-common/apps/aidl-support/fm/Android.bp new file mode 100644 index 0000000..7dcdbaa --- /dev/null +++ b/universal7885-common/apps/aidl-support/fm/Android.bp @@ -0,0 +1,9 @@ +aidl_interface { + name: "vendor.eureka.hardware.fmradio", + srcs: ["vendor/eureka/hardware/fmradio/*.aidl"], + backend: { + ndk: { + enabled: true, + }, + }, +} diff --git a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Direction.aidl b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Direction.aidl new file mode 100644 index 0000000..f3897dc --- /dev/null +++ b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Direction.aidl @@ -0,0 +1,21 @@ +// Copyright (C) 2022 Eureka Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package vendor.eureka.hardware.fmradio; + +@Backing(type="int") +enum Direction { + UP, + DOWN, +} diff --git a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/IFMRadio.aidl b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/IFMRadio.aidl new file mode 100644 index 0000000..243aae2 --- /dev/null +++ b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/IFMRadio.aidl @@ -0,0 +1,33 @@ +// Copyright (C) 2022 Eureka Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package vendor.eureka.hardware.fmradio; + +import vendor.eureka.hardware.fmradio.Direction; +import vendor.eureka.hardware.fmradio.Status; +import vendor.eureka.hardware.fmradio.Space; + +interface IFMRadio { + void adjustFreqByStep(in Direction dir); + + Space getChannelSpacing(); + + int getFreqFromSysfs(); + + boolean isAvailable(); + + void setChannelSpacing(in Space space); + + void setManualFreq(in float freq); +} diff --git a/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Space.aidl b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Space.aidl new file mode 100644 index 0000000..80f6975 --- /dev/null +++ b/universal7885-common/apps/aidl-support/fm/vendor/eureka/hardware/fmradio/Space.aidl @@ -0,0 +1,24 @@ +// Copyright (C) 2022 Eureka Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package vendor.eureka.hardware.fmradio; + +@Backing(type="int") +enum Space { + CHANNEL_SPACING_10HZ = 1, + CHANNEL_SPACING_20HZ, + CHANNEL_SPACING_30HZ, + CHANNEL_SPACING_40HZ, + CHANNEL_SPACING_50HZ = 5, +}