echoaudio.c (436ec40e0cdf74eae90af6be6c287396e388f1fb) | echoaudio.c (5116b94af07a9775ed694562f354e931b2cc04d4) |
---|---|
1/* 2 * ALSA driver for Echoaudio soundcards. 3 * Copyright (C) 2003-2004 Giuliano Pochini <pochini@shiny.it> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * --- 870 unchanged lines hidden (view full) --- 879 880 881/* Preallocate memory only for the first substream because it's the most 882 * used one 883 */ 884static int snd_echo_preallocate_pages(struct snd_pcm *pcm, struct device *dev) 885{ 886 struct snd_pcm_substream *ss; | 1/* 2 * ALSA driver for Echoaudio soundcards. 3 * Copyright (C) 2003-2004 Giuliano Pochini <pochini@shiny.it> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * --- 870 unchanged lines hidden (view full) --- 879 880 881/* Preallocate memory only for the first substream because it's the most 882 * used one 883 */ 884static int snd_echo_preallocate_pages(struct snd_pcm *pcm, struct device *dev) 885{ 886 struct snd_pcm_substream *ss; |
887 int stream, err; | 887 int stream; |
888 889 for (stream = 0; stream < 2; stream++) | 888 889 for (stream = 0; stream < 2; stream++) |
890 for (ss = pcm->streams[stream].substream; ss; ss = ss->next) { 891 err = snd_pcm_lib_preallocate_pages(ss, SNDRV_DMA_TYPE_DEV_SG, 892 dev, 893 ss->number ? 0 : 128<<10, 894 256<<10); 895 if (err < 0) 896 return err; 897 } | 890 for (ss = pcm->streams[stream].substream; ss; ss = ss->next) 891 snd_pcm_lib_preallocate_pages(ss, SNDRV_DMA_TYPE_DEV_SG, 892 dev, 893 ss->number ? 0 : 128<<10, 894 256<<10); 895 |
898 return 0; 899} 900 901 902 903/*<--snd_echo_probe() */ 904static int snd_echo_new_pcm(struct echoaudio *chip) 905{ --- 1382 unchanged lines hidden --- | 896 return 0; 897} 898 899 900 901/*<--snd_echo_probe() */ 902static int snd_echo_new_pcm(struct echoaudio *chip) 903{ --- 1382 unchanged lines hidden --- |