summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-oss.c
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l@cerqueira.org>2005-12-20 18:26:26 -0200
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-12-22 07:55:06 -0200
commit7bb9529602f8bb41a92275825b808a42ed33e5be (patch)
treed719928ae348342b47e50578155ef51f8e85fae3 /drivers/media/video/saa7134/saa7134-oss.c
parentd5ea4e26602fa7f5141872f2c17a862f1974a73f (diff)
downloadtalos-obmc-linux-7bb9529602f8bb41a92275825b808a42ed33e5be.tar.gz
talos-obmc-linux-7bb9529602f8bb41a92275825b808a42ed33e5be.zip
V4L/DVB (3200): Fix saa7134 ALSA/OSS collisions
- When ALSA or OSS are loaded, check if the other is present Fixed hotplug notifiers cleanup on module removal - The saa7134 DMA sound modules now have their own Kconfig entries, and if built statically enforce exclusivity - SND_PCM_OSS isn't necessary for the OSS driver Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-oss.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-oss.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
index c450d57b2949..8badd2a9cb2f 100644
--- a/drivers/media/video/saa7134/saa7134-oss.c
+++ b/drivers/media/video/saa7134/saa7134-oss.c
@@ -959,8 +959,17 @@ static int saa7134_oss_init(void)
struct saa7134_dev *dev = NULL;
struct list_head *list;
+ if (!dmasound_init && !dmasound_exit) {
+ dmasound_init = oss_device_init;
+ dmasound_exit = oss_device_exit;
+ } else {
+ printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n");
+ return -EBUSY;
+ }
+
printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n");
+
list_for_each(list,&saa7134_devlist) {
dev = list_entry(list, struct saa7134_dev, devlist);
if (dev->dmasound.priv_data == NULL) {
@@ -974,9 +983,6 @@ static int saa7134_oss_init(void)
if (dev == NULL)
printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n");
- dmasound_init = oss_device_init;
- dmasound_exit = oss_device_exit;
-
return 0;
}
@@ -997,6 +1003,9 @@ static void saa7134_oss_exit(void)
}
+ dmasound_init = NULL;
+ dmasound_exit = NULL;
+
printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n");
return;
OpenPOWER on IntegriCloud