diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 09:12:11 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:20:09 -0500 |
commit | 67b1020d88a77a73bd9ccbc21733c155a4d7d44c (patch) | |
tree | 996fad816752751d467e70e632f7953fd872e7d5 /sound | |
parent | 475675d6931ec03cf9575b26e30800fe64898ee0 (diff) |
[ALSA] Remove xxx_t typedefs: PARISC Harmony
Modules: PARISC Harmony driver
Remove xxx_t typedefs from the PARIC Harmony driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/parisc/harmony.c | 169 | ||||
-rw-r--r-- | sound/parisc/harmony.h | 14 |
2 files changed, 91 insertions, 92 deletions
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c index 0513137d4ec4..ce73f3eae78c 100644 --- a/sound/parisc/harmony.c +++ b/sound/parisc/harmony.c | |||
@@ -99,32 +99,32 @@ static unsigned int rate_bits[14] = { | |||
99 | HARMONY_SR_44KHZ, HARMONY_SR_48KHZ | 99 | HARMONY_SR_44KHZ, HARMONY_SR_48KHZ |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static snd_pcm_hw_constraint_list_t hw_constraint_rates = { | 102 | static struct snd_pcm_hw_constraint_list hw_constraint_rates = { |
103 | .count = ARRAY_SIZE(snd_harmony_rates), | 103 | .count = ARRAY_SIZE(snd_harmony_rates), |
104 | .list = snd_harmony_rates, | 104 | .list = snd_harmony_rates, |
105 | .mask = 0, | 105 | .mask = 0, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | inline unsigned long | 108 | static inline unsigned long |
109 | harmony_read(harmony_t *h, unsigned r) | 109 | harmony_read(struct snd_harmony *h, unsigned r) |
110 | { | 110 | { |
111 | return __raw_readl(h->iobase + r); | 111 | return __raw_readl(h->iobase + r); |
112 | } | 112 | } |
113 | 113 | ||
114 | inline void | 114 | static inline void |
115 | harmony_write(harmony_t *h, unsigned r, unsigned long v) | 115 | harmony_write(struct snd_harmony *h, unsigned r, unsigned long v) |
116 | { | 116 | { |
117 | __raw_writel(v, h->iobase + r); | 117 | __raw_writel(v, h->iobase + r); |
118 | } | 118 | } |
119 | 119 | ||
120 | static void | 120 | static inline void |
121 | harmony_wait_for_control(harmony_t *h) | 121 | harmony_wait_for_control(struct snd_harmony *h) |
122 | { | 122 | { |
123 | while (harmony_read(h, HARMONY_CNTL) & HARMONY_CNTL_C) ; | 123 | while (harmony_read(h, HARMONY_CNTL) & HARMONY_CNTL_C) ; |
124 | } | 124 | } |
125 | 125 | ||
126 | inline void | 126 | static inline void |
127 | harmony_reset(harmony_t *h) | 127 | harmony_reset(struct snd_harmony *h) |
128 | { | 128 | { |
129 | harmony_write(h, HARMONY_RESET, 1); | 129 | harmony_write(h, HARMONY_RESET, 1); |
130 | mdelay(50); | 130 | mdelay(50); |
@@ -132,7 +132,7 @@ harmony_reset(harmony_t *h) | |||
132 | } | 132 | } |
133 | 133 | ||
134 | static void | 134 | static void |
135 | harmony_disable_interrupts(harmony_t *h) | 135 | harmony_disable_interrupts(struct snd_harmony *h) |
136 | { | 136 | { |
137 | u32 dstatus; | 137 | u32 dstatus; |
138 | harmony_wait_for_control(h); | 138 | harmony_wait_for_control(h); |
@@ -142,7 +142,7 @@ harmony_disable_interrupts(harmony_t *h) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | static void | 144 | static void |
145 | harmony_enable_interrupts(harmony_t *h) | 145 | harmony_enable_interrupts(struct snd_harmony *h) |
146 | { | 146 | { |
147 | u32 dstatus; | 147 | u32 dstatus; |
148 | harmony_wait_for_control(h); | 148 | harmony_wait_for_control(h); |
@@ -152,7 +152,7 @@ harmony_enable_interrupts(harmony_t *h) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | static void | 154 | static void |
155 | harmony_mute(harmony_t *h) | 155 | harmony_mute(struct snd_harmony *h) |
156 | { | 156 | { |
157 | unsigned long flags; | 157 | unsigned long flags; |
158 | 158 | ||
@@ -163,7 +163,7 @@ harmony_mute(harmony_t *h) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | static void | 165 | static void |
166 | harmony_unmute(harmony_t *h) | 166 | harmony_unmute(struct snd_harmony *h) |
167 | { | 167 | { |
168 | unsigned long flags; | 168 | unsigned long flags; |
169 | 169 | ||
@@ -174,7 +174,7 @@ harmony_unmute(harmony_t *h) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | static void | 176 | static void |
177 | harmony_set_control(harmony_t *h) | 177 | harmony_set_control(struct snd_harmony *h) |
178 | { | 178 | { |
179 | u32 ctrl; | 179 | u32 ctrl; |
180 | unsigned long flags; | 180 | unsigned long flags; |
@@ -196,7 +196,7 @@ static irqreturn_t | |||
196 | snd_harmony_interrupt(int irq, void *dev, struct pt_regs *regs) | 196 | snd_harmony_interrupt(int irq, void *dev, struct pt_regs *regs) |
197 | { | 197 | { |
198 | u32 dstatus; | 198 | u32 dstatus; |
199 | harmony_t *h = dev; | 199 | struct snd_harmony *h = dev; |
200 | 200 | ||
201 | spin_lock(&h->lock); | 201 | spin_lock(&h->lock); |
202 | harmony_disable_interrupts(h); | 202 | harmony_disable_interrupts(h); |
@@ -261,7 +261,7 @@ snd_harmony_rate_bits(int rate) | |||
261 | return HARMONY_SR_44KHZ; | 261 | return HARMONY_SR_44KHZ; |
262 | } | 262 | } |
263 | 263 | ||
264 | static snd_pcm_hardware_t snd_harmony_playback = | 264 | static struct snd_pcm_hardware snd_harmony_playback = |
265 | { | 265 | { |
266 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 266 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
267 | SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | | 267 | SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -282,7 +282,7 @@ static snd_pcm_hardware_t snd_harmony_playback = | |||
282 | .fifo_size = 0, | 282 | .fifo_size = 0, |
283 | }; | 283 | }; |
284 | 284 | ||
285 | static snd_pcm_hardware_t snd_harmony_capture = | 285 | static struct snd_pcm_hardware snd_harmony_capture = |
286 | { | 286 | { |
287 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 287 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
288 | SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | | 288 | SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -304,9 +304,9 @@ static snd_pcm_hardware_t snd_harmony_capture = | |||
304 | }; | 304 | }; |
305 | 305 | ||
306 | static int | 306 | static int |
307 | snd_harmony_playback_trigger(snd_pcm_substream_t *ss, int cmd) | 307 | snd_harmony_playback_trigger(struct snd_pcm_substream *ss, int cmd) |
308 | { | 308 | { |
309 | harmony_t *h = snd_pcm_substream_chip(ss); | 309 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
310 | 310 | ||
311 | if (h->st.capturing) | 311 | if (h->st.capturing) |
312 | return -EBUSY; | 312 | return -EBUSY; |
@@ -340,9 +340,9 @@ snd_harmony_playback_trigger(snd_pcm_substream_t *ss, int cmd) | |||
340 | } | 340 | } |
341 | 341 | ||
342 | static int | 342 | static int |
343 | snd_harmony_capture_trigger(snd_pcm_substream_t *ss, int cmd) | 343 | snd_harmony_capture_trigger(struct snd_pcm_substream *ss, int cmd) |
344 | { | 344 | { |
345 | harmony_t *h = snd_pcm_substream_chip(ss); | 345 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
346 | 346 | ||
347 | if (h->st.playing) | 347 | if (h->st.playing) |
348 | return -EBUSY; | 348 | return -EBUSY; |
@@ -376,7 +376,7 @@ snd_harmony_capture_trigger(snd_pcm_substream_t *ss, int cmd) | |||
376 | } | 376 | } |
377 | 377 | ||
378 | static int | 378 | static int |
379 | snd_harmony_set_data_format(harmony_t *h, int fmt, int force) | 379 | snd_harmony_set_data_format(struct snd_harmony *h, int fmt, int force) |
380 | { | 380 | { |
381 | int o = h->st.format; | 381 | int o = h->st.format; |
382 | int n; | 382 | int n; |
@@ -406,10 +406,10 @@ snd_harmony_set_data_format(harmony_t *h, int fmt, int force) | |||
406 | } | 406 | } |
407 | 407 | ||
408 | static int | 408 | static int |
409 | snd_harmony_playback_prepare(snd_pcm_substream_t *ss) | 409 | snd_harmony_playback_prepare(struct snd_pcm_substream *ss) |
410 | { | 410 | { |
411 | harmony_t *h = snd_pcm_substream_chip(ss); | 411 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
412 | snd_pcm_runtime_t *rt = ss->runtime; | 412 | struct snd_pcm_runtime *rt = ss->runtime; |
413 | 413 | ||
414 | if (h->st.capturing) | 414 | if (h->st.capturing) |
415 | return -EBUSY; | 415 | return -EBUSY; |
@@ -436,10 +436,10 @@ snd_harmony_playback_prepare(snd_pcm_substream_t *ss) | |||
436 | } | 436 | } |
437 | 437 | ||
438 | static int | 438 | static int |
439 | snd_harmony_capture_prepare(snd_pcm_substream_t *ss) | 439 | snd_harmony_capture_prepare(struct snd_pcm_substream *ss) |
440 | { | 440 | { |
441 | harmony_t *h = snd_pcm_substream_chip(ss); | 441 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
442 | snd_pcm_runtime_t *rt = ss->runtime; | 442 | struct snd_pcm_runtime *rt = ss->runtime; |
443 | 443 | ||
444 | if (h->st.playing) | 444 | if (h->st.playing) |
445 | return -EBUSY; | 445 | return -EBUSY; |
@@ -466,10 +466,10 @@ snd_harmony_capture_prepare(snd_pcm_substream_t *ss) | |||
466 | } | 466 | } |
467 | 467 | ||
468 | static snd_pcm_uframes_t | 468 | static snd_pcm_uframes_t |
469 | snd_harmony_playback_pointer(snd_pcm_substream_t *ss) | 469 | snd_harmony_playback_pointer(struct snd_pcm_substream *ss) |
470 | { | 470 | { |
471 | snd_pcm_runtime_t *rt = ss->runtime; | 471 | struct snd_pcm_runtime *rt = ss->runtime; |
472 | harmony_t *h = snd_pcm_substream_chip(ss); | 472 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
473 | unsigned long pcuradd; | 473 | unsigned long pcuradd; |
474 | unsigned long played; | 474 | unsigned long played; |
475 | 475 | ||
@@ -495,10 +495,10 @@ snd_harmony_playback_pointer(snd_pcm_substream_t *ss) | |||
495 | } | 495 | } |
496 | 496 | ||
497 | static snd_pcm_uframes_t | 497 | static snd_pcm_uframes_t |
498 | snd_harmony_capture_pointer(snd_pcm_substream_t *ss) | 498 | snd_harmony_capture_pointer(struct snd_pcm_substream *ss) |
499 | { | 499 | { |
500 | snd_pcm_runtime_t *rt = ss->runtime; | 500 | struct snd_pcm_runtime *rt = ss->runtime; |
501 | harmony_t *h = snd_pcm_substream_chip(ss); | 501 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
502 | unsigned long rcuradd; | 502 | unsigned long rcuradd; |
503 | unsigned long caught; | 503 | unsigned long caught; |
504 | 504 | ||
@@ -524,10 +524,10 @@ snd_harmony_capture_pointer(snd_pcm_substream_t *ss) | |||
524 | } | 524 | } |
525 | 525 | ||
526 | static int | 526 | static int |
527 | snd_harmony_playback_open(snd_pcm_substream_t *ss) | 527 | snd_harmony_playback_open(struct snd_pcm_substream *ss) |
528 | { | 528 | { |
529 | harmony_t *h = snd_pcm_substream_chip(ss); | 529 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
530 | snd_pcm_runtime_t *rt = ss->runtime; | 530 | struct snd_pcm_runtime *rt = ss->runtime; |
531 | int err; | 531 | int err; |
532 | 532 | ||
533 | h->psubs = ss; | 533 | h->psubs = ss; |
@@ -543,10 +543,10 @@ snd_harmony_playback_open(snd_pcm_substream_t *ss) | |||
543 | } | 543 | } |
544 | 544 | ||
545 | static int | 545 | static int |
546 | snd_harmony_capture_open(snd_pcm_substream_t *ss) | 546 | snd_harmony_capture_open(struct snd_pcm_substream *ss) |
547 | { | 547 | { |
548 | harmony_t *h = snd_pcm_substream_chip(ss); | 548 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
549 | snd_pcm_runtime_t *rt = ss->runtime; | 549 | struct snd_pcm_runtime *rt = ss->runtime; |
550 | int err; | 550 | int err; |
551 | 551 | ||
552 | h->csubs = ss; | 552 | h->csubs = ss; |
@@ -562,27 +562,27 @@ snd_harmony_capture_open(snd_pcm_substream_t *ss) | |||
562 | } | 562 | } |
563 | 563 | ||
564 | static int | 564 | static int |
565 | snd_harmony_playback_close(snd_pcm_substream_t *ss) | 565 | snd_harmony_playback_close(struct snd_pcm_substream *ss) |
566 | { | 566 | { |
567 | harmony_t *h = snd_pcm_substream_chip(ss); | 567 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
568 | h->psubs = NULL; | 568 | h->psubs = NULL; |
569 | return 0; | 569 | return 0; |
570 | } | 570 | } |
571 | 571 | ||
572 | static int | 572 | static int |
573 | snd_harmony_capture_close(snd_pcm_substream_t *ss) | 573 | snd_harmony_capture_close(struct snd_pcm_substream *ss) |
574 | { | 574 | { |
575 | harmony_t *h = snd_pcm_substream_chip(ss); | 575 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
576 | h->csubs = NULL; | 576 | h->csubs = NULL; |
577 | return 0; | 577 | return 0; |
578 | } | 578 | } |
579 | 579 | ||
580 | static int | 580 | static int |
581 | snd_harmony_hw_params(snd_pcm_substream_t *ss, | 581 | snd_harmony_hw_params(struct snd_pcm_substream *ss, |
582 | snd_pcm_hw_params_t *hw) | 582 | struct snd_pcm_hw_params *hw) |
583 | { | 583 | { |
584 | int err; | 584 | int err; |
585 | harmony_t *h = snd_pcm_substream_chip(ss); | 585 | struct snd_harmony *h = snd_pcm_substream_chip(ss); |
586 | 586 | ||
587 | err = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw)); | 587 | err = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw)); |
588 | if (err > 0 && h->dma.type == SNDRV_DMA_TYPE_CONTINUOUS) | 588 | if (err > 0 && h->dma.type == SNDRV_DMA_TYPE_CONTINUOUS) |
@@ -592,12 +592,12 @@ snd_harmony_hw_params(snd_pcm_substream_t *ss, | |||
592 | } | 592 | } |
593 | 593 | ||
594 | static int | 594 | static int |
595 | snd_harmony_hw_free(snd_pcm_substream_t *ss) | 595 | snd_harmony_hw_free(struct snd_pcm_substream *ss) |
596 | { | 596 | { |
597 | return snd_pcm_lib_free_pages(ss); | 597 | return snd_pcm_lib_free_pages(ss); |
598 | } | 598 | } |
599 | 599 | ||
600 | static snd_pcm_ops_t snd_harmony_playback_ops = { | 600 | static struct snd_pcm_ops snd_harmony_playback_ops = { |
601 | .open = snd_harmony_playback_open, | 601 | .open = snd_harmony_playback_open, |
602 | .close = snd_harmony_playback_close, | 602 | .close = snd_harmony_playback_close, |
603 | .ioctl = snd_pcm_lib_ioctl, | 603 | .ioctl = snd_pcm_lib_ioctl, |
@@ -608,7 +608,7 @@ static snd_pcm_ops_t snd_harmony_playback_ops = { | |||
608 | .pointer = snd_harmony_playback_pointer, | 608 | .pointer = snd_harmony_playback_pointer, |
609 | }; | 609 | }; |
610 | 610 | ||
611 | static snd_pcm_ops_t snd_harmony_capture_ops = { | 611 | static struct snd_pcm_ops snd_harmony_capture_ops = { |
612 | .open = snd_harmony_capture_open, | 612 | .open = snd_harmony_capture_open, |
613 | .close = snd_harmony_capture_close, | 613 | .close = snd_harmony_capture_close, |
614 | .ioctl = snd_pcm_lib_ioctl, | 614 | .ioctl = snd_pcm_lib_ioctl, |
@@ -620,9 +620,9 @@ static snd_pcm_ops_t snd_harmony_capture_ops = { | |||
620 | }; | 620 | }; |
621 | 621 | ||
622 | static int | 622 | static int |
623 | snd_harmony_pcm_init(harmony_t *h) | 623 | snd_harmony_pcm_init(struct snd_harmony *h) |
624 | { | 624 | { |
625 | snd_pcm_t *pcm; | 625 | struct snd_pcm *pcm; |
626 | int err; | 626 | int err; |
627 | 627 | ||
628 | harmony_disable_interrupts(h); | 628 | harmony_disable_interrupts(h); |
@@ -683,15 +683,15 @@ snd_harmony_pcm_init(harmony_t *h) | |||
683 | } | 683 | } |
684 | 684 | ||
685 | static void | 685 | static void |
686 | snd_harmony_set_new_gain(harmony_t *h) | 686 | snd_harmony_set_new_gain(struct snd_harmony *h) |
687 | { | 687 | { |
688 | harmony_wait_for_control(h); | 688 | harmony_wait_for_control(h); |
689 | harmony_write(h, HARMONY_GAINCTL, h->st.gain); | 689 | harmony_write(h, HARMONY_GAINCTL, h->st.gain); |
690 | } | 690 | } |
691 | 691 | ||
692 | static int | 692 | static int |
693 | snd_harmony_mixercontrol_info(snd_kcontrol_t *kc, | 693 | snd_harmony_mixercontrol_info(struct snd_kcontrol *kc, |
694 | snd_ctl_elem_info_t *uinfo) | 694 | struct snd_ctl_elem_info *uinfo) |
695 | { | 695 | { |
696 | int mask = (kc->private_value >> 16) & 0xff; | 696 | int mask = (kc->private_value >> 16) & 0xff; |
697 | int left_shift = (kc->private_value) & 0xff; | 697 | int left_shift = (kc->private_value) & 0xff; |
@@ -707,10 +707,10 @@ snd_harmony_mixercontrol_info(snd_kcontrol_t *kc, | |||
707 | } | 707 | } |
708 | 708 | ||
709 | static int | 709 | static int |
710 | snd_harmony_volume_get(snd_kcontrol_t *kc, | 710 | snd_harmony_volume_get(struct snd_kcontrol *kc, |
711 | snd_ctl_elem_value_t *ucontrol) | 711 | struct snd_ctl_elem_value *ucontrol) |
712 | { | 712 | { |
713 | harmony_t *h = snd_kcontrol_chip(kc); | 713 | struct snd_harmony *h = snd_kcontrol_chip(kc); |
714 | int shift_left = (kc->private_value) & 0xff; | 714 | int shift_left = (kc->private_value) & 0xff; |
715 | int shift_right = (kc->private_value >> 8) & 0xff; | 715 | int shift_right = (kc->private_value >> 8) & 0xff; |
716 | int mask = (kc->private_value >> 16) & 0xff; | 716 | int mask = (kc->private_value >> 16) & 0xff; |
@@ -736,10 +736,10 @@ snd_harmony_volume_get(snd_kcontrol_t *kc, | |||
736 | } | 736 | } |
737 | 737 | ||
738 | static int | 738 | static int |
739 | snd_harmony_volume_put(snd_kcontrol_t *kc, | 739 | snd_harmony_volume_put(struct snd_kcontrol *kc, |
740 | snd_ctl_elem_value_t *ucontrol) | 740 | struct snd_ctl_elem_value *ucontrol) |
741 | { | 741 | { |
742 | harmony_t *h = snd_kcontrol_chip(kc); | 742 | struct snd_harmony *h = snd_kcontrol_chip(kc); |
743 | int shift_left = (kc->private_value) & 0xff; | 743 | int shift_left = (kc->private_value) & 0xff; |
744 | int shift_right = (kc->private_value >> 8) & 0xff; | 744 | int shift_right = (kc->private_value >> 8) & 0xff; |
745 | int mask = (kc->private_value >> 16) & 0xff; | 745 | int mask = (kc->private_value >> 16) & 0xff; |
@@ -771,8 +771,8 @@ snd_harmony_volume_put(snd_kcontrol_t *kc, | |||
771 | } | 771 | } |
772 | 772 | ||
773 | static int | 773 | static int |
774 | snd_harmony_captureroute_info(snd_kcontrol_t *kc, | 774 | snd_harmony_captureroute_info(struct snd_kcontrol *kc, |
775 | snd_ctl_elem_info_t *uinfo) | 775 | struct snd_ctl_elem_info *uinfo) |
776 | { | 776 | { |
777 | static char *texts[2] = { "Line", "Mic" }; | 777 | static char *texts[2] = { "Line", "Mic" }; |
778 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 778 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
@@ -786,10 +786,10 @@ snd_harmony_captureroute_info(snd_kcontrol_t *kc, | |||
786 | } | 786 | } |
787 | 787 | ||
788 | static int | 788 | static int |
789 | snd_harmony_captureroute_get(snd_kcontrol_t *kc, | 789 | snd_harmony_captureroute_get(struct snd_kcontrol *kc, |
790 | snd_ctl_elem_value_t *ucontrol) | 790 | struct snd_ctl_elem_value *ucontrol) |
791 | { | 791 | { |
792 | harmony_t *h = snd_kcontrol_chip(kc); | 792 | struct snd_harmony *h = snd_kcontrol_chip(kc); |
793 | int value; | 793 | int value; |
794 | 794 | ||
795 | spin_lock_irq(&h->mixer_lock); | 795 | spin_lock_irq(&h->mixer_lock); |
@@ -803,10 +803,10 @@ snd_harmony_captureroute_get(snd_kcontrol_t *kc, | |||
803 | } | 803 | } |
804 | 804 | ||
805 | static int | 805 | static int |
806 | snd_harmony_captureroute_put(snd_kcontrol_t *kc, | 806 | snd_harmony_captureroute_put(struct snd_kcontrol *kc, |
807 | snd_ctl_elem_value_t *ucontrol) | 807 | struct snd_ctl_elem_value *ucontrol) |
808 | { | 808 | { |
809 | harmony_t *h = snd_kcontrol_chip(kc); | 809 | struct snd_harmony *h = snd_kcontrol_chip(kc); |
810 | int value; | 810 | int value; |
811 | int old_gain = h->st.gain; | 811 | int old_gain = h->st.gain; |
812 | 812 | ||
@@ -823,8 +823,7 @@ snd_harmony_captureroute_put(snd_kcontrol_t *kc, | |||
823 | return h->st.gain != old_gain; | 823 | return h->st.gain != old_gain; |
824 | } | 824 | } |
825 | 825 | ||
826 | #define HARMONY_CONTROLS (sizeof(snd_harmony_controls)/ \ | 826 | #define HARMONY_CONTROLS ARRAY_SIZE(snd_harmony_controls) |
827 | sizeof(snd_kcontrol_new_t)) | ||
828 | 827 | ||
829 | #define HARMONY_VOLUME(xname, left_shift, right_shift, mask, invert) \ | 828 | #define HARMONY_VOLUME(xname, left_shift, right_shift, mask, invert) \ |
830 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 829 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
@@ -833,7 +832,7 @@ snd_harmony_captureroute_put(snd_kcontrol_t *kc, | |||
833 | .private_value = ((left_shift) | ((right_shift) << 8) | \ | 832 | .private_value = ((left_shift) | ((right_shift) << 8) | \ |
834 | ((mask) << 16) | ((invert) << 24)) } | 833 | ((mask) << 16) | ((invert) << 24)) } |
835 | 834 | ||
836 | static snd_kcontrol_new_t snd_harmony_controls[] = { | 835 | static struct snd_kcontrol_new snd_harmony_controls[] = { |
837 | HARMONY_VOLUME("Master Playback Volume", HARMONY_GAIN_LO_SHIFT, | 836 | HARMONY_VOLUME("Master Playback Volume", HARMONY_GAIN_LO_SHIFT, |
838 | HARMONY_GAIN_RO_SHIFT, HARMONY_GAIN_OUT, 1), | 837 | HARMONY_GAIN_RO_SHIFT, HARMONY_GAIN_OUT, 1), |
839 | HARMONY_VOLUME("Capture Volume", HARMONY_GAIN_LI_SHIFT, | 838 | HARMONY_VOLUME("Capture Volume", HARMONY_GAIN_LI_SHIFT, |
@@ -856,7 +855,7 @@ static snd_kcontrol_new_t snd_harmony_controls[] = { | |||
856 | }; | 855 | }; |
857 | 856 | ||
858 | static void __init | 857 | static void __init |
859 | snd_harmony_mixer_reset(harmony_t *h) | 858 | snd_harmony_mixer_reset(struct snd_harmony *h) |
860 | { | 859 | { |
861 | harmony_mute(h); | 860 | harmony_mute(h); |
862 | harmony_reset(h); | 861 | harmony_reset(h); |
@@ -865,9 +864,9 @@ snd_harmony_mixer_reset(harmony_t *h) | |||
865 | } | 864 | } |
866 | 865 | ||
867 | static int __init | 866 | static int __init |
868 | snd_harmony_mixer_init(harmony_t *h) | 867 | snd_harmony_mixer_init(struct snd_harmony *h) |
869 | { | 868 | { |
870 | snd_card_t *card = h->card; | 869 | struct snd_card *card = h->card; |
871 | int idx, err; | 870 | int idx, err; |
872 | 871 | ||
873 | snd_assert(h != NULL, return -EINVAL); | 872 | snd_assert(h != NULL, return -EINVAL); |
@@ -886,7 +885,7 @@ snd_harmony_mixer_init(harmony_t *h) | |||
886 | } | 885 | } |
887 | 886 | ||
888 | static int | 887 | static int |
889 | snd_harmony_free(harmony_t *h) | 888 | snd_harmony_free(struct snd_harmony *h) |
890 | { | 889 | { |
891 | if (h->gdma.addr) | 890 | if (h->gdma.addr) |
892 | snd_dma_free_pages(&h->gdma); | 891 | snd_dma_free_pages(&h->gdma); |
@@ -906,20 +905,20 @@ snd_harmony_free(harmony_t *h) | |||
906 | } | 905 | } |
907 | 906 | ||
908 | static int | 907 | static int |
909 | snd_harmony_dev_free(snd_device_t *dev) | 908 | snd_harmony_dev_free(struct snd_device *dev) |
910 | { | 909 | { |
911 | harmony_t *h = dev->device_data; | 910 | struct snd_harmony *h = dev->device_data; |
912 | return snd_harmony_free(h); | 911 | return snd_harmony_free(h); |
913 | } | 912 | } |
914 | 913 | ||
915 | static int __devinit | 914 | static int __devinit |
916 | snd_harmony_create(snd_card_t *card, | 915 | snd_harmony_create(struct snd_card *card, |
917 | struct parisc_device *padev, | 916 | struct parisc_device *padev, |
918 | harmony_t **rchip) | 917 | struct snd_harmony **rchip) |
919 | { | 918 | { |
920 | int err; | 919 | int err; |
921 | harmony_t *h; | 920 | struct snd_harmony *h; |
922 | static snd_device_ops_t ops = { | 921 | static struct snd_device_ops ops = { |
923 | .dev_free = snd_harmony_dev_free, | 922 | .dev_free = snd_harmony_dev_free, |
924 | }; | 923 | }; |
925 | 924 | ||
@@ -973,8 +972,8 @@ static int __devinit | |||
973 | snd_harmony_probe(struct parisc_device *padev) | 972 | snd_harmony_probe(struct parisc_device *padev) |
974 | { | 973 | { |
975 | int err; | 974 | int err; |
976 | snd_card_t *card; | 975 | struct snd_card *card; |
977 | harmony_t *h; | 976 | struct snd_harmony *h; |
978 | 977 | ||
979 | card = snd_card_new(index, id, THIS_MODULE, 0); | 978 | card = snd_card_new(index, id, THIS_MODULE, 0); |
980 | if (card == NULL) | 979 | if (card == NULL) |
@@ -1033,7 +1032,7 @@ alsa_harmony_init(void) | |||
1033 | static void __exit | 1032 | static void __exit |
1034 | alsa_harmony_fini(void) | 1033 | alsa_harmony_fini(void) |
1035 | { | 1034 | { |
1036 | return unregister_parisc_driver(&snd_harmony_driver); | 1035 | unregister_parisc_driver(&snd_harmony_driver); |
1037 | } | 1036 | } |
1038 | 1037 | ||
1039 | MODULE_LICENSE("GPL"); | 1038 | MODULE_LICENSE("GPL"); |
diff --git a/sound/parisc/harmony.h b/sound/parisc/harmony.h index 526c52389de2..2e434523fedf 100644 --- a/sound/parisc/harmony.h +++ b/sound/parisc/harmony.h | |||
@@ -13,7 +13,7 @@ struct harmony_buffer { | |||
13 | int coherent; | 13 | int coherent; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | typedef struct snd_card_harmony { | 16 | struct snd_harmony { |
17 | int irq; | 17 | int irq; |
18 | 18 | ||
19 | unsigned long hpa; /* hard physical address */ | 19 | unsigned long hpa; /* hard physical address */ |
@@ -44,15 +44,15 @@ typedef struct snd_card_harmony { | |||
44 | unsigned long silence_intr; | 44 | unsigned long silence_intr; |
45 | } stats; | 45 | } stats; |
46 | 46 | ||
47 | snd_pcm_t *pcm; | 47 | struct snd_pcm *pcm; |
48 | snd_card_t *card; | 48 | struct snd_card *card; |
49 | snd_pcm_substream_t *psubs; | 49 | struct snd_pcm_substream *psubs; |
50 | snd_pcm_substream_t *csubs; | 50 | struct snd_pcm_substream *csubs; |
51 | snd_info_entry_t *proc; | 51 | struct snd_info_entry *proc; |
52 | 52 | ||
53 | spinlock_t lock; | 53 | spinlock_t lock; |
54 | spinlock_t mixer_lock; | 54 | spinlock_t mixer_lock; |
55 | } harmony_t; | 55 | }; |
56 | 56 | ||
57 | #define MAX_PCM_DEVICES 1 | 57 | #define MAX_PCM_DEVICES 1 |
58 | #define MAX_PCM_SUBSTREAMS 4 | 58 | #define MAX_PCM_SUBSTREAMS 4 |