Blame include/hwdep.h

Packit 4a16fb
/**
Packit 4a16fb
 * \file include/hwdep.h
Packit 4a16fb
 * \brief Application interface library for the ALSA driver
Packit 4a16fb
 * \author Jaroslav Kysela <perex@perex.cz>
Packit 4a16fb
 * \author Abramo Bagnara <abramo@alsa-project.org>
Packit 4a16fb
 * \author Takashi Iwai <tiwai@suse.de>
Packit 4a16fb
 * \date 1998-2001
Packit 4a16fb
 *
Packit 4a16fb
 * Application interface library for the ALSA driver
Packit 4a16fb
 */
Packit 4a16fb
/*
Packit 4a16fb
 *   This library is free software; you can redistribute it and/or modify
Packit 4a16fb
 *   it under the terms of the GNU Lesser General Public License as
Packit 4a16fb
 *   published by the Free Software Foundation; either version 2.1 of
Packit 4a16fb
 *   the License, or (at your option) any later version.
Packit 4a16fb
 *
Packit 4a16fb
 *   This program is distributed in the hope that it will be useful,
Packit 4a16fb
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 4a16fb
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 4a16fb
 *   GNU Lesser General Public License for more details.
Packit 4a16fb
 *
Packit 4a16fb
 *   You should have received a copy of the GNU Lesser General Public
Packit 4a16fb
 *   License along with this library; if not, write to the Free Software
Packit 4a16fb
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 4a16fb
 *
Packit 4a16fb
 */
