linux/include/uapi/sound/sb16_csp.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 *  Copyright (c) 1999 by Uros Bizjak <[email protected]>
 *                        Takashi Iwai <[email protected]>
 *
 *  SB16ASP/AWE32 CSP control
 */
#ifndef _UAPI__SOUND_SB16_CSP_H
#define _UAPI__SOUND_SB16_CSP_H


/* CSP modes */
#define SNDRV_SB_CSP_MODE_NONE
#define SNDRV_SB_CSP_MODE_DSP_READ
#define SNDRV_SB_CSP_MODE_DSP_WRITE
#define SNDRV_SB_CSP_MODE_QSOUND

/* CSP load flags */
#define SNDRV_SB_CSP_LOAD_FROMUSER
#define SNDRV_SB_CSP_LOAD_INITBLOCK

/* CSP sample width */
#define SNDRV_SB_CSP_SAMPLE_8BIT
#define SNDRV_SB_CSP_SAMPLE_16BIT

/* CSP channels */
#define SNDRV_SB_CSP_MONO
#define SNDRV_SB_CSP_STEREO

/* CSP rates */
#define SNDRV_SB_CSP_RATE_8000
#define SNDRV_SB_CSP_RATE_11025
#define SNDRV_SB_CSP_RATE_22050
#define SNDRV_SB_CSP_RATE_44100
#define SNDRV_SB_CSP_RATE_ALL

/* CSP running state */
#define SNDRV_SB_CSP_ST_IDLE
#define SNDRV_SB_CSP_ST_LOADED
#define SNDRV_SB_CSP_ST_RUNNING
#define SNDRV_SB_CSP_ST_PAUSED
#define SNDRV_SB_CSP_ST_AUTO
#define SNDRV_SB_CSP_ST_QSOUND

/* maximum QSound value (180 degrees right) */
#define SNDRV_SB_CSP_QSOUND_MAX_RIGHT

/* maximum microcode RIFF file size */
#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE

/* microcode header */
struct snd_sb_csp_mc_header {};

/* microcode to be loaded */
struct snd_sb_csp_microcode {};

/* start CSP with sample_width in mono/stereo */
struct snd_sb_csp_start {};

/* CSP information */
struct snd_sb_csp_info {};

/* HWDEP controls */
/* get CSP information */
#define SNDRV_SB_CSP_IOCTL_INFO
/* load microcode to CSP */
/* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits)
 * defined for some architectures like MIPS, and it leads to build errors.
 * (x86 and co have 14-bit size, thus it's valid, though.)
 * As a workaround for skipping the size-limit check, here we don't use the
 * normal _IOW() macro but _IOC() with the manual argument.
 */
#define SNDRV_SB_CSP_IOCTL_LOAD_CODE
/* unload microcode from CSP */
#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE
/* start CSP */
#define SNDRV_SB_CSP_IOCTL_START
/* stop CSP */
#define SNDRV_SB_CSP_IOCTL_STOP
/* pause CSP and DMA transfer */
#define SNDRV_SB_CSP_IOCTL_PAUSE
/* restart CSP and DMA transfer */
#define SNDRV_SB_CSP_IOCTL_RESTART


#endif /* _UAPI__SOUND_SB16_CSP_H */