diff options
Diffstat (limited to 'sound/pci/atiixp.c')
-rw-r--r-- | sound/pci/atiixp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index cafab4af5c57..904d17394e1c 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -248,6 +248,7 @@ struct snd_atiixp_dma { | |||
248 | unsigned int period_bytes, periods; | 248 | unsigned int period_bytes, periods; |
249 | int opened; | 249 | int opened; |
250 | int running; | 250 | int running; |
251 | int suspended; | ||
251 | int pcm_open_flag; | 252 | int pcm_open_flag; |
252 | int ac97_pcm_type; /* index # of ac97_pcm to access, -1 = not used */ | 253 | int ac97_pcm_type; /* index # of ac97_pcm to access, -1 = not used */ |
253 | unsigned int saved_curptr; | 254 | unsigned int saved_curptr; |
@@ -699,12 +700,18 @@ static int snd_atiixp_pcm_trigger(snd_pcm_substream_t *substream, int cmd) | |||
699 | spin_lock(&chip->reg_lock); | 700 | spin_lock(&chip->reg_lock); |
700 | switch (cmd) { | 701 | switch (cmd) { |
701 | case SNDRV_PCM_TRIGGER_START: | 702 | case SNDRV_PCM_TRIGGER_START: |
703 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | ||
704 | case SNDRV_PCM_TRIGGER_RESUME: | ||
702 | dma->ops->enable_transfer(chip, 1); | 705 | dma->ops->enable_transfer(chip, 1); |
703 | dma->running = 1; | 706 | dma->running = 1; |
707 | dma->suspended = 0; | ||
704 | break; | 708 | break; |
705 | case SNDRV_PCM_TRIGGER_STOP: | 709 | case SNDRV_PCM_TRIGGER_STOP: |
710 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | ||
711 | case SNDRV_PCM_TRIGGER_SUSPEND: | ||
706 | dma->ops->enable_transfer(chip, 0); | 712 | dma->ops->enable_transfer(chip, 0); |
707 | dma->running = 0; | 713 | dma->running = 0; |
714 | dma->suspended = cmd == SNDRV_PCM_TRIGGER_SUSPEND; | ||
708 | break; | 715 | break; |
709 | default: | 716 | default: |
710 | err = -EINVAL; | 717 | err = -EINVAL; |
@@ -975,6 +982,7 @@ static snd_pcm_hardware_t snd_atiixp_pcm_hw = | |||
975 | { | 982 | { |
976 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 983 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
977 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 984 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
985 | SNDRV_PCM_INFO_PAUSE | | ||
978 | SNDRV_PCM_INFO_RESUME | | 986 | SNDRV_PCM_INFO_RESUME | |
979 | SNDRV_PCM_INFO_MMAP_VALID), | 987 | SNDRV_PCM_INFO_MMAP_VALID), |
980 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, | 988 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, |
@@ -1443,7 +1451,7 @@ static int snd_atiixp_resume(snd_card_t *card) | |||
1443 | for (i = 0; i < NUM_ATI_PCMDEVS; i++) | 1451 | for (i = 0; i < NUM_ATI_PCMDEVS; i++) |
1444 | if (chip->pcmdevs[i]) { | 1452 | if (chip->pcmdevs[i]) { |
1445 | atiixp_dma_t *dma = &chip->dmas[i]; | 1453 | atiixp_dma_t *dma = &chip->dmas[i]; |
1446 | if (dma->substream && dma->running) { | 1454 | if (dma->substream && dma->suspended) { |
1447 | dma->ops->enable_dma(chip, 1); | 1455 | dma->ops->enable_dma(chip, 1); |
1448 | writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, | 1456 | writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, |
1449 | chip->remap_addr + dma->ops->llp_offset); | 1457 | chip->remap_addr + dma->ops->llp_offset); |