1 /* 2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef AUDIO_IF_LIB_COMMON_H 17 #define AUDIO_IF_LIB_COMMON_H 18 19 #include "audio_internal.h" 20 21 #define CTRL_NUM 100 22 #define CTRL_CMD "control" /* For Bind control service */ 23 24 struct AudioPcmHwParams { 25 enum AudioStreamType streamType; 26 enum AudioFormat format; 27 uint32_t channels; 28 uint32_t rate; 29 uint32_t periodSize; 30 uint32_t periodCount; 31 uint32_t period; 32 uint32_t frameSize; 33 uint32_t startThreshold; 34 uint32_t stopThreshold; 35 uint32_t silenceThreshold; 36 bool isBigEndian; 37 bool isSignedData; 38 char *cardServiceName; 39 char *channelsName; 40 }; 41 42 int32_t AudioGetAllCardInfo(struct AudioAdapterDescriptor **descs, int32_t *sndCardNum); 43 #endif /* AUDIO_IF_LIB_COMMON_H */ 44