Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/audio Remove old debug #ifdefs.



details:   https://anonhg.NetBSD.org/src/rev/368b5d781397
branches:  trunk
changeset: 968294:368b5d781397
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Jan 11 04:06:13 2020 +0000

description:
Remove old debug #ifdefs.

diffstat:

 sys/dev/audio/alaw.c     |   6 ++----
 sys/dev/audio/audio.c    |  12 ++----------
 sys/dev/audio/audiovar.h |  10 +---------
 sys/dev/audio/linear.c   |  11 ++---------
 sys/dev/audio/mulaw.c    |  11 ++---------
 5 files changed, 9 insertions(+), 41 deletions(-)

diffs (167 lines):

diff -r 67460e9e22a1 -r 368b5d781397 sys/dev/audio/alaw.c
--- a/sys/dev/audio/alaw.c      Fri Jan 10 21:32:17 2020 +0000
+++ b/sys/dev/audio/alaw.c      Sat Jan 11 04:06:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: alaw.c,v 1.2 2019/05/08 13:40:17 isaki Exp $   */
+/*     $NetBSD: alaw.c,v 1.3 2020/01/11 04:06:13 isaki Exp $   */
 
 /*
  * Copyright (C) 2018 Tetsuya Isaki. All rights reserved.
@@ -26,15 +26,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: alaw.c,v 1.2 2019/05/08 13:40:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: alaw.c,v 1.3 2020/01/11 04:06:13 isaki Exp $");
 
-#if defined(_KERNEL)
 #include <sys/types.h>
 #include <sys/systm.h>
 #include <sys/device.h>
 #include <dev/audio/audiovar.h>
 #include <dev/audio/mulaw.h>
-#endif
 
 static const uint16_t alaw_to_slinear16[256] = {
        0xea80, 0xeb80, 0xe880, 0xe980, 0xee80, 0xef80, 0xec80, 0xed80,
diff -r 67460e9e22a1 -r 368b5d781397 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Fri Jan 10 21:32:17 2020 +0000
+++ b/sys/dev/audio/audio.c     Sat Jan 11 04:06:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.39 2020/01/08 13:30:15 isaki Exp $ */
+/*     $NetBSD: audio.c,v 1.40 2020/01/11 04:06:13 isaki Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.39 2020/01/08 13:30:15 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.40 2020/01/11 04:06:13 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -151,8 +151,6 @@
 
 #if NAUDIO > 0
 
-#ifdef _KERNEL
-
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -193,7 +191,6 @@
 #include <uvm/uvm.h>
 
 #include "ioconf.h"
-#endif /* _KERNEL */
 
 /*
  * 0: No debug logs
@@ -5220,11 +5217,6 @@
            mixer->hwseq, mixer->hw_complete_counter,
            mixer->hwbuf.head, mixer->hwbuf.used, mixer->hwbuf.capacity);
 
-#if !defined(_KERNEL)
-       /* This is a debug code for userland test. */
-       return;
-#endif
-
 #if defined(AUDIO_HW_SINGLE_BUFFER)
        /*
         * Create a new block here and output it immediately.
diff -r 67460e9e22a1 -r 368b5d781397 sys/dev/audio/audiovar.h
--- a/sys/dev/audio/audiovar.h  Fri Jan 10 21:32:17 2020 +0000
+++ b/sys/dev/audio/audiovar.h  Sat Jan 11 04:06:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audiovar.h,v 1.5 2019/08/29 13:01:07 isaki Exp $       */
+/*     $NetBSD: audiovar.h,v 1.6 2020/01/11 04:06:13 isaki Exp $       */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -67,20 +67,12 @@
 #ifndef _SYS_DEV_AUDIO_AUDIOVAR_H_
 #define _SYS_DEV_AUDIO_AUDIOVAR_H_
 
-#if defined(_KERNEL)
 #include <sys/condvar.h>
 #include <sys/proc.h>
 #include <sys/queue.h>
 
 #include <dev/audio/audio_if.h>
 #include <dev/audio/audiofil.h>
-#else
-#include <stdint.h>
-#include <stdbool.h>
-#include "compat.h"
-#include "userland.h"
-#include "audiofil.h"
-#endif /* _KERNEL */
 
 /*
  * Whether supports [US]LINEAR24/24 as userland format.
diff -r 67460e9e22a1 -r 368b5d781397 sys/dev/audio/linear.c
--- a/sys/dev/audio/linear.c    Fri Jan 10 21:32:17 2020 +0000
+++ b/sys/dev/audio/linear.c    Sat Jan 11 04:06:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linear.c,v 1.2 2019/05/08 13:40:17 isaki Exp $ */
+/*     $NetBSD: linear.c,v 1.3 2020/01/11 04:06:13 isaki Exp $ */
 
 /*
  * Copyright (C) 2017 Tetsuya Isaki. All rights reserved.
@@ -26,21 +26,14 @@
  * SUCH DAMAGE.
  */
 
-#if defined(_KERNEL)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linear.c,v 1.2 2019/05/08 13:40:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linear.c,v 1.3 2020/01/11 04:06:13 isaki Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
 #include <sys/device.h>
 #include <dev/audio/audiovar.h>
 #include <dev/audio/linear.h>
-#else
-#include <stdint.h>
-#include <stdbool.h>
-#include "compat.h"
-#include "audiovar.h"
-#endif /* _KERNEL */
 
 /*
  * audio_linear8_to_internal:
diff -r 67460e9e22a1 -r 368b5d781397 sys/dev/audio/mulaw.c
--- a/sys/dev/audio/mulaw.c     Fri Jan 10 21:32:17 2020 +0000
+++ b/sys/dev/audio/mulaw.c     Sat Jan 11 04:06:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mulaw.c,v 1.2 2019/05/08 13:40:17 isaki Exp $  */
+/*     $NetBSD: mulaw.c,v 1.3 2020/01/11 04:06:13 isaki Exp $  */
 
 /*
  * Copyright (C) 2017 Tetsuya Isaki. All rights reserved.
@@ -26,21 +26,14 @@
  * SUCH DAMAGE.
  */
 
-#if defined(_KERNEL)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.2 2019/05/08 13:40:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.3 2020/01/11 04:06:13 isaki Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
 #include <sys/device.h>
 #include <dev/audio/audiovar.h>
 #include <dev/audio/mulaw.h>
-#else
-#include <stdint.h>
-#include <stdbool.h>
-#include "compat.h"
-#include "audiovar.h"
-#endif /* _KERNEL */
 
 /*
  * audio_internal_to_mulaw has two implementations.



Home | Main Index | Thread Index | Old Index