Comment 87 for bug 1040873

Raymond (superquad-vortex2) wrote :

http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=doc/upmix.txt;hb=HEAD

http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=mix/pcm_upmix.c;hb=HEAD

upmix_2_to_21 is similar to upmix_2_to_51 without delayed_copy

static void upmix_2_to_21(snd_pcm_upmix_t *mix,
                          const snd_pcm_channel_area_t *dst_areas,
                          snd_pcm_uframes_t dst_offset,
                           const snd_pcm_channel_area_t *src_areas,
                           snd_pcm_uframes_t src_offset,
                           snd_pcm_uframes_t size)
{
        snd_pcm_areas_copy(dst_areas, dst_offset, src_areas, src_offset,
                            2, size, SND_PCM_FORMAT_S16);

          average_copy(dst_areas + 2, dst_offset, src_areas, src_offset,
                     2, size);
  }