aw2-alsa.c (cf40a76e7d5874bb25f4404eecc58a2e033af885) | aw2-alsa.c (5116b94af07a9775ed694562f354e931b2cc04d4) |
---|---|
1/***************************************************************************** 2 * 3 * Copyright (C) 2008 Cedric Bregardis <cedric.bregardis@free.fr> and 4 * Jean-Christian Hassler <jhassler@free.fr> 5 * 6 * This file is part of the Audiowerk2 ALSA driver 7 * 8 * The Audiowerk2 ALSA driver is free software; you can redistribute it and/or --- 610 unchanged lines hidden (view full) --- 619 /* give base chip pointer to our internal pcm device 620 structure */ 621 pcm_device->chip = chip; 622 /* Give stream number to PCM device */ 623 pcm_device->stream_number = NUM_STREAM_PLAYBACK_ANA; 624 625 /* pre-allocation of buffers */ 626 /* Preallocate continuous pages. */ | 1/***************************************************************************** 2 * 3 * Copyright (C) 2008 Cedric Bregardis <cedric.bregardis@free.fr> and 4 * Jean-Christian Hassler <jhassler@free.fr> 5 * 6 * This file is part of the Audiowerk2 ALSA driver 7 * 8 * The Audiowerk2 ALSA driver is free software; you can redistribute it and/or --- 610 unchanged lines hidden (view full) --- 619 /* give base chip pointer to our internal pcm device 620 structure */ 621 pcm_device->chip = chip; 622 /* Give stream number to PCM device */ 623 pcm_device->stream_number = NUM_STREAM_PLAYBACK_ANA; 624 625 /* pre-allocation of buffers */ 626 /* Preallocate continuous pages. */ |
627 err = snd_pcm_lib_preallocate_pages_for_all(pcm_playback_ana, 628 SNDRV_DMA_TYPE_DEV, 629 snd_dma_pci_data 630 (chip->pci), 631 64 * 1024, 64 * 1024); 632 if (err) 633 dev_err(chip->card->dev, 634 "snd_pcm_lib_preallocate_pages_for_all error (0x%X)\n", 635 err); | 627 snd_pcm_lib_preallocate_pages_for_all(pcm_playback_ana, 628 SNDRV_DMA_TYPE_DEV, 629 snd_dma_pci_data(chip->pci), 630 64 * 1024, 64 * 1024); |
636 637 err = snd_pcm_new(chip->card, "Audiowerk2 digital playback", 1, 1, 0, 638 &pcm_playback_num); 639 640 if (err < 0) { 641 dev_err(chip->card->dev, "snd_pcm_new error (0x%X)\n", err); 642 return err; 643 } --- 12 unchanged lines hidden (view full) --- 656 /* give base chip pointer to our internal pcm device 657 structure */ 658 pcm_device->chip = chip; 659 /* Give stream number to PCM device */ 660 pcm_device->stream_number = NUM_STREAM_PLAYBACK_DIG; 661 662 /* pre-allocation of buffers */ 663 /* Preallocate continuous pages. */ | 631 632 err = snd_pcm_new(chip->card, "Audiowerk2 digital playback", 1, 1, 0, 633 &pcm_playback_num); 634 635 if (err < 0) { 636 dev_err(chip->card->dev, "snd_pcm_new error (0x%X)\n", err); 637 return err; 638 } --- 12 unchanged lines hidden (view full) --- 651 /* give base chip pointer to our internal pcm device 652 structure */ 653 pcm_device->chip = chip; 654 /* Give stream number to PCM device */ 655 pcm_device->stream_number = NUM_STREAM_PLAYBACK_DIG; 656 657 /* pre-allocation of buffers */ 658 /* Preallocate continuous pages. */ |
664 err = snd_pcm_lib_preallocate_pages_for_all(pcm_playback_num, 665 SNDRV_DMA_TYPE_DEV, 666 snd_dma_pci_data 667 (chip->pci), 668 64 * 1024, 64 * 1024); 669 if (err) 670 dev_err(chip->card->dev, 671 "snd_pcm_lib_preallocate_pages_for_all error (0x%X)\n", 672 err); | 659 snd_pcm_lib_preallocate_pages_for_all(pcm_playback_num, 660 SNDRV_DMA_TYPE_DEV, 661 snd_dma_pci_data(chip->pci), 662 64 * 1024, 64 * 1024); |
673 674 err = snd_pcm_new(chip->card, "Audiowerk2 capture", 2, 0, 1, 675 &pcm_capture); 676 677 if (err < 0) { 678 dev_err(chip->card->dev, "snd_pcm_new error (0x%X)\n", err); 679 return err; 680 } --- 13 unchanged lines hidden (view full) --- 694 /* give base chip pointer to our internal pcm device 695 structure */ 696 pcm_device->chip = chip; 697 /* Give stream number to PCM device */ 698 pcm_device->stream_number = NUM_STREAM_CAPTURE_ANA; 699 700 /* pre-allocation of buffers */ 701 /* Preallocate continuous pages. */ | 663 664 err = snd_pcm_new(chip->card, "Audiowerk2 capture", 2, 0, 1, 665 &pcm_capture); 666 667 if (err < 0) { 668 dev_err(chip->card->dev, "snd_pcm_new error (0x%X)\n", err); 669 return err; 670 } --- 13 unchanged lines hidden (view full) --- 684 /* give base chip pointer to our internal pcm device 685 structure */ 686 pcm_device->chip = chip; 687 /* Give stream number to PCM device */ 688 pcm_device->stream_number = NUM_STREAM_CAPTURE_ANA; 689 690 /* pre-allocation of buffers */ 691 /* Preallocate continuous pages. */ |
702 err = snd_pcm_lib_preallocate_pages_for_all(pcm_capture, 703 SNDRV_DMA_TYPE_DEV, 704 snd_dma_pci_data 705 (chip->pci), 706 64 * 1024, 64 * 1024); 707 if (err) 708 dev_err(chip->card->dev, 709 "snd_pcm_lib_preallocate_pages_for_all error (0x%X)\n", 710 err); | 692 snd_pcm_lib_preallocate_pages_for_all(pcm_capture, 693 SNDRV_DMA_TYPE_DEV, 694 snd_dma_pci_data(chip->pci), 695 64 * 1024, 64 * 1024); |
711 | 696 |
712 | |
713 /* Create control */ 714 err = snd_ctl_add(chip->card, snd_ctl_new1(&aw2_control, chip)); 715 if (err < 0) { 716 dev_err(chip->card->dev, "snd_ctl_add error (0x%X)\n", err); 717 return err; 718 } 719 720 return 0; --- 41 unchanged lines hidden --- | 697 /* Create control */ 698 err = snd_ctl_add(chip->card, snd_ctl_new1(&aw2_control, chip)); 699 if (err < 0) { 700 dev_err(chip->card->dev, "snd_ctl_add error (0x%X)\n", err); 701 return err; 702 } 703 704 return 0; --- 41 unchanged lines hidden --- |