aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-01-13 12:48:06 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:23:39 -0500
commitf7cbb7fcd3bae5264a079e06411b35366da9bd4d (patch)
treecc6c46c6e68f2c13da665ad30c9e1dd370dcb7cf /drivers/media/video/cx88
parent97c67b65cbdfd19887450ae1b80ddbb54de9559d (diff)
[ALSA] Fix snd_xxx_t typedefs
Modules: PXA Mainstone driver,CX88 driver,SAA7134 driver Replace snd_xxx_t typedefs with explicit structs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index 2acccd6d49bc..c841914c0244 100644
--- a/drivers/media/video/cx88/cx88-alsa.c
+++ b/drivers/media/video/cx88/cx88-alsa.c
@@ -63,7 +63,7 @@ struct cx88_audio_dev {
63 /* audio controls */ 63 /* audio controls */
64 int irq; 64 int irq;
65 65
66 snd_card_t *card; 66 struct snd_card *card;
67 67
68 spinlock_t reg_lock; 68 spinlock_t reg_lock;
69 69
@@ -82,7 +82,7 @@ struct cx88_audio_dev {
82 struct cx88_buffer *buf; 82 struct cx88_buffer *buf;
83 83
84 long opened; 84 long opened;
85 snd_pcm_substream_t *substream; 85 struct snd_pcm_substream *substream;
86 86
87}; 87};
88typedef struct cx88_audio_dev snd_cx88_card_t; 88typedef struct cx88_audio_dev snd_cx88_card_t;
@@ -96,7 +96,7 @@ typedef struct cx88_audio_dev snd_cx88_card_t;
96static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 96static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
97static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 97static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
98static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; 98static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1};
99static snd_card_t *snd_cx88_cards[SNDRV_CARDS]; 99static struct snd_card *snd_cx88_cards[SNDRV_CARDS];
100 100
101module_param_array(enable, bool, NULL, 0444); 101module_param_array(enable, bool, NULL, 0444);
102MODULE_PARM_DESC(enable, "Enable cx88x soundcard. default enabled."); 102MODULE_PARM_DESC(enable, "Enable cx88x soundcard. default enabled.");
@@ -320,7 +320,7 @@ static int dsp_buffer_free(snd_cx88_card_t *chip)
320/* 320/*
321 * Digital hardware definition 321 * Digital hardware definition
322 */ 322 */
323static snd_pcm_hardware_t snd_cx88_digital_hw = { 323static struct snd_pcm_hardware snd_cx88_digital_hw = {
324 .info = SNDRV_PCM_INFO_MMAP | 324 .info = SNDRV_PCM_INFO_MMAP |
325 SNDRV_PCM_INFO_INTERLEAVED | 325 SNDRV_PCM_INFO_INTERLEAVED |
326 SNDRV_PCM_INFO_BLOCK_TRANSFER | 326 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -342,16 +342,16 @@ static snd_pcm_hardware_t snd_cx88_digital_hw = {
342/* 342/*
343 * audio pcm capture runtime free 343 * audio pcm capture runtime free
344 */ 344 */
345static void snd_card_cx88_runtime_free(snd_pcm_runtime_t *runtime) 345static void snd_card_cx88_runtime_free(struct snd_pcm_runtime *runtime)
346{ 346{
347} 347}
348/* 348/*
349 * audio pcm capture open callback 349 * audio pcm capture open callback
350 */ 350 */
351static int snd_cx88_pcm_open(snd_pcm_substream_t *substream) 351static int snd_cx88_pcm_open(struct snd_pcm_substream *substream)
352{ 352{
353 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); 353 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream);
354 snd_pcm_runtime_t *runtime = substream->runtime; 354 struct snd_pcm_runtime *runtime = substream->runtime;
355 int err; 355 int err;
356 356
357 if (test_and_set_bit(0, &chip->opened)) 357 if (test_and_set_bit(0, &chip->opened))
@@ -380,7 +380,7 @@ _error:
380/* 380/*
381 * audio close callback 381 * audio close callback
382 */ 382 */
383static int snd_cx88_close(snd_pcm_substream_t *substream) 383static int snd_cx88_close(struct snd_pcm_substream *substream)
384{ 384{
385 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); 385 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream);
386 386
@@ -393,8 +393,8 @@ static int snd_cx88_close(snd_pcm_substream_t *substream)
393/* 393/*
394 * hw_params callback 394 * hw_params callback
395 */ 395 */
396static int snd_cx88_hw_params(snd_pcm_substream_t * substream, 396static int snd_cx88_hw_params(struct snd_pcm_substream * substream,
397 snd_pcm_hw_params_t * hw_params) 397 struct snd_pcm_hw_params * hw_params)
398{ 398{
399 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); 399 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream);
400 struct cx88_buffer *buf; 400 struct cx88_buffer *buf;
@@ -453,7 +453,7 @@ static int snd_cx88_hw_params(snd_pcm_substream_t * substream,
453/* 453/*
454 * hw free callback 454 * hw free callback
455 */ 455 */
456static int snd_cx88_hw_free(snd_pcm_substream_t * substream) 456static int snd_cx88_hw_free(struct snd_pcm_substream * substream)
457{ 457{
458 458
459 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); 459 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream);
@@ -469,7 +469,7 @@ static int snd_cx88_hw_free(snd_pcm_substream_t * substream)
469/* 469/*
470 * prepare callback 470 * prepare callback
471 */ 471 */
472static int snd_cx88_prepare(snd_pcm_substream_t *substream) 472static int snd_cx88_prepare(struct snd_pcm_substream *substream)
473{ 473{
474 return 0; 474 return 0;
475} 475}
@@ -478,7 +478,7 @@ static int snd_cx88_prepare(snd_pcm_substream_t *substream)
478/* 478/*
479 * trigger callback 479 * trigger callback
480 */ 480 */
481static int snd_cx88_card_trigger(snd_pcm_substream_t *substream, int cmd) 481static int snd_cx88_card_trigger(struct snd_pcm_substream *substream, int cmd)
482{ 482{
483 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); 483 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream);
484 int err; 484 int err;
@@ -505,10 +505,10 @@ static int snd_cx88_card_trigger(snd_pcm_substream_t *substream, int cmd)
505/* 505/*
506 * pointer callback 506 * pointer callback
507 */ 507 */
508static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream) 508static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream)
509{ 509{
510 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); 510 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream);
511 snd_pcm_runtime_t *runtime = substream->runtime; 511 struct snd_pcm_runtime *runtime = substream->runtime;
512 512
513 if (chip->read_count) { 513 if (chip->read_count) {
514 chip->read_count -= snd_pcm_lib_period_bytes(substream); 514 chip->read_count -= snd_pcm_lib_period_bytes(substream);
@@ -525,7 +525,7 @@ static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream)
525/* 525/*
526 * operators 526 * operators
527 */ 527 */
528static snd_pcm_ops_t snd_cx88_pcm_ops = { 528static struct snd_pcm_ops snd_cx88_pcm_ops = {
529 .open = snd_cx88_pcm_open, 529 .open = snd_cx88_pcm_open,
530 .close = snd_cx88_close, 530 .close = snd_cx88_close,
531 .ioctl = snd_pcm_lib_ioctl, 531 .ioctl = snd_pcm_lib_ioctl,
@@ -542,7 +542,7 @@ static snd_pcm_ops_t snd_cx88_pcm_ops = {
542static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) 542static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name)
543{ 543{
544 int err; 544 int err;
545 snd_pcm_t *pcm; 545 struct snd_pcm *pcm;
546 546
547 err = snd_pcm_new(chip->card, name, device, 0, 1, &pcm); 547 err = snd_pcm_new(chip->card, name, device, 0, 1, &pcm);
548 if (err < 0) 548 if (err < 0)
@@ -557,7 +557,8 @@ static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name)
557/**************************************************************************** 557/****************************************************************************
558 CONTROL INTERFACE 558 CONTROL INTERFACE
559 ****************************************************************************/ 559 ****************************************************************************/
560static int snd_cx88_capture_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *info) 560static int snd_cx88_capture_volume_info(struct snd_kcontrol *kcontrol,
561 struct snd_ctl_elem_info *info)
561{ 562{
562 info->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 563 info->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
563 info->count = 1; 564 info->count = 1;
@@ -568,7 +569,8 @@ static int snd_cx88_capture_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
568} 569}
569 570
570/* OK - TODO: test it */ 571/* OK - TODO: test it */
571static int snd_cx88_capture_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) 572static int snd_cx88_capture_volume_get(struct snd_kcontrol *kcontrol,
573 struct snd_ctl_elem_value *value)
572{ 574{
573 snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol); 575 snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol);
574 struct cx88_core *core=chip->core; 576 struct cx88_core *core=chip->core;
@@ -579,7 +581,8 @@ static int snd_cx88_capture_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
579} 581}
580 582
581/* OK - TODO: test it */ 583/* OK - TODO: test it */
582static int snd_cx88_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) 584static int snd_cx88_capture_volume_put(struct snd_kcontrol *kcontrol,
585 struct snd_ctl_elem_value *value)
583{ 586{
584 snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol); 587 snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol);
585 struct cx88_core *core=chip->core; 588 struct cx88_core *core=chip->core;
@@ -595,7 +598,7 @@ static int snd_cx88_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
595 return v != old_control; 598 return v != old_control;
596} 599}
597 600
598static snd_kcontrol_new_t snd_cx88_capture_volume = { 601static struct snd_kcontrol_new snd_cx88_capture_volume = {
599 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 602 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
600 .name = "Capture Volume", 603 .name = "Capture Volume",
601 .info = snd_cx88_capture_volume_info, 604 .info = snd_cx88_capture_volume_info,
@@ -641,7 +644,7 @@ static int snd_cx88_free(snd_cx88_card_t *chip)
641/* 644/*
642 * Component Destructor 645 * Component Destructor
643 */ 646 */
644static void snd_cx88_dev_free(snd_card_t * card) 647static void snd_cx88_dev_free(struct snd_card * card)
645{ 648{
646 snd_cx88_card_t *chip = card->private_data; 649 snd_cx88_card_t *chip = card->private_data;
647 650
@@ -654,8 +657,9 @@ static void snd_cx88_dev_free(snd_card_t * card)
654 */ 657 */
655 658
656static int devno; 659static int devno;
657static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, 660static int __devinit snd_cx88_create(struct snd_card *card,
658 snd_cx88_card_t **rchip) 661 struct pci_dev *pci,
662 snd_cx88_card_t **rchip)
659{ 663{
660 snd_cx88_card_t *chip; 664 snd_cx88_card_t *chip;
661 struct cx88_core *core; 665 struct cx88_core *core;
@@ -726,7 +730,7 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci,
726static int __devinit cx88_audio_initdev(struct pci_dev *pci, 730static int __devinit cx88_audio_initdev(struct pci_dev *pci,
727 const struct pci_device_id *pci_id) 731 const struct pci_device_id *pci_id)
728{ 732{
729 snd_card_t *card; 733 struct snd_card *card;
730 snd_cx88_card_t *chip; 734 snd_cx88_card_t *chip;
731 int err; 735 int err;
732 736