Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/ossaudio Use record.sample_rate for recording on ...



details:   https://anonhg.NetBSD.org/src/rev/ac53471c3fb2
branches:  trunk
changeset: 460744:ac53471c3fb2
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Nov 02 11:56:34 2019 +0000

description:
Use record.sample_rate for recording on SNDCTL_DSP_SPEED.
It's kernel side of PR lib/54667.

diffstat:

 sys/compat/ossaudio/ossaudio.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 255b87965fb0 -r ac53471c3fb2 sys/compat/ossaudio/ossaudio.c
--- a/sys/compat/ossaudio/ossaudio.c    Sat Nov 02 11:48:23 2019 +0000
+++ b/sys/compat/ossaudio/ossaudio.c    Sat Nov 02 11:56:34 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ossaudio.c,v 1.76 2019/09/26 01:37:52 christos Exp $   */
+/*     $NetBSD: ossaudio.c,v 1.77 2019/11/02 11:56:34 isaki Exp $      */
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.76 2019/09/26 01:37:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.77 2019/11/02 11:56:34 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -238,7 +238,10 @@
                         __func__, error));
                        goto out;
                }
-               idat = tmpinfo.play.sample_rate;
+               if (tmpinfo.mode == AUMODE_RECORD)
+                       idat = tmpinfo.record.sample_rate;
+               else
+                       idat = tmpinfo.play.sample_rate;
                DPRINTF(("%s: SNDCTL_PCM_READ_RATE < %d\n", __func__, idat));
                error = copyout(&idat, SCARG(uap, data), sizeof idat);
                if (error) {



Home | Main Index | Thread Index | Old Index