Lines Matching defs:dev

34 #include <dev/sound/pcm/sound.h>
35 #include <dev/sound/pcm/ac97.h>
36 #include <dev/sound/pcm/vchan.h>
37 #include <dev/sound/pcm/dsp.h>
38 #include <dev/sound/pcm/sndstat.h>
39 #include <dev/sound/version.h>
45 SND_DECLARE_FILE("$FreeBSD: stable/11/sys/dev/sound/pcm/sound.c 358878 2020-03-11 08:25:33Z hselasky $");
114 snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand, void *param, void **cookiep)
120 d = device_get_softc(dev);
124 return bus_setup_intr(dev, res, flags, NULL, hand, param, cookiep);
221 device_printf(d->dev,
535 device_printf(d->dev,
541 device_printf(d->dev,
550 device_printf(d->dev,
556 udc = snd_mkunit(device_get_unit(d->dev), device, chan);
560 device_printf(d->dev,
573 ch->dev = d->dev;
576 device_get_nameunit(ch->dev), dirs, devname);
581 device_printf(d->dev, "chn_init(%s) failed: err = %d\n",
602 device_printf(ch->dev, "chn_kill(%s) failed, err = %d\n",
688 pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo)
690 struct snddev_info *d = device_get_softc(dev);
699 device_printf(d->dev, "pcm_chn_create(%s, %d, %p) failed\n",
708 device_printf(d->dev, "pcm_chn_add(%s) failed, err=%d\n",
717 pcm_killchan(device_t dev)
719 struct snddev_info *d = device_get_softc(dev);
762 pcm_setstatus(device_t dev, char *str)
764 struct snddev_info *d = device_get_softc(dev);
799 pcm_sysinit(dev);
804 snd_unit = device_get_unit(dev);
812 pcm_getflags(device_t dev)
814 struct snddev_info *d = device_get_softc(dev);
820 pcm_setflags(device_t dev, uint32_t val)
822 struct snddev_info *d = device_get_softc(dev);
828 pcm_getdevinfo(device_t dev)
830 struct snddev_info *d = device_get_softc(dev);
836 pcm_getbuffersize(device_t dev, unsigned int minbufsz, unsigned int deflt, unsigned int maxbufsz)
838 struct snddev_info *d = device_get_softc(dev);
842 if (resource_int_value(device_get_name(dev), device_get_unit(dev), "buffersize", &sz) == 0) {
846 device_printf(dev, "'buffersize=%d' hint is out of range (%d-%d), using %d\n", x, minbufsz, maxbufsz, sz);
853 device_printf(dev, "'buffersize=%d' hint is not a power of 2, using %d\n", sz, x);
976 device_printf(d->dev, "clone gc: pruned=%d\n", val);
1001 device_printf(d->dev, "clone gc: pruned=%d\n",
1014 pcm_sysinit(device_t dev)
1016 struct snddev_info *d = device_get_softc(dev);
1020 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
1021 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
1023 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
1024 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
1029 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
1030 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
1034 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
1035 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
1039 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
1040 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
1046 vchan_initsys(dev);
1048 feeder_eq_initsys(dev);
1052 pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
1058 device_printf(dev, "disabled due to an error while initialising: %d\n", pcm_veto_load);
1063 if (device_get_unit(dev) > PCMMAXUNIT) {
1064 device_printf(dev, "PCMMAXUNIT reached : unit=%d > %d\n",
1065 device_get_unit(dev), PCMMAXUNIT);
1066 device_printf(dev,
1071 d = device_get_softc(dev);
1072 d->dev = dev;
1073 d->lock = snd_mtxcreate(device_get_nameunit(dev), "sound cdev");
1074 cv_init(&d->cv, device_get_nameunit(dev));
1086 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
1090 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
1126 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "play",
1130 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rec",
1136 sndstat_register(dev, d->status, sndstat_prepare_pcm);
1142 pcm_unregister(device_t dev)
1149 d = device_get_softc(dev);
1152 device_printf(dev, "unregister: device not configured\n");
1162 device_printf(dev, "unregister: operation in progress\n");
1173 device_printf(dev,
1185 device_printf(dev, "unregister: clone busy\n");
1195 if (mixer_uninit(dev) == EBUSY) {
1196 device_printf(dev, "unregister: mixer busy\n");
1205 /* remove /dev/sndstat entry first */
1206 sndstat_unregister(dev);
1232 pcm_killchan(dev);
1242 if (snd_unit == device_get_unit(dev)) {
1382 strlcpy(si->shortname, device_get_nameunit(d->dev),
1384 strlcpy(si->longname, device_get_desc(d->dev),