powerhook fixes, from thorpej, tested by me. Thinkpad T20 sound now perfect.
This commit is contained in:
parent
3bb7b7df87
commit
674a20f8fb
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cs4280.c,v 1.10 2001/01/15 22:28:20 perry Exp $ */
|
||||
/* $NetBSD: cs4280.c,v 1.11 2001/01/15 23:25:39 perry Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved.
|
||||
@ -158,7 +158,6 @@ struct cs4280_softc {
|
||||
|
||||
char sc_suspend;
|
||||
void *sc_powerhook; /* Power Hook */
|
||||
u_int16_t ac97_reg[CS4280_SAVE_REG_MAX + 1]; /* Save ac97 registers */
|
||||
};
|
||||
|
||||
#define BA0READ4(sc, r) bus_space_read_4((sc)->ba0t, (sc)->ba0h, (r))
|
||||
@ -1782,7 +1781,6 @@ cs4280_power(why, v)
|
||||
void *v;
|
||||
{
|
||||
struct cs4280_softc *sc = (struct cs4280_softc *)v;
|
||||
int i;
|
||||
|
||||
DPRINTF(("%s: cs4280_power why=%d\n",
|
||||
sc->sc_dev.dv_xname, why));
|
||||
@ -1793,12 +1791,6 @@ cs4280_power(why, v)
|
||||
|
||||
cs4280_halt_output(sc);
|
||||
cs4280_halt_input(sc);
|
||||
/* Save AC97 registers */
|
||||
for(i = 1; i <= CS4280_SAVE_REG_MAX; i++) {
|
||||
if(i == 0x04) /* AC97_REG_MASTER_TONE */
|
||||
continue;
|
||||
cs4280_read_codec(sc, 2*i, &sc->ac97_reg[i]);
|
||||
}
|
||||
/* should I powerdown here ? */
|
||||
cs4280_write_codec(sc, AC97_REG_POWER, CS4280_POWER_DOWN_ALL);
|
||||
break;
|
||||
@ -1812,12 +1804,7 @@ cs4280_power(why, v)
|
||||
cs4280_init(sc, 0);
|
||||
cs4280_reset_codec(sc);
|
||||
|
||||
/* restore ac97 registers */
|
||||
for(i = 1; i <= CS4280_SAVE_REG_MAX; i++) {
|
||||
if(i == 0x04) /* AC97_REG_MASTER_TONE */
|
||||
continue;
|
||||
cs4280_write_codec(sc, 2*i, sc->ac97_reg[i >> 1]);
|
||||
}
|
||||
(*sc->codec_if->vtbl->restore_ports)(sc->codec_if);
|
||||
break;
|
||||
case PWR_SOFTSUSPEND:
|
||||
case PWR_SOFTSTANDBY:
|
||||
|
Loading…
Reference in New Issue
Block a user