Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pci/vibes.c
Context not available. | |||||
static int | static int | ||||
sv_attach(device_t dev) { | sv_attach(device_t dev) { | ||||
struct sc_info *sc; | struct sc_info *sc; | ||||
rman_res_t count, midi_start, games_start; | |||||
u_int32_t data; | u_int32_t data; | ||||
char status[SND_STATUSLEN]; | char status[SND_STATUSLEN]; | ||||
u_long midi_start, games_start, count, sdmaa, sdmac, ml, mu; | u_long sdmaa, sdmac, ml, mu; | ||||
sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); | sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); | ||||
sc->dev = dev; | sc->dev = dev; | ||||
Context not available. | |||||
((mu - ml) % 0x200)) { | ((mu - ml) % 0x200)) { | ||||
device_printf(dev, "sv_attach: resource assumptions not met " | device_printf(dev, "sv_attach: resource assumptions not met " | ||||
"(midi 0x%08lx, games 0x%08lx)\n", | "(midi 0x%08lx, games 0x%08lx)\n", | ||||
midi_start, games_start); | (u_long)midi_start, (u_long)games_start); | ||||
goto fail; | goto fail; | ||||
} | } | ||||
Context not available. | |||||
pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc); | pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc); | ||||
pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc); | pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc); | ||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s", | snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", | ||||
rman_get_start(sc->enh_reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_vibes)); | rman_get_start(sc->enh_reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_vibes)); | ||||
pcm_setstatus(dev, status); | pcm_setstatus(dev, status); | ||||
Context not available. |