diff options
author | tanimura <tanimura@FreeBSD.org> | 2000-01-23 07:04:02 +0000 |
---|---|---|
committer | tanimura <tanimura@FreeBSD.org> | 2000-01-23 07:04:02 +0000 |
commit | 5ecc620e52c82ff8a4617b8355920319eb28dc8d (patch) | |
tree | 6369884117130721d7baec2de364c530076f8dc8 /sys/dev/sound/pci/csapcm.c | |
parent | 8c7a346e6849336e59b7e5564130b909fb19fca5 (diff) | |
download | FreeBSD-src-5ecc620e52c82ff8a4617b8355920319eb28dc8d.zip FreeBSD-src-5ecc620e52c82ff8a4617b8355920319eb28dc8d.tar.gz |
The pointer of the serial FIFO in the DSP seems to make an error
upon starting/stopping the DSP. Correct the pointer in addition
to clearing the FIFO.
Diffstat (limited to 'sys/dev/sound/pci/csapcm.c')
-rw-r--r-- | sys/dev/sound/pci/csapcm.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index 571f877..1388924 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -447,10 +447,18 @@ csa_stopplaydma(struct csa_info *csa) csa->pctl = ul & 0xffff0000; csa_writemem(resp, BA1_PCTL, ul & 0x0000ffff); csa_writemem(resp, BA1_PVOL, 0xffffffff); - - /* Clear the serial fifos. */ - csa_clearserialfifos(resp); csa->pch.dma = 0; + + /* + * The bitwise pointer of the serial FIFO in the DSP + * seems to make an error upon starting or stopping the + * DSP. Clear the FIFO and correct the pointer if we + * are not capturing. + */ + if (!csa->rch.dma) { + csa_clearserialfifos(resp); + csa_writeio(resp, BA0_SERBSP, 0); + } } } @@ -467,6 +475,17 @@ csa_stopcapturedma(struct csa_info *csa) csa_writemem(resp, BA1_CCTL, ul & 0xffff0000); csa_writemem(resp, BA1_CVOL, 0xffffffff); csa->rch.dma = 0; + + /* + * The bitwise pointer of the serial FIFO in the DSP + * seems to make an error upon starting or stopping the + * DSP. Clear the FIFO and correct the pointer if we + * are not playing. + */ + if (!csa->pch.dma) { + csa_clearserialfifos(resp); + csa_writeio(resp, BA0_SERBSP, 0); + } } } |