FreeBSD kernel sound device code
Todo List
Global chn_init (struct pcm_channel *c, void *devinfo, int dir, int direction)
Should this be moved somewhere else? The primary buffer is allocated by the driver or via DMA map setup, and tmpbuf seems to only come into existence in sndbuf_resize().
Global chn_write (struct pcm_channel *c, struct uio *buf)
Evaluate whether EAGAIN is truly desirable. 4Front drivers behave like this, but I'm not sure if it at all violates the "write should be allowed to block" model.
Global dsp_ioctl (struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
Actually test SNDCTL_DSP_CURRENT_IPTR.
Global dsp_oss_audioinfo (struct cdev *, oss_audioinfo *)

Verify correctness of Doxygen tags. ;)

SNDCTL_AUDIOINFO::caps - Make drivers keep these in pcmchan::caps?

song_name - depends first on SNDCTL_[GS]ETSONG

label - depends on SNDCTL_[GS]ETLABEL

port_number - routing information?

handle - haven't decided how to generate this yet; bus, vendor, device IDs?

Global dsp_oss_audioinfo (struct cdev *, oss_audioinfo *)

Verify correctness of Doxygen tags. ;)

SNDCTL_AUDIOINFO::caps - Make drivers keep these in pcmchan::caps?

song_name - depends first on SNDCTL_[GS]ETSONG

label - depends on SNDCTL_[GS]ETLABEL

port_number - routing information?

handle - haven't decided how to generate this yet; bus, vendor, device IDs?

Global dsp_oss_policy (struct pcm_channel *wrch, struct pcm_channel *rdch, int policy)
When SNDCTL_DSP_COOKEDMODE is supported, it'll be necessary to work with hardware drivers directly.
Global dsp_oss_syncgroup (struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgroup *group)
As far as memory allocation, should we assume that things are okay and allocate with M_WAITOK before acquiring channel locks, freeing later if not?
Global dsp_oss_syncstart (int sg_id)
Is PRIBIO correct/
Global mixer_get_recroute (struct snd_mixer *m, int *route)

Ask about error code

can user set a multi-device mask? (== or &?)

Global mixer_oss_mixerinfo (struct cdev *i_dev, oss_mixerinfo *mi)

Fill in

Fill in

Global sound_oss_sysinfo (oss_sysinfo *)

Collect num{midis,timers}.

Fill in "busy devices" fields.

Global sound_oss_sysinfo (oss_sysinfo *)

Collect num{midis,timers}.

Fill in "busy devices" fields.