tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / devs / AHI / Drivers / Alsa / alsa-bridge / alsa_hostlib.h
blob91fc84ad8312977353d4c601669f1bc79ed45875
1 /*
2 Copyright © 2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <alsa/asoundlib.h>
7 #include <exec/types.h>
9 struct alsa_func
11 int (*snd_pcm_open)(snd_pcm_t **pcmp, const char *name, snd_pcm_stream_t stream, int mode);
12 int (*snd_pcm_close)(snd_pcm_t *pcm);
13 int (*snd_pcm_hw_params_malloc)(snd_pcm_hw_params_t **ptr);
14 void (*snd_pcm_hw_params_free)(snd_pcm_hw_params_t *obj);
15 int (*snd_pcm_hw_params_any)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
16 int (*snd_pcm_hw_params_set_access)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access);
17 int (*snd_pcm_hw_params_set_format)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
18 int (*snd_pcm_hw_params_set_rate_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
19 int (*snd_pcm_hw_params_set_channels)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
20 int (*snd_pcm_hw_params)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
21 int (*snd_pcm_prepare)(snd_pcm_t *pcm);
22 snd_pcm_sframes_t(*snd_pcm_writei)(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
23 snd_pcm_sframes_t(*snd_pcm_avail_update)(snd_pcm_t *pcm);
24 int (*snd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
25 int (*snd_pcm_hw_params_set_buffer_size)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val);
26 int (*snd_pcm_drop)(snd_pcm_t *pcm);
28 int (*snd_mixer_open)(snd_mixer_t **mixer, int mode);
29 int (*snd_mixer_close)(snd_mixer_t *mixer);
30 int (*snd_mixer_load)(snd_mixer_t *mixer);
31 int (*snd_mixer_attach)(snd_mixer_t *mixer, const char *name);
32 snd_mixer_elem_t *(*snd_mixer_find_selem)(snd_mixer_t *mixer, const snd_mixer_selem_id_t *id);
33 int (*snd_mixer_selem_register)(snd_mixer_t *mixer, struct snd_mixer_selem_regopt *options, snd_mixer_class_t **classp);
34 int (*snd_mixer_selem_id_malloc)(snd_mixer_selem_id_t **ptr);
35 void (*snd_mixer_selem_id_free)(snd_mixer_selem_id_t *obj);
36 void (*snd_mixer_selem_id_set_index)(snd_mixer_selem_id_t *obj, unsigned int val);
37 void (*snd_mixer_selem_id_set_name)(snd_mixer_selem_id_t *obj, const char *val);
38 int (*snd_mixer_selem_get_playback_volume_range)(snd_mixer_elem_t *elem, long *min, long *max);
39 int (*snd_mixer_selem_get_playback_volume)(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long *value);
40 int (*snd_mixer_selem_set_playback_volume_all)(snd_mixer_elem_t *elem, long value);
43 extern struct alsa_func alsa_func;
45 #define ALSACALL(func,...) (alsa_func.func(__VA_ARGS__))
47 BOOL ALSA_HostLib_Init();
48 VOID ALSA_HostLib_Cleanup();