Loading camera/camera_platform.aconfig +9 −0 Original line number Diff line number Diff line Loading @@ -186,3 +186,12 @@ flag { description: "Support setting and getting mirror mode for shared surfaces" bug: "298899993" } flag { namespace: "camera_platform" is_exported: true name: "multiresolution_imagereader_usage_public" description: "Make constructor for MultiResolutionImageReader with usage public" bug: "338621560" } media/audioaidlconversion/AidlConversionCppNdk.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -1797,6 +1797,8 @@ aidl2legacy_AudioUsage_audio_usage_t(AudioUsage aidl) { return AUDIO_USAGE_VEHICLE_STATUS; case AudioUsage::ANNOUNCEMENT: return AUDIO_USAGE_ANNOUNCEMENT; case AudioUsage::SPEAKER_CLEANUP: return AUDIO_USAGE_SPEAKER_CLEANUP; } return unexpected(BAD_VALUE); } Loading Loading @@ -1848,6 +1850,8 @@ legacy2aidl_audio_usage_t_AudioUsage(audio_usage_t legacy) { return AudioUsage::VEHICLE_STATUS; case AUDIO_USAGE_ANNOUNCEMENT: return AudioUsage::ANNOUNCEMENT; case AUDIO_USAGE_SPEAKER_CLEANUP: return AudioUsage::SPEAKER_CLEANUP; } return unexpected(BAD_VALUE); } Loading media/janitors/media_solutions_OWNERS +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ andrewlewis@google.com bachinger@google.com claincly@google.com dancho@google.com ibaker@google.com ivanbuper@google.com jbibik@google.com Loading media/libaaudio/include/system/aaudio/AAudio.h 0 → 100644 +80 −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. */ /** * This is the system APIs for AAudio. */ #ifndef SYSTEM_AAUDIO_H #define SYSTEM_AAUDIO_H #include <aaudio/AAudio.h> #ifdef __cplusplus extern "C" { #endif /** * The tags string attributes allows OEMs to extend the * <a href="/reference/android/media/AudioAttributes">AudioAttributes</a>. * * Note that the maximum length includes all tags combined with delimiters and null terminator. * * Note that it matches the equivalent value in * <a href="/reference/android/system/media/audio">AUDIO_ATTRIBUTES_TAGS_MAX_SIZE</a> * in the Android native API. */ #define AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE 256 /** * Set one or more vendor extension tags that the output stream will carry. * * The tags can be used by the audio policy engine for routing purpose. * Routing is based on audio attributes, translated into legacy stream type. * The stream types cannot be extended, so the product strategies have been introduced to allow * vendor extension of routing capabilities. * This could, for example, affect how volume and routing is handled for the stream. * * The tags can also be used by a System App to pass vendor specific information through the * framework to the HAL. That info could affect routing, ducking or other audio behavior in the HAL. * * By default, audio attributes tags are empty if this method is not called. * * @param builder reference provided by AAudio_createStreamBuilder() * @param tags the desired tags to add, which must be UTF-8 format and null-terminated. The size * of the tags must be at most {@link #AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE}. Multiple tags * must be separated by semicolons. * @return {@link #AAUDIO_OK} on success or {@link #AAUDIO_ERROR_ILLEGAL_ARGUMENT} if the given * tags is null or its length is greater than {@link #AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE}. */ aaudio_result_t AAudioStreamBuilder_setTags(AAudioStreamBuilder* _Nonnull builder, const char* _Nonnull tags); /** * Read the audio attributes' tags for the stream into a buffer. * The caller is responsible for allocating and freeing the returned data. * * @param stream reference provided by AAudioStreamBuilder_openStream() * @param tags pointer to write the value to in UTF-8 that containing OEM extension tags. It must * be sized with {@link #AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE}. * @return {@link #AAUDIO_OK} or {@link #AAUDIO_ERROR_ILLEGAL_ARGUMENT} if the given tags is null. */ aaudio_result_t AAudioStream_getTags(AAudioStream* _Nonnull stream, char* _Nonnull tags); #ifdef __cplusplus } #endif #endif //SYSTEM_AAUDIO_H media/libaaudio/src/binding/AAudioStreamConfiguration.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ AAudioStreamConfiguration::AAudioStreamConfiguration(const StreamParameters& par setUsage(parcelable.usage); static_assert(sizeof(aaudio_content_type_t) == sizeof(parcelable.contentType)); setContentType(parcelable.contentType); setTags(parcelable.tags); static_assert(sizeof(aaudio_spatialization_behavior_t) == sizeof(parcelable.spatializationBehavior)); setSpatializationBehavior(parcelable.spatializationBehavior); Loading Loading @@ -106,6 +106,8 @@ StreamParameters AAudioStreamConfiguration::parcelable() const { result.usage = getUsage(); static_assert(sizeof(aaudio_content_type_t) == sizeof(result.contentType)); result.contentType = getContentType(); std::optional<std::string> tags = getTags(); result.tags = tags.has_value() ? tags.value() : ""; static_assert( sizeof(aaudio_spatialization_behavior_t) == sizeof(result.spatializationBehavior)); result.spatializationBehavior = getSpatializationBehavior(); Loading Loading
camera/camera_platform.aconfig +9 −0 Original line number Diff line number Diff line Loading @@ -186,3 +186,12 @@ flag { description: "Support setting and getting mirror mode for shared surfaces" bug: "298899993" } flag { namespace: "camera_platform" is_exported: true name: "multiresolution_imagereader_usage_public" description: "Make constructor for MultiResolutionImageReader with usage public" bug: "338621560" }
media/audioaidlconversion/AidlConversionCppNdk.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -1797,6 +1797,8 @@ aidl2legacy_AudioUsage_audio_usage_t(AudioUsage aidl) { return AUDIO_USAGE_VEHICLE_STATUS; case AudioUsage::ANNOUNCEMENT: return AUDIO_USAGE_ANNOUNCEMENT; case AudioUsage::SPEAKER_CLEANUP: return AUDIO_USAGE_SPEAKER_CLEANUP; } return unexpected(BAD_VALUE); } Loading Loading @@ -1848,6 +1850,8 @@ legacy2aidl_audio_usage_t_AudioUsage(audio_usage_t legacy) { return AudioUsage::VEHICLE_STATUS; case AUDIO_USAGE_ANNOUNCEMENT: return AudioUsage::ANNOUNCEMENT; case AUDIO_USAGE_SPEAKER_CLEANUP: return AudioUsage::SPEAKER_CLEANUP; } return unexpected(BAD_VALUE); } Loading
media/janitors/media_solutions_OWNERS +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ andrewlewis@google.com bachinger@google.com claincly@google.com dancho@google.com ibaker@google.com ivanbuper@google.com jbibik@google.com Loading
media/libaaudio/include/system/aaudio/AAudio.h 0 → 100644 +80 −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. */ /** * This is the system APIs for AAudio. */ #ifndef SYSTEM_AAUDIO_H #define SYSTEM_AAUDIO_H #include <aaudio/AAudio.h> #ifdef __cplusplus extern "C" { #endif /** * The tags string attributes allows OEMs to extend the * <a href="/reference/android/media/AudioAttributes">AudioAttributes</a>. * * Note that the maximum length includes all tags combined with delimiters and null terminator. * * Note that it matches the equivalent value in * <a href="/reference/android/system/media/audio">AUDIO_ATTRIBUTES_TAGS_MAX_SIZE</a> * in the Android native API. */ #define AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE 256 /** * Set one or more vendor extension tags that the output stream will carry. * * The tags can be used by the audio policy engine for routing purpose. * Routing is based on audio attributes, translated into legacy stream type. * The stream types cannot be extended, so the product strategies have been introduced to allow * vendor extension of routing capabilities. * This could, for example, affect how volume and routing is handled for the stream. * * The tags can also be used by a System App to pass vendor specific information through the * framework to the HAL. That info could affect routing, ducking or other audio behavior in the HAL. * * By default, audio attributes tags are empty if this method is not called. * * @param builder reference provided by AAudio_createStreamBuilder() * @param tags the desired tags to add, which must be UTF-8 format and null-terminated. The size * of the tags must be at most {@link #AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE}. Multiple tags * must be separated by semicolons. * @return {@link #AAUDIO_OK} on success or {@link #AAUDIO_ERROR_ILLEGAL_ARGUMENT} if the given * tags is null or its length is greater than {@link #AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE}. */ aaudio_result_t AAudioStreamBuilder_setTags(AAudioStreamBuilder* _Nonnull builder, const char* _Nonnull tags); /** * Read the audio attributes' tags for the stream into a buffer. * The caller is responsible for allocating and freeing the returned data. * * @param stream reference provided by AAudioStreamBuilder_openStream() * @param tags pointer to write the value to in UTF-8 that containing OEM extension tags. It must * be sized with {@link #AAUDIO_ATTRIBUTES_TAGS_MAX_SIZE}. * @return {@link #AAUDIO_OK} or {@link #AAUDIO_ERROR_ILLEGAL_ARGUMENT} if the given tags is null. */ aaudio_result_t AAudioStream_getTags(AAudioStream* _Nonnull stream, char* _Nonnull tags); #ifdef __cplusplus } #endif #endif //SYSTEM_AAUDIO_H
media/libaaudio/src/binding/AAudioStreamConfiguration.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ AAudioStreamConfiguration::AAudioStreamConfiguration(const StreamParameters& par setUsage(parcelable.usage); static_assert(sizeof(aaudio_content_type_t) == sizeof(parcelable.contentType)); setContentType(parcelable.contentType); setTags(parcelable.tags); static_assert(sizeof(aaudio_spatialization_behavior_t) == sizeof(parcelable.spatializationBehavior)); setSpatializationBehavior(parcelable.spatializationBehavior); Loading Loading @@ -106,6 +106,8 @@ StreamParameters AAudioStreamConfiguration::parcelable() const { result.usage = getUsage(); static_assert(sizeof(aaudio_content_type_t) == sizeof(result.contentType)); result.contentType = getContentType(); std::optional<std::string> tags = getTags(); result.tags = tags.has_value() ? tags.value() : ""; static_assert( sizeof(aaudio_spatialization_behavior_t) == sizeof(result.spatializationBehavior)); result.spatializationBehavior = getSpatializationBehavior(); Loading