summaryrefslogtreecommitdiff
path: root/amadec/adec-message.h (plain)
blob: 575ba507c5c362229f6ff8a7cf99610812050a48
1/**
2 * \file adec-message.h
3 * \brief Definitiond Of Audio Dec Types And Structures
4 * \version 1.0.0
5 * \date 2011-03-08
6 */
7/* Copyright (C) 2007-2011, Amlogic Inc.
8 * All right reserved
9 *
10 */
11#ifndef ADEC_MESSAGE_H
12#define ADEC_MESSAGE_H
13
14#include <pthread.h>
15
16ADEC_BEGIN_DECLS
17
18#define MESSAGE_NUM_MAX 12
19
20typedef enum {
21 CMD_START = 1 << 0,
22 CMD_PAUSE = 1 << 1,
23 CMD_RESUME = 1 << 2,
24 CMD_STOP = 1 << 3,
25 CMD_MUTE = 1 << 4,
26 CMD_SET_VOL = 1 << 5,
27 CMD_GET_VOL = 1 << 6,
28 CMD_CHANL_SWAP = 1 << 7,
29 CMD_LEFT_MONO = 1 << 8,
30 CMD_RIGHT_MONO = 1 << 9,
31 CMD_STEREO = 1 << 10,
32 CMD_SET_LRVOL = 1 << 20,
33 CMD_RELEASE = 1 << 31,
34} ctrl_cmd_t;
35
36
37typedef struct {
38 int type; /* 1 = reply; 0 = no reply */
39 int has_arg; /* 1 = value is valid; 0 = value is unvalid */
40 ctrl_cmd_t ctrl_cmd;
41 union {
42 int en;
43 float volume;
44 } value;
45 union {
46 int en;
47 float volume;
48 } value_ext;
49} adec_cmd_t;
50
51typedef struct {
52 adec_cmd_t * message_lise[MESSAGE_NUM_MAX + 1];
53 int message_in_index;
54 int message_out_index;
55 int message_num;
56 pthread_mutex_t msg_mutex;
57} message_pool_t;
58
59ADEC_END_DECLS
60
61#endif
62