linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
@ 2003-11-02 14:01 Michael Buesch
  2003-11-03 19:14 ` [Alsa-devel] " Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2003-11-02 14:01 UTC (permalink / raw)
  To: alsa-devel; +Cc: linux kernel mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

ALSA work's fine for me, but the OSS emulation layer doesn't work.
My configuration is:

CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_ENS1371=y
# OSS options
CONFIG_SOUND_PRIME=y
CONFIG_SOUND_BT878=y
CONFIG_SOUND_TVMIXER=y
All other sound options are disabled.
It's a SoundBlaster 128 PCI card.

I've applied the attached patch to display more meaningful
error-messages.

Kernel-log messages are:
Nov  2 15:59:27 lfs kernel: Advanced Linux Sound Architecture Driver Version 0.9.7 (Thu Sep 25 19:16:36 2003 UTC).
Nov  2 15:59:27 lfs kernel: request_module: failed /sbin/modprobe -- snd-card-0. error = -16
* Nov  2 15:59:27 lfs kernel: register1 failed: 35
Nov  2 15:59:27 lfs kernel: ALSA sound/core/oss/pcm_oss.c:2353: unable to register OSS PCM device 0:0
* Nov  2 15:59:27 lfs kernel: ALSA sound/core/oss/pcm_oss.c:2354: error code: -16 == -EBUSY
* Nov  2 15:59:27 lfs kernel: register1 failed: 32
Nov  2 15:59:27 lfs kernel: ALSA sound/core/oss/mixer_oss.c:1210: unable to register OSS mixer device 0:0
Nov  2 15:59:27 lfs kernel: ALSA device list:
Nov  2 15:59:27 lfs kernel:   #0: Ensoniq AudioPCI ENS1371 at 0xb800, irq 19

Lines marked with a * at the beginning are from my patch.

The failed request_module() seems to be triggered by
if (!system_running)
		return -EBUSY;
in call_usermodehelper() which is called by request_module().

Why are we trying to load a module, althought ALSA is completely
compiled into the kernel? We shouldn't do it, should we?

OSS-emulation failes, because something is -EBUSY.
==> ALSA sound/core/oss/pcm_oss.c:2354: error code: -16 == -EBUSY
I've not found out, why it fails. Maybe someone has an idea?

Here's my patch:

diff -urN -X /home/mb/dontdiff linux-2.6.0-test9/sound/core.orig/oss/pcm_oss.c linux-2.6.0-test9/sound/core/oss/pcm_oss.c
- --- linux-2.6.0-test9/sound/core.orig/oss/pcm_oss.c	2003-11-02 14:32:35.000000000 +0100
+++ linux-2.6.0-test9/sound/core/oss/pcm_oss.c	2003-11-02 13:20:49.000000000 +0100
@@ -2343,12 +2343,21 @@

 static void register_oss_dsp(snd_pcm_t *pcm, int index)
 {
+	int ret;
 	char name[128];
 	sprintf(name, "dsp%i%i", pcm->card->number, pcm->device);
- -	if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
+	ret = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
 				    pcm->card, index, &snd_pcm_oss_reg,
- -				    name) < 0) {
+				    name);
+	if (ret < 0) {
 		snd_printk("unable to register OSS PCM device %i:%i\n", pcm->card->number, pcm->device);
+		snd_printk("error code: %i ", ret);
+		if (ret == -ENOMEM)
+			printk("== -ENOMEM\n");
+		else if (ret == -EBUSY)
+			printk("== -EBUSY\n");
+		else
+			printk("== unknown\n");
 	}
 }

diff -urN -X /home/mb/dontdiff linux-2.6.0-test9/sound/core.orig/sound_oss.c linux-2.6.0-test9/sound/core/sound_oss.c
- --- linux-2.6.0-test9/sound/core.orig/sound_oss.c	2003-11-02 14:31:57.000000000 +0100
+++ linux-2.6.0-test9/sound/core/sound_oss.c	2003-11-02 13:57:17.000000000 +0100
@@ -122,12 +122,16 @@
 		break;
 	}
 	register1 = register_sound_special(reg->f_ops, minor);
- -	if (register1 != minor)
+	if (register1 != minor) {
+		printk("register1 failed: %i\n", register1);
 		goto __end;
+	}
 	if (track2 >= 0) {
 		register2 = register_sound_special(reg->f_ops, track2);
- -		if (register2 != track2)
+		if (register2 != track2) {
+			printk("register2 failed: %i\n", register2);
 			goto __end;
+		}
 	}
 	up(&sound_oss_mutex);
 	return 0;

- --
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/pQ5RoxoigfggmSgRAotoAJwPqKatKtf2X+CeLKQOhyDlpXrPiACdFM7Q
a7bOrRMTgjmhHd70fi1C8l0=
=8kOI
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-02 14:01 [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register Michael Buesch
@ 2003-11-03 19:14 ` Takashi Iwai
  2003-11-03 20:06   ` Michael Buesch
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2003-11-03 19:14 UTC (permalink / raw)
  To: Michael Buesch; +Cc: alsa-devel, linux kernel mailing list

At Sun, 2 Nov 2003 15:01:53 +0100,
Michael Buesch wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> ALSA work's fine for me, but the OSS emulation layer doesn't work.
> My configuration is:
> 
> CONFIG_SOUND=y
> CONFIG_SND=y
> CONFIG_SND_SEQUENCER=y
> CONFIG_SND_OSSEMUL=y
> CONFIG_SND_MIXER_OSS=y
> CONFIG_SND_PCM_OSS=y
> CONFIG_SND_SEQUENCER_OSS=y
> CONFIG_SND_RTCTIMER=y
> CONFIG_SND_VERBOSE_PRINTK=y
> CONFIG_SND_ENS1371=y
> # OSS options
> CONFIG_SOUND_PRIME=y
> CONFIG_SOUND_BT878=y
  ^^^^^^^^^^^^^^^^^^^^
this conflicts with ALSA.  try to pass the index parameter via boot
option of snd-ens1371.


> CONFIG_SOUND_TVMIXER=y
> All other sound options are disabled.
> It's a SoundBlaster 128 PCI card.
> 
> I've applied the attached patch to display more meaningful
> error-messages.
(snip)
> Why are we trying to load a module, althought ALSA is completely
> compiled into the kernel? We shouldn't do it, should we?

it's already fixed on the ALSA cvs version.


ciao,

--
Takashi Iwai <tiwai@suse.de>		ALSA Developer - www.alsa-project.org


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-03 19:14 ` [Alsa-devel] " Takashi Iwai
@ 2003-11-03 20:06   ` Michael Buesch
  2003-11-04 15:01     ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2003-11-03 20:06 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, linux kernel mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 03 November 2003 20:14, you wrote:
> > CONFIG_SOUND_BT878=y
>
>   ^^^^^^^^^^^^^^^^^^^^
> this conflicts with ALSA.  try to pass the index parameter via boot
> option of snd-ens1371.

Thanks for your suggestion, but it doesn't work.
Still displays
ALSA sound/core/oss/pcm_oss.c:2353: unable to register OSS PCM device 0:0
Is there some other way to make bttv-audio and
ALSA-ens1371 working both? Would be cool if I
could use both at the same time. :)

> it's already fixed on the ALSA cvs version.

ok.

> ciao,
>
> --
> Takashi Iwai <tiwai@suse.de>		ALSA Developer - www.alsa-project.org

- -- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/prVDoxoigfggmSgRAm/zAJ9nwkcRvzM2/w2EgYpbSZL0sZxoegCfYDBu
Oq5ZWs+LPXRF0iw3MfyKySI=
=Fg8x
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-03 20:06   ` Michael Buesch
@ 2003-11-04 15:01     ` Takashi Iwai
  2003-11-04 15:30       ` Michael Buesch
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2003-11-04 15:01 UTC (permalink / raw)
  To: Michael Buesch; +Cc: alsa-devel, linux kernel mailing list

