• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 
17 package android.media.audio.common;
18 
19 /**
20  * Specifies options applicable to audio output. These can be functional
21  * requests or performance requests. These flags apply both to audio ports and
22  * audio streams. Flags specified for an audio stream are usually used to find
23  * the best matching audio port for it.
24  *
25  * {@hide}
26  */
27 @VintfStability
28 @Backing(type="int")
29 enum AudioOutputFlags{
30     /**
31      * Output must not be altered by the framework, it bypasses software mixers.
32      */
33     DIRECT = 0,
34     /**
35      * When used with audio ports, indicates the "main" (primary) port. This
36      * port is opened by default and receives routing, audio mode and volume
37      * controls related to voice calls.
38      */
39     PRIMARY = 1,
40     /**
41      * Output is optimized for decreasing audio latency.
42      */
43     FAST = 2,
44     /**
45      * Output is optimized for having the low power consumption.
46      */
47     DEEP_BUFFER = 3,
48     /**
49      * Output is compressed audio format, intended for hardware decoding.
50      */
51     COMPRESS_OFFLOAD = 4,
52     /**
53      * Write operations must return as fast as possible instead of
54      * being blocked until all provided data has been consumed.
55      */
56     NON_BLOCKING = 5,
57     /**
58      * Output stream contains AV synchronization markers embedded.
59      */
60     HW_AV_SYNC = 6,
61     /**
62      * Used to support ultrasonic communication with beacons.
63      * Note: "TTS" here means "Transmitted Through Speaker",
64      * not "Text-to-Speech".
65      */
66     TTS = 7,
67     /**
68      * Output stream should only have minimal signal processing applied.
69      */
70     RAW = 8,
71     /**
72      * Output stream needs to be synchronized with an input stream.
73      */
74     SYNC = 9,
75     /**
76      * Output stream is encoded according to IEC958.
77      */
78     IEC958_NONAUDIO = 10,
79     /**
80      * Output must not be altered by the framework and hardware.
81      */
82     DIRECT_PCM = 11,
83     /**
84      * Output uses MMAP no IRQ mode--direct memory mapping with the hardware.
85      */
86     MMAP_NOIRQ = 12,
87     /**
88      * Output is used for transmitting VoIP audio.
89      */
90     VOIP_RX = 13,
91     /**
92      * Output is used for music playback during telephony calls.
93      */
94     INCALL_MUSIC = 14,
95     /**
96      * The rendered must ignore any empty blocks between compressed audio
97      * tracks.
98      */
99     GAPLESS_OFFLOAD = 15,
100     /**
101      * Output is used for spatial audio.
102      */
103     SPATIALIZER = 16,
104     /**
105      * Output is used for transmitting ultrasound audio.
106      */
107     ULTRASOUND = 17,
108     /**
109      * Output stream is bit perfect: the implementation guarantees that PCM
110      * samples are carried untouched from audio HAL to hardware interface
111      * or DAC. The volume command need to be sent to the hardware.
112      */
113     BIT_PERFECT = 18,
114 }
115