17 #ifndef HAAS_AUDIO_DEMO
18 #include <sys/ioctl.h>
20 #include "audio_drv.h"
35 #define AOS_PCM_BLOCK 0x00000000
36 #define AOS_PCM_NONBLOCK 0x00000001
37 #define AOS_PCM_ASYNC 0x00000002
38 #define AOS_PCM_ABORT 0x00008000
39 #define AOS_PCM_NO_AUTO_RESAMPLE 0x00010000
40 #define AOS_PCM_NO_AUTO_CHANNELS 0x00020000
41 #define AOS_PCM_NO_AUTO_FORMAT 0x00040000
42 #define AOS_PCM_NO_SOFTVOL 0x00080000
43 #define AOS_PCM_EVT_WRITE (1 << 0)
44 #define AOS_PCM_EVT_READ (1 << 1)
45 #define AOS_PCM_EVT_XRUN (1 << 2)
118 unsigned char reserved[56];
302 unsigned int rate,
int soft_resample,
unsigned int latency);
aos_pcm_sframes_t aos_pcm_readi(aos_pcm_t *pcm, void *buffer, aos_pcm_uframes_t size)
int aos_pcm_set_params(aos_pcm_t *pcm, aos_pcm_format_t format, aos_pcm_access_t access, unsigned int channels, unsigned int rate, int soft_resample, unsigned int latency)
aos_pcm_sframes_t aos_pcm_writei(aos_pcm_t *pcm, const void *buffer, aos_pcm_uframes_t size)
int aos_pcm_prepare(aos_pcm_t *pcm)
int aos_device_name_hint(int card, void *hints)
int aos_pcm_recover(aos_pcm_t *pcm)
int aos_pcm_hw_params_alloca(aos_pcm_hw_params_t **p)
int aos_pcm_suspend(aos_pcm_t *pcm)
int aos_pcm_sw_params_alloca(aos_pcm_sw_params_t **p)
int aos_pcm_sw_params_any(aos_pcm_sw_params_t *params)
signed long aos_pcm_sframes_t
int aos_pcm_close(aos_pcm_t *pcm)
int aos_pcm_stop(aos_pcm_t *pcm)
unsigned long aos_pcm_uframes_t
int aos_pcm_hw_params(aos_pcm_t *pcm, aos_pcm_hw_params_t *p)
aos_pcm_sframes_t aos_pcm_writen(aos_pcm_t *pcm, void **bufs, aos_pcm_uframes_t size)
int aos_pcm_resume(aos_pcm_t *pcm)
int aos_pcm_sw_params(aos_pcm_t *pcm, aos_pcm_sw_params_t *params)
int aos_pcm_pause(aos_pcm_t *pcm, int enable)
aos_pcm_sframes_t aos_pcm_readn(aos_pcm_t *pcm, void **bufs, aos_pcm_uframes_t size)
aos_pcm_sframes_t aos_pcm_bytes_to_frames(aos_pcm_t *pcm, int bytes)
int aos_pcm_hw_params_any(aos_pcm_hw_params_t *params)
int aos_pcm_frames_to_bytes(aos_pcm_t *pcm, aos_pcm_sframes_t frames)
int aos_pcm_open(aos_pcm_t **pcm, const char *name, aos_pcm_stream_t stream, int mode)
int aos_pcm_wait(aos_pcm_t *pcm, int timeout)
int aos_pcm_drain(aos_pcm_t *pcm)
int aos_pcm_start(aos_pcm_t *pcm)
@ AOS_PCM_STREAM_PLAYBACK
@ AOSRV_PCM_FORMAT_S32_LE
@ AOSRV_PCM_FORMAT_S24_LE
@ AOSRV_PCM_FORMAT_S16_LE
@ AOS_PCM_ACCESS_RW_NONINTERLEAVED
@ AOS_PCM_ACCESS_MMAP_NONINTERLEAVED
@ AOS_PCM_ACCESS_RW_INTERLEAVED
@ AOS_PCM_ACCESS_MMAP_INTERLEAVED
@ AOS_PCM_STATE_DISCONNECTED
@ AOS_PCM_STATE_SUSPENDED
unsigned int buffer_bytes
unsigned int period_bytes
aos_pcm_uframes_t boundary
aos_pcm_uframes_t avail_min
aos_pcm_uframes_t stop_threshold
aos_pcm_uframes_t silence_size
aos_pcm_uframes_t start_threshold
aos_pcm_uframes_t silence_threshold
aos_pcm_uframes_t xfer_align
aos_pcm_sw_params_t * sw_params
aos_pcm_hw_params_t * hw_params
unsigned int own_state_check
unsigned short poll_events