Fix for new automake and 64 bit compatibility.
[platform/core/multimedia/avsystem.git] / include / avsys-audio-pactrl.h
1 /*
2  * avsystem
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jonghyuk Choi <jhchoi.choi@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __AVSYS_AUDIO_PACTRL_H__
23 #define __AVSYS_AUDIO_PACTRL_H__
24
25 #ifdef __cplusplus
26         extern "C" {
27 #endif
28 #include <avsys-audio-handle.h>
29 #include <pulse/pulseaudio.h>
30 #include <pulse/thread-mainloop.h>
31 #include <pulse/error.h>
32 #include <pulse/gccmacro.h>
33 #include <pulse/proplist.h>
34
35 /*
36  * Enums
37  */
38 enum {
39         AVSYS_AUDIO_PA_CTL_SINK_UNKNOWN = 0x0000,
40         AVSYS_AUDIO_PA_CTL_SINK_ALSA    = 0x0001,
41         AVSYS_AUDIO_PA_CTL_SINK_BLUEZ   = 0x0002,
42 };
43 /*
44  * Defines
45  */
46 #define ALSA_SINK                       0
47 #define BLUEZ_SINK                      16
48
49 #define _EXIST                          1
50 #define _DEACTIVE                       2
51 #define _ACTIVE                         3
52
53 #define ALSA_SINK_EXIST         ((1 << (_EXIST + ALSA_SINK)))
54 #define ALSA_SINK_DEACTIVE      ((1 << (_DEACTIVE + ALSA_SINK)))
55 #define ALSA_SINK_ACTIVE        ((1 << (_ACTIVE + ALSA_SINK)))
56
57 #define BULEZ_SINK_EXIST        ((1 << (_EXIST + BLUEZ_SINK)))
58 #define BULEZ_SINK_DEACTIVE     ((1 << (_DEACTIVE + BLUEZ_SINK)))
59 #define BULEZ_SINK_ACTIVE       ((1 << (_ACTIVE + BLUEZ_SINK)))
60
61 /*
62  * Function Prorotypes
63  */
64 int avsys_audio_pa_ctrl_volume_by_index(unsigned int idx, int volume, int ch);
65 int avsys_audio_pa_ctrl_mute_by_index(unsigned int idx, int mute);
66 int avsys_audio_pa_ctrl_get_default_sink(int *sink);
67
68 #ifdef __cplusplus
69         }
70 #endif
71
72 #endif /* __AVSYS_AUDIO_PACTRL_H__ */