~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/sound/emu8000.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 #ifndef __SOUND_EMU8000_H
  3 #define __SOUND_EMU8000_H
  4 /*
  5  *  Defines for the emu8000 (AWE32/64)
  6  *
  7  *  Copyright (C) 1999 Steve Ratcliffe
  8  *  Copyright (C) 1999-2000 Takashi Iwai <tiwai@suse.de>
  9  */
 10 
 11 #include <sound/emux_synth.h>
 12 #include <sound/seq_kernel.h>
 13 
 14 /*
 15  * Hardware parameters.
 16  */
 17 #define EMU8000_MAX_DRAM (28 * 1024 * 1024) /* Max on-board mem is 28Mb ???*/
 18 #define EMU8000_DRAM_OFFSET 0x200000    /* Beginning of on board ram */
 19 #define EMU8000_CHANNELS   32   /* Number of hardware channels */
 20 #define EMU8000_DRAM_VOICES     30      /* number of normal voices */
 21 
 22 /* Flags to set a dma channel to read or write */
 23 #define EMU8000_RAM_READ   0
 24 #define EMU8000_RAM_WRITE  1
 25 #define EMU8000_RAM_CLOSE  2
 26 #define EMU8000_RAM_MODE_MASK   0x03
 27 #define EMU8000_RAM_RIGHT       0x10    /* use 'right' DMA channel */
 28 
 29 enum {
 30         EMU8000_CONTROL_BASS = 0,
 31         EMU8000_CONTROL_TREBLE,
 32         EMU8000_CONTROL_CHORUS_MODE,
 33         EMU8000_CONTROL_REVERB_MODE,
 34         EMU8000_CONTROL_FM_CHORUS_DEPTH,
 35         EMU8000_CONTROL_FM_REVERB_DEPTH,
 36         EMU8000_NUM_CONTROLS,
 37 };
 38 
 39 /*
 40  * Structure to hold all state information for the emu8000 driver.
 41  *
 42  * Note 1: The chip supports 32 channels in hardware this is max_channels
 43  * some of the channels may be used for other things so max_channels is
 44  * the number in use for wave voices.
 45  */
 46 struct snd_emu8000 {
 47 
 48         struct snd_emux *emu;
 49 
 50         int index;              /* sequencer client index */
 51         int seq_ports;          /* number of sequencer ports */
 52         int fm_chorus_depth;    /* FM OPL3 chorus depth */
 53         int fm_reverb_depth;    /* FM OPL3 reverb depth */
 54 
 55         int mem_size;           /* memory size */
 56         unsigned long port1;    /* Port usually base+0 */
 57         unsigned long port2;    /* Port usually at base+0x400 */
 58         unsigned long port3;    /* Port usually at base+0x800 */
 59         unsigned short last_reg;/* Last register command */
 60         spinlock_t reg_lock;
 61 
 62         int dram_checked;
 63 
 64         struct snd_card *card;          /* The card that this belongs to */
 65 
 66         int chorus_mode;
 67         int reverb_mode;
 68         int bass_level;
 69         int treble_level;
 70 
 71         struct snd_util_memhdr *memhdr;
 72 
 73         spinlock_t control_lock;
 74         struct snd_kcontrol *controls[EMU8000_NUM_CONTROLS];
 75 
 76         struct snd_pcm *pcm; /* pcm on emu8000 wavetable */
 77 
 78 };
 79 
 80 /* sequencer device id */
 81 #define SNDRV_SEQ_DEV_ID_EMU8000        "emu8000-synth"
 82 
 83 
 84 /* exported functions */
 85 int snd_emu8000_new(struct snd_card *card, int device, long port, int seq_ports,
 86                     struct snd_seq_device **ret);
 87 void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
 88                       unsigned int val);
 89 unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port,
 90                                 unsigned int reg);
 91 void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
 92                          unsigned int val);
 93 unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port,
 94                                  unsigned int reg);
 95 void snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode);
 96 
 97 void snd_emu8000_init_fm(struct snd_emu8000 *emu);
 98 
 99 void snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu);
100 void snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu);
101 void snd_emu8000_update_equalizer(struct snd_emu8000 *emu);
102 int snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
103 int snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
104 
105 #endif /* __SOUND_EMU8000_H */
106 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php