1/* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18option java_package = "android.media"; 19option java_multiple_files = true; 20 21package android.media; 22 23import "frameworks/base/libs/incident/proto/android/privacy.proto"; 24 25/** 26 * An android.media.AudioAttributes object. 27 */ 28message AudioAttributesProto { 29 option (android.msg_privacy).dest = DEST_AUTOMATIC; 30 31 optional Usage usage = 1; 32 optional ContentType content_type = 2; 33 // Bit representation of set flags. 34 optional int32 flags = 3; 35 repeated string tags = 4 [ (android.privacy).dest = DEST_EXPLICIT ]; 36} 37 38enum ContentType { 39 // Content type value to use when the content type is unknown, or other than 40 // the ones defined. 41 CONTENT_TYPE_UNKNOWN = 0; 42 // Content type value to use when the content type is speech. 43 SPEECH = 1; 44 // Content type value to use when the content type is music. 45 MUSIC = 2; 46 // Content type value to use when the content type is a soundtrack, 47 // typically accompanying a movie or TV program. 48 MOVIE = 3; 49 // Content type value to use when the content type is a sound used to 50 // accompany a user action, such as a beep or sound effect expressing a key 51 // click, or event, such as the type of a sound for a bonus being received 52 // in a game. These sounds are mostly synthesized or short Foley sounds. 53 SONIFICATION = 4; 54} 55 56enum Usage { 57 // Usage value to use when the usage is unknown. 58 USAGE_UNKNOWN = 0; 59 // Usage value to use when the usage is media, such as music, or movie 60 // soundtracks. 61 MEDIA = 1; 62 // Usage value to use when the usage is voice communications, such as 63 // telephony or VoIP. 64 VOICE_COMMUNICATION = 2; 65 // Usage value to use when the usage is in-call signalling, such as with a 66 // "busy" beep, or DTMF tones. 67 VOICE_COMMUNICATION_SIGNALLING = 3; 68 // Usage value to use when the usage is an alarm (e.g. wake-up alarm). 69 ALARM = 4; 70 // Usage value to use when the usage is notification. Other notification 71 // usages are for more specialized uses. 72 NOTIFICATION = 5; 73 // Usage value to use when the usage is telephony ringtone. 74 NOTIFICATION_RINGTONE = 6; 75 // Usage value to use when the usage is a request to enter/end a 76 // communication, such as a VoIP communication or video-conference. 77 NOTIFICATION_COMMUNICATION_REQUEST = 7; 78 // Usage value to use when the usage is notification for an "instant" 79 // communication such as a chat, or SMS. 80 NOTIFICATION_COMMUNICATION_INSTANT = 8; 81 // Usage value to use when the usage is notification for a non-immediate 82 // type of communication such as e-mail. 83 NOTIFICATION_COMMUNICATION_DELAYED = 9; 84 // Usage value to use when the usage is to attract the user's attention, 85 // such as a reminder or low battery warning. 86 NOTIFICATION_EVENT = 10; 87 // Usage value to use when the usage is for accessibility, such as with a 88 // screen reader. 89 ASSISTANCE_ACCESSIBILITY = 11; 90 // Usage value to use when the usage is driving or navigation directions. 91 ASSISTANCE_NAVIGATION_GUIDANCE = 12; 92 // Usage value to use when the usage is sonification, such as with user 93 // interface sounds. 94 ASSISTANCE_SONIFICATION = 13; 95 // Usage value to use when the usage is for game audio. 96 GAME = 14; 97 // Usage value to use when feeding audio to the platform and replacing 98 // "traditional" audio source, such as audio capture devices. 99 VIRTUAL_SOURCE = 15; 100 // Usage value to use for audio responses to user queries, audio 101 // instructions or help utterances. 102 ASSISTANT = 16; 103} 104