diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:31:42 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:18:23 -0500 |
commit | d3a7e476740dc23588ea65fa0df1aacdf8e70003 (patch) | |
tree | f3526502e60c587df54394b2e0117996ae25442a /sound/isa | |
parent | ba2375a45c528fd902676ea01014ea0f8931464b (diff) |
[ALSA] Remove xxx_t typedefs: ISA ES1688
Modules: ES1688 driver
Remove xxx_t typedefs from the ISA ES1688 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/es1688/es1688.c | 10 | ||||
-rw-r--r-- | sound/isa/es1688/es1688_lib.c | 150 |
2 files changed, 80 insertions, 80 deletions
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index 26a7d335ed8e..278511bd0950 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c | |||
@@ -68,7 +68,7 @@ MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for ESx688 driver."); | |||
68 | module_param_array(dma8, int, NULL, 0444); | 68 | module_param_array(dma8, int, NULL, 0444); |
69 | MODULE_PARM_DESC(dma8, "8-bit DMA # for ESx688 driver."); | 69 | MODULE_PARM_DESC(dma8, "8-bit DMA # for ESx688 driver."); |
70 | 70 | ||
71 | static snd_card_t *snd_audiodrive_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; | 71 | static struct snd_card *snd_audiodrive_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; |
72 | 72 | ||
73 | #define PFX "es1688: " | 73 | #define PFX "es1688: " |
74 | 74 | ||
@@ -77,10 +77,10 @@ static int __init snd_audiodrive_probe(int dev) | |||
77 | static int possible_irqs[] = {5, 9, 10, 7, -1}; | 77 | static int possible_irqs[] = {5, 9, 10, 7, -1}; |
78 | static int possible_dmas[] = {1, 3, 0, -1}; | 78 | static int possible_dmas[] = {1, 3, 0, -1}; |
79 | int xirq, xdma, xmpu_irq; | 79 | int xirq, xdma, xmpu_irq; |
80 | snd_card_t *card; | 80 | struct snd_card *card; |
81 | es1688_t *chip; | 81 | struct snd_es1688 *chip; |
82 | opl3_t *opl3; | 82 | struct snd_opl3 *opl3; |
83 | snd_pcm_t *pcm; | 83 | struct snd_pcm *pcm; |
84 | int err; | 84 | int err; |
85 | 85 | ||
86 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | 86 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); |
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 841e9ac8c664..702ad51ee9d5 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c | |||
@@ -36,7 +36,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); | |||
36 | MODULE_DESCRIPTION("ESS ESx688 lowlevel module"); | 36 | MODULE_DESCRIPTION("ESS ESx688 lowlevel module"); |
37 | MODULE_LICENSE("GPL"); | 37 | MODULE_LICENSE("GPL"); |
38 | 38 | ||
39 | static int snd_es1688_dsp_command(es1688_t *chip, unsigned char val) | 39 | static int snd_es1688_dsp_command(struct snd_es1688 *chip, unsigned char val) |
40 | { | 40 | { |
41 | int i; | 41 | int i; |
42 | 42 | ||
@@ -51,7 +51,7 @@ static int snd_es1688_dsp_command(es1688_t *chip, unsigned char val) | |||
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
53 | 53 | ||
54 | static int snd_es1688_dsp_get_byte(es1688_t *chip) | 54 | static int snd_es1688_dsp_get_byte(struct snd_es1688 *chip) |
55 | { | 55 | { |
56 | int i; | 56 | int i; |
57 | 57 | ||
@@ -62,7 +62,7 @@ static int snd_es1688_dsp_get_byte(es1688_t *chip) | |||
62 | return -ENODEV; | 62 | return -ENODEV; |
63 | } | 63 | } |
64 | 64 | ||
65 | static int snd_es1688_write(es1688_t *chip, | 65 | static int snd_es1688_write(struct snd_es1688 *chip, |
66 | unsigned char reg, unsigned char data) | 66 | unsigned char reg, unsigned char data) |
67 | { | 67 | { |
68 | if (!snd_es1688_dsp_command(chip, reg)) | 68 | if (!snd_es1688_dsp_command(chip, reg)) |
@@ -70,7 +70,7 @@ static int snd_es1688_write(es1688_t *chip, | |||
70 | return snd_es1688_dsp_command(chip, data); | 70 | return snd_es1688_dsp_command(chip, data); |
71 | } | 71 | } |
72 | 72 | ||
73 | static int snd_es1688_read(es1688_t *chip, unsigned char reg) | 73 | static int snd_es1688_read(struct snd_es1688 *chip, unsigned char reg) |
74 | { | 74 | { |
75 | /* Read a byte from an extended mode register of ES1688 */ | 75 | /* Read a byte from an extended mode register of ES1688 */ |
76 | if (!snd_es1688_dsp_command(chip, 0xc0)) | 76 | if (!snd_es1688_dsp_command(chip, 0xc0)) |
@@ -80,7 +80,7 @@ static int snd_es1688_read(es1688_t *chip, unsigned char reg) | |||
80 | return snd_es1688_dsp_get_byte(chip); | 80 | return snd_es1688_dsp_get_byte(chip); |
81 | } | 81 | } |
82 | 82 | ||
83 | void snd_es1688_mixer_write(es1688_t *chip, | 83 | void snd_es1688_mixer_write(struct snd_es1688 *chip, |
84 | unsigned char reg, unsigned char data) | 84 | unsigned char reg, unsigned char data) |
85 | { | 85 | { |
86 | outb(reg, ES1688P(chip, MIXER_ADDR)); | 86 | outb(reg, ES1688P(chip, MIXER_ADDR)); |
@@ -89,7 +89,7 @@ void snd_es1688_mixer_write(es1688_t *chip, | |||
89 | udelay(10); | 89 | udelay(10); |
90 | } | 90 | } |
91 | 91 | ||
92 | static unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg) | 92 | static unsigned char snd_es1688_mixer_read(struct snd_es1688 *chip, unsigned char reg) |
93 | { | 93 | { |
94 | unsigned char result; | 94 | unsigned char result; |
95 | 95 | ||
@@ -100,7 +100,7 @@ static unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg) | |||
100 | return result; | 100 | return result; |
101 | } | 101 | } |
102 | 102 | ||
103 | static int snd_es1688_reset(es1688_t *chip) | 103 | static int snd_es1688_reset(struct snd_es1688 *chip) |
104 | { | 104 | { |
105 | int i; | 105 | int i; |
106 | 106 | ||
@@ -117,7 +117,7 @@ static int snd_es1688_reset(es1688_t *chip) | |||
117 | return 0; | 117 | return 0; |
118 | } | 118 | } |
119 | 119 | ||
120 | static int snd_es1688_probe(es1688_t *chip) | 120 | static int snd_es1688_probe(struct snd_es1688 *chip) |
121 | { | 121 | { |
122 | unsigned long flags; | 122 | unsigned long flags; |
123 | unsigned short major, minor, hw; | 123 | unsigned short major, minor, hw; |
@@ -191,7 +191,7 @@ static int snd_es1688_probe(es1688_t *chip) | |||
191 | return 0; | 191 | return 0; |
192 | } | 192 | } |
193 | 193 | ||
194 | static int snd_es1688_init(es1688_t * chip, int enable) | 194 | static int snd_es1688_init(struct snd_es1688 * chip, int enable) |
195 | { | 195 | { |
196 | static int irqs[16] = {-1, -1, 0, -1, -1, 1, -1, 2, -1, 0, 3, -1, -1, -1, -1, -1}; | 196 | static int irqs[16] = {-1, -1, 0, -1, -1, 1, -1, 2, -1, 0, 3, -1, -1, -1, -1, -1}; |
197 | unsigned long flags; | 197 | unsigned long flags; |
@@ -283,7 +283,7 @@ static int snd_es1688_init(es1688_t * chip, int enable) | |||
283 | 283 | ||
284 | */ | 284 | */ |
285 | 285 | ||
286 | static ratnum_t clocks[2] = { | 286 | static struct snd_ratnum clocks[2] = { |
287 | { | 287 | { |
288 | .num = 795444, | 288 | .num = 795444, |
289 | .den_min = 1, | 289 | .den_min = 1, |
@@ -298,14 +298,14 @@ static ratnum_t clocks[2] = { | |||
298 | } | 298 | } |
299 | }; | 299 | }; |
300 | 300 | ||
301 | static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = { | 301 | static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { |
302 | .nrats = 2, | 302 | .nrats = 2, |
303 | .rats = clocks, | 303 | .rats = clocks, |
304 | }; | 304 | }; |
305 | 305 | ||
306 | static void snd_es1688_set_rate(es1688_t *chip, snd_pcm_substream_t *substream) | 306 | static void snd_es1688_set_rate(struct snd_es1688 *chip, struct snd_pcm_substream *substream) |
307 | { | 307 | { |
308 | snd_pcm_runtime_t *runtime = substream->runtime; | 308 | struct snd_pcm_runtime *runtime = substream->runtime; |
309 | unsigned int bits, divider; | 309 | unsigned int bits, divider; |
310 | 310 | ||
311 | if (runtime->rate_num == clocks[0].num) | 311 | if (runtime->rate_num == clocks[0].num) |
@@ -319,13 +319,13 @@ static void snd_es1688_set_rate(es1688_t *chip, snd_pcm_substream_t *substream) | |||
319 | snd_es1688_write(chip, 0xa2, divider); | 319 | snd_es1688_write(chip, 0xa2, divider); |
320 | } | 320 | } |
321 | 321 | ||
322 | static int snd_es1688_ioctl(snd_pcm_substream_t * substream, | 322 | static int snd_es1688_ioctl(struct snd_pcm_substream *substream, |
323 | unsigned int cmd, void *arg) | 323 | unsigned int cmd, void *arg) |
324 | { | 324 | { |
325 | return snd_pcm_lib_ioctl(substream, cmd, arg); | 325 | return snd_pcm_lib_ioctl(substream, cmd, arg); |
326 | } | 326 | } |
327 | 327 | ||
328 | static int snd_es1688_trigger(es1688_t *chip, int cmd, unsigned char value) | 328 | static int snd_es1688_trigger(struct snd_es1688 *chip, int cmd, unsigned char value) |
329 | { | 329 | { |
330 | int val; | 330 | int val; |
331 | 331 | ||
@@ -350,22 +350,22 @@ static int snd_es1688_trigger(es1688_t *chip, int cmd, unsigned char value) | |||
350 | return 0; | 350 | return 0; |
351 | } | 351 | } |
352 | 352 | ||
353 | static int snd_es1688_hw_params(snd_pcm_substream_t * substream, | 353 | static int snd_es1688_hw_params(struct snd_pcm_substream *substream, |
354 | snd_pcm_hw_params_t * hw_params) | 354 | struct snd_pcm_hw_params *hw_params) |
355 | { | 355 | { |
356 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); | 356 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); |
357 | } | 357 | } |
358 | 358 | ||
359 | static int snd_es1688_hw_free(snd_pcm_substream_t * substream) | 359 | static int snd_es1688_hw_free(struct snd_pcm_substream *substream) |
360 | { | 360 | { |
361 | return snd_pcm_lib_free_pages(substream); | 361 | return snd_pcm_lib_free_pages(substream); |
362 | } | 362 | } |
363 | 363 | ||
364 | static int snd_es1688_playback_prepare(snd_pcm_substream_t * substream) | 364 | static int snd_es1688_playback_prepare(struct snd_pcm_substream *substream) |
365 | { | 365 | { |
366 | unsigned long flags; | 366 | unsigned long flags; |
367 | es1688_t *chip = snd_pcm_substream_chip(substream); | 367 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
368 | snd_pcm_runtime_t *runtime = substream->runtime; | 368 | struct snd_pcm_runtime *runtime = substream->runtime; |
369 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); | 369 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); |
370 | unsigned int count = snd_pcm_lib_period_bytes(substream); | 370 | unsigned int count = snd_pcm_lib_period_bytes(substream); |
371 | 371 | ||
@@ -415,18 +415,18 @@ static int snd_es1688_playback_prepare(snd_pcm_substream_t * substream) | |||
415 | return 0; | 415 | return 0; |
416 | } | 416 | } |
417 | 417 | ||
418 | static int snd_es1688_playback_trigger(snd_pcm_substream_t * substream, | 418 | static int snd_es1688_playback_trigger(struct snd_pcm_substream *substream, |
419 | int cmd) | 419 | int cmd) |
420 | { | 420 | { |
421 | es1688_t *chip = snd_pcm_substream_chip(substream); | 421 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
422 | return snd_es1688_trigger(chip, cmd, 0x05); | 422 | return snd_es1688_trigger(chip, cmd, 0x05); |
423 | } | 423 | } |
424 | 424 | ||
425 | static int snd_es1688_capture_prepare(snd_pcm_substream_t * substream) | 425 | static int snd_es1688_capture_prepare(struct snd_pcm_substream *substream) |
426 | { | 426 | { |
427 | unsigned long flags; | 427 | unsigned long flags; |
428 | es1688_t *chip = snd_pcm_substream_chip(substream); | 428 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
429 | snd_pcm_runtime_t *runtime = substream->runtime; | 429 | struct snd_pcm_runtime *runtime = substream->runtime; |
430 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); | 430 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); |
431 | unsigned int count = snd_pcm_lib_period_bytes(substream); | 431 | unsigned int count = snd_pcm_lib_period_bytes(substream); |
432 | 432 | ||
@@ -472,16 +472,16 @@ static int snd_es1688_capture_prepare(snd_pcm_substream_t * substream) | |||
472 | return 0; | 472 | return 0; |
473 | } | 473 | } |
474 | 474 | ||
475 | static int snd_es1688_capture_trigger(snd_pcm_substream_t * substream, | 475 | static int snd_es1688_capture_trigger(struct snd_pcm_substream *substream, |
476 | int cmd) | 476 | int cmd) |
477 | { | 477 | { |
478 | es1688_t *chip = snd_pcm_substream_chip(substream); | 478 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
479 | return snd_es1688_trigger(chip, cmd, 0x0f); | 479 | return snd_es1688_trigger(chip, cmd, 0x0f); |
480 | } | 480 | } |
481 | 481 | ||
482 | static irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 482 | static irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
483 | { | 483 | { |
484 | es1688_t *chip = dev_id; | 484 | struct snd_es1688 *chip = dev_id; |
485 | 485 | ||
486 | if (chip->trigger_value == 0x05) /* ok.. playback is active */ | 486 | if (chip->trigger_value == 0x05) /* ok.. playback is active */ |
487 | snd_pcm_period_elapsed(chip->playback_substream); | 487 | snd_pcm_period_elapsed(chip->playback_substream); |
@@ -492,9 +492,9 @@ static irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *r | |||
492 | return IRQ_HANDLED; | 492 | return IRQ_HANDLED; |
493 | } | 493 | } |
494 | 494 | ||
495 | static snd_pcm_uframes_t snd_es1688_playback_pointer(snd_pcm_substream_t * substream) | 495 | static snd_pcm_uframes_t snd_es1688_playback_pointer(struct snd_pcm_substream *substream) |
496 | { | 496 | { |
497 | es1688_t *chip = snd_pcm_substream_chip(substream); | 497 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
498 | size_t ptr; | 498 | size_t ptr; |
499 | 499 | ||
500 | if (chip->trigger_value != 0x05) | 500 | if (chip->trigger_value != 0x05) |
@@ -503,9 +503,9 @@ static snd_pcm_uframes_t snd_es1688_playback_pointer(snd_pcm_substream_t * subst | |||
503 | return bytes_to_frames(substream->runtime, ptr); | 503 | return bytes_to_frames(substream->runtime, ptr); |
504 | } | 504 | } |
505 | 505 | ||
506 | static snd_pcm_uframes_t snd_es1688_capture_pointer(snd_pcm_substream_t * substream) | 506 | static snd_pcm_uframes_t snd_es1688_capture_pointer(struct snd_pcm_substream *substream) |
507 | { | 507 | { |
508 | es1688_t *chip = snd_pcm_substream_chip(substream); | 508 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
509 | size_t ptr; | 509 | size_t ptr; |
510 | 510 | ||
511 | if (chip->trigger_value != 0x0f) | 511 | if (chip->trigger_value != 0x0f) |
@@ -518,7 +518,7 @@ static snd_pcm_uframes_t snd_es1688_capture_pointer(snd_pcm_substream_t * substr | |||
518 | 518 | ||
519 | */ | 519 | */ |
520 | 520 | ||
521 | static snd_pcm_hardware_t snd_es1688_playback = | 521 | static struct snd_pcm_hardware snd_es1688_playback = |
522 | { | 522 | { |
523 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 523 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
524 | SNDRV_PCM_INFO_MMAP_VALID), | 524 | SNDRV_PCM_INFO_MMAP_VALID), |
@@ -536,7 +536,7 @@ static snd_pcm_hardware_t snd_es1688_playback = | |||
536 | .fifo_size = 0, | 536 | .fifo_size = 0, |
537 | }; | 537 | }; |
538 | 538 | ||
539 | static snd_pcm_hardware_t snd_es1688_capture = | 539 | static struct snd_pcm_hardware snd_es1688_capture = |
540 | { | 540 | { |
541 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 541 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
542 | SNDRV_PCM_INFO_MMAP_VALID), | 542 | SNDRV_PCM_INFO_MMAP_VALID), |
@@ -558,10 +558,10 @@ static snd_pcm_hardware_t snd_es1688_capture = | |||
558 | 558 | ||
559 | */ | 559 | */ |
560 | 560 | ||
561 | static int snd_es1688_playback_open(snd_pcm_substream_t * substream) | 561 | static int snd_es1688_playback_open(struct snd_pcm_substream *substream) |
562 | { | 562 | { |
563 | es1688_t *chip = snd_pcm_substream_chip(substream); | 563 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
564 | snd_pcm_runtime_t *runtime = substream->runtime; | 564 | struct snd_pcm_runtime *runtime = substream->runtime; |
565 | 565 | ||
566 | if (chip->capture_substream != NULL) | 566 | if (chip->capture_substream != NULL) |
567 | return -EAGAIN; | 567 | return -EAGAIN; |
@@ -572,10 +572,10 @@ static int snd_es1688_playback_open(snd_pcm_substream_t * substream) | |||
572 | return 0; | 572 | return 0; |
573 | } | 573 | } |
574 | 574 | ||
575 | static int snd_es1688_capture_open(snd_pcm_substream_t * substream) | 575 | static int snd_es1688_capture_open(struct snd_pcm_substream *substream) |
576 | { | 576 | { |
577 | es1688_t *chip = snd_pcm_substream_chip(substream); | 577 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
578 | snd_pcm_runtime_t *runtime = substream->runtime; | 578 | struct snd_pcm_runtime *runtime = substream->runtime; |
579 | 579 | ||
580 | if (chip->playback_substream != NULL) | 580 | if (chip->playback_substream != NULL) |
581 | return -EAGAIN; | 581 | return -EAGAIN; |
@@ -586,23 +586,23 @@ static int snd_es1688_capture_open(snd_pcm_substream_t * substream) | |||
586 | return 0; | 586 | return 0; |
587 | } | 587 | } |
588 | 588 | ||
589 | static int snd_es1688_playback_close(snd_pcm_substream_t * substream) | 589 | static int snd_es1688_playback_close(struct snd_pcm_substream *substream) |
590 | { | 590 | { |
591 | es1688_t *chip = snd_pcm_substream_chip(substream); | 591 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
592 | 592 | ||
593 | chip->playback_substream = NULL; | 593 | chip->playback_substream = NULL; |
594 | return 0; | 594 | return 0; |
595 | } | 595 | } |
596 | 596 | ||
597 | static int snd_es1688_capture_close(snd_pcm_substream_t * substream) | 597 | static int snd_es1688_capture_close(struct snd_pcm_substream *substream) |
598 | { | 598 | { |
599 | es1688_t *chip = snd_pcm_substream_chip(substream); | 599 | struct snd_es1688 *chip = snd_pcm_substream_chip(substream); |
600 | 600 | ||
601 | chip->capture_substream = NULL; | 601 | chip->capture_substream = NULL; |
602 | return 0; | 602 | return 0; |
603 | } | 603 | } |
604 | 604 | ||
605 | static int snd_es1688_free(es1688_t *chip) | 605 | static int snd_es1688_free(struct snd_es1688 *chip) |
606 | { | 606 | { |
607 | if (chip->res_port) { | 607 | if (chip->res_port) { |
608 | snd_es1688_init(chip, 0); | 608 | snd_es1688_init(chip, 0); |
@@ -618,33 +618,33 @@ static int snd_es1688_free(es1688_t *chip) | |||
618 | return 0; | 618 | return 0; |
619 | } | 619 | } |
620 | 620 | ||
621 | static int snd_es1688_dev_free(snd_device_t *device) | 621 | static int snd_es1688_dev_free(struct snd_device *device) |
622 | { | 622 | { |
623 | es1688_t *chip = device->device_data; | 623 | struct snd_es1688 *chip = device->device_data; |
624 | return snd_es1688_free(chip); | 624 | return snd_es1688_free(chip); |
625 | } | 625 | } |
626 | 626 | ||
627 | static const char *snd_es1688_chip_id(es1688_t *chip) | 627 | static const char *snd_es1688_chip_id(struct snd_es1688 *chip) |
628 | { | 628 | { |
629 | static char tmp[16]; | 629 | static char tmp[16]; |
630 | sprintf(tmp, "ES%s688 rev %i", chip->hardware == ES1688_HW_688 ? "" : "1", chip->version & 0x0f); | 630 | sprintf(tmp, "ES%s688 rev %i", chip->hardware == ES1688_HW_688 ? "" : "1", chip->version & 0x0f); |
631 | return tmp; | 631 | return tmp; |
632 | } | 632 | } |
633 | 633 | ||
634 | int snd_es1688_create(snd_card_t * card, | 634 | int snd_es1688_create(struct snd_card *card, |
635 | unsigned long port, | 635 | unsigned long port, |
636 | unsigned long mpu_port, | 636 | unsigned long mpu_port, |
637 | int irq, | 637 | int irq, |
638 | int mpu_irq, | 638 | int mpu_irq, |
639 | int dma8, | 639 | int dma8, |
640 | unsigned short hardware, | 640 | unsigned short hardware, |
641 | es1688_t **rchip) | 641 | struct snd_es1688 **rchip) |
642 | { | 642 | { |
643 | static snd_device_ops_t ops = { | 643 | static struct snd_device_ops ops = { |
644 | .dev_free = snd_es1688_dev_free, | 644 | .dev_free = snd_es1688_dev_free, |
645 | }; | 645 | }; |
646 | 646 | ||
647 | es1688_t *chip; | 647 | struct snd_es1688 *chip; |
648 | int err; | 648 | int err; |
649 | 649 | ||
650 | *rchip = NULL; | 650 | *rchip = NULL; |
@@ -702,7 +702,7 @@ int snd_es1688_create(snd_card_t * card, | |||
702 | return 0; | 702 | return 0; |
703 | } | 703 | } |
704 | 704 | ||
705 | static snd_pcm_ops_t snd_es1688_playback_ops = { | 705 | static struct snd_pcm_ops snd_es1688_playback_ops = { |
706 | .open = snd_es1688_playback_open, | 706 | .open = snd_es1688_playback_open, |
707 | .close = snd_es1688_playback_close, | 707 | .close = snd_es1688_playback_close, |
708 | .ioctl = snd_es1688_ioctl, | 708 | .ioctl = snd_es1688_ioctl, |
@@ -713,7 +713,7 @@ static snd_pcm_ops_t snd_es1688_playback_ops = { | |||
713 | .pointer = snd_es1688_playback_pointer, | 713 | .pointer = snd_es1688_playback_pointer, |
714 | }; | 714 | }; |
715 | 715 | ||
716 | static snd_pcm_ops_t snd_es1688_capture_ops = { | 716 | static struct snd_pcm_ops snd_es1688_capture_ops = { |
717 | .open = snd_es1688_capture_open, | 717 | .open = snd_es1688_capture_open, |
718 | .close = snd_es1688_capture_close, | 718 | .close = snd_es1688_capture_close, |
719 | .ioctl = snd_es1688_ioctl, | 719 | .ioctl = snd_es1688_ioctl, |
@@ -724,9 +724,9 @@ static snd_pcm_ops_t snd_es1688_capture_ops = { | |||
724 | .pointer = snd_es1688_capture_pointer, | 724 | .pointer = snd_es1688_capture_pointer, |
725 | }; | 725 | }; |
726 | 726 | ||
727 | int snd_es1688_pcm(es1688_t * chip, int device, snd_pcm_t ** rpcm) | 727 | int snd_es1688_pcm(struct snd_es1688 * chip, int device, struct snd_pcm ** rpcm) |
728 | { | 728 | { |
729 | snd_pcm_t *pcm; | 729 | struct snd_pcm *pcm; |
730 | int err; | 730 | int err; |
731 | 731 | ||
732 | if ((err = snd_pcm_new(chip->card, "ESx688", device, 1, 1, &pcm)) < 0) | 732 | if ((err = snd_pcm_new(chip->card, "ESx688", device, 1, 1, &pcm)) < 0) |
@@ -753,7 +753,7 @@ int snd_es1688_pcm(es1688_t * chip, int device, snd_pcm_t ** rpcm) | |||
753 | * MIXER part | 753 | * MIXER part |
754 | */ | 754 | */ |
755 | 755 | ||
756 | static int snd_es1688_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 756 | static int snd_es1688_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
757 | { | 757 | { |
758 | static char *texts[9] = { | 758 | static char *texts[9] = { |
759 | "Mic", "Mic Master", "CD", "AOUT", | 759 | "Mic", "Mic Master", "CD", "AOUT", |
@@ -769,16 +769,16 @@ static int snd_es1688_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u | |||
769 | return 0; | 769 | return 0; |
770 | } | 770 | } |
771 | 771 | ||
772 | static int snd_es1688_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 772 | static int snd_es1688_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
773 | { | 773 | { |
774 | es1688_t *chip = snd_kcontrol_chip(kcontrol); | 774 | struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); |
775 | ucontrol->value.enumerated.item[0] = snd_es1688_mixer_read(chip, ES1688_REC_DEV) & 7; | 775 | ucontrol->value.enumerated.item[0] = snd_es1688_mixer_read(chip, ES1688_REC_DEV) & 7; |
776 | return 0; | 776 | return 0; |
777 | } | 777 | } |
778 | 778 | ||
779 | static int snd_es1688_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 779 | static int snd_es1688_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
780 | { | 780 | { |
781 | es1688_t *chip = snd_kcontrol_chip(kcontrol); | 781 | struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); |
782 | unsigned long flags; | 782 | unsigned long flags; |
783 | unsigned char oval, nval; | 783 | unsigned char oval, nval; |
784 | int change; | 784 | int change; |
@@ -801,7 +801,7 @@ static int snd_es1688_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
801 | .get = snd_es1688_get_single, .put = snd_es1688_put_single, \ | 801 | .get = snd_es1688_get_single, .put = snd_es1688_put_single, \ |
802 | .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } | 802 | .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } |
803 | 803 | ||
804 | static int snd_es1688_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 804 | static int snd_es1688_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
805 | { | 805 | { |
806 | int mask = (kcontrol->private_value >> 16) & 0xff; | 806 | int mask = (kcontrol->private_value >> 16) & 0xff; |
807 | 807 | ||
@@ -812,9 +812,9 @@ static int snd_es1688_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t | |||
812 | return 0; | 812 | return 0; |
813 | } | 813 | } |
814 | 814 | ||
815 | static int snd_es1688_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 815 | static int snd_es1688_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
816 | { | 816 | { |
817 | es1688_t *chip = snd_kcontrol_chip(kcontrol); | 817 | struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); |
818 | unsigned long flags; | 818 | unsigned long flags; |
819 | int reg = kcontrol->private_value & 0xff; | 819 | int reg = kcontrol->private_value & 0xff; |
820 | int shift = (kcontrol->private_value >> 8) & 0xff; | 820 | int shift = (kcontrol->private_value >> 8) & 0xff; |
@@ -829,9 +829,9 @@ static int snd_es1688_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t | |||
829 | return 0; | 829 | return 0; |
830 | } | 830 | } |
831 | 831 | ||
832 | static int snd_es1688_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 832 | static int snd_es1688_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
833 | { | 833 | { |
834 | es1688_t *chip = snd_kcontrol_chip(kcontrol); | 834 | struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); |
835 | unsigned long flags; | 835 | unsigned long flags; |
836 | int reg = kcontrol->private_value & 0xff; | 836 | int reg = kcontrol->private_value & 0xff; |
837 | int shift = (kcontrol->private_value >> 8) & 0xff; | 837 | int shift = (kcontrol->private_value >> 8) & 0xff; |
@@ -860,7 +860,7 @@ static int snd_es1688_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t | |||
860 | .get = snd_es1688_get_double, .put = snd_es1688_put_double, \ | 860 | .get = snd_es1688_get_double, .put = snd_es1688_put_double, \ |
861 | .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } | 861 | .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } |
862 | 862 | ||
863 | static int snd_es1688_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 863 | static int snd_es1688_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
864 | { | 864 | { |
865 | int mask = (kcontrol->private_value >> 24) & 0xff; | 865 | int mask = (kcontrol->private_value >> 24) & 0xff; |
866 | 866 | ||
@@ -871,9 +871,9 @@ static int snd_es1688_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t | |||
871 | return 0; | 871 | return 0; |
872 | } | 872 | } |
873 | 873 | ||
874 | static int snd_es1688_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 874 | static int snd_es1688_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
875 | { | 875 | { |
876 | es1688_t *chip = snd_kcontrol_chip(kcontrol); | 876 | struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); |
877 | unsigned long flags; | 877 | unsigned long flags; |
878 | int left_reg = kcontrol->private_value & 0xff; | 878 | int left_reg = kcontrol->private_value & 0xff; |
879 | int right_reg = (kcontrol->private_value >> 8) & 0xff; | 879 | int right_reg = (kcontrol->private_value >> 8) & 0xff; |
@@ -905,9 +905,9 @@ static int snd_es1688_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t | |||
905 | return 0; | 905 | return 0; |
906 | } | 906 | } |
907 | 907 | ||
908 | static int snd_es1688_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 908 | static int snd_es1688_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
909 | { | 909 | { |
910 | es1688_t *chip = snd_kcontrol_chip(kcontrol); | 910 | struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); |
911 | unsigned long flags; | 911 | unsigned long flags; |
912 | int left_reg = kcontrol->private_value & 0xff; | 912 | int left_reg = kcontrol->private_value & 0xff; |
913 | int right_reg = (kcontrol->private_value >> 8) & 0xff; | 913 | int right_reg = (kcontrol->private_value >> 8) & 0xff; |
@@ -968,7 +968,7 @@ static int snd_es1688_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t | |||
968 | return change; | 968 | return change; |
969 | } | 969 | } |
970 | 970 | ||
971 | static snd_kcontrol_new_t snd_es1688_controls[] = { | 971 | static struct snd_kcontrol_new snd_es1688_controls[] = { |
972 | ES1688_DOUBLE("Master Playback Volume", 0, ES1688_MASTER_DEV, ES1688_MASTER_DEV, 4, 0, 15, 0), | 972 | ES1688_DOUBLE("Master Playback Volume", 0, ES1688_MASTER_DEV, ES1688_MASTER_DEV, 4, 0, 15, 0), |
973 | ES1688_DOUBLE("PCM Playback Volume", 0, ES1688_PCM_DEV, ES1688_PCM_DEV, 4, 0, 15, 0), | 973 | ES1688_DOUBLE("PCM Playback Volume", 0, ES1688_PCM_DEV, ES1688_PCM_DEV, 4, 0, 15, 0), |
974 | ES1688_DOUBLE("Line Playback Volume", 0, ES1688_LINE_DEV, ES1688_LINE_DEV, 4, 0, 15, 0), | 974 | ES1688_DOUBLE("Line Playback Volume", 0, ES1688_LINE_DEV, ES1688_LINE_DEV, 4, 0, 15, 0), |
@@ -1003,9 +1003,9 @@ static unsigned char snd_es1688_init_table[][2] = { | |||
1003 | { ES1688_REC_DEV, 0x17 } | 1003 | { ES1688_REC_DEV, 0x17 } |
1004 | }; | 1004 | }; |
1005 | 1005 | ||
1006 | int snd_es1688_mixer(es1688_t *chip) | 1006 | int snd_es1688_mixer(struct snd_es1688 *chip) |
1007 | { | 1007 | { |
1008 | snd_card_t *card; | 1008 | struct snd_card *card; |
1009 | unsigned int idx; | 1009 | unsigned int idx; |
1010 | int err; | 1010 | int err; |
1011 | unsigned char reg, val; | 1011 | unsigned char reg, val; |