aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:59:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:59:20 -0500
commit1c2e02750b992703a8a18634e08b04353face243 (patch)
tree5dc2d10bad329eeb73b9e219e237662a8383f971 /drivers
parent8b4b6707ee32f929846d947d18b1b9bf42e988aa (diff)
parenta3c44854a59f7e983c867060aa906bbf5befb1ef (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa: (124 commits) [ALSA] version 1.0.11rc4 [PATCH] Intruduce DMA_28BIT_MASK [ALSA] hda-codec - Add support for ASUS P4GPL-X [ALSA] hda-codec - Add support for HP nx9420 laptop [ALSA] Fix memory leaks in error path of control.c [ALSA] AMD Au1x00: AC'97 controller is memory mapped [ALSA] AMD Au1x00: fix DMA init/cleanup [ALSA] hda-codec - Fix generic auto-configurator [ALSA] hda-codec - Fix BIOS auto-configuration [ALSA] Fixes typos in Audiophile-USB.txt [ALSA] ice1712 - typo fixes for dxr_enable module option [ALSA] AMD Au1x00: make driver build after cleanup [ALSA] ice1712 - Fix wrong value types for enum items [ALSA] fix resource leak in usbmixer [ALSA] Fix gus_pcm dereference before NULL [ALSA] Fix seq_clientmgr dereferences before NULL check [ALSA] hda-codec - Fix for Samsung R65 and ASUS A6J [ALSA] hda-codec - Add support for VAIO FE550G and SZ110 [ALSA] usb-audio: add Maya44 mixer control names [ALSA] usb-audio: add Casio PL-40R support ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c54
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c65
-rw-r--r--drivers/media/video/saa7134/saa7134.h2
3 files changed, 66 insertions, 55 deletions
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index bffef1decc8b..3170b8f72c68 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
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index 64e2c108df34..aca84d2f9825 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -71,7 +71,7 @@ MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s).");
71 */ 71 */
72 72
73typedef struct snd_card_saa7134 { 73typedef struct snd_card_saa7134 {
74 snd_card_t *card; 74 struct snd_card *card;
75 spinlock_t mixer_lock; 75 spinlock_t mixer_lock;
76 int mixer_volume[MIXER_ADDR_LAST+1][2]; 76 int mixer_volume[MIXER_ADDR_LAST+1][2];
77 int capture_source[MIXER_ADDR_LAST+1][2]; 77 int capture_source[MIXER_ADDR_LAST+1][2];
@@ -95,10 +95,10 @@ typedef struct snd_card_saa7134_pcm {
95 95
96 spinlock_t lock; 96 spinlock_t lock;
97 97
98 snd_pcm_substream_t *substream; 98 struct snd_pcm_substream *substream;
99} snd_card_saa7134_pcm_t; 99} snd_card_saa7134_pcm_t;
100 100
101static snd_card_t *snd_saa7134_cards[SNDRV_CARDS]; 101static struct snd_card *snd_saa7134_cards[SNDRV_CARDS];
102 102
103 103
104/* 104/*
@@ -251,10 +251,10 @@ out:
251 * 251 *
252 */ 252 */
253 253
254static int snd_card_saa7134_capture_trigger(snd_pcm_substream_t * substream, 254static int snd_card_saa7134_capture_trigger(struct snd_pcm_substream * substream,
255 int cmd) 255 int cmd)
256{ 256{
257 snd_pcm_runtime_t *runtime = substream->runtime; 257 struct snd_pcm_runtime *runtime = substream->runtime;
258 snd_card_saa7134_pcm_t *pcm = runtime->private_data; 258 snd_card_saa7134_pcm_t *pcm = runtime->private_data;
259 struct saa7134_dev *dev=pcm->dev; 259 struct saa7134_dev *dev=pcm->dev;
260 int err = 0; 260 int err = 0;
@@ -332,9 +332,9 @@ static int dsp_buffer_free(struct saa7134_dev *dev)
332 * 332 *
333 */ 333 */
334 334
335static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream) 335static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream)
336{ 336{
337 snd_pcm_runtime_t *runtime = substream->runtime; 337 struct snd_pcm_runtime *runtime = substream->runtime;
338 int bswap, sign; 338 int bswap, sign;
339 u32 fmt, control; 339 u32 fmt, control;
340 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); 340 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
@@ -421,9 +421,10 @@ static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream)
421 * 421 *
422 */ 422 */
423 423
424static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t * substream) 424static snd_pcm_uframes_t
425snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream)
425{ 426{
426 snd_pcm_runtime_t *runtime = substream->runtime; 427 struct snd_pcm_runtime *runtime = substream->runtime;
427 snd_card_saa7134_pcm_t *pcm = runtime->private_data; 428 snd_card_saa7134_pcm_t *pcm = runtime->private_data;
428 struct saa7134_dev *dev=pcm->dev; 429 struct saa7134_dev *dev=pcm->dev;
429 430
@@ -441,7 +442,7 @@ static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t *
441 * ALSA hardware capabilities definition 442 * ALSA hardware capabilities definition
442 */ 443 */
443 444
444static snd_pcm_hardware_t snd_card_saa7134_capture = 445static struct snd_pcm_hardware snd_card_saa7134_capture =
445{ 446{
446 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 447 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
447 SNDRV_PCM_INFO_BLOCK_TRANSFER | 448 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -464,7 +465,7 @@ static snd_pcm_hardware_t snd_card_saa7134_capture =
464 .periods_max = 1024, 465 .periods_max = 1024,
465}; 466};
466 467
467static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime) 468static void snd_card_saa7134_runtime_free(struct snd_pcm_runtime *runtime)
468{ 469{
469 snd_card_saa7134_pcm_t *pcm = runtime->private_data; 470 snd_card_saa7134_pcm_t *pcm = runtime->private_data;
470 471
@@ -481,8 +482,8 @@ static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime)
481 * 482 *
482 */ 483 */
483 484
484static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, 485static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
485 snd_pcm_hw_params_t * hw_params) 486 struct snd_pcm_hw_params * hw_params)
486{ 487{
487 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); 488 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
488 struct saa7134_dev *dev; 489 struct saa7134_dev *dev;
@@ -561,7 +562,7 @@ static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream,
561 * 562 *
562 */ 563 */
563 564
564static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) 565static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream)
565{ 566{
566 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); 567 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
567 struct saa7134_dev *dev; 568 struct saa7134_dev *dev;
@@ -587,7 +588,7 @@ static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream)
587 * 588 *
588 */ 589 */
589 590
590static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream) 591static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream)
591{ 592{
592 return 0; 593 return 0;
593} 594}
@@ -602,9 +603,9 @@ static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream)
602 * 603 *
603 */ 604 */
604 605
605static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream) 606static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
606{ 607{
607 snd_pcm_runtime_t *runtime = substream->runtime; 608 struct snd_pcm_runtime *runtime = substream->runtime;
608 snd_card_saa7134_pcm_t *pcm; 609 snd_card_saa7134_pcm_t *pcm;
609 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); 610 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
610 struct saa7134_dev *dev = saa7134->dev; 611 struct saa7134_dev *dev = saa7134->dev;
@@ -640,7 +641,7 @@ static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream)
640 * ALSA capture callbacks definition 641 * ALSA capture callbacks definition
641 */ 642 */
642 643
643static snd_pcm_ops_t snd_card_saa7134_capture_ops = { 644static struct snd_pcm_ops snd_card_saa7134_capture_ops = {
644 .open = snd_card_saa7134_capture_open, 645 .open = snd_card_saa7134_capture_open,
645 .close = snd_card_saa7134_capture_close, 646 .close = snd_card_saa7134_capture_close,
646 .ioctl = snd_pcm_lib_ioctl, 647 .ioctl = snd_pcm_lib_ioctl,
@@ -661,7 +662,7 @@ static snd_pcm_ops_t snd_card_saa7134_capture_ops = {
661 662
662static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) 663static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device)
663{ 664{
664 snd_pcm_t *pcm; 665 struct snd_pcm *pcm;
665 int err; 666 int err;
666 667
667 if ((err = snd_pcm_new(saa7134->card, "SAA7134 PCM", device, 0, 1, &pcm)) < 0) 668 if ((err = snd_pcm_new(saa7134->card, "SAA7134 PCM", device, 0, 1, &pcm)) < 0)
@@ -679,7 +680,8 @@ static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device)
679 .get = snd_saa7134_volume_get, .put = snd_saa7134_volume_put, \ 680 .get = snd_saa7134_volume_get, .put = snd_saa7134_volume_put, \
680 .private_value = addr } 681 .private_value = addr }
681 682
682static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 683static int snd_saa7134_volume_info(struct snd_kcontrol * kcontrol,
684 struct snd_ctl_elem_info * uinfo)
683{ 685{
684 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 686 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
685 uinfo->count = 2; 687 uinfo->count = 2;
@@ -688,7 +690,8 @@ static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_
688 return 0; 690 return 0;
689} 691}
690 692
691static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 693static int snd_saa7134_volume_get(struct snd_kcontrol * kcontrol,
694 struct snd_ctl_elem_value * ucontrol)
692{ 695{
693 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); 696 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
694 int addr = kcontrol->private_value; 697 int addr = kcontrol->private_value;
@@ -698,7 +701,8 @@ static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
698 return 0; 701 return 0;
699} 702}
700 703
701static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 704static int snd_saa7134_volume_put(struct snd_kcontrol * kcontrol,
705 struct snd_ctl_elem_value * ucontrol)
702{ 706{
703 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); 707 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
704 int change, addr = kcontrol->private_value; 708 int change, addr = kcontrol->private_value;
@@ -729,7 +733,8 @@ static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
729 .get = snd_saa7134_capsrc_get, .put = snd_saa7134_capsrc_put, \ 733 .get = snd_saa7134_capsrc_get, .put = snd_saa7134_capsrc_put, \
730 .private_value = addr } 734 .private_value = addr }
731 735
732static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 736static int snd_saa7134_capsrc_info(struct snd_kcontrol * kcontrol,
737 struct snd_ctl_elem_info * uinfo)
733{ 738{
734 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 739 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
735 uinfo->count = 2; 740 uinfo->count = 2;
@@ -738,7 +743,8 @@ static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_
738 return 0; 743 return 0;
739} 744}
740 745
741static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 746static int snd_saa7134_capsrc_get(struct snd_kcontrol * kcontrol,
747 struct snd_ctl_elem_value * ucontrol)
742{ 748{
743 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); 749 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
744 int addr = kcontrol->private_value; 750 int addr = kcontrol->private_value;
@@ -751,7 +757,8 @@ static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
751 return 0; 757 return 0;
752} 758}
753 759
754static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 760static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol,
761 struct snd_ctl_elem_value * ucontrol)
755{ 762{
756 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); 763 snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
757 int change, addr = kcontrol->private_value; 764 int change, addr = kcontrol->private_value;
@@ -828,7 +835,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
828 return change; 835 return change;
829} 836}
830 837
831static snd_kcontrol_new_t snd_saa7134_controls[] = { 838static struct snd_kcontrol_new snd_saa7134_controls[] = {
832SAA713x_VOLUME("Video Volume", 0, MIXER_ADDR_TVTUNER), 839SAA713x_VOLUME("Video Volume", 0, MIXER_ADDR_TVTUNER),
833SAA713x_CAPSRC("Video Capture Switch", 0, MIXER_ADDR_TVTUNER), 840SAA713x_CAPSRC("Video Capture Switch", 0, MIXER_ADDR_TVTUNER),
834SAA713x_VOLUME("Line Volume", 1, MIXER_ADDR_LINE1), 841SAA713x_VOLUME("Line Volume", 1, MIXER_ADDR_LINE1),
@@ -847,7 +854,7 @@ SAA713x_CAPSRC("Line Capture Switch", 2, MIXER_ADDR_LINE2),
847 854
848static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) 855static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip)
849{ 856{
850 snd_card_t *card = chip->card; 857 struct snd_card *card = chip->card;
851 unsigned int idx; 858 unsigned int idx;
852 int err; 859 int err;
853 860
@@ -861,7 +868,7 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip)
861 return 0; 868 return 0;
862} 869}
863 870
864static void snd_saa7134_free(snd_card_t * card) 871static void snd_saa7134_free(struct snd_card * card)
865{ 872{
866 snd_card_saa7134_t *chip = card->private_data; 873 snd_card_saa7134_t *chip = card->private_data;
867 874
@@ -888,7 +895,7 @@ static void snd_saa7134_free(snd_card_t * card)
888static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) 895static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
889{ 896{
890 897
891 snd_card_t *card; 898 struct snd_card *card;
892 snd_card_saa7134_t *chip; 899 snd_card_saa7134_t *chip;
893 int err; 900 int err;
894 901
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 17ba34f30760..ce1c2e0b065e 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -397,7 +397,7 @@ struct saa7134_dmasound {
397 unsigned int read_offset; 397 unsigned int read_offset;
398 unsigned int read_count; 398 unsigned int read_count;
399 void * priv_data; 399 void * priv_data;
400 snd_pcm_substream_t *substream; 400 struct snd_pcm_substream *substream;
401}; 401};
402 402
403/* IR input */ 403/* IR input */