Packit 4a16fb
Packit 4a16fb
#ifndef __ALSA_HWDEP_H
Packit 4a16fb
#define __ALSA_HWDEP_H
Packit 4a16fb
Packit 4a16fb
#ifdef __cplusplus
Packit 4a16fb
extern "C" {
Packit 4a16fb
#endif
Packit 4a16fb
Packit 4a16fb
/**
Packit 4a16fb
 *  \defgroup HwDep Hardware Dependant Interface
Packit 4a16fb
 *  The Hardware Dependant Interface.
Packit 4a16fb
 *  \{
Packit 4a16fb
 */
Packit 4a16fb
Packit 4a16fb
/** dlsym version for interface entry callback */
Packit 4a16fb
#define SND_HWDEP_DLSYM_VERSION		_dlsym_hwdep_001
Packit 4a16fb
Packit 4a16fb
/** HwDep information container */
Packit 4a16fb
typedef struct _snd_hwdep_info snd_hwdep_info_t;
Packit 4a16fb
Packit 4a16fb
/** HwDep DSP status container */
Packit 4a16fb
typedef struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t;
Packit 4a16fb
Packit 4a16fb
/** HwDep DSP image container */
Packit 4a16fb
typedef struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t;
Packit 4a16fb
Packit 4a16fb
/** HwDep interface */
Packit 4a16fb
typedef enum _snd_hwdep_iface {
Packit 4a16fb
	SND_HWDEP_IFACE_OPL2 = 0,	/**< OPL2 raw driver */
Packit 4a16fb
	SND_HWDEP_IFACE_OPL3,		/**< OPL3 raw driver */
Packit 4a16fb
	SND_HWDEP_IFACE_OPL4,		/**< OPL4 raw driver */
Packit 4a16fb
	SND_HWDEP_IFACE_SB16CSP,	/**< SB16CSP driver */
Packit 4a16fb
	SND_HWDEP_IFACE_EMU10K1,	/**< EMU10K1 driver */
Packit 4a16fb
	SND_HWDEP_IFACE_YSS225,		/**< YSS225 driver */
Packit 4a16fb
	SND_HWDEP_IFACE_ICS2115,	/**< ICS2115 driver */
Packit 4a16fb
	SND_HWDEP_IFACE_SSCAPE,		/**< Ensoniq SoundScape ISA card (MC68EC000) */
Packit 4a16fb
	SND_HWDEP_IFACE_VX,		/**< Digigram VX cards */
Packit 4a16fb
	SND_HWDEP_IFACE_MIXART,		/**< Digigram miXart cards */
Packit 4a16fb
	SND_HWDEP_IFACE_USX2Y,		/**< Tascam US122, US224 & US428 usb */
Packit 4a16fb
	SND_HWDEP_IFACE_EMUX_WAVETABLE,	/**< EmuX wavetable */
Packit 4a16fb
	SND_HWDEP_IFACE_BLUETOOTH,	/**< Bluetooth audio */
Packit 4a16fb
	SND_HWDEP_IFACE_USX2Y_PCM,	/**< Tascam US122, US224 & US428 raw USB PCM */
Packit 4a16fb
	SND_HWDEP_IFACE_PCXHR,		/**< Digigram PCXHR */
Packit 4a16fb
	SND_HWDEP_IFACE_SB_RC,		/**< SB Extigy/Audigy2NX remote control */
Packit 4a16fb
	SND_HWDEP_IFACE_HDA,		/**< HD-audio */
Packit 4a16fb
	SND_HWDEP_IFACE_USB_STREAM,	/**< direct access to usb stream */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_DICE,	/**< TC DICE FireWire device */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_FIREWORKS,	/**< Echo Audio Fireworks based device */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_BEBOB,	/**< BridgeCo BeBoB based device */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_OXFW,	/**< Oxford OXFW970/971 based device */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_DIGI00X,	/* Digidesign Digi 002/003 family */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_TASCAM,	/* TASCAM FireWire series */
Packit 4a16fb
	SND_HWDEP_IFACE_LINE6,		/* Line6 USB processors */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_MOTU,	/* MOTU FireWire series */
Packit 4a16fb
	SND_HWDEP_IFACE_FW_FIREFACE,	/* RME Fireface series */
Packit 4a16fb
Packit 4a16fb
	SND_HWDEP_IFACE_LAST = SND_HWDEP_IFACE_FW_FIREFACE,	/**< last known hwdep interface */
Packit 4a16fb
} snd_hwdep_iface_t;
Packit 4a16fb
Packit 4a16fb
/** open for reading */
Packit 4a16fb
#define SND_HWDEP_OPEN_READ		(O_RDONLY)
Packit 4a16fb
/** open for writing */
Packit 4a16fb
#define SND_HWDEP_OPEN_WRITE		(O_WRONLY)
Packit 4a16fb
/** open for reading and writing */
Packit 4a16fb
#define SND_HWDEP_OPEN_DUPLEX		(O_RDWR)
Packit 4a16fb
/** open mode flag: open in nonblock mode */
Packit 4a16fb
#define SND_HWDEP_OPEN_NONBLOCK		(O_NONBLOCK)
Packit 4a16fb
Packit 4a16fb
/** HwDep handle type */
Packit 4a16fb
typedef enum _snd_hwdep_type {
Packit 4a16fb
	/** Kernel level HwDep */
Packit 4a16fb
	SND_HWDEP_TYPE_HW,
Packit 4a16fb
	/** Shared memory client HwDep (not yet implemented) */
Packit 4a16fb
	SND_HWDEP_TYPE_SHM,
Packit 4a16fb
	/** INET client HwDep (not yet implemented) */
Packit 4a16fb
	SND_HWDEP_TYPE_INET
Packit 4a16fb
} snd_hwdep_type_t;
Packit 4a16fb
Packit 4a16fb
/** HwDep handle */
Packit 4a16fb
typedef struct _snd_hwdep snd_hwdep_t;
Packit 4a16fb
Packit 4a16fb
int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode);
Packit 4a16fb
int snd_hwdep_close(snd_hwdep_t *hwdep);
Packit 4a16fb
int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
Packit 4a16fb
int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep);
Packit 4a16fb
int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
Packit 4a16fb
int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock);
Packit 4a16fb
int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info);
Packit 4a16fb
int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status);
Packit 4a16fb
int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block);
Packit 4a16fb
int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg);
Packit 4a16fb
ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size);
Packit 4a16fb
ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size);
Packit 4a16fb
Packit 4a16fb
size_t snd_hwdep_info_sizeof(void);
Packit 4a16fb
/** allocate #snd_hwdep_info_t container on stack */
Packit 4a16fb
#define snd_hwdep_info_alloca(ptr) __snd_alloca(ptr, snd_hwdep_info)
Packit 4a16fb
int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr);
Packit 4a16fb
void snd_hwdep_info_free(snd_hwdep_info_t *obj);
Packit 4a16fb
void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src);
Packit 4a16fb
Packit 4a16fb
unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj);
Packit 4a16fb
int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj);
Packit 4a16fb
const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj);
Packit 4a16fb
const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj);
Packit 4a16fb
snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj);
Packit 4a16fb
void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val);
Packit 4a16fb
Packit 4a16fb
size_t snd_hwdep_dsp_status_sizeof(void);
Packit 4a16fb
/** allocate #snd_hwdep_dsp_status_t container on stack */
Packit 4a16fb
#define snd_hwdep_dsp_status_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_status)
Packit 4a16fb
int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr);
Packit 4a16fb
void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t *obj);
Packit 4a16fb
void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src);
Packit 4a16fb
Packit 4a16fb
unsigned int snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t *obj);
Packit 4a16fb
const char *snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t *obj);
Packit 4a16fb
unsigned int snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t *obj);
Packit 4a16fb
unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t *obj);
Packit 4a16fb
unsigned int snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t *obj);
Packit 4a16fb
Packit 4a16fb
size_t snd_hwdep_dsp_image_sizeof(void);
Packit 4a16fb
/** allocate #snd_hwdep_dsp_image_t container on stack */
Packit 4a16fb
#define snd_hwdep_dsp_image_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_image)
Packit 4a16fb
int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr);
Packit 4a16fb
void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj);
Packit 4a16fb
void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src);
Packit 4a16fb
Packit 4a16fb
unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj);
Packit 4a16fb
const char *snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t *obj);
Packit 4a16fb
const void *snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t *obj);
Packit 4a16fb
size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t *obj);
Packit 4a16fb
Packit 4a16fb
void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int _index);
Packit 4a16fb
void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name);
Packit 4a16fb
void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t *obj, void *buffer);
Packit 4a16fb
void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length);
Packit 4a16fb
Packit 4a16fb
/** \} */
Packit 4a16fb
Packit 4a16fb
#ifdef __cplusplus
Packit 4a16fb
}
Packit 4a16fb
#endif
Packit 4a16fb
Packit 4a16fb
#endif /* __ALSA_HWDEP_H */
Packit 4a16fb