Skip to content

Commit 225db57

Browse files
committed
ALSA: synth: Fix conflicting OSS device registration on AWE32
When OSS emulation is loaded on ISA SB AWE32 chip, we get now kernel warnings like: 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' It's because both emux synth and opl3 drivers try to register their OSS device object with the same static index number 0. This hasn't been a big problem until the recent rewrite of device management code (that exposes sysfs at the same time), but it's been an obvious bug. This patch works around it just by using a different index number of emux synth object. There can be a more elegant way to fix, but it's enough for now, as this code won't be touched so often, in anyway. Reported-and-tested-by: Michael Shell <list1@michaelshell.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent c7e1008 commit 225db57

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎sound/synth/emux/emux_oss.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ snd_emux_init_seq_oss(struct snd_emux *emu)
6969
struct snd_seq_oss_reg *arg;
7070
struct snd_seq_device *dev;
7171

72-
if (snd_seq_device_new(emu->card, 0, SNDRV_SEQ_DEV_ID_OSS,
72+
/* using device#1 here for avoiding conflicts with OPL3 */
73+
if (snd_seq_device_new(emu->card, 1, SNDRV_SEQ_DEV_ID_OSS,
7374
sizeof(struct snd_seq_oss_reg), &dev) < 0)
7475
return;
7576

0 commit comments

Comments
 (0)