Skip to contentSkip to conversation

ALSA-OSS-emulation unable to register

2.6.0-test9 ALSA Michael Buesch 2 participants 9 messages Nov 2, 2003 – Nov 5, 2003

lore
Share & tools
lore

Michael Buesch

author Applied
#0 lore raw

-----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-----

#1 lore raw

At Sun, 2 Nov 2003 15:01:53 +0100,

Quoted 9 lines · Michael Buesch

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

Hi,

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

Quoted 13 lines

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.

Quoted 6 lines

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)

Quoted 2 lines

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 <[email protected]> ALSA Developer - www.alsa-project.org

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

#2 lore raw

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

Quoted 5 lines · you
Quoted 1 line

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. :)

Quoted 1 line

it's already fixed on the ALSA cvs version.

ok.

Quoted 4 lines

ciao,

--
Takashi Iwai <[email protected]> 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-----

#3 lore raw

At Mon, 3 Nov 2003 21:06:06 +0100,

Quoted 4 lines · Michael Buesch

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

Quoted 8 lines
Quoted 5 lines · you
Quoted 1 line

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

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

#4 lore raw

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

Quoted 1 line · you

what parameter did you pass exactly?

snd-ens1371=1
.. and so on.

Or did I misunderstand you?

Quoted 1 line

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-----

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

#5 lore raw

At Tue, 4 Nov 2003 16:30:11 +0100,

Quoted 9 lines · Michael Buesch

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

Quoted 1 line · you

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

#6 lore raw

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

Quoted 2 lines · Takashi Iwai

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. :)

Quoted 1 line

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-----

#7 lore raw

At Tue, 4 Nov 2003 21:35:05 +0100,

Quoted 9 lines · Michael Buesch

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

Quoted 2 lines · Takashi Iwai

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

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

#8 lore raw

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

Quoted 3 lines · you
Quoted 1 line

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.

Quoted 1 line

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-----

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/