4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jonghyuk Choi <jhchoi.choi@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef __AVSYS_AUDIO_PASIMPLE_H__
23 #define __AVSYS_AUDIO_PASIMPLE_H__
28 #include <avsys-audio-handle.h>
29 #include <pulse/simple.h>
30 #include <pulse/error.h>
31 #include <pulse/gccmacro.h>
32 #include <pulse/proplist.h>
33 #include <pulse/channelmap.h>
36 void *pasimple_handle;
37 unsigned int samplesize;
38 unsigned int period_frames;
39 unsigned int buffer_frames;
41 unsigned int periods_per_buffer;
42 } avsys_audio_pasimple_handle_t;
44 int avsys_audio_pasimple_open_device(const int mode, const unsigned int format, const unsigned int channel, const unsigned int samplerate, avsys_audio_handle_t *handle,int policy);
45 int avsys_audio_pasimple_close_device(avsys_audio_handle_t *handle);
46 int avsys_audio_pasimple_write(avsys_audio_handle_t *handle, const void *buf, int size);
47 int avsys_audio_pasimple_read(avsys_audio_handle_t *handle, void *buf, int size);
48 int avsys_audio_pasimple_reset(avsys_audio_handle_t *handle);
49 int avsys_audio_pasimple_drain(avsys_audio_handle_t *handle);
50 int avsys_audio_pasimple_delay(avsys_audio_handle_t *handle, int *delay_frames);
51 int avsys_audio_pasimple_set_volume(avsys_audio_handle_t *handle, int volume);
52 int avsys_audio_pasimple_get_period_buffer_time(avsys_audio_handle_t *handle, unsigned int *period_time, unsigned int *buffer_time);
53 int avsys_audio_pasimple_cork(avsys_audio_handle_t *handle, int cork);
54 int avsys_audio_pasimple_is_corked(avsys_audio_handle_t *handle, int *is_corked);
60 #endif /* __AVSYS_AUDIO_PASIMPLE_H__ */