Update of /cvsroot/alsa/alsa-kernel/core
In directory usw-pr-cvs1:/tmp/cvs-serv9031/core

Modified Files:
        pcm.c 
Log Message:
exported snd_pcm_new_stream().  with this function, a stream can be
added later to the existing pcm.



Index: pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/pcm.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- pcm.c       13 Aug 2002 16:13:34 -0000      1.16
+++ pcm.c       12 Sep 2002 15:25:44 -0000      1.17
@@ -541,12 +541,10 @@
        return 0;
 }
 
-static int snd_pcm_new_stream(snd_pcm_t *pcm,
-                             snd_pcm_str_t *pstr,
-                             int substream_count,
-                             int stream)
+int snd_pcm_new_stream(snd_pcm_t *pcm, int stream, int substream_count)
 {
        int idx, err;
+       snd_pcm_str_t *pstr = &pcm->streams[stream];
        snd_pcm_substream_t *substream, *prev;
 
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
@@ -614,11 +612,11 @@
        if (id) {
                strncpy(pcm->id, id, sizeof(pcm->id) - 1);
        }
-       if ((err = snd_pcm_new_stream(pcm, &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK], 
playback_count, SNDRV_PCM_STREAM_PLAYBACK)) < 0) {
+       if ((err = snd_pcm_new_stream(pcm, SNDRV_PCM_STREAM_PLAYBACK, playback_count)) 
+< 0) {
                snd_pcm_free(pcm);
                return err;
        }
-       if ((err = snd_pcm_new_stream(pcm, &pcm->streams[SNDRV_PCM_STREAM_CAPTURE], 
capture_count, SNDRV_PCM_STREAM_CAPTURE)) < 0) {
+       if ((err = snd_pcm_new_stream(pcm, SNDRV_PCM_STREAM_CAPTURE, capture_count)) < 
+0) {
                snd_pcm_free(pcm);
                return err;
        }
@@ -974,6 +972,7 @@
 EXPORT_SYMBOL(snd_pcm_lock);
 EXPORT_SYMBOL(snd_pcm_devices);
 EXPORT_SYMBOL(snd_pcm_new);
+EXPORT_SYMBOL(snd_pcm_new_stream);
 EXPORT_SYMBOL(snd_pcm_notify);
 EXPORT_SYMBOL(snd_pcm_open_substream);
 EXPORT_SYMBOL(snd_pcm_release_substream);



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to