godot/thirdparty/linuxbsd_headers/alsa/hwdep.h

/**
 * \file include/hwdep.h
 * \brief Application interface library for the ALSA driver
 * \author Jaroslav Kysela <[email protected]>
 * \author Abramo Bagnara <[email protected]>
 * \author Takashi Iwai <[email protected]>
 * \date 1998-2001
 *
 * Application interface library for the ALSA driver
 */
/*
 *   This library is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as
 *   published by the Free Software Foundation; either version 2.1 of
 *   the License, or (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 *
 */

#ifndef __ALSA_HWDEP_H
#define __ALSA_HWDEP_H

#ifdef __cplusplus
extern "C" {
#endif

/**
 *  \defgroup HwDep Hardware Dependant Interface
 *  The Hardware Dependant Interface.
 *  \{
 */

/** dlsym version for interface entry callback */
#define SND_HWDEP_DLSYM_VERSION

/** HwDep information container */
snd_hwdep_info_t;

/** HwDep DSP status container */
snd_hwdep_dsp_status_t;

/** HwDep DSP image container */
snd_hwdep_dsp_image_t;

/** HwDep interface */
snd_hwdep_iface_t;

/** open for reading */
#define SND_HWDEP_OPEN_READ
/** open for writing */
#define SND_HWDEP_OPEN_WRITE
/** open for reading and writing */
#define SND_HWDEP_OPEN_DUPLEX
/** open mode flag: open in nonblock mode */
#define SND_HWDEP_OPEN_NONBLOCK

/** HwDep handle type */
snd_hwdep_type_t;

/** HwDep handle */
snd_hwdep_t;

int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode);
int snd_hwdep_close(snd_hwdep_t *hwdep);
int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep);
int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock);
int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info);
int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status);
int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block);
int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg);
ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size);
ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size);

size_t snd_hwdep_info_sizeof(void);
/** allocate #snd_hwdep_info_t container on stack */
#define snd_hwdep_info_alloca(ptr)
int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr);
void snd_hwdep_info_free(snd_hwdep_info_t *obj);
void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src);

unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj);
int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj);
const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj);
const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj);
snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj);
void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val);

size_t snd_hwdep_dsp_status_sizeof(void);
/** allocate #snd_hwdep_dsp_status_t container on stack */
#define snd_hwdep_dsp_status_alloca(ptr)
int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr);
void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t *obj);
void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src);

unsigned int snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t *obj);
const char *snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t *obj);
unsigned int snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t *obj);
unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t *obj);
unsigned int snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t *obj);

size_t snd_hwdep_dsp_image_sizeof(void);
/** allocate #snd_hwdep_dsp_image_t container on stack */
#define snd_hwdep_dsp_image_alloca(ptr)
int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr);
void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj);
void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src);

unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj);
const char *snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t *obj);
const void *snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t *obj);
size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t *obj);

void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int _index);
void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name);
void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t *obj, void *buffer);
void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length);

/** \} */

#ifdef __cplusplus
}
#endif

#endif /* __ALSA_HWDEP_H */