Source-Changes-HG archive

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

[src/netbsd-7]: src Pull up following revision(s) (requested by tsutsui in ti...



details:   https://anonhg.NetBSD.org/src/rev/dea643267138
branches:  netbsd-7
changeset: 798306:dea643267138
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 29 11:42:15 2014 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #62):
        sys/arch/hp300/conf/files.hp300: revision 1.89
        share/man/man4/arcofi.4: revision 1.1
        share/man/man4/arcofi.4: revision 1.2
        share/man/man4/Makefile: revision 1.617
        sys/arch/hp300/hp300/intr.c: revision 1.41
        sys/conf/files: revision 1.1100
        sys/arch/hp300/hp300/locore.s: revision 1.171
        distrib/sets/lists/man/mi: revision 1.1486
        sys/dev/ic/arcofivar.h: revision 1.1
        sys/arch/hp300/conf/majors.hp300: revision 1.26
        sys/arch/hp300/dev/arcofi_dio.c: revision 1.1
        sys/arch/hp300/conf/GENERIC: revision 1.188
        sys/dev/ic/arcofi.c: revision 1.1
Add new arcofi(4) audio driver for NetBSD/hp300, ported from OpenBSD.
The arcofi(4) is a driver for the HP "Audio1" device
(Siemens PSB 2160 "ARCOFI" phone quality audio chip)
found on the HP9000/425e and HP9000/{705,710,745,747} models
(but only hp300 attachment is ported for now).
The chip supports 8-bit mono 8kHz U-law, A-law and
16-bit mono slinear_be formats.
The old HP9000/425e playing tunes with this new arcofi(4) audio driver
was also demonstrated at Open Source Conference 2014 Shimane.
Add a man page for arcofi(4) driver.  From OpenBSD.
Fix date.

diffstat:

 distrib/sets/lists/man/mi        |     5 +-
 share/man/man4/Makefile          |     4 +-
 share/man/man4/arcofi.4          |   102 +++
 sys/arch/hp300/conf/GENERIC      |     8 +-
 sys/arch/hp300/conf/files.hp300  |     6 +-
 sys/arch/hp300/conf/majors.hp300 |     3 +-
 sys/arch/hp300/dev/arcofi_dio.c  |    94 ++
 sys/arch/hp300/hp300/intr.c      |    12 +-
 sys/arch/hp300/hp300/locore.s    |     9 +-
 sys/conf/files                   |     6 +-
 sys/dev/ic/arcofi.c              |  1274 ++++++++++++++++++++++++++++++++++++++
 sys/dev/ic/arcofivar.h           |    56 +
 12 files changed, 1568 insertions(+), 11 deletions(-)

diffs (truncated from 1749 to 300 lines):

diff -r 71ab0e00bcef -r dea643267138 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Fri Aug 29 11:37:51 2014 +0000
+++ b/distrib/sets/lists/man/mi Fri Aug 29 11:42:15 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1485 2014/08/09 11:33:53 apb Exp $
+# $NetBSD: mi,v 1.1485.2.1 2014/08/29 11:42:15 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -826,6 +826,7 @@
 ./usr/share/man/cat4/aps.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/arc/intro.0               man-sys-catman          .cat
 ./usr/share/man/cat4/arcmsr.0                  man-sys-catman          .cat
+./usr/share/man/cat4/arcofi.0                  man-sys-catman          .cat
 ./usr/share/man/cat4/aria.0                    man-sys-catman          .cat
 ./usr/share/man/cat4/arm26/arckbd.0            man-obsolete            obsolete
 ./usr/share/man/cat4/arm26/arcwskbd.0          man-obsolete            obsolete
@@ -3911,6 +3912,7 @@
 ./usr/share/man/html4/aps.html                 man-sys-htmlman         html
 ./usr/share/man/html4/arc/intro.html           man-sys-htmlman         html
 ./usr/share/man/html4/arcmsr.html              man-sys-htmlman         html
+./usr/share/man/html4/arcofi.html              man-sys-htmlman         html
 ./usr/share/man/html4/aria.html                        man-sys-htmlman         html
 ./usr/share/man/html4/arp.html                 man-sys-htmlman         html
 ./usr/share/man/html4/artsata.html             man-sys-htmlman         html
@@ -6691,6 +6693,7 @@
 ./usr/share/man/man4/aps.4                     man-sys-man             .man
 ./usr/share/man/man4/arc/intro.4               man-sys-man             .man
 ./usr/share/man/man4/arcmsr.4                  man-sys-man             .man
+./usr/share/man/man4/arcofi.4                  man-sys-man             .man
 ./usr/share/man/man4/aria.4                    man-sys-man             .man
 ./usr/share/man/man4/arm26/arckbd.4            man-obsolete            obsolete
 ./usr/share/man/man4/arm26/arcwskbd.4          man-obsolete            obsolete
diff -r 71ab0e00bcef -r dea643267138 share/man/man4/Makefile
--- a/share/man/man4/Makefile   Fri Aug 29 11:37:51 2014 +0000
+++ b/share/man/man4/Makefile   Fri Aug 29 11:42:15 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.616 2014/07/24 21:08:50 alnsn Exp $
+#      $NetBSD: Makefile,v 1.616.2.1 2014/08/29 11:42:15 martin Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -7,7 +7,7 @@
        ahcisata.4 ahd.4 \
        aibs.4 alc.4 ale.4 alipm.4 altmem.4 altq.4 amdpm.4 amdtemp.4 amhphy.4 \
        amr.4 aps.4 asus.4 \
-       an.4 arcmsr.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \
+       an.4 arcmsr.4 arcofi.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \
        ath.4 athn.4 atphy.4 atppc.4 attimer.4 atw.4 \
        auacer.4 audio.4 audiocs.4 auich.4 \
        auixp.4 autri.4 auvia.4 awi.4 azalia.4 \
diff -r 71ab0e00bcef -r dea643267138 share/man/man4/arcofi.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/arcofi.4   Fri Aug 29 11:42:15 2014 +0000
@@ -0,0 +1,102 @@
+.\"    $NetBSD: arcofi.4,v 1.2.2.2 2014/08/29 11:42:15 martin Exp $
+.\"    $OpenBSD: arcofi.4,v 1.4 2011/12/27 10:28:35 jmc Exp $
+.\"
+.\"
+.\" Copyright (c) 2011 Miodrag Vallat.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd August 25, 2014
+.Dt ARCOFI 4
+.Os
+.Sh NAME
+.Nm arcofi
+.Nd Siemens PSB2160 audio codec
+.Sh SYNOPSIS
+.Cd "arcofi* at dio?"
+.\" .Cd "arcofi* at gsc?"
+.Cd "audio*  at audiobus?"
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the HP
+.Dq Audio1
+audio devices, based upon the Siemens PSB2160
+.Dq ARCOFI
+codec, to implement the audio device interface described in
+.Xr audio 4 .
+.Pp
+This device is found onboard HP 9000 workstations models 425e, 705 and 710.
+.Pp
+The
+.Nm
+is limited to a phone-quality mono, 8000 Hz sound.
+.Ss AUDIOCTL SETTINGS
+The following encodings are supported:
+.Pp
+.Bl -tag -width AUDIO_ENCODING_SLINEAR_BE -offset indent -compact
+.It Li AUDIO_ENCODING_ULAW
+.It Li AUDIO_ENCODING_ALAW
+.It Li AUDIO_ENCODING_SLINEAR_BE
+Natively supported.
+.Pp
+.It Li AUDIO_ENCODING_SLINEAR
+.It Li AUDIO_ENCODING_SLINEAR_LE
+.It Li AUDIO_ENCODING_ULINEAR_LE
+.It Li AUDIO_ENCODING_ULINEAR_BE
+Software converted to
+.Li AUDIO_ENCODING_SLINEAR_BE
+encoding.
+.El
+.Ss MIXERCTL SETTINGS
+The
+.Nm
+has three audio ports:
+.Pp
+.Bl -tag -width "outputs.lineXXX" -offset indent -compact
+.It Cm inputs.line
+The
+.Sq line in
+jack connector.
+.It Cm outputs.line
+The
+.Sq line out
+jack connector.
+.It Cm outputs.speaker
+The built-in speaker.
+.El
+.Pp
+Each port has a volume control, and can be muted.
+.Pp
+The
+.Cm outputs.line
+and
+.Cm outputs.speaker
+volume settings are tied to the same hardware setting.
+.Sh SEE ALSO
+.Xr audioctl 1 ,
+.Xr mixerctl 1 ,
+.Xr ioctl 2 ,
+.Xr audio 4 ,
+.Xr dio 4 ,
+.\" .Xr gsc 4 ,
+.Xr intro 4
+.Sh HISTORY
+The
+.Nm
+driver was written for
+.Ox
+and first appeared in
+.Ox 5.1 ,
+and was ported to
+.Nx .
diff -r 71ab0e00bcef -r dea643267138 sys/arch/hp300/conf/GENERIC
--- a/sys/arch/hp300/conf/GENERIC       Fri Aug 29 11:37:51 2014 +0000
+++ b/sys/arch/hp300/conf/GENERIC       Fri Aug 29 11:42:15 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.184 2014/07/18 17:59:12 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.184.2.1 2014/08/29 11:42:15 martin Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.184 $"
+#ident                 "GENERIC-$Revision: 1.184.2.1 $"
 
 makeoptions    COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
 
@@ -279,6 +279,10 @@
 ss*            at scsibus? target ? lun ?      # SCSI scanners
 uk*            at scsibus? target ? lun ?      # unknown SCSI devices
 
+# 425e digital audio
+arcofi*        at dio? scode ?
+audio*         at arcofi?
+
 #
 # Pseudo-devices
 #
diff -r 71ab0e00bcef -r dea643267138 sys/arch/hp300/conf/files.hp300
--- a/sys/arch/hp300/conf/files.hp300   Fri Aug 29 11:37:51 2014 +0000
+++ b/sys/arch/hp300/conf/files.hp300   Fri Aug 29 11:42:15 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.hp300,v 1.88 2014/04/20 04:12:54 tsutsui Exp $
+#      $NetBSD: files.hp300,v 1.88.2.1 2014/08/29 11:42:15 martin Exp $
 #
 # hp300-specific configuration info
 
@@ -147,6 +147,10 @@
 attach le at dio: le24
 file   arch/hp300/dev/if_le.c          le
 
+# 425e digital audio
+attach arcofi at dio with arcofi_dio
+file   arch/hp300/dev/arcofi_dio.c     arcofi_dio
+
 # HP-IB interfaces
 define hpibdev { }
 
diff -r 71ab0e00bcef -r dea643267138 sys/arch/hp300/conf/majors.hp300
--- a/sys/arch/hp300/conf/majors.hp300  Fri Aug 29 11:37:51 2014 +0000
+++ b/sys/arch/hp300/conf/majors.hp300  Fri Aug 29 11:42:15 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: majors.hp300,v 1.25 2011/06/30 20:09:30 wiz Exp $
+#      $NetBSD: majors.hp300,v 1.25.28.1 2014/08/29 11:42:15 martin Exp $
 #
 # Device majors for hp300
 #
@@ -48,6 +48,7 @@
 device-major   ss              char 49                 ss
 device-major   uk              char 50                 uk
 device-major   ses             char 51                 ses
+device-major   audio           char 52                 audio
 
 device-major   nsmb            char 98                 nsmb
 
diff -r 71ab0e00bcef -r dea643267138 sys/arch/hp300/dev/arcofi_dio.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hp300/dev/arcofi_dio.c   Fri Aug 29 11:42:15 2014 +0000
@@ -0,0 +1,94 @@
+/*     $NetBSD: arcofi_dio.c,v 1.1.2.2 2014/08/29 11:42:15 martin Exp $        */
+/*     $OpenBSD: arcofi_dio.c,v 1.1 2011/12/21 23:12:03 miod Exp $     */
+
+/*
+ * Copyright (c) 2011 Miodrag Vallat.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/bus.h>
+#include <sys/intr.h>
+
+#include <sys/audioio.h>
+#include <dev/audio_if.h>
+#include <dev/ic/arcofivar.h>
+
+#include <hp300/dev/dioreg.h>
+#include <hp300/dev/diovar.h>
+
+#include <hp300/dev/diodevs.h>
+
+#define SOFTINT_AUDIO  SOFTINT_SERIAL  /* XXX */
+
+static void    arcofi_dio_attach(device_t, device_t, void *);
+static int     arcofi_dio_match(device_t, cfdata_t, void *);
+
+struct arcofi_dio_softc {
+       struct arcofi_softc     sc_arcofi;
+
+       struct bus_space_tag sc_tag;
+};
+
+CFATTACH_DECL_NEW(arcofi_dio, sizeof(struct arcofi_dio_softc),
+    arcofi_dio_match, arcofi_dio_attach, NULL, NULL);
+
+static int
+arcofi_dio_match(device_t parent, cfdata_t match, void *aux)
+{
+       struct dio_attach_args *da = aux;
+
+       if (da->da_id != DIO_DEVICE_ID_AUDIO)
+               return 0;
+
+       return 1;
+}
+
+static void
+arcofi_dio_attach(device_t parent, device_t self, void *aux)
+{
+       struct arcofi_dio_softc *adsc = device_private(self);
+       struct arcofi_softc *sc = &adsc->sc_arcofi;
+       struct dio_attach_args *da = aux;
+       bus_space_tag_t iot = &adsc->sc_tag;
+       int ipl;
+
+       sc->sc_dev = self;
+
+       /* XXX is it better to use sc->sc_reg[] to handle odd sparse map? */
+       memcpy(iot, da->da_bst, sizeof(struct bus_space_tag));



Home | Main Index | Thread Index | Old Index