]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Remove _snd_pcm_link_descriptors() and more comments
authorTakashi Iwai <tiwai@suse.de>
Tue, 13 Mar 2007 09:44:28 +0000 (10:44 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 13 Mar 2007 09:44:28 +0000 (10:44 +0100)
Removed the obsoleted _snd_pcm_link_descriptors() from pcm_local.h.
Added more comments on multi plugin.

src/pcm/pcm_local.h
src/pcm/pcm_multi.c

index afb6b9be2234dd3757fabce9f74e897390acee35..ecf2e1d8809018f81f07114399e7f5827131a189 100644 (file)
@@ -274,7 +274,6 @@ static inline int snd_pcm_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t *i
 }
 int snd_pcm_channel_info_shm(snd_pcm_t *pcm, snd_pcm_channel_info_t *info, int shmid);
 int _snd_pcm_poll_descriptor(snd_pcm_t *pcm);
-int _snd_pcm_link_descriptors(snd_pcm_t *pcm, int *fds, int size, int (**failed)(snd_pcm_t *, int));
 #define _snd_pcm_link_descriptor _snd_pcm_poll_descriptor /* FIXME */
 #define _snd_pcm_async_descriptor _snd_pcm_poll_descriptor /* FIXME */
 
index 7e1cc1c9b177f16f1d04a903b15707758f5d2b7e..94bcf50a4072e3103bbc0d0c510568285351f278 100644 (file)
@@ -313,6 +313,10 @@ static int snd_pcm_multi_hw_params_slave(snd_pcm_t *pcm,
        return 0;
 }
 
+/* reset links to the normal state
+ * slave #0 = trigger master
+ * slave #1-(N-1) = trigger slaves, linked is set to #0
+ */
 static void reset_links(snd_pcm_multi_t *multi)
 {
        unsigned int i;
@@ -457,6 +461,10 @@ static int snd_pcm_multi_reset(snd_pcm_t *pcm)
        return result;
 }
 
+/* when the first slave PCM is linked, it means that the whole multi
+ * plugin instance is linked manually to another PCM.  in this case,
+ * we need to trigger the master.
+ */
 static int snd_pcm_multi_start(snd_pcm_t *pcm)
 {
        snd_pcm_multi_t *multi = pcm->private_data;
@@ -616,6 +624,9 @@ static int snd_pcm_multi_resume(snd_pcm_t *pcm)
        return err;
 }
 
+/* if a multi plugin instance is linked as slaves, every slave PCMs
+ * including the first one has to be relinked to the given master.
+ */
 static int snd_pcm_multi_link_slaves(snd_pcm_t *pcm, snd_pcm_t *master)
 { 
        snd_pcm_multi_t *multi = pcm->private_data;
@@ -635,6 +646,9 @@ static int snd_pcm_multi_link_slaves(snd_pcm_t *pcm, snd_pcm_t *master)
        return 0;
 }
 
+/* linking to a multi as a master is easy - simply link to the first
+ * slave element as its own slaves are already linked.
+ */
 static int snd_pcm_multi_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2)
 {
        snd_pcm_multi_t *multi = pcm1->private_data;