diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index 0d319b824bef..6d37087f4f3a 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $NetBSD: auich.c,v 1.30 2002/10/12 19:45:54 wiz Exp $ */ +/* $NetBSD: auich.c,v 1.31 2003/01/15 04:49:35 kent Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.30 2002/10/12 19:45:54 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.31 2003/01/15 04:49:35 kent Exp $"); #include #include @@ -265,7 +265,7 @@ int auich_allocmem(struct auich_softc *, size_t, size_t, int auich_freemem(struct auich_softc *, struct auich_dma *); void auich_powerhook(int, void *); -int auich_set_rate(struct auich_softc *, int, u_long*); +int auich_set_rate(struct auich_softc *, int, u_long); void auich_calibrate(struct device *); @@ -649,13 +649,15 @@ auich_query_encoding(void *v, struct audio_encoding *aep) } int -auich_set_rate(struct auich_softc *sc, int mode, u_long* srate) +auich_set_rate(struct auich_softc *sc, int mode, u_long srate) { int reg; + u_long ratetmp; + ratetmp = srate; reg = mode == AUMODE_PLAY ? AC97_REG_PCM_FRONT_DAC_RATE : AC97_REG_PCM_LR_ADC_RATE; - return sc->codec_if->vtbl->set_rate(sc->codec_if, reg, srate); + return sc->codec_if->vtbl->set_rate(sc->codec_if, reg, &ratetmp); } int @@ -774,7 +776,7 @@ auich_set_params(void *v, int setmode, int usemode, struct audio_params *play, p->hw_sample_rate = AC97_SINGLE_RATE; /* If hw_sample_rate is changed, aurateconv works. */ } else { - if (auich_set_rate(sc, mode, &p->sample_rate)) + if (auich_set_rate(sc, mode, p->sample_rate)) return EINVAL; } }