ALSA: via82xx - ignore buffer preallocation errors
The errors at buffer preallocations aren't fatal and safe to ignore. The buffer will be allocated dynamically when opened. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
fc4abee811
commit
a2e3961d0a
|
@ -1401,10 +1401,9 @@ static int __devinit snd_via8233_pcm_new(struct via82xx *chip)
|
|||
/* capture */
|
||||
init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1);
|
||||
|
||||
if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024)) < 0)
|
||||
return err;
|
||||
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024);
|
||||
|
||||
/* PCM #1: multi-channel playback and 2nd capture */
|
||||
err = snd_pcm_new(chip->card, chip->card->shortname, 1, 1, 1, &pcm);
|
||||
|
@ -1420,11 +1419,9 @@ static int __devinit snd_via8233_pcm_new(struct via82xx *chip)
|
|||
/* set up capture */
|
||||
init_viadev(chip, chip->capture_devno + 1, VIA_REG_CAPTURE_8233_STATUS + 0x10, 7, 1);
|
||||
|
||||
if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024)) < 0)
|
||||
return err;
|
||||
|
||||
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1456,10 +1453,9 @@ static int __devinit snd_via8233a_pcm_new(struct via82xx *chip)
|
|||
/* capture */
|
||||
init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1);
|
||||
|
||||
if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024)) < 0)
|
||||
return err;
|
||||
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024);
|
||||
|
||||
/* SPDIF supported? */
|
||||
if (! ac97_can_spdif(chip->ac97))
|
||||
|
@ -1476,11 +1472,9 @@ static int __devinit snd_via8233a_pcm_new(struct via82xx *chip)
|
|||
/* set up playback */
|
||||
init_viadev(chip, chip->playback_devno, 0x30, 3, 0);
|
||||
|
||||
if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024)) < 0)
|
||||
return err;
|
||||
|
||||
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1508,11 +1502,9 @@ static int __devinit snd_via686_pcm_new(struct via82xx *chip)
|
|||
init_viadev(chip, 0, VIA_REG_PLAYBACK_STATUS, 0, 0);
|
||||
init_viadev(chip, 1, VIA_REG_CAPTURE_STATUS, 0, 1);
|
||||
|
||||
if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024)) < 0)
|
||||
return err;
|
||||
|
||||
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
64*1024, 128*1024);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue