• 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 import android.media.audio.common.AudioGain;
20 import android.media.audio.common.AudioIoFlags;
21 import android.media.audio.common.AudioPortExt;
22 import android.media.audio.common.AudioProfile;
23 import android.media.audio.common.ExtraAudioDescriptor;
24 
25 /**
26  * Audio port structure describes the capabilities of an audio port.
27  * This is a "blueprint" which contains all the possible configurations
28  * that are supported by the port.
29  *
30  * {@hide}
31  */
32 @JavaDerive(equals=true, toString=true)
33 @VintfStability
34 parcelable AudioPort {
35     /**
36      * Unique identifier of the port within a HAL module.
37      */
38     int id;
39     /**
40      * Human-readable name describing the function of the port.
41      * E.g. "telephony_tx" or "fm_tuner".
42      */
43     @utf8InCpp String name;
44     /**
45      * AudioProfiles supported by this port: format, rates, channels.
46      */
47     AudioProfile[] profiles;
48     /**
49      * I/O feature flags.
50      */
51     AudioIoFlags flags;
52     /**
53      * ExtraAudioDescriptors supported by this port. Used for formats not
54      * recognized by the platform. The audio capability is described by a
55      * hardware descriptor.
56      */
57     ExtraAudioDescriptor[] extraAudioDescriptors;
58     /** Gain controllers. */
59     AudioGain[] gains;
60     /** Extra parameters depending on the port role. */
61     AudioPortExt ext;
62 }
63