diff options
Diffstat (limited to 'sys/dev/sound/pci/vibes.c')
-rw-r--r-- | sys/dev/sound/pci/vibes.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index e587f0113b5d..7e908f188614 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -866,18 +866,17 @@ sv_attach(device_t dev) { if (bootverbose) printf("Sonicvibes: revision %d.\n", sc->rev); - if (pcm_register(dev, sc, 1, 1)) { - device_printf(dev, "sv_attach: pcm_register fail\n"); - goto fail; - } - + pcm_init(dev, sc); pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc); pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc); snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(sc->enh_reg), rman_get_start(sc->irq), device_get_nameunit(device_get_parent(dev))); - pcm_setstatus(dev, status); + if (pcm_register(dev, status)) { + device_printf(dev, "sv_attach: pcm_register fail\n"); + goto fail; + } DEB(printf("sv_attach: succeeded\n")); |