Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]

Diff markup

Differences between /linux/include/sound/ad1816a.h (Version 2.6.31.13) and /linux/include/sound/ad1816a.h (Version 2.6.25)


  1 #ifndef __SOUND_AD1816A_H                           1 #ifndef __SOUND_AD1816A_H
  2 #define __SOUND_AD1816A_H                           2 #define __SOUND_AD1816A_H
  3                                                     3 
  4 /*                                                  4 /*
  5     ad1816a.h - definitions for ADI SoundPort       5     ad1816a.h - definitions for ADI SoundPort AD1816A chip.
  6     Copyright (C) 1999-2000 by Massimo Piccion      6     Copyright (C) 1999-2000 by Massimo Piccioni <dafastidio@libero.it>
  7                                                     7 
  8     This program is free software; you can red      8     This program is free software; you can redistribute it and/or modify
  9     it under the terms of the GNU General Publ      9     it under the terms of the GNU General Public License as published by
 10     the Free Software Foundation; either versi     10     the Free Software Foundation; either version 2 of the License, or
 11     (at your option) any later version.            11     (at your option) any later version.
 12                                                    12 
 13     This program is distributed in the hope th     13     This program is distributed in the hope that it will be useful,
 14     but WITHOUT ANY WARRANTY; without even the     14     but WITHOUT ANY WARRANTY; without even the implied warranty of
 15     MERCHANTABILITY or FITNESS FOR A PARTICULA     15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16     GNU General Public License for more detail     16     GNU General Public License for more details.
 17                                                    17 
 18     You should have received a copy of the GNU     18     You should have received a copy of the GNU General Public License
 19     along with this program; if not, write to      19     along with this program; if not, write to the Free Software
 20     Foundation, Inc., 59 Temple Place, Suite 3     20     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 21 */                                                 21 */
 22                                                    22 
 23 #include "control.h"                               23 #include "control.h"
 24 #include "pcm.h"                                   24 #include "pcm.h"
 25 #include "timer.h"                                 25 #include "timer.h"
 26                                                    26 
 27 #define AD1816A_REG(r)                  (chip-     27 #define AD1816A_REG(r)                  (chip->port + r)
 28                                                    28 
 29 #define AD1816A_CHIP_STATUS             0x00       29 #define AD1816A_CHIP_STATUS             0x00
 30 #define AD1816A_INDIR_ADDR              0x00       30 #define AD1816A_INDIR_ADDR              0x00
 31 #define AD1816A_INTERRUPT_STATUS        0x01       31 #define AD1816A_INTERRUPT_STATUS        0x01
 32 #define AD1816A_INDIR_DATA_LOW          0x02       32 #define AD1816A_INDIR_DATA_LOW          0x02
 33 #define AD1816A_INDIR_DATA_HIGH         0x03       33 #define AD1816A_INDIR_DATA_HIGH         0x03
 34 #define AD1816A_PIO_DEBUG               0x04       34 #define AD1816A_PIO_DEBUG               0x04
 35 #define AD1816A_PIO_STATUS              0x05       35 #define AD1816A_PIO_STATUS              0x05
 36 #define AD1816A_PIO_DATA                0x06       36 #define AD1816A_PIO_DATA                0x06
 37 #define AD1816A_RESERVED_7              0x07       37 #define AD1816A_RESERVED_7              0x07
 38 #define AD1816A_PLAYBACK_CONFIG         0x08       38 #define AD1816A_PLAYBACK_CONFIG         0x08
 39 #define AD1816A_CAPTURE_CONFIG          0x09       39 #define AD1816A_CAPTURE_CONFIG          0x09
 40 #define AD1816A_RESERVED_10             0x0a       40 #define AD1816A_RESERVED_10             0x0a
 41 #define AD1816A_RESERVED_11             0x0b       41 #define AD1816A_RESERVED_11             0x0b
 42 #define AD1816A_JOYSTICK_RAW_DATA       0x0c       42 #define AD1816A_JOYSTICK_RAW_DATA       0x0c
 43 #define AD1816A_JOYSTICK_CTRL           0x0d       43 #define AD1816A_JOYSTICK_CTRL           0x0d
 44 #define AD1816A_JOY_POS_DATA_LOW        0x0e       44 #define AD1816A_JOY_POS_DATA_LOW        0x0e
 45 #define AD1816A_JOY_POS_DATA_HIGH       0x0f       45 #define AD1816A_JOY_POS_DATA_HIGH       0x0f
 46                                                    46 
 47 #define AD1816A_LOW_BYTE_TMP            0x00       47 #define AD1816A_LOW_BYTE_TMP            0x00
 48 #define AD1816A_INTERRUPT_ENABLE        0x01       48 #define AD1816A_INTERRUPT_ENABLE        0x01
 49 #define AD1816A_EXTERNAL_CTRL           0x01       49 #define AD1816A_EXTERNAL_CTRL           0x01
 50 #define AD1816A_PLAYBACK_SAMPLE_RATE    0x02       50 #define AD1816A_PLAYBACK_SAMPLE_RATE    0x02
 51 #define AD1816A_CAPTURE_SAMPLE_RATE     0x03       51 #define AD1816A_CAPTURE_SAMPLE_RATE     0x03
 52 #define AD1816A_VOICE_ATT               0x04       52 #define AD1816A_VOICE_ATT               0x04
 53 #define AD1816A_FM_ATT                  0x05       53 #define AD1816A_FM_ATT                  0x05
 54 #define AD1816A_I2S_1_ATT               0x06       54 #define AD1816A_I2S_1_ATT               0x06
 55 #define AD1816A_I2S_0_ATT               0x07       55 #define AD1816A_I2S_0_ATT               0x07
 56 #define AD1816A_PLAYBACK_BASE_COUNT     0x08       56 #define AD1816A_PLAYBACK_BASE_COUNT     0x08
 57 #define AD1816A_PLAYBACK_CURR_COUNT     0x09       57 #define AD1816A_PLAYBACK_CURR_COUNT     0x09
 58 #define AD1816A_CAPTURE_BASE_COUNT      0x0a       58 #define AD1816A_CAPTURE_BASE_COUNT      0x0a
 59 #define AD1816A_CAPTURE_CURR_COUNT      0x0b       59 #define AD1816A_CAPTURE_CURR_COUNT      0x0b
 60 #define AD1816A_TIMER_BASE_COUNT        0x0c       60 #define AD1816A_TIMER_BASE_COUNT        0x0c
 61 #define AD1816A_TIMER_CURR_COUNT        0x0d       61 #define AD1816A_TIMER_CURR_COUNT        0x0d
 62 #define AD1816A_MASTER_ATT              0x0e       62 #define AD1816A_MASTER_ATT              0x0e
 63 #define AD1816A_CD_GAIN_ATT             0x0f       63 #define AD1816A_CD_GAIN_ATT             0x0f
 64 #define AD1816A_SYNTH_GAIN_ATT          0x10       64 #define AD1816A_SYNTH_GAIN_ATT          0x10
 65 #define AD1816A_VID_GAIN_ATT            0x11       65 #define AD1816A_VID_GAIN_ATT            0x11
 66 #define AD1816A_LINE_GAIN_ATT           0x12       66 #define AD1816A_LINE_GAIN_ATT           0x12
 67 #define AD1816A_MIC_GAIN_ATT            0x13       67 #define AD1816A_MIC_GAIN_ATT            0x13
 68 #define AD1816A_PHONE_IN_GAIN_ATT       0x13       68 #define AD1816A_PHONE_IN_GAIN_ATT       0x13
 69 #define AD1816A_ADC_SOURCE_SEL          0x14       69 #define AD1816A_ADC_SOURCE_SEL          0x14
 70 #define AD1816A_ADC_PGA                 0x14       70 #define AD1816A_ADC_PGA                 0x14
 71 #define AD1816A_CHIP_CONFIG             0x20       71 #define AD1816A_CHIP_CONFIG             0x20
 72 #define AD1816A_DSP_CONFIG              0x21       72 #define AD1816A_DSP_CONFIG              0x21
 73 #define AD1816A_FM_SAMPLE_RATE          0x22       73 #define AD1816A_FM_SAMPLE_RATE          0x22
 74 #define AD1816A_I2S_1_SAMPLE_RATE       0x23       74 #define AD1816A_I2S_1_SAMPLE_RATE       0x23
 75 #define AD1816A_I2S_0_SAMPLE_RATE       0x24       75 #define AD1816A_I2S_0_SAMPLE_RATE       0x24
 76 #define AD1816A_RESERVED_37             0x25       76 #define AD1816A_RESERVED_37             0x25
 77 #define AD1816A_PROGRAM_CLOCK_RATE      0x26       77 #define AD1816A_PROGRAM_CLOCK_RATE      0x26
 78 #define AD1816A_3D_PHAT_CTRL            0x27       78 #define AD1816A_3D_PHAT_CTRL            0x27
 79 #define AD1816A_PHONE_OUT_ATT           0x27       79 #define AD1816A_PHONE_OUT_ATT           0x27
 80 #define AD1816A_RESERVED_40             0x28       80 #define AD1816A_RESERVED_40             0x28
 81 #define AD1816A_HW_VOL_BUT              0x29       81 #define AD1816A_HW_VOL_BUT              0x29
 82 #define AD1816A_DSP_MAILBOX_0           0x2a       82 #define AD1816A_DSP_MAILBOX_0           0x2a
 83 #define AD1816A_DSP_MAILBOX_1           0x2b       83 #define AD1816A_DSP_MAILBOX_1           0x2b
 84 #define AD1816A_POWERDOWN_CTRL          0x2c       84 #define AD1816A_POWERDOWN_CTRL          0x2c
 85 #define AD1816A_TIMER_CTRL              0x2c       85 #define AD1816A_TIMER_CTRL              0x2c
 86 #define AD1816A_VERSION_ID              0x2d       86 #define AD1816A_VERSION_ID              0x2d
 87 #define AD1816A_RESERVED_46             0x2e       87 #define AD1816A_RESERVED_46             0x2e
 88                                                    88 
 89 #define AD1816A_READY                   0x80       89 #define AD1816A_READY                   0x80
 90                                                    90 
 91 #define AD1816A_PLAYBACK_IRQ_PENDING    0x80       91 #define AD1816A_PLAYBACK_IRQ_PENDING    0x80
 92 #define AD1816A_CAPTURE_IRQ_PENDING     0x40       92 #define AD1816A_CAPTURE_IRQ_PENDING     0x40
 93 #define AD1816A_TIMER_IRQ_PENDING       0x20       93 #define AD1816A_TIMER_IRQ_PENDING       0x20
 94                                                    94 
 95 #define AD1816A_PLAYBACK_ENABLE         0x01       95 #define AD1816A_PLAYBACK_ENABLE         0x01
 96 #define AD1816A_PLAYBACK_PIO            0x02       96 #define AD1816A_PLAYBACK_PIO            0x02
 97 #define AD1816A_CAPTURE_ENABLE          0x01       97 #define AD1816A_CAPTURE_ENABLE          0x01
 98 #define AD1816A_CAPTURE_PIO             0x02       98 #define AD1816A_CAPTURE_PIO             0x02
 99                                                    99 