At Mon, 3 Nov 2003 21:06:06 +0100,
Michael Buesch wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Monday 03 November 2003 20:14, you wrote:
> > > CONFIG_SOUND_BT878=y
> >
> >   ^^^^^^^^^^^^^^^^^^^^
> > this conflicts with ALSA.  try to pass the index parameter via boot
> > option of snd-ens1371.
> 
> Thanks for your suggestion, but it doesn't work.

what parameter did you pass exactly?


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-04 15:01     ` Takashi Iwai
@ 2003-11-04 15:30       ` Michael Buesch
  2003-11-04 15:36         ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2003-11-04 15:30 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, linux kernel mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 04 November 2003 16:01, you wrote:
> what parameter did you pass exactly?

snd-ens1371=1
.. and so on.

Or did I misunderstand you?

> Takashi

- -- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/p8YNoxoigfggmSgRArjDAJ4uUViosyBidVre60ilJw/cNkN1ZwCgh0Qj
vkLSESn69GrReHkga3LLexs=
=rxWh
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-04 15:30       ` Michael Buesch
@ 2003-11-04 15:36         ` Takashi Iwai
  2003-11-04 20:35           ` Michael Buesch
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2003-11-04 15:36 UTC (permalink / raw)
  To: Michael Buesch; +Cc: alsa-devel, linux kernel mailing list

At Tue, 4 Nov 2003 16:30:11 +0100,
Michael Buesch wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tuesday 04 November 2003 16:01, you wrote:
> > what parameter did you pass exactly?
> 
> snd-ens1371=1
> .. and so on.

the first argument is "enable".  "index" is the second argument.
so, you'll need to pass "snd-ens1371=1,1"


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-04 15:36         ` Takashi Iwai
@ 2003-11-04 20:35           ` Michael Buesch
  2003-11-05 10:50             ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2003-11-04 20:35 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, linux kernel mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 04 November 2003 16:36, Takashi Iwai wrote:
> the first argument is "enable".  "index" is the second argument.
> so, you'll need to pass "snd-ens1371=1,1"

Now neither ALSA, nor OSS-emu works. :)

> Takashi

- -- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/qA3BoxoigfggmSgRAkBxAJ9fJnOGw+qCv30AUA7TrXQuBTM3JwCePPAT
HP5FlPbzkbDMCED/ra4BSYU=
=6RlG
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-04 20:35           ` Michael Buesch
@ 2003-11-05 10:50             ` Takashi Iwai
  2003-11-05 12:32               ` Michael Buesch
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2003-11-05 10:50 UTC (permalink / raw)
  To: Michael Buesch; +Cc: alsa-devel, linux kernel mailing list

