diff options
Diffstat (limited to 'include/sound/ad1848.h')
-rw-r--r-- | include/sound/ad1848.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h index 7e33b11037f2..1a2759f3a292 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 | ||
130 | struct _snd_ad1848 { | 130 | struct 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; |
@@ -148,25 +148,28 @@ struct _snd_ad1848 { | |||
148 | int dma_size; | 148 | int dma_size; |
149 | int thinkpad_flag; /* Thinkpad CS4248 needs some extra help */ | 149 | int thinkpad_flag; /* Thinkpad CS4248 needs some extra help */ |
150 | 150 | ||
151 | #ifdef CONFIG_PM | ||
152 | void (*suspend)(struct snd_ad1848 *chip); | ||
153 | void (*resume)(struct snd_ad1848 *chip); | ||
154 | #endif | ||
155 | |||
151 | spinlock_t reg_lock; | 156 | spinlock_t reg_lock; |
152 | struct semaphore open_mutex; | 157 | struct semaphore open_mutex; |
153 | }; | 158 | }; |
154 | 159 | ||
155 | typedef struct _snd_ad1848 ad1848_t; | ||
156 | |||
157 | /* exported functions */ | 160 | /* exported functions */ |
158 | 161 | ||
159 | void snd_ad1848_out(ad1848_t *chip, unsigned char reg, unsigned char value); | 162 | void snd_ad1848_out(struct snd_ad1848 *chip, unsigned char reg, unsigned char value); |
160 | 163 | ||
161 | int snd_ad1848_create(snd_card_t * card, | 164 | int snd_ad1848_create(struct snd_card *card, |
162 | unsigned long port, | 165 | unsigned long port, |
163 | int irq, int dma, | 166 | int irq, int dma, |
164 | unsigned short hardware, | 167 | unsigned short hardware, |
165 | ad1848_t ** chip); | 168 | struct snd_ad1848 ** chip); |
166 | 169 | ||
167 | int snd_ad1848_pcm(ad1848_t * chip, int device, snd_pcm_t **rpcm); | 170 | int snd_ad1848_pcm(struct snd_ad1848 * chip, int device, struct snd_pcm **rpcm); |
168 | const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction); | 171 | const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction); |
169 | int snd_ad1848_mixer(ad1848_t * chip); | 172 | int snd_ad1848_mixer(struct snd_ad1848 * chip); |
170 | 173 | ||
171 | /* exported mixer stuffs */ | 174 | /* exported mixer stuffs */ |
172 | enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE }; | 175 | enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE }; |
@@ -176,7 +179,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) \ | 179 | #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)) | 180 | ((left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22)) |
178 | 181 | ||
179 | int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, unsigned long value); | 182 | int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value); |
180 | 183 | ||
181 | /* for ease of use */ | 184 | /* for ease of use */ |
182 | struct ad1848_mix_elem { | 185 | struct ad1848_mix_elem { |
@@ -198,7 +201,7 @@ struct ad1848_mix_elem { | |||
198 | .type = AD1848_MIX_DOUBLE, \ | 201 | .type = AD1848_MIX_DOUBLE, \ |
199 | .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) } | 202 | .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) } |
200 | 203 | ||
201 | static inline int snd_ad1848_add_ctl_elem(ad1848_t *chip, const struct ad1848_mix_elem *c) | 204 | static inline int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c) |
202 | { | 205 | { |
203 | return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value); | 206 | return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value); |
204 | } | 207 | } |