This diff makes audio work on my G5 PowerMac9,1:

        aoa0 at macobio0 offset 0x0: irq 28,11,12
        audio0 at aoa0

Whether a hw reset is required by deq_reset() will be decided by
i2s_gpio_init().

ok?


Index: sys/arch/macppc/dev/aoa.c
===================================================================
RCS file: /cvs/src/sys/arch/macppc/dev/aoa.c,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 aoa.c
--- sys/arch/macppc/dev/aoa.c   26 Feb 2010 21:52:14 -0000      1.6
+++ sys/arch/macppc/dev/aoa.c   1 Jul 2016 22:40:26 -0000
@@ -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 *m
                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
        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
Index: share/man/man4/man4.macppc/aoa.4
===================================================================
RCS file: /cvs/src/share/man/man4/man4.macppc/aoa.4,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 aoa.4
--- share/man/man4/man4.macppc/aoa.4    15 Jan 2015 20:37:36 -0000      1.8
+++ share/man/man4/man4.macppc/aoa.4    1 Jul 2016 22:40:26 -0000
@@ -50,6 +50,8 @@ PowerBook5,4
 .It
 PowerMac7,3
 .It
+PowerMac9,1
+.It
 PowerMac10,1
 .It
 PowerMac10,2

Reply via email to