100 #define AD1816A_FMT_LINEAR_8            0x00      100 #define AD1816A_FMT_LINEAR_8            0x00
101 #define AD1816A_FMT_ULAW_8              0x08      101 #define AD1816A_FMT_ULAW_8              0x08
102 #define AD1816A_FMT_LINEAR_16_LIT       0x10      102 #define AD1816A_FMT_LINEAR_16_LIT       0x10
103 #define AD1816A_FMT_ALAW_8              0x18      103 #define AD1816A_FMT_ALAW_8              0x18
104 #define AD1816A_FMT_LINEAR_16_BIG       0x30      104 #define AD1816A_FMT_LINEAR_16_BIG       0x30
105 #define AD1816A_FMT_ALL                 0x38      105 #define AD1816A_FMT_ALL                 0x38
106 #define AD1816A_FMT_STEREO              0x04      106 #define AD1816A_FMT_STEREO              0x04
107                                                   107 
108 #define AD1816A_PLAYBACK_IRQ_ENABLE     0x8000    108 #define AD1816A_PLAYBACK_IRQ_ENABLE     0x8000
109 #define AD1816A_CAPTURE_IRQ_ENABLE      0x4000    109 #define AD1816A_CAPTURE_IRQ_ENABLE      0x4000
110 #define AD1816A_TIMER_IRQ_ENABLE        0x2000    110 #define AD1816A_TIMER_IRQ_ENABLE        0x2000
111 #define AD1816A_TIMER_ENABLE            0x0080    111 #define AD1816A_TIMER_ENABLE            0x0080
112                                                   112 
113 #define AD1816A_SRC_LINE                0x00      113 #define AD1816A_SRC_LINE                0x00
114 #define AD1816A_SRC_OUT                 0x10      114 #define AD1816A_SRC_OUT                 0x10
115 #define AD1816A_SRC_CD                  0x20      115 #define AD1816A_SRC_CD                  0x20
116 #define AD1816A_SRC_SYNTH               0x30      116 #define AD1816A_SRC_SYNTH               0x30
117 #define AD1816A_SRC_VIDEO               0x40      117 #define AD1816A_SRC_VIDEO               0x40
118 #define AD1816A_SRC_MIC                 0x50      118 #define AD1816A_SRC_MIC                 0x50
119 #define AD1816A_SRC_MONO                0x50      119 #define AD1816A_SRC_MONO                0x50
120 #define AD1816A_SRC_PHONE_IN            0x60      120 #define AD1816A_SRC_PHONE_IN            0x60
121 #define AD1816A_SRC_MASK                0x70      121 #define AD1816A_SRC_MASK                0x70
122                                                   122 
123 #define AD1816A_CAPTURE_NOT_EQUAL       0x1000    123 #define AD1816A_CAPTURE_NOT_EQUAL       0x1000
124 #define AD1816A_WSS_ENABLE              0x8000    124 #define AD1816A_WSS_ENABLE              0x8000
125                                                   125 
126 struct snd_ad1816a {                              126 struct snd_ad1816a {
127         unsigned long port;                       127         unsigned long port;
128         struct resource *res_port;                128         struct resource *res_port;
129         int irq;                                  129         int irq;
130         int dma1;                                 130         int dma1;
131         int dma2;                                 131         int dma2;
132                                                   132 
133         unsigned short hardware;                  133         unsigned short hardware;
134         unsigned short version;                   134         unsigned short version;
135                                                   135 
136         spinlock_t lock;                          136         spinlock_t lock;
137                                                   137 
138         unsigned short mode;                      138         unsigned short mode;
139         unsigned int clock_freq;                  139         unsigned int clock_freq;
140                                                   140 
141         struct snd_card *card;                    141         struct snd_card *card;
142         struct snd_pcm *pcm;                      142         struct snd_pcm *pcm;
143                                                   143 
144         struct snd_pcm_substream *playback_sub    144         struct snd_pcm_substream *playback_substream;
145         struct snd_pcm_substream *capture_subs    145         struct snd_pcm_substream *capture_substream;
146         unsigned int p_dma_size;                  146         unsigned int p_dma_size;
147         unsigned int c_dma_size;                  147         unsigned int c_dma_size;
148                                                   148 
149         struct snd_timer *timer;                  149         struct snd_timer *timer;
150 };                                                150 };
151                                                   151 
152                                                   152 
153 #define AD1816A_HW_AUTO         0                 153 #define AD1816A_HW_AUTO         0
154 #define AD1816A_HW_AD1816A      1                 154 #define AD1816A_HW_AD1816A      1
155 #define AD1816A_HW_AD1815       2                 155 #define AD1816A_HW_AD1815       2
156 #define AD1816A_HW_AD18MAX10    3                 156 #define AD1816A_HW_AD18MAX10    3
157                                                   157 
158 #define AD1816A_MODE_PLAYBACK   0x01              158 #define AD1816A_MODE_PLAYBACK   0x01
159 #define AD1816A_MODE_CAPTURE    0x02              159 #define AD1816A_MODE_CAPTURE    0x02
160 #define AD1816A_MODE_TIMER      0x04              160 #define AD1816A_MODE_TIMER      0x04
161 #define AD1816A_MODE_OPEN       (AD1816A_MODE_    161 #define AD1816A_MODE_OPEN       (AD1816A_MODE_PLAYBACK |        \
162                                 AD1816A_MODE_C    162                                 AD1816A_MODE_CAPTURE |          \
163                                 AD1816A_MODE_T    163                                 AD1816A_MODE_TIMER)
164                                                   164 
165                                                   165 
166 extern int snd_ad1816a_create(struct snd_card     166 extern int snd_ad1816a_create(struct snd_card *card, unsigned long port,
167                               int irq, int dma    167                               int irq, int dma1, int dma2,
168                               struct snd_ad181    168                               struct snd_ad1816a **chip);
169                                                   169 
170 extern int snd_ad1816a_pcm(struct snd_ad1816a     170 extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm);
171 extern int snd_ad1816a_mixer(struct snd_ad1816    171 extern int snd_ad1816a_mixer(struct snd_ad1816a *chip);
172 extern int snd_ad1816a_timer(struct snd_ad1816 << 
173                              struct snd_timer  << 
174                                                   172 
175 #endif  /* __SOUND_AD1816A_H */                   173 #endif  /* __SOUND_AD1816A_H */
176                                                   174 
  This page was automatically generated by the LXR engine.