aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ca0106/ca0106_main.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:55:40 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:19:01 -0500
commite4a3d145455159955d6ac1df976b2ed2a135b858 (patch)
tree71a0a4f0a71d07d153d32d88430f21ac4efcdde7 /sound/pci/ca0106/ca0106_main.c
parent2fd16874aa6322e8b61879a78f3b485999506833 (diff)
[ALSA] Remove xxx_t typedefs: PCI CA0106
Modules: CA0106 driver Remove xxx_t typedefs from the PCI CA0106 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ca0106/ca0106_main.c')
-rw-r--r--sound/pci/ca0106/ca0106_main.c234
1 files changed, 118 insertions, 116 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 0120c4683c79..744f97183723 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -164,7 +164,7 @@ MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard.");
164 164
165#include "ca0106.h" 165#include "ca0106.h"
166 166
167static ca0106_details_t ca0106_chip_details[] = { 167static struct snd_ca0106_details ca0106_chip_details[] = {
168 /* AudigyLS[SB0310] */ 168 /* AudigyLS[SB0310] */
169 { .serial = 0x10021102, 169 { .serial = 0x10021102,
170 .name = "AudigyLS [SB0310]", 170 .name = "AudigyLS [SB0310]",
@@ -201,7 +201,7 @@ static ca0106_details_t ca0106_chip_details[] = {
201}; 201};
202 202
203/* hardware definition */ 203/* hardware definition */
204static snd_pcm_hardware_t snd_ca0106_playback_hw = { 204static struct snd_pcm_hardware snd_ca0106_playback_hw = {
205 .info = (SNDRV_PCM_INFO_MMAP | 205 .info = (SNDRV_PCM_INFO_MMAP |
206 SNDRV_PCM_INFO_INTERLEAVED | 206 SNDRV_PCM_INFO_INTERLEAVED |
207 SNDRV_PCM_INFO_BLOCK_TRANSFER | 207 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -221,7 +221,7 @@ static snd_pcm_hardware_t snd_ca0106_playback_hw = {
221 .fifo_size = 0, 221 .fifo_size = 0,
222}; 222};
223 223
224static snd_pcm_hardware_t snd_ca0106_capture_hw = { 224static struct snd_pcm_hardware snd_ca0106_capture_hw = {
225 .info = (SNDRV_PCM_INFO_MMAP | 225 .info = (SNDRV_PCM_INFO_MMAP |
226 SNDRV_PCM_INFO_INTERLEAVED | 226 SNDRV_PCM_INFO_INTERLEAVED |
227 SNDRV_PCM_INFO_BLOCK_TRANSFER | 227 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -241,7 +241,7 @@ static snd_pcm_hardware_t snd_ca0106_capture_hw = {
241 .fifo_size = 0, 241 .fifo_size = 0,
242}; 242};
243 243
244unsigned int snd_ca0106_ptr_read(ca0106_t * emu, 244unsigned int snd_ca0106_ptr_read(struct snd_ca0106 * emu,
245 unsigned int reg, 245 unsigned int reg,
246 unsigned int chn) 246 unsigned int chn)
247{ 247{
@@ -257,7 +257,7 @@ unsigned int snd_ca0106_ptr_read(ca0106_t * emu,
257 return val; 257 return val;
258} 258}
259 259
260void snd_ca0106_ptr_write(ca0106_t *emu, 260void snd_ca0106_ptr_write(struct snd_ca0106 *emu,
261 unsigned int reg, 261 unsigned int reg,
262 unsigned int chn, 262 unsigned int chn,
263 unsigned int data) 263 unsigned int data)
@@ -273,7 +273,7 @@ void snd_ca0106_ptr_write(ca0106_t *emu,
273 spin_unlock_irqrestore(&emu->emu_lock, flags); 273 spin_unlock_irqrestore(&emu->emu_lock, flags);
274} 274}
275 275
276int snd_ca0106_i2c_write(ca0106_t *emu, 276int snd_ca0106_i2c_write(struct snd_ca0106 *emu,
277 u32 reg, 277 u32 reg,
278 u32 value) 278 u32 value)
279{ 279{
@@ -325,7 +325,7 @@ int snd_ca0106_i2c_write(ca0106_t *emu,
325} 325}
326 326
327 327
328static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb) 328static void snd_ca0106_intr_enable(struct snd_ca0106 *emu, unsigned int intrenb)
329{ 329{
330 unsigned long flags; 330 unsigned long flags;
331 unsigned int enable; 331 unsigned int enable;
@@ -336,7 +336,7 @@ static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb)
336 spin_unlock_irqrestore(&emu->emu_lock, flags); 336 spin_unlock_irqrestore(&emu->emu_lock, flags);
337} 337}
338 338
339static void snd_ca0106_intr_disable(ca0106_t *emu, unsigned int intrenb) 339static void snd_ca0106_intr_disable(struct snd_ca0106 *emu, unsigned int intrenb)
340{ 340{
341 unsigned long flags; 341 unsigned long flags;
342 unsigned int enable; 342 unsigned int enable;
@@ -348,18 +348,19 @@ static void snd_ca0106_intr_disable(ca0106_t *emu, unsigned int intrenb)
348} 348}
349 349
350 350
351static void snd_ca0106_pcm_free_substream(snd_pcm_runtime_t *runtime) 351static void snd_ca0106_pcm_free_substream(struct snd_pcm_runtime *runtime)
352{ 352{
353 kfree(runtime->private_data); 353 kfree(runtime->private_data);
354} 354}
355 355
356/* open_playback callback */ 356/* open_playback callback */
357static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id) 357static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substream,
358 int channel_id)
358{ 359{
359 ca0106_t *chip = snd_pcm_substream_chip(substream); 360 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
360 ca0106_channel_t *channel = &(chip->playback_channels[channel_id]); 361 struct snd_ca0106_channel *channel = &(chip->playback_channels[channel_id]);
361 ca0106_pcm_t *epcm; 362 struct snd_ca0106_pcm *epcm;
362 snd_pcm_runtime_t *runtime = substream->runtime; 363 struct snd_pcm_runtime *runtime = substream->runtime;
363 int err; 364 int err;
364 365
365 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); 366 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -390,43 +391,44 @@ static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream,
390} 391}
391 392
392/* close callback */ 393/* close callback */
393static int snd_ca0106_pcm_close_playback(snd_pcm_substream_t *substream) 394static int snd_ca0106_pcm_close_playback(struct snd_pcm_substream *substream)
394{ 395{
395 ca0106_t *chip = snd_pcm_substream_chip(substream); 396 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
396 snd_pcm_runtime_t *runtime = substream->runtime; 397 struct snd_pcm_runtime *runtime = substream->runtime;
397 ca0106_pcm_t *epcm = runtime->private_data; 398 struct snd_ca0106_pcm *epcm = runtime->private_data;
398 chip->playback_channels[epcm->channel_id].use=0; 399 chip->playback_channels[epcm->channel_id].use = 0;
399/* FIXME: maybe zero others */ 400 /* FIXME: maybe zero others */
400 return 0; 401 return 0;
401} 402}
402 403
403static int snd_ca0106_pcm_open_playback_front(snd_pcm_substream_t *substream) 404static int snd_ca0106_pcm_open_playback_front(struct snd_pcm_substream *substream)
404{ 405{
405 return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); 406 return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL);
406} 407}
407 408
408static int snd_ca0106_pcm_open_playback_center_lfe(snd_pcm_substream_t *substream) 409static int snd_ca0106_pcm_open_playback_center_lfe(struct snd_pcm_substream *substream)
409{ 410{
410 return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL); 411 return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL);
411} 412}
412 413
413static int snd_ca0106_pcm_open_playback_unknown(snd_pcm_substream_t *substream) 414static int snd_ca0106_pcm_open_playback_unknown(struct snd_pcm_substream *substream)
414{ 415{
415 return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL); 416 return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL);
416} 417}
417 418
418static int snd_ca0106_pcm_open_playback_rear(snd_pcm_substream_t *substream) 419static int snd_ca0106_pcm_open_playback_rear(struct snd_pcm_substream *substream)
419{ 420{
420 return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL); 421 return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL);
421} 422}
422 423
423/* open_capture callback */ 424/* open_capture callback */
424static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, int channel_id) 425static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substream,
426 int channel_id)
425{ 427{
426 ca0106_t *chip = snd_pcm_substream_chip(substream); 428 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
427 ca0106_channel_t *channel = &(chip->capture_channels[channel_id]); 429 struct snd_ca0106_channel *channel = &(chip->capture_channels[channel_id]);
428 ca0106_pcm_t *epcm; 430 struct snd_ca0106_pcm *epcm;
429 snd_pcm_runtime_t *runtime = substream->runtime; 431 struct snd_pcm_runtime *runtime = substream->runtime;
430 int err; 432 int err;
431 433
432 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); 434 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -449,7 +451,7 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i
449 channel->use = 1; 451 channel->use = 1;
450 //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel); 452 //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel);
451 //channel->interrupt = snd_ca0106_pcm_channel_interrupt; 453 //channel->interrupt = snd_ca0106_pcm_channel_interrupt;
452 channel->epcm = epcm; 454 channel->epcm = epcm;
453 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 455 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
454 return err; 456 return err;
455 //snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes); 457 //snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes);
@@ -459,70 +461,70 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i
459} 461}
460 462
461/* close callback */ 463/* close callback */
462static int snd_ca0106_pcm_close_capture(snd_pcm_substream_t *substream) 464static int snd_ca0106_pcm_close_capture(struct snd_pcm_substream *substream)
463{ 465{
464 ca0106_t *chip = snd_pcm_substream_chip(substream); 466 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream);
465 snd_pcm_runtime_t *runtime = substream->runtime; 467 struct snd_pcm_runtime *runtime = substream->runtime;
466 ca0106_pcm_t *epcm = runtime->private_data; 468 struct snd_ca0106_pcm *epcm = runtime->private_data;
467 chip->capture_channels[epcm->channel_id].use=0; 469 chip->capture_channels[epcm->channel_id].use = 0;
468/* FIXME: maybe zero others */ 470 /* FIXME: maybe zero others */
469 return 0; 471 return 0;
470} 472}
471 473
472static int snd_ca0106_pcm_open_0_capture(snd_pcm_substream_t *substream) 474static int snd_ca0106_pcm_open_0_capture(struct snd_pcm_substream *substream)
473{ 475{
474 return snd_ca0106_pcm_open_capture_channel(substream, 0); 476 return snd_ca0106_pcm_open_capture_channel(substream, 0);
475} 477}
476 478
477static int snd_ca0106_pcm_open_1_capture(snd_pcm_substream_t *substream) 479static int snd_ca0106_pcm_open_1_capture(struct snd_pcm_substream *substream)
478{ 480{
479 return snd_ca0106_pcm_open_capture_channel(substream, 1); 481 return snd_ca0106_pcm_open_capture_channel(substream, 1);
480} 482}
481 483
482static int snd_ca0106_pcm_open_2_capture(snd_pcm_substream_t *substream) 484static int snd_ca0106_pcm_open_2_capture(struct snd_pcm_substream *substream)
483{ 485{
484 return snd_ca0106_pcm_open_capture_channel(substream, 2); 486 return snd_ca0106_pcm_open_capture_channel(substream, 2);
485} 487}
486 488
487static int snd_ca0106_pcm_open_3_capture(snd_pcm_substream_t *substream) 489static int snd_ca0106_pcm_open_3_capture(struct snd_pcm_substream *substream)
488{ 490{
489 return snd_ca0106_pcm_open_capture_channel(substream, 3); 491 return snd_ca0106_pcm_open_capture_channel(substream, 3);
490} 492}
491 493
492/* hw_params callback */ 494/* hw_params callback */
493static int snd_ca0106_pcm_hw_params_playback(snd_pcm_substream_t *substream, 495static int snd_ca0106_pcm_hw_params_playback(struct snd_pcm_substream *substream,
494 snd_pcm_hw_params_t * hw_params) 496 struct snd_pcm_hw_params *hw_params)
495{ 497{
496 return snd_pcm_lib_malloc_pages(substream, 498 return snd_pcm_lib_malloc_pages(substream,
497 params_buffer_bytes(hw_params)); 499 params_buffer_bytes(hw_params));
498} 500}
499 501
500/* hw_free callback */ 502/* hw_free callback */
501static int snd_ca0106_pcm_hw_free_playback(snd_pcm_substream_t *substream) 503static int snd_ca0106_pcm_hw_free_playback(struct snd_pcm_substream *substream)
502{ 504{
503 return snd_pcm_lib_free_pages(substream); 505 return snd_pcm_lib_free_pages(substream);
504} 506}
505 507
506/* hw_params callback */ 508/* hw_params callback */
507static int snd_ca0106_pcm_hw_params_capture(snd_pcm_substream_t *substream, 509static int snd_ca0106_pcm_hw_params_capture(struct snd_pcm_substream *substream,
508 snd_pcm_hw_params_t * hw_params) 510 struct snd_pcm_hw_params *hw_params)
509{ 511{
510 return snd_pcm_lib_malloc_pages(substream, 512 return snd_pcm_lib_malloc_pages(substream,
511 params_buffer_bytes(hw_params)); 513 params_buffer_bytes(hw_params));
512} 514}
513 515
514/* hw_free callback */ 516/* hw_free callback */
515static int snd_ca0106_pcm_hw_free_capture(snd_pcm_substream_t *substream) 517static int snd_ca0106_pcm_hw_free_capture(struct snd_pcm_substream *substream)
516{ 518{
517 return snd_pcm_lib_free_pages(substream); 519 return snd_pcm_lib_free_pages(substream);
518} 520}
519 521
520/* prepare playback callback */ 522/* prepare playback callback */
521static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream) 523static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream)
522{ 524{
523 ca0106_t *emu = snd_pcm_substream_chip(substream); 525 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
524 snd_pcm_runtime_t *runtime = substream->runtime; 526 struct snd_pcm_runtime *runtime = substream->runtime;
525 ca0106_pcm_t *epcm = runtime->private_data; 527 struct snd_ca0106_pcm *epcm = runtime->private_data;
526 int channel = epcm->channel_id; 528 int channel = epcm->channel_id;
527 u32 *table_base = (u32 *)(emu->buffer.area+(8*16*channel)); 529 u32 *table_base = (u32 *)(emu->buffer.area+(8*16*channel));
528 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); 530 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
@@ -619,11 +621,11 @@ static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream)
619} 621}
620 622
621/* prepare capture callback */ 623/* prepare capture callback */
622static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream) 624static int snd_ca0106_pcm_prepare_capture(struct snd_pcm_substream *substream)
623{ 625{
624 ca0106_t *emu = snd_pcm_substream_chip(substream); 626 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
625 snd_pcm_runtime_t *runtime = substream->runtime; 627 struct snd_pcm_runtime *runtime = substream->runtime;
626 ca0106_pcm_t *epcm = runtime->private_data; 628 struct snd_ca0106_pcm *epcm = runtime->private_data;
627 int channel = epcm->channel_id; 629 int channel = epcm->channel_id;
628 u32 hcfg_mask = HCFG_CAPTURE_S32_LE; 630 u32 hcfg_mask = HCFG_CAPTURE_S32_LE;
629 u32 hcfg_set = 0x00000000; 631 u32 hcfg_set = 0x00000000;
@@ -690,16 +692,16 @@ static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream)
690} 692}
691 693
692/* trigger_playback callback */ 694/* trigger_playback callback */
693static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream, 695static int snd_ca0106_pcm_trigger_playback(struct snd_pcm_substream *substream,
694 int cmd) 696 int cmd)
695{ 697{
696 ca0106_t *emu = snd_pcm_substream_chip(substream); 698 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
697 snd_pcm_runtime_t *runtime; 699 struct snd_pcm_runtime *runtime;
698 ca0106_pcm_t *epcm; 700 struct snd_ca0106_pcm *epcm;
699 int channel; 701 int channel;
700 int result = 0; 702 int result = 0;
701 struct list_head *pos; 703 struct list_head *pos;
702 snd_pcm_substream_t *s; 704 struct snd_pcm_substream *s;
703 u32 basic = 0; 705 u32 basic = 0;
704 u32 extended = 0; 706 u32 extended = 0;
705 int running=0; 707 int running=0;
@@ -743,12 +745,12 @@ static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream,
743} 745}
744 746
745/* trigger_capture callback */ 747/* trigger_capture callback */
746static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream, 748static int snd_ca0106_pcm_trigger_capture(struct snd_pcm_substream *substream,
747 int cmd) 749 int cmd)
748{ 750{
749 ca0106_t *emu = snd_pcm_substream_chip(substream); 751 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
750 snd_pcm_runtime_t *runtime = substream->runtime; 752 struct snd_pcm_runtime *runtime = substream->runtime;
751 ca0106_pcm_t *epcm = runtime->private_data; 753 struct snd_ca0106_pcm *epcm = runtime->private_data;
752 int channel = epcm->channel_id; 754 int channel = epcm->channel_id;
753 int result = 0; 755 int result = 0;
754 756
@@ -772,11 +774,11 @@ static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream,
772 774
773/* pointer_playback callback */ 775/* pointer_playback callback */
774static snd_pcm_uframes_t 776static snd_pcm_uframes_t
775snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream) 777snd_ca0106_pcm_pointer_playback(struct snd_pcm_substream *substream)
776{ 778{
777 ca0106_t *emu = snd_pcm_substream_chip(substream); 779 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
778 snd_pcm_runtime_t *runtime = substream->runtime; 780 struct snd_pcm_runtime *runtime = substream->runtime;
779 ca0106_pcm_t *epcm = runtime->private_data; 781 struct snd_ca0106_pcm *epcm = runtime->private_data;
780 snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0; 782 snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0;
781 int channel = epcm->channel_id; 783 int channel = epcm->channel_id;
782 784
@@ -799,11 +801,11 @@ snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream)
799 801
800/* pointer_capture callback */ 802/* pointer_capture callback */
801static snd_pcm_uframes_t 803static snd_pcm_uframes_t
802snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream) 804snd_ca0106_pcm_pointer_capture(struct snd_pcm_substream *substream)
803{ 805{
804 ca0106_t *emu = snd_pcm_substream_chip(substream); 806 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
805 snd_pcm_runtime_t *runtime = substream->runtime; 807 struct snd_pcm_runtime *runtime = substream->runtime;
806 ca0106_pcm_t *epcm = runtime->private_data; 808 struct snd_ca0106_pcm *epcm = runtime->private_data;
807 snd_pcm_uframes_t ptr, ptr1, ptr2 = 0; 809 snd_pcm_uframes_t ptr, ptr1, ptr2 = 0;
808 int channel = channel=epcm->channel_id; 810 int channel = channel=epcm->channel_id;
809 811
@@ -821,7 +823,7 @@ snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream)
821} 823}
822 824
823/* operators */ 825/* operators */
824static snd_pcm_ops_t snd_ca0106_playback_front_ops = { 826static struct snd_pcm_ops snd_ca0106_playback_front_ops = {
825 .open = snd_ca0106_pcm_open_playback_front, 827 .open = snd_ca0106_pcm_open_playback_front,
826 .close = snd_ca0106_pcm_close_playback, 828 .close = snd_ca0106_pcm_close_playback,
827 .ioctl = snd_pcm_lib_ioctl, 829 .ioctl = snd_pcm_lib_ioctl,
@@ -832,7 +834,7 @@ static snd_pcm_ops_t snd_ca0106_playback_front_ops = {
832 .pointer = snd_ca0106_pcm_pointer_playback, 834 .pointer = snd_ca0106_pcm_pointer_playback,
833}; 835};
834 836
835static snd_pcm_ops_t snd_ca0106_capture_0_ops = { 837static struct snd_pcm_ops snd_ca0106_capture_0_ops = {
836 .open = snd_ca0106_pcm_open_0_capture, 838 .open = snd_ca0106_pcm_open_0_capture,
837 .close = snd_ca0106_pcm_close_capture, 839 .close = snd_ca0106_pcm_close_capture,
838 .ioctl = snd_pcm_lib_ioctl, 840 .ioctl = snd_pcm_lib_ioctl,
@@ -843,7 +845,7 @@ static snd_pcm_ops_t snd_ca0106_capture_0_ops = {
843 .pointer = snd_ca0106_pcm_pointer_capture, 845 .pointer = snd_ca0106_pcm_pointer_capture,
844}; 846};
845 847
846static snd_pcm_ops_t snd_ca0106_capture_1_ops = { 848static struct snd_pcm_ops snd_ca0106_capture_1_ops = {
847 .open = snd_ca0106_pcm_open_1_capture, 849 .open = snd_ca0106_pcm_open_1_capture,
848 .close = snd_ca0106_pcm_close_capture, 850 .close = snd_ca0106_pcm_close_capture,
849 .ioctl = snd_pcm_lib_ioctl, 851 .ioctl = snd_pcm_lib_ioctl,
@@ -854,7 +856,7 @@ static snd_pcm_ops_t snd_ca0106_capture_1_ops = {
854 .pointer = snd_ca0106_pcm_pointer_capture, 856 .pointer = snd_ca0106_pcm_pointer_capture,
855}; 857};
856 858
857static snd_pcm_ops_t snd_ca0106_capture_2_ops = { 859static struct snd_pcm_ops snd_ca0106_capture_2_ops = {
858 .open = snd_ca0106_pcm_open_2_capture, 860 .open = snd_ca0106_pcm_open_2_capture,
859 .close = snd_ca0106_pcm_close_capture, 861 .close = snd_ca0106_pcm_close_capture,
860 .ioctl = snd_pcm_lib_ioctl, 862 .ioctl = snd_pcm_lib_ioctl,
@@ -865,7 +867,7 @@ static snd_pcm_ops_t snd_ca0106_capture_2_ops = {
865 .pointer = snd_ca0106_pcm_pointer_capture, 867 .pointer = snd_ca0106_pcm_pointer_capture,
866}; 868};
867 869
868static snd_pcm_ops_t snd_ca0106_capture_3_ops = { 870static struct snd_pcm_ops snd_ca0106_capture_3_ops = {
869 .open = snd_ca0106_pcm_open_3_capture, 871 .open = snd_ca0106_pcm_open_3_capture,
870 .close = snd_ca0106_pcm_close_capture, 872 .close = snd_ca0106_pcm_close_capture,
871 .ioctl = snd_pcm_lib_ioctl, 873 .ioctl = snd_pcm_lib_ioctl,
@@ -876,7 +878,7 @@ static snd_pcm_ops_t snd_ca0106_capture_3_ops = {
876 .pointer = snd_ca0106_pcm_pointer_capture, 878 .pointer = snd_ca0106_pcm_pointer_capture,
877}; 879};
878 880
879static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = { 881static struct snd_pcm_ops snd_ca0106_playback_center_lfe_ops = {
880 .open = snd_ca0106_pcm_open_playback_center_lfe, 882 .open = snd_ca0106_pcm_open_playback_center_lfe,
881 .close = snd_ca0106_pcm_close_playback, 883 .close = snd_ca0106_pcm_close_playback,
882 .ioctl = snd_pcm_lib_ioctl, 884 .ioctl = snd_pcm_lib_ioctl,
@@ -887,7 +889,7 @@ static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = {
887 .pointer = snd_ca0106_pcm_pointer_playback, 889 .pointer = snd_ca0106_pcm_pointer_playback,
888}; 890};
889 891
890static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = { 892static struct snd_pcm_ops snd_ca0106_playback_unknown_ops = {
891 .open = snd_ca0106_pcm_open_playback_unknown, 893 .open = snd_ca0106_pcm_open_playback_unknown,
892 .close = snd_ca0106_pcm_close_playback, 894 .close = snd_ca0106_pcm_close_playback,
893 .ioctl = snd_pcm_lib_ioctl, 895 .ioctl = snd_pcm_lib_ioctl,
@@ -898,7 +900,7 @@ static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = {
898 .pointer = snd_ca0106_pcm_pointer_playback, 900 .pointer = snd_ca0106_pcm_pointer_playback,
899}; 901};
900 902
901static snd_pcm_ops_t snd_ca0106_playback_rear_ops = { 903static struct snd_pcm_ops snd_ca0106_playback_rear_ops = {
902 .open = snd_ca0106_pcm_open_playback_rear, 904 .open = snd_ca0106_pcm_open_playback_rear,
903 .close = snd_ca0106_pcm_close_playback, 905 .close = snd_ca0106_pcm_close_playback,
904 .ioctl = snd_pcm_lib_ioctl, 906 .ioctl = snd_pcm_lib_ioctl,
@@ -910,10 +912,10 @@ static snd_pcm_ops_t snd_ca0106_playback_rear_ops = {
910}; 912};
911 913
912 914
913static unsigned short snd_ca0106_ac97_read(ac97_t *ac97, 915static unsigned short snd_ca0106_ac97_read(struct snd_ac97 *ac97,
914 unsigned short reg) 916 unsigned short reg)
915{ 917{
916 ca0106_t *emu = ac97->private_data; 918 struct snd_ca0106 *emu = ac97->private_data;
917 unsigned long flags; 919 unsigned long flags;
918 unsigned short val; 920 unsigned short val;
919 921
@@ -924,10 +926,10 @@ static unsigned short snd_ca0106_ac97_read(ac97_t *ac97,
924 return val; 926 return val;
925} 927}
926 928
927static void snd_ca0106_ac97_write(ac97_t *ac97, 929static void snd_ca0106_ac97_write(struct snd_ac97 *ac97,
928 unsigned short reg, unsigned short val) 930 unsigned short reg, unsigned short val)
929{ 931{
930 ca0106_t *emu = ac97->private_data; 932 struct snd_ca0106 *emu = ac97->private_data;
931 unsigned long flags; 933 unsigned long flags;
932 934
933 spin_lock_irqsave(&emu->emu_lock, flags); 935 spin_lock_irqsave(&emu->emu_lock, flags);
@@ -936,12 +938,12 @@ static void snd_ca0106_ac97_write(ac97_t *ac97,
936 spin_unlock_irqrestore(&emu->emu_lock, flags); 938 spin_unlock_irqrestore(&emu->emu_lock, flags);
937} 939}
938 940
939static int snd_ca0106_ac97(ca0106_t *chip) 941static int snd_ca0106_ac97(struct snd_ca0106 *chip)
940{ 942{
941 ac97_bus_t *pbus; 943 struct snd_ac97_bus *pbus;
942 ac97_template_t ac97; 944 struct snd_ac97_template ac97;
943 int err; 945 int err;
944 static ac97_bus_ops_t ops = { 946 static struct snd_ac97_bus_ops ops = {
945 .write = snd_ca0106_ac97_write, 947 .write = snd_ca0106_ac97_write,
946 .read = snd_ca0106_ac97_read, 948 .read = snd_ca0106_ac97_read,
947 }; 949 };
@@ -956,7 +958,7 @@ static int snd_ca0106_ac97(ca0106_t *chip)
956 return snd_ac97_mixer(pbus, &ac97, &chip->ac97); 958 return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
957} 959}
958 960
959static int snd_ca0106_free(ca0106_t *chip) 961static int snd_ca0106_free(struct snd_ca0106 *chip)
960{ 962{
961 if (chip->res_port != NULL) { /* avoid access to already used hardware */ 963 if (chip->res_port != NULL) { /* avoid access to already used hardware */
962 // disable interrupts 964 // disable interrupts
@@ -989,9 +991,9 @@ static int snd_ca0106_free(ca0106_t *chip)
989 return 0; 991 return 0;
990} 992}
991 993
992static int snd_ca0106_dev_free(snd_device_t *device) 994static int snd_ca0106_dev_free(struct snd_device *device)
993{ 995{
994 ca0106_t *chip = device->device_data; 996 struct snd_ca0106 *chip = device->device_data;
995 return snd_ca0106_free(chip); 997 return snd_ca0106_free(chip);
996} 998}
997 999
@@ -1000,14 +1002,13 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id,
1000{ 1002{
1001 unsigned int status; 1003 unsigned int status;
1002 1004
1003 ca0106_t *chip = dev_id; 1005 struct snd_ca0106 *chip = dev_id;
1004 int i; 1006 int i;
1005 int mask; 1007 int mask;
1006 unsigned int stat76; 1008 unsigned int stat76;
1007 ca0106_channel_t *pchannel; 1009 struct snd_ca0106_channel *pchannel;
1008 1010
1009 status = inl(chip->port + IPR); 1011 status = inl(chip->port + IPR);
1010
1011 if (! status) 1012 if (! status)
1012 return IRQ_NONE; 1013 return IRQ_NONE;
1013 1014
@@ -1059,10 +1060,10 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id,
1059 return IRQ_HANDLED; 1060 return IRQ_HANDLED;
1060} 1061}
1061 1062
1062static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm) 1063static int __devinit snd_ca0106_pcm(struct snd_ca0106 *emu, int device, struct snd_pcm **rpcm)
1063{ 1064{
1064 snd_pcm_t *pcm; 1065 struct snd_pcm *pcm;
1065 snd_pcm_substream_t *substream; 1066 struct snd_pcm_substream *substream;
1066 int err; 1067 int err;
1067 1068
1068 if (rpcm) 1069 if (rpcm)
@@ -1122,15 +1123,15 @@ static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm)
1122 return 0; 1123 return 0;
1123} 1124}
1124 1125
1125static int __devinit snd_ca0106_create(snd_card_t *card, 1126static int __devinit snd_ca0106_create(struct snd_card *card,
1126 struct pci_dev *pci, 1127 struct pci_dev *pci,
1127 ca0106_t **rchip) 1128 struct snd_ca0106 **rchip)
1128{ 1129{
1129 ca0106_t *chip; 1130 struct snd_ca0106 *chip;
1130 ca0106_details_t *c; 1131 struct snd_ca0106_details *c;
1131 int err; 1132 int err;
1132 int ch; 1133 int ch;
1133 static snd_device_ops_t ops = { 1134 static struct snd_device_ops ops = {
1134 .dev_free = snd_ca0106_dev_free, 1135 .dev_free = snd_ca0106_dev_free,
1135 }; 1136 };
1136 1137
@@ -1314,39 +1315,40 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
1314} 1315}
1315 1316
1316 1317
1317static void ca0106_midi_interrupt_enable(ca_midi_t *midi, int intr) 1318static void ca0106_midi_interrupt_enable(struct snd_ca_midi *midi, int intr)
1318{ 1319{
1319 snd_ca0106_intr_enable((ca0106_t *)(midi->dev_id), intr); 1320 snd_ca0106_intr_enable((struct snd_ca0106 *)(midi->dev_id), intr);
1320} 1321}
1321 1322
1322static void ca0106_midi_interrupt_disable(ca_midi_t *midi, int intr) 1323static void ca0106_midi_interrupt_disable(struct snd_ca_midi *midi, int intr)
1323{ 1324{
1324 snd_ca0106_intr_disable((ca0106_t *)(midi->dev_id), intr); 1325 snd_ca0106_intr_disable((struct snd_ca0106 *)(midi->dev_id), intr);
1325} 1326}
1326 1327
1327static unsigned char ca0106_midi_read(ca_midi_t *midi, int idx) 1328static unsigned char ca0106_midi_read(struct snd_ca_midi *midi, int idx)
1328{ 1329{
1329 return (unsigned char)snd_ca0106_ptr_read((ca0106_t *)(midi->dev_id), midi->port + idx, 0); 1330 return (unsigned char)snd_ca0106_ptr_read((struct snd_ca0106 *)(midi->dev_id),
1331 midi->port + idx, 0);
1330} 1332}
1331 1333
1332static void ca0106_midi_write(ca_midi_t *midi, int data, int idx) 1334static void ca0106_midi_write(struct snd_ca_midi *midi, int data, int idx)
1333{ 1335{
1334 snd_ca0106_ptr_write((ca0106_t *)(midi->dev_id), midi->port + idx, 0, data); 1336 snd_ca0106_ptr_write((struct snd_ca0106 *)(midi->dev_id), midi->port + idx, 0, data);
1335} 1337}
1336 1338
1337static snd_card_t *ca0106_dev_id_card(void *dev_id) 1339static struct snd_card *ca0106_dev_id_card(void *dev_id)
1338{ 1340{
1339 return ((ca0106_t *)dev_id)->card; 1341 return ((struct snd_ca0106 *)dev_id)->card;
1340} 1342}
1341 1343
1342static int ca0106_dev_id_port(void *dev_id) 1344static int ca0106_dev_id_port(void *dev_id)
1343{ 1345{
1344 return ((ca0106_t *)dev_id)->port; 1346 return ((struct snd_ca0106 *)dev_id)->port;
1345} 1347}
1346 1348
1347static int __devinit snd_ca0106_midi(ca0106_t *chip, unsigned int channel) 1349static int __devinit snd_ca0106_midi(struct snd_ca0106 *chip, unsigned int channel)
1348{ 1350{
1349 ca_midi_t *midi; 1351 struct snd_ca_midi *midi;
1350 char *name; 1352 char *name;
1351 int err; 1353 int err;
1352 1354
@@ -1399,8 +1401,8 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
1399 const struct pci_device_id *pci_id) 1401 const struct pci_device_id *pci_id)
1400{ 1402{
1401 static int dev; 1403 static int dev;
1402 snd_card_t *card; 1404 struct snd_card *card;
1403 ca0106_t *chip; 1405 struct snd_ca0106 *chip;
1404 int err; 1406 int err;
1405 1407
1406 if (dev >= SNDRV_CARDS) 1408 if (dev >= SNDRV_CARDS)