aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2005-08-15 14:53:07 -0400
committerJaroslav Kysela <perex@suse.cz>2005-08-30 02:46:15 -0400
commit47123197c5522f4ae3dc5914e7832dd047f9ddc8 (patch)
tree1b7938b8755ca012f2b7878df49b2b55c1584c2d
parent5a47fe3c5e8f394fb1578bbe8117f3dcc250b6fd (diff)
[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: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--sound/pci/hda/hda_intel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 2b6bd3139b86..58e15b8896ac 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -900,8 +900,8 @@ static snd_pcm_hardware_t azx_pcm_hw = {
900 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 900 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
901 SNDRV_PCM_INFO_BLOCK_TRANSFER | 901 SNDRV_PCM_INFO_BLOCK_TRANSFER |
902 SNDRV_PCM_INFO_MMAP_VALID | 902 SNDRV_PCM_INFO_MMAP_VALID |
903 SNDRV_PCM_INFO_PAUSE | 903 SNDRV_PCM_INFO_PAUSE /*|*/
904 SNDRV_PCM_INFO_RESUME), 904 /*SNDRV_PCM_INFO_RESUME*/),
905 .formats = SNDRV_PCM_FMTBIT_S16_LE, 905 .formats = SNDRV_PCM_FMTBIT_S16_LE,
906 .rates = SNDRV_PCM_RATE_48000, 906 .rates = SNDRV_PCM_RATE_48000,
907 .rate_min = 48000, 907 .rate_min = 48000,
@@ -1050,6 +1050,7 @@ static int azx_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
1050 azx_dev->running = 1; 1050 azx_dev->running = 1;
1051 break; 1051 break;
1052 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 1052 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
1053 case SNDRV_PCM_TRIGGER_SUSPEND:
1053 case SNDRV_PCM_TRIGGER_STOP: 1054 case SNDRV_PCM_TRIGGER_STOP:
1054 azx_stream_stop(chip, azx_dev); 1055 azx_stream_stop(chip, azx_dev);
1055 azx_dev->running = 0; 1056 azx_dev->running = 0;
@@ -1059,6 +1060,7 @@ static int azx_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
1059 } 1060 }
1060 spin_unlock(&chip->reg_lock); 1061 spin_unlock(&chip->reg_lock);
1061 if (cmd == SNDRV_PCM_TRIGGER_PAUSE_PUSH || 1062 if (cmd == SNDRV_PCM_TRIGGER_PAUSE_PUSH ||
1063 cmd == SNDRV_PCM_TRIGGER_SUSPEND ||
1062 cmd == SNDRV_PCM_TRIGGER_STOP) { 1064 cmd == SNDRV_PCM_TRIGGER_STOP) {
1063 int timeout = 5000; 1065 int timeout = 5000;
1064 while (azx_sd_readb(azx_dev, SD_CTL) & SD_CTL_DMA_START && --timeout) 1066 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 snd_dma_pci_data(chip->pci), 1139 snd_dma_pci_data(chip->pci),
1138 1024 * 64, 1024 * 128); 1140 1024 * 64, 1024 * 128);
1139 chip->pcm[pcm_dev] = pcm; 1141 chip->pcm[pcm_dev] = pcm;
1142 chip->pcm_devs = pcm_dev + 1;
1140 1143
1141 return 0; 1144 return 0;
1142} 1145}