summaryrefslogtreecommitdiffstats
path: root/exynos/multimedia/codecs/audio/exynos5/srp/alp/include/srp_api.h
blob: ad65b90a25b0a5754e5c7a79c75ed95725275635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef __SRP_API_H__
#define __SRP_API_H__

#include "srp_ioctl.h"
#include "srp_error.h"

#define SRP_DEV_NAME                    "dev/srp"

#define SRP_INIT_BLOCK_MODE             0
#define SRP_INIT_NONBLOCK_MODE          1

#define SRP_PENDING_STATE_RUNNING       0
#define SRP_PENDING_STATE_PENDING       1

struct srp_buf_info {
    void *mmapped_addr;
    void *addr;
    unsigned int mmapped_size;
    unsigned int size;
    int num;
};

struct srp_dec_info {
    unsigned int sample_rate;
    unsigned int channels;
};

#ifdef __cplusplus
extern "C" {
#endif

int SRP_Create(int block_mode);
int SRP_Init();
int SRP_Decode(void *buff, int size_byte);
int SRP_Send_EOS(void);
int SRP_SetParams(int id, unsigned long val);
int SRP_GetParams(int id, unsigned long *pval);
int SRP_Deinit(void);
int SRP_Terminate(void);
int SRP_IsOpen(void);

int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num);
int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num);
int SRP_Get_Dec_Info(struct srp_dec_info *dec_info);
int SRP_Get_PCM(void **addr, unsigned int *size);
int SRP_Flush(void);

#ifdef __cplusplus
}
#endif

#endif /*__SRP_API_H__ */