Source-Changes-HG archive

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

[src/isaki-audio2]: src/sys Remove obsoleted methods in audio_hw_if.



details:   https://anonhg.NetBSD.org/src/rev/58dd9561e662
branches:  isaki-audio2
changeset: 451016:58dd9561e662
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat May 04 04:13:23 2019 +0000

description:
Remove obsoleted methods in audio_hw_if.
- drain: is handled in audio upper layer now.
- mappage: is handled in audio upper layer now.
- setfd: no one uses and it's meaningless now.

diffstat:

 sys/arch/amiga/dev/toccata.c        |  10 ++--------
 sys/arch/arm/imx/imx23_digfilt.c    |   4 +---
 sys/arch/arm/sunxi/sunxi_i2s.c      |   5 ++---
 sys/arch/zaurus/dev/wm8731_zaudio.c |   6 ++----
 sys/arch/zaurus/dev/wm8750_zaudio.c |   6 ++----
 sys/dev/audio/audio.c               |   7 ++-----
 sys/dev/audio_dai.h                 |  10 +---------
 sys/dev/audio_if.h                  |  11 +----------
 sys/dev/bluetooth/btsco.c           |  14 ++------------
 sys/dev/fdt/ausoc.c                 |  13 ++-----------
 sys/dev/ic/ad1848var.h              |   3 +--
 sys/dev/ic/arcofi.c                 |   4 +---
 sys/dev/ic/interwave.c              |  18 ++----------------
 sys/dev/ic/interwavevar.h           |   4 +---
 sys/dev/isa/ad1848_isa.c            |  10 ++--------
 sys/dev/isa/ad1848var.h             |   3 +--
 sys/dev/isa/ess.c                   |   5 ++---
 sys/dev/isa/gus.c                   |   6 ++----
 sys/dev/isa/wss.c                   |   5 ++---
 sys/dev/isa/ym.c                    |   5 ++---
 sys/dev/isapnp/gus_isapnp.c         |   6 ++----
 sys/dev/pci/esa.c                   |  25 ++-----------------------
 sys/dev/pci/gcscaudio.c             |   6 ++----
 sys/dev/pci/yds.c                   |   6 ++----
 24 files changed, 41 insertions(+), 151 deletions(-)

diffs (truncated from 775 to 300 lines):

diff -r d65616fc7272 -r 58dd9561e662 sys/arch/amiga/dev/toccata.c
--- a/sys/arch/amiga/dev/toccata.c      Sat May 04 00:40:07 2019 +0000
+++ b/sys/arch/amiga/dev/toccata.c      Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: toccata.c,v 1.18.2.1 2019/04/21 05:59:59 isaki Exp $ */
+/* $NetBSD: toccata.c,v 1.18.2.2 2019/05/04 04:13:23 isaki Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.18.2.1 2019/04/21 05:59:59 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.18.2.2 2019/05/04 04:13:23 isaki Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -179,12 +179,6 @@
 const struct audio_hw_if audiocs_hw_if = {
        .open                   = toccata_open,
        .close                  = toccata_close,
-       /*
-        * XXX toccata_drain could be written:
-        * sleep for play interrupt. This loses less than 512 bytes of
-        * sample data, otherwise up to 1024.
-        */
-       .drain                  = NULL,
        .query_format           = ad1848_query_format,
        .set_format             = ad1848_set_format,
        .round_blocksize        = toccata_round_blocksize,
