Lines Matching defs:i_dev
435 prio = dsp_get_flags(i_dev); \
446 else if (DSP_REGISTERED(d, i_dev)) \
451 dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
459 if (i_dev == NULL || td == NULL)
462 d = dsp_get_info(i_dev);
476 error = snd_clone_acquire(i_dev);
488 (void)snd_clone_release(i_dev);
502 devtype = PCMDEV(i_dev);
526 (void)snd_clone_release(i_dev);
531 wdevunit = dev2unit(i_dev);
540 (void)snd_clone_release(i_dev);
545 rdevunit = dev2unit(i_dev);
582 (void)snd_clone_release(i_dev);
629 (void)snd_clone_release(i_dev);
660 dsp_cdevinfo_alloc(i_dev, NULL, NULL, rdch);
664 dsp_cdevinfo_alloc(i_dev, NULL, NULL, wrch);
669 (void)snd_clone_release(i_dev);
679 dsp_cdevinfo_alloc(i_dev, rdch, wrch, NULL);
690 (void)snd_clone_ref(i_dev);
701 dsp_close(struct cdev *i_dev, int flags, int mode, struct thread *td)
707 d = dsp_get_info(i_dev);
708 if (!DSP_REGISTERED(d, i_dev))
717 rdch = PCM_RDCH(i_dev);
718 wrch = PCM_WRCH(i_dev);
719 volch = PCM_VOLCH(i_dev);
721 PCM_RDCH(i_dev) = NULL;
722 PCM_WRCH(i_dev) = NULL;
723 PCM_VOLCH(i_dev) = NULL;
794 dsp_cdevinfo_free(i_dev);
800 (void)snd_clone_release(i_dev);
807 (void)snd_clone_unref(i_dev);
819 dsp_io_ops(struct cdev *i_dev, struct uio *buf)
827 KASSERT(i_dev != NULL && buf != NULL &&
831 d = dsp_get_info(i_dev);
832 if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev))
857 getchns(i_dev, &rdch, &wrch, prio);
861 relchns(i_dev, rdch, wrch, prio);
868 relchns(i_dev, rdch, wrch, prio);
887 relchns(i_dev, rdch, wrch, prio);
895 dsp_read(struct cdev *i_dev, struct uio *buf, int flag)
897 return (dsp_io_ops(i_dev, buf));
901 dsp_write(struct cdev *i_dev, struct uio *buf, int flag)
903 return (dsp_io_ops(i_dev, buf));
1070 dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
1078 d = dsp_get_info(i_dev);
1079 if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev))
1095 ret = dsp_ioctl_channel(i_dev, PCM_VOLCH(i_dev), cmd, arg);
1130 ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg);
1133 ret = mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg);
1143 getchns(i_dev, &rdch, &wrch, 0);
1287 p->formats |= (dsp_get_flags(i_dev) & SD_F_SIMPLEX)? 0 : AFMT_FULLDUPLEX;
1705 if (rdch && wrch && !(dsp_get_flags(i_dev) & SD_F_SIMPLEX))
1805 if (rdch && wrch && (dsp_get_flags(i_dev) & SD_F_SIMPLEX))
1806 dsp_set_flags(i_dev, dsp_get_flags(i_dev)^SD_F_SIMPLEX);
1839 ret = dsp_ioctl_channel(i_dev, chn, xcmd, arg);
2069 if (!(dsp_get_flags(i_dev) & SD_F_BITPERFECT))
2171 dsp_poll(struct cdev *i_dev, int events, struct thread *td)
2177 d = dsp_get_info(i_dev);
2178 if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) {
2189 getchns(i_dev, &rdch, &wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);
2203 relchns(i_dev, rdch, wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);
2211 dsp_mmap(struct cdev *i_dev, vm_ooffset_t offset, vm_paddr_t *paddr,
2224 dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset,
2255 d = dsp_get_info(i_dev);
2256 if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev))
2261 getchns(i_dev, &rdch, &wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);
2268 relchns(i_dev, rdch, wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);
2279 relchns(i_dev, rdch, wrch, SD_F_PRIO_RD | SD_F_PRIO_WR);
2280 *object = vm_pager_allocate(OBJT_DEVICE, i_dev,
2558 dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai)
2572 if (ai->dev == -1 && i_dev->si_devsw != &dsp_cdevsw)
2600 if (DSP_REGISTERED(d, i_dev) &&
2601 (ch == PCM_RDCH(i_dev) || /* record ch */
2602 ch == PCM_WRCH(i_dev))) { /* playback ch */