[alsa-devel] sysfs: cannot create duplicate filename '/devices/isa/sbawe.0/sound/card0/seq-oss-0-0'

Takashi Iwai tiwai at suse.de
Sun Oct 4 17:21:04 CEST 2015


On Sun, 04 Oct 2015 07:12:38 +0200,
Michael Shell wrote:
> 
> 
> 
>   Greetings,
> 
> I recently upgraded (an admittedly ancient K6-2 PCI/ISA machine) to kernel
> version 4.2.2 (compiled from source). It went surprising well, but I did
> run into a minor issue which did not occur under the older kernel 3.16.3.
> 
> Maybe the info here will help someone else out in the future or even reveal
> a bug that might have greater implications that have not yet been seen.
> 
> The ancient machine has one of those ISA SoundBlaster cards whose drivers
> are compiled as modules (to allow isapnp to operate) before module loading.
> 
> Upon issuing a
> 
> /sbin/modprobe snd-sbawe port=0x220 mpu_port=0x330 awe_port=0x620 irq=5 dma8=1 dma16=5 mic_agc=1 csp=0
> 
> dmesg (under 4.2.2) spits out:
> 
> EMU8000 [0x620]: 4096 KiB on-board DRAM detected
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 2791 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x51/0x80()
> sysfs: cannot create duplicate filename '/devices/isa/sbawe.0/sound/card0/seq-oss-0-0'
> Modules linked in: snd_emu8000_synth(+) snd_emux_synth snd_seq_virmidi snd_util_mem snd_opl3_synth snd_seq_midi_emul snd_sbawe snd_opl3_lib snd_sb16_dsp snd_sb16_csp snd_sb_common snd_mpu401_uart lp parport_pc parport
> CPU: 0 PID: 2791 Comm: modprobe Not tainted 4.2.2 #1
> .
> .
> ----
> (full output with trace at the end of this message)
> 
> 
> The /sys/devices/isa/sbawe.0 directory did not exist prior to the
> attempt to load snd-sbawe and there are no other sound drivers
> in the system other than those for the Soundblaster.
> 
> I do still have OSS emulation selected in the kernel config - I was
> surpised that still is the recommended default. I probably could avoid
> this bug by deselecting that. I doubt I have any software that still
> requires OSS emulation, which is probably going to be removed from
> future kernels anyway (and Debian systems don't even carry it anymore).
> 
> Nevertheless, a bug is a bug and this problem should not happen. I
> think snd_seq_oss and snd_emux_synth are both trying to register
> the same sysfs name or a single driver is trying to register the
> same thing twice.
> 
> For the record, what is the correct procedure to find out exactly
> which drivers are in conflict in duplicate sysfs filename cases
> like this?

This looks like a very long-standing bug but wasn't revealed until the
recent change of device management.  Could you check whether the
simple fix like below works?


thanks,

Takashi

diff --git a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c
index 82e350e9501c..7950a3316c7f 100644
--- a/sound/synth/emux/emux_oss.c
+++ b/sound/synth/emux/emux_oss.c
@@ -69,7 +69,7 @@ snd_emux_init_seq_oss(struct snd_emux *emu)
 	struct snd_seq_oss_reg *arg;
 	struct snd_seq_device *dev;
 
-	if (snd_seq_device_new(emu->card, 0, SNDRV_SEQ_DEV_ID_OSS,
+	if (snd_seq_device_new(emu->card, 1, SNDRV_SEQ_DEV_ID_OSS,
 			       sizeof(struct snd_seq_oss_reg), &dev) < 0)
 		return;
 


More information about the Alsa-devel mailing list