for callback invoke when resolution is changed
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / exynos4 / libcodec / audio / alp / include / srp_api.h
1 /*
2  *
3  * Copyright 2012 Samsung Electronics S.LSI Co. LTD
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 /*
19  * @file        srp_api.h
20  * @brief
21  * @author      Yunji Kim (yunji.kim@samsung.com)
22  * @version     1.1.0
23  * @history
24  *   2012.02.28 : Create
25  */
26
27 #ifndef __SRP_API_H__
28 #define __SRP_API_H__
29
30 #include "srp_ioctl.h"
31 #include "srp_error.h"
32
33 #ifndef TIZEN_FEATURE_E3250
34 #define SRP_DEV_NAME                    "dev/srp"
35 #else
36 #define SRP_DEV_NAME                    "/dev/srp"
37 #endif
38
39 #define SRP_INIT_BLOCK_MODE             0
40 #define SRP_INIT_NONBLOCK_MODE          1
41
42 #define SRP_PENDING_STATE_RUNNING       0
43 #define SRP_PENDING_STATE_PENDING       1
44
45 struct srp_buf_info {
46     void *mmapped_addr;
47     void *addr;
48     unsigned int mmapped_size;
49     unsigned int size;
50     int num;
51 };
52
53 struct srp_dec_info {
54     unsigned int sample_rate;
55     unsigned int channels;
56 };
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 int SRP_Create(int block_mode);
63 int SRP_Init();
64 int SRP_Decode(void *buff, int size_byte);
65 int SRP_Send_EOS(void);
66 int SRP_SetParams(int id, unsigned long val);
67 int SRP_GetParams(int id, unsigned long *pval);
68 int SRP_Deinit(void);
69 int SRP_Terminate(void);
70 int SRP_IsOpen(void);
71
72 int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num);
73 int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num);
74 int SRP_Get_Dec_Info(struct srp_dec_info *dec_info);
75 int SRP_Get_PCM(void **addr, unsigned int *size);
76 int SRP_Flush(void);
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif /*__SRP_API_H__ */