diff -r d65616fc7272 -r 58dd9561e662 sys/arch/arm/imx/imx23_digfilt.c
--- a/sys/arch/arm/imx/imx23_digfilt.c  Sat May 04 00:40:07 2019 +0000
+++ b/sys/arch/arm/imx/imx23_digfilt.c  Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $Id: imx23_digfilt.c,v 1.1.24.1 2019/04/24 12:01:50 isaki Exp $ */
+/* $Id: imx23_digfilt.c,v 1.1.24.2 2019/05/04 04:13:23 isaki Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -159,14 +159,12 @@
        .halt_output = digfilt_halt_output,
        .speaker_ctl = NULL,
        .getdev = digfilt_getdev,
-       .setfd = NULL,
        .set_port = digfilt_set_port,
        .get_port = digfilt_get_port,
        .query_devinfo = digfilt_query_devinfo,
        .allocm = digfilt_allocm,
        .freem = digfilt_freem,
        .round_buffersize = digfilt_round_buffersize,
-       .mappage = NULL,
        .get_props = digfilt_get_props,
        .trigger_output = NULL,
        .trigger_input = NULL,
diff -r d65616fc7272 -r 58dd9561e662 sys/arch/arm/sunxi/sunxi_i2s.c
--- a/sys/arch/arm/sunxi/sunxi_i2s.c    Sat May 04 00:40:07 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_i2s.c    Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_i2s.c,v 1.3.2.1 2019/04/27 05:22:28 isaki Exp $ */
+/* $NetBSD: sunxi_i2s.c,v 1.3.2.2 2019/05/04 04:13:23 isaki Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.3.2.1 2019/04/27 05:22:28 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.3.2.2 2019/05/04 04:13:23 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -481,7 +481,6 @@
 }
 
 static const struct audio_hw_if sunxi_i2s_hw_if = {
-       .drain = NULL,
        .query_format = sunxi_i2s_query_format,
        .set_format = sunxi_i2s_set_format,
        .allocm = sunxi_i2s_allocm,
diff -r d65616fc7272 -r 58dd9561e662 sys/arch/zaurus/dev/wm8731_zaudio.c
--- a/sys/arch/zaurus/dev/wm8731_zaudio.c       Sat May 04 00:40:07 2019 +0000
+++ b/sys/arch/zaurus/dev/wm8731_zaudio.c       Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wm8731_zaudio.c,v 1.2.4.1 2019/04/24 13:03:06 isaki Exp $      */
+/*     $NetBSD: wm8731_zaudio.c,v 1.2.4.2 2019/05/04 04:13:23 isaki Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #include "opt_zaudio.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wm8731_zaudio.c,v 1.2.4.1 2019/04/24 13:03:06 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wm8731_zaudio.c,v 1.2.4.2 2019/05/04 04:13:23 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -110,7 +110,6 @@
 static struct audio_hw_if wm8731_hw_if = {
        .open                   = zaudio_open,
        .close                  = zaudio_close,
-       .drain                  = NULL,
        .query_format           = zaudio_query_format,
        .set_format             = zaudio_set_format,
        .round_blocksize        = zaudio_round_blocksize,
@@ -123,7 +122,6 @@
        .halt_input             = wm8731_halt_input,
        .speaker_ctl            = NULL,
        .getdev                 = wm8731_getdev,
-       .setfd                  = NULL,
        .set_port               = wm8731_set_port,
        .get_port               = wm8731_get_port,
        .query_devinfo          = wm8731_query_devinfo,
diff -r d65616fc7272 -r 58dd9561e662 sys/arch/zaurus/dev/wm8750_zaudio.c
--- a/sys/arch/zaurus/dev/wm8750_zaudio.c       Sat May 04 00:40:07 2019 +0000
+++ b/sys/arch/zaurus/dev/wm8750_zaudio.c       Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wm8750_zaudio.c,v 1.2.4.2 2019/04/24 13:03:06 isaki Exp $      */
+/*     $NetBSD: wm8750_zaudio.c,v 1.2.4.3 2019/05/04 04:13:23 isaki Exp $      */
 /*     $OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $ */
 
 /*
@@ -51,7 +51,7 @@
 #include "opt_zaudio.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wm8750_zaudio.c,v 1.2.4.2 2019/04/24 13:03:06 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wm8750_zaudio.c,v 1.2.4.3 2019/05/04 04:13:23 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -130,7 +130,6 @@
 static struct audio_hw_if wm8750_hw_if = {
        .open                   = zaudio_open,
        .close                  = zaudio_close,
-       .drain                  = NULL,
        .query_format           = zaudio_query_format,
        .set_format             = zaudio_set_format,
        .round_blocksize        = zaudio_round_blocksize,
@@ -143,7 +142,6 @@
        .halt_input             = wm8750_halt_input,
        .speaker_ctl            = NULL,
        .getdev                 = wm8750_getdev,
-       .setfd                  = NULL,
        .set_port               = wm8750_set_port,
        .get_port               = wm8750_get_port,
        .query_devinfo          = wm8750_query_devinfo,
diff -r d65616fc7272 -r 58dd9561e662 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sat May 04 00:40:07 2019 +0000
+++ b/sys/dev/audio/audio.c     Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.1.2.5 2019/05/03 06:29:05 isaki Exp $      */
+/*     $NetBSD: audio.c,v 1.1.2.6 2019/05/04 04:13:23 isaki Exp $      */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -103,7 +103,6 @@
  *     ----------------------- ------- ------- -------------------------
  *     open                    x       x +
  *     close                   x       x +
- *     drain                   x       x       (Not used in AUDIO2)
  *     query_format            -       x
  *     set_format              -       x
  *     round_blocksize         -       x
@@ -116,14 +115,12 @@
  *     halt_input              x       x +
  *     speaker_ctl             x       x
  *     getdev                  -       x
- *     setfd                   -       x       (Not used in AUDIO2)
  *     set_port                -       x +
  *     get_port                -       x +
  *     query_devinfo           -       x
  *     allocm                  -       - +     (*1)
  *     freem                   -       - +     (*1)
  *     round_buffersize        -       x
