aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-audio.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-12-31 07:35:57 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-12-31 07:35:57 -0500
commit2ca1a615835d9f4990f42102ab1f2ef434e7e89c (patch)
tree726cf3d5f29a6c66c44e4bd68e7ebed2fd83d059 /drivers/media/video/em28xx/em28xx-audio.c
parente12f0102ac81d660c9f801d0a0e10ccf4537a9de (diff)
parent6a94cb73064c952255336cc57731904174b2c58f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: arch/x86/kernel/io_apic.c
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-audio.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index 7a8d49ef646e..15c03f0e69ad 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -424,11 +424,12 @@ static int em28xx_audio_init(struct em28xx *dev)
424 struct snd_pcm *pcm; 424 struct snd_pcm *pcm;
425 struct snd_card *card; 425 struct snd_card *card;
426 static int devnr; 426 static int devnr;
427 int ret, err; 427 int err;
428 428
429 if (dev->has_audio_class) { 429 if (dev->has_alsa_audio != 1) {
430 /* This device does not support the extension (in this case 430 /* This device does not support the extension (in this case
431 the device is expecting the snd-usb-audio module */ 431 the device is expecting the snd-usb-audio module or
432 doesn't have analog audio support at all) */
432 return 0; 433 return 0;
433 } 434 }
434 435
@@ -449,7 +450,12 @@ static int em28xx_audio_init(struct em28xx *dev)
449 } 450 }
450 451
451 spin_lock_init(&adev->slock); 452 spin_lock_init(&adev->slock);
452 ret = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm); 453 err = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm);
454 if (err < 0) {
455 snd_card_free(card);
456 return err;
457 }
458
453 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_em28xx_pcm_capture); 459 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_em28xx_pcm_capture);
454 pcm->info_flags = 0; 460 pcm->info_flags = 0;
455 pcm->private_data = dev; 461 pcm->private_data = dev;
@@ -461,7 +467,7 @@ static int em28xx_audio_init(struct em28xx *dev)
461 err = snd_card_register(card); 467 err = snd_card_register(card);
462 if (err < 0) { 468 if (err < 0) {
463 snd_card_free(card); 469 snd_card_free(card);
464 return -ENOMEM; 470 return err;
465 } 471 }
466 adev->sndcard = card; 472 adev->sndcard = card;
467 adev->udev = dev->udev; 473 adev->udev = dev->udev;
@@ -475,9 +481,10 @@ static int em28xx_audio_fini(struct em28xx *dev)
475 if (dev == NULL) 481 if (dev == NULL)
476 return 0; 482 return 0;
477 483
478 if (dev->has_audio_class) { 484 if (dev->has_alsa_audio != 1) {
479 /* This device does not support the extension (in this case 485 /* This device does not support the extension (in this case
480 the device is expecting the snd-usb-audio module */ 486 the device is expecting the snd-usb-audio module or
487 doesn't have analog audio support at all) */
481 return 0; 488 return 0;
482 } 489 }
483 490