Remove _snd_pcm_link_descriptors() and more comments

Removed the obsoleted _snd_pcm_link_descriptors() from pcm_local.h.
Added more comments on multi plugin.
This commit is contained in:
Takashi Iwai 2007-03-13 10:44:28 +01:00
parent 8048321c76
commit 36cc1daad8
2 changed files with 14 additions and 1 deletions

View 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 */

View 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;