diff options
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r-- | sys/arch/macppc/dev/snapper.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/snapper.c b/sys/arch/macppc/dev/snapper.c index f2611b19acd..478a4f32158 100644 --- a/sys/arch/macppc/dev/snapper.c +++ b/sys/arch/macppc/dev/snapper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snapper.c,v 1.16 2005/05/26 22:51:50 drahn Exp $ */ +/* $OpenBSD: snapper.c,v 1.17 2005/10/07 03:47:31 drahn Exp $ */ /* $NetBSD: snapper.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */ /*- @@ -1098,6 +1098,9 @@ snapper_set_volume(sc, left, right) // SCLK = MCLK / sdiv // rate = SCLK / 64 ( = LRCLK = fs) +void keylargo_fcr_enable(int offset, u_int32_t bits); +void keylargo_fcr_disable(int offset, u_int32_t bits); + int snapper_set_rate(sc, rate) struct snapper_softc *sc; @@ -1177,9 +1180,15 @@ snapper_set_rate(sc, rate) in32rb(sc->sc_reg + I2S_WORDSIZE), 0x02000200)); out32rb(sc->sc_reg + I2S_WORDSIZE, 0x02000200); +#define I2SClockOffset 0x3C +#define I2SClockEnable (0x00000001<<12) + + keylargo_fcr_disable(I2SClockOffset, I2SClockEnable); + delay(10000); /* XXX - should wait for clock to stop */ DPRINTF(("I2SSetSerialFormatReg 0x%x -> 0x%x\n", in32rb(sc->sc_reg + I2S_FORMAT), reg)); out32rb(sc->sc_reg + I2S_FORMAT, reg); + keylargo_fcr_enable(I2SClockOffset, I2SClockEnable); sc->sc_rate = rate; |