diff options
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r-- | sound/pci/via82xx.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 8766848bbe68..57e33d7df5fa 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -1401,10 +1401,9 @@ static int __devinit snd_via8233_pcm_new(struct via82xx *chip) | |||
1401 | /* capture */ | 1401 | /* capture */ |
1402 | init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1); | 1402 | init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1); |
1403 | 1403 | ||
1404 | if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, | 1404 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, |
1405 | snd_dma_pci_data(chip->pci), | 1405 | snd_dma_pci_data(chip->pci), |
1406 | 64*1024, 128*1024)) < 0) | 1406 | 64*1024, 128*1024); |
1407 | return err; | ||
1408 | 1407 | ||
1409 | /* PCM #1: multi-channel playback and 2nd capture */ | 1408 | /* PCM #1: multi-channel playback and 2nd capture */ |
1410 | err = snd_pcm_new(chip->card, chip->card->shortname, 1, 1, 1, &pcm); | 1409 | 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) | |||
1420 | /* set up capture */ | 1419 | /* set up capture */ |
1421 | init_viadev(chip, chip->capture_devno + 1, VIA_REG_CAPTURE_8233_STATUS + 0x10, 7, 1); | 1420 | init_viadev(chip, chip->capture_devno + 1, VIA_REG_CAPTURE_8233_STATUS + 0x10, 7, 1); |
1422 | 1421 | ||
1423 | if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, | 1422 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, |
1424 | snd_dma_pci_data(chip->pci), | 1423 | snd_dma_pci_data(chip->pci), |
1425 | 64*1024, 128*1024)) < 0) | 1424 | 64*1024, 128*1024); |
1426 | return err; | ||
1427 | |||
1428 | return 0; | 1425 | return 0; |
1429 | } | 1426 | } |
1430 | 1427 | ||
@@ -1456,10 +1453,9 @@ static int __devinit snd_via8233a_pcm_new(struct via82xx *chip) | |||
1456 | /* capture */ | 1453 | /* capture */ |
1457 | init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1); | 1454 | init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1); |
1458 | 1455 | ||
1459 | if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, | 1456 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, |
1460 | snd_dma_pci_data(chip->pci), | 1457 | snd_dma_pci_data(chip->pci), |
1461 | 64*1024, 128*1024)) < 0) | 1458 | 64*1024, 128*1024); |
1462 | return err; | ||
1463 | 1459 | ||
1464 | /* SPDIF supported? */ | 1460 | /* SPDIF supported? */ |
1465 | if (! ac97_can_spdif(chip->ac97)) | 1461 | if (! ac97_can_spdif(chip->ac97)) |
@@ -1476,11 +1472,9 @@ static int __devinit snd_via8233a_pcm_new(struct via82xx *chip) | |||
1476 | /* set up playback */ | 1472 | /* set up playback */ |
1477 | init_viadev(chip, chip->playback_devno, 0x30, 3, 0); | 1473 | init_viadev(chip, chip->playback_devno, 0x30, 3, 0); |
1478 | 1474 | ||
1479 | if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, | 1475 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, |
1480 | snd_dma_pci_data(chip->pci), | 1476 | snd_dma_pci_data(chip->pci), |
1481 | 64*1024, 128*1024)) < 0) | 1477 | 64*1024, 128*1024) |
1482 | return err; | ||
1483 | |||
1484 | return 0; | 1478 | return 0; |
1485 | } | 1479 | } |
1486 | 1480 | ||
@@ -1508,11 +1502,9 @@ static int __devinit snd_via686_pcm_new(struct via82xx *chip) | |||
1508 | init_viadev(chip, 0, VIA_REG_PLAYBACK_STATUS, 0, 0); | 1502 | init_viadev(chip, 0, VIA_REG_PLAYBACK_STATUS, 0, 0); |
1509 | init_viadev(chip, 1, VIA_REG_CAPTURE_STATUS, 0, 1); | 1503 | init_viadev(chip, 1, VIA_REG_CAPTURE_STATUS, 0, 1); |
1510 | 1504 | ||
1511 | if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, | 1505 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, |
1512 | snd_dma_pci_data(chip->pci), | 1506 | snd_dma_pci_data(chip->pci), |
1513 | 64*1024, 128*1024)) < 0) | 1507 | 64*1024, 128*1024); |
1514 | return err; | ||
1515 | |||
1516 | return 0; | 1508 | return 0; |
1517 | } | 1509 | } |
1518 | 1510 | ||