1 /* 2 * Copyright (C) 2020 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; 18 19 import android.media.AudioGainConfig; 20 import android.media.AudioIoFlags; 21 import android.media.AudioPortConfigExt; 22 import android.media.AudioPortConfigType; 23 import android.media.AudioPortRole; 24 import android.media.AudioPortType; 25 import android.media.audio.common.AudioFormat; 26 27 /** 28 * {@hide} 29 */ 30 parcelable AudioPortConfig { 31 /** 32 * Port unique ID. 33 * Interpreted as audio_port_handle_t. 34 */ 35 int id; 36 /** Sink or source. */ 37 AudioPortRole role; 38 /** Device, mix ... */ 39 AudioPortType type; 40 /** Bitmask, indexed by AudioPortConfigType. */ 41 int configMask; 42 /** Sampling rate in Hz. */ 43 int sampleRate; 44 /** 45 * Channel mask, if applicable. 46 * Interpreted as audio_channel_mask_t. 47 * TODO: bitmask? 48 */ 49 int channelMask; 50 /** 51 * Format, if applicable. 52 */ 53 AudioFormat format; 54 /** Gain to apply, if applicable. */ 55 AudioGainConfig gain; 56 /** Framework only: HW_AV_SYNC, DIRECT, ... */ 57 AudioIoFlags flags; 58 AudioPortConfigExt ext; 59 } 60