You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
UAPI: (Scripted) Disintegrate include/sound
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
This commit is contained in:
@@ -1 +1,11 @@
|
||||
# UAPI Header export list
|
||||
header-y += asequencer.h
|
||||
header-y += asound.h
|
||||
header-y += asound_fm.h
|
||||
header-y += compress_offload.h
|
||||
header-y += compress_params.h
|
||||
header-y += emu10k1.h
|
||||
header-y += hdsp.h
|
||||
header-y += hdspm.h
|
||||
header-y += sb16_csp.h
|
||||
header-y += sfnt_info.h
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,134 @@
|
||||
#ifndef __SOUND_ASOUND_FM_H
|
||||
#define __SOUND_ASOUND_FM_H
|
||||
|
||||
/*
|
||||
* Advanced Linux Sound Architecture - ALSA
|
||||
*
|
||||
* Interface file between ALSA driver & user space
|
||||
* Copyright (c) 1994-98 by Jaroslav Kysela <perex@perex.cz>,
|
||||
* 4Front Technologies
|
||||
*
|
||||
* Direct FM control
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#define SNDRV_DM_FM_MODE_OPL2 0x00
|
||||
#define SNDRV_DM_FM_MODE_OPL3 0x01
|
||||
|
||||
struct snd_dm_fm_info {
|
||||
unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */
|
||||
unsigned char rhythm; /* percussion mode flag */
|
||||
};
|
||||
|
||||
/*
|
||||
* Data structure composing an FM "note" or sound event.
|
||||
*/
|
||||
|
||||
struct snd_dm_fm_voice {
|
||||
unsigned char op; /* operator cell (0 or 1) */
|
||||
unsigned char voice; /* FM voice (0 to 17) */
|
||||
|
||||
unsigned char am; /* amplitude modulation */
|
||||
unsigned char vibrato; /* vibrato effect */
|
||||
unsigned char do_sustain; /* sustain phase */
|
||||
unsigned char kbd_scale; /* keyboard scaling */
|
||||
unsigned char harmonic; /* 4 bits: harmonic and multiplier */
|
||||
unsigned char scale_level; /* 2 bits: decrease output freq rises */
|
||||
unsigned char volume; /* 6 bits: volume */
|
||||
|
||||
unsigned char attack; /* 4 bits: attack rate */
|
||||
unsigned char decay; /* 4 bits: decay rate */
|
||||
unsigned char sustain; /* 4 bits: sustain level */
|
||||
unsigned char release; /* 4 bits: release rate */
|
||||
|
||||
unsigned char feedback; /* 3 bits: feedback for op0 */
|
||||
unsigned char connection; /* 0 for serial, 1 for parallel */
|
||||
unsigned char left; /* stereo left */
|
||||
unsigned char right; /* stereo right */
|
||||
unsigned char waveform; /* 3 bits: waveform shape */
|
||||
};
|
||||
|
||||
/*
|
||||
* This describes an FM note by its voice, octave, frequency number (10bit)
|
||||
* and key on/off.
|
||||
*/
|
||||
|
||||
struct snd_dm_fm_note {
|
||||
unsigned char voice; /* 0-17 voice channel */
|
||||
unsigned char octave; /* 3 bits: what octave to play */
|
||||
unsigned int fnum; /* 10 bits: frequency number */
|
||||
unsigned char key_on; /* set for active, clear for silent */
|
||||
};
|
||||
|
||||
/*
|
||||
* FM parameters that apply globally to all voices, and thus are not "notes"
|
||||
*/
|
||||
|
||||
struct snd_dm_fm_params {
|
||||
unsigned char am_depth; /* amplitude modulation depth (1=hi) */
|
||||
unsigned char vib_depth; /* vibrato depth (1=hi) */
|
||||
unsigned char kbd_split; /* keyboard split */
|
||||
unsigned char rhythm; /* percussion mode select */
|
||||
|
||||
/* This block is the percussion instrument data */
|
||||
unsigned char bass;
|
||||
unsigned char snare;
|
||||
unsigned char tomtom;
|
||||
unsigned char cymbal;
|
||||
unsigned char hihat;
|
||||
};
|
||||
|
||||
/*
|
||||
* FM mode ioctl settings
|
||||
*/
|
||||
|
||||
#define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info)
|
||||
#define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21)
|
||||
#define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note)
|
||||
#define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice)
|
||||
#define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params)
|
||||
#define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int)
|
||||
/* for OPL3 only */
|
||||
#define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int)
|
||||
/* SBI patch management */
|
||||
#define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40)
|
||||
|
||||
#define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20
|
||||
#define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21
|
||||
#define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22
|
||||
#define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23
|
||||
#define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24
|
||||
#define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25
|
||||
|
||||
/*
|
||||
* Patch Record - fixed size for write
|
||||
*/
|
||||
|
||||
#define FM_KEY_SBI "SBI\032"
|
||||
#define FM_KEY_2OP "2OP\032"
|
||||
#define FM_KEY_4OP "4OP\032"
|
||||
|
||||
struct sbi_patch {
|
||||
unsigned char prog;
|
||||
unsigned char bank;
|
||||
char key[4];
|
||||
char name[25];
|
||||
char extension[7];
|
||||
unsigned char data[32];
|
||||
};
|
||||
|
||||
#endif /* __SOUND_ASOUND_FM_H */
|
||||
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* compress_offload.h - compress offload header definations
|
||||
*
|
||||
* Copyright (C) 2011 Intel Corporation
|
||||
* Authors: Vinod Koul <vinod.koul@linux.intel.com>
|
||||
* Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
*/
|
||||
#ifndef __COMPRESS_OFFLOAD_H
|
||||
#define __COMPRESS_OFFLOAD_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <sound/asound.h>
|
||||
#include <sound/compress_params.h>
|
||||
|
||||
|
||||
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0)
|
||||
/**
|
||||
* struct snd_compressed_buffer: compressed buffer
|
||||
* @fragment_size: size of buffer fragment in bytes
|
||||
* @fragments: number of such fragments
|
||||
*/
|
||||
struct snd_compressed_buffer {
|
||||
__u32 fragment_size;
|
||||
__u32 fragments;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_compr_params: compressed stream params
|
||||
* @buffer: buffer description
|
||||
* @codec: codec parameters
|
||||
* @no_wake_mode: dont wake on fragment elapsed
|
||||
*/
|
||||
struct snd_compr_params {
|
||||
struct snd_compressed_buffer buffer;
|
||||
struct snd_codec codec;
|
||||
__u8 no_wake_mode;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_compr_tstamp: timestamp descriptor
|
||||
* @byte_offset: Byte offset in ring buffer to DSP
|
||||
* @copied_total: Total number of bytes copied from/to ring buffer to/by DSP
|
||||
* @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by
|
||||
* large steps and should only be used to monitor encoding/decoding
|
||||
* progress. It shall not be used for timing estimates.
|
||||
* @pcm_io_frames: Frames rendered or received by DSP into a mixer or an audio
|
||||
* output/input. This field should be used for A/V sync or time estimates.
|
||||
* @sampling_rate: sampling rate of audio
|
||||
*/
|
||||
struct snd_compr_tstamp {
|
||||
__u32 byte_offset;
|
||||
__u32 copied_total;
|
||||
snd_pcm_uframes_t pcm_frames;
|
||||
snd_pcm_uframes_t pcm_io_frames;
|
||||
__u32 sampling_rate;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_compr_avail: avail descriptor
|
||||
* @avail: Number of bytes available in ring buffer for writing/reading
|
||||
* @tstamp: timestamp infomation
|
||||
*/
|
||||
struct snd_compr_avail {
|
||||
__u64 avail;
|
||||
struct snd_compr_tstamp tstamp;
|
||||
};
|
||||
|
||||
enum snd_compr_direction {
|
||||
SND_COMPRESS_PLAYBACK = 0,
|
||||
SND_COMPRESS_CAPTURE
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_compr_caps: caps descriptor
|
||||
* @codecs: pointer to array of codecs
|
||||
* @direction: direction supported. Of type snd_compr_direction
|
||||
* @min_fragment_size: minimum fragment supported by DSP
|
||||
* @max_fragment_size: maximum fragment supported by DSP
|
||||
* @min_fragments: min fragments supported by DSP
|
||||
* @max_fragments: max fragments supported by DSP
|
||||
* @num_codecs: number of codecs supported
|
||||
* @reserved: reserved field
|
||||
*/
|
||||
struct snd_compr_caps {
|
||||
__u32 num_codecs;
|
||||
__u32 direction;
|
||||
__u32 min_fragment_size;
|
||||
__u32 max_fragment_size;
|
||||
__u32 min_fragments;
|
||||
__u32 max_fragments;
|
||||
__u32 codecs[MAX_NUM_CODECS];
|
||||
__u32 reserved[11];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_compr_codec_caps: query capability of codec
|
||||
* @codec: codec for which capability is queried
|
||||
* @num_descriptors: number of codec descriptors
|
||||
* @descriptor: array of codec capability descriptor
|
||||
*/
|
||||
struct snd_compr_codec_caps {
|
||||
__u32 codec;
|
||||
__u32 num_descriptors;
|
||||
struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS];
|
||||
};
|
||||
|
||||
/**
|
||||
* compress path ioctl definitions
|
||||
* SNDRV_COMPRESS_GET_CAPS: Query capability of DSP
|
||||
* SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec
|
||||
* SNDRV_COMPRESS_SET_PARAMS: Set codec and stream parameters
|
||||
* Note: only codec params can be changed runtime and stream params cant be
|
||||
* SNDRV_COMPRESS_GET_PARAMS: Query codec params
|
||||
* SNDRV_COMPRESS_TSTAMP: get the current timestamp value
|
||||
* SNDRV_COMPRESS_AVAIL: get the current buffer avail value.
|
||||
* This also queries the tstamp properties
|
||||
* SNDRV_COMPRESS_PAUSE: Pause the running stream
|
||||
* SNDRV_COMPRESS_RESUME: resume a paused stream
|
||||
* SNDRV_COMPRESS_START: Start a stream
|
||||
* SNDRV_COMPRESS_STOP: stop a running stream, discarding ring buffer content
|
||||
* and the buffers currently with DSP
|
||||
* SNDRV_COMPRESS_DRAIN: Play till end of buffers and stop after that
|
||||
* SNDRV_COMPRESS_IOCTL_VERSION: Query the API version
|
||||
*/
|
||||
#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
|
||||
#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
|
||||
#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11,\
|
||||
struct snd_compr_codec_caps)
|
||||
#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
|
||||
#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
|
||||
#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
|
||||
#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
|
||||
#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
|
||||
#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
|
||||
#define SNDRV_COMPRESS_START _IO('C', 0x32)
|
||||
#define SNDRV_COMPRESS_STOP _IO('C', 0x33)
|
||||
#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34)
|
||||
/*
|
||||
* TODO
|
||||
* 1. add mmap support
|
||||
*
|
||||
*/
|
||||
#define SND_COMPR_TRIGGER_DRAIN 7 /*FIXME move this to pcm.h */
|
||||
#endif
|
||||
@@ -0,0 +1,400 @@
|
||||
/*
|
||||
* compress_params.h - codec types and parameters for compressed data
|
||||
* streaming interface
|
||||
*
|
||||
* Copyright (C) 2011 Intel Corporation
|
||||
* Authors: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
||||
* Vinod Koul <vinod.koul@linux.intel.com>
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* The definitions in this file are derived from the OpenMAX AL version 1.1
|
||||
* and OpenMAX IL v 1.1.2 header files which contain the copyright notice below.
|
||||
*
|
||||
* Copyright (c) 2007-2010 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and/or associated documentation files (the
|
||||
* "Materials "), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*/
|
||||
#ifndef __SND_COMPRESS_PARAMS_H
|
||||
#define __SND_COMPRESS_PARAMS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* AUDIO CODECS SUPPORTED */
|
||||
#define MAX_NUM_CODECS 32
|
||||
#define MAX_NUM_CODEC_DESCRIPTORS 32
|
||||
#define MAX_NUM_BITRATES 32
|
||||
|
||||
/* Codecs are listed linearly to allow for extensibility */
|
||||
#define SND_AUDIOCODEC_PCM ((__u32) 0x00000001)
|
||||
#define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOCODEC_AMR ((__u32) 0x00000003)
|
||||
#define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004)
|
||||
#define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005)
|
||||
#define SND_AUDIOCODEC_AAC ((__u32) 0x00000006)
|
||||
#define SND_AUDIOCODEC_WMA ((__u32) 0x00000007)
|
||||
#define SND_AUDIOCODEC_REAL ((__u32) 0x00000008)
|
||||
#define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009)
|
||||
#define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A)
|
||||
#define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B)
|
||||
#define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
|
||||
#define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
|
||||
#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_G729
|
||||
|
||||
/*
|
||||
* Profile and modes are listed with bit masks. This allows for a
|
||||
* more compact representation of fields that will not evolve
|
||||
* (in contrast to the list of codecs)
|
||||
*/
|
||||
|
||||
#define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001)
|
||||
|
||||
/* MP3 modes are only useful for encoders */
|
||||
#define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001)
|
||||
#define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002)
|
||||
#define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004)
|
||||
#define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008)
|
||||
|
||||
#define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001)
|
||||
|
||||
/* AMR modes are only useful for encoders */
|
||||
#define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004)
|
||||
|
||||
#define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000)
|
||||
#define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001)
|
||||
#define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004)
|
||||
#define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008)
|
||||
#define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010)
|
||||
#define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020)
|
||||
|
||||
#define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001)
|
||||
|
||||
/* AMRWB modes are only useful for encoders */
|
||||
#define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004)
|
||||
|
||||
#define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001)
|
||||
|
||||
#define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001)
|
||||
|
||||
/* AAC modes are required for encoders and decoders */
|
||||
#define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004)
|
||||
#define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008)
|
||||
#define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010)
|
||||
#define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020)
|
||||
#define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040)
|
||||
#define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080)
|
||||
#define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100)
|
||||
#define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200)
|
||||
|
||||
/* AAC formats are required for encoders and decoders */
|
||||
#define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001)
|
||||
#define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002)
|
||||
#define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004)
|
||||
#define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008)
|
||||
#define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010)
|
||||
#define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020)
|
||||
#define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040)
|
||||
|
||||
#define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001)
|
||||
#define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004)
|
||||
#define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008)
|
||||
|
||||
#define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004)
|
||||
#define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008)
|
||||
#define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010)
|
||||
#define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020)
|
||||
#define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040)
|
||||
#define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080)
|
||||
|
||||
#define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001)
|
||||
/*
|
||||
* Some implementations strip the ASF header and only send ASF packets
|
||||
* to the DSP
|
||||
*/
|
||||
#define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002)
|
||||
|
||||
#define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001)
|
||||
|
||||
#define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004)
|
||||
#define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008)
|
||||
|
||||
#define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001)
|
||||
|
||||
#define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001)
|
||||
|
||||
#define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001)
|
||||
|
||||
/*
|
||||
* Define quality levels for FLAC encoders, from LEVEL0 (fast)
|
||||
* to LEVEL8 (best)
|
||||
*/
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080)
|
||||
#define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100)
|
||||
|
||||
#define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001)
|
||||
#define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002)
|
||||
|
||||
/* IEC61937 payloads without CUVP and preambles */
|
||||
#define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001)
|
||||
/* IEC61937 with S/PDIF preambles+CUVP bits in 32-bit containers */
|
||||
#define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002)
|
||||
|
||||
/*
|
||||
* IEC modes are mandatory for decoders. Format autodetection
|
||||
* will only happen on the DSP side with mode 0. The PCM mode should
|
||||
* not be used, the PCM codec should be used instead.
|
||||
*/
|
||||
#define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000)
|
||||
#define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004)
|
||||
#define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008)
|
||||
#define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010)
|
||||
#define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020)
|
||||
#define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040)
|
||||
#define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080)
|
||||
#define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100)
|
||||
#define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200)
|
||||
#define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400)
|
||||
#define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800)
|
||||
#define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000)
|
||||
#define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000)
|
||||
#define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000)
|
||||
#define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000)
|
||||
#define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000)
|
||||
#define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000)
|
||||
|
||||
#define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001)
|
||||
|
||||
#define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002)
|
||||
#define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004)
|
||||
|
||||
#define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001)
|
||||
|
||||
#define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001)
|
||||
#define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002)
|
||||
|
||||
/* <FIXME: multichannel encoders aren't supported for now. Would need
|
||||
an additional definition of channel arrangement> */
|
||||
|
||||
/* VBR/CBR definitions */
|
||||
#define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001)
|
||||
#define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002)
|
||||
|
||||
/* Encoder options */
|
||||
|
||||
struct snd_enc_wma {
|
||||
__u32 super_block_align; /* WMA Type-specific data */
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct snd_enc_vorbis
|
||||
* @quality: Sets encoding quality to n, between -1 (low) and 10 (high).
|
||||
* In the default mode of operation, the quality level is 3.
|
||||
* Normal quality range is 0 - 10.
|
||||
* @managed: Boolean. Set bitrate management mode. This turns off the
|
||||
* normal VBR encoding, but allows hard or soft bitrate constraints to be
|
||||
* enforced by the encoder. This mode can be slower, and may also be
|
||||
* lower quality. It is primarily useful for streaming.
|
||||
* @max_bit_rate: Enabled only if managed is TRUE
|
||||
* @min_bit_rate: Enabled only if managed is TRUE
|
||||
* @downmix: Boolean. Downmix input from stereo to mono (has no effect on
|
||||
* non-stereo streams). Useful for lower-bitrate encoding.
|
||||
*
|
||||
* These options were extracted from the OpenMAX IL spec and Gstreamer vorbisenc
|
||||
* properties
|
||||
*
|
||||
* For best quality users should specify VBR mode and set quality levels.
|
||||
*/
|
||||
|
||||
struct snd_enc_vorbis {
|
||||
__s32 quality;
|
||||
__u32 managed;
|
||||
__u32 max_bit_rate;
|
||||
__u32 min_bit_rate;
|
||||
__u32 downmix;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct snd_enc_real
|
||||
* @quant_bits: number of coupling quantization bits in the stream
|
||||
* @start_region: coupling start region in the stream
|
||||
* @num_regions: number of regions value
|
||||
*
|
||||
* These options were extracted from the OpenMAX IL spec
|
||||
*/
|
||||
|
||||
struct snd_enc_real {
|
||||
__u32 quant_bits;
|
||||
__u32 start_region;
|
||||
__u32 num_regions;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_enc_flac
|
||||
* @num: serial number, valid only for OGG formats
|
||||
* needs to be set by application
|
||||
* @gain: Add replay gain tags
|
||||
*
|
||||
* These options were extracted from the FLAC online documentation
|
||||
* at http://flac.sourceforge.net/documentation_tools_flac.html
|
||||
*
|
||||
* To make the API simpler, it is assumed that the user will select quality
|
||||
* profiles. Additional options that affect encoding quality and speed can
|
||||
* be added at a later stage if needed.
|
||||
*
|
||||
* By default the Subset format is used by encoders.
|
||||
*
|
||||
* TAGS such as pictures, etc, cannot be handled by an offloaded encoder and are
|
||||
* not supported in this API.
|
||||
*/
|
||||
|
||||
struct snd_enc_flac {
|
||||
__u32 num;
|
||||
__u32 gain;
|
||||
};
|
||||
|
||||
struct snd_enc_generic {
|
||||
__u32 bw; /* encoder bandwidth */
|
||||
__s32 reserved[15];
|
||||
};
|
||||
|
||||
union snd_codec_options {
|
||||
struct snd_enc_wma wma;
|
||||
struct snd_enc_vorbis vorbis;
|
||||
struct snd_enc_real real;
|
||||
struct snd_enc_flac flac;
|
||||
struct snd_enc_generic generic;
|
||||
};
|
||||
|
||||
/** struct snd_codec_desc - description of codec capabilities
|
||||
* @max_ch: Maximum number of audio channels
|
||||
* @sample_rates: Sampling rates in Hz, use SNDRV_PCM_RATE_xxx for this
|
||||
* @bit_rate: Indexed array containing supported bit rates
|
||||
* @num_bitrates: Number of valid values in bit_rate array
|
||||
* @rate_control: value is specified by SND_RATECONTROLMODE defines.
|
||||
* @profiles: Supported profiles. See SND_AUDIOPROFILE defines.
|
||||
* @modes: Supported modes. See SND_AUDIOMODE defines
|
||||
* @formats: Supported formats. See SND_AUDIOSTREAMFORMAT defines
|
||||
* @min_buffer: Minimum buffer size handled by codec implementation
|
||||
* @reserved: reserved for future use
|
||||
*
|
||||
* This structure provides a scalar value for profiles, modes and stream
|
||||
* format fields.
|
||||
* If an implementation supports multiple combinations, they will be listed as
|
||||
* codecs with different descriptors, for example there would be 2 descriptors
|
||||
* for AAC-RAW and AAC-ADTS.
|
||||
* This entails some redundancy but makes it easier to avoid invalid
|
||||
* configurations.
|
||||
*
|
||||
*/
|
||||
|
||||
struct snd_codec_desc {
|
||||
__u32 max_ch;
|
||||
__u32 sample_rates;
|
||||
__u32 bit_rate[MAX_NUM_BITRATES];
|
||||
__u32 num_bitrates;
|
||||
__u32 rate_control;
|
||||
__u32 profiles;
|
||||
__u32 modes;
|
||||
__u32 formats;
|
||||
__u32 min_buffer;
|
||||
__u32 reserved[15];
|
||||
};
|
||||
|
||||
/** struct snd_codec
|
||||
* @id: Identifies the supported audio encoder/decoder.
|
||||
* See SND_AUDIOCODEC macros.
|
||||
* @ch_in: Number of input audio channels
|
||||
* @ch_out: Number of output channels. In case of contradiction between
|
||||
* this field and the channelMode field, the channelMode field
|
||||
* overrides.
|
||||
* @sample_rate: Audio sample rate of input data
|
||||
* @bit_rate: Bitrate of encoded data. May be ignored by decoders
|
||||
* @rate_control: Encoding rate control. See SND_RATECONTROLMODE defines.
|
||||
* Encoders may rely on profiles for quality levels.
|
||||
* May be ignored by decoders.
|
||||
* @profile: Mandatory for encoders, can be mandatory for specific
|
||||
* decoders as well. See SND_AUDIOPROFILE defines.
|
||||
* @level: Supported level (Only used by WMA at the moment)
|
||||
* @ch_mode: Channel mode for encoder. See SND_AUDIOCHANMODE defines
|
||||
* @format: Format of encoded bistream. Mandatory when defined.
|
||||
* See SND_AUDIOSTREAMFORMAT defines.
|
||||
* @align: Block alignment in bytes of an audio sample.
|
||||
* Only required for PCM or IEC formats.
|
||||
* @options: encoder-specific settings
|
||||
* @reserved: reserved for future use
|
||||
*/
|
||||
|
||||
struct snd_codec {
|
||||
__u32 id;
|
||||
__u32 ch_in;
|
||||
__u32 ch_out;
|
||||
__u32 sample_rate;
|
||||
__u32 bit_rate;
|
||||
__u32 rate_control;
|
||||
__u32 profile;
|
||||
__u32 level;
|
||||
__u32 ch_mode;
|
||||
__u32 format;
|
||||
__u32 align;
|
||||
union snd_codec_options options;
|
||||
__u32 reserved[3];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,373 @@
|
||||
/*
|
||||
* Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
|
||||
* Creative Labs, Inc.
|
||||
* Definitions for EMU10K1 (SB Live!) chips
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
#ifndef _UAPI__SOUND_EMU10K1_H
|
||||
#define _UAPI__SOUND_EMU10K1_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ---- FX8010 ----
|
||||
*/
|
||||
|
||||
#define EMU10K1_CARD_CREATIVE 0x00000000
|
||||
#define EMU10K1_CARD_EMUAPS 0x00000001
|
||||
|
||||
#define EMU10K1_FX8010_PCM_COUNT 8
|
||||
|
||||
/* instruction set */
|
||||
#define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */
|
||||
#define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */
|
||||
#define iMAC2 0x02 /* R = A + (X * Y >> 31) ; wraparound */
|
||||
#define iMAC3 0x03 /* R = A + (-X * Y >> 31) ; wraparound */
|
||||
#define iMACINT0 0x04 /* R = A + X * Y ; saturation */
|
||||
#define iMACINT1 0x05 /* R = A + X * Y ; wraparound (31-bit) */
|
||||
#define iACC3 0x06 /* R = A + X + Y ; saturation */
|
||||
#define iMACMV 0x07 /* R = A, acc += X * Y >> 31 */
|
||||
#define iANDXOR 0x08 /* R = (A & X) ^ Y */
|
||||
#define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */
|
||||
#define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */
|
||||
#define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */
|
||||
#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */
|
||||
#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */
|
||||
#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */
|
||||
#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */
|
||||
|
||||
/* GPRs */
|
||||
#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */
|
||||
#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */
|
||||
#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */
|
||||
#define FXBUS2(x) (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */
|
||||
/* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */
|
||||
|
||||
#define C_00000000 0x40
|
||||
#define C_00000001 0x41
|
||||
#define C_00000002 0x42
|
||||
#define C_00000003 0x43
|
||||
#define C_00000004 0x44
|
||||
#define C_00000008 0x45
|
||||
#define C_00000010 0x46
|
||||
#define C_00000020 0x47
|
||||
#define C_00000100 0x48
|
||||
#define C_00010000 0x49
|
||||
#define C_00080000 0x4a
|
||||
#define C_10000000 0x4b
|
||||
#define C_20000000 0x4c
|
||||
#define C_40000000 0x4d
|
||||
#define C_80000000 0x4e
|
||||
#define C_7fffffff 0x4f
|
||||
#define C_ffffffff 0x50
|
||||
#define C_fffffffe 0x51
|
||||
#define C_c0000000 0x52
|
||||
#define C_4f1bbcdc 0x53
|
||||
#define C_5a7ef9db 0x54
|
||||
#define C_00100000 0x55 /* ?? */
|
||||
#define GPR_ACCU 0x56 /* ACCUM, accumulator */
|
||||
#define GPR_COND 0x57 /* CCR, condition register */
|
||||
#define GPR_NOISE0 0x58 /* noise source */
|
||||
#define GPR_NOISE1 0x59 /* noise source */
|
||||
#define GPR_IRQ 0x5a /* IRQ register */
|
||||
#define GPR_DBAC 0x5b /* TRAM Delay Base Address Counter */
|
||||
#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */
|
||||
#define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
|
||||
#define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
|
||||
#define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
|
||||
#define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
|
||||
|
||||
#define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
|
||||
#define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
|
||||
#define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
|
||||
#define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
|
||||
#define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
|
||||
#define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
|
||||
|
||||
#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */
|
||||
#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */
|
||||
#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */
|
||||
#define A_EXTOUT(x) (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */
|
||||
#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */
|
||||
#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */
|
||||
#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */
|
||||
#define A3_EMU32IN(x) (0x160 + (x)) /* x = 0x00 - 0x3f "EMU32_IN_00 - _3F" - Only when .device = 0x0008 */
|
||||
#define A3_EMU32OUT(x) (0x1E0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_00 - _3F" - Only when .device = 0x0008 */
|
||||
#define A_GPR(x) (A_FXGPREGBASE + (x))
|
||||
|
||||
/* cc_reg constants */
|
||||
#define CC_REG_NORMALIZED C_00000001
|
||||
#define CC_REG_BORROW C_00000002
|
||||
#define CC_REG_MINUS C_00000004
|
||||
#define CC_REG_ZERO C_00000008
|
||||
#define CC_REG_SATURATE C_00000010
|
||||
#define CC_REG_NONZERO C_00000100
|
||||
|
||||
/* FX buses */
|
||||
#define FXBUS_PCM_LEFT 0x00
|
||||
#define FXBUS_PCM_RIGHT 0x01
|
||||
#define FXBUS_PCM_LEFT_REAR 0x02
|
||||
#define FXBUS_PCM_RIGHT_REAR 0x03
|
||||
#define FXBUS_MIDI_LEFT 0x04
|
||||
#define FXBUS_MIDI_RIGHT 0x05
|
||||
#define FXBUS_PCM_CENTER 0x06
|
||||
#define FXBUS_PCM_LFE 0x07
|
||||
#define FXBUS_PCM_LEFT_FRONT 0x08
|
||||
#define FXBUS_PCM_RIGHT_FRONT 0x09
|
||||
#define FXBUS_MIDI_REVERB 0x0c
|
||||
#define FXBUS_MIDI_CHORUS 0x0d
|
||||
#define FXBUS_PCM_LEFT_SIDE 0x0e
|
||||
#define FXBUS_PCM_RIGHT_SIDE 0x0f
|
||||
#define FXBUS_PT_LEFT 0x14
|
||||
#define FXBUS_PT_RIGHT 0x15
|
||||
|
||||
/* Inputs */
|
||||
#define EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
|
||||
#define EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
|
||||
#define EXTIN_SPDIF_CD_L 0x02 /* internal S/PDIF CD - onboard - left */
|
||||
#define EXTIN_SPDIF_CD_R 0x03 /* internal S/PDIF CD - onboard - right */
|
||||
#define EXTIN_ZOOM_L 0x04 /* Zoom Video I2S - left */
|
||||
#define EXTIN_ZOOM_R 0x05 /* Zoom Video I2S - right */
|
||||
#define EXTIN_TOSLINK_L 0x06 /* LiveDrive - TOSLink Optical - left */
|
||||
#define EXTIN_TOSLINK_R 0x07 /* LiveDrive - TOSLink Optical - right */
|
||||
#define EXTIN_LINE1_L 0x08 /* LiveDrive - Line/Mic 1 - left */
|
||||
#define EXTIN_LINE1_R 0x09 /* LiveDrive - Line/Mic 1 - right */
|
||||
#define EXTIN_COAX_SPDIF_L 0x0a /* LiveDrive - Coaxial S/PDIF - left */
|
||||
#define EXTIN_COAX_SPDIF_R 0x0b /* LiveDrive - Coaxial S/PDIF - right */
|
||||
#define EXTIN_LINE2_L 0x0c /* LiveDrive - Line/Mic 2 - left */
|
||||
#define EXTIN_LINE2_R 0x0d /* LiveDrive - Line/Mic 2 - right */
|
||||
|
||||
/* Outputs */
|
||||
#define EXTOUT_AC97_L 0x00 /* AC'97 playback channel - left */
|
||||
#define EXTOUT_AC97_R 0x01 /* AC'97 playback channel - right */
|
||||
#define EXTOUT_TOSLINK_L 0x02 /* LiveDrive - TOSLink Optical - left */
|
||||
#define EXTOUT_TOSLINK_R 0x03 /* LiveDrive - TOSLink Optical - right */
|
||||
#define EXTOUT_AC97_CENTER 0x04 /* SB Live 5.1 - center */
|
||||
#define EXTOUT_AC97_LFE 0x05 /* SB Live 5.1 - LFE */
|
||||
#define EXTOUT_HEADPHONE_L 0x06 /* LiveDrive - Headphone - left */
|
||||
#define EXTOUT_HEADPHONE_R 0x07 /* LiveDrive - Headphone - right */
|
||||
#define EXTOUT_REAR_L 0x08 /* Rear channel - left */
|
||||
#define EXTOUT_REAR_R 0x09 /* Rear channel - right */
|
||||
#define EXTOUT_ADC_CAP_L 0x0a /* ADC Capture buffer - left */
|
||||
#define EXTOUT_ADC_CAP_R 0x0b /* ADC Capture buffer - right */
|
||||
#define EXTOUT_MIC_CAP 0x0c /* MIC Capture buffer */
|
||||
#define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */
|
||||
#define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */
|
||||
#define EXTOUT_ACENTER 0x11 /* Analog Center */
|
||||
#define EXTOUT_ALFE 0x12 /* Analog LFE */
|
||||
|
||||
/* Audigy Inputs */
|
||||
#define A_EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
|
||||
#define A_EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
|
||||
#define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */
|
||||
#define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */
|
||||
#define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */
|
||||
#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */
|
||||
#define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */
|
||||
#define A_EXTIN_LINE2_R 0x09 /* right */
|
||||
#define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */
|
||||
#define A_EXTIN_ADC_R 0x0b /* right */
|
||||
#define A_EXTIN_AUX2_L 0x0c /* audigy drive aux2 - left */
|
||||
#define A_EXTIN_AUX2_R 0x0d /* - right */
|
||||
|
||||
/* Audigiy Outputs */
|
||||
#define A_EXTOUT_FRONT_L 0x00 /* digital front left */
|
||||
#define A_EXTOUT_FRONT_R 0x01 /* right */
|
||||
#define A_EXTOUT_CENTER 0x02 /* digital front center */
|
||||
#define A_EXTOUT_LFE 0x03 /* digital front lfe */
|
||||
#define A_EXTOUT_HEADPHONE_L 0x04 /* headphone audigy drive left */
|
||||
#define A_EXTOUT_HEADPHONE_R 0x05 /* right */
|
||||
#define A_EXTOUT_REAR_L 0x06 /* digital rear left */
|
||||
#define A_EXTOUT_REAR_R 0x07 /* right */
|
||||
#define A_EXTOUT_AFRONT_L 0x08 /* analog front left */
|
||||
#define A_EXTOUT_AFRONT_R 0x09 /* right */
|
||||
#define A_EXTOUT_ACENTER 0x0a /* analog center */
|
||||
#define A_EXTOUT_ALFE 0x0b /* analog LFE */
|
||||
#define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */
|
||||
#define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */
|
||||
#define A_EXTOUT_AREAR_L 0x0e /* analog rear left */
|
||||
#define A_EXTOUT_AREAR_R 0x0f /* right */
|
||||
#define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */
|
||||
#define A_EXTOUT_AC97_R 0x11 /* right */
|
||||
#define A_EXTOUT_ADC_CAP_L 0x16 /* ADC capture buffer left */
|
||||
#define A_EXTOUT_ADC_CAP_R 0x17 /* right */
|
||||
#define A_EXTOUT_MIC_CAP 0x18 /* Mic capture buffer */
|
||||
|
||||
/* Audigy constants */
|
||||
#define A_C_00000000 0xc0
|
||||
#define A_C_00000001 0xc1
|
||||
#define A_C_00000002 0xc2
|
||||
#define A_C_00000003 0xc3
|
||||
#define A_C_00000004 0xc4
|
||||
#define A_C_00000008 0xc5
|
||||
#define A_C_00000010 0xc6
|
||||
#define A_C_00000020 0xc7
|
||||
#define A_C_00000100 0xc8
|
||||
#define A_C_00010000 0xc9
|
||||
#define A_C_00000800 0xca
|
||||
#define A_C_10000000 0xcb
|
||||
#define A_C_20000000 0xcc
|
||||
#define A_C_40000000 0xcd
|
||||
#define A_C_80000000 0xce
|
||||
#define A_C_7fffffff 0xcf
|
||||
#define A_C_ffffffff 0xd0
|
||||
#define A_C_fffffffe 0xd1
|
||||
#define A_C_c0000000 0xd2
|
||||
#define A_C_4f1bbcdc 0xd3
|
||||
#define A_C_5a7ef9db 0xd4
|
||||
#define A_C_00100000 0xd5
|
||||
#define A_GPR_ACCU 0xd6 /* ACCUM, accumulator */
|
||||
#define A_GPR_COND 0xd7 /* CCR, condition register */
|
||||
#define A_GPR_NOISE0 0xd8 /* noise source */
|
||||
#define A_GPR_NOISE1 0xd9 /* noise source */
|
||||
#define A_GPR_IRQ 0xda /* IRQ register */
|
||||
#define A_GPR_DBAC 0xdb /* TRAM Delay Base Address Counter - internal */
|
||||
#define A_GPR_DBACE 0xde /* TRAM Delay Base Address Counter - external */
|
||||
|
||||
/* definitions for debug register */
|
||||
#define EMU10K1_DBG_ZC 0x80000000 /* zero tram counter */
|
||||
#define EMU10K1_DBG_SATURATION_OCCURED 0x02000000 /* saturation control */
|
||||
#define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */
|
||||
#define EMU10K1_DBG_SINGLE_STEP 0x00008000 /* single step mode */
|
||||
#define EMU10K1_DBG_STEP 0x00004000 /* start single step */
|
||||
#define EMU10K1_DBG_CONDITION_CODE 0x00003e00 /* condition code */
|
||||
#define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */
|
||||
|
||||
/* tank memory address line */
|
||||
#ifndef __KERNEL__
|
||||
#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */
|
||||
#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */
|
||||
#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */
|
||||
#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */
|
||||
#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */
|
||||
#endif
|
||||
|
||||
struct snd_emu10k1_fx8010_info {
|
||||
unsigned int internal_tram_size; /* in samples */
|
||||
unsigned int external_tram_size; /* in samples */
|
||||
char fxbus_names[16][32]; /* names of FXBUSes */
|
||||
char extin_names[16][32]; /* names of external inputs */
|
||||
char extout_names[32][32]; /* names of external outputs */
|
||||
unsigned int gpr_controls; /* count of GPR controls */
|
||||
};
|
||||
|
||||
#define EMU10K1_GPR_TRANSLATION_NONE 0
|
||||
#define EMU10K1_GPR_TRANSLATION_TABLE100 1
|
||||
#define EMU10K1_GPR_TRANSLATION_BASS 2
|
||||
#define EMU10K1_GPR_TRANSLATION_TREBLE 3
|
||||
#define EMU10K1_GPR_TRANSLATION_ONOFF 4
|
||||
|
||||
struct snd_emu10k1_fx8010_control_gpr {
|
||||
struct snd_ctl_elem_id id; /* full control ID definition */
|
||||
unsigned int vcount; /* visible count */
|
||||
unsigned int count; /* count of GPR (1..16) */
|
||||
unsigned short gpr[32]; /* GPR number(s) */
|
||||
unsigned int value[32]; /* initial values */
|
||||
unsigned int min; /* minimum range */
|
||||
unsigned int max; /* maximum range */
|
||||
unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
|
||||
const unsigned int *tlv;
|
||||
};
|
||||
|
||||
/* old ABI without TLV support */
|
||||
struct snd_emu10k1_fx8010_control_old_gpr {
|
||||
struct snd_ctl_elem_id id;
|
||||
unsigned int vcount;
|
||||
unsigned int count;
|
||||
unsigned short gpr[32];
|
||||
unsigned int value[32];
|
||||
unsigned int min;
|
||||
unsigned int max;
|
||||
unsigned int translation;
|
||||
};
|
||||
|
||||
struct snd_emu10k1_fx8010_code {
|
||||
char name[128];
|
||||
|
||||
DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
|
||||
__u32 __user *gpr_map; /* initializers */
|
||||
|
||||
unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
|
||||
struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */
|
||||
|
||||
unsigned int gpr_del_control_count; /* count of GPR controls to remove */
|
||||
struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */
|
||||
|
||||
unsigned int gpr_list_control_count; /* count of GPR controls to list */
|
||||
unsigned int gpr_list_control_total; /* total count of GPR controls */
|
||||
struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
|
||||
|
||||
DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
|
||||
__u32 __user *tram_data_map; /* data initializers */
|
||||
__u32 __user *tram_addr_map; /* map initializers */
|
||||
|
||||
DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
|
||||
__u32 __user *code; /* one instruction - 64 bits */
|
||||
};
|
||||
|
||||
struct snd_emu10k1_fx8010_tram {
|
||||
unsigned int address; /* 31.bit == 1 -> external TRAM */
|
||||
unsigned int size; /* size in samples (4 bytes) */
|
||||
unsigned int *samples; /* pointer to samples (20-bit) */
|
||||
/* NULL->clear memory */
|
||||
};
|
||||
|
||||
struct snd_emu10k1_fx8010_pcm_rec {
|
||||
unsigned int substream; /* substream number */
|
||||
unsigned int res1; /* reserved */
|
||||
unsigned int channels; /* 16-bit channels count, zero = remove this substream */
|
||||
unsigned int tram_start; /* ring buffer position in TRAM (in samples) */
|
||||
unsigned int buffer_size; /* count of buffered samples */
|
||||
unsigned short gpr_size; /* GPR containing size of ringbuffer in samples (host) */
|
||||
unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
|
||||
unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */
|
||||
unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */
|
||||
unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */
|
||||
unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */
|
||||
unsigned char pad; /* reserved */
|
||||
unsigned char etram[32]; /* external TRAM address & data (one per channel) */
|
||||
unsigned int res2; /* reserved */
|
||||
};
|
||||
|
||||
#define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
|
||||
|
||||
#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info)
|
||||
#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code)
|
||||
#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
|
||||
#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int)
|
||||
#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram)
|
||||
#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
|
||||
#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
|
||||
#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
|
||||
#define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int)
|
||||
#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80)
|
||||
#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81)
|
||||
#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82)
|
||||
#define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int)
|
||||
#define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int)
|
||||
|
||||
/* typedefs for compatibility to user-space */
|
||||
typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t;
|
||||
typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t;
|
||||
typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t;
|
||||
typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t;
|
||||
typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t;
|
||||
|
||||
#endif /* _UAPI__SOUND_EMU10K1_H */
|
||||
@@ -0,0 +1,110 @@
|
||||
#ifndef __SOUND_HDSP_H
|
||||
#define __SOUND_HDSP_H
|
||||
|
||||
/*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define HDSP_MATRIX_MIXER_SIZE 2048
|
||||
|
||||
enum HDSP_IO_Type {
|
||||
Digiface,
|
||||
Multiface,
|
||||
H9652,
|
||||
H9632,
|
||||
RPM,
|
||||
Undefined,
|
||||
};
|
||||
|
||||
struct hdsp_peak_rms {
|
||||
__u32 input_peaks[26];
|
||||
__u32 playback_peaks[26];
|
||||
__u32 output_peaks[28];
|
||||
__u64 input_rms[26];
|
||||
__u64 playback_rms[26];
|
||||
/* These are only used for H96xx cards */
|
||||
__u64 output_rms[26];
|
||||
};
|
||||
|
||||
#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
|
||||
|
||||
struct hdsp_config_info {
|
||||
unsigned char pref_sync_ref;
|
||||
unsigned char wordclock_sync_check;
|
||||
unsigned char spdif_sync_check;
|
||||
unsigned char adatsync_sync_check;
|
||||
unsigned char adat_sync_check[3];
|
||||
unsigned char spdif_in;
|
||||
unsigned char spdif_out;
|
||||
unsigned char spdif_professional;
|
||||
unsigned char spdif_emphasis;
|
||||
unsigned char spdif_nonaudio;
|
||||
unsigned int spdif_sample_rate;
|
||||
unsigned int system_sample_rate;
|
||||
unsigned int autosync_sample_rate;
|
||||
unsigned char system_clock_mode;
|
||||
unsigned char clock_source;
|
||||
unsigned char autosync_ref;
|
||||
unsigned char line_out;
|
||||
unsigned char passthru;
|
||||
unsigned char da_gain;
|
||||
unsigned char ad_gain;
|
||||
unsigned char phone_gain;
|
||||
unsigned char xlr_breakout_cable;
|
||||
unsigned char analog_extension_board;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
|
||||
|
||||
struct hdsp_firmware {
|
||||
void __user *firmware_data; /* 24413 x 4 bytes */
|
||||
};
|
||||
|
||||
#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
|
||||
|
||||
struct hdsp_version {
|
||||
enum HDSP_IO_Type io_type;
|
||||
unsigned short firmware_rev;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
|
||||
|
||||
struct hdsp_mixer {
|
||||
unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
|
||||
};
|
||||
|
||||
#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
|
||||
|
||||
struct hdsp_9632_aeb {
|
||||
int aebi;
|
||||
int aebo;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
|
||||
|
||||
/* typedefs for compatibility to user-space */
|
||||
typedef enum HDSP_IO_Type HDSP_IO_Type;
|
||||
typedef struct hdsp_peak_rms hdsp_peak_rms_t;
|
||||
typedef struct hdsp_config_info hdsp_config_info_t;
|
||||
typedef struct hdsp_firmware hdsp_firmware_t;
|
||||
typedef struct hdsp_version hdsp_version_t;
|
||||
typedef struct hdsp_mixer hdsp_mixer_t;
|
||||
typedef struct hdsp_9632_aeb hdsp_9632_aeb_t;
|
||||
|
||||
#endif /* __SOUND_HDSP_H */
|
||||
@@ -0,0 +1,229 @@
|
||||
#ifndef __SOUND_HDSPM_H
|
||||
#define __SOUND_HDSPM_H
|
||||
/*
|
||||
* Copyright (C) 2003 Winfried Ritsch (IEM)
|
||||
* based on hdsp.h from Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
|
||||
#define HDSPM_MAX_CHANNELS 64
|
||||
|
||||
enum hdspm_io_type {
|
||||
MADI,
|
||||
MADIface,
|
||||
AIO,
|
||||
AES32,
|
||||
RayDAT
|
||||
};
|
||||
|
||||
enum hdspm_speed {
|
||||
ss,
|
||||
ds,
|
||||
qs
|
||||
};
|
||||
|
||||
/* -------------------- IOCTL Peak/RMS Meters -------------------- */
|
||||
|
||||
struct hdspm_peak_rms {
|
||||
uint32_t input_peaks[64];
|
||||
uint32_t playback_peaks[64];
|
||||
uint32_t output_peaks[64];
|
||||
|
||||
uint64_t input_rms[64];
|
||||
uint64_t playback_rms[64];
|
||||
uint64_t output_rms[64];
|
||||
|
||||
uint8_t speed; /* enum {ss, ds, qs} */
|
||||
int status2;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \
|
||||
_IOR('H', 0x42, struct hdspm_peak_rms)
|
||||
|
||||
/* ------------ CONFIG block IOCTL ---------------------- */
|
||||
|
||||
struct hdspm_config {
|
||||
unsigned char pref_sync_ref;
|
||||
unsigned char wordclock_sync_check;
|
||||
unsigned char madi_sync_check;
|
||||
unsigned int system_sample_rate;
|
||||
unsigned int autosync_sample_rate;
|
||||
unsigned char system_clock_mode;
|
||||
unsigned char clock_source;
|
||||
unsigned char autosync_ref;
|
||||
unsigned char line_out;
|
||||
unsigned int passthru;
|
||||
unsigned int analog_out;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSPM_IOCTL_GET_CONFIG \
|
||||
_IOR('H', 0x41, struct hdspm_config)
|
||||
|
||||
/**
|
||||
* If there's a TCO (TimeCode Option) board installed,
|
||||
* there are further options and status data available.
|
||||
* The hdspm_ltc structure contains the current SMPTE
|
||||
* timecode and some status information and can be
|
||||
* obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the
|
||||
* hdspm_status struct.
|
||||
**/
|
||||
|
||||
enum hdspm_ltc_format {
|
||||
format_invalid,
|
||||
fps_24,
|
||||
fps_25,
|
||||
fps_2997,
|
||||
fps_30
|
||||
};
|
||||
|
||||
enum hdspm_ltc_frame {
|
||||
frame_invalid,
|
||||
drop_frame,
|
||||
full_frame
|
||||
};
|
||||
|
||||
enum hdspm_ltc_input_format {
|
||||
ntsc,
|
||||
pal,
|
||||
no_video
|
||||
};
|
||||
|
||||
struct hdspm_ltc {
|
||||
unsigned int ltc;
|
||||
|
||||
enum hdspm_ltc_format format;
|
||||
enum hdspm_ltc_frame frame;
|
||||
enum hdspm_ltc_input_format input_format;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_mixer_ioctl)
|
||||
|
||||
/**
|
||||
* The status data reflects the device's current state
|
||||
* as determined by the card's configuration and
|
||||
* connection status.
|
||||
**/
|
||||
|
||||
enum hdspm_sync {
|
||||
hdspm_sync_no_lock = 0,
|
||||
hdspm_sync_lock = 1,
|
||||
hdspm_sync_sync = 2
|
||||
};
|
||||
|
||||
enum hdspm_madi_input {
|
||||
hdspm_input_optical = 0,
|
||||
hdspm_input_coax = 1
|
||||
};
|
||||
|
||||
enum hdspm_madi_channel_format {
|
||||
hdspm_format_ch_64 = 0,
|
||||
hdspm_format_ch_56 = 1
|
||||
};
|
||||
|
||||
enum hdspm_madi_frame_format {
|
||||
hdspm_frame_48 = 0,
|
||||
hdspm_frame_96 = 1
|
||||
};
|
||||
|
||||
enum hdspm_syncsource {
|
||||
syncsource_wc = 0,
|
||||
syncsource_madi = 1,
|
||||
syncsource_tco = 2,
|
||||
syncsource_sync = 3,
|
||||
syncsource_none = 4
|
||||
};
|
||||
|
||||
struct hdspm_status {
|
||||
uint8_t card_type; /* enum hdspm_io_type */
|
||||
enum hdspm_syncsource autosync_source;
|
||||
|
||||
uint64_t card_clock;
|
||||
uint32_t master_period;
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint8_t sync_wc; /* enum hdspm_sync */
|
||||
uint8_t sync_madi; /* enum hdspm_sync */
|
||||
uint8_t sync_tco; /* enum hdspm_sync */
|
||||
uint8_t sync_in; /* enum hdspm_sync */
|
||||
uint8_t madi_input; /* enum hdspm_madi_input */
|
||||
uint8_t channel_format; /* enum hdspm_madi_channel_format */
|
||||
uint8_t frame_format; /* enum hdspm_madi_frame_format */
|
||||
} madi;
|
||||
} card_specific;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSPM_IOCTL_GET_STATUS \
|
||||
_IOR('H', 0x47, struct hdspm_status)
|
||||
|
||||
/**
|
||||
* Get information about the card and its add-ons.
|
||||
**/
|
||||
|
||||
#define HDSPM_ADDON_TCO 1
|
||||
|
||||
struct hdspm_version {
|
||||
uint8_t card_type; /* enum hdspm_io_type */
|
||||
char cardname[20];
|
||||
unsigned int serial;
|
||||
unsigned short firmware_rev;
|
||||
int addons;
|
||||
};
|
||||
|
||||
#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
|
||||
|
||||
/* ------------- get Matrix Mixer IOCTL --------------- */
|
||||
|
||||
/* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte =
|
||||
* 32768 Bytes
|
||||
*/
|
||||
|
||||
/* organisation is 64 channelfader in a continuous memory block */
|
||||
/* equivalent to hardware definition, maybe for future feature of mmap of
|
||||
* them
|
||||
*/
|
||||
/* each of 64 outputs has 64 infader and 64 outfader:
|
||||
Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */
|
||||
|
||||
#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
|
||||
|
||||
struct hdspm_channelfader {
|
||||
unsigned int in[HDSPM_MIXER_CHANNELS];
|
||||
unsigned int pb[HDSPM_MIXER_CHANNELS];
|
||||
};
|
||||
|
||||
struct hdspm_mixer {
|
||||
struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
|
||||
};
|
||||
|
||||
struct hdspm_mixer_ioctl {
|
||||
struct hdspm_mixer *mixer;
|
||||
};
|
||||
|
||||
/* use indirect access due to the limit of ioctl bit size */
|
||||
#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
|
||||
|
||||
/* typedefs for compatibility to user-space */
|
||||
typedef struct hdspm_peak_rms hdspm_peak_rms_t;
|
||||
typedef struct hdspm_config_info hdspm_config_info_t;
|
||||
typedef struct hdspm_version hdspm_version_t;
|
||||
typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
|
||||
typedef struct hdspm_mixer hdspm_mixer_t;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* Copyright (c) 1999 by Uros Bizjak <uros@kss-loka.si>
|
||||
* Takashi Iwai <tiwai@suse.de>
|
||||
*
|
||||
* SB16ASP/AWE32 CSP control
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
#ifndef _UAPI__SOUND_SB16_CSP_H
|
||||
#define _UAPI__SOUND_SB16_CSP_H
|
||||
|
||||
|
||||
/* CSP modes */
|
||||
#define SNDRV_SB_CSP_MODE_NONE 0x00
|
||||
#define SNDRV_SB_CSP_MODE_DSP_READ 0x01 /* Record from DSP */
|
||||
#define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02 /* Play to DSP */
|
||||
#define SNDRV_SB_CSP_MODE_QSOUND 0x04 /* QSound */
|
||||
|
||||
/* CSP load flags */
|
||||
#define SNDRV_SB_CSP_LOAD_FROMUSER 0x01
|
||||
#define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02
|
||||
|
||||
/* CSP sample width */
|
||||
#define SNDRV_SB_CSP_SAMPLE_8BIT 0x01
|
||||
#define SNDRV_SB_CSP_SAMPLE_16BIT 0x02
|
||||
|
||||
/* CSP channels */
|
||||
#define SNDRV_SB_CSP_MONO 0x01
|
||||
#define SNDRV_SB_CSP_STEREO 0x02
|
||||
|
||||
/* CSP rates */
|
||||
#define SNDRV_SB_CSP_RATE_8000 0x01
|
||||
#define SNDRV_SB_CSP_RATE_11025 0x02
|
||||
#define SNDRV_SB_CSP_RATE_22050 0x04
|
||||
#define SNDRV_SB_CSP_RATE_44100 0x08
|
||||
#define SNDRV_SB_CSP_RATE_ALL 0x0f
|
||||
|
||||
/* CSP running state */
|
||||
#define SNDRV_SB_CSP_ST_IDLE 0x00
|
||||
#define SNDRV_SB_CSP_ST_LOADED 0x01
|
||||
#define SNDRV_SB_CSP_ST_RUNNING 0x02
|
||||
#define SNDRV_SB_CSP_ST_PAUSED 0x04
|
||||
#define SNDRV_SB_CSP_ST_AUTO 0x08
|
||||
#define SNDRV_SB_CSP_ST_QSOUND 0x10
|
||||
|
||||
/* maximum QSound value (180 degrees right) */
|
||||
#define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20
|
||||
|
||||
/* maximum microcode RIFF file size */
|
||||
#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000
|
||||
|
||||
/* microcode header */
|
||||
struct snd_sb_csp_mc_header {
|
||||
char codec_name[16]; /* id name of codec */
|
||||
unsigned short func_req; /* requested function */
|
||||
};
|
||||
|
||||
/* microcode to be loaded */
|
||||
struct snd_sb_csp_microcode {
|
||||
struct snd_sb_csp_mc_header info;
|
||||
unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
|
||||
};
|
||||
|
||||
/* start CSP with sample_width in mono/stereo */
|
||||
struct snd_sb_csp_start {
|
||||
int sample_width; /* sample width, look above */
|
||||
int channels; /* channels, look above */
|
||||
};
|
||||
|
||||
/* CSP information */
|
||||
struct snd_sb_csp_info {
|
||||
char codec_name[16]; /* id name of codec */
|
||||
unsigned short func_nr; /* function number */
|
||||
unsigned int acc_format; /* accepted PCM formats */
|
||||
unsigned short acc_channels; /* accepted channels */
|
||||
unsigned short acc_width; /* accepted sample width */
|
||||
unsigned short acc_rates; /* accepted sample rates */
|
||||
unsigned short csp_mode; /* CSP mode, see above */
|
||||
unsigned short run_channels; /* current channels */
|
||||
unsigned short run_width; /* current sample width */
|
||||
unsigned short version; /* version id: 0x10 - 0x1f */
|
||||
unsigned short state; /* state bits */
|
||||
};
|
||||
|
||||
/* HWDEP controls */
|
||||
/* get CSP information */
|
||||
#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_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 \
|
||||
_IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
|
||||
/* unload microcode from CSP */
|
||||
#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
|
||||
/* start CSP */
|
||||
#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start)
|
||||
/* stop CSP */
|
||||
#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14)
|
||||
/* pause CSP and DMA transfer */
|
||||
#define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15)
|
||||
/* restart CSP and DMA transfer */
|
||||
#define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16)
|
||||
|
||||
|
||||
#endif /* _UAPI__SOUND_SB16_CSP_H */
|
||||
@@ -0,0 +1,212 @@
|
||||
#ifndef __SOUND_SFNT_INFO_H
|
||||
#define __SOUND_SFNT_INFO_H
|
||||
|
||||
/*
|
||||
* Patch record compatible with AWE driver on OSS
|
||||
*
|
||||
* Copyright (C) 1999-2000 Takashi Iwai
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sound/asound.h>
|
||||
|
||||
/*
|
||||
* patch information record
|
||||
*/
|
||||
|
||||
#ifdef SNDRV_BIG_ENDIAN
|
||||
#define SNDRV_OSS_PATCHKEY(id) (0xfd00|id)
|
||||
#else
|
||||
#define SNDRV_OSS_PATCHKEY(id) ((id<<8)|0xfd)
|
||||
#endif
|
||||
|
||||
/* patch interface header: 16 bytes */
|
||||
struct soundfont_patch_info {
|
||||
unsigned short key; /* use the key below */
|
||||
#define SNDRV_OSS_SOUNDFONT_PATCH SNDRV_OSS_PATCHKEY(0x07)
|
||||
|
||||
short device_no; /* synthesizer number */
|
||||
unsigned short sf_id; /* file id (should be zero) */
|
||||
short optarg; /* optional argument */
|
||||
int len; /* data length (without this header) */
|
||||
|
||||
short type; /* patch operation type */
|
||||
#define SNDRV_SFNT_LOAD_INFO 0 /* awe_voice_rec */
|
||||
#define SNDRV_SFNT_LOAD_DATA 1 /* awe_sample_info */
|
||||
#define SNDRV_SFNT_OPEN_PATCH 2 /* awe_open_parm */
|
||||
#define SNDRV_SFNT_CLOSE_PATCH 3 /* none */
|
||||
/* 4 is obsolete */
|
||||
#define SNDRV_SFNT_REPLACE_DATA 5 /* awe_sample_info (optarg=#channels)*/
|
||||
#define SNDRV_SFNT_MAP_PRESET 6 /* awe_voice_map */
|
||||
/* 7 is not used */
|
||||
#define SNDRV_SFNT_PROBE_DATA 8 /* optarg=sample */
|
||||
#define SNDRV_SFNT_REMOVE_INFO 9 /* optarg=(bank<<8)|instr */
|
||||
|
||||
short reserved; /* word alignment data */
|
||||
|
||||
/* the actual patch data begins after this */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* open patch
|
||||
*/
|
||||
|
||||
#define SNDRV_SFNT_PATCH_NAME_LEN 32
|
||||
|
||||
struct soundfont_open_parm {
|
||||
unsigned short type; /* sample type */
|
||||
#define SNDRV_SFNT_PAT_TYPE_MISC 0
|
||||
#define SNDRV_SFNT_PAT_TYPE_GUS 6
|
||||
#define SNDRV_SFNT_PAT_TYPE_MAP 7
|
||||
#define SNDRV_SFNT_PAT_LOCKED 0x100 /* lock the samples */
|
||||
#define SNDRV_SFNT_PAT_SHARED 0x200 /* sample is shared */
|
||||
|
||||
short reserved;
|
||||
char name[SNDRV_SFNT_PATCH_NAME_LEN];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* raw voice information record
|
||||
*/
|
||||
|
||||
/* wave table envelope & effect parameters to control EMU8000 */
|
||||
struct soundfont_voice_parm {
|
||||
unsigned short moddelay; /* modulation delay (0x8000) */
|
||||
unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */
|
||||
unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */
|
||||
unsigned short modrelease; /* modulation release time (0x807f) */
|
||||
short modkeyhold, modkeydecay; /* envelope change per key (not used) */
|
||||
unsigned short voldelay; /* volume delay (0x8000) */
|
||||
unsigned short volatkhld; /* volume attack & hold time (0x7f7f) */
|
||||
unsigned short voldcysus; /* volume decay & sustain (0x7f7f) */
|
||||
unsigned short volrelease; /* volume release time (0x807f) */
|
||||
short volkeyhold, volkeydecay; /* envelope change per key (not used) */
|
||||
unsigned short lfo1delay; /* LFO1 delay (0x8000) */
|
||||
unsigned short lfo2delay; /* LFO2 delay (0x8000) */
|
||||
unsigned short pefe; /* modulation pitch & cutoff (0x0000) */
|
||||
unsigned short fmmod; /* LFO1 pitch & cutoff (0x0000) */
|
||||
unsigned short tremfrq; /* LFO1 volume & freq (0x0000) */
|
||||
unsigned short fm2frq2; /* LFO2 pitch & freq (0x0000) */
|
||||
unsigned char cutoff; /* initial cutoff (0xff) */
|
||||
unsigned char filterQ; /* initial filter Q [0-15] (0x0) */
|
||||
unsigned char chorus; /* chorus send (0x00) */
|
||||
unsigned char reverb; /* reverb send (0x00) */
|
||||
unsigned short reserved[4]; /* not used */
|
||||
};
|
||||
|
||||
|
||||
/* wave table parameters: 92 bytes */
|
||||
struct soundfont_voice_info {
|
||||
unsigned short sf_id; /* file id (should be zero) */
|
||||
unsigned short sample; /* sample id */
|
||||
int start, end; /* sample offset correction */
|
||||
int loopstart, loopend; /* loop offset correction */
|
||||
short rate_offset; /* sample rate pitch offset */
|
||||
unsigned short mode; /* sample mode */
|
||||
#define SNDRV_SFNT_MODE_ROMSOUND 0x8000
|
||||
#define SNDRV_SFNT_MODE_STEREO 1
|
||||
#define SNDRV_SFNT_MODE_LOOPING 2
|
||||
#define SNDRV_SFNT_MODE_NORELEASE 4 /* obsolete */
|
||||
#define SNDRV_SFNT_MODE_INIT_PARM 8
|
||||
|
||||
short root; /* midi root key */
|
||||
short tune; /* pitch tuning (in cents) */
|
||||
unsigned char low, high; /* key note range */
|
||||
unsigned char vellow, velhigh; /* velocity range */
|
||||
signed char fixkey, fixvel; /* fixed key, velocity */
|
||||
signed char pan, fixpan; /* panning, fixed panning */
|
||||
short exclusiveClass; /* exclusive class (0 = none) */
|
||||
unsigned char amplitude; /* sample volume (127 max) */
|
||||
unsigned char attenuation; /* attenuation (0.375dB) */
|
||||
short scaleTuning; /* pitch scale tuning(%), normally 100 */
|
||||
struct soundfont_voice_parm parm; /* voice envelope parameters */
|
||||
unsigned short sample_mode; /* sample mode_flag (set by driver) */
|
||||
};
|
||||
|
||||
|
||||
/* instrument info header: 4 bytes */
|
||||
struct soundfont_voice_rec_hdr {
|
||||
unsigned char bank; /* midi bank number */
|
||||
unsigned char instr; /* midi preset number */
|
||||
char nvoices; /* number of voices */
|
||||
char write_mode; /* write mode; normally 0 */
|
||||
#define SNDRV_SFNT_WR_APPEND 0 /* append anyway */
|
||||
#define SNDRV_SFNT_WR_EXCLUSIVE 1 /* skip if already exists */
|
||||
#define SNDRV_SFNT_WR_REPLACE 2 /* replace if already exists */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* sample wave information
|
||||
*/
|
||||
|
||||
/* wave table sample header: 32 bytes */
|
||||
struct soundfont_sample_info {
|
||||
unsigned short sf_id; /* file id (should be zero) */
|
||||
unsigned short sample; /* sample id */
|
||||
int start, end; /* start & end offset */
|
||||
int loopstart, loopend; /* loop start & end offset */
|
||||
int size; /* size (0 = ROM) */
|
||||
short dummy; /* not used */
|
||||
unsigned short mode_flags; /* mode flags */
|
||||
#define SNDRV_SFNT_SAMPLE_8BITS 1 /* wave data is 8bits */
|
||||
#define SNDRV_SFNT_SAMPLE_UNSIGNED 2 /* wave data is unsigned */
|
||||
#define SNDRV_SFNT_SAMPLE_NO_BLANK 4 /* no blank loop is attached */
|
||||
#define SNDRV_SFNT_SAMPLE_SINGLESHOT 8 /* single-shot w/o loop */
|
||||
#define SNDRV_SFNT_SAMPLE_BIDIR_LOOP 16 /* bidirectional looping */
|
||||
#define SNDRV_SFNT_SAMPLE_STEREO_LEFT 32 /* stereo left sound */
|
||||
#define SNDRV_SFNT_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */
|
||||
#define SNDRV_SFNT_SAMPLE_REVERSE_LOOP 128 /* reverse looping */
|
||||
unsigned int truesize; /* used memory size (set by driver) */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* voice preset mapping (aliasing)
|
||||
*/
|
||||
|
||||
struct soundfont_voice_map {
|
||||
int map_bank, map_instr, map_key; /* key = -1 means all keys */
|
||||
int src_bank, src_instr, src_key;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* ioctls for hwdep
|
||||
*/
|
||||
|
||||
#define SNDRV_EMUX_HWDEP_NAME "Emux WaveTable"
|
||||
|
||||
#define SNDRV_EMUX_VERSION ((1 << 16) | (0 << 8) | 0) /* 1.0.0 */
|
||||
|
||||
struct snd_emux_misc_mode {
|
||||
int port; /* -1 = all */
|
||||
int mode;
|
||||
int value;
|
||||
int value2; /* reserved */
|
||||
};
|
||||
|
||||
#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int)
|
||||
#define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info)
|
||||
#define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82)
|
||||
#define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83)
|
||||
#define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int)
|
||||
#define SNDRV_EMUX_IOCTL_MISC_MODE _IOWR('H', 0x84, struct snd_emux_misc_mode)
|
||||
|
||||
#endif /* __SOUND_SFNT_INFO_H */
|
||||
Reference in New Issue
Block a user