aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:10:16 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:20:01 -0500
commitceb9e476c89f50e9ba7de914bbec2c05e9647915 (patch)
treede55dca47a4e573d1baa2f2bb6b269613de83590
parent65b29f5039b38a5854b5e12238b0688a33e235cc (diff)
[ALSA] Remove xxx_t typedefs: ARM AACI
Modules: ARM AACI PL041 driver,ARM DMA routines Remove xxx_t typedefs from the ARM AACI driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/arm/aaci.c72
-rw-r--r--sound/arm/aaci.h6
-rw-r--r--sound/arm/devdma.c12
-rw-r--r--sound/arm/devdma.h6
4 files changed, 48 insertions, 48 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 559ead6367da..691f6dd81c30 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -40,7 +40,7 @@
40 */ 40 */
41#undef CONFIG_PM 41#undef CONFIG_PM
42 42
43static void aaci_ac97_select_codec(struct aaci *aaci, ac97_t *ac97) 43static void aaci_ac97_select_codec(struct aaci *aaci, struct snd_ac97 *ac97)
44{ 44{
45 u32 v, maincr = aaci->maincr | MAINCR_SCRA(ac97->num); 45 u32 v, maincr = aaci->maincr | MAINCR_SCRA(ac97->num);
46 46
@@ -65,7 +65,7 @@ static void aaci_ac97_select_codec(struct aaci *aaci, ac97_t *ac97)
65 * SI1TxEn, SI2TxEn and SI12TxEn bits are set in the AACI_MAINCR 65 * SI1TxEn, SI2TxEn and SI12TxEn bits are set in the AACI_MAINCR
66 * register. 66 * register.
67 */ 67 */
68static void aaci_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) 68static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
69{ 69{
70 struct aaci *aaci = ac97->private_data; 70 struct aaci *aaci = ac97->private_data;
71 u32 v; 71 u32 v;
@@ -97,7 +97,7 @@ static void aaci_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val
97/* 97/*
98 * Read an AC'97 register. 98 * Read an AC'97 register.
99 */ 99 */
100static unsigned short aaci_ac97_read(ac97_t *ac97, unsigned short reg) 100static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
101{ 101{
102 struct aaci *aaci = ac97->private_data; 102 struct aaci *aaci = ac97->private_data;
103 u32 v; 103 u32 v;
@@ -284,11 +284,11 @@ static unsigned int rate_list[] = {
284 * (unimplemented) 284 * (unimplemented)
285 */ 285 */
286static int 286static int
287aaci_rule_rate_by_channels(snd_pcm_hw_params_t *p, snd_pcm_hw_rule_t *rule) 287aaci_rule_rate_by_channels(struct snd_pcm_hw_params *p, struct snd_pcm_hw_rule *rule)
288{ 288{
289 struct aaci *aaci = rule->private; 289 struct aaci *aaci = rule->private;
290 unsigned int rate_mask = SNDRV_PCM_RATE_8000_48000|SNDRV_PCM_RATE_5512; 290 unsigned int rate_mask = SNDRV_PCM_RATE_8000_48000|SNDRV_PCM_RATE_5512;
291 snd_interval_t *c = hw_param_interval(p, SNDRV_PCM_HW_PARAM_CHANNELS); 291 struct snd_interval *c = hw_param_interval(p, SNDRV_PCM_HW_PARAM_CHANNELS);
292 292
293 switch (c->max) { 293 switch (c->max) {
294 case 6: 294 case 6:
@@ -304,7 +304,7 @@ aaci_rule_rate_by_channels(snd_pcm_hw_params_t *p, snd_pcm_hw_rule_t *rule)
304 rate_mask); 304 rate_mask);
305} 305}
306 306
307static snd_pcm_hardware_t aaci_hw_info = { 307static struct snd_pcm_hardware aaci_hw_info = {
308 .info = SNDRV_PCM_INFO_MMAP | 308 .info = SNDRV_PCM_INFO_MMAP |
309 SNDRV_PCM_INFO_MMAP_VALID | 309 SNDRV_PCM_INFO_MMAP_VALID |
310 SNDRV_PCM_INFO_INTERLEAVED | 310 SNDRV_PCM_INFO_INTERLEAVED |
@@ -330,10 +330,10 @@ static snd_pcm_hardware_t aaci_hw_info = {
330 .periods_max = PAGE_SIZE / 16, 330 .periods_max = PAGE_SIZE / 16,
331}; 331};
332 332
333static int aaci_pcm_open(struct aaci *aaci, snd_pcm_substream_t *substream, 333static int aaci_pcm_open(struct aaci *aaci, struct snd_pcm_substream *substream,
334 struct aaci_runtime *aacirun) 334 struct aaci_runtime *aacirun)
335{ 335{
336 snd_pcm_runtime_t *runtime = substream->runtime; 336 struct snd_pcm_runtime *runtime = substream->runtime;
337 int ret; 337 int ret;
338 338
339 aacirun->substream = substream; 339 aacirun->substream = substream;
@@ -375,7 +375,7 @@ static int aaci_pcm_open(struct aaci *aaci, snd_pcm_substream_t *substream,
375/* 375/*
376 * Common ALSA stuff 376 * Common ALSA stuff
377 */ 377 */
378static int aaci_pcm_close(snd_pcm_substream_t *substream) 378static int aaci_pcm_close(struct snd_pcm_substream *substream)
379{ 379{
380 struct aaci *aaci = substream->private_data; 380 struct aaci *aaci = substream->private_data;
381 struct aaci_runtime *aacirun = substream->runtime->private_data; 381 struct aaci_runtime *aacirun = substream->runtime->private_data;
@@ -388,7 +388,7 @@ static int aaci_pcm_close(snd_pcm_substream_t *substream)
388 return 0; 388 return 0;
389} 389}
390 390
391static int aaci_pcm_hw_free(snd_pcm_substream_t *substream) 391static int aaci_pcm_hw_free(struct snd_pcm_substream *substream)
392{ 392{
393 struct aaci_runtime *aacirun = substream->runtime->private_data; 393 struct aaci_runtime *aacirun = substream->runtime->private_data;
394 394
@@ -409,9 +409,9 @@ static int aaci_pcm_hw_free(snd_pcm_substream_t *substream)
409 return 0; 409 return 0;
410} 410}
411 411
412static int aaci_pcm_hw_params(snd_pcm_substream_t *substream, 412static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
413 struct aaci_runtime *aacirun, 413 struct aaci_runtime *aacirun,
414 snd_pcm_hw_params_t *params) 414 struct snd_pcm_hw_params *params)
415{ 415{
416 int err; 416 int err;
417 417
@@ -434,9 +434,9 @@ static int aaci_pcm_hw_params(snd_pcm_substream_t *substream,
434 return err; 434 return err;
435} 435}
436 436
437static int aaci_pcm_prepare(snd_pcm_substream_t *substream) 437static int aaci_pcm_prepare(struct snd_pcm_substream *substream)
438{ 438{
439 snd_pcm_runtime_t *runtime = substream->runtime; 439 struct snd_pcm_runtime *runtime = substream->runtime;
440 struct aaci_runtime *aacirun = runtime->private_data; 440 struct aaci_runtime *aacirun = runtime->private_data;
441 441
442 aacirun->start = (void *)runtime->dma_area; 442 aacirun->start = (void *)runtime->dma_area;
@@ -448,16 +448,16 @@ static int aaci_pcm_prepare(snd_pcm_substream_t *substream)
448 return 0; 448 return 0;
449} 449}
450 450
451static snd_pcm_uframes_t aaci_pcm_pointer(snd_pcm_substream_t *substream) 451static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream)
452{ 452{
453 snd_pcm_runtime_t *runtime = substream->runtime; 453 struct snd_pcm_runtime *runtime = substream->runtime;
454 struct aaci_runtime *aacirun = runtime->private_data; 454 struct aaci_runtime *aacirun = runtime->private_data;
455 ssize_t bytes = aacirun->ptr - aacirun->start; 455 ssize_t bytes = aacirun->ptr - aacirun->start;
456 456
457 return bytes_to_frames(runtime, bytes); 457 return bytes_to_frames(runtime, bytes);
458} 458}
459 459
460static int aaci_pcm_mmap(snd_pcm_substream_t *substream, struct vm_area_struct *vma) 460static int aaci_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma)
461{ 461{
462 return devdma_mmap(NULL, substream, vma); 462 return devdma_mmap(NULL, substream, vma);
463} 463}
@@ -484,7 +484,7 @@ static const u32 channels_to_txmask[] = {
484static unsigned int channel_list[] = { 2, 4, 6 }; 484static unsigned int channel_list[] = { 2, 4, 6 };
485 485
486static int 486static int
487aaci_rule_channels(snd_pcm_hw_params_t *p, snd_pcm_hw_rule_t *rule) 487aaci_rule_channels(struct snd_pcm_hw_params *p, struct snd_pcm_hw_rule *rule)
488{ 488{
489 struct aaci *aaci = rule->private; 489 struct aaci *aaci = rule->private;
490 unsigned int chan_mask = 1 << 0, slots; 490 unsigned int chan_mask = 1 << 0, slots;
@@ -504,7 +504,7 @@ aaci_rule_channels(snd_pcm_hw_params_t *p, snd_pcm_hw_rule_t *rule)
504 chan_mask); 504 chan_mask);
505} 505}
506 506
507static int aaci_pcm_playback_open(snd_pcm_substream_t *substream) 507static int aaci_pcm_playback_open(struct snd_pcm_substream *substream)
508{ 508{
509 struct aaci *aaci = substream->private_data; 509 struct aaci *aaci = substream->private_data;
510 int ret; 510 int ret;
@@ -522,8 +522,8 @@ static int aaci_pcm_playback_open(snd_pcm_substream_t *substream)
522 return aaci_pcm_open(aaci, substream, &aaci->playback); 522 return aaci_pcm_open(aaci, substream, &aaci->playback);
523} 523}
524 524
525static int aaci_pcm_playback_hw_params(snd_pcm_substream_t *substream, 525static int aaci_pcm_playback_hw_params(struct snd_pcm_substream *substream,
526 snd_pcm_hw_params_t *params) 526 struct snd_pcm_hw_params *params)
527{ 527{
528 struct aaci *aaci = substream->private_data; 528 struct aaci *aaci = substream->private_data;
529 struct aaci_runtime *aacirun = substream->runtime->private_data; 529 struct aaci_runtime *aacirun = substream->runtime->private_data;
@@ -575,7 +575,7 @@ static void aaci_pcm_playback_start(struct aaci_runtime *aacirun)
575 writel(aacirun->cr, aacirun->base + AACI_TXCR); 575 writel(aacirun->cr, aacirun->base + AACI_TXCR);
576} 576}
577 577
578static int aaci_pcm_playback_trigger(snd_pcm_substream_t *substream, int cmd) 578static int aaci_pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd)
579{ 579{
580 struct aaci *aaci = substream->private_data; 580 struct aaci *aaci = substream->private_data;
581 struct aaci_runtime *aacirun = substream->runtime->private_data; 581 struct aaci_runtime *aacirun = substream->runtime->private_data;
@@ -614,7 +614,7 @@ static int aaci_pcm_playback_trigger(snd_pcm_substream_t *substream, int cmd)
614 return ret; 614 return ret;
615} 615}
616 616
617static snd_pcm_ops_t aaci_playback_ops = { 617static struct snd_pcm_ops aaci_playback_ops = {
618 .open = aaci_pcm_playback_open, 618 .open = aaci_pcm_playback_open,
619 .close = aaci_pcm_close, 619 .close = aaci_pcm_close,
620 .ioctl = snd_pcm_lib_ioctl, 620 .ioctl = snd_pcm_lib_ioctl,
@@ -632,7 +632,7 @@ static snd_pcm_ops_t aaci_playback_ops = {
632 * Power Management. 632 * Power Management.
633 */ 633 */
634#ifdef CONFIG_PM 634#ifdef CONFIG_PM
635static int aaci_do_suspend(snd_card_t *card, unsigned int state) 635static int aaci_do_suspend(struct snd_card *card, unsigned int state)
636{ 636{
637 struct aaci *aaci = card->private_data; 637 struct aaci *aaci = card->private_data;
638 if (aaci->card->power_state != SNDRV_CTL_POWER_D3cold) { 638 if (aaci->card->power_state != SNDRV_CTL_POWER_D3cold) {
@@ -642,7 +642,7 @@ static int aaci_do_suspend(snd_card_t *card, unsigned int state)
642 return 0; 642 return 0;
643} 643}
644 644
645static int aaci_do_resume(snd_card_t *card, unsigned int state) 645static int aaci_do_resume(struct snd_card *card, unsigned int state)
646{ 646{
647 struct aaci *aaci = card->private_data; 647 struct aaci *aaci = card->private_data;
648 if (aaci->card->power_state != SNDRV_CTL_POWER_D0) { 648 if (aaci->card->power_state != SNDRV_CTL_POWER_D0) {
@@ -653,13 +653,13 @@ static int aaci_do_resume(snd_card_t *card, unsigned int state)
653 653
654static int aaci_suspend(struct amba_device *dev, pm_message_t state) 654static int aaci_suspend(struct amba_device *dev, pm_message_t state)
655{ 655{
656 snd_card_t *card = amba_get_drvdata(dev); 656 struct snd_card *card = amba_get_drvdata(dev);
657 return card ? aaci_do_suspend(card) : 0; 657 return card ? aaci_do_suspend(card) : 0;
658} 658}
659 659
660static int aaci_resume(struct amba_device *dev) 660static int aaci_resume(struct amba_device *dev)
661{ 661{
662 snd_card_t *card = amba_get_drvdata(dev); 662 struct snd_card *card = amba_get_drvdata(dev);
663 return card ? aaci_do_resume(card) : 0; 663 return card ? aaci_do_resume(card) : 0;
664} 664}
665#else 665#else
@@ -705,16 +705,16 @@ static struct ac97_pcm ac97_defs[] __devinitdata = {
705 } 705 }
706}; 706};
707 707
708static ac97_bus_ops_t aaci_bus_ops = { 708static struct snd_ac97_bus_ops aaci_bus_ops = {
709 .write = aaci_ac97_write, 709 .write = aaci_ac97_write,
710 .read = aaci_ac97_read, 710 .read = aaci_ac97_read,
711}; 711};
712 712
713static int __devinit aaci_probe_ac97(struct aaci *aaci) 713static int __devinit aaci_probe_ac97(struct aaci *aaci)
714{ 714{
715 ac97_template_t ac97_template; 715 struct snd_ac97_template ac97_template;
716 ac97_bus_t *ac97_bus; 716 struct snd_ac97_bus *ac97_bus;
717 ac97_t *ac97; 717 struct snd_ac97 *ac97;
718 int ret; 718 int ret;
719 719
720 /* 720 /*
@@ -737,7 +737,7 @@ static int __devinit aaci_probe_ac97(struct aaci *aaci)
737 ac97_bus->clock = 48000; 737 ac97_bus->clock = 48000;
738 aaci->ac97_bus = ac97_bus; 738 aaci->ac97_bus = ac97_bus;
739 739
740 memset(&ac97_template, 0, sizeof(ac97_template_t)); 740 memset(&ac97_template, 0, sizeof(struct snd_ac97_template));
741 ac97_template.private_data = aaci; 741 ac97_template.private_data = aaci;
742 ac97_template.num = 0; 742 ac97_template.num = 0;
743 ac97_template.scaps = AC97_SCAP_SKIP_MODEM; 743 ac97_template.scaps = AC97_SCAP_SKIP_MODEM;
@@ -762,7 +762,7 @@ static int __devinit aaci_probe_ac97(struct aaci *aaci)
762 return ret; 762 return ret;
763} 763}
764 764
765static void aaci_free_card(snd_card_t *card) 765static void aaci_free_card(struct snd_card *card)
766{ 766{
767 struct aaci *aaci = card->private_data; 767 struct aaci *aaci = card->private_data;
768 if (aaci->base) 768 if (aaci->base)
@@ -772,7 +772,7 @@ static void aaci_free_card(snd_card_t *card)
772static struct aaci * __devinit aaci_init_card(struct amba_device *dev) 772static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
773{ 773{
774 struct aaci *aaci; 774 struct aaci *aaci;
775 snd_card_t *card; 775 struct snd_card *card;
776 776
777 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, 777 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
778 THIS_MODULE, sizeof(struct aaci)); 778 THIS_MODULE, sizeof(struct aaci));
@@ -803,7 +803,7 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
803 803
804static int __devinit aaci_init_pcm(struct aaci *aaci) 804static int __devinit aaci_init_pcm(struct aaci *aaci)
805{ 805{
806 snd_pcm_t *pcm; 806 struct snd_pcm *pcm;
807 int ret; 807 int ret;
808 808
809 ret = snd_pcm_new(aaci->card, "AACI AC'97", 0, 1, 0, &pcm); 809 ret = snd_pcm_new(aaci->card, "AACI AC'97", 0, 1, 0, &pcm);
@@ -920,7 +920,7 @@ static int __devinit aaci_probe(struct amba_device *dev, void *id)
920 920
921static int __devexit aaci_remove(struct amba_device *dev) 921static int __devexit aaci_remove(struct amba_device *dev)
922{ 922{
923 snd_card_t *card = amba_get_drvdata(dev); 923 struct snd_card *card = amba_get_drvdata(dev);
924 924
925 amba_set_drvdata(dev, NULL); 925 amba_set_drvdata(dev, NULL);
926 926
diff --git a/sound/arm/aaci.h b/sound/arm/aaci.h
index b2f969bc7845..83f73c2505c6 100644
--- a/sound/arm/aaci.h
+++ b/sound/arm/aaci.h
@@ -207,7 +207,7 @@ struct aaci_runtime {
207 int pcm_open; 207 int pcm_open;
208 208
209 u32 cr; 209 u32 cr;
210 snd_pcm_substream_t *substream; 210 struct snd_pcm_substream *substream;
211 211
212 /* 212 /*
213 * PIO support 213 * PIO support
@@ -222,7 +222,7 @@ struct aaci_runtime {
222 222
223struct aaci { 223struct aaci {
224 struct amba_device *dev; 224 struct amba_device *dev;
225 snd_card_t *card; 225 struct snd_card *card;
226 void __iomem *base; 226 void __iomem *base;
227 unsigned int fifosize; 227 unsigned int fifosize;
228 228
@@ -236,7 +236,7 @@ struct aaci {
236 struct aaci_runtime playback; 236 struct aaci_runtime playback;
237 struct aaci_runtime capture; 237 struct aaci_runtime capture;
238 238
239 snd_pcm_t *pcm; 239 struct snd_pcm *pcm;
240}; 240};
241 241
242#define ACSTREAM_FRONT 0 242#define ACSTREAM_FRONT 0
diff --git a/sound/arm/devdma.c b/sound/arm/devdma.c
index 60826a5324b4..ca3bf4ee05a3 100644
--- a/sound/arm/devdma.c
+++ b/sound/arm/devdma.c
@@ -18,9 +18,9 @@
18 18
19#include "devdma.h" 19#include "devdma.h"
20 20
21void devdma_hw_free(struct device *dev, snd_pcm_substream_t *substream) 21void devdma_hw_free(struct device *dev, struct snd_pcm_substream *substream)
22{ 22{
23 snd_pcm_runtime_t *runtime = substream->runtime; 23 struct snd_pcm_runtime *runtime = substream->runtime;
24 struct snd_dma_buffer *buf = runtime->dma_buffer_p; 24 struct snd_dma_buffer *buf = runtime->dma_buffer_p;
25 25
26 if (runtime->dma_area == NULL) 26 if (runtime->dma_area == NULL)
@@ -34,9 +34,9 @@ void devdma_hw_free(struct device *dev, snd_pcm_substream_t *substream)
34 snd_pcm_set_runtime_buffer(substream, NULL); 34 snd_pcm_set_runtime_buffer(substream, NULL);
35} 35}
36 36
37int devdma_hw_alloc(struct device *dev, snd_pcm_substream_t *substream, size_t size) 37int devdma_hw_alloc(struct device *dev, struct snd_pcm_substream *substream, size_t size)
38{ 38{
39 snd_pcm_runtime_t *runtime = substream->runtime; 39 struct snd_pcm_runtime *runtime = substream->runtime;
40 struct snd_dma_buffer *buf = runtime->dma_buffer_p; 40 struct snd_dma_buffer *buf = runtime->dma_buffer_p;
41 int ret = 0; 41 int ret = 0;
42 42
@@ -74,8 +74,8 @@ int devdma_hw_alloc(struct device *dev, snd_pcm_substream_t *substream, size_t s
74 return -ENOMEM; 74 return -ENOMEM;
75} 75}
76 76
77int devdma_mmap(struct device *dev, snd_pcm_substream_t *substream, struct vm_area_struct *vma) 77int devdma_mmap(struct device *dev, struct snd_pcm_substream *substream, struct vm_area_struct *vma)
78{ 78{
79 snd_pcm_runtime_t *runtime = substream->runtime; 79 struct snd_pcm_runtime *runtime = substream->runtime;
80 return dma_mmap_coherent(dev, vma, runtime->dma_area, runtime->dma_addr, runtime->dma_bytes); 80 return dma_mmap_coherent(dev, vma, runtime->dma_area, runtime->dma_addr, runtime->dma_bytes);
81} 81}
diff --git a/sound/arm/devdma.h b/sound/arm/devdma.h
index 5a33b6bacc34..d025329c8a0f 100644
--- a/sound/arm/devdma.h
+++ b/sound/arm/devdma.h
@@ -1,3 +1,3 @@
1void devdma_hw_free(struct device *dev, snd_pcm_substream_t *substream); 1void devdma_hw_free(struct device *dev, struct snd_pcm_substream *substream);
2int devdma_hw_alloc(struct device *dev, snd_pcm_substream_t *substream, size_t size); 2int devdma_hw_alloc(struct device *dev, struct snd_pcm_substream *substream, size_t size);
3int devdma_mmap(struct device *dev, snd_pcm_substream_t *substream, struct vm_area_struct *vma); 3int devdma_mmap(struct device *dev, struct snd_pcm_substream *substream, struct vm_area_struct *vma);