aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/ad1848.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:29:37 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:19 -0500
commitc8ff6647bb8a1865608b2d0c8565ca0ac47fb9b7 (patch)
tree49f33f6cfed368bd3f85147cb66b0cddc5bcbf28 /include/sound/ad1848.h
parentcbdd0dd15f06a989c519089bb24023a5bfa66eaf (diff)
[ALSA] Remove xxx_t typedefs: ISA AD1848
Modules: AD1848 driver Remove xxx_t typedefs from the ISA AD1848 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/ad1848.h')
-rw-r--r--include/sound/ad1848.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index 7e33b11037f2..a03807088b10 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -127,7 +127,7 @@
127#define AD1848_THINKPAD_CTL_PORT2 0x15e9 127#define AD1848_THINKPAD_CTL_PORT2 0x15e9
128#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02 128#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02
129 129
130struct _snd_ad1848 { 130struct snd_ad1848 {
131 unsigned long port; /* i/o port */ 131 unsigned long port; /* i/o port */
132 struct resource *res_port; 132 struct resource *res_port;
133 int irq; /* IRQ line */ 133 int irq; /* IRQ line */
@@ -137,10 +137,10 @@ struct _snd_ad1848 {
137 unsigned short hardware; /* see to AD1848_HW_XXXX */ 137 unsigned short hardware; /* see to AD1848_HW_XXXX */
138 unsigned short single_dma:1; /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */ 138 unsigned short single_dma:1; /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
139 139
140 snd_pcm_t *pcm; 140 struct snd_pcm *pcm;
141 snd_pcm_substream_t *playback_substream; 141 struct snd_pcm_substream *playback_substream;
142 snd_pcm_substream_t *capture_substream; 142 struct snd_pcm_substream *capture_substream;
143 snd_card_t *card; 143 struct snd_card *card;
144 144
145 unsigned char image[32]; /* SGalaxy needs an access to extended registers */ 145 unsigned char image[32]; /* SGalaxy needs an access to extended registers */
146 int mce_bit; 146 int mce_bit;
@@ -152,21 +152,19 @@ struct _snd_ad1848 {
152 struct semaphore open_mutex; 152 struct semaphore open_mutex;
153}; 153};
154 154
155typedef struct _snd_ad1848 ad1848_t;
156
157/* exported functions */ 155/* exported functions */
158 156
159void snd_ad1848_out(ad1848_t *chip, unsigned char reg, unsigned char value); 157void snd_ad1848_out(struct snd_ad1848 *chip, unsigned char reg, unsigned char value);
160 158
161int snd_ad1848_create(snd_card_t * card, 159int snd_ad1848_create(struct snd_card *card,
162 unsigned long port, 160 unsigned long port,
163 int irq, int dma, 161 int irq, int dma,
164 unsigned short hardware, 162 unsigned short hardware,
165 ad1848_t ** chip); 163 struct snd_ad1848 ** chip);
166 164
167int snd_ad1848_pcm(ad1848_t * chip, int device, snd_pcm_t **rpcm); 165int snd_ad1848_pcm(struct snd_ad1848 * chip, int device, struct snd_pcm **rpcm);
168const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction); 166const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction);
169int snd_ad1848_mixer(ad1848_t * chip); 167int snd_ad1848_mixer(struct snd_ad1848 * chip);
170 168
171/* exported mixer stuffs */ 169/* exported mixer stuffs */
172enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE }; 170enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
@@ -176,7 +174,7 @@ enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
176#define AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) \ 174#define AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) \
177 ((left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22)) 175 ((left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22))
178 176
179int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, unsigned long value); 177int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value);
180 178
181/* for ease of use */ 179/* for ease of use */
182struct ad1848_mix_elem { 180struct ad1848_mix_elem {
@@ -198,7 +196,7 @@ struct ad1848_mix_elem {
198 .type = AD1848_MIX_DOUBLE, \ 196 .type = AD1848_MIX_DOUBLE, \
199 .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) } 197 .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) }
200 198
201static inline int snd_ad1848_add_ctl_elem(ad1848_t *chip, const struct ad1848_mix_elem *c) 199static inline int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c)
202{ 200{
203 return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value); 201 return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value);
204} 202}