At Tue, 4 Nov 2003 21:35:05 +0100,
Michael Buesch wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tuesday 04 November 2003 16:36, Takashi Iwai wrote:
> > the first argument is "enable".  "index" is the second argument.
> > so, you'll need to pass "snd-ens1371=1,1"
> 
> Now neither ALSA, nor OSS-emu works. :)

hmm, you have also TVMIXER.  so the ens1371 will be the third one?


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Alsa-devel] [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register
  2003-11-05 10:50             ` Takashi Iwai
@ 2003-11-05 12:32               ` Michael Buesch
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Buesch @ 2003-11-05 12:32 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, linux kernel mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 05 November 2003 11:50, you wrote:
> > Now neither ALSA, nor OSS-emu works. :)
>
> hmm, you have also TVMIXER.  so the ens1371 will be the third one?

I tried various numbers from 0 to (don't remember). but I did
also try 3.

> Takashi

- -- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/qO3KoxoigfggmSgRAmZlAJ9Pc0v+A26TMEaBDK3JRBQyg2IZSQCfXQFK
nWARdLcbg6bSfBHBk3ytZJI=
=P+AC
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-11-05 12:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-02 14:01 [2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register Michael Buesch
2003-11-03 19:14 ` [Alsa-devel] " Takashi Iwai
2003-11-03 20:06   ` Michael Buesch
2003-11-04 15:01     ` Takashi Iwai
2003-11-04 15:30       ` Michael Buesch
2003-11-04 15:36         ` Takashi Iwai
2003-11-04 20:35           ` Michael Buesch
2003-11-05 10:50             ` Takashi Iwai
2003-11-05 12:32               ` Michael Buesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).