Commit 47123197 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] hda-intel: Suspend/resume fixes for PCM devices

HDA Intel driver
- removed SNDRV_PCM_INFO_RESUME (the driver cannot do PCM resume at the time)
- fixed chip->pcm_devs initialization
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 5a47fe3c
...@@ -900,8 +900,8 @@ static snd_pcm_hardware_t azx_pcm_hw = { ...@@ -900,8 +900,8 @@ static snd_pcm_hardware_t azx_pcm_hw = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_PAUSE /*|*/
SNDRV_PCM_INFO_RESUME), /*SNDRV_PCM_INFO_RESUME*/),
.formats = SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_LE,
.rates = SNDRV_PCM_RATE_48000, .rates = SNDRV_PCM_RATE_48000,
.rate_min = 48000, .rate_min = 48000,
...@@ -1050,6 +1050,7 @@ static int azx_pcm_trigger(snd_pcm_substream_t *substream, int cmd) ...@@ -1050,6 +1050,7 @@ static int azx_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
azx_dev->running = 1; azx_dev->running = 1;
break; break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH: case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_STOP:
azx_stream_stop(chip, azx_dev); azx_stream_stop(chip, azx_dev);
azx_dev->running = 0; azx_dev->running = 0;
...@@ -1059,6 +1060,7 @@ static int azx_pcm_trigger(snd_pcm_substream_t *substream, int cmd) ...@@ -1059,6 +1060,7 @@ static int azx_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
} }
spin_unlock(&chip->reg_lock); spin_unlock(&chip->reg_lock);
if (cmd == SNDRV_PCM_TRIGGER_PAUSE_PUSH || if (cmd == SNDRV_PCM_TRIGGER_PAUSE_PUSH ||
cmd == SNDRV_PCM_TRIGGER_SUSPEND ||
cmd == SNDRV_PCM_TRIGGER_STOP) { cmd == SNDRV_PCM_TRIGGER_STOP) {
int timeout = 5000; int timeout = 5000;
while (azx_sd_readb(azx_dev, SD_CTL) & SD_CTL_DMA_START && --timeout) while (azx_sd_readb(azx_dev, SD_CTL) & SD_CTL_DMA_START && --timeout)
...@@ -1137,6 +1139,7 @@ static int __devinit create_codec_pcm(azx_t *chip, struct hda_codec *codec, ...@@ -1137,6 +1139,7 @@ static int __devinit create_codec_pcm(azx_t *chip, struct hda_codec *codec,
snd_dma_pci_data(chip->pci), snd_dma_pci_data(chip->pci),
1024 * 64, 1024 * 128); 1024 * 64, 1024 * 128);
chip->pcm[pcm_dev] = pcm; chip->pcm[pcm_dev] = pcm;
chip->pcm_devs = pcm_dev + 1;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment