summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/channel_if.m
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2001-05-27 17:22:00 +0000
committercg <cg@FreeBSD.org>2001-05-27 17:22:00 +0000
commitc86d13a3e19321d0e26ffe03f50b38435a68209d (patch)
tree4d9e3bbc492eeff8072b5cb9164df32cafec8603 /sys/dev/sound/pcm/channel_if.m
parentc4a3cb36878653ea09d6df9aabbd15fb5419ddec (diff)
downloadFreeBSD-src-c86d13a3e19321d0e26ffe03f50b38435a68209d.zip
FreeBSD-src-c86d13a3e19321d0e26ffe03f50b38435a68209d.tar.gz
beginnings of virtual playback channel support
instead of using two malloced arrays for storing channel lists, use an slist. convert the sndstat device to use sbufs and optionally provide more detail about channel state. vchans are software mixed playback channels. they are not enabled by this commit. they use the feeder infrastructure to emulate normal playback channels in a manner transparent to applications, whilst providing as many channels are desired, especially suitable for devices with only one hardware playback channel. in the future they will provide additional features. those wishing to test this functionality will need to add vchan.c to sys/conf/files and use 'sysctl -w hw.snd.pcm0.vchans' to enable it. blocksize and auto-rate selection are not yet supported.
Diffstat (limited to 'sys/dev/sound/pcm/channel_if.m')
-rw-r--r--sys/dev/sound/pcm/channel_if.m19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/channel_if.m b/sys/dev/sound/pcm/channel_if.m
index c5675da..9d8e289 100644
--- a/sys/dev/sound/pcm/channel_if.m
+++ b/sys/dev/sound/pcm/channel_if.m
@@ -57,6 +57,18 @@ CODE {
return 1;
}
+ static u_int32_t
+ channel_nogetptr(kobj_t obj, void *data)
+ {
+ return 0;
+ }
+
+ static int
+ channel_nonotify(kobj_t obj, void *data, u_int32_t changed)
+ {
+ return 0;
+ }
+
};
METHOD void* init {
@@ -115,10 +127,15 @@ METHOD int trigger {
METHOD u_int32_t getptr {
kobj_t obj;
void *data;
-};
+} DEFAULT channel_nogetptr;
METHOD struct pcmchan_caps* getcaps {
kobj_t obj;
void *data;
};
+METHOD int notify {
+ kobj_t obj;
+ void *data;
+ u_int32_t changed;
+} DEFAULT channel_nonotify;
OpenPOWER on IntegriCloud