aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/vx_core.h123
-rw-r--r--sound/drivers/vx/vx_core.c58
-rw-r--r--sound/drivers/vx/vx_hwdep.c24
-rw-r--r--sound/drivers/vx/vx_mixer.c162
-rw-r--r--sound/drivers/vx/vx_pcm.c200
-rw-r--r--sound/drivers/vx/vx_uer.c22
-rw-r--r--sound/pci/vx222/vx222.c16
-rw-r--r--sound/pci/vx222/vx222.h2
-rw-r--r--sound/pci/vx222/vx222_ops.c84
-rw-r--r--sound/pcmcia/vx/vxp_mixer.c26
-rw-r--r--sound/pcmcia/vx/vxp_ops.c48
-rw-r--r--sound/pcmcia/vx/vxpocket.c26
-rw-r--r--sound/pcmcia/vx/vxpocket.h8
13 files changed, 410 insertions, 389 deletions
diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h
index 43c901bf7c1f..0a85c37d1bc7 100644
--- a/include/sound/vx_core.h
+++ b/include/sound/vx_core.h
@@ -36,9 +36,6 @@
36struct firmware; 36struct firmware;
37struct device; 37struct device;
38 38
39typedef struct snd_vx_core vx_core_t;
40typedef struct vx_pipe vx_pipe_t;
41
42#define VX_DRIVER_VERSION 0x010000 /* 1.0.0 */ 39#define VX_DRIVER_VERSION 0x010000 /* 1.0.0 */
43 40
44/* 41/*
@@ -76,7 +73,7 @@ struct vx_pipe {
76 int channels; 73 int channels;
77 unsigned int differed_type; 74 unsigned int differed_type;
78 pcx_time_t pcx_time; 75 pcx_time_t pcx_time;
79 snd_pcm_substream_t *substream; 76 struct snd_pcm_substream *substream;
80 77
81 int hbuf_size; /* H-buffer size in bytes */ 78 int hbuf_size; /* H-buffer size in bytes */
82 int buffer_bytes; /* the ALSA pcm buffer size in bytes */ 79 int buffer_bytes; /* the ALSA pcm buffer size in bytes */
@@ -88,36 +85,38 @@ struct vx_pipe {
88 u64 cur_count; /* current sample position (for playback) */ 85 u64 cur_count; /* current sample position (for playback) */
89 86
90 unsigned int references; /* an output pipe may be used for monitoring and/or playback */ 87 unsigned int references; /* an output pipe may be used for monitoring and/or playback */
91 vx_pipe_t *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/ 88 struct vx_pipe *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/
92 89
93 struct tasklet_struct start_tq; 90 struct tasklet_struct start_tq;
94}; 91};
95 92
93struct vx_core;
94
96struct snd_vx_ops { 95struct snd_vx_ops {
97 /* low-level i/o */ 96 /* low-level i/o */
98 unsigned char (*in8)(vx_core_t *chip, int reg); 97 unsigned char (*in8)(struct vx_core *chip, int reg);
99 unsigned int (*in32)(vx_core_t *chip, int reg); 98 unsigned int (*in32)(struct vx_core *chip, int reg);
100 void (*out8)(vx_core_t *chip, int reg, unsigned char val); 99 void (*out8)(struct vx_core *chip, int reg, unsigned char val);
101 void (*out32)(vx_core_t *chip, int reg, unsigned int val); 100 void (*out32)(struct vx_core *chip, int reg, unsigned int val);
102 /* irq */ 101 /* irq */
103 int (*test_and_ack)(vx_core_t *chip); 102 int (*test_and_ack)(struct vx_core *chip);
104 void (*validate_irq)(vx_core_t *chip, int enable); 103 void (*validate_irq)(struct vx_core *chip, int enable);
105 /* codec */ 104 /* codec */
106 void (*write_codec)(vx_core_t *chip, int codec, unsigned int data); 105 void (*write_codec)(struct vx_core *chip, int codec, unsigned int data);
107 void (*akm_write)(vx_core_t *chip, int reg, unsigned int data); 106 void (*akm_write)(struct vx_core *chip, int reg, unsigned int data);
108 void (*reset_codec)(vx_core_t *chip); 107 void (*reset_codec)(struct vx_core *chip);
109 void (*change_audio_source)(vx_core_t *chip, int src); 108 void (*change_audio_source)(struct vx_core *chip, int src);
110 void (*set_clock_source)(vx_core_t *chp, int src); 109 void (*set_clock_source)(struct vx_core *chp, int src);
111 /* chip init */ 110 /* chip init */
112 int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw); 111 int (*load_dsp)(struct vx_core *chip, int idx, const struct firmware *fw);
113 void (*reset_dsp)(vx_core_t *chip); 112 void (*reset_dsp)(struct vx_core *chip);
114 void (*reset_board)(vx_core_t *chip, int cold_reset); 113 void (*reset_board)(struct vx_core *chip, int cold_reset);
115 int (*add_controls)(vx_core_t *chip); 114 int (*add_controls)(struct vx_core *chip);
116 /* pcm */ 115 /* pcm */
117 void (*dma_write)(vx_core_t *chip, snd_pcm_runtime_t *runtime, 116 void (*dma_write)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
118 vx_pipe_t *pipe, int count); 117 struct vx_pipe *pipe, int count);
119 void (*dma_read)(vx_core_t *chip, snd_pcm_runtime_t *runtime, 118 void (*dma_read)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
120 vx_pipe_t *pipe, int count); 119 struct vx_pipe *pipe, int count);
121}; 120};
122 121
123struct snd_vx_hardware { 122struct snd_vx_hardware {
@@ -158,10 +157,10 @@ enum {
158/* min/max values for analog output for old codecs */ 157/* min/max values for analog output for old codecs */
159#define VX_ANALOG_OUT_LEVEL_MAX 0xe3 158#define VX_ANALOG_OUT_LEVEL_MAX 0xe3
160 159
161struct snd_vx_core { 160struct vx_core {
162 /* ALSA stuff */ 161 /* ALSA stuff */
163 snd_card_t *card; 162 struct snd_card *card;
164 snd_pcm_t *pcm[VX_MAX_CODECS]; 163 struct snd_pcm *pcm[VX_MAX_CODECS];
165 int type; /* VX_TYPE_XXX */ 164 int type; /* VX_TYPE_XXX */
166 165
167 int irq; 166 int irq;
@@ -179,7 +178,7 @@ struct snd_vx_core {
179 unsigned int pcm_running; 178 unsigned int pcm_running;
180 179
181 struct device *dev; 180 struct device *dev;
182 snd_hwdep_t *hwdep; 181 struct snd_hwdep *hwdep;
183 182
184 struct vx_rmh irq_rmh; /* RMH used in interrupts */ 183 struct vx_rmh irq_rmh; /* RMH used in interrupts */
185 184
@@ -216,14 +215,14 @@ struct snd_vx_core {
216/* 215/*
217 * constructor 216 * constructor
218 */ 217 */
219vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw, 218struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
220 struct snd_vx_ops *ops, int extra_size); 219 struct snd_vx_ops *ops, int extra_size);
221int snd_vx_setup_firmware(vx_core_t *chip); 220int snd_vx_setup_firmware(struct vx_core *chip);
222int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp); 221int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *dsp);
223int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp); 222int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *dsp);
224int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp); 223int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp);
225 224
226void snd_vx_free_firmware(vx_core_t *chip); 225void snd_vx_free_firmware(struct vx_core *chip);
227 226
228/* 227/*
229 * interrupt handler; exported for pcmcia 228 * interrupt handler; exported for pcmcia
@@ -233,37 +232,37 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs);
233/* 232/*
234 * lowlevel functions 233 * lowlevel functions
235 */ 234 */
236static inline int vx_test_and_ack(vx_core_t *chip) 235static inline int vx_test_and_ack(struct vx_core *chip)
237{ 236{
238 snd_assert(chip->ops->test_and_ack, return -ENXIO); 237 snd_assert(chip->ops->test_and_ack, return -ENXIO);
239 return chip->ops->test_and_ack(chip); 238 return chip->ops->test_and_ack(chip);
240} 239}
241 240
242static inline void vx_validate_irq(vx_core_t *chip, int enable) 241static inline void vx_validate_irq(struct vx_core *chip, int enable)
243{ 242{
244 snd_assert(chip->ops->validate_irq, return); 243 snd_assert(chip->ops->validate_irq, return);
245 chip->ops->validate_irq(chip, enable); 244 chip->ops->validate_irq(chip, enable);
246} 245}
247 246
248static inline unsigned char snd_vx_inb(vx_core_t *chip, int reg) 247static inline unsigned char snd_vx_inb(struct vx_core *chip, int reg)
249{ 248{
250 snd_assert(chip->ops->in8, return 0); 249 snd_assert(chip->ops->in8, return 0);
251 return chip->ops->in8(chip, reg); 250 return chip->ops->in8(chip, reg);
252} 251}
253 252
254static inline unsigned int snd_vx_inl(vx_core_t *chip, int reg) 253static inline unsigned int snd_vx_inl(struct vx_core *chip, int reg)
255{ 254{
256 snd_assert(chip->ops->in32, return 0); 255 snd_assert(chip->ops->in32, return 0);
257 return chip->ops->in32(chip, reg); 256 return chip->ops->in32(chip, reg);
258} 257}
259 258
260static inline void snd_vx_outb(vx_core_t *chip, int reg, unsigned char val) 259static inline void snd_vx_outb(struct vx_core *chip, int reg, unsigned char val)
261{ 260{
262 snd_assert(chip->ops->out8, return); 261 snd_assert(chip->ops->out8, return);
263 chip->ops->out8(chip, reg, val); 262 chip->ops->out8(chip, reg, val);
264} 263}
265 264
266static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val) 265static inline void snd_vx_outl(struct vx_core *chip, int reg, unsigned int val)
267{ 266{
268 snd_assert(chip->ops->out32, return); 267 snd_assert(chip->ops->out32, return);
269 chip->ops->out32(chip, reg, val); 268 chip->ops->out32(chip, reg, val);
@@ -274,25 +273,25 @@ static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
274#define vx_inl(chip,reg) snd_vx_inl(chip, VX_##reg) 273#define vx_inl(chip,reg) snd_vx_inl(chip, VX_##reg)
275#define vx_outl(chip,reg,val) snd_vx_outl(chip, VX_##reg,val) 274#define vx_outl(chip,reg,val) snd_vx_outl(chip, VX_##reg,val)
276 275
277static inline void vx_reset_dsp(vx_core_t *chip) 276static inline void vx_reset_dsp(struct vx_core *chip)
278{ 277{
279 snd_assert(chip->ops->reset_dsp, return); 278 snd_assert(chip->ops->reset_dsp, return);
280 chip->ops->reset_dsp(chip); 279 chip->ops->reset_dsp(chip);
281} 280}
282 281
283int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh); 282int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh);
284int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh); 283int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh);
285int vx_send_rih(vx_core_t *chip, int cmd); 284int vx_send_rih(struct vx_core *chip, int cmd);
286int vx_send_rih_nolock(vx_core_t *chip, int cmd); 285int vx_send_rih_nolock(struct vx_core *chip, int cmd);
287 286
288void vx_reset_codec(vx_core_t *chip, int cold_reset); 287void vx_reset_codec(struct vx_core *chip, int cold_reset);
289 288
290/* 289/*
291 * check the bit on the specified register 290 * check the bit on the specified register
292 * returns zero if a bit matches, or a negative error code. 291 * returns zero if a bit matches, or a negative error code.
293 * exported for vxpocket driver 292 * exported for vxpocket driver
294 */ 293 */
295int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time); 294int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time);
296#define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time) 295#define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time)
297#define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200) 296#define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200)
298#define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL) 297#define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL)
@@ -301,15 +300,15 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
301/* 300/*
302 * pseudo-DMA transfer 301 * pseudo-DMA transfer
303 */ 302 */
304static inline void vx_pseudo_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, 303static inline void vx_pseudo_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
305 vx_pipe_t *pipe, int count) 304 struct vx_pipe *pipe, int count)
306{ 305{
307 snd_assert(chip->ops->dma_write, return); 306 snd_assert(chip->ops->dma_write, return);
308 chip->ops->dma_write(chip, runtime, pipe, count); 307 chip->ops->dma_write(chip, runtime, pipe, count);
309} 308}
310 309
311static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, 310static inline void vx_pseudo_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
312 vx_pipe_t *pipe, int count) 311 struct vx_pipe *pipe, int count)
313{ 312{
314 snd_assert(chip->ops->dma_read, return); 313 snd_assert(chip->ops->dma_read, return);
315 chip->ops->dma_read(chip, runtime, pipe, count); 314 chip->ops->dma_read(chip, runtime, pipe, count);
@@ -327,24 +326,24 @@ static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtim
327/* 326/*
328 * pcm stuff 327 * pcm stuff
329 */ 328 */
330int snd_vx_pcm_new(vx_core_t *chip); 329int snd_vx_pcm_new(struct vx_core *chip);
331void vx_pcm_update_intr(vx_core_t *chip, unsigned int events); 330void vx_pcm_update_intr(struct vx_core *chip, unsigned int events);
332 331
333/* 332/*
334 * mixer stuff 333 * mixer stuff
335 */ 334 */
336int snd_vx_mixer_new(vx_core_t *chip); 335int snd_vx_mixer_new(struct vx_core *chip);
337void vx_toggle_dac_mute(vx_core_t *chip, int mute); 336void vx_toggle_dac_mute(struct vx_core *chip, int mute);
338int vx_sync_audio_source(vx_core_t *chip); 337int vx_sync_audio_source(struct vx_core *chip);
339int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active); 338int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active);
340 339
341/* 340/*
342 * IEC958 & clock stuff 341 * IEC958 & clock stuff
343 */ 342 */
344void vx_set_iec958_status(vx_core_t *chip, unsigned int bits); 343void vx_set_iec958_status(struct vx_core *chip, unsigned int bits);
345int vx_set_clock(vx_core_t *chip, unsigned int freq); 344int vx_set_clock(struct vx_core *chip, unsigned int freq);
346void vx_set_internal_clock(vx_core_t *chip, unsigned int freq); 345void vx_set_internal_clock(struct vx_core *chip, unsigned int freq);
347int vx_change_frequency(vx_core_t *chip); 346int vx_change_frequency(struct vx_core *chip);
348 347
349 348
350/* 349/*
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index e6e4cf997419..5abf42351772 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -49,7 +49,7 @@ MODULE_LICENSE("GPL");
49 * 49 *
50 * returns zero if a bit matches, or a negative error code. 50 * returns zero if a bit matches, or a negative error code.
51 */ 51 */
52int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time) 52int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time)
53{ 53{
54 unsigned long end_time = jiffies + (time * HZ + 999) / 1000; 54 unsigned long end_time = jiffies + (time * HZ + 999) / 1000;
55#ifdef CONFIG_SND_DEBUG 55#ifdef CONFIG_SND_DEBUG
@@ -78,7 +78,7 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time)
78 * returns 0 if successful, or a negative error code. 78 * returns 0 if successful, or a negative error code.
79 * 79 *
80 */ 80 */
81static int vx_send_irq_dsp(vx_core_t *chip, int num) 81static int vx_send_irq_dsp(struct vx_core *chip, int num)
82{ 82{
83 int nirq; 83 int nirq;
84 84
@@ -99,7 +99,7 @@ static int vx_send_irq_dsp(vx_core_t *chip, int num)
99 * 99 *
100 * returns 0 if successful, or a negative error code. 100 * returns 0 if successful, or a negative error code.
101 */ 101 */
102static int vx_reset_chk(vx_core_t *chip) 102static int vx_reset_chk(struct vx_core *chip)
103{ 103{
104 /* Reset irq CHK */ 104 /* Reset irq CHK */
105 if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0) 105 if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0)
@@ -118,7 +118,7 @@ static int vx_reset_chk(vx_core_t *chip)
118 * the error code can be VX-specific, retrieved via vx_get_error(). 118 * the error code can be VX-specific, retrieved via vx_get_error().
119 * NB: call with spinlock held! 119 * NB: call with spinlock held!
120 */ 120 */
121static int vx_transfer_end(vx_core_t *chip, int cmd) 121static int vx_transfer_end(struct vx_core *chip, int cmd)
122{ 122{
123 int err; 123 int err;
124 124
@@ -156,7 +156,7 @@ static int vx_transfer_end(vx_core_t *chip, int cmd)
156 * the error code can be VX-specific, retrieved via vx_get_error(). 156 * the error code can be VX-specific, retrieved via vx_get_error().
157 * NB: call with spinlock held! 157 * NB: call with spinlock held!
158 */ 158 */
159static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh) 159static int vx_read_status(struct vx_core *chip, struct vx_rmh *rmh)
160{ 160{
161 int i, err, val, size; 161 int i, err, val, size;
162 162
@@ -236,7 +236,7 @@ static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh)
236 * 236 *
237 * this function doesn't call spinlock at all. 237 * this function doesn't call spinlock at all.
238 */ 238 */
239int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh) 239int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh)
240{ 240{
241 int i, err; 241 int i, err;
242 242
@@ -341,7 +341,7 @@ int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh)
341 * returns 0 if successful, or a negative error code. 341 * returns 0 if successful, or a negative error code.
342 * see vx_send_msg_nolock(). 342 * see vx_send_msg_nolock().
343 */ 343 */
344int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh) 344int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh)
345{ 345{
346 unsigned long flags; 346 unsigned long flags;
347 int err; 347 int err;
@@ -364,7 +364,7 @@ int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh)
364 * 364 *
365 * unlike RMH, no command is sent to DSP. 365 * unlike RMH, no command is sent to DSP.
366 */ 366 */
367int vx_send_rih_nolock(vx_core_t *chip, int cmd) 367int vx_send_rih_nolock(struct vx_core *chip, int cmd)
368{ 368{
369 int err; 369 int err;
370 370
@@ -401,7 +401,7 @@ int vx_send_rih_nolock(vx_core_t *chip, int cmd)
401 * 401 *
402 * see vx_send_rih_nolock(). 402 * see vx_send_rih_nolock().
403 */ 403 */
404int vx_send_rih(vx_core_t *chip, int cmd) 404int vx_send_rih(struct vx_core *chip, int cmd)
405{ 405{
406 unsigned long flags; 406 unsigned long flags;
407 int err; 407 int err;
@@ -418,7 +418,7 @@ int vx_send_rih(vx_core_t *chip, int cmd)
418 * snd_vx_boot_xilinx - boot up the xilinx interface 418 * snd_vx_boot_xilinx - boot up the xilinx interface
419 * @boot: the boot record to load 419 * @boot: the boot record to load
420 */ 420 */
421int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot) 421int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *boot)
422{ 422{
423 unsigned int i; 423 unsigned int i;
424 int no_fillup = vx_has_new_dsp(chip); 424 int no_fillup = vx_has_new_dsp(chip);
@@ -470,7 +470,7 @@ int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot)
470 * 470 *
471 * called from irq handler only 471 * called from irq handler only
472 */ 472 */
473static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret) 473static int vx_test_irq_src(struct vx_core *chip, unsigned int *ret)
474{ 474{
475 int err; 475 int err;
476 476
@@ -491,7 +491,7 @@ static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret)
491 */ 491 */
492static void vx_interrupt(unsigned long private_data) 492static void vx_interrupt(unsigned long private_data)
493{ 493{
494 vx_core_t *chip = (vx_core_t *) private_data; 494 struct vx_core *chip = (struct vx_core *) private_data;
495 unsigned int events; 495 unsigned int events;
496 496
497 if (chip->chip_status & VX_STAT_IS_STALE) 497 if (chip->chip_status & VX_STAT_IS_STALE)
@@ -535,7 +535,7 @@ static void vx_interrupt(unsigned long private_data)
535 */ 535 */
536irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs) 536irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs)
537{ 537{
538 vx_core_t *chip = dev; 538 struct vx_core *chip = dev;
539 539
540 if (! (chip->chip_status & VX_STAT_CHIP_INIT) || 540 if (! (chip->chip_status & VX_STAT_CHIP_INIT) ||
541 (chip->chip_status & VX_STAT_IS_STALE)) 541 (chip->chip_status & VX_STAT_IS_STALE))
@@ -548,7 +548,7 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs)
548 548
549/* 549/*
550 */ 550 */
551static void vx_reset_board(vx_core_t *chip, int cold_reset) 551static void vx_reset_board(struct vx_core *chip, int cold_reset)
552{ 552{
553 snd_assert(chip->ops->reset_board, return); 553 snd_assert(chip->ops->reset_board, return);
554 554
@@ -587,9 +587,9 @@ static void vx_reset_board(vx_core_t *chip, int cold_reset)
587 * proc interface 587 * proc interface
588 */ 588 */
589 589
590static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 590static void vx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
591{ 591{
592 vx_core_t *chip = entry->private_data; 592 struct vx_core *chip = entry->private_data;
593 static char *audio_src_vxp[] = { "Line", "Mic", "Digital" }; 593 static char *audio_src_vxp[] = { "Line", "Mic", "Digital" };
594 static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" }; 594 static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" };
595 static char *clock_mode[] = { "Auto", "Internal", "External" }; 595 static char *clock_mode[] = { "Auto", "Internal", "External" };
@@ -630,9 +630,9 @@ static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
630 chip->ibl.granularity); 630 chip->ibl.granularity);
631} 631}
632 632
633static void vx_proc_init(vx_core_t *chip) 633static void vx_proc_init(struct vx_core *chip)
634{ 634{
635 snd_info_entry_t *entry; 635 struct snd_info_entry *entry;
636 636
637 if (! snd_card_proc_new(chip->card, "vx-status", &entry)) 637 if (! snd_card_proc_new(chip->card, "vx-status", &entry))
638 snd_info_set_text_ops(entry, chip, 1024, vx_proc_read); 638 snd_info_set_text_ops(entry, chip, 1024, vx_proc_read);
@@ -642,7 +642,7 @@ static void vx_proc_init(vx_core_t *chip)
642/** 642/**
643 * snd_vx_dsp_boot - load the DSP boot 643 * snd_vx_dsp_boot - load the DSP boot
644 */ 644 */
645int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot) 645int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *boot)
646{ 646{
647 int err; 647 int err;
648 int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT); 648 int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT);
@@ -660,7 +660,7 @@ int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot)
660/** 660/**
661 * snd_vx_dsp_load - load the DSP image 661 * snd_vx_dsp_load - load the DSP image
662 */ 662 */
663int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp) 663int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp)
664{ 664{
665 unsigned int i; 665 unsigned int i;
666 int err; 666 int err;
@@ -709,9 +709,9 @@ int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp)
709/* 709/*
710 * suspend 710 * suspend
711 */ 711 */
712static int snd_vx_suspend(snd_card_t *card, pm_message_t state) 712static int snd_vx_suspend(struct snd_card *card, pm_message_t state)
713{ 713{
714 vx_core_t *chip = card->pm_private_data; 714 struct vx_core *chip = card->pm_private_data;
715 unsigned int i; 715 unsigned int i;
716 716
717 snd_assert(chip, return -EINVAL); 717 snd_assert(chip, return -EINVAL);
@@ -726,9 +726,9 @@ static int snd_vx_suspend(snd_card_t *card, pm_message_t state)
726/* 726/*
727 * resume 727 * resume
728 */ 728 */
729static int snd_vx_resume(snd_card_t *card) 729static int snd_vx_resume(struct snd_card *card)
730{ 730{
731 vx_core_t *chip = card->pm_private_data; 731 struct vx_core *chip = card->pm_private_data;
732 int i, err; 732 int i, err;
733 733
734 snd_assert(chip, return -EINVAL); 734 snd_assert(chip, return -EINVAL);
@@ -754,7 +754,7 @@ static int snd_vx_resume(snd_card_t *card)
754#endif 754#endif
755 755
756/** 756/**
757 * snd_vx_create - constructor for vx_core_t 757 * snd_vx_create - constructor for struct vx_core
758 * @hw: hardware specific record 758 * @hw: hardware specific record
759 * 759 *
760 * this function allocates the instance and prepare for the hardware 760 * this function allocates the instance and prepare for the hardware
@@ -762,11 +762,11 @@ static int snd_vx_resume(snd_card_t *card)
762 * 762 *
763 * return the instance pointer if successful, NULL in error. 763 * return the instance pointer if successful, NULL in error.
764 */ 764 */
765vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw, 765struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
766 struct snd_vx_ops *ops, 766 struct snd_vx_ops *ops,
767 int extra_size) 767 int extra_size)
768{ 768{
769 vx_core_t *chip; 769 struct vx_core *chip;
770 770
771 snd_assert(card && hw && ops, return NULL); 771 snd_assert(card && hw && ops, return NULL);
772 772
diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c
index c4993b004c42..d837783fb538 100644
--- a/sound/drivers/vx/vx_hwdep.c
+++ b/sound/drivers/vx/vx_hwdep.c
@@ -30,7 +30,7 @@
30 30
31#ifdef SND_VX_FW_LOADER 31#ifdef SND_VX_FW_LOADER
32 32
33int snd_vx_setup_firmware(vx_core_t *chip) 33int snd_vx_setup_firmware(struct vx_core *chip)
34{ 34{
35 static char *fw_files[VX_TYPE_NUMS][4] = { 35 static char *fw_files[VX_TYPE_NUMS][4] = {
36 [VX_TYPE_BOARD] = { 36 [VX_TYPE_BOARD] = {
@@ -95,7 +95,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
95} 95}
96 96
97/* exported */ 97/* exported */
98void snd_vx_free_firmware(vx_core_t *chip) 98void snd_vx_free_firmware(struct vx_core *chip)
99{ 99{
100#ifdef CONFIG_PM 100#ifdef CONFIG_PM
101 int i; 101 int i;
@@ -106,17 +106,18 @@ void snd_vx_free_firmware(vx_core_t *chip)
106 106
107#else /* old style firmware loading */ 107#else /* old style firmware loading */
108 108
109static int vx_hwdep_open(snd_hwdep_t *hw, struct file *file) 109static int vx_hwdep_open(struct snd_hwdep *hw, struct file *file)
110{ 110{
111 return 0; 111 return 0;
112} 112}
113 113
114static int vx_hwdep_release(snd_hwdep_t *hw, struct file *file) 114static int vx_hwdep_release(struct snd_hwdep *hw, struct file *file)
115{ 115{
116 return 0; 116 return 0;
117} 117}
118 118
119static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) 119static int vx_hwdep_dsp_status(struct snd_hwdep *hw,
120 struct snd_hwdep_dsp_status *info)
120{ 121{
121 static char *type_ids[VX_TYPE_NUMS] = { 122 static char *type_ids[VX_TYPE_NUMS] = {
122 [VX_TYPE_BOARD] = "vxboard", 123 [VX_TYPE_BOARD] = "vxboard",
@@ -125,7 +126,7 @@ static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
125 [VX_TYPE_VXPOCKET] = "vxpocket", 126 [VX_TYPE_VXPOCKET] = "vxpocket",
126 [VX_TYPE_VXP440] = "vxp440", 127 [VX_TYPE_VXP440] = "vxp440",
127 }; 128 };
128 vx_core_t *vx = hw->private_data; 129 struct vx_core *vx = hw->private_data;
129 130
130 snd_assert(type_ids[vx->type], return -EINVAL); 131 snd_assert(type_ids[vx->type], return -EINVAL);
131 strcpy(info->id, type_ids[vx->type]); 132 strcpy(info->id, type_ids[vx->type]);
@@ -147,9 +148,10 @@ static void free_fw(const struct firmware *fw)
147 } 148 }
148} 149}
149 150
150static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) 151static int vx_hwdep_dsp_load(struct snd_hwdep *hw,
152 struct snd_hwdep_dsp_image *dsp)
151{ 153{
152 vx_core_t *vx = hw->private_data; 154 struct vx_core *vx = hw->private_data;
153 int index, err; 155 int index, err;
154 struct firmware *fw; 156 struct firmware *fw;
155 157
@@ -216,10 +218,10 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
216 218
217 219
218/* exported */ 220/* exported */
219int snd_vx_setup_firmware(vx_core_t *chip) 221int snd_vx_setup_firmware(struct vx_core *chip)
220{ 222{
221 int err; 223 int err;
222 snd_hwdep_t *hw; 224 struct snd_hwdep *hw;
223 225
224 if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0) 226 if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0)
225 return err; 227 return err;
@@ -238,7 +240,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
238} 240}
239 241
240/* exported */ 242/* exported */
241void snd_vx_free_firmware(vx_core_t *chip) 243void snd_vx_free_firmware(struct vx_core *chip)
242{ 244{
243#ifdef CONFIG_PM 245#ifdef CONFIG_PM
244 int i; 246 int i;
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c
index 19fc68c23378..8ec2c605d2f0 100644
--- a/sound/drivers/vx/vx_mixer.c
+++ b/sound/drivers/vx/vx_mixer.c
@@ -30,7 +30,7 @@
30/* 30/*
31 * write a codec data (24bit) 31 * write a codec data (24bit)
32 */ 32 */
33static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) 33static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
34{ 34{
35 unsigned long flags; 35 unsigned long flags;
36 36
@@ -47,7 +47,7 @@ static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
47/* 47/*
48 * Data type used to access the Codec 48 * Data type used to access the Codec
49 */ 49 */
50typedef union { 50union vx_codec_data {
51 u32 l; 51 u32 l;
52#ifdef SNDRV_BIG_ENDIAN 52#ifdef SNDRV_BIG_ENDIAN
53 struct w { 53 struct w {
@@ -72,7 +72,7 @@ typedef union {
72 u8 hh; 72 u8 hh;
73 } b; 73 } b;
74#endif 74#endif
75} vx_codec_data_t; 75};
76 76
77#define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s)) 77#define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s))
78#define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r)) 78#define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r))
@@ -85,9 +85,9 @@ typedef union {
85 * @reg: register index 85 * @reg: register index
86 * @val: data value 86 * @val: data value
87 */ 87 */
88static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) 88static void vx_set_codec_reg(struct vx_core *chip, int codec, int reg, int val)
89{ 89{
90 vx_codec_data_t data; 90 union vx_codec_data data;
91 /* DAC control register */ 91 /* DAC control register */
92 SET_CDC_DATA_INIT(data); 92 SET_CDC_DATA_INIT(data);
93 SET_CDC_DATA_REG(data, reg); 93 SET_CDC_DATA_REG(data, reg);
@@ -102,7 +102,7 @@ static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val)
102 * @left: left output level, 0 = mute 102 * @left: left output level, 0 = mute
103 * @right: right output level 103 * @right: right output level
104 */ 104 */
105static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int right) 105static void vx_set_analog_output_level(struct vx_core *chip, int codec, int left, int right)
106{ 106{
107 left = chip->hw->output_level_max - left; 107 left = chip->hw->output_level_max - left;
108 right = chip->hw->output_level_max - right; 108 right = chip->hw->output_level_max - right;
@@ -126,7 +126,7 @@ static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int
126#define DAC_ATTEN_MIN 0x08 126#define DAC_ATTEN_MIN 0x08
127#define DAC_ATTEN_MAX 0x38 127#define DAC_ATTEN_MAX 0x38
128 128
129void vx_toggle_dac_mute(vx_core_t *chip, int mute) 129void vx_toggle_dac_mute(struct vx_core *chip, int mute)
130{ 130{
131 unsigned int i; 131 unsigned int i;
132 for (i = 0; i < chip->hw->num_codecs; i++) { 132 for (i = 0; i < chip->hw->num_codecs; i++) {
@@ -141,7 +141,7 @@ void vx_toggle_dac_mute(vx_core_t *chip, int mute)
141/* 141/*
142 * vx_reset_codec - reset and initialize the codecs 142 * vx_reset_codec - reset and initialize the codecs
143 */ 143 */
144void vx_reset_codec(vx_core_t *chip, int cold_reset) 144void vx_reset_codec(struct vx_core *chip, int cold_reset)
145{ 145{
146 unsigned int i; 146 unsigned int i;
147 int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65; 147 int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65;
@@ -175,7 +175,7 @@ void vx_reset_codec(vx_core_t *chip, int cold_reset)
175 * change the audio input source 175 * change the audio input source
176 * @src: the target source (VX_AUDIO_SRC_XXX) 176 * @src: the target source (VX_AUDIO_SRC_XXX)
177 */ 177 */
178static void vx_change_audio_source(vx_core_t *chip, int src) 178static void vx_change_audio_source(struct vx_core *chip, int src)
179{ 179{
180 unsigned long flags; 180 unsigned long flags;
181 181
@@ -192,7 +192,7 @@ static void vx_change_audio_source(vx_core_t *chip, int src)
192 * change the audio source if necessary and possible 192 * change the audio source if necessary and possible
193 * returns 1 if the source is actually changed. 193 * returns 1 if the source is actually changed.
194 */ 194 */
195int vx_sync_audio_source(vx_core_t *chip) 195int vx_sync_audio_source(struct vx_core *chip)
196{ 196{
197 if (chip->audio_source_target == chip->audio_source || 197 if (chip->audio_source_target == chip->audio_source ||
198 chip->pcm_running) 198 chip->pcm_running)
@@ -217,7 +217,7 @@ struct vx_audio_level {
217 short monitor_level; 217 short monitor_level;
218}; 218};
219 219
220static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, 220static int vx_adjust_audio_level(struct vx_core *chip, int audio, int capture,
221 struct vx_audio_level *info) 221 struct vx_audio_level *info)
222{ 222{
223 struct vx_rmh rmh; 223 struct vx_rmh rmh;
@@ -256,7 +256,7 @@ static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture,
256 256
257 257
258#if 0 // not used 258#if 0 // not used
259static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, 259static int vx_read_audio_level(struct vx_core *chip, int audio, int capture,
260 struct vx_audio_level *info) 260 struct vx_audio_level *info)
261{ 261{
262 int err; 262 int err;
@@ -283,7 +283,7 @@ static int vx_read_audio_level(vx_core_t *chip, int audio, int capture,
283 * set the monitoring level and mute state of the given audio 283 * set the monitoring level and mute state of the given audio
284 * no more static, because must be called from vx_pcm to demute monitoring 284 * no more static, because must be called from vx_pcm to demute monitoring
285 */ 285 */
286int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) 286int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active)
287{ 287{
288 struct vx_audio_level info; 288 struct vx_audio_level info;
289 289
@@ -301,7 +301,7 @@ int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active)
301/* 301/*
302 * set the mute status of the given audio 302 * set the mute status of the given audio
303 */ 303 */
304static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) 304static int vx_set_audio_switch(struct vx_core *chip, int audio, int active)
305{ 305{
306 struct vx_audio_level info; 306 struct vx_audio_level info;
307 307
@@ -315,7 +315,7 @@ static int vx_set_audio_switch(vx_core_t *chip, int audio, int active)
315/* 315/*
316 * set the mute status of the given audio 316 * set the mute status of the given audio
317 */ 317 */
318static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) 318static int vx_set_audio_gain(struct vx_core *chip, int audio, int capture, int level)
319{ 319{
320 struct vx_audio_level info; 320 struct vx_audio_level info;
321 321
@@ -329,7 +329,7 @@ static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level)
329/* 329/*
330 * reset all audio levels 330 * reset all audio levels
331 */ 331 */
332static void vx_reset_audio_levels(vx_core_t *chip) 332static void vx_reset_audio_levels(struct vx_core *chip)
333{ 333{
334 unsigned int i, c; 334 unsigned int i, c;
335 struct vx_audio_level info; 335 struct vx_audio_level info;
@@ -375,7 +375,7 @@ struct vx_vu_meter {
375 * @capture: 0 = playback, 1 = capture operation 375 * @capture: 0 = playback, 1 = capture operation
376 * @info: the array of vx_vu_meter records (size = 2). 376 * @info: the array of vx_vu_meter records (size = 2).
377 */ 377 */
378static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct vx_vu_meter *info) 378static int vx_get_audio_vu_meter(struct vx_core *chip, int audio, int capture, struct vx_vu_meter *info)
379{ 379{
380 struct vx_rmh rmh; 380 struct vx_rmh rmh;
381 int i, err; 381 int i, err;
@@ -413,9 +413,9 @@ static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct
413/* 413/*
414 * output level control 414 * output level control
415 */ 415 */
416static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 416static int vx_output_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
417{ 417{
418 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 418 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
419 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 419 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
420 uinfo->count = 2; 420 uinfo->count = 2;
421 uinfo->value.integer.min = 0; 421 uinfo->value.integer.min = 0;
@@ -423,9 +423,9 @@ static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *u
423 return 0; 423 return 0;
424} 424}
425 425
426static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 426static int vx_output_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
427{ 427{
428 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 428 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
429 int codec = kcontrol->id.index; 429 int codec = kcontrol->id.index;
430 down(&chip->mixer_mutex); 430 down(&chip->mixer_mutex);
431 ucontrol->value.integer.value[0] = chip->output_level[codec][0]; 431 ucontrol->value.integer.value[0] = chip->output_level[codec][0];
@@ -434,9 +434,9 @@ static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
434 return 0; 434 return 0;
435} 435}
436 436
437static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 437static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
438{ 438{
439 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 439 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
440 int codec = kcontrol->id.index; 440 int codec = kcontrol->id.index;
441 down(&chip->mixer_mutex); 441 down(&chip->mixer_mutex);
442 if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] || 442 if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] ||
@@ -453,7 +453,7 @@ static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
453 return 0; 453 return 0;
454} 454}
455 455
456static snd_kcontrol_new_t vx_control_output_level = { 456static struct snd_kcontrol_new vx_control_output_level = {
457 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 457 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
458 .name = "Master Playback Volume", 458 .name = "Master Playback Volume",
459 .info = vx_output_level_info, 459 .info = vx_output_level_info,
@@ -464,7 +464,7 @@ static snd_kcontrol_new_t vx_control_output_level = {
464/* 464/*
465 * audio source select 465 * audio source select
466 */ 466 */
467static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 467static int vx_audio_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
468{ 468{
469 static char *texts_mic[3] = { 469 static char *texts_mic[3] = {
470 "Digital", "Line", "Mic" 470 "Digital", "Line", "Mic"
@@ -472,7 +472,7 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
472 static char *texts_vx2[2] = { 472 static char *texts_vx2[2] = {
473 "Digital", "Analog" 473 "Digital", "Analog"
474 }; 474 };
475 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 475 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
476 476
477 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 477 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
478 uinfo->count = 1; 478 uinfo->count = 1;
@@ -492,16 +492,16 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
492 return 0; 492 return 0;
493} 493}
494 494
495static int vx_audio_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 495static int vx_audio_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
496{ 496{
497 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 497 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
498 ucontrol->value.enumerated.item[0] = chip->audio_source_target; 498 ucontrol->value.enumerated.item[0] = chip->audio_source_target;
499 return 0; 499 return 0;
500} 500}
501 501
502static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 502static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
503{ 503{
504 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 504 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
505 down(&chip->mixer_mutex); 505 down(&chip->mixer_mutex);
506 if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) { 506 if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) {
507 chip->audio_source_target = ucontrol->value.enumerated.item[0]; 507 chip->audio_source_target = ucontrol->value.enumerated.item[0];
@@ -513,7 +513,7 @@ static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
513 return 0; 513 return 0;
514} 514}
515 515
516static snd_kcontrol_new_t vx_control_audio_src = { 516static struct snd_kcontrol_new vx_control_audio_src = {
517 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 517 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
518 .name = "Capture Source", 518 .name = "Capture Source",
519 .info = vx_audio_src_info, 519 .info = vx_audio_src_info,
@@ -524,7 +524,7 @@ static snd_kcontrol_new_t vx_control_audio_src = {
524/* 524/*
525 * clock mode selection 525 * clock mode selection
526 */ 526 */
527static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 527static int vx_clock_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
528{ 528{
529 static char *texts[3] = { 529 static char *texts[3] = {
530 "Auto", "Internal", "External" 530 "Auto", "Internal", "External"
@@ -540,16 +540,16 @@ static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
540 return 0; 540 return 0;
541} 541}
542 542
543static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 543static int vx_clock_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
544{ 544{
545 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 545 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
546 ucontrol->value.enumerated.item[0] = chip->clock_mode; 546 ucontrol->value.enumerated.item[0] = chip->clock_mode;
547 return 0; 547 return 0;
548} 548}
549 549
550static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 550static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
551{ 551{
552 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 552 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
553 down(&chip->mixer_mutex); 553 down(&chip->mixer_mutex);
554 if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { 554 if (chip->clock_mode != ucontrol->value.enumerated.item[0]) {
555 chip->clock_mode = ucontrol->value.enumerated.item[0]; 555 chip->clock_mode = ucontrol->value.enumerated.item[0];
@@ -561,7 +561,7 @@ static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
561 return 0; 561 return 0;
562} 562}
563 563
564static snd_kcontrol_new_t vx_control_clock_mode = { 564static struct snd_kcontrol_new vx_control_clock_mode = {
565 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 565 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
566 .name = "Clock Mode", 566 .name = "Clock Mode",
567 .info = vx_clock_mode_info, 567 .info = vx_clock_mode_info,
@@ -572,7 +572,7 @@ static snd_kcontrol_new_t vx_control_clock_mode = {
572/* 572/*
573 * Audio Gain 573 * Audio Gain
574 */ 574 */
575static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 575static int vx_audio_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
576{ 576{
577 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 577 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
578 uinfo->count = 2; 578 uinfo->count = 2;
@@ -581,9 +581,9 @@ static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
581 return 0; 581 return 0;
582} 582}
583 583
584static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 584static int vx_audio_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
585{ 585{
586 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 586 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
587 int audio = kcontrol->private_value & 0xff; 587 int audio = kcontrol->private_value & 0xff;
588 int capture = (kcontrol->private_value >> 8) & 1; 588 int capture = (kcontrol->private_value >> 8) & 1;
589 589
@@ -594,9 +594,9 @@ static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
594 return 0; 594 return 0;
595} 595}
596 596
597static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 597static int vx_audio_gain_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
598{ 598{
599 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 599 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
600 int audio = kcontrol->private_value & 0xff; 600 int audio = kcontrol->private_value & 0xff;
601 int capture = (kcontrol->private_value >> 8) & 1; 601 int capture = (kcontrol->private_value >> 8) & 1;
602 602
@@ -612,9 +612,9 @@ static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
612 return 0; 612 return 0;
613} 613}
614 614
615static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 615static int vx_audio_monitor_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
616{ 616{
617 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 617 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
618 int audio = kcontrol->private_value & 0xff; 618 int audio = kcontrol->private_value & 0xff;
619 619
620 down(&chip->mixer_mutex); 620 down(&chip->mixer_mutex);
@@ -624,9 +624,9 @@ static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
624 return 0; 624 return 0;
625} 625}
626 626
627static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 627static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
628{ 628{
629 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 629 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
630 int audio = kcontrol->private_value & 0xff; 630 int audio = kcontrol->private_value & 0xff;
631 631
632 down(&chip->mixer_mutex); 632 down(&chip->mixer_mutex);
@@ -643,7 +643,7 @@ static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
643 return 0; 643 return 0;
644} 644}
645 645
646static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 646static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
647{ 647{
648 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 648 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
649 uinfo->count = 2; 649 uinfo->count = 2;
@@ -652,9 +652,9 @@ static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo
652 return 0; 652 return 0;
653} 653}
654 654
655static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 655static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
656{ 656{
657 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 657 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
658 int audio = kcontrol->private_value & 0xff; 658 int audio = kcontrol->private_value & 0xff;
659 659
660 down(&chip->mixer_mutex); 660 down(&chip->mixer_mutex);
@@ -664,9 +664,9 @@ static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
664 return 0; 664 return 0;
665} 665}
666 666
667static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 667static int vx_audio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
668{ 668{
669 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 669 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
670 int audio = kcontrol->private_value & 0xff; 670 int audio = kcontrol->private_value & 0xff;
671 671
672 down(&chip->mixer_mutex); 672 down(&chip->mixer_mutex);
@@ -681,9 +681,9 @@ static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
681 return 0; 681 return 0;
682} 682}
683 683
684static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 684static int vx_monitor_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
685{ 685{
686 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 686 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
687 int audio = kcontrol->private_value & 0xff; 687 int audio = kcontrol->private_value & 0xff;
688 688
689 down(&chip->mixer_mutex); 689 down(&chip->mixer_mutex);
@@ -693,9 +693,9 @@ static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
693 return 0; 693 return 0;
694} 694}
695 695
696static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 696static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
697{ 697{
698 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 698 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
699 int audio = kcontrol->private_value & 0xff; 699 int audio = kcontrol->private_value & 0xff;
700 700
701 down(&chip->mixer_mutex); 701 down(&chip->mixer_mutex);
@@ -712,28 +712,28 @@ static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
712 return 0; 712 return 0;
713} 713}
714 714
715static snd_kcontrol_new_t vx_control_audio_gain = { 715static struct snd_kcontrol_new vx_control_audio_gain = {
716 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 716 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
717 /* name will be filled later */ 717 /* name will be filled later */
718 .info = vx_audio_gain_info, 718 .info = vx_audio_gain_info,
719 .get = vx_audio_gain_get, 719 .get = vx_audio_gain_get,
720 .put = vx_audio_gain_put 720 .put = vx_audio_gain_put
721}; 721};
722static snd_kcontrol_new_t vx_control_output_switch = { 722static struct snd_kcontrol_new vx_control_output_switch = {
723 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 723 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
724 .name = "PCM Playback Switch", 724 .name = "PCM Playback Switch",
725 .info = vx_audio_sw_info, 725 .info = vx_audio_sw_info,
726 .get = vx_audio_sw_get, 726 .get = vx_audio_sw_get,
727 .put = vx_audio_sw_put 727 .put = vx_audio_sw_put
728}; 728};
729static snd_kcontrol_new_t vx_control_monitor_gain = { 729static struct snd_kcontrol_new vx_control_monitor_gain = {
730 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 730 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
731 .name = "Monitoring Volume", 731 .name = "Monitoring Volume",
732 .info = vx_audio_gain_info, /* shared */ 732 .info = vx_audio_gain_info, /* shared */
733 .get = vx_audio_monitor_get, 733 .get = vx_audio_monitor_get,
734 .put = vx_audio_monitor_put 734 .put = vx_audio_monitor_put
735}; 735};
736static snd_kcontrol_new_t vx_control_monitor_switch = { 736static struct snd_kcontrol_new vx_control_monitor_switch = {
737 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 737 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
738 .name = "Monitoring Switch", 738 .name = "Monitoring Switch",
739 .info = vx_audio_sw_info, /* shared */ 739 .info = vx_audio_sw_info, /* shared */
@@ -745,16 +745,16 @@ static snd_kcontrol_new_t vx_control_monitor_switch = {
745/* 745/*
746 * IEC958 status bits 746 * IEC958 status bits
747 */ 747 */
748static int vx_iec958_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 748static int vx_iec958_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
749{ 749{
750 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 750 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
751 uinfo->count = 1; 751 uinfo->count = 1;
752 return 0; 752 return 0;
753} 753}
754 754
755static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 755static int vx_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
756{ 756{
757 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 757 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
758 758
759 down(&chip->mixer_mutex); 759 down(&chip->mixer_mutex);
760 ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff; 760 ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff;
@@ -765,7 +765,7 @@ static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro
765 return 0; 765 return 0;
766} 766}
767 767
768static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 768static int vx_iec958_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
769{ 769{
770 ucontrol->value.iec958.status[0] = 0xff; 770 ucontrol->value.iec958.status[0] = 0xff;
771 ucontrol->value.iec958.status[1] = 0xff; 771 ucontrol->value.iec958.status[1] = 0xff;
@@ -774,9 +774,9 @@ static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *u
774 return 0; 774 return 0;
775} 775}
776 776
777static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 777static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
778{ 778{
779 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 779 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
780 unsigned int val; 780 unsigned int val;
781 781
782 val = (ucontrol->value.iec958.status[0] << 0) | 782 val = (ucontrol->value.iec958.status[0] << 0) |
@@ -794,7 +794,7 @@ static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro
794 return 0; 794 return 0;
795} 795}
796 796
797static snd_kcontrol_new_t vx_control_iec958_mask = { 797static struct snd_kcontrol_new vx_control_iec958_mask = {
798 .access = SNDRV_CTL_ELEM_ACCESS_READ, 798 .access = SNDRV_CTL_ELEM_ACCESS_READ,
799 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 799 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
800 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), 800 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
@@ -802,7 +802,7 @@ static snd_kcontrol_new_t vx_control_iec958_mask = {
802 .get = vx_iec958_mask_get, 802 .get = vx_iec958_mask_get,
803}; 803};
804 804
805static snd_kcontrol_new_t vx_control_iec958 = { 805static struct snd_kcontrol_new vx_control_iec958 = {
806 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 806 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
807 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 807 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
808 .info = vx_iec958_info, 808 .info = vx_iec958_info,
@@ -818,7 +818,7 @@ static snd_kcontrol_new_t vx_control_iec958 = {
818#define METER_MAX 0xff 818#define METER_MAX 0xff
819#define METER_SHIFT 16 819#define METER_SHIFT 16
820 820
821static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 821static int vx_vu_meter_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
822{ 822{
823 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 823 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
824 uinfo->count = 2; 824 uinfo->count = 2;
@@ -827,9 +827,9 @@ static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo
827 return 0; 827 return 0;
828} 828}
829 829
830static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 830static int vx_vu_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
831{ 831{
832 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 832 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
833 struct vx_vu_meter meter[2]; 833 struct vx_vu_meter meter[2];
834 int audio = kcontrol->private_value & 0xff; 834 int audio = kcontrol->private_value & 0xff;
835 int capture = (kcontrol->private_value >> 8) & 1; 835 int capture = (kcontrol->private_value >> 8) & 1;
@@ -840,9 +840,9 @@ static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
840 return 0; 840 return 0;
841} 841}
842 842
843static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 843static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
844{ 844{
845 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 845 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
846 struct vx_vu_meter meter[2]; 846 struct vx_vu_meter meter[2];
847 int audio = kcontrol->private_value & 0xff; 847 int audio = kcontrol->private_value & 0xff;
848 int capture = (kcontrol->private_value >> 8) & 1; 848 int capture = (kcontrol->private_value >> 8) & 1;
@@ -853,7 +853,7 @@ static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
853 return 0; 853 return 0;
854} 854}
855 855
856static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 856static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
857{ 857{
858 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 858 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
859 uinfo->count = 2; 859 uinfo->count = 2;
@@ -862,9 +862,9 @@ static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
862 return 0; 862 return 0;
863} 863}
864 864
865static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 865static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
866{ 866{
867 vx_core_t *chip = snd_kcontrol_chip(kcontrol); 867 struct vx_core *chip = snd_kcontrol_chip(kcontrol);
868 struct vx_vu_meter meter[2]; 868 struct vx_vu_meter meter[2];
869 int audio = kcontrol->private_value & 0xff; 869 int audio = kcontrol->private_value & 0xff;
870 870
@@ -874,7 +874,7 @@ static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
874 return 0; 874 return 0;
875} 875}
876 876
877static snd_kcontrol_new_t vx_control_vu_meter = { 877static struct snd_kcontrol_new vx_control_vu_meter = {
878 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 878 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
879 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 879 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
880 /* name will be filled later */ 880 /* name will be filled later */
@@ -882,7 +882,7 @@ static snd_kcontrol_new_t vx_control_vu_meter = {
882 .get = vx_vu_meter_get, 882 .get = vx_vu_meter_get,
883}; 883};
884 884
885static snd_kcontrol_new_t vx_control_peak_meter = { 885static struct snd_kcontrol_new vx_control_peak_meter = {
886 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 886 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
887 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 887 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
888 /* name will be filled later */ 888 /* name will be filled later */
@@ -890,7 +890,7 @@ static snd_kcontrol_new_t vx_control_peak_meter = {
890 .get = vx_peak_meter_get, 890 .get = vx_peak_meter_get,
891}; 891};
892 892
893static snd_kcontrol_new_t vx_control_saturation = { 893static struct snd_kcontrol_new vx_control_saturation = {
894 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 894 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
895 .name = "Input Saturation", 895 .name = "Input Saturation",
896 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 896 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
@@ -904,12 +904,12 @@ static snd_kcontrol_new_t vx_control_saturation = {
904 * 904 *
905 */ 905 */
906 906
907int snd_vx_mixer_new(vx_core_t *chip) 907int snd_vx_mixer_new(struct vx_core *chip)
908{ 908{
909 unsigned int i, c; 909 unsigned int i, c;
910 int err; 910 int err;
911 snd_kcontrol_new_t temp; 911 struct snd_kcontrol_new temp;
912 snd_card_t *card = chip->card; 912 struct snd_card *card = chip->card;
913 char name[32]; 913 char name[32];
914 914
915 strcpy(card->mixername, card->driver); 915 strcpy(card->mixername, card->driver);
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c
index 2b46758fe86f..464109e421d4 100644
--- a/sound/drivers/vx/vx_pcm.c
+++ b/sound/drivers/vx/vx_pcm.c
@@ -61,7 +61,8 @@
61 */ 61 */
62 62
63/* get the physical page pointer on the given offset */ 63/* get the physical page pointer on the given offset */
64static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned long offset) 64static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
65 unsigned long offset)
65{ 66{
66 void *pageptr = subs->runtime->dma_area + offset; 67 void *pageptr = subs->runtime->dma_area + offset;
67 return vmalloc_to_page(pageptr); 68 return vmalloc_to_page(pageptr);
@@ -72,9 +73,9 @@ static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned
72 * called from hw_params 73 * called from hw_params
73 * NOTE: this may be called not only once per pcm open! 74 * NOTE: this may be called not only once per pcm open!
74 */ 75 */
75static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) 76static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size)
76{ 77{
77 snd_pcm_runtime_t *runtime = subs->runtime; 78 struct snd_pcm_runtime *runtime = subs->runtime;
78 if (runtime->dma_area) { 79 if (runtime->dma_area) {
79 /* already allocated */ 80 /* already allocated */
80 if (runtime->dma_bytes >= size) 81 if (runtime->dma_bytes >= size)
@@ -94,9 +95,9 @@ static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size)
94 * called from hw_free callback 95 * called from hw_free callback
95 * NOTE: this may be called not only once per pcm open! 96 * NOTE: this may be called not only once per pcm open!
96 */ 97 */
97static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) 98static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
98{ 99{
99 snd_pcm_runtime_t *runtime = subs->runtime; 100 struct snd_pcm_runtime *runtime = subs->runtime;
100 if (runtime->dma_area) { 101 if (runtime->dma_area) {
101 vfree(runtime->dma_area); 102 vfree(runtime->dma_area);
102 runtime->dma_area = NULL; 103 runtime->dma_area = NULL;
@@ -108,7 +109,8 @@ static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs)
108/* 109/*
109 * read three pending pcm bytes via inb() 110 * read three pending pcm bytes via inb()
110 */ 111 */
111static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) 112static void vx_pcm_read_per_bytes(struct vx_core *chip, struct snd_pcm_runtime *runtime,
113 struct vx_pipe *pipe)
112{ 114{
113 int offset = pipe->hw_ptr; 115 int offset = pipe->hw_ptr;
114 unsigned char *buf = (unsigned char *)(runtime->dma_area + offset); 116 unsigned char *buf = (unsigned char *)(runtime->dma_area + offset);
@@ -135,7 +137,8 @@ static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, v
135 * @pc_time: the pointer for the PC-time to set 137 * @pc_time: the pointer for the PC-time to set
136 * @dsp_time: the pointer for RMH status time array 138 * @dsp_time: the pointer for RMH status time array
137 */ 139 */
138static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *dsp_time) 140static void vx_set_pcx_time(struct vx_core *chip, pcx_time_t *pc_time,
141 unsigned int *dsp_time)
139{ 142{
140 dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK; 143 dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK;
141 dsp_time[1] = (unsigned int)(*pc_time) & MASK_DSP_WORD; 144 dsp_time[1] = (unsigned int)(*pc_time) & MASK_DSP_WORD;
@@ -151,7 +154,8 @@ static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *
151 * 154 *
152 * returns the increase of the command length. 155 * returns the increase of the command length.
153 */ 156 */
154static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *pipe) 157static int vx_set_differed_time(struct vx_core *chip, struct vx_rmh *rmh,
158 struct vx_pipe *pipe)
155{ 159{
156 /* Update The length added to the RMH command by the timestamp */ 160 /* Update The length added to the RMH command by the timestamp */
157 if (! (pipe->differed_type & DC_DIFFERED_DELAY)) 161 if (! (pipe->differed_type & DC_DIFFERED_DELAY))
@@ -184,7 +188,8 @@ static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *
184 * @pipe: the affected pipe 188 * @pipe: the affected pipe
185 * @data: format bitmask 189 * @data: format bitmask
186 */ 190 */
187static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int data) 191static int vx_set_stream_format(struct vx_core *chip, struct vx_pipe *pipe,
192 unsigned int data)
188{ 193{
189 struct vx_rmh rmh; 194 struct vx_rmh rmh;
190 195
@@ -210,8 +215,8 @@ static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int d
210 * 215 *
211 * returns 0 if successful, or a negative error code. 216 * returns 0 if successful, or a negative error code.
212 */ 217 */
213static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe, 218static int vx_set_format(struct vx_core *chip, struct vx_pipe *pipe,
214 snd_pcm_runtime_t *runtime) 219 struct snd_pcm_runtime *runtime)
215{ 220{
216 unsigned int header = HEADER_FMT_BASE; 221 unsigned int header = HEADER_FMT_BASE;
217 222
@@ -239,7 +244,7 @@ static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe,
239/* 244/*
240 * set / query the IBL size 245 * set / query the IBL size
241 */ 246 */
242static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info) 247static int vx_set_ibl(struct vx_core *chip, struct vx_ibl_info *info)
243{ 248{
244 int err; 249 int err;
245 struct vx_rmh rmh; 250 struct vx_rmh rmh;
@@ -269,7 +274,7 @@ static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info)
269 * 274 *
270 * called from trigger callback only 275 * called from trigger callback only
271 */ 276 */
272static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state) 277static int vx_get_pipe_state(struct vx_core *chip, struct vx_pipe *pipe, int *state)
273{ 278{
274 int err; 279 int err;
275 struct vx_rmh rmh; 280 struct vx_rmh rmh;
@@ -294,7 +299,7 @@ static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state)
294 * you'll need to disconnect the host to get back to the 299 * you'll need to disconnect the host to get back to the
295 * normal mode. 300 * normal mode.
296 */ 301 */
297static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe) 302static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe)
298{ 303{
299 int result; 304 int result;
300 struct vx_rmh rmh; 305 struct vx_rmh rmh;
@@ -318,7 +323,7 @@ static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe)
318 * 323 *
319 * called from trigger callback only 324 * called from trigger callback only
320 */ 325 */
321static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe) 326static int vx_pipe_can_start(struct vx_core *chip, struct vx_pipe *pipe)
322{ 327{
323 int err; 328 int err;
324 struct vx_rmh rmh; 329 struct vx_rmh rmh;
@@ -339,7 +344,7 @@ static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe)
339 * vx_conf_pipe - tell the pipe to stand by and wait for IRQA. 344 * vx_conf_pipe - tell the pipe to stand by and wait for IRQA.
340 * @pipe: the pipe to be configured 345 * @pipe: the pipe to be configured
341 */ 346 */
342static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe) 347static int vx_conf_pipe(struct vx_core *chip, struct vx_pipe *pipe)
343{ 348{
344 struct vx_rmh rmh; 349 struct vx_rmh rmh;
345 350
@@ -353,7 +358,7 @@ static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe)
353/* 358/*
354 * vx_send_irqa - trigger IRQA 359 * vx_send_irqa - trigger IRQA
355 */ 360 */
356static int vx_send_irqa(vx_core_t *chip) 361static int vx_send_irqa(struct vx_core *chip)
357{ 362{
358 struct vx_rmh rmh; 363 struct vx_rmh rmh;
359 364
@@ -378,7 +383,7 @@ static int vx_send_irqa(vx_core_t *chip)
378 * called from trigger callback only 383 * called from trigger callback only
379 * 384 *
380 */ 385 */
381static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state) 386static int vx_toggle_pipe(struct vx_core *chip, struct vx_pipe *pipe, int state)
382{ 387{
383 int err, i, cur_state; 388 int err, i, cur_state;
384 389
@@ -431,7 +436,7 @@ static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state)
431 * 436 *
432 * called from trigger callback only 437 * called from trigger callback only
433 */ 438 */
434static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe) 439static int vx_stop_pipe(struct vx_core *chip, struct vx_pipe *pipe)
435{ 440{
436 struct vx_rmh rmh; 441 struct vx_rmh rmh;
437 vx_init_rmh(&rmh, CMD_STOP_PIPE); 442 vx_init_rmh(&rmh, CMD_STOP_PIPE);
@@ -449,12 +454,12 @@ static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe)
449 * 454 *
450 * return 0 on success, or a negative error code. 455 * return 0 on success, or a negative error code.
451 */ 456 */
452static int vx_alloc_pipe(vx_core_t *chip, int capture, 457static int vx_alloc_pipe(struct vx_core *chip, int capture,
453 int audioid, int num_audio, 458 int audioid, int num_audio,
454 vx_pipe_t **pipep) 459 struct vx_pipe **pipep)
455{ 460{
456 int err; 461 int err;
457 vx_pipe_t *pipe; 462 struct vx_pipe *pipe;
458 struct vx_rmh rmh; 463 struct vx_rmh rmh;
459 int data_mode; 464 int data_mode;
460 465
@@ -499,7 +504,7 @@ static int vx_alloc_pipe(vx_core_t *chip, int capture,
499 * vx_free_pipe - release a pipe 504 * vx_free_pipe - release a pipe
500 * @pipe: pipe to be released 505 * @pipe: pipe to be released
501 */ 506 */
502static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe) 507static int vx_free_pipe(struct vx_core *chip, struct vx_pipe *pipe)
503{ 508{
504 struct vx_rmh rmh; 509 struct vx_rmh rmh;
505 510
@@ -517,7 +522,7 @@ static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe)
517 * 522 *
518 * called from trigger callback only 523 * called from trigger callback only
519 */ 524 */
520static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe) 525static int vx_start_stream(struct vx_core *chip, struct vx_pipe *pipe)
521{ 526{
522 struct vx_rmh rmh; 527 struct vx_rmh rmh;
523 528
@@ -533,7 +538,7 @@ static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe)
533 * 538 *
534 * called from trigger callback only 539 * called from trigger callback only
535 */ 540 */
536static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe) 541static int vx_stop_stream(struct vx_core *chip, struct vx_pipe *pipe)
537{ 542{
538 struct vx_rmh rmh; 543 struct vx_rmh rmh;
539 544
@@ -547,11 +552,12 @@ static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe)
547 * playback hw information 552 * playback hw information
548 */ 553 */
549 554
550static snd_pcm_hardware_t vx_pcm_playback_hw = { 555static struct snd_pcm_hardware vx_pcm_playback_hw = {
551 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 556 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
552 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ 557 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/
553 /*SNDRV_PCM_INFO_RESUME*/), 558 /*SNDRV_PCM_INFO_RESUME*/),
554 .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, 559 .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/
560 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE),
555 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 561 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
556 .rate_min = 5000, 562 .rate_min = 5000,
557 .rate_max = 48000, 563 .rate_max = 48000,
@@ -571,11 +577,11 @@ static void vx_pcm_delayed_start(unsigned long arg);
571/* 577/*
572 * vx_pcm_playback_open - open callback for playback 578 * vx_pcm_playback_open - open callback for playback
573 */ 579 */
574static int vx_pcm_playback_open(snd_pcm_substream_t *subs) 580static int vx_pcm_playback_open(struct snd_pcm_substream *subs)
575{ 581{
576 snd_pcm_runtime_t *runtime = subs->runtime; 582 struct snd_pcm_runtime *runtime = subs->runtime;
577 vx_core_t *chip = snd_pcm_substream_chip(subs); 583 struct vx_core *chip = snd_pcm_substream_chip(subs);
578 vx_pipe_t *pipe = NULL; 584 struct vx_pipe *pipe = NULL;
579 unsigned int audio; 585 unsigned int audio;
580 int err; 586 int err;
581 587
@@ -615,10 +621,10 @@ static int vx_pcm_playback_open(snd_pcm_substream_t *subs)
615/* 621/*
616 * vx_pcm_playback_close - close callback for playback 622 * vx_pcm_playback_close - close callback for playback
617 */ 623 */
618static int vx_pcm_playback_close(snd_pcm_substream_t *subs) 624static int vx_pcm_playback_close(struct snd_pcm_substream *subs)
619{ 625{
620 vx_core_t *chip = snd_pcm_substream_chip(subs); 626 struct vx_core *chip = snd_pcm_substream_chip(subs);
621 vx_pipe_t *pipe; 627 struct vx_pipe *pipe;
622 628
623 if (! subs->runtime->private_data) 629 if (! subs->runtime->private_data)
624 return -EINVAL; 630 return -EINVAL;
@@ -641,7 +647,7 @@ static int vx_pcm_playback_close(snd_pcm_substream_t *subs)
641 * 647 *
642 * NB: call with a certain lock. 648 * NB: call with a certain lock.
643 */ 649 */
644static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe) 650static int vx_notify_end_of_buffer(struct vx_core *chip, struct vx_pipe *pipe)
645{ 651{
646 int err; 652 int err;
647 struct vx_rmh rmh; /* use a temporary rmh here */ 653 struct vx_rmh rmh; /* use a temporary rmh here */
@@ -669,7 +675,9 @@ static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe)
669 * 675 *
670 * return 0 if ok. 676 * return 0 if ok.
671 */ 677 */
672static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe, int size) 678static int vx_pcm_playback_transfer_chunk(struct vx_core *chip,
679 struct snd_pcm_runtime *runtime,
680 struct vx_pipe *pipe, int size)
673{ 681{
674 int space, err = 0; 682 int space, err = 0;
675 683
@@ -705,7 +713,9 @@ static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *ru
705 * so that the caller can check the total transferred size later 713 * so that the caller can check the total transferred size later
706 * (to call snd_pcm_period_elapsed). 714 * (to call snd_pcm_period_elapsed).
707 */ 715 */
708static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) 716static int vx_update_pipe_position(struct vx_core *chip,
717 struct snd_pcm_runtime *runtime,
718 struct vx_pipe *pipe)
709{ 719{
710 struct vx_rmh rmh; 720 struct vx_rmh rmh;
711 int err, update; 721 int err, update;
@@ -731,10 +741,12 @@ static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime,
731 * transfer the pending playback buffer data to DSP 741 * transfer the pending playback buffer data to DSP
732 * called from interrupt handler 742 * called from interrupt handler
733 */ 743 */
734static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe, int nchunks) 744static void vx_pcm_playback_transfer(struct vx_core *chip,
745 struct snd_pcm_substream *subs,
746 struct vx_pipe *pipe, int nchunks)
735{ 747{
736 int i, err; 748 int i, err;
737 snd_pcm_runtime_t *runtime = subs->runtime; 749 struct snd_pcm_runtime *runtime = subs->runtime;
738 750
739 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) 751 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))
740 return; 752 return;
@@ -749,10 +761,12 @@ static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs,
749 * update the playback position and call snd_pcm_period_elapsed() if necessary 761 * update the playback position and call snd_pcm_period_elapsed() if necessary
750 * called from interrupt handler 762 * called from interrupt handler
751 */ 763 */
752static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) 764static void vx_pcm_playback_update(struct vx_core *chip,
765 struct snd_pcm_substream *subs,
766 struct vx_pipe *pipe)
753{ 767{
754 int err; 768 int err;
755 snd_pcm_runtime_t *runtime = subs->runtime; 769 struct snd_pcm_runtime *runtime = subs->runtime;
756 770
757 if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) { 771 if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) {
758 if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0) 772 if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0)
@@ -771,9 +785,9 @@ static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, v
771 */ 785 */
772static void vx_pcm_delayed_start(unsigned long arg) 786static void vx_pcm_delayed_start(unsigned long arg)
773{ 787{
774 snd_pcm_substream_t *subs = (snd_pcm_substream_t *)arg; 788 struct snd_pcm_substream *subs = (struct snd_pcm_substream *)arg;
775 vx_core_t *chip = subs->pcm->private_data; 789 struct vx_core *chip = subs->pcm->private_data;
776 vx_pipe_t *pipe = subs->runtime->private_data; 790 struct vx_pipe *pipe = subs->runtime->private_data;
777 int err; 791 int err;
778 792
779 /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/ 793 /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/
@@ -792,10 +806,10 @@ static void vx_pcm_delayed_start(unsigned long arg)
792/* 806/*
793 * vx_pcm_playback_trigger - trigger callback for playback 807 * vx_pcm_playback_trigger - trigger callback for playback
794 */ 808 */
795static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd) 809static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
796{ 810{
797 vx_core_t *chip = snd_pcm_substream_chip(subs); 811 struct vx_core *chip = snd_pcm_substream_chip(subs);
798 vx_pipe_t *pipe = subs->runtime->private_data; 812 struct vx_pipe *pipe = subs->runtime->private_data;
799 int err; 813 int err;
800 814
801 if (chip->chip_status & VX_STAT_IS_STALE) 815 if (chip->chip_status & VX_STAT_IS_STALE)
@@ -839,18 +853,18 @@ static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd)
839/* 853/*
840 * vx_pcm_playback_pointer - pointer callback for playback 854 * vx_pcm_playback_pointer - pointer callback for playback
841 */ 855 */
842static snd_pcm_uframes_t vx_pcm_playback_pointer(snd_pcm_substream_t *subs) 856static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs)
843{ 857{
844 snd_pcm_runtime_t *runtime = subs->runtime; 858 struct snd_pcm_runtime *runtime = subs->runtime;
845 vx_pipe_t *pipe = runtime->private_data; 859 struct vx_pipe *pipe = runtime->private_data;
846 return pipe->position; 860 return pipe->position;
847} 861}
848 862
849/* 863/*
850 * vx_pcm_hw_params - hw_params callback for playback and capture 864 * vx_pcm_hw_params - hw_params callback for playback and capture
851 */ 865 */
852static int vx_pcm_hw_params(snd_pcm_substream_t *subs, 866static int vx_pcm_hw_params(struct snd_pcm_substream *subs,
853 snd_pcm_hw_params_t *hw_params) 867 struct snd_pcm_hw_params *hw_params)
854{ 868{
855 return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params)); 869 return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params));
856} 870}
@@ -858,7 +872,7 @@ static int vx_pcm_hw_params(snd_pcm_substream_t *subs,
858/* 872/*
859 * vx_pcm_hw_free - hw_free callback for playback and capture 873 * vx_pcm_hw_free - hw_free callback for playback and capture
860 */ 874 */
861static int vx_pcm_hw_free(snd_pcm_substream_t *subs) 875static int vx_pcm_hw_free(struct snd_pcm_substream *subs)
862{ 876{
863 return snd_pcm_free_vmalloc_buffer(subs); 877 return snd_pcm_free_vmalloc_buffer(subs);
864} 878}
@@ -866,11 +880,11 @@ static int vx_pcm_hw_free(snd_pcm_substream_t *subs)
866/* 880/*
867 * vx_pcm_prepare - prepare callback for playback and capture 881 * vx_pcm_prepare - prepare callback for playback and capture
868 */ 882 */
869static int vx_pcm_prepare(snd_pcm_substream_t *subs) 883static int vx_pcm_prepare(struct snd_pcm_substream *subs)
870{ 884{
871 vx_core_t *chip = snd_pcm_substream_chip(subs); 885 struct vx_core *chip = snd_pcm_substream_chip(subs);
872 snd_pcm_runtime_t *runtime = subs->runtime; 886 struct snd_pcm_runtime *runtime = subs->runtime;
873 vx_pipe_t *pipe = runtime->private_data; 887 struct vx_pipe *pipe = runtime->private_data;
874 int err, data_mode; 888 int err, data_mode;
875 // int max_size, nchunks; 889 // int max_size, nchunks;
876 890
@@ -897,7 +911,8 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs)
897 } 911 }
898 912
899 if (chip->pcm_running && chip->freq != runtime->rate) { 913 if (chip->pcm_running && chip->freq != runtime->rate) {
900 snd_printk(KERN_ERR "vx: cannot set different clock %d from the current %d\n", runtime->rate, chip->freq); 914 snd_printk(KERN_ERR "vx: cannot set different clock %d "
915 "from the current %d\n", runtime->rate, chip->freq);
901 return -EINVAL; 916 return -EINVAL;
902 } 917 }
903 vx_set_clock(chip, runtime->rate); 918 vx_set_clock(chip, runtime->rate);
@@ -930,7 +945,7 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs)
930/* 945/*
931 * operators for PCM playback 946 * operators for PCM playback
932 */ 947 */
933static snd_pcm_ops_t vx_pcm_playback_ops = { 948static struct snd_pcm_ops vx_pcm_playback_ops = {
934 .open = vx_pcm_playback_open, 949 .open = vx_pcm_playback_open,
935 .close = vx_pcm_playback_close, 950 .close = vx_pcm_playback_close,
936 .ioctl = snd_pcm_lib_ioctl, 951 .ioctl = snd_pcm_lib_ioctl,
@@ -947,11 +962,12 @@ static snd_pcm_ops_t vx_pcm_playback_ops = {
947 * playback hw information 962 * playback hw information
948 */ 963 */
949 964
950static snd_pcm_hardware_t vx_pcm_capture_hw = { 965static struct snd_pcm_hardware vx_pcm_capture_hw = {
951 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 966 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
952 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ 967 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/
953 /*SNDRV_PCM_INFO_RESUME*/), 968 /*SNDRV_PCM_INFO_RESUME*/),
954 .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, 969 .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/
970 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE),
955 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 971 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
956 .rate_min = 5000, 972 .rate_min = 5000,
957 .rate_max = 48000, 973 .rate_max = 48000,
@@ -969,12 +985,12 @@ static snd_pcm_hardware_t vx_pcm_capture_hw = {
969/* 985/*
970 * vx_pcm_capture_open - open callback for capture 986 * vx_pcm_capture_open - open callback for capture
971 */ 987 */
972static int vx_pcm_capture_open(snd_pcm_substream_t *subs) 988static int vx_pcm_capture_open(struct snd_pcm_substream *subs)
973{ 989{
974 snd_pcm_runtime_t *runtime = subs->runtime; 990 struct snd_pcm_runtime *runtime = subs->runtime;
975 vx_core_t *chip = snd_pcm_substream_chip(subs); 991 struct vx_core *chip = snd_pcm_substream_chip(subs);
976 vx_pipe_t *pipe; 992 struct vx_pipe *pipe;
977 vx_pipe_t *pipe_out_monitoring = NULL; 993 struct vx_pipe *pipe_out_monitoring = NULL;
978 unsigned int audio; 994 unsigned int audio;
979 int err; 995 int err;
980 996
@@ -1005,9 +1021,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs)
1005 if an output pipe is available, it's audios still may need to be 1021 if an output pipe is available, it's audios still may need to be
1006 unmuted. hence we'll have to call a mixer entry point. 1022 unmuted. hence we'll have to call a mixer entry point.
1007 */ 1023 */
1008 vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], chip->audio_monitor_active[audio]); 1024 vx_set_monitor_level(chip, audio, chip->audio_monitor[audio],
1025 chip->audio_monitor_active[audio]);
1009 /* assuming stereo */ 1026 /* assuming stereo */
1010 vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], chip->audio_monitor_active[audio+1]); 1027 vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1],
1028 chip->audio_monitor_active[audio+1]);
1011 } 1029 }
1012 1030
1013 pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */ 1031 pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */
@@ -1026,11 +1044,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs)
1026/* 1044/*
1027 * vx_pcm_capture_close - close callback for capture 1045 * vx_pcm_capture_close - close callback for capture
1028 */ 1046 */
1029static int vx_pcm_capture_close(snd_pcm_substream_t *subs) 1047static int vx_pcm_capture_close(struct snd_pcm_substream *subs)
1030{ 1048{
1031 vx_core_t *chip = snd_pcm_substream_chip(subs); 1049 struct vx_core *chip = snd_pcm_substream_chip(subs);
1032 vx_pipe_t *pipe; 1050 struct vx_pipe *pipe;
1033 vx_pipe_t *pipe_out_monitoring; 1051 struct vx_pipe *pipe_out_monitoring;
1034 1052
1035 if (! subs->runtime->private_data) 1053 if (! subs->runtime->private_data)
1036 return -EINVAL; 1054 return -EINVAL;
@@ -1062,10 +1080,11 @@ static int vx_pcm_capture_close(snd_pcm_substream_t *subs)
1062/* 1080/*
1063 * vx_pcm_capture_update - update the capture buffer 1081 * vx_pcm_capture_update - update the capture buffer
1064 */ 1082 */
1065static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) 1083static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs,
1084 struct vx_pipe *pipe)
1066{ 1085{
1067 int size, space, count; 1086 int size, space, count;
1068 snd_pcm_runtime_t *runtime = subs->runtime; 1087 struct snd_pcm_runtime *runtime = subs->runtime;
1069 1088
1070 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) 1089 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))
1071 return; 1090 return;
@@ -1135,17 +1154,17 @@ static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx
1135/* 1154/*
1136 * vx_pcm_capture_pointer - pointer callback for capture 1155 * vx_pcm_capture_pointer - pointer callback for capture
1137 */ 1156 */
1138static snd_pcm_uframes_t vx_pcm_capture_pointer(snd_pcm_substream_t *subs) 1157static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs)
1139{ 1158{
1140 snd_pcm_runtime_t *runtime = subs->runtime; 1159 struct snd_pcm_runtime *runtime = subs->runtime;
1141 vx_pipe_t *pipe = runtime->private_data; 1160 struct vx_pipe *pipe = runtime->private_data;
1142 return bytes_to_frames(runtime, pipe->hw_ptr); 1161 return bytes_to_frames(runtime, pipe->hw_ptr);
1143} 1162}
1144 1163
1145/* 1164/*
1146 * operators for PCM capture 1165 * operators for PCM capture
1147 */ 1166 */
1148static snd_pcm_ops_t vx_pcm_capture_ops = { 1167static struct snd_pcm_ops vx_pcm_capture_ops = {
1149 .open = vx_pcm_capture_open, 1168 .open = vx_pcm_capture_open,
1150 .close = vx_pcm_capture_close, 1169 .close = vx_pcm_capture_close,
1151 .ioctl = snd_pcm_lib_ioctl, 1170 .ioctl = snd_pcm_lib_ioctl,
@@ -1161,10 +1180,10 @@ static snd_pcm_ops_t vx_pcm_capture_ops = {
1161/* 1180/*
1162 * interrupt handler for pcm streams 1181 * interrupt handler for pcm streams
1163 */ 1182 */
1164void vx_pcm_update_intr(vx_core_t *chip, unsigned int events) 1183void vx_pcm_update_intr(struct vx_core *chip, unsigned int events)
1165{ 1184{
1166 unsigned int i; 1185 unsigned int i;
1167 vx_pipe_t *pipe; 1186 struct vx_pipe *pipe;
1168 1187
1169#define EVENT_MASK (END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING) 1188#define EVENT_MASK (END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING)
1170 1189
@@ -1218,7 +1237,7 @@ void vx_pcm_update_intr(vx_core_t *chip, unsigned int events)
1218/* 1237/*
1219 * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays 1238 * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays
1220 */ 1239 */
1221static int vx_init_audio_io(vx_core_t *chip) 1240static int vx_init_audio_io(struct vx_core *chip)
1222{ 1241{
1223 struct vx_rmh rmh; 1242 struct vx_rmh rmh;
1224 int preferred; 1243 int preferred;
@@ -1234,19 +1253,20 @@ static int vx_init_audio_io(vx_core_t *chip)
1234 chip->audio_info = rmh.Stat[1]; 1253 chip->audio_info = rmh.Stat[1];
1235 1254
1236 /* allocate pipes */ 1255 /* allocate pipes */
1237 chip->playback_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_outs, GFP_KERNEL); 1256 chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL);
1238 chip->capture_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_ins, GFP_KERNEL); 1257 chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL);
1239 if (! chip->playback_pipes || ! chip->capture_pipes) 1258 if (! chip->playback_pipes || ! chip->capture_pipes)
1240 return -ENOMEM; 1259 return -ENOMEM;
1241 1260
1242 memset(chip->playback_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_outs); 1261 memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs);
1243 memset(chip->capture_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_ins); 1262 memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins);
1244 1263
1245 preferred = chip->ibl.size; 1264 preferred = chip->ibl.size;
1246 chip->ibl.size = 0; 1265 chip->ibl.size = 0;
1247 vx_set_ibl(chip, &chip->ibl); /* query the info */ 1266 vx_set_ibl(chip, &chip->ibl); /* query the info */
1248 if (preferred > 0) { 1267 if (preferred > 0) {
1249 chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / chip->ibl.granularity) * chip->ibl.granularity; 1268 chip->ibl.size = ((preferred + chip->ibl.granularity - 1) /
1269 chip->ibl.granularity) * chip->ibl.granularity;
1250 if (chip->ibl.size > chip->ibl.max_size) 1270 if (chip->ibl.size > chip->ibl.max_size)
1251 chip->ibl.size = chip->ibl.max_size; 1271 chip->ibl.size = chip->ibl.max_size;
1252 } else 1272 } else
@@ -1260,9 +1280,9 @@ static int vx_init_audio_io(vx_core_t *chip)
1260/* 1280/*
1261 * free callback for pcm 1281 * free callback for pcm
1262 */ 1282 */
1263static void snd_vx_pcm_free(snd_pcm_t *pcm) 1283static void snd_vx_pcm_free(struct snd_pcm *pcm)
1264{ 1284{
1265 vx_core_t *chip = pcm->private_data; 1285 struct vx_core *chip = pcm->private_data;
1266 chip->pcm[pcm->device] = NULL; 1286 chip->pcm[pcm->device] = NULL;
1267 kfree(chip->playback_pipes); 1287 kfree(chip->playback_pipes);
1268 chip->playback_pipes = NULL; 1288 chip->playback_pipes = NULL;
@@ -1273,9 +1293,9 @@ static void snd_vx_pcm_free(snd_pcm_t *pcm)
1273/* 1293/*
1274 * snd_vx_pcm_new - create and initialize a pcm 1294 * snd_vx_pcm_new - create and initialize a pcm
1275 */ 1295 */
1276int snd_vx_pcm_new(vx_core_t *chip) 1296int snd_vx_pcm_new(struct vx_core *chip)
1277{ 1297{
1278 snd_pcm_t *pcm; 1298 struct snd_pcm *pcm;
1279 unsigned int i; 1299 unsigned int i;
1280 int err; 1300 int err;
1281 1301
diff --git a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c
index 4fc38bde34f4..7400306b7f28 100644
--- a/sound/drivers/vx/vx_uer.c
+++ b/sound/drivers/vx/vx_uer.c
@@ -31,7 +31,7 @@
31 * vx_modify_board_clock - tell the board that its clock has been modified 31 * vx_modify_board_clock - tell the board that its clock has been modified
32 * @sync: DSP needs to resynchronize its FIFO 32 * @sync: DSP needs to resynchronize its FIFO
33 */ 33 */
34static int vx_modify_board_clock(vx_core_t *chip, int sync) 34static int vx_modify_board_clock(struct vx_core *chip, int sync)
35{ 35{
36 struct vx_rmh rmh; 36 struct vx_rmh rmh;
37 37
@@ -45,7 +45,7 @@ static int vx_modify_board_clock(vx_core_t *chip, int sync)
45/* 45/*
46 * vx_modify_board_inputs - resync audio inputs 46 * vx_modify_board_inputs - resync audio inputs
47 */ 47 */
48static int vx_modify_board_inputs(vx_core_t *chip) 48static int vx_modify_board_inputs(struct vx_core *chip)
49{ 49{
50 struct vx_rmh rmh; 50 struct vx_rmh rmh;
51 51
@@ -59,7 +59,7 @@ static int vx_modify_board_inputs(vx_core_t *chip)
59 * @index: the bit index 59 * @index: the bit index
60 * returns 0 or 1. 60 * returns 0 or 1.
61 */ 61 */
62static int vx_read_one_cbit(vx_core_t *chip, int index) 62static int vx_read_one_cbit(struct vx_core *chip, int index)
63{ 63{
64 unsigned long flags; 64 unsigned long flags;
65 int val; 65 int val;
@@ -82,7 +82,7 @@ static int vx_read_one_cbit(vx_core_t *chip, int index)
82 * @index: the bit index 82 * @index: the bit index
83 * @val: bit value, 0 or 1 83 * @val: bit value, 0 or 1
84 */ 84 */
85static void vx_write_one_cbit(vx_core_t *chip, int index, int val) 85static void vx_write_one_cbit(struct vx_core *chip, int index, int val)
86{ 86{
87 unsigned long flags; 87 unsigned long flags;
88 val = !!val; /* 0 or 1 */ 88 val = !!val; /* 0 or 1 */
@@ -104,7 +104,7 @@ static void vx_write_one_cbit(vx_core_t *chip, int index, int val)
104 * returns the frequency of UER, or 0 if not sync, 104 * returns the frequency of UER, or 0 if not sync,
105 * or a negative error code. 105 * or a negative error code.
106 */ 106 */
107static int vx_read_uer_status(vx_core_t *chip, int *mode) 107static int vx_read_uer_status(struct vx_core *chip, int *mode)
108{ 108{
109 int val, freq; 109 int val, freq;
110 110
@@ -160,7 +160,7 @@ static int vx_read_uer_status(vx_core_t *chip, int *mode)
160 * default : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF 160 * default : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF
161 */ 161 */
162 162
163static int vx_calc_clock_from_freq(vx_core_t *chip, int freq) 163static int vx_calc_clock_from_freq(struct vx_core *chip, int freq)
164{ 164{
165 int hexfreq; 165 int hexfreq;
166 166
@@ -187,7 +187,7 @@ static int vx_calc_clock_from_freq(vx_core_t *chip, int freq)
187 * vx_change_clock_source - change the clock source 187 * vx_change_clock_source - change the clock source
188 * @source: the new source 188 * @source: the new source
189 */ 189 */
190static void vx_change_clock_source(vx_core_t *chip, int source) 190static void vx_change_clock_source(struct vx_core *chip, int source)
191{ 191{
192 unsigned long flags; 192 unsigned long flags;
193 193
@@ -205,7 +205,7 @@ static void vx_change_clock_source(vx_core_t *chip, int source)
205/* 205/*
206 * set the internal clock 206 * set the internal clock
207 */ 207 */
208void vx_set_internal_clock(vx_core_t *chip, unsigned int freq) 208void vx_set_internal_clock(struct vx_core *chip, unsigned int freq)
209{ 209{
210 int clock; 210 int clock;
211 unsigned long flags; 211 unsigned long flags;
@@ -228,7 +228,7 @@ void vx_set_internal_clock(vx_core_t *chip, unsigned int freq)
228 * set the iec958 status bits 228 * set the iec958 status bits
229 * @bits: 32-bit status bits 229 * @bits: 32-bit status bits
230 */ 230 */
231void vx_set_iec958_status(vx_core_t *chip, unsigned int bits) 231void vx_set_iec958_status(struct vx_core *chip, unsigned int bits)
232{ 232{
233 int i; 233 int i;
234 234
@@ -243,7 +243,7 @@ void vx_set_iec958_status(vx_core_t *chip, unsigned int bits)
243/* 243/*
244 * vx_set_clock - change the clock and audio source if necessary 244 * vx_set_clock - change the clock and audio source if necessary
245 */ 245 */
246int vx_set_clock(vx_core_t *chip, unsigned int freq) 246int vx_set_clock(struct vx_core *chip, unsigned int freq)
247{ 247{
248 int src_changed = 0; 248 int src_changed = 0;
249 249
@@ -285,7 +285,7 @@ int vx_set_clock(vx_core_t *chip, unsigned int freq)
285/* 285/*
286 * vx_change_frequency - called from interrupt handler 286 * vx_change_frequency - called from interrupt handler
287 */ 287 */
288int vx_change_frequency(vx_core_t *chip) 288int vx_change_frequency(struct vx_core *chip)
289{ 289{
290 int freq; 290 int freq;
291 291
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index dca6bd2c7580..4ebbabedb3c3 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -108,7 +108,7 @@ static struct snd_vx_hardware vx222_mic_hw = {
108 108
109/* 109/*
110 */ 110 */
111static int snd_vx222_free(vx_core_t *chip) 111static int snd_vx222_free(struct vx_core *chip)
112{ 112{
113 struct snd_vx222 *vx = (struct snd_vx222 *)chip; 113 struct snd_vx222 *vx = (struct snd_vx222 *)chip;
114 114
@@ -121,21 +121,21 @@ static int snd_vx222_free(vx_core_t *chip)
121 return 0; 121 return 0;
122} 122}
123 123
124static int snd_vx222_dev_free(snd_device_t *device) 124static int snd_vx222_dev_free(struct snd_device *device)
125{ 125{
126 vx_core_t *chip = device->device_data; 126 struct vx_core *chip = device->device_data;
127 return snd_vx222_free(chip); 127 return snd_vx222_free(chip);
128} 128}
129 129
130 130
131static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci, 131static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
132 struct snd_vx_hardware *hw, 132 struct snd_vx_hardware *hw,
133 struct snd_vx222 **rchip) 133 struct snd_vx222 **rchip)
134{ 134{
135 vx_core_t *chip; 135 struct vx_core *chip;
136 struct snd_vx222 *vx; 136 struct snd_vx222 *vx;
137 int i, err; 137 int i, err;
138 static snd_device_ops_t ops = { 138 static struct snd_device_ops ops = {
139 .dev_free = snd_vx222_dev_free, 139 .dev_free = snd_vx222_dev_free,
140 }; 140 };
141 struct snd_vx_ops *vx_ops; 141 struct snd_vx_ops *vx_ops;
@@ -147,7 +147,7 @@ static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci,
147 147
148 vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops; 148 vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops;
149 chip = snd_vx_create(card, hw, vx_ops, 149 chip = snd_vx_create(card, hw, vx_ops,
150 sizeof(struct snd_vx222) - sizeof(vx_core_t)); 150 sizeof(struct snd_vx222) - sizeof(struct vx_core));
151 if (! chip) { 151 if (! chip) {
152 pci_disable_device(pci); 152 pci_disable_device(pci);
153 return -ENOMEM; 153 return -ENOMEM;
@@ -186,7 +186,7 @@ static int __devinit snd_vx222_probe(struct pci_dev *pci,
186 const struct pci_device_id *pci_id) 186 const struct pci_device_id *pci_id)
187{ 187{
188 static int dev; 188 static int dev;
189 snd_card_t *card; 189 struct snd_card *card;
190 struct snd_vx_hardware *hw; 190 struct snd_vx_hardware *hw;
191 struct snd_vx222 *vx; 191 struct snd_vx222 *vx;
192 int err; 192 int err;
diff --git a/sound/pci/vx222/vx222.h b/sound/pci/vx222/vx222.h
index 18478ae124a9..2f0d78f609a6 100644
--- a/sound/pci/vx222/vx222.h
+++ b/sound/pci/vx222/vx222.h
@@ -25,7 +25,7 @@
25 25
26struct snd_vx222 { 26struct snd_vx222 {
27 27
28 vx_core_t core; 28 struct vx_core core;
29 29
30 /* h/w config; for PLX and for DSP */ 30 /* h/w config; for PLX and for DSP */
31 struct pci_dev *pci; 31 struct pci_dev *pci;
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index 2d4d0c29b4c4..c705af409b0f 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -82,7 +82,7 @@ static int vx2_reg_index[VX_REG_MAX] = {
82 [VX_GPIOC] = 0, /* on the PLX */ 82 [VX_GPIOC] = 0, /* on the PLX */
83}; 83};
84 84
85static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg) 85static inline unsigned long vx2_reg_addr(struct vx_core *_chip, int reg)
86{ 86{
87 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 87 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
88 return chip->port[vx2_reg_index[reg]] + vx2_reg_offset[reg]; 88 return chip->port[vx2_reg_index[reg]] + vx2_reg_offset[reg];
@@ -92,7 +92,7 @@ static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg)
92 * snd_vx_inb - read a byte from the register 92 * snd_vx_inb - read a byte from the register
93 * @offset: register enum 93 * @offset: register enum
94 */ 94 */
95static unsigned char vx2_inb(vx_core_t *chip, int offset) 95static unsigned char vx2_inb(struct vx_core *chip, int offset)
96{ 96{
97 return inb(vx2_reg_addr(chip, offset)); 97 return inb(vx2_reg_addr(chip, offset));
98} 98}
@@ -102,7 +102,7 @@ static unsigned char vx2_inb(vx_core_t *chip, int offset)
102 * @offset: the register offset 102 * @offset: the register offset
103 * @val: the value to write 103 * @val: the value to write
104 */ 104 */
105static void vx2_outb(vx_core_t *chip, int offset, unsigned char val) 105static void vx2_outb(struct vx_core *chip, int offset, unsigned char val)
106{ 106{
107 outb(val, vx2_reg_addr(chip, offset)); 107 outb(val, vx2_reg_addr(chip, offset));
108 //printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); 108 //printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset));
@@ -112,7 +112,7 @@ static void vx2_outb(vx_core_t *chip, int offset, unsigned char val)
112 * snd_vx_inl - read a 32bit word from the register 112 * snd_vx_inl - read a 32bit word from the register
113 * @offset: register enum 113 * @offset: register enum
114 */ 114 */
115static unsigned int vx2_inl(vx_core_t *chip, int offset) 115static unsigned int vx2_inl(struct vx_core *chip, int offset)
116{ 116{
117 return inl(vx2_reg_addr(chip, offset)); 117 return inl(vx2_reg_addr(chip, offset));
118} 118}
@@ -122,7 +122,7 @@ static unsigned int vx2_inl(vx_core_t *chip, int offset)
122 * @offset: the register enum 122 * @offset: the register enum
123 * @val: the value to write 123 * @val: the value to write
124 */ 124 */
125static void vx2_outl(vx_core_t *chip, int offset, unsigned int val) 125static void vx2_outl(struct vx_core *chip, int offset, unsigned int val)
126{ 126{
127 // printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); 127 // printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset));
128 outl(val, vx2_reg_addr(chip, offset)); 128 outl(val, vx2_reg_addr(chip, offset));
@@ -132,13 +132,13 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
132 * redefine macros to call directly 132 * redefine macros to call directly
133 */ 133 */
134#undef vx_inb 134#undef vx_inb
135#define vx_inb(chip,reg) vx2_inb((vx_core_t*)(chip), VX_##reg) 135#define vx_inb(chip,reg) vx2_inb((struct vx_core*)(chip), VX_##reg)
136#undef vx_outb 136#undef vx_outb
137#define vx_outb(chip,reg,val) vx2_outb((vx_core_t*)(chip), VX_##reg, val) 137#define vx_outb(chip,reg,val) vx2_outb((struct vx_core*)(chip), VX_##reg, val)
138#undef vx_inl 138#undef vx_inl
139#define vx_inl(chip,reg) vx2_inl((vx_core_t*)(chip), VX_##reg) 139#define vx_inl(chip,reg) vx2_inl((struct vx_core*)(chip), VX_##reg)
140#undef vx_outl 140#undef vx_outl
141#define vx_outl(chip,reg,val) vx2_outl((vx_core_t*)(chip), VX_##reg, val) 141#define vx_outl(chip,reg,val) vx2_outl((struct vx_core*)(chip), VX_##reg, val)
142 142
143 143
144/* 144/*
@@ -147,7 +147,7 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
147 147
148#define XX_DSP_RESET_WAIT_TIME 2 /* ms */ 148#define XX_DSP_RESET_WAIT_TIME 2 /* ms */
149 149
150static void vx2_reset_dsp(vx_core_t *_chip) 150static void vx2_reset_dsp(struct vx_core *_chip)
151{ 151{
152 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 152 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
153 153
@@ -162,7 +162,7 @@ static void vx2_reset_dsp(vx_core_t *_chip)
162} 162}
163 163
164 164
165static int vx2_test_xilinx(vx_core_t *_chip) 165static int vx2_test_xilinx(struct vx_core *_chip)
166{ 166{
167 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 167 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
168 unsigned int data; 168 unsigned int data;
@@ -219,7 +219,7 @@ static int vx2_test_xilinx(vx_core_t *_chip)
219 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. 219 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
220 * @do_write: 0 = read, 1 = set up for DMA write 220 * @do_write: 0 = read, 1 = set up for DMA write
221 */ 221 */
222static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write) 222static void vx2_setup_pseudo_dma(struct vx_core *chip, int do_write)
223{ 223{
224 /* Interrupt mode and HREQ pin enabled for host transmit data transfers 224 /* Interrupt mode and HREQ pin enabled for host transmit data transfers
225 * (in case of the use of the pseudo-dma facility). 225 * (in case of the use of the pseudo-dma facility).
@@ -235,7 +235,7 @@ static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write)
235/* 235/*
236 * vx_release_pseudo_dma - disable the pseudo-DMA mode 236 * vx_release_pseudo_dma - disable the pseudo-DMA mode
237 */ 237 */
238static inline void vx2_release_pseudo_dma(vx_core_t *chip) 238static inline void vx2_release_pseudo_dma(struct vx_core *chip)
239{ 239{
240 /* HREQ pin disabled. */ 240 /* HREQ pin disabled. */
241 vx_outl(chip, ICR, 0); 241 vx_outl(chip, ICR, 0);
@@ -244,8 +244,8 @@ static inline void vx2_release_pseudo_dma(vx_core_t *chip)
244 244
245 245
246/* pseudo-dma write */ 246/* pseudo-dma write */
247static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, 247static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
248 vx_pipe_t *pipe, int count) 248 struct vx_pipe *pipe, int count)
249{ 249{
250 unsigned long port = vx2_reg_addr(chip, VX_DMA); 250 unsigned long port = vx2_reg_addr(chip, VX_DMA);
251 int offset = pipe->hw_ptr; 251 int offset = pipe->hw_ptr;
@@ -282,8 +282,8 @@ static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
282 282
283 283
284/* pseudo dma read */ 284/* pseudo dma read */
285static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, 285static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
286 vx_pipe_t *pipe, int count) 286 struct vx_pipe *pipe, int count)
287{ 287{
288 int offset = pipe->hw_ptr; 288 int offset = pipe->hw_ptr;
289 u32 *addr = (u32 *)(runtime->dma_area + offset); 289 u32 *addr = (u32 *)(runtime->dma_area + offset);
@@ -321,7 +321,7 @@ static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
321/* 321/*
322 * transfer counts bits to PLX 322 * transfer counts bits to PLX
323 */ 323 */
324static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int counts, unsigned char data) 324static int put_xilinx_data(struct vx_core *chip, unsigned int port, unsigned int counts, unsigned char data)
325{ 325{
326 unsigned int i; 326 unsigned int i;
327 327
@@ -353,7 +353,7 @@ static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int coun
353/* 353/*
354 * load the xilinx image 354 * load the xilinx image
355 */ 355 */
356static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx) 356static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *xilinx)
357{ 357{
358 unsigned int i; 358 unsigned int i;
359 unsigned int port; 359 unsigned int port;
@@ -400,7 +400,7 @@ static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx
400/* 400/*
401 * load the boot/dsp images 401 * load the boot/dsp images
402 */ 402 */
403static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp) 403static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *dsp)
404{ 404{
405 int err; 405 int err;
406 406
@@ -432,7 +432,7 @@ static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp)
432 * 432 *
433 * spinlock held! 433 * spinlock held!
434 */ 434 */
435static int vx2_test_and_ack(vx_core_t *chip) 435static int vx2_test_and_ack(struct vx_core *chip)
436{ 436{
437 /* not booted yet? */ 437 /* not booted yet? */
438 if (! (chip->chip_status & VX_STAT_XILINX_LOADED)) 438 if (! (chip->chip_status & VX_STAT_XILINX_LOADED))
@@ -463,7 +463,7 @@ static int vx2_test_and_ack(vx_core_t *chip)
463/* 463/*
464 * vx_validate_irq - enable/disable IRQ 464 * vx_validate_irq - enable/disable IRQ
465 */ 465 */
466static void vx2_validate_irq(vx_core_t *_chip, int enable) 466static void vx2_validate_irq(struct vx_core *_chip, int enable)
467{ 467{
468 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 468 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
469 469
@@ -484,7 +484,7 @@ static void vx2_validate_irq(vx_core_t *_chip, int enable)
484/* 484/*
485 * write an AKM codec data (24bit) 485 * write an AKM codec data (24bit)
486 */ 486 */
487static void vx2_write_codec_reg(vx_core_t *chip, unsigned int data) 487static void vx2_write_codec_reg(struct vx_core *chip, unsigned int data)
488{ 488{
489 unsigned int i; 489 unsigned int i;
490 490
@@ -660,7 +660,7 @@ static const u8 vx2_akm_gains_lut[VX2_AKM_LEVEL_MAX+1] = {
660/* 660/*
661 * pseudo-codec write entry 661 * pseudo-codec write entry
662 */ 662 */
663static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data) 663static void vx2_write_akm(struct vx_core *chip, int reg, unsigned int data)
664{ 664{
665 unsigned int val; 665 unsigned int val;
666 666
@@ -695,7 +695,7 @@ static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data)
695/* 695/*
696 * write codec bit for old VX222 board 696 * write codec bit for old VX222 board
697 */ 697 */
698static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int data) 698static void vx2_old_write_codec_bit(struct vx_core *chip, int codec, unsigned int data)
699{ 699{
700 int i; 700 int i;
701 701
@@ -713,7 +713,7 @@ static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int dat
713/* 713/*
714 * reset codec bit 714 * reset codec bit
715 */ 715 */
716static void vx2_reset_codec(vx_core_t *_chip) 716static void vx2_reset_codec(struct vx_core *_chip)
717{ 717{
718 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 718 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
719 719
@@ -755,7 +755,7 @@ static void vx2_reset_codec(vx_core_t *_chip)
755/* 755/*
756 * change the audio source 756 * change the audio source
757 */ 757 */
758static void vx2_change_audio_source(vx_core_t *_chip, int src) 758static void vx2_change_audio_source(struct vx_core *_chip, int src)
759{ 759{
760 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 760 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
761 761
@@ -774,7 +774,7 @@ static void vx2_change_audio_source(vx_core_t *_chip, int src)
774/* 774/*
775 * set the clock source 775 * set the clock source
776 */ 776 */
777static void vx2_set_clock_source(vx_core_t *_chip, int source) 777static void vx2_set_clock_source(struct vx_core *_chip, int source)
778{ 778{
779 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 779 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
780 780
@@ -788,7 +788,7 @@ static void vx2_set_clock_source(vx_core_t *_chip, int source)
788/* 788/*
789 * reset the board 789 * reset the board
790 */ 790 */
791static void vx2_reset_board(vx_core_t *_chip, int cold_reset) 791static void vx2_reset_board(struct vx_core *_chip, int cold_reset)
792{ 792{
793 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 793 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
794 794
@@ -848,7 +848,7 @@ static void vx2_set_input_level(struct snd_vx222 *chip)
848 */ 848 */
849 849
850/* input levels */ 850/* input levels */
851static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 851static int vx_input_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
852{ 852{
853 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 853 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
854 uinfo->count = 2; 854 uinfo->count = 2;
@@ -857,9 +857,9 @@ static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
857 return 0; 857 return 0;
858} 858}
859 859
860static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 860static int vx_input_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
861{ 861{
862 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 862 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
863 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 863 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
864 down(&_chip->mixer_mutex); 864 down(&_chip->mixer_mutex);
865 ucontrol->value.integer.value[0] = chip->input_level[0]; 865 ucontrol->value.integer.value[0] = chip->input_level[0];
@@ -868,9 +868,9 @@ static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
868 return 0; 868 return 0;
869} 869}
870 870
871static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 871static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
872{ 872{
873 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 873 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
874 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 874 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
875 down(&_chip->mixer_mutex); 875 down(&_chip->mixer_mutex);
876 if (chip->input_level[0] != ucontrol->value.integer.value[0] || 876 if (chip->input_level[0] != ucontrol->value.integer.value[0] ||
@@ -886,7 +886,7 @@ static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
886} 886}
887 887
888/* mic level */ 888/* mic level */
889static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 889static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
890{ 890{
891 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 891 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
892 uinfo->count = 1; 892 uinfo->count = 1;
@@ -895,17 +895,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
895 return 0; 895 return 0;
896} 896}
897 897
898static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 898static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
899{ 899{
900 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 900 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
901 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 901 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
902 ucontrol->value.integer.value[0] = chip->mic_level; 902 ucontrol->value.integer.value[0] = chip->mic_level;
903 return 0; 903 return 0;
904} 904}
905 905
906static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 906static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
907{ 907{
908 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 908 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
909 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 909 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
910 down(&_chip->mixer_mutex); 910 down(&_chip->mixer_mutex);
911 if (chip->mic_level != ucontrol->value.integer.value[0]) { 911 if (chip->mic_level != ucontrol->value.integer.value[0]) {
@@ -918,7 +918,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
918 return 0; 918 return 0;
919} 919}
920 920
921static snd_kcontrol_new_t vx_control_input_level = { 921static struct snd_kcontrol_new vx_control_input_level = {
922 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 922 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
923 .name = "Capture Volume", 923 .name = "Capture Volume",
924 .info = vx_input_level_info, 924 .info = vx_input_level_info,
@@ -926,7 +926,7 @@ static snd_kcontrol_new_t vx_control_input_level = {
926 .put = vx_input_level_put, 926 .put = vx_input_level_put,
927}; 927};
928 928
929static snd_kcontrol_new_t vx_control_mic_level = { 929static struct snd_kcontrol_new vx_control_mic_level = {
930 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 930 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
931 .name = "Mic Capture Volume", 931 .name = "Mic Capture Volume",
932 .info = vx_mic_level_info, 932 .info = vx_mic_level_info,
@@ -938,7 +938,7 @@ static snd_kcontrol_new_t vx_control_mic_level = {
938 * FIXME: compressor/limiter implementation is missing yet... 938 * FIXME: compressor/limiter implementation is missing yet...
939 */ 939 */
940 940
941static int vx2_add_mic_controls(vx_core_t *_chip) 941static int vx2_add_mic_controls(struct vx_core *_chip)
942{ 942{
943 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 943 struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
944 int err; 944 int err;
diff --git a/sound/pcmcia/vx/vxp_mixer.c b/sound/pcmcia/vx/vxp_mixer.c
index aeaef3d81801..9450149b931c 100644
--- a/sound/pcmcia/vx/vxp_mixer.c
+++ b/sound/pcmcia/vx/vxp_mixer.c
@@ -31,7 +31,7 @@
31/* 31/*
32 * mic level control (for VXPocket) 32 * mic level control (for VXPocket)
33 */ 33 */
34static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 34static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
35{ 35{
36 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 36 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
37 uinfo->count = 1; 37 uinfo->count = 1;
@@ -40,17 +40,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
40 return 0; 40 return 0;
41} 41}
42 42
43static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 43static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
44{ 44{
45 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 45 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
46 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 46 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
47 ucontrol->value.integer.value[0] = chip->mic_level; 47 ucontrol->value.integer.value[0] = chip->mic_level;
48 return 0; 48 return 0;
49} 49}
50 50
51static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 51static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
52{ 52{
53 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 53 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
55 down(&_chip->mixer_mutex); 55 down(&_chip->mixer_mutex);
56 if (chip->mic_level != ucontrol->value.integer.value[0]) { 56 if (chip->mic_level != ucontrol->value.integer.value[0]) {
@@ -63,7 +63,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
63 return 0; 63 return 0;
64} 64}
65 65
66static snd_kcontrol_new_t vx_control_mic_level = { 66static struct snd_kcontrol_new vx_control_mic_level = {
67 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 67 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
68 .name = "Mic Capture Volume", 68 .name = "Mic Capture Volume",
69 .info = vx_mic_level_info, 69 .info = vx_mic_level_info,
@@ -74,7 +74,7 @@ static snd_kcontrol_new_t vx_control_mic_level = {
74/* 74/*
75 * mic boost level control (for VXP440) 75 * mic boost level control (for VXP440)
76 */ 76 */
77static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 77static int vx_mic_boost_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
78{ 78{
79 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 79 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
80 uinfo->count = 1; 80 uinfo->count = 1;
@@ -83,17 +83,17 @@ static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
83 return 0; 83 return 0;
84} 84}
85 85
86static int vx_mic_boost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 86static int vx_mic_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
87{ 87{
88 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 88 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
89 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 89 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
90 ucontrol->value.integer.value[0] = chip->mic_level; 90 ucontrol->value.integer.value[0] = chip->mic_level;
91 return 0; 91 return 0;
92} 92}
93 93
94static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 94static int vx_mic_boost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
95{ 95{
96 vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 96 struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
97 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 97 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
98 down(&_chip->mixer_mutex); 98 down(&_chip->mixer_mutex);
99 if (chip->mic_level != ucontrol->value.integer.value[0]) { 99 if (chip->mic_level != ucontrol->value.integer.value[0]) {
@@ -106,7 +106,7 @@ static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
106 return 0; 106 return 0;
107} 107}
108 108
109static snd_kcontrol_new_t vx_control_mic_boost = { 109static struct snd_kcontrol_new vx_control_mic_boost = {
110 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 110 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
111 .name = "Mic Boost", 111 .name = "Mic Boost",
112 .info = vx_mic_boost_info, 112 .info = vx_mic_boost_info,
@@ -115,7 +115,7 @@ static snd_kcontrol_new_t vx_control_mic_boost = {
115}; 115};
116 116
117 117
118int vxp_add_mic_controls(vx_core_t *_chip) 118int vxp_add_mic_controls(struct vx_core *_chip)
119{ 119{
120 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 120 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
121 int err; 121 int err;
diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c
index 2754d657a4d6..7f82f619f9f4 100644
--- a/sound/pcmcia/vx/vxp_ops.c
+++ b/sound/pcmcia/vx/vxp_ops.c
@@ -49,7 +49,7 @@ static int vxp_reg_offset[VX_REG_MAX] = {
49}; 49};
50 50
51 51
52static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg) 52static inline unsigned long vxp_reg_addr(struct vx_core *_chip, int reg)
53{ 53{
54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
55 return chip->port + vxp_reg_offset[reg]; 55 return chip->port + vxp_reg_offset[reg];
@@ -59,7 +59,7 @@ static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg)
59 * snd_vx_inb - read a byte from the register 59 * snd_vx_inb - read a byte from the register
60 * @offset: register offset 60 * @offset: register offset
61 */ 61 */
62static unsigned char vxp_inb(vx_core_t *chip, int offset) 62static unsigned char vxp_inb(struct vx_core *chip, int offset)
63{ 63{
64 return inb(vxp_reg_addr(chip, offset)); 64 return inb(vxp_reg_addr(chip, offset));
65} 65}
@@ -69,7 +69,7 @@ static unsigned char vxp_inb(vx_core_t *chip, int offset)
69 * @offset: the register offset 69 * @offset: the register offset
70 * @val: the value to write 70 * @val: the value to write
71 */ 71 */
72static void vxp_outb(vx_core_t *chip, int offset, unsigned char val) 72static void vxp_outb(struct vx_core *chip, int offset, unsigned char val)
73{ 73{
74 outb(val, vxp_reg_addr(chip, offset)); 74 outb(val, vxp_reg_addr(chip, offset));
75} 75}
@@ -78,9 +78,9 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
78 * redefine macros to call directly 78 * redefine macros to call directly
79 */ 79 */
80#undef vx_inb 80#undef vx_inb
81#define vx_inb(chip,reg) vxp_inb((vx_core_t*)(chip), VX_##reg) 81#define vx_inb(chip,reg) vxp_inb((struct vx_core *)(chip), VX_##reg)
82#undef vx_outb 82#undef vx_outb
83#define vx_outb(chip,reg,val) vxp_outb((vx_core_t*)(chip), VX_##reg,val) 83#define vx_outb(chip,reg,val) vxp_outb((struct vx_core *)(chip), VX_##reg,val)
84 84
85 85
86/* 86/*
@@ -88,7 +88,7 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
88 * 88 *
89 * returns zero if a magic word is detected, or a negative error code. 89 * returns zero if a magic word is detected, or a negative error code.
90 */ 90 */
91static int vx_check_magic(vx_core_t *chip) 91static int vx_check_magic(struct vx_core *chip)
92{ 92{
93 unsigned long end_time = jiffies + HZ / 5; 93 unsigned long end_time = jiffies + HZ / 5;
94 int c; 94 int c;
@@ -109,7 +109,7 @@ static int vx_check_magic(vx_core_t *chip)
109 109
110#define XX_DSP_RESET_WAIT_TIME 2 /* ms */ 110#define XX_DSP_RESET_WAIT_TIME 2 /* ms */
111 111
112static void vxp_reset_dsp(vx_core_t *_chip) 112static void vxp_reset_dsp(struct vx_core *_chip)
113{ 113{
114 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 114 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
115 115
@@ -127,7 +127,7 @@ static void vxp_reset_dsp(vx_core_t *_chip)
127/* 127/*
128 * reset codec bit 128 * reset codec bit
129 */ 129 */
130static void vxp_reset_codec(vx_core_t *_chip) 130static void vxp_reset_codec(struct vx_core *_chip)
131{ 131{
132 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 132 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
133 133
@@ -146,7 +146,7 @@ static void vxp_reset_codec(vx_core_t *_chip)
146 * vx_load_xilinx_binary - load the xilinx binary image 146 * vx_load_xilinx_binary - load the xilinx binary image
147 * the binary image is the binary array converted from the bitstream file. 147 * the binary image is the binary array converted from the bitstream file.
148 */ 148 */
149static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw) 149static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *fw)
150{ 150{
151 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 151 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
152 unsigned int i; 152 unsigned int i;
@@ -244,7 +244,7 @@ static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw)
244/* 244/*
245 * vxp_load_dsp - load_dsp callback 245 * vxp_load_dsp - load_dsp callback
246 */ 246 */
247static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw) 247static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw)
248{ 248{
249 int err; 249 int err;
250 250
@@ -279,7 +279,7 @@ static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw)
279 * 279 *
280 * spinlock held! 280 * spinlock held!
281 */ 281 */
282static int vxp_test_and_ack(vx_core_t *_chip) 282static int vxp_test_and_ack(struct vx_core *_chip)
283{ 283{
284 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 284 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
285 285
@@ -306,7 +306,7 @@ static int vxp_test_and_ack(vx_core_t *_chip)
306/* 306/*
307 * vx_validate_irq - enable/disable IRQ 307 * vx_validate_irq - enable/disable IRQ
308 */ 308 */
309static void vxp_validate_irq(vx_core_t *_chip, int enable) 309static void vxp_validate_irq(struct vx_core *_chip, int enable)
310{ 310{
311 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 311 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
312 312
@@ -322,7 +322,7 @@ static void vxp_validate_irq(vx_core_t *_chip, int enable)
322 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. 322 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
323 * @do_write: 0 = read, 1 = set up for DMA write 323 * @do_write: 0 = read, 1 = set up for DMA write
324 */ 324 */
325static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write) 325static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write)
326{ 326{
327 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 327 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
328 328
@@ -342,7 +342,7 @@ static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write)
342/* 342/*
343 * vx_release_pseudo_dma - disable the pseudo-DMA mode 343 * vx_release_pseudo_dma - disable the pseudo-DMA mode
344 */ 344 */
345static void vx_release_pseudo_dma(vx_core_t *_chip) 345static void vx_release_pseudo_dma(struct vx_core *_chip)
346{ 346{
347 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 347 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
348 348
@@ -362,8 +362,8 @@ static void vx_release_pseudo_dma(vx_core_t *_chip)
362 * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP. 362 * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP.
363 * NB: call with a certain lock! 363 * NB: call with a certain lock!
364 */ 364 */
365static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, 365static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
366 vx_pipe_t *pipe, int count) 366 struct vx_pipe *pipe, int count)
367{ 367{
368 long port = vxp_reg_addr(chip, VX_DMA); 368 long port = vxp_reg_addr(chip, VX_DMA);
369 int offset = pipe->hw_ptr; 369 int offset = pipe->hw_ptr;
@@ -401,8 +401,8 @@ static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
401 * the read length must be aligned to 6 bytes, as well as write. 401 * the read length must be aligned to 6 bytes, as well as write.
402 * NB: call with a certain lock! 402 * NB: call with a certain lock!
403 */ 403 */
404static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, 404static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
405 vx_pipe_t *pipe, int count) 405 struct vx_pipe *pipe, int count)
406{ 406{
407 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 407 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
408 long port = vxp_reg_addr(chip, VX_DMA); 408 long port = vxp_reg_addr(chip, VX_DMA);
@@ -442,7 +442,7 @@ static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
442/* 442/*
443 * write a codec data (24bit) 443 * write a codec data (24bit)
444 */ 444 */
445static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) 445static void vxp_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
446{ 446{
447 int i; 447 int i;
448 448
@@ -465,7 +465,7 @@ static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
465 * vx_set_mic_boost - set mic boost level (on vxp440 only) 465 * vx_set_mic_boost - set mic boost level (on vxp440 only)
466 * @boost: 0 = 20dB, 1 = +38dB 466 * @boost: 0 = 20dB, 1 = +38dB
467 */ 467 */
468void vx_set_mic_boost(vx_core_t *chip, int boost) 468void vx_set_mic_boost(struct vx_core *chip, int boost)
469{ 469{
470 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 470 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
471 unsigned long flags; 471 unsigned long flags;
@@ -508,7 +508,7 @@ static int vx_compute_mic_level(int level)
508 * vx_set_mic_level - set mic level (on vxpocket only) 508 * vx_set_mic_level - set mic level (on vxpocket only)
509 * @level: the mic level = 0 - 8 (max) 509 * @level: the mic level = 0 - 8 (max)
510 */ 510 */
511void vx_set_mic_level(vx_core_t *chip, int level) 511void vx_set_mic_level(struct vx_core *chip, int level)
512{ 512{
513 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 513 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
514 unsigned long flags; 514 unsigned long flags;
@@ -528,7 +528,7 @@ void vx_set_mic_level(vx_core_t *chip, int level)
528/* 528/*
529 * change the input audio source 529 * change the input audio source
530 */ 530 */
531static void vxp_change_audio_source(vx_core_t *_chip, int src) 531static void vxp_change_audio_source(struct vx_core *_chip, int src)
532{ 532{
533 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 533 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
534 534
@@ -568,7 +568,7 @@ static void vxp_change_audio_source(vx_core_t *_chip, int src)
568 * change the clock source 568 * change the clock source
569 * source = INTERNAL_QUARTZ or UER_SYNC 569 * source = INTERNAL_QUARTZ or UER_SYNC
570 */ 570 */
571static void vxp_set_clock_source(vx_core_t *_chip, int source) 571static void vxp_set_clock_source(struct vx_core *_chip, int source)
572{ 572{
573 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 573 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
574 574
@@ -583,7 +583,7 @@ static void vxp_set_clock_source(vx_core_t *_chip, int source)
583/* 583/*
584 * reset the board 584 * reset the board
585 */ 585 */
586static void vxp_reset_board(vx_core_t *_chip, int cold_reset) 586static void vxp_reset_board(struct vx_core *_chip, int cold_reset)
587{ 587{
588 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 588 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
589 589
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 1e8f16b4c073..009629714140 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -83,9 +83,9 @@ static void vxpocket_release(dev_link_t *link)
83/* 83/*
84 * destructor, called from snd_card_free_in_thread() 84 * destructor, called from snd_card_free_in_thread()
85 */ 85 */
86static int snd_vxpocket_dev_free(snd_device_t *device) 86static int snd_vxpocket_dev_free(struct snd_device *device)
87{ 87{
88 vx_core_t *chip = device->device_data; 88 struct vx_core *chip = device->device_data;
89 89
90 snd_vx_free_firmware(chip); 90 snd_vx_free_firmware(chip);
91 kfree(chip); 91 kfree(chip);
@@ -142,19 +142,19 @@ static struct snd_vx_hardware vxp440_hw = {
142/* 142/*
143 * create vxpocket instance 143 * create vxpocket instance
144 */ 144 */
145static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl) 145static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl)
146{ 146{
147 client_reg_t client_reg; /* Register with cardmgr */ 147 client_reg_t client_reg; /* Register with cardmgr */
148 dev_link_t *link; /* Info for cardmgr */ 148 dev_link_t *link; /* Info for cardmgr */
149 vx_core_t *chip; 149 struct vx_core *chip;
150 struct snd_vxpocket *vxp; 150 struct snd_vxpocket *vxp;
151 int ret; 151 int ret;
152 static snd_device_ops_t ops = { 152 static struct snd_device_ops ops = {
153 .dev_free = snd_vxpocket_dev_free, 153 .dev_free = snd_vxpocket_dev_free,
154 }; 154 };
155 155
156 chip = snd_vx_create(card, &vxpocket_hw, &snd_vxpocket_ops, 156 chip = snd_vx_create(card, &vxpocket_hw, &snd_vxpocket_ops,
157 sizeof(struct snd_vxpocket) - sizeof(vx_core_t)); 157 sizeof(struct snd_vxpocket) - sizeof(struct vx_core));
158 if (! chip) 158 if (! chip)
159 return NULL; 159 return NULL;
160 160
@@ -218,10 +218,10 @@ static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl)
218 * 218 *
219 * returns 0 if successful, or a negative error code. 219 * returns 0 if successful, or a negative error code.
220 */ 220 */
221static int snd_vxpocket_assign_resources(vx_core_t *chip, int port, int irq) 221static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq)
222{ 222{
223 int err; 223 int err;
224 snd_card_t *card = chip->card; 224 struct snd_card *card = chip->card;
225 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; 225 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
226 226
227 snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq); 227 snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq);
@@ -250,7 +250,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
250static void vxpocket_config(dev_link_t *link) 250static void vxpocket_config(dev_link_t *link)
251{ 251{
252 client_handle_t handle = link->handle; 252 client_handle_t handle = link->handle;
253 vx_core_t *chip = link->priv; 253 struct vx_core *chip = link->priv;
254 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; 254 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
255 tuple_t tuple; 255 tuple_t tuple;
256 cisparse_t *parse; 256 cisparse_t *parse;
@@ -324,7 +324,7 @@ failed:
324static int vxpocket_event(event_t event, int priority, event_callback_args_t *args) 324static int vxpocket_event(event_t event, int priority, event_callback_args_t *args)
325{ 325{
326 dev_link_t *link = args->client_data; 326 dev_link_t *link = args->client_data;
327 vx_core_t *chip = link->priv; 327 struct vx_core *chip = link->priv;
328 328
329 switch (event) { 329 switch (event) {
330 case CS_EVENT_CARD_REMOVAL: 330 case CS_EVENT_CARD_REMOVAL:
@@ -379,7 +379,7 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar
379 */ 379 */
380static dev_link_t *vxpocket_attach(void) 380static dev_link_t *vxpocket_attach(void)
381{ 381{
382 snd_card_t *card; 382 struct snd_card *card;
383 struct snd_vxpocket *vxp; 383 struct snd_vxpocket *vxp;
384 int i; 384 int i;
385 385
@@ -421,14 +421,14 @@ static dev_link_t *vxpocket_attach(void)
421static void vxpocket_detach(dev_link_t *link) 421static void vxpocket_detach(dev_link_t *link)
422{ 422{
423 struct snd_vxpocket *vxp; 423 struct snd_vxpocket *vxp;
424 vx_core_t *chip; 424 struct vx_core *chip;
425 dev_link_t **linkp; 425 dev_link_t **linkp;
426 426
427 if (! link) 427 if (! link)
428 return; 428 return;
429 429
430 vxp = link->priv; 430 vxp = link->priv;
431 chip = (vx_core_t *)vxp; 431 chip = (struct vx_core *)vxp;
432 card_alloc &= ~(1 << vxp->index); 432 card_alloc &= ~(1 << vxp->index);
433 433
434 /* Remove the interface data from the linked list */ 434 /* Remove the interface data from the linked list */
diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h
index 70754aa3dd11..67efae3f6c8d 100644
--- a/sound/pcmcia/vx/vxpocket.h
+++ b/sound/pcmcia/vx/vxpocket.h
@@ -30,7 +30,7 @@
30 30
31struct snd_vxpocket { 31struct snd_vxpocket {
32 32
33 vx_core_t core; 33 struct vx_core core;
34 34
35 unsigned long port; 35 unsigned long port;
36 36
@@ -48,10 +48,10 @@ struct snd_vxpocket {
48 48
49extern struct snd_vx_ops snd_vxpocket_ops; 49extern struct snd_vx_ops snd_vxpocket_ops;
50 50
51void vx_set_mic_boost(vx_core_t *chip, int boost); 51void vx_set_mic_boost(struct vx_core *chip, int boost);
52void vx_set_mic_level(vx_core_t *chip, int level); 52void vx_set_mic_level(struct vx_core *chip, int level);
53 53
54int vxp_add_mic_controls(vx_core_t *chip); 54int vxp_add_mic_controls(struct vx_core *chip);
55 55
56/* Constants used to access the CDSP register (0x08). */ 56/* Constants used to access the CDSP register (0x08). */
57#define CDSP_MAGIC 0xA7 /* magic value (for read) */ 57#define CDSP_MAGIC 0xA7 /* magic value (for read) */