From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
To: Adrian Bunk <bunk@stusta.de>
Cc: Linus Torvalds <torvalds@osdl.org>,
Sergey Vlasov <vsu@altlinux.ru>,
Ricardo Cerqueira <v4l@cerqueira.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
video4linux-list@redhat.com, perex@suse.cz,
alsa-devel@alsa-project.org
Subject: Re: [Alsa-devel] 2.6.15-rc6: boot failure in saa7134-alsa.c
Date: Tue, 20 Dec 2005 18:35:30 -0200 [thread overview]
Message-ID: <1135110930.7822.18.camel@localhost> (raw)
In-Reply-To: <20051220191412.GA4578@stusta.de>
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
Em Ter, 2005-12-20 às 20:14 +0100, Adrian Bunk escreveu:
> (plus disabling building of saa7134-oss.o because
> otherwise saa7134-alsa.o wouldn't do anything).
This patch should fix alsa-oss incompatibilities when both are linked
as module. It will also require either -oss or -alsa if it is statically
linked.
It doesn't address the OOPS because of sound late init.
Adrian,
Please test and give us some feedback.
Cheers,
Mauro.
[-- Attachment #2: v4l_dvb_3200_fix_saa7134_alsa_oss_collisions.patch --]
[-- Type: text/x-patch, Size: 5500 bytes --]
V4L/DVB (3200): Fix saa7134 ALSA/OSS collisions
From: Ricardo Cerqueira <v4l@cerqueira.org>
- 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>
---
drivers/media/video/saa7134/Kconfig | 26 ++++++++++++++++++++++++--
drivers/media/video/saa7134/Makefile | 7 +++++--
drivers/media/video/saa7134/saa7134-alsa.c | 13 ++++++++++---
drivers/media/video/saa7134/saa7134-oss.c | 15 ++++++++++++---
4 files changed, 51 insertions(+), 10 deletions(-)
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig
index c512c44..c0f604a 100644
--- a/drivers/media/video/saa7134/Kconfig
+++ b/drivers/media/video/saa7134/Kconfig
@@ -1,11 +1,10 @@
config VIDEO_SAA7134
tristate "Philips SAA7134 support"
- depends on VIDEO_DEV && PCI && I2C && SOUND && SND
+ depends on VIDEO_DEV && PCI && I2C
select VIDEO_BUF
select VIDEO_IR
select VIDEO_TUNER
select CRC32
- select SND_PCM_OSS
---help---
This is a video4linux driver for Philips SAA713x based
TV cards.
@@ -13,6 +12,29 @@ config VIDEO_SAA7134
To compile this driver as a module, choose M here: the
module will be called saa7134.
+config VIDEO_SAA7134_ALSA
+ tristate "Philips SAA7134 DMA audio support"
+ depends on VIDEO_SAA7134 && SOUND && SND && (!VIDEO_SAA7134_OSS || VIDEO_SAA7134_OSS = m)
+ select SND_PCM_OSS
+ ---help---
+ This is a video4linux driver for direct (DMA) audio in
+ Philips SAA713x based TV cards using ALSA
+
+ To compile this driver as a module, choose M here: the
+ module will be called saa7134-alsa.
+
+config VIDEO_SAA7134_OSS
+ tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)"
+ depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || VIDEO_SAA7134_ALSA = m)
+ ---help---
+ This is a video4linux driver for direct (DMA) audio in
+ Philips SAA713x based TV cards using OSS
+
+ This is deprecated in favor of the ALSA module
+
+ To compile this driver as a module, choose M here: the
+ module will be called saa7134-oss.
+
config VIDEO_SAA7134_DVB
tristate "DVB/ATSC Support for saa7134 based TV cards"
depends on VIDEO_SAA7134 && DVB_CORE
diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile
index 134f83a..1ba9984 100644
--- a/drivers/media/video/saa7134/Makefile
+++ b/drivers/media/video/saa7134/Makefile
@@ -4,8 +4,11 @@ saa7134-objs := saa7134-cards.o saa7134-
saa7134-video.o saa7134-input.o
obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \
- saa6752hs.o saa7134-alsa.o \
- saa7134-oss.o
+ saa6752hs.o
+
+obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o
+obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o
+
obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
EXTRA_CFLAGS += -I$(src)/..
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index 953d5fe..ac608b1 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -989,6 +989,14 @@ static int saa7134_alsa_init(void)
struct saa7134_dev *dev = NULL;
struct list_head *list;
+ if (!dmasound_init && !dmasound_exit) {
+ dmasound_init = alsa_device_init;
+ dmasound_exit = alsa_device_exit;
+ } else {
+ printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n");
+ return -EBUSY;
+ }
+
printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n");
list_for_each(list,&saa7134_devlist) {
@@ -1001,9 +1009,6 @@ static int saa7134_alsa_init(void)
}
}
- dmasound_init = alsa_device_init;
- dmasound_exit = alsa_device_exit;
-
if (dev == NULL)
printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n");
@@ -1023,6 +1028,8 @@ static void saa7134_alsa_exit(void)
snd_card_free(snd_saa7134_cards[idx]);
}
+ dmasound_init = NULL;
+ dmasound_exit = NULL;
printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n");
return;
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
index 513a699..0061acf 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;
next prev parent reply other threads:[~2005-12-20 20:35 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-19 0:47 Linux 2.6.15-rc6 Linus Torvalds
2005-12-19 1:30 ` Diego Calleja
2005-12-19 5:41 ` Willy Tarreau
2005-12-20 13:18 ` 2.6.15-rc6: boot failure in saa7134-alsa.c Adrian Bunk
2005-12-20 15:52 ` [Alsa-devel] " Sergey Vlasov
2005-12-20 18:24 ` Linus Torvalds
[not found] ` <20051220183455.GC19797@master.mivlgu.local>
2005-12-20 18:57 ` Linus Torvalds
2005-12-20 19:14 ` Adrian Bunk
2005-12-20 19:23 ` Mauro Carvalho Chehab
2005-12-20 19:59 ` Linus Torvalds
2005-12-20 20:23 ` Adrian Bunk
2005-12-20 20:41 ` Linus Torvalds
2005-12-20 20:47 ` James Courtier-Dutton
2005-12-20 21:06 ` Linus Torvalds
2005-12-20 21:13 ` [RFC: 2.6 patch] Makefile: sound/ must come before drivers/ Adrian Bunk
2005-12-20 21:24 ` [Alsa-devel] " Jaroslav Kysela
2005-12-20 22:09 ` Linus Torvalds
2005-12-21 14:21 ` Takashi Iwai
2005-12-21 20:49 ` Mauro Carvalho Chehab
2005-12-22 15:32 ` Takashi Iwai
2005-12-22 16:06 ` Mauro Carvalho Chehab
2005-12-22 16:17 ` Takashi Iwai
2005-12-22 16:38 ` Mauro Carvalho Chehab
2005-12-21 14:23 ` [Alsa-devel] 2.6.15-rc6: boot failure in saa7134-alsa.c Takashi Iwai
2005-12-21 18:22 ` Adrian Bunk
2005-12-21 18:38 ` Takashi Iwai
2005-12-21 22:40 ` Adrian Bunk
2005-12-22 11:39 ` Takashi Iwai
2005-12-20 20:35 ` James Courtier-Dutton
2005-12-20 21:03 ` Linus Torvalds
2005-12-20 22:17 ` Lee Revell
2005-12-21 1:29 ` Linus Torvalds
2005-12-21 13:29 ` Stephen Clark
2005-12-21 14:39 ` Takashi Iwai
2005-12-21 18:32 ` Linus Torvalds
2005-12-21 18:52 ` Takashi Iwai
2005-12-21 22:42 ` Adrian Bunk
2005-12-21 22:50 ` R C
2005-12-21 16:58 ` Steve deRosier
2005-12-21 18:32 ` Linus Torvalds
2005-12-21 18:41 ` Takashi Iwai
2005-12-20 20:35 ` Mauro Carvalho Chehab [this message]
2005-12-22 0:59 ` Adrian Bunk
2005-12-22 11:15 ` Mauro Carvalho Chehab
2005-12-22 1:13 ` 2.6.15-rc6: known regressions in the kernel Bugzilla Adrian Bunk
2005-12-22 7:15 ` Greg KH
2005-12-22 12:04 ` Takashi Iwai
2005-12-29 13:23 ` Adrian Bunk
2005-12-30 19:31 ` Lee Revell
2005-12-22 8:52 ` Andrew Morton
2005-12-22 13:57 ` Adrian Bunk
2005-12-22 14:08 ` Andrew Morton
2005-12-22 23:12 ` Adrian Bunk
2005-12-23 15:28 ` Bill Davidsen
2005-12-23 17:32 ` Michael Krufky
2005-12-24 3:54 ` Andrew Morton
2005-12-25 20:25 ` Bill Davidsen
2005-12-26 1:59 ` Michael Krufky
2005-12-26 2:21 ` Lee Revell
2005-12-22 17:11 ` Brice Goglin
[not found] ` <200512222152.05427.p_christ@hol.gr>
[not found] ` <1135291436.14685.7.camel@localhost>
2005-12-22 22:55 ` Mike Krufky
[not found] ` <200512230121.48882.p_christ@hol.gr>
2005-12-23 1:07 ` Michael Krufky
2005-12-23 11:50 ` Gottfried Haider
2006-01-02 16:00 ` Adrian Bunk
2006-01-04 16:38 ` Greg KH
2005-12-22 15:16 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1135110930.7822.18.camel@localhost \
--to=mchehab@brturbo.com.br \
--cc=alsa-devel@alsa-project.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
--cc=torvalds@osdl.org \
--cc=v4l@cerqueira.org \
--cc=video4linux-list@redhat.com \
--cc=vsu@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox