Sun Apr 19 13:44:51 2020 UTC ()
ossaudio: Implement SNDCTL_DSP_(SET|GET)TRIGGER.


(nia)
diff -r1.42 -r1.43 src/lib/libossaudio/ossaudio.c
diff -r1.81 -r1.82 src/sys/compat/ossaudio/ossaudio.c

cvs diff -r1.42 -r1.43 src/lib/libossaudio/Attic/ossaudio.c (expand / switch to unified diff)

--- src/lib/libossaudio/Attic/ossaudio.c 2020/04/19 11:27:40 1.42
+++ src/lib/libossaudio/Attic/ossaudio.c 2020/04/19 13:44:50 1.43
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ossaudio.c,v 1.42 2020/04/19 11:27:40 nia Exp $ */ 1/* $NetBSD: ossaudio.c,v 1.43 2020/04/19 13:44:50 nia Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1997 The NetBSD Foundation, Inc. 4 * Copyright (c) 1997 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__RCSID("$NetBSD: ossaudio.c,v 1.42 2020/04/19 11:27:40 nia Exp $"); 30__RCSID("$NetBSD: ossaudio.c,v 1.43 2020/04/19 13:44:50 nia Exp $");
31 31
32/* 32/*
33 * This is an OSS (Linux) sound API emulator. 33 * This is an OSS (Linux) sound API emulator.
34 * It provides the essentials of the API. 34 * It provides the essentials of the API.
35 */ 35 */
36 36
37/* XXX This file is essentially the same as sys/compat/ossaudio.c. 37/* XXX This file is essentially the same as sys/compat/ossaudio.c.
38 * With some preprocessor magic it could be the same file. 38 * With some preprocessor magic it could be the same file.
39 */ 39 */
40 40
41#include <string.h> 41#include <string.h>
42#include <sys/types.h> 42#include <sys/types.h>
43#include <sys/ioctl.h> 43#include <sys/ioctl.h>
@@ -491,63 +491,55 @@ audio_ioctl(int fd, unsigned long com, v @@ -491,63 +491,55 @@ audio_ioctl(int fd, unsigned long com, v
491 bufinfo.bytes = tmpinfo.record.seek; 491 bufinfo.bytes = tmpinfo.record.seek;
492 *(struct audio_buf_info *)argp = bufinfo; 492 *(struct audio_buf_info *)argp = bufinfo;
493 break; 493 break;
494 case SNDCTL_DSP_NONBLOCK: 494 case SNDCTL_DSP_NONBLOCK:
495 idat = 1; 495 idat = 1;
496 retval = ioctl(fd, FIONBIO, &idat); 496 retval = ioctl(fd, FIONBIO, &idat);
497 if (retval < 0) 497 if (retval < 0)
498 return retval; 498 return retval;
499 break; 499 break;
500 case SNDCTL_DSP_GETCAPS: 500 case SNDCTL_DSP_GETCAPS:
501 retval = ioctl(fd, AUDIO_GETPROPS, &idata); 501 retval = ioctl(fd, AUDIO_GETPROPS, &idata);
502 if (retval < 0) 502 if (retval < 0)
503 return retval; 503 return retval;
504 idat = DSP_CAP_TRIGGER; /* pretend we have trigger */ 504 idat = DSP_CAP_TRIGGER;
505 if (idata & AUDIO_PROP_FULLDUPLEX) 505 if (idata & AUDIO_PROP_FULLDUPLEX)
506 idat |= DSP_CAP_DUPLEX; 506 idat |= DSP_CAP_DUPLEX;
507 if (idata & AUDIO_PROP_MMAP) 507 if (idata & AUDIO_PROP_MMAP)
508 idat |= DSP_CAP_MMAP; 508 idat |= DSP_CAP_MMAP;
509 INTARG = idat; 509 INTARG = idat;
510 break; 510 break;
511#if 0 511 case SNDCTL_DSP_SETTRIGGER:
512 case SNDCTL_DSP_GETTRIGGER: 
513 retval = ioctl(fd, AUDIO_GETBUFINFO, &tmpinfo); 512 retval = ioctl(fd, AUDIO_GETBUFINFO, &tmpinfo);
514 if (retval < 0) 513 if (retval < 0)
515 return retval; 514 return retval;
516 idat = (tmpinfo.play.pause ? 0 : PCM_ENABLE_OUTPUT) | 
517 (tmpinfo.record.pause ? 0 : PCM_ENABLE_INPUT); 
518 retval = copyout(&idat, SCARG(uap, data), sizeof idat); 
519 if (retval < 0) 
520 return retval; 
521 break; 
522 case SNDCTL_DSP_SETTRIGGER: 
523 AUDIO_INITINFO(&tmpinfo); 515 AUDIO_INITINFO(&tmpinfo);
524 retval = copyin(SCARG(uap, data), &idat, sizeof idat); 516 if (tmpinfo.mode & AUMODE_PLAY)
525 if (retval < 0) 517 tmpinfo.play.pause = (INTARG & PCM_ENABLE_OUTPUT) == 0;
526 return retval; 518 if (tmpinfo.mode & AUMODE_RECORD)
527 tmpinfo.play.pause = (idat & PCM_ENABLE_OUTPUT) == 0; 519 tmpinfo.record.pause = (INTARG & PCM_ENABLE_INPUT) == 0;
528 tmpinfo.record.pause = (idat & PCM_ENABLE_INPUT) == 0; 520 (void)ioctl(fd, AUDIO_SETINFO, &tmpinfo);
529 (void) ioctl(fd, AUDIO_SETINFO, &tmpinfo); 521 /* FALLTHRU */
530 retval = copyout(&idat, SCARG(uap, data), sizeof idat); 522 case SNDCTL_DSP_GETTRIGGER:
 523 retval = ioctl(fd, AUDIO_GETBUFINFO, &tmpinfo);
531 if (retval < 0) 524 if (retval < 0)
532 return retval; 525 return retval;
 526 idat = 0;
 527 if ((tmpinfo.mode & AUMODE_PLAY) && !tmpinfo.play.pause)
 528 idat |= PCM_ENABLE_OUTPUT;
 529 if ((tmpinfo.mode & AUMODE_RECORD) && !tmpinfo.record.pause)
 530 idat |= PCM_ENABLE_INPUT;
 531 INTARG = idat;
533 break; 532 break;
534#else 
535 case SNDCTL_DSP_GETTRIGGER: 
536 case SNDCTL_DSP_SETTRIGGER: 
537 /* XXX Do nothing for now. */ 
538 INTARG = PCM_ENABLE_OUTPUT; 
539 break; 
540#endif 
541 case SNDCTL_DSP_GETIPTR: 533 case SNDCTL_DSP_GETIPTR:
542 retval = ioctl(fd, AUDIO_GETIOFFS, &tmpoffs); 534 retval = ioctl(fd, AUDIO_GETIOFFS, &tmpoffs);
543 if (retval < 0) 535 if (retval < 0)
544 return retval; 536 return retval;
545 cntinfo.bytes = tmpoffs.samples; 537 cntinfo.bytes = tmpoffs.samples;
546 cntinfo.blocks = tmpoffs.deltablks; 538 cntinfo.blocks = tmpoffs.deltablks;
547 cntinfo.ptr = tmpoffs.offset; 539 cntinfo.ptr = tmpoffs.offset;
548 *(struct count_info *)argp = cntinfo; 540 *(struct count_info *)argp = cntinfo;
549 break; 541 break;
550 case SNDCTL_DSP_GETOPTR: 542 case SNDCTL_DSP_GETOPTR:
551 retval = ioctl(fd, AUDIO_GETOOFFS, &tmpoffs); 543 retval = ioctl(fd, AUDIO_GETOOFFS, &tmpoffs);
552 if (retval < 0) 544 if (retval < 0)
553 return retval; 545 return retval;

cvs diff -r1.81 -r1.82 src/sys/compat/ossaudio/ossaudio.c (expand / switch to unified diff)

--- src/sys/compat/ossaudio/ossaudio.c 2020/04/15 16:39:06 1.81
+++ src/sys/compat/ossaudio/ossaudio.c 2020/04/19 13:44:51 1.82
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ossaudio.c,v 1.81 2020/04/15 16:39:06 nia Exp $ */ 1/* $NetBSD: ossaudio.c,v 1.82 2020/04/19 13:44:51 nia Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.81 2020/04/15 16:39:06 nia Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.82 2020/04/19 13:44:51 nia Exp $");
31 31
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/proc.h> 33#include <sys/proc.h>
34#include <sys/systm.h> 34#include <sys/systm.h>
35#include <sys/file.h> 35#include <sys/file.h>
36#include <sys/vnode.h> 36#include <sys/vnode.h>
37#include <sys/filedesc.h> 37#include <sys/filedesc.h>
38#include <sys/ioctl.h> 38#include <sys/ioctl.h>
39#include <sys/mount.h> 39#include <sys/mount.h>
40#include <sys/kernel.h> 40#include <sys/kernel.h>
41#include <sys/audioio.h> 41#include <sys/audioio.h>
42#include <sys/midiio.h> 42#include <sys/midiio.h>
43#include <sys/kauth.h> 43#include <sys/kauth.h>
@@ -705,99 +705,80 @@ oss_ioctl_audio(struct lwp *l, const str @@ -705,99 +705,80 @@ oss_ioctl_audio(struct lwp *l, const str
705 if (error) { 705 if (error) {
706 DPRINTF(("%s: FIONBIO %d\n", 706 DPRINTF(("%s: FIONBIO %d\n",
707 __func__, error)); 707 __func__, error));
708 goto out; 708 goto out;
709 } 709 }
710 break; 710 break;
711 case OSS_SNDCTL_DSP_GETCAPS: 711 case OSS_SNDCTL_DSP_GETCAPS:
712 error = ioctlf(fp, AUDIO_GETPROPS, &idata); 712 error = ioctlf(fp, AUDIO_GETPROPS, &idata);
713 if (error) { 713 if (error) {
714 DPRINTF(("%s: AUDIO_GETPROPS %d\n", 714 DPRINTF(("%s: AUDIO_GETPROPS %d\n",
715 __func__, error)); 715 __func__, error));
716 goto out; 716 goto out;
717 } 717 }
718 idat = OSS_DSP_CAP_TRIGGER; /* pretend we have trigger */ 718 idat = OSS_DSP_CAP_TRIGGER;
719 if (idata & AUDIO_PROP_FULLDUPLEX) 719 if (idata & AUDIO_PROP_FULLDUPLEX)
720 idat |= OSS_DSP_CAP_DUPLEX; 720 idat |= OSS_DSP_CAP_DUPLEX;
721 if (idata & AUDIO_PROP_MMAP) 721 if (idata & AUDIO_PROP_MMAP)
722 idat |= OSS_DSP_CAP_MMAP; 722 idat |= OSS_DSP_CAP_MMAP;
723 DPRINTF(("%s: SNDCL_DSP_GETCAPS %s duplex, %smmap\n", 723 DPRINTF(("%s: SNDCL_DSP_GETCAPS %s duplex, %smmap\n",
724 __func__, (idat & OSS_DSP_CAP_DUPLEX) ? "full" : "half", 724 __func__, (idat & OSS_DSP_CAP_DUPLEX) ? "full" : "half",
725 (idat & OSS_DSP_CAP_MMAP) ? "" : "no ")); 725 (idat & OSS_DSP_CAP_MMAP) ? "" : "no "));
726 error = copyout(&idat, SCARG(uap, data), sizeof idat); 726 error = copyout(&idat, SCARG(uap, data), sizeof idat);
727 if (error) { 727 if (error) {
728 DPRINTF(("%s: SNDCTL_DSP_GETCAPS %x = %d\n", __func__, 728 DPRINTF(("%s: SNDCTL_DSP_GETCAPS %x = %d\n", __func__,
729 idat, error)); 729 idat, error));
730 goto out; 730 goto out;
731 } 731 }
732 break; 732 break;
733#if 0 
734 case OSS_SNDCTL_DSP_GETTRIGGER: 
735 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo); 
736 if (error) { 
737 DPRINTF(("%s: AUDIO_GETBUFINFO %d\n", 
738 __func__, error)); 
739 goto out; 
740 } 
741 idat = (tmpinfo.play.pause ? 0 : OSS_PCM_ENABLE_OUTPUT) | 
742 (tmpinfo.record.pause ? 0 : OSS_PCM_ENABLE_INPUT); 
743 error = copyout(&idat, SCARG(uap, data), sizeof idat); 
744 if (error) { 
745 DPRINTF(("%s: SNDCTL_DSP_SETRIGGER %x = %d\n", 
746 __func__, idat, error)); 
747 goto out; 
748 } 
749 break; 
750 case OSS_SNDCTL_DSP_SETTRIGGER: 733 case OSS_SNDCTL_DSP_SETTRIGGER:
751 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo, p); 734 error = copyin(SCARG(uap, data), &idat, sizeof idat);
752 if (error) { 735 if (error) {
753 DPRINTF(("%s: AUDIO_GETBUFINFO %d\n", 736 DPRINTF(("%s: SNDCTL_DSP_SETTRIGGER: %d\n",
754 __func__, error)); 737 __func__, error));
755 goto out; 738 goto out;
756 } 739 }
757 error = copyin(SCARG(uap, data), &idat, sizeof idat); 740 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
758 if (error) { 741 if (error) {
759 DPRINTF(("%s: AUDIO_GETBUFINFO %d\n", 742 DPRINTF(("%s: AUDIO_GETBUFINFO %d\n",
760 __func__, error)); 743 __func__, error));
761 goto out; 744 goto out;
762 } 745 }
763 tmpinfo.play.pause = (idat & OSS_PCM_ENABLE_OUTPUT) == 0; 746 AUDIO_INITINFO(&tmpinfo);
764 tmpinfo.record.pause = (idat & OSS_PCM_ENABLE_INPUT) == 0; 747 if (tmpinfo.mode & AUMODE_PLAY)
765 error = ioctlf(fp, AUDIO_SETINFO, &tmpinfo); 748 tmpinfo.play.pause = (idat & OSS_PCM_ENABLE_OUTPUT) == 0;
 749 if (tmpinfo.mode & AUMODE_RECORD)
 750 tmpinfo.record.pause = (idat & OSS_PCM_ENABLE_INPUT) == 0;
 751 (void)ioctlf(fp, AUDIO_SETINFO, &tmpinfo);
 752 /* FALLTHRU */
 753 case OSS_SNDCTL_DSP_GETTRIGGER:
 754 error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo);
766 if (error) { 755 if (error) {
767 DPRINTF(("%s: AUDIO_SETINFO %d\n", 756 DPRINTF(("%s: AUDIO_GETBUFINFO %d\n",
768 __func__, error)); 757 __func__, error));
769 goto out; 758 goto out;
770 } 759 }
 760 idat = 0;
 761 if ((tmpinfo.mode & AUMODE_PLAY) && !tmpinfo.play.pause)
 762 idat |= OSS_PCM_ENABLE_OUTPUT;
 763 if ((tmpinfo.mode & AUMODE_RECORD) && !tmpinfo.record.pause)
 764 idat |= OSS_PCM_ENABLE_INPUT;
771 error = copyout(&idat, SCARG(uap, data), sizeof idat); 765 error = copyout(&idat, SCARG(uap, data), sizeof idat);
772 if (error) { 766 if (error) {
773 DPRINTF(("%s: SNDCTL_DSP_SETRIGGER %x = %d\n", 767 DPRINTF(("%s: SNDCTL_DSP_GETTRIGGER = %x = %d\n",
774 __func__, idat, error)); 
775 goto out; 
776 } 
777 break; 
778#else 
779 case OSS_SNDCTL_DSP_GETTRIGGER: 
780 case OSS_SNDCTL_DSP_SETTRIGGER: 
781 /* XXX Do nothing for now. */ 
782 idat = OSS_PCM_ENABLE_OUTPUT; 
783 error = copyout(&idat, SCARG(uap, data), sizeof idat); 
784 if (error) { 
785 DPRINTF(("%s: SNDCTL_DSP_{GET,SET}RIGGER %x = %d\n", 
786 __func__, idat, error)); 768 __func__, idat, error));
787 goto out; 769 goto out;
788 } 770 }
789 break; 771 break;
790#endif 
791 case OSS_SNDCTL_DSP_GETIPTR: 772 case OSS_SNDCTL_DSP_GETIPTR:
792 error = ioctlf(fp, AUDIO_GETIOFFS, &tmpoffs); 773 error = ioctlf(fp, AUDIO_GETIOFFS, &tmpoffs);
793 if (error) { 774 if (error) {
794 DPRINTF(("%s: AUDIO_GETIOFFS %d\n", 775 DPRINTF(("%s: AUDIO_GETIOFFS %d\n",
795 __func__, error)); 776 __func__, error));
796 goto out; 777 goto out;
797 } 778 }
798 cntinfo.bytes = tmpoffs.samples; 779 cntinfo.bytes = tmpoffs.samples;
799 cntinfo.blocks = tmpoffs.deltablks; 780 cntinfo.blocks = tmpoffs.deltablks;
800 cntinfo.ptr = tmpoffs.offset; 781 cntinfo.ptr = tmpoffs.offset;
801 error = copyout(&cntinfo, SCARG(uap, data), sizeof cntinfo); 782 error = copyout(&cntinfo, SCARG(uap, data), sizeof cntinfo);
802 if (error) { 783 if (error) {
803 DPRINTF(("%s: SNDCTL_DSP_GETIPTR %d\n", 784 DPRINTF(("%s: SNDCTL_DSP_GETIPTR %d\n",