• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef AUDIO_PLATFORM_BASE_H
10 #define AUDIO_PLATFORM_BASE_H
11 
12 #include "audio_platform_if.h"
13 #include "audio_host.h"
14 
15 #ifdef __cplusplus
16 #if __cplusplus
17 extern "C" {
18 #endif
19 #endif /* __cplusplus */
20 
21 enum DataBitWidth {
22     DATA_BIT_WIDTH8  =  8,      /* 8 bit witdth */
23     DATA_BIT_WIDTH16 =  16,     /* 16 bit witdth */
24     DATA_BIT_WIDTH18 =  18,     /* 18 bit witdth */
25     DATA_BIT_WIDTH20 =  20,     /* 20 bit witdth */
26     DATA_BIT_WIDTH24 =  24,     /* 24 bit witdth */
27     DATA_BIT_WIDTH32 =  32,     /* 32 bit witdth */
28 };
29 
30 struct PlatformData *PlatformDataFromDevice(const struct AudioCard *card);
31 int32_t PlatformCreatePlatformHost(const struct AudioCard *card, struct PlatformHost **platformHost);
32 int32_t AudioDataBigEndianChange(char *srcData, uint32_t audioLen, enum DataBitWidth bitWidth);
33 
34 #ifdef __cplusplus
35 #if __cplusplus
36 }
37 #endif
38 #endif /* __cplusplus */
39 
40 #endif /* CODEC_CORE_H */
41