mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Augment /dev/sndstat with the module names, if applicable.
Approved by: tanimura (mentor)
This commit is contained in:
parent
3a6849a6e8
commit
0d8ed52ea5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126695
@ -621,12 +621,13 @@ ad1816_attach(device_t dev)
|
||||
else
|
||||
status2[0] = '\0';
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u",
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
|
||||
rman_get_start(ad1816->io_base),
|
||||
rman_get_start(ad1816->irq),
|
||||
rman_get_start(ad1816->drq1),
|
||||
status2,
|
||||
ad1816->bufsize);
|
||||
ad1816->bufsize,
|
||||
PCM_KLDSTRING(snd_ad1816));
|
||||
|
||||
if (pcm_register(dev, ad1816, 1, 1)) goto no;
|
||||
pcm_addchan(dev, PCMDIR_REC, &ad1816chan_class, ad1816);
|
||||
|
@ -866,9 +866,10 @@ ess_attach(device_t dev)
|
||||
else
|
||||
buf[0] = '\0';
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u",
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
|
||||
rman_get_start(sc->io_base), rman_get_start(sc->irq),
|
||||
rman_get_start(sc->drq1), buf, sc->bufsize);
|
||||
rman_get_start(sc->drq1), buf, sc->bufsize,
|
||||
PCM_KLDSTRING(snd_ess));
|
||||
|
||||
if (pcm_register(dev, sc, 1, 1))
|
||||
goto no;
|
||||
|
@ -824,9 +824,10 @@ sb16_attach(device_t dev)
|
||||
else
|
||||
status2[0] = '\0';
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %ud",
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %ud %s",
|
||||
rman_get_start(sb->io_base), rman_get_start(sb->irq),
|
||||
rman_get_start(sb->drq1), status2, sb->bufsize);
|
||||
rman_get_start(sb->drq1), status2, sb->bufsize,
|
||||
PCM_KLDSTRING(snd_sb16));
|
||||
|
||||
if (pcm_register(dev, sb, 1, 1))
|
||||
goto no;
|
||||
|
@ -730,8 +730,9 @@ sb_attach(device_t dev)
|
||||
goto no;
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld bufsz %u",
|
||||
rman_get_start(sb->io_base), rman_get_start(sb->irq), rman_get_start(sb->drq), sb->bufsize);
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld bufsz %u %s",
|
||||
rman_get_start(sb->io_base), rman_get_start(sb->irq),
|
||||
rman_get_start(sb->drq), sb->bufsize, PCM_KLDSTRING(snd_sb8));
|
||||
|
||||
if (pcm_register(dev, sb, 1, 1))
|
||||
goto no;
|
||||
|
@ -818,8 +818,8 @@ als_pci_attach(device_t dev)
|
||||
pcm_addchan(dev, PCMDIR_PLAY, &alspchan_class, sc);
|
||||
pcm_addchan(dev, PCMDIR_REC, &alsrchan_class, sc);
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_als4000));
|
||||
pcm_setstatus(dev, status);
|
||||
return 0;
|
||||
|
||||
|
@ -529,9 +529,9 @@ au88x0_set_status(device_t dev)
|
||||
struct au88x0_info *aui;
|
||||
|
||||
aui = pcm_getdevinfo(dev);
|
||||
snprintf(status, sizeof status, "at %s 0x%lx irq %ld",
|
||||
snprintf(status, sizeof status, "at %s 0x%lx irq %ld %s",
|
||||
(aui->aui_regtype == SYS_RES_IOPORT)? "io" : "memory",
|
||||
rman_get_start(aui->aui_reg), rman_get_start(aui->aui_irq));
|
||||
rman_get_start(aui->aui_reg), rman_get_start(aui->aui_irq),PCM_KLDSTRING(snd_au88x0));
|
||||
pcm_setstatus(dev, status);
|
||||
}
|
||||
|
||||
|
@ -647,9 +647,9 @@ au_pci_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld",
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
|
||||
(type[0] == SYS_RES_IOPORT)? "io" : "memory",
|
||||
rman_get_start(reg[0]), rman_get_start(irq));
|
||||
rman_get_start(reg[0]), rman_get_start(irq),PCM_KLDSTRING(snd_aureal));
|
||||
|
||||
if (pcm_register(dev, au, 1, 1)) goto bad;
|
||||
/* pcm_addchan(dev, PCMDIR_REC, &au_chantemplate, au); */
|
||||
|
@ -898,8 +898,8 @@ cmi_attach(device_t dev)
|
||||
pcm_addchan(dev, PCMDIR_PLAY, &cmichan_class, sc);
|
||||
pcm_addchan(dev, PCMDIR_REC, &cmichan_class, sc);
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cmi));
|
||||
pcm_setstatus(dev, status);
|
||||
|
||||
DEB(printf("cmi_attach: succeeded\n"));
|
||||
|
@ -858,9 +858,9 @@ cs4281_pci_attach(device_t dev)
|
||||
pcm_addchan(dev, PCMDIR_PLAY, &cs4281chan_class, sc);
|
||||
pcm_addchan(dev, PCMDIR_REC, &cs4281chan_class, sc);
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld",
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
|
||||
(sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq));
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cs4281));
|
||||
pcm_setstatus(dev, status);
|
||||
|
||||
return 0;
|
||||
|
@ -788,7 +788,8 @@ pcmcsa_attach(device_t dev)
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at irq %ld", rman_get_start(resp->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at irq %ld %s",
|
||||
rman_get_start(resp->irq),PCM_KLDSTRING(snd_csa));
|
||||
|
||||
/* Enable interrupt. */
|
||||
if (snd_setup_intr(dev, resp->irq, INTR_MPSAFE, csa_intr, csa, &csa->ih)) {
|
||||
|
@ -996,8 +996,8 @@ ds_pci_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld %s",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_ds1));
|
||||
|
||||
if (pcm_register(dev, sc, DS1_CHANS, 2))
|
||||
goto bad;
|
||||
|
@ -1950,8 +1950,9 @@ emu_pci_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq),
|
||||
PCM_KLDSTRING(snd_emu10k1));
|
||||
|
||||
if (pcm_register(dev, sc, sc->nchans, gotmic ? 3 : 2)) goto bad;
|
||||
for (i = 0; i < sc->nchans; i++)
|
||||
|
@ -924,9 +924,9 @@ es_pci_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld",
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
|
||||
(es->regtype == SYS_RES_IOPORT)? "io" : "memory",
|
||||
rman_get_start(es->reg), rman_get_start(es->irq));
|
||||
rman_get_start(es->reg), rman_get_start(es->irq),PCM_KLDSTRING(snd_es137x));
|
||||
|
||||
if (pcm_register(dev, es, 1, 1)) goto bad;
|
||||
pcm_addchan(dev, PCMDIR_REC, ct, es);
|
||||
|
@ -638,9 +638,9 @@ fm801_pci_attach(device_t dev)
|
||||
goto oops;
|
||||
}
|
||||
|
||||
snprintf(status, 64, "at %s 0x%lx irq %ld",
|
||||
snprintf(status, 64, "at %s 0x%lx irq %ld %s",
|
||||
(fm801->regtype == SYS_RES_IOPORT)? "io" : "memory",
|
||||
rman_get_start(fm801->reg), rman_get_start(fm801->irq));
|
||||
rman_get_start(fm801->reg), rman_get_start(fm801->irq),PCM_KLDSTRING(snd_fm801));
|
||||
|
||||
#define FM801_MAXPLAYCH 1
|
||||
if (pcm_register(dev, fm801, FM801_MAXPLAYCH, 1)) goto oops;
|
||||
|
@ -761,8 +761,8 @@ ich_pci_attach(device_t dev)
|
||||
if (sc->hasmic)
|
||||
pcm_addchan(dev, PCMDIR_REC, &ichchan_class, sc); /* record mic */
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx, 0x%lx irq %ld bufsz %u",
|
||||
rman_get_start(sc->nambar), rman_get_start(sc->nabmbar), rman_get_start(sc->irq), sc->bufsz);
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx, 0x%lx irq %ld bufsz %u %s",
|
||||
rman_get_start(sc->nambar), rman_get_start(sc->nabmbar), rman_get_start(sc->irq), sc->bufsz,PCM_KLDSTRING(snd_ich));
|
||||
|
||||
pcm_setstatus(dev, status);
|
||||
|
||||
|
@ -1033,8 +1033,8 @@ agg_attach(device_t dev)
|
||||
ess->irqid = irqid;
|
||||
ess->ih = ih;
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at I/O port 0x%lx irq %ld",
|
||||
rman_get_start(reg), rman_get_start(irq));
|
||||
snprintf(status, SND_STATUSLEN, "at I/O port 0x%lx irq %ld %s",
|
||||
rman_get_start(reg), rman_get_start(irq),PCM_KLDSTRING(snd_maestro));
|
||||
|
||||
if (pcm_register(dev, ess, AGG_MAXPLAYCH, 1))
|
||||
goto bad;
|
||||
|
@ -1189,9 +1189,9 @@ m3_pci_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld",
|
||||
snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
|
||||
(sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq));
|
||||
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_maestro3));
|
||||
if (pcm_setstatus(dev, status)) {
|
||||
device_printf(dev, "attach: pcm_setstatus error\n");
|
||||
goto bad;
|
||||
|
@ -704,9 +704,9 @@ nm_pci_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at memory 0x%lx, 0x%lx irq %ld",
|
||||
snprintf(status, SND_STATUSLEN, "at memory 0x%lx, 0x%lx irq %ld %s",
|
||||
rman_get_start(sc->buf), rman_get_start(sc->reg),
|
||||
rman_get_start(sc->irq));
|
||||
rman_get_start(sc->irq),PCM_KLDSTRING(snd_neomagic));
|
||||
|
||||
if (pcm_register(dev, sc, 1, 1)) goto bad;
|
||||
pcm_addchan(dev, PCMDIR_REC, &nmchan_class, sc);
|
||||
|
@ -997,9 +997,9 @@ ess_attach(device_t dev)
|
||||
goto no;
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx,0x%lx,0x%lx irq %ld",
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx,0x%lx,0x%lx irq %ld %s",
|
||||
rman_get_start(sc->io), rman_get_start(sc->sb), rman_get_start(sc->vc),
|
||||
rman_get_start(sc->irq));
|
||||
rman_get_start(sc->irq),PCM_KLDSTRING(snd_solo));
|
||||
|
||||
if (pcm_register(dev, sc, 1, 1))
|
||||
goto no;
|
||||
|
@ -860,8 +860,8 @@ tr_pci_attach(device_t dev)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
snprintf(status, 64, "at io 0x%lx irq %ld",
|
||||
rman_get_start(tr->reg), rman_get_start(tr->irq));
|
||||
snprintf(status, 64, "at io 0x%lx irq %ld %s",
|
||||
rman_get_start(tr->reg), rman_get_start(tr->irq),PCM_KLDSTRING(snd_t4dwave));
|
||||
|
||||
if (pcm_register(dev, tr, TR_MAXPLAYCH, 1)) goto bad;
|
||||
pcm_addchan(dev, PCMDIR_REC, &trrchan_class, tr);
|
||||
|
@ -843,8 +843,8 @@ via_attach(device_t dev)
|
||||
ac97_setextmode(via->codec, ext);
|
||||
}
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld",
|
||||
rman_get_start(via->reg), rman_get_start(via->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
|
||||
rman_get_start(via->reg), rman_get_start(via->irq),PCM_KLDSTRING(snd_via8233));
|
||||
|
||||
/* Register */
|
||||
if (pci_get_revid(dev) == VIA8233_REV_ID_8233A) {
|
||||
|
@ -572,7 +572,9 @@ via_attach(device_t dev)
|
||||
if (bus_dmamap_load(via->sgd_dmat, via->sgd_dmamap, via->sgd_table, NSEGS * sizeof(struct via_dma_op), dma_cb, via, 0))
|
||||
goto bad;
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld", rman_get_start(via->reg), rman_get_start(via->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
|
||||
rman_get_start(via->reg), rman_get_start(via->irq),
|
||||
PCM_KLDSTRING(snd_via82c686));
|
||||
|
||||
/* Register */
|
||||
if (pcm_register(dev, via, 1, 1)) goto bad;
|
||||
|
@ -878,8 +878,8 @@ sv_attach(device_t dev) {
|
||||
pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc);
|
||||
pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc);
|
||||
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld",
|
||||
rman_get_start(sc->enh_reg), rman_get_start(sc->irq));
|
||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
|
||||
rman_get_start(sc->enh_reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_vibes));
|
||||
pcm_setstatus(dev, status);
|
||||
|
||||
DEB(printf("sv_attach: succeeded\n"));
|
||||
|
@ -314,6 +314,12 @@ void pcm_lock(struct snddev_info *d);
|
||||
void pcm_unlock(struct snddev_info *d);
|
||||
#endif
|
||||
|
||||
#ifdef KLD_MODULE
|
||||
#define PCM_KLDSTRING(a) ("kld " # a)
|
||||
#else
|
||||
#define PCM_KLDSTRING(a) ""
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _OS_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user