ChangeSet 1.2181.25.10, 2005/03/22 09:00:28+01:00, [EMAIL PROTECTED]
[ALSA] Fix suspend/resume with ATIIXP
ATIIXP driver
Fixed the suspend/resume with ATIIXP driver.
Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
atiixp.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletion(-)
diff -Nru a/sound/pci/atiixp.c b/sound/pci/atiixp.c
--- a/sound/pci/atiixp.c 2005-03-30 16:11:08 -08:00
+++ b/sound/pci/atiixp.c 2005-03-30 16:11:08 -08:00
@@ -250,6 +250,7 @@
int running;
int pcm_open_flag;
int ac97_pcm_type; /* index # of ac97_pcm to access, -1 = not used
*/
+ unsigned int saved_curptr;
};
/*
@@ -1404,8 +1405,12 @@
int i;
for (i = 0; i < NUM_ATI_PCMDEVS; i++)
- if (chip->pcmdevs[i])
+ if (chip->pcmdevs[i]) {
+ atiixp_dma_t *dma = &chip->dmas[i];
+ if (dma->substream && dma->running)
+ dma->saved_curptr = readl(chip->remap_addr +
dma->ops->dt_cur);
snd_pcm_suspend_all(chip->pcmdevs[i]);
+ }
for (i = 0; i < NUM_ATI_CODECS; i++)
if (chip->ac97[i])
snd_ac97_suspend(chip->ac97[i]);
@@ -1432,6 +1437,17 @@
for (i = 0; i < NUM_ATI_CODECS; i++)
if (chip->ac97[i])
snd_ac97_resume(chip->ac97[i]);
+
+ for (i = 0; i < NUM_ATI_PCMDEVS; i++)
+ if (chip->pcmdevs[i]) {
+ atiixp_dma_t *dma = &chip->dmas[i];
+ if (dma->substream && dma->running) {
+ dma->ops->enable_dma(chip, 1);
+ writel((u32)dma->desc_buf.addr |
ATI_REG_LINKPTR_EN,
+ chip->remap_addr + dma->ops->llp_offset);
+ writel(dma->saved_curptr, chip->remap_addr +
dma->ops->dt_cur);
+ }
+ }
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html