diff options
Diffstat (limited to 'sys/dev/sound/pcm')
-rw-r--r-- | sys/dev/sound/pcm/dsp.c | 30 | ||||
-rw-r--r-- | sys/dev/sound/pcm/mixer.c | 22 | ||||
-rw-r--r-- | sys/dev/sound/pcm/mixer.h | 2 | ||||
-rw-r--r-- | sys/dev/sound/pcm/sndstat.c | 8 | ||||
-rw-r--r-- | sys/dev/sound/pcm/sound.h | 10 |
5 files changed, 36 insertions, 36 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 3b910c7..9200941 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -60,7 +60,7 @@ static eventhandler_tag dsp_ehtag; #endif static struct snddev_info * -dsp_get_info(dev_t dev) +dsp_get_info(struct cdev *dev) { struct snddev_info *d; int unit; @@ -74,7 +74,7 @@ dsp_get_info(dev_t dev) } static u_int32_t -dsp_get_flags(dev_t dev) +dsp_get_flags(struct cdev *dev) { device_t bdev; int unit; @@ -88,7 +88,7 @@ dsp_get_flags(dev_t dev) } static void -dsp_set_flags(dev_t dev, u_int32_t flags) +dsp_set_flags(struct cdev *dev, u_int32_t flags) { device_t bdev; int unit; @@ -108,7 +108,7 @@ dsp_set_flags(dev_t dev, u_int32_t flags) * lock channels specified. */ static int -getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio) +getchns(struct cdev *dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio) { struct snddev_info *d; u_int32_t flags; @@ -152,7 +152,7 @@ getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32 /* unlock specified channels */ static void -relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio) +relchns(struct cdev *dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio) { struct snddev_info *d; @@ -165,7 +165,7 @@ relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t } static int -dsp_open(dev_t i_dev, int flags, int mode, struct thread *td) +dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct pcm_channel *rdch, *wrch; struct snddev_info *d; @@ -319,7 +319,7 @@ dsp_open(dev_t i_dev, int flags, int mode, struct thread *td) } static int -dsp_close(dev_t i_dev, int flags, int mode, struct thread *td) +dsp_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct pcm_channel *rdch, *wrch; struct snddev_info *d; @@ -388,7 +388,7 @@ dsp_close(dev_t i_dev, int flags, int mode, struct thread *td) } static int -dsp_read(dev_t i_dev, struct uio *buf, int flag) +dsp_read(struct cdev *i_dev, struct uio *buf, int flag) { struct pcm_channel *rdch, *wrch; intrmask_t s; @@ -415,7 +415,7 @@ dsp_read(dev_t i_dev, struct uio *buf, int flag) } static int -dsp_write(dev_t i_dev, struct uio *buf, int flag) +dsp_write(struct cdev *i_dev, struct uio *buf, int flag) { struct pcm_channel *rdch, *wrch; intrmask_t s; @@ -442,7 +442,7 @@ dsp_write(dev_t i_dev, struct uio *buf, int flag) } static int -dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) +dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) { struct pcm_channel *chn, *rdch, *wrch; struct snddev_info *d; @@ -567,7 +567,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) { snd_capabilities *p = (snd_capabilities *)arg; struct pcmchan_caps *pcaps = NULL, *rcaps = NULL; - dev_t pdev; + struct cdev *pdev; if (rdch) { CHN_LOCK(rdch); @@ -1026,7 +1026,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) } static int -dsp_poll(dev_t i_dev, int events, struct thread *td) +dsp_poll(struct cdev *i_dev, int events, struct thread *td) { struct pcm_channel *wrch = NULL, *rdch = NULL; intrmask_t s; @@ -1053,7 +1053,7 @@ dsp_poll(dev_t i_dev, int events, struct thread *td) } static int -dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +dsp_mmap(struct cdev *i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct pcm_channel *wrch = NULL, *rdch = NULL, *c; intrmask_t s; @@ -1114,9 +1114,9 @@ dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) * if xN.i isn't busy, return its dev_t */ static void -dsp_clone(void *arg, char *name, int namelen, dev_t *dev) +dsp_clone(void *arg, char *name, int namelen, struct cdev **dev) { - dev_t pdev; + struct cdev *pdev; struct snddev_info *pcm_dev; struct snddev_channel *pcm_chan; int i, unit, devtype; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index b5a67ed..47812fe 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -86,7 +86,7 @@ static struct cdevsw mixer_cdevsw = { static eventhandler_tag mixer_ehtag; #endif -static dev_t +static struct cdev * mixer_get_devt(device_t dev) { struct snddev_info *snddev; @@ -190,7 +190,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) struct snddev_info *snddev; struct snd_mixer *m; u_int16_t v; - dev_t pdev; + struct cdev *pdev; int i, unit; m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO); @@ -231,7 +231,7 @@ mixer_uninit(device_t dev) { int i; struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -262,7 +262,7 @@ int mixer_reinit(device_t dev) { struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; int i; pdev = mixer_get_devt(dev); @@ -318,7 +318,7 @@ int mixer_hwvol_init(device_t dev) { struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -339,7 +339,7 @@ void mixer_hwvol_mute(device_t dev) { struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -360,7 +360,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) { struct snd_mixer *m; int level, left, right; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -387,7 +387,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) /* ----------------------------------------------------------------------- */ static int -mixer_open(dev_t i_dev, int flags, int mode, struct thread *td) +mixer_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct snd_mixer *m; intrmask_t s; @@ -404,7 +404,7 @@ mixer_open(dev_t i_dev, int flags, int mode, struct thread *td) } static int -mixer_close(dev_t i_dev, int flags, int mode, struct thread *td) +mixer_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct snd_mixer *m; intrmask_t s; @@ -426,7 +426,7 @@ mixer_close(dev_t i_dev, int flags, int mode, struct thread *td) } int -mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) +mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) { struct snd_mixer *m; intrmask_t s; @@ -479,7 +479,7 @@ mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) #ifdef USING_DEVFS static void -mixer_clone(void *arg, char *name, int namelen, dev_t *dev) +mixer_clone(void *arg, char *name, int namelen, struct cdev **dev) { struct snddev_info *sd; diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index ff4c22c..22bd22a 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -29,7 +29,7 @@ int mixer_init(device_t dev, kobj_class_t cls, void *devinfo); int mixer_uninit(device_t dev); int mixer_reinit(device_t dev); -int mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td); +int mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td); int mixer_hwvol_init(device_t dev); void mixer_hwvol_mute(device_t dev); diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index e96a802..0b391a7 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -62,7 +62,7 @@ struct sndstat_entry { static struct mtx sndstat_lock; #endif static struct sbuf sndstat_sbuf; -static dev_t sndstat_dev = 0; +static struct cdev *sndstat_dev = 0; static int sndstat_isopen = 0; static int sndstat_bufptr; static int sndstat_maxunit = -1; @@ -103,7 +103,7 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), sysctl_hw_sndverbose, "I", ""); static int -sndstat_open(dev_t i_dev, int flags, int mode, struct thread *td) +sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { intrmask_t s; int error; @@ -136,7 +136,7 @@ out: } static int -sndstat_close(dev_t i_dev, int flags, int mode, struct thread *td) +sndstat_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { intrmask_t s; @@ -156,7 +156,7 @@ sndstat_close(dev_t i_dev, int flags, int mode, struct thread *td) } static int -sndstat_read(dev_t i_dev, struct uio *buf, int flag) +sndstat_read(struct cdev *i_dev, struct uio *buf, int flag) { intrmask_t s; int l, err; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 7acdfc8..5eae8e3 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -278,10 +278,10 @@ struct snddev_channel { SLIST_ENTRY(snddev_channel) link; struct pcm_channel *channel; int chan_num; - dev_t dsp_devt; - dev_t dspW_devt; - dev_t audio_devt; - dev_t dspr_devt; + struct cdev *dsp_devt; + struct cdev *dspW_devt; + struct cdev *audio_devt; + struct cdev *dspr_devt; }; struct snddev_info { @@ -297,7 +297,7 @@ struct snddev_info { struct sysctl_ctx_list sysctl_tree; struct sysctl_oid *sysctl_tree_top; struct mtx *lock; - dev_t mixer_dev; + struct cdev *mixer_dev; }; |