summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/usb/uaudio_pcm.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2004-12-25 08:51:47 +0000
committerjulian <julian@FreeBSD.org>2004-12-25 08:51:47 +0000
commit88c3963f8397b0675ec91ee7189c779ebc73cae9 (patch)
treec5319c978ab83a8142a1c83534ca12643cca6a62 /sys/dev/sound/usb/uaudio_pcm.c
parent8f174b69919d7f61e2d2e550f1a57e38df80aeba (diff)
downloadFreeBSD-src-88c3963f8397b0675ec91ee7189c779ebc73cae9.zip
FreeBSD-src-88c3963f8397b0675ec91ee7189c779ebc73cae9.tar.gz
Allow recording on at least some USB audio devices.
PR: 75311 Submitted by: Kazuhito HONDA <kazuhito at ph dot noda dot tus dot ac dot jp> Obtained from: NetBSD plus changes MFC after: 2 weeks
Diffstat (limited to 'sys/dev/sound/usb/uaudio_pcm.c')
-rw-r--r--sys/dev/sound/usb/uaudio_pcm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/sound/usb/uaudio_pcm.c b/sys/dev/sound/usb/uaudio_pcm.c
index 89af390..1f20b21 100644
--- a/sys/dev/sound/usb/uaudio_pcm.c
+++ b/sys/dev/sound/usb/uaudio_pcm.c
@@ -73,6 +73,7 @@ ua_chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *
ch->parent = sc;
ch->channel = c;
ch->buffer = b;
+ ch->dir = dir;
pa_dev = device_get_parent(sc->sc_dev);
/* Create ua_playfmt[] & ua_recfmt[] */
@@ -320,7 +321,11 @@ ua_attach(device_t dev)
snprintf(status, SND_STATUSLEN, "at addr ?");
+#ifndef NO_RECORDING
+ if (pcm_register(dev, ua, 1, 1)) {
+#else
if (pcm_register(dev, ua, 1, 0)) {
+#endif
return(ENXIO);
}
OpenPOWER on IntegriCloud