Loading automotive/audiocontrol/aidl/Android.bp +10 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ aidl_interface { "com.android.car.framework", ], }, rust: { enabled: true, }, }, versions_with_info: [ { Loading Loading @@ -100,3 +103,10 @@ java_defaults { latest_android_hardware_automotive_audiocontrol + "-java", ], } rust_defaults { name: "latest_android_hardware_automotive_audiocontrol_rust", rustlibs: [ latest_android_hardware_automotive_audiocontrol + "-rust", ], } automotive/audiocontrol/aidl/rust_impl/Android.bp 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * 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. */ rust_binary { name: "android.hardware.automotive.audiocontrol-V4-rust-service", relative_install_path: "hw", vendor: true, srcs: ["src/*.rs"], crate_root: "src/main.rs", defaults: [ "latest_android_hardware_automotive_audiocontrol_rust", "latest_android_hardware_audio_common_rust", ], vintf_fragments: ["audiocontrol-rust-service.xml"], init_rc: ["audiocontrol-rust-service.rc"], rustlibs: [ "libbinder_rs", ], } automotive/audiocontrol/aidl/rust_impl/README.md 0 → 100644 +13 −0 Original line number Diff line number Diff line # Rust Skeleton Audio Control HAL implementation. WARNING: This is not a reference audio control HAl implementation and does not contain any actual implementation. This folder contains a skeleton audio control HAL implementation in Rust to demonstrate how vendor may implement a Rust audio control HAL. To run this audio control HAL, include `android.hardware.automotive.audiocontrol-V4-rust-service` in your image. This implementation returns `StatusCode::UNKNOWN_ERROR` for all operations and does not pass VTS/CTS. Vendor must replace the logic in `default_audio_control_hal.rs` with the actual implementation. automotive/audiocontrol/aidl/rust_impl/audiocontrol-rust-service.rc 0 → 100644 +4 −0 Original line number Diff line number Diff line service vendor.audiocontrol-default /vendor/bin/hw/android.hardware.automotive.audiocontrol-service.example class hal user audioserver group system automotive/audiocontrol/aidl/rust_impl/audiocontrol-rust-service.xml 0 → 100644 +23 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2024 The Android Open Source Project ~ ~ 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. --> <manifest version="2.0" type="device"> <hal format="aidl"> <name>android.hardware.automotive.audiocontrol</name> <version>4</version> <fqname>IAudioControl/default</fqname> </hal> </manifest> Loading
automotive/audiocontrol/aidl/Android.bp +10 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ aidl_interface { "com.android.car.framework", ], }, rust: { enabled: true, }, }, versions_with_info: [ { Loading Loading @@ -100,3 +103,10 @@ java_defaults { latest_android_hardware_automotive_audiocontrol + "-java", ], } rust_defaults { name: "latest_android_hardware_automotive_audiocontrol_rust", rustlibs: [ latest_android_hardware_automotive_audiocontrol + "-rust", ], }
automotive/audiocontrol/aidl/rust_impl/Android.bp 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * 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. */ rust_binary { name: "android.hardware.automotive.audiocontrol-V4-rust-service", relative_install_path: "hw", vendor: true, srcs: ["src/*.rs"], crate_root: "src/main.rs", defaults: [ "latest_android_hardware_automotive_audiocontrol_rust", "latest_android_hardware_audio_common_rust", ], vintf_fragments: ["audiocontrol-rust-service.xml"], init_rc: ["audiocontrol-rust-service.rc"], rustlibs: [ "libbinder_rs", ], }
automotive/audiocontrol/aidl/rust_impl/README.md 0 → 100644 +13 −0 Original line number Diff line number Diff line # Rust Skeleton Audio Control HAL implementation. WARNING: This is not a reference audio control HAl implementation and does not contain any actual implementation. This folder contains a skeleton audio control HAL implementation in Rust to demonstrate how vendor may implement a Rust audio control HAL. To run this audio control HAL, include `android.hardware.automotive.audiocontrol-V4-rust-service` in your image. This implementation returns `StatusCode::UNKNOWN_ERROR` for all operations and does not pass VTS/CTS. Vendor must replace the logic in `default_audio_control_hal.rs` with the actual implementation.
automotive/audiocontrol/aidl/rust_impl/audiocontrol-rust-service.rc 0 → 100644 +4 −0 Original line number Diff line number Diff line service vendor.audiocontrol-default /vendor/bin/hw/android.hardware.automotive.audiocontrol-service.example class hal user audioserver group system
automotive/audiocontrol/aidl/rust_impl/audiocontrol-rust-service.xml 0 → 100644 +23 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2024 The Android Open Source Project ~ ~ 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. --> <manifest version="2.0" type="device"> <hal format="aidl"> <name>android.hardware.automotive.audiocontrol</name> <version>4</version> <fqname>IAudioControl/default</fqname> </hal> </manifest>