~ubuntu-branches/ubuntu/vivid/oss4/vivid

« back to all changes in this revision

Viewing changes to kernel/drv/oss_sbpci/sbpci.h

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis, Samuel Thibault, Romain Beauxis, Sebastien NOEL
  • Date: 2011-06-14 10:06:56 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110614100656-cx4oc7u426zn812z
Tags: 4.2-build2004-1
[ Samuel Thibault ]
* debian/control: Add liboss4-salsa2, liboss4-salsa-dev and
  liboss4-salsa-asound2 packages, equivalent to (and will replace) those from
  the oss-libsalsa package (Closes: #589127).
* debian/patches/liboss4-salsa.patch: New patch to rename libsalsa into
  liboss4-salsa to avoid conflicts in the archive for no good reason.
* debian/rules: Make in libOSSlib and libsalsa.
* debian/liboss4-salsa-dev.install, debian/liboss4-salsa2.install,
  debian/liboss4-salsa-asound2.links, debian/liboss4-salsa-dev.links:
  Install liboss4-salsa libraries like was done in the oss-libsalsa package.
* include-alsa: Add a copy of ALSA 1.0.5 headers: Cf ALSA_1.0.* symbols in
  libsalsa, this is the roughly supported version.
* debian/copyright: Update for new include-alsa files.
* alsa.pc: New file for compatibility with libasound-dev.
* debian/control:
  - Add Vcs-Browser and Vcs-Svn fields.
  - Use linux-any instead of the list of Linux archs (Closes: #604679).
  - Make dkms dependency linux-any only.
* debian/patches/hurd_iot.patch: New patch to fix soundcard.h usage in
  libsalsa on hurd-i386.
* debian/patches/libsalsa_fixes.patch: New patch to fix some printf usages
  and ioctl declaration in libsalsa.
* debian/patches/no_EBADE.patch: New patch to cope with hurd-i386 not having
  EBADE.
* debian/patches/CFLAGS.patch: New patch to make oss4 take debian/rules
  CFLAGS into account.
* debian/patches/snd_asoundlib_version.patch: New patch to add
  snd_asoundlib_version().
* debian/patches/generic_srccconf.patch: New patch to fix source
  configuration on unknown archs.

[ Romain Beauxis ]
* Fixed README.Debian to only mention dkms' modules.
* Switch to dpkg-source 3.0 (quilt) format
* Added DM-Upload-Allowed: yes

[ Sebastien NOEL ]
* New upstream release (Closes: #595298, #619272).
* Fix typo in initscript (Closes: #627149).
* debian/control: adjust linux-headers dependencies (Closes: #628879).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Purpose: Definitions for the Creative/Ensoniq AudioPCI97 driver.
 
3
 */
 
4
/*
 
5
 *
 
6
 * This file is part of Open Sound System.
 
7
 *
 
8
 * Copyright (C) 4Front Technologies 1996-2008.
 
9
 *
 
10
 * This this source file is released under GPL v2 license (no other versions).
 
11
 * See the COPYING file included in the main directory of this source
 
12
 * distribution for the license terms and conditions.
 
13
 *
 
14
 */
 
15
 
 
16
#ifndef ES1371_H
 
17
#define ES1371_H
 
18
 
 
19
/* CONCERT PCI-SIG defines */
 
20
#define CONC_PCI_VENDID     0x1274U
 
21
#define CONC_PCI_DEVID      0x1371U
 
22
 
 
23
 
 
24
/* Concert97 direct register offset defines */
 
25
#define CONC_bDEVCTL_OFF    0x00        /* Device control/enable */
 
26
#define CONC_bMISCCTL_OFF   0x01        /* Miscellaneous control */
 
27
#define CONC_bGPIO_OFF      0x02        /* General purpose I/O control */
 
28
#define CONC_bJOYCTL_OFF    0x03        /* Joystick control (decode) */
 
29
#define CONC_dSTATUS_OFF    0x04        /* long status register */
 
30
#define CONC_bINTSTAT_OFF   0x04        /* Device interrupt status */
 
31
#define CONC_bCODECSTAT_OFF 0x05        /* CODEC interface status */
 
32
#define CONC_bINTSUMM_OFF   0x07        /* Interrupt summary status */
 
33
#define CONC_bUARTDATA_OFF  0x08        /* UART data R/W - read clears RX int */
 
34
#define CONC_bUARTCSTAT_OFF 0x09        /* UART control and status */
 
35
#define CONC_bUARTTEST_OFF  0x0a        /* UART test control reg */
 
36
#define CONC_bMEMPAGE_OFF   0x0c        /* Memory page select */
 
37
#define CONC_dSRCIO_OFF     0x10        /* I/O ctl/stat/data for SRC RAM */
 
38
#define CONC_dCODECCTL_OFF  0x14        /* CODEC control - dword read/write */
 
39
#define CONC_wNMISTAT_OFF   0x18        /* Legacy NMI status */
 
40
#define CONC_bNMIENA_OFF    0x1a        /* Legacy NMI enable */
 
41
#define CONC_bNMICTL_OFF    0x1b        /* Legacy control */
 
42
#define CONC_bSERFMT_OFF    0x20        /* Serial device control */
 
43
#define CONC_bSERCTL_OFF    0x21        /* Serial device format */
 
44
#define CONC_bSKIPC_OFF     0x22        /* DAC skip count reg */
 
45
#define CONC_wSYNIC_OFF     0x24        /* Synth int count in sample frames */
 
46
#define CONC_wSYNCIC_OFF    0x26        /* Synth current int count */
 
47
#define CONC_wDACIC_OFF     0x28        /* DAC int count in sample frames */
 
48
#define CONC_wDACCIC_OFF    0x2a        /* DAC current int count */
 
49
#define CONC_wADCIC_OFF     0x2c        /* ADC int count in sample frames */
 
50
#define CONC_wADCCIC_OFF    0x2e        /* ADC current int count */
 
51
#define CONC_MEMBASE_OFF    0x30        /* Memory window base - 16 byte window */
 
52
 
 
53
/* Concert memory page-banked register offset defines */
 
54
#define CONC_dSYNPADDR_OFF  0x30        /* Synth host frame PCI phys addr */
 
55
#define CONC_wSYNFC_OFF     0x34        /* Synth host frame count in DWORDS */
 
56
#define CONC_wSYNCFC_OFF    0x36        /* Synth host current frame count */
 
57
#define CONC_dDACPADDR_OFF  0x38        /* DAC host frame PCI phys addr */
 
58
#define CONC_wDACFC_OFF     0x3c        /* DAC host frame count in DWORDS */
 
59
#define CONC_wDACCFC_OFF    0x3e        /* DAC host current frame count */
 
60
#define CONC_dADCPADDR_OFF  0x30        /* ADC host frame PCI phys addr */
 
61
#define CONC_wADCFC_OFF     0x34        /* ADC host frame count in DWORDS */
 
62
#define CONC_wADCCFC_OFF    0x36        /* ADC host current frame count */
 
63
 
 
64
/* Concert memory page number defines */
 
65
#define CONC_SYNRAM_PAGE    0x00        /* Synth host/serial I/F RAM */
 
66
#define CONC_DACRAM_PAGE    0x04        /* DAC host/serial I/F RAM */
 
67
#define CONC_ADCRAM_PAGE    0x08        /* ADC host/serial I/F RAM */
 
68
#define CONC_SYNCTL_PAGE    0x0c        /* Page bank for synth host control */
 
69
#define CONC_DACCTL_PAGE    0x0c        /* Page bank for DAC host control */
 
70
#define CONC_ADCCTL_PAGE    0x0d        /* Page bank for ADC host control */
 
71
#define CONC_FIFO0_PAGE     0x0e        /* page 0 of UART "FIFO" (rx stash) */
 
72
#define CONC_FIFO1_PAGE     0x0f        /* page 1 of UART "FIFO" (rx stash) */
 
73
 
 
74
/* PCM format defines */
 
75
#define CONC_PCM_DAC_STEREO 0x04
 
76
#define CONC_PCM_DAC_16BIT  0x08
 
77
#define CONC_PCM_DAC_MASK   0xf3
 
78
#define CONC_PCM_ADC_STEREO 0x10
 
79
#define CONC_PCM_ADC_16BIT  0x20
 
80
#define CONC_PCM_ADC_MASK   0xcf
 
81
 
 
82
/* Device Control defines */
 
83
#define CONC_DEVCTL_PCICLK_DS    0x01   /* PCI Clock Disable */
 
84
#define CONC_DEVCTL_XTALCLK_DS   0x02   /* Crystal Clock Disable */
 
85
#define CONC_DEVCTL_JSTICK_EN    0x04   /* Joystick Enable */
 
86
#define CONC_DEVCTL_UART_EN      0x08   /* UART Enable  */
 
87
#define CONC_DEVCTL_ADC_EN       0x10   /* ADC Enable (record) */
 
88
#define CONC_DEVCTL_DAC2_EN      0x20   /* DAC2 Enable (playback) */
 
89
#define CONC_DEVCTL_DAC1_EN      0x40   /* DAC1 Enabale (synth) */
 
90
 
 
91
/* Misc Control defines */
 
92
#define CONC_MISCCTL_PDLEV_D0      0x00 /* These bits reflect the */
 
93
#define CONC_MISCCTL_PDLEV_D1      0x01 /* power down state of  */
 
94
#define CONC_MISCCTL_PDLEV_D2      0x02 /* the part */
 
95
#define CONC_MISCCTL_PDLEV_D3      0x03 /* */
 
96
#define CONC_MISCCTL_CCBINTRM_EN   0x04 /* CCB module interrupt mask */
 
97
 
 
98
#define CONC_MISCCTL_SYNC_RES      0x40 /* for AC97 warm reset */
 
99
 
 
100
/* Serial Control defines */
 
101
#define CONC_SERCTL_DAC1IE    0x01      /* playback interrupt enable P1_INT_EN */
 
102
#define CONC_SERCTL_DAC2IE    0x02      /* playback interrupt enable P2_INT_EN */
 
103
#define CONC_SERCTL_ADCIE     0x04      /* record interrupt enable   R1_INT_EN    */
 
104
#define CONC_SERCTL_DACPAUSE  0x10      /* playback pause */
 
105
#define CONC_SERCTL_R1LOOP    0x80
 
106
#define CONC_SERCTL_P2LOOP    0x40
 
107
#define CONC_SERCTL_P1LOOP    0x20
 
108
 
 
109
/* Interrupt Status defines */
 
110
#define CONC_INTSTAT_ADCINT  0x01       /* A/D interrupt pending bit */
 
111
#define CONC_INTSTAT_DAC2INT 0x02       /* DAC2 interrupt pending bit */
 
112
#define CONC_INTSTAT_DAC1INT 0x04       /* DAC1 interrupt pending bit */
 
113
#define CONC_INTSTAT_UARTINT 0x08       /* UART interrupt pending bit */
 
114
#define CONC_INTSTAT_PENDING 0x80000000 /* this bit set high while'st we have an interrupt */
 
115
/* DEVCTL register masks */
 
116
/*#define CONC_DEVCTL_D1EN    0x40 */
 
117
/*#define CONC_DEVCTL_D2EN    0x20 */
 
118
/*#define CONC_DEVCTL_ADEN    0x10 */
 
119
 
 
120
/* SERCTL register masks */
 
121
/*#define CONC_SERCTL_P1_INT_EN 0x01 */
 
122
/*#define CONC_SERCTL_P2_INT_EN 0x02 */
 
123
/*#define CONC_SERCTL_R1_INT_EN 0x04 */
 
124
 
 
125
/* JOYCTL register defines */
 
126
#define CONC_JOYCTL_200    0x00
 
127
#define CONC_JOYCTL_208    0x01
 
128
#define CONC_JOYCTL_210    0x02
 
129
#define CONC_JOYCTL_218    0x03
 
130
 
 
131
 
 
132
/* UARTCSTAT register masks  */
 
133
#define CONC_UART_RXRDY      0x01
 
134
#define CONC_UART_TXRDY      0x02
 
135
#define CONC_UART_TXINT      0x04
 
136
#define CONC_UART_RXINT      0x80
 
137
 
 
138
#define CONC_UART_CTL        0x03
 
139
#define CONC_UART_TXINTEN    0x20
 
140
#define CONC_UART_RXINTEN    0x80
 
141
 
 
142
/* Logical index for each DMA controller on chip - used for */
 
143
/* generic routines that access all DMA controllers */
 
144
#define CONC_SYNTH_DAC      0
 
145
#define CONC_WAVE_DAC       1
 
146
#define CONC_WAVE_ADC       2
 
147
 
 
148
/* defines for the CONCERT97 Sample Rate Converters */
 
149
 
 
150
/* register/base equates for the SRC RAM */
 
151
#define SRC_SYNTH_FIFO      0x00
 
152
#define SRC_DAC_FIFO        0x20
 
153
#define SRC_ADC_FIFO        0x40
 
154
#define SRC_ADC_VOL_L       0x6c
 
155
#define SRC_ADC_VOL_R       0x6d
 
156
#define SRC_SYNTH_BASE      0x70
 
157
#define SRC_DAC_BASE        0x74
 
158
#define SRC_ADC_BASE        0x78
 
159
#define SRC_SYNTH_VOL_L     0x7c
 
160
#define SRC_SYNTH_VOL_R     0x7d
 
161
#define SRC_DAC_VOL_L       0x7e
 
162
#define SRC_DAC_VOL_R       0x7f
 
163
 
 
164
#define SRC_TRUNC_N_OFF     0x00
 
165
#define SRC_INT_REGS_OFF    0x01
 
166
#define SRC_ACCUM_FRAC_OFF  0x02
 
167
#define SRC_VFREQ_FRAC_OFF  0x03
 
168
 
 
169
 
 
170
/* miscellaneous control defines */
 
171
/*#define SRC_IOPOLL_COUNT    0x1000UL */
 
172
#define SRC_IOPOLL_COUNT    0x20000UL
 
173
#define SRC_WENABLE         (1UL << 24)
 
174
#define SRC_BUSY            (1UL << 23)
 
175
#define SRC_DISABLE         (1UL << 22)
 
176
#define SRC_SYNTHFREEZE     (1UL << 21)
 
177
#define SRC_DACFREEZE       (1UL << 20)
 
178
#define SRC_ADCFREEZE       (1UL << 19)
 
179
#define SRC_CTLMASK         0x00780000UL
 
180
 
 
181
#endif /* ES1371_H */