diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /include/sound | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'include/sound')
| -rw-r--r-- | include/sound/Kbuild | 8 | ||||
| -rw-r--r-- | include/sound/asound_fm.h | 134 | ||||
| -rw-r--r-- | include/sound/cs46xx.h | 1745 | ||||
| -rw-r--r-- | include/sound/cs46xx_dsp_scb_types.h | 1213 | ||||
| -rw-r--r-- | include/sound/cs46xx_dsp_spos.h | 234 | ||||
| -rw-r--r-- | include/sound/cs46xx_dsp_task_types.h | 252 | ||||
| -rw-r--r-- | include/sound/hdsp.h | 110 | ||||
| -rw-r--r-- | include/sound/hdspm.h | 229 | ||||
| -rw-r--r-- | include/sound/sfnt_info.h | 212 | ||||
| -rw-r--r-- | include/sound/tlv320aic326x.h | 23 | ||||
| -rw-r--r-- | include/sound/trident.h | 445 | ||||
| -rw-r--r-- | include/sound/version.h | 3 | ||||
| -rw-r--r-- | include/sound/ymfpci.h | 388 |
13 files changed, 4996 insertions, 0 deletions
diff --git a/include/sound/Kbuild b/include/sound/Kbuild new file mode 100644 index 00000000000..802947f6091 --- /dev/null +++ b/include/sound/Kbuild | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | header-y += asequencer.h | ||
| 2 | header-y += asound.h | ||
| 3 | header-y += asound_fm.h | ||
| 4 | header-y += emu10k1.h | ||
| 5 | header-y += hdsp.h | ||
| 6 | header-y += hdspm.h | ||
| 7 | header-y += sb16_csp.h | ||
| 8 | header-y += sfnt_info.h | ||
diff --git a/include/sound/asound_fm.h b/include/sound/asound_fm.h new file mode 100644 index 00000000000..c2a4b967d5b --- /dev/null +++ b/include/sound/asound_fm.h | |||
| @@ -0,0 +1,134 @@ | |||
| 1 | #ifndef __SOUND_ASOUND_FM_H | ||
| 2 | #define __SOUND_ASOUND_FM_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Advanced Linux Sound Architecture - ALSA | ||
| 6 | * | ||
| 7 | * Interface file between ALSA driver & user space | ||
| 8 | * Copyright (c) 1994-98 by Jaroslav Kysela <perex@perex.cz>, | ||
| 9 | * 4Front Technologies | ||
| 10 | * | ||
| 11 | * Direct FM control | ||
| 12 | * | ||
| 13 | * This program is free software; you can redistribute it and/or modify | ||
| 14 | * it under the terms of the GNU General Public License as published by | ||
| 15 | * the Free Software Foundation; either version 2 of the License, or | ||
| 16 | * (at your option) any later version. | ||
| 17 | * | ||
| 18 | * This program is distributed in the hope that it will be useful, | ||
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 21 | * GNU General Public License for more details. | ||
| 22 | * | ||
| 23 | * You should have received a copy of the GNU General Public License | ||
| 24 | * along with this program; if not, write to the Free Software | ||
| 25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 26 | * | ||
| 27 | */ | ||
| 28 | |||
| 29 | #define SNDRV_DM_FM_MODE_OPL2 0x00 | ||
| 30 | #define SNDRV_DM_FM_MODE_OPL3 0x01 | ||
| 31 | |||
| 32 | struct snd_dm_fm_info { | ||
| 33 | unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ | ||
| 34 | unsigned char rhythm; /* percussion mode flag */ | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* | ||
| 38 | * Data structure composing an FM "note" or sound event. | ||
| 39 | */ | ||
| 40 | |||
| 41 | struct snd_dm_fm_voice { | ||
| 42 | unsigned char op; /* operator cell (0 or 1) */ | ||
| 43 | unsigned char voice; /* FM voice (0 to 17) */ | ||
| 44 | |||
| 45 | unsigned char am; /* amplitude modulation */ | ||
| 46 | unsigned char vibrato; /* vibrato effect */ | ||
| 47 | unsigned char do_sustain; /* sustain phase */ | ||
| 48 | unsigned char kbd_scale; /* keyboard scaling */ | ||
| 49 | unsigned char harmonic; /* 4 bits: harmonic and multiplier */ | ||
| 50 | unsigned char scale_level; /* 2 bits: decrease output freq rises */ | ||
| 51 | unsigned char volume; /* 6 bits: volume */ | ||
| 52 | |||
| 53 | unsigned char attack; /* 4 bits: attack rate */ | ||
| 54 | unsigned char decay; /* 4 bits: decay rate */ | ||
| 55 | unsigned char sustain; /* 4 bits: sustain level */ | ||
| 56 | unsigned char release; /* 4 bits: release rate */ | ||
| 57 | |||
| 58 | unsigned char feedback; /* 3 bits: feedback for op0 */ | ||
| 59 | unsigned char connection; /* 0 for serial, 1 for parallel */ | ||
| 60 | unsigned char left; /* stereo left */ | ||
| 61 | unsigned char right; /* stereo right */ | ||
| 62 | unsigned char waveform; /* 3 bits: waveform shape */ | ||
| 63 | }; | ||
| 64 | |||
| 65 | /* | ||
| 66 | * This describes an FM note by its voice, octave, frequency number (10bit) | ||
| 67 | * and key on/off. | ||
| 68 | */ | ||
| 69 | |||
| 70 | struct snd_dm_fm_note { | ||
| 71 | unsigned char voice; /* 0-17 voice channel */ | ||
| 72 | unsigned char octave; /* 3 bits: what octave to play */ | ||
| 73 | unsigned int fnum; /* 10 bits: frequency number */ | ||
| 74 | unsigned char key_on; /* set for active, clear for silent */ | ||
| 75 | }; | ||
| 76 | |||
| 77 | /* | ||
| 78 | * FM parameters that apply globally to all voices, and thus are not "notes" | ||
| 79 | */ | ||
| 80 | |||
| 81 | struct snd_dm_fm_params { | ||
| 82 | unsigned char am_depth; /* amplitude modulation depth (1=hi) */ | ||
| 83 | unsigned char vib_depth; /* vibrato depth (1=hi) */ | ||
| 84 | unsigned char kbd_split; /* keyboard split */ | ||
| 85 | unsigned char rhythm; /* percussion mode select */ | ||
| 86 | |||
| 87 | /* This block is the percussion instrument data */ | ||
| 88 | unsigned char bass; | ||
| 89 | unsigned char snare; | ||
| 90 | unsigned char tomtom; | ||
| 91 | unsigned char cymbal; | ||
| 92 | unsigned char hihat; | ||
| 93 | }; | ||
| 94 | |||
| 95 | /* | ||
| 96 | * FM mode ioctl settings | ||
| 97 | */ | ||
| 98 | |||
| 99 | #define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info) | ||
| 100 | #define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21) | ||
| 101 | #define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note) | ||
| 102 | #define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice) | ||
| 103 | #define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params) | ||
| 104 | #define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int) | ||
| 105 | /* for OPL3 only */ | ||
| 106 | #define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int) | ||
| 107 | /* SBI patch management */ | ||
| 108 | #define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40) | ||
| 109 | |||
| 110 | #define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20 | ||
| 111 | #define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21 | ||
| 112 | #define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22 | ||
| 113 | #define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23 | ||
| 114 | #define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24 | ||
| 115 | #define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25 | ||
| 116 | |||
| 117 | /* | ||
| 118 | * Patch Record - fixed size for write | ||
| 119 | */ | ||
| 120 | |||
| 121 | #define FM_KEY_SBI "SBI\032" | ||
| 122 | #define FM_KEY_2OP "2OP\032" | ||
| 123 | #define FM_KEY_4OP "4OP\032" | ||
| 124 | |||
| 125 | struct sbi_patch { | ||
| 126 | unsigned char prog; | ||
| 127 | unsigned char bank; | ||
| 128 | char key[4]; | ||
| 129 | char name[25]; | ||
| 130 | char extension[7]; | ||
| 131 | unsigned char data[32]; | ||
| 132 | }; | ||
| 133 | |||
| 134 | #endif /* __SOUND_ASOUND_FM_H */ | ||
diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h new file mode 100644 index 00000000000..e3005a674a2 --- /dev/null +++ b/include/sound/cs46xx.h | |||
| @@ -0,0 +1,1745 @@ | |||
| 1 | #ifndef __SOUND_CS46XX_H | ||
| 2 | #define __SOUND_CS46XX_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Copyright (c) by Jaroslav Kysela <perex@perex.cz>, | ||
| 6 | * Cirrus Logic, Inc. | ||
| 7 | * Definitions for Cirrus Logic CS46xx chips | ||
| 8 | * | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU General Public License | ||
| 21 | * along with this program; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 23 | * | ||
| 24 | */ | ||
| 25 | |||
| 26 | #include "pcm.h" | ||
| 27 | #include "pcm-indirect.h" | ||
| 28 | #include "rawmidi.h" | ||
| 29 | #include "ac97_codec.h" | ||
| 30 | #include "cs46xx_dsp_spos.h" | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Direct registers | ||
| 34 | */ | ||
| 35 | |||
| 36 | /* | ||
| 37 | * The following define the offsets of the registers accessed via base address | ||
| 38 | * register zero on the CS46xx part. | ||
| 39 | */ | ||
| 40 | #define BA0_HISR 0x00000000 | ||
| 41 | #define BA0_HSR0 0x00000004 | ||
| 42 | #define BA0_HICR 0x00000008 | ||
| 43 | #define BA0_DMSR 0x00000100 | ||
| 44 | #define BA0_HSAR 0x00000110 | ||
| 45 | #define BA0_HDAR 0x00000114 | ||
| 46 | #define BA0_HDMR 0x00000118 | ||
| 47 | #define BA0_HDCR 0x0000011C | ||
| 48 | #define BA0_PFMC 0x00000200 | ||
| 49 | #define BA0_PFCV1 0x00000204 | ||
| 50 | #define BA0_PFCV2 0x00000208 | ||
| 51 | #define BA0_PCICFG00 0x00000300 | ||
| 52 | #define BA0_PCICFG04 0x00000304 | ||
| 53 | <|||
