X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fdrivers%2Fopl4%2Fopl4_lib.c;h=8261464dade8e26aca4da46301bfb4422b4b66a5;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=5ede4281c1934b1bbd66a9f642c2c4fdaa40762b;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index 5ede4281c..8261464da 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c @@ -229,22 +229,21 @@ int snd_opl4_create(snd_card_t *card, return err; } - err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3); + err = snd_device_new(card, SNDRV_DEV_CODEC, opl4, &ops); if (err < 0) { snd_opl4_free(opl4); return err; } - /* opl3 initialization disabled opl4, so reenable */ - snd_opl4_enable_opl4(opl4); - - err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, opl4, &ops); + err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3); if (err < 0) { - snd_device_free(card, opl3); - snd_opl4_free(opl4); + snd_device_free(card, opl4); return err; } + /* opl3 initialization disabled opl4, so reenable */ + snd_opl4_enable_opl4(opl4); + snd_opl4_create_mixer(opl4); #ifdef CONFIG_PROC_FS snd_opl4_create_proc(opl4);