- *     mappage                 -       -       (Not used in AUDIO2)
  *     get_props               -       x
  *     trigger_output          x       x +
  *     trigger_input           x       x +
@@ -152,7 +149,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.1.2.5 2019/05/03 06:29:05 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.1.2.6 2019/05/04 04:13:23 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
diff -r d65616fc7272 -r 58dd9561e662 sys/dev/audio_dai.h
--- a/sys/dev/audio_dai.h       Sat May 04 00:40:07 2019 +0000
+++ b/sys/dev/audio_dai.h       Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio_dai.h,v 1.4.2.1 2019/04/27 10:17:59 isaki Exp $ */
+/* $NetBSD: audio_dai.h,v 1.4.2.2 2019/05/04 04:13:24 isaki Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -138,14 +138,6 @@
 }
 
 static inline int
-audio_dai_drain(audio_dai_tag_t dai)
-{
-       if (!dai->dai_hw_if->drain)
-               return 0;
-       return dai->dai_hw_if->drain(dai->dai_priv);
-}
-
-static inline int
 audio_dai_query_format(audio_dai_tag_t dai, audio_format_query_t *afp)
 {
        if (!dai->dai_hw_if->query_format)
diff -r d65616fc7272 -r 58dd9561e662 sys/dev/audio_if.h
--- a/sys/dev/audio_if.h        Sat May 04 00:40:07 2019 +0000
+++ b/sys/dev/audio_if.h        Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio_if.h,v 1.70.24.3 2019/05/03 05:15:33 isaki Exp $ */
+/*     $NetBSD: audio_if.h,v 1.70.24.4 2019/05/04 04:13:24 isaki Exp $ */
 
 /*
  * Copyright (c) 1994 Havard Eidnes.
@@ -179,9 +179,6 @@
        int     (*open)(void *, int);   /* open hardware */
        void    (*close)(void *);       /* close hardware */
 
-       /* Obsoleted in AUDIO2. */
-       int     (*drain)(void *);       /* Optional: drain buffers */
-
        int     (*query_format)(void *, audio_format_query_t *);
        int     (*set_format)(void *, int,
                    const audio_params_t *, const audio_params_t *,
@@ -216,9 +213,6 @@
 
        int     (*getdev)(void *, struct audio_device *);
 
-       /* Obsoleted in AUDIO2. */
-       int     (*setfd)(void *, int);
-
        /* Mixer (in/out ports) */
        int     (*set_port)(void *, mixer_ctrl_t *);
        int     (*get_port)(void *, mixer_ctrl_t *);
@@ -230,9 +224,6 @@
        void    (*freem)(void *, void *, size_t);
        size_t  (*round_buffersize)(void *, int, size_t);
 
-       /* Obsoleted in AUDIO2. */
-       paddr_t (*mappage)(void *, void *, off_t, int);
-
        int     (*get_props)(void *); /* device properties */
 
        int     (*trigger_output)(void *, void *, void *, int,
diff -r d65616fc7272 -r 58dd9561e662 sys/dev/bluetooth/btsco.c
--- a/sys/dev/bluetooth/btsco.c Sat May 04 00:40:07 2019 +0000
+++ b/sys/dev/bluetooth/btsco.c Sat May 04 04:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: btsco.c,v 1.38.2.2 2019/04/24 13:30:34 isaki Exp $     */
+/*     $NetBSD: btsco.c,v 1.38.2.3 2019/05/04 04:13:24 isaki Exp $     */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.38.2.2 2019/04/24 13:30:34 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.38.2.3 2019/05/04 04:13:24 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -157,7 +157,6 @@
 static int btsco_halt_output(void *);
 static int btsco_halt_input(void *);
 static int btsco_getdev(void *, struct audio_device *);
-static int btsco_setfd(void *, int);
 static int btsco_set_port(void *, mixer_ctrl_t *);
 static int btsco_get_port(void *, mixer_ctrl_t *);
 static int btsco_query_devinfo(void *, mixer_devinfo_t *);
@@ -178,7 +177,6 @@
        .halt_output            = btsco_halt_output,
        .halt_input             = btsco_halt_input,
        .getdev                 = btsco_getdev,
-       .setfd                  = btsco_setfd,
        .set_port               = btsco_set_port,
        .get_port               = btsco_get_port,
        .query_devinfo          = btsco_query_devinfo,
@@ -847,14 +845,6 @@
 }
 
 static int
-btsco_setfd(void *hdl, int fd)
-{
-       DPRINTF("set %s duplex\n", fd ? "full" : "half");
-
-       return 0;
-}
-
-static int
 btsco_set_port(void *hdl, mixer_ctrl_t *mc)



Home | Main Index | Thread Index | Old Index