From 20e972fc97f2c4f01e6e0a03315aebccb77d313c Mon Sep 17 00:00:00 2001 From: mglocker Date: Sat, 2 Jul 2016 16:28:50 +0000 Subject: [PATCH] Get 'AOAShasta' soundchip working found on PowerMac9,1. ok deraadt --- share/man/man4/man4.macppc/aoa.4 | 6 ++++-- sys/arch/macppc/dev/aoa.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/share/man/man4/man4.macppc/aoa.4 b/share/man/man4/man4.macppc/aoa.4 index 41b5518f382..a70ae8c4386 100644 --- a/share/man/man4/man4.macppc/aoa.4 +++ b/share/man/man4/man4.macppc/aoa.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: aoa.4,v 1.8 2015/01/15 20:37:36 schwarze Exp $ +.\" $OpenBSD: aoa.4,v 1.9 2016/07/02 16:28:50 mglocker Exp $ .\" .\" Copyright (c) 2005 Joris Vink. .\" Copyright (c) 2004 Dale Rahn. @@ -25,7 +25,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd $Mdocdate: January 15 2015 $ +.Dd $Mdocdate: July 2 2016 $ .Dt AOA 4 macppc .Os .Sh NAME @@ -50,6 +50,8 @@ PowerBook5,4 .It PowerMac7,3 .It +PowerMac9,1 +.It PowerMac10,1 .It PowerMac10,2 diff --git a/sys/arch/macppc/dev/aoa.c b/sys/arch/macppc/dev/aoa.c index 3204107a1c4..990104f46c5 100644 --- a/sys/arch/macppc/dev/aoa.c +++ b/sys/arch/macppc/dev/aoa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aoa.c,v 1.6 2010/02/26 21:52:14 jasper Exp $ */ +/* $OpenBSD: aoa.c,v 1.7 2016/07/02 16:28:50 mglocker Exp $ */ /*- * Copyright (c) 2005 Tsubai Masanari. All rights reserved. @@ -55,6 +55,7 @@ int aoa_getdev(void *, struct audio_device *); int aoa_match(struct device *, void *, void *); void aoa_attach(struct device *, struct device *, void *); +void aoa_defer(struct device *); void aoa_set_volume(struct aoa_softc *, int, int); void aoa_get_default_params(void *, int, struct audio_params *); @@ -123,6 +124,8 @@ aoa_match(struct device *parent, void *match, void *aux) return (1); if (strcmp(compat, "AOAK2") == 0) return (1); + if (strcmp(compat, "AOAShasta") == 0) + return (1); return (0); } @@ -135,7 +138,16 @@ aoa_attach(struct device *parent, struct device *self, void *aux) sc->sc_setvolume = aoa_set_volume; i2s_attach(parent, sc, aux); + config_defer(self, aoa_defer); +} + +void +aoa_defer(struct device *dev) +{ + struct aoa_softc *sc = (struct aoa_softc *)dev; + audio_attach_mi(&aoa_hw_if, sc, &sc->sc_dev); + deq_reset(sc); } int -- 2.20.1