Add mm_sound_client_request_unset_focus_watch_callback() to set a flag for skipping...
[platform/core/multimedia/libmm-sound.git] / include / mm_sound_pa_client.h
1 /*
2  * libmm-sound
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Seungbae Shin <seungbae.shin@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  #ifndef __MM_SOUND_PA_CLIENT__
22  #define __MM_SOUND_PA_CLIENT__
23
24 #include <pulse/simple.h>
25 #include <pulse/error.h>
26 #include <pulse/proplist.h>
27 #include <pulse/channelmap.h>
28 #include <pulse/pulseaudio.h>
29 #include "include/mm_sound.h"
30
31 typedef enum {
32         HANDLE_MODE_OUTPUT,                             /**< Output mode of handle */
33         HANDLE_MODE_OUTPUT_CLOCK,                       /**< Output mode of gst audio only mode */
34         HANDLE_MODE_OUTPUT_VIDEO,                       /**< Output mode of gst video mode */
35         HANDLE_MODE_OUTPUT_LOW_LATENCY, /**< Output mode for low latency play mode. typically for game */
36         HANDLE_MODE_INPUT,                                      /**< Input mode of handle */
37         HANDLE_MODE_INPUT_HIGH_LATENCY, /**< Input mode for high latency capture mode. */
38         HANDLE_MODE_INPUT_LOW_LATENCY,          /**< Input mode for low latency capture mode. typically for VoIP */
39         HANDLE_MODE_CALL_OUT,                           /**< for voice call establish */
40         HANDLE_MODE_CALL_IN,                            /**< for voice call establish */
41         HANDLE_MODE_OUTPUT_AP_CALL,             /**< for VT call on thin modem */
42         HANDLE_MODE_INPUT_AP_CALL,                      /**< for VT call on thin modem */
43         HANDLE_MODE_NUM,                                        /**< Number of mode */
44 }MMSoundHandleMode;
45
46 int mm_sound_pa_open(MMSoundHandleMode mode, int volume_config, pa_sample_spec* ss, pa_channel_map* channel_map, int* size, char *stream_type, int stream_index);
47 int mm_sound_pa_read(const int handle, void* buf, const int size);
48 int mm_sound_pa_write(const int handle, void* buf, const int size);
49 int mm_sound_pa_close(const int handle);
50 int mm_sound_pa_drain(const int handle);
51 int mm_sound_pa_flush(const int handle);
52
53 #endif