* Fw: PATCH: creating devices for multiple sound cards
@ 2001-08-02 22:16 Nerijus Baliunas
0 siblings, 0 replies; 6+ messages in thread
From: Nerijus Baliunas @ 2001-08-02 22:16 UTC (permalink / raw)
To: linux-kernel, Chris Rankin, linux-sound
Hello,
Why this patch was not applied (I checked 2.4.7)?
------ Forwarded message ------
From: Chris Rankin <rankinc@pacbell.net>
Date: Sat, 14 Apr 2001 09:44:35 +0200
Subject: PATCH: creating devices for multiple sound cards
To: linux-sound@vger.kernel.org
Hi,
I have just installed a new sound card in my machine, and have left
the built-in sound chip enabled despite the motherboard manufacturer's
warning of Bad Things. The result is that I now have two sound devices
in my machine - an ICH (i810_audio) and a Soundblaster Live! The Live!
is device 0, of course. Anyway, I am using the ALSA drivers because
the native i810_audio module caused a kernel panic (NULL pointer
reference in an interrupt handler, I believe), and I have noticed that
the ALSA drivers have difficulty creating OSS device nodes for both
cards. I have traced the problem to the register_sound_special()
function within Linux's soundcore.o module. Basically, ALSA uses this
function to create OSS devices, but this function was never written
with more than one sound device in mind. Until now.
A few points about this patch:
1. I have renamed "sequencer2" to "music" because of a potential naming
conflict between devices 14,8 ("music" on card 0) and 14,33 ("sequencer"
on card 2).
2. I have renamed device "midi00" to "midi". "midi01" now becomes "midi1"
as well, although I would also point out that this is now consistent with
the behaviour of the register_sound_midi() function.
Having applied this patch, ALSA gives me two mixer devices in /dev/sound,
and I no longer get messages like these in my logs:
Apr 12 01:36:54 (none) kernel: devfs: devfs_register(): device already registered: "unknown"
Apr 12 01:40:04 (none) kernel: devfs: devfs_register(): device already registered: "mixer"
Apr 12 01:40:04 (none) kernel: devfs: devfs_register(): device already registered: "dsp"
Cheers,
Chris
--- linux-2.4.3/drivers/sound/sound_core.c.orig Fri Mar 16 23:00:44 2001
+++ linux-2.4.3/drivers/sound/sound_core.c Sat Apr 14 00:13:18 2001
@@ -227,9 +227,10 @@
int register_sound_special(struct file_operations *fops, int unit)
{
- char *name;
+ const char *name;
+ const int minor = (unit & 15);
- switch (unit) {
+ switch (minor) {
case 0:
name = "mixer";
break;
@@ -237,7 +238,7 @@
name = "sequencer";
break;
case 2:
- name = "midi00";
+ name = "midi";
break;
case 3:
name = "dsp";
@@ -255,7 +256,7 @@
name = "unknown7";
break;
case 8:
- name = "sequencer2";
+ name = "music";
break;
case 9:
name = "dmmidi";
@@ -279,7 +280,7 @@
name = "unknown";
break;
}
- return sound_insert_unit(&chains[unit&15], fops, -1, unit, unit+1,
+ return sound_insert_unit(&chains[minor], fops, -1, minor, minor+128,
name, S_IRUSR | S_IWUSR);
}
To unsubscribe from this list: send the line "unsubscribe linux-sound" in
the body of a message to majordomo@vger.kernel.org
-------- End of message -------
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Fw: PATCH: creating devices for multiple sound cards @ 2001-08-02 23:42 Chris Rankin 0 siblings, 0 replies; 6+ messages in thread From: Chris Rankin @ 2001-08-02 23:42 UTC (permalink / raw) To: nerijus; +Cc: linux-kernel Hi, I saw your email on linux-kernel; actually I'm glad that patch *wasn't* applied because I think it was flawed. I have recently posted a newer version to linux-sound and sound-list@redhat.com in the hope that the 2.4 soundcore maintainer would pick it up. Who *is* the soundcore maintainer for 2.4? The MAINTAINERS file says that Alan Cox is the 2.2 maintainer only. I'll email the latest patch to linux-kernel as well, since linux-sound appears to be dead these days. Cheers, Chris __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <E15SSDc-0001o9-00@the-village.bc.nu>]
[parent not found: <20010803000239.91173.qmail@web13105.mail.yahoo.com>]
[parent not found: <20010802201329.A3034@erasmus.off.net>]
* Re: Fw: PATCH: creating devices for multiple sound cards [not found] ` <20010802201329.A3034@erasmus.off.net> @ 2001-08-03 17:11 ` Bill Pringlemeir 2001-08-03 17:22 ` Alan Cox ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Bill Pringlemeir @ 2001-08-03 17:11 UTC (permalink / raw) To: Zach Brown; +Cc: Chris Rankin, linux-kernel, nerijus >>>>> "Zach" == Zach Brown <zab@zabbo.net> writes: [snip] Zach> doing many other things. Hopefully the kernel side of ALSA Zach> will be acceptable for inclusion in 2.5. At least it has an Zach> army of people actively maintaining it. If ALSA will replace OSS, then does it make it somewhat futile to add things to the current set of sound drivers? I was going to look at the SBLive driver. I have been side tracked by an xterm bug; it seems to have bad handling of utmp on Linux. regards, Bill Pringlemeir. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fw: PATCH: creating devices for multiple sound cards 2001-08-03 17:11 ` Bill Pringlemeir @ 2001-08-03 17:22 ` Alan Cox 2001-08-03 17:40 ` Chris Rankin 2001-08-03 20:25 ` Zach Brown 2 siblings, 0 replies; 6+ messages in thread From: Alan Cox @ 2001-08-03 17:22 UTC (permalink / raw) To: Bill Pringlemeir; +Cc: Zach Brown, Chris Rankin, linux-kernel, nerijus > If ALSA will replace OSS, then does it make it somewhat futile to add > things to the current set of sound drivers? I was going to look at > the SBLive driver. I have been side tracked by an xterm bug; it seems > to have bad handling of utmp on Linux. Most folks I know are using utmpter for that - it avoids xterm being setuid setgid or anything else that you really dont want to make it. As to the sblive - well its probably 2 years away from 2.6 and much of the work is being shared - the same bugs turn up in both ALSA and OSS quite often and several OSS drivers are based off ALSA ones ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fw: PATCH: creating devices for multiple sound cards 2001-08-03 17:11 ` Bill Pringlemeir 2001-08-03 17:22 ` Alan Cox @ 2001-08-03 17:40 ` Chris Rankin 2001-08-03 20:25 ` Zach Brown 2 siblings, 0 replies; 6+ messages in thread From: Chris Rankin @ 2001-08-03 17:40 UTC (permalink / raw) To: Bill Pringlemeir, Zach Brown; +Cc: Chris Rankin, linux-kernel, nerijus ALSA won't replace OSS overnight, and so a small amount of OSS-maintenance can't possibly hurt. For example, I use the OSS version of the emu10k1 driver for DVD sound because the OSS one is realtime-capable (and so provides better synchronisation) but the ALSA one isn't yet. Besides, the API I've tried to fix is actually *used* by ALSA to provide OSS-emulation devices, except that it doesn't work on a devfs-based machine with multiple sound cards because all the device names clash. Cheers, Chris --- Bill Pringlemeir <bpringle@sympatico.ca> wrote: > >>>>> "Zach" == Zach Brown <zab@zabbo.net> writes: > [snip] > Zach> doing many other things. Hopefully the > kernel side of ALSA > Zach> will be acceptable for inclusion in 2.5. At > least it has an > Zach> army of people actively maintaining it. > > If ALSA will replace OSS, then does it make it > somewhat futile to add > things to the current set of sound drivers? I was > going to look at > the SBLive driver. I have been side tracked by an > xterm bug; it seems > to have bad handling of utmp on Linux. > > regards, > Bill Pringlemeir. > __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fw: PATCH: creating devices for multiple sound cards 2001-08-03 17:11 ` Bill Pringlemeir 2001-08-03 17:22 ` Alan Cox 2001-08-03 17:40 ` Chris Rankin @ 2001-08-03 20:25 ` Zach Brown 2 siblings, 0 replies; 6+ messages in thread From: Zach Brown @ 2001-08-03 20:25 UTC (permalink / raw) To: Bill Pringlemeir; +Cc: Chris Rankin, linux-kernel, nerijus > If ALSA will replace OSS, then does it make it somewhat futile to add > things to the current set of sound drivers? Not at all. As Alan said, its going to be quite a while before people are seriously using 2.[56]. Until then its OSS for the majority of users. - z ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-08-03 20:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-02 22:16 Fw: PATCH: creating devices for multiple sound cards Nerijus Baliunas
2001-08-02 23:42 Chris Rankin
[not found] <E15SSDc-0001o9-00@the-village.bc.nu>
[not found] ` <20010803000239.91173.qmail@web13105.mail.yahoo.com>
[not found] ` <20010802201329.A3034@erasmus.off.net>
2001-08-03 17:11 ` Bill Pringlemeir
2001-08-03 17:22 ` Alan Cox
2001-08-03 17:40 ` Chris Rankin
2001-08-03 20:25 ` Zach Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®