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

TOMOYO Linux Cross Reference
Linux/sound/sh/aica.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-only */
  2 /* aica.h
  3  * Header file for ALSA driver for
  4  * Sega Dreamcast Yamaha AICA sound
  5  * Copyright Adrian McMenamin
  6  * <adrian@mcmen.demon.co.uk>
  7  * 2006
  8  */
  9 
 10 /* SPU memory and register constants etc */
 11 #define G2_FIFO 0xa05f688c
 12 #define SPU_MEMORY_BASE 0xA0800000
 13 #define ARM_RESET_REGISTER 0xA0702C00
 14 #define SPU_REGISTER_BASE 0xA0700000
 15 
 16 /* AICA channels stuff */
 17 #define AICA_CONTROL_POINT 0xA0810000
 18 #define AICA_CONTROL_CHANNEL_SAMPLE_NUMBER 0xA0810008
 19 #define AICA_CHANNEL0_CONTROL_OFFSET 0x10004
 20 
 21 /* Command values */
 22 #define AICA_CMD_KICK 0x80000000
 23 #define AICA_CMD_NONE 0
 24 #define AICA_CMD_START 1
 25 #define AICA_CMD_STOP 2
 26 #define AICA_CMD_VOL 3
 27 
 28 /* Sound modes */
 29 #define SM_8BIT         1
 30 #define SM_16BIT        0
 31 #define SM_ADPCM        2
 32 
 33 /* Buffer and period size */
 34 #define AICA_BUFFER_SIZE 0x8000
 35 #define AICA_PERIOD_SIZE 0x800
 36 #define AICA_PERIOD_NUMBER 16
 37 
 38 #define AICA_CHANNEL0_OFFSET 0x11000
 39 #define AICA_CHANNEL1_OFFSET 0x21000
 40 #define CHANNEL_OFFSET 0x10000
 41 
 42 #define AICA_DMA_CHANNEL 5
 43 #define AICA_DMA_MODE 5
 44 
 45 #define SND_AICA_DRIVER "AICA"
 46 
 47 struct aica_channel {
 48         uint32_t cmd;           /* Command ID           */
 49         uint32_t pos;           /* Sample position      */
 50         uint32_t length;        /* Sample length        */
 51         uint32_t freq;          /* Frequency            */
 52         uint32_t vol;           /* Volume 0-255         */
 53         uint32_t pan;           /* Pan 0-255            */
 54         uint32_t sfmt;          /* Sound format         */
 55         uint32_t flags;         /* Bit flags            */
 56 };
 57 
 58 struct snd_card_aica {
 59         struct work_struct spu_dma_work;
 60         struct snd_card *card;
 61         struct aica_channel *channel;
 62         struct snd_pcm_substream *substream;
 63         int clicks;
 64         int current_period;
 65         struct timer_list timer;
 66         int master_volume;
 67         int dma_check;
 68 };
 69 

~ [ 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