alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Keith Chew <keith.chew@gmail.com>
To: alsa-devel@alsa-project.org
Subject: PCM multi A/V Sync bug on SMP system
Date: Sun, 25 Apr 2010 17:07:45 +1200	[thread overview]
Message-ID: <n2i20f65d531004242207zde83c421gac35d243420dcaff@mail.gmail.com> (raw)

Hi

I have a SB Audigy Value card with 5.1 channel output. This is defined
in my asound.conf:
---------------------------
pcm.multi {
    type    multi
    slaves {
        a.pcm        "dmixerrear"
        a.channels   2
        b.pcm        "dmixerfront"
        b.channels   2
        c.pcm        "dmixercenter"
        c.channels   2
    }
    bindings {
        0.slave      a
        0.channel    0
        1.slave      a
        1.channel    1
        2.slave      b
        2.channel    0
        3.slave      b
        3.channel    1
        4.slave      c
        4.channel    0
        5.slave      c
        5.channel    1
    }
}

    pcm.dmixerfront  {
        type dmix
        ipc_key 1024
        slave {
            pcm "hw:0,0"
            channels 2
        }
    }

    pcm.dmixerrear  {
        type dmix
        ipc_key 1025
        slave {
            pcm "hw:0,1"
            channels 2
        }
    }
    pcm.dmixercenter  {
        type dmix
        ipc_key 1026
        slave {
            pcm "hw:0,2"
            channels 2
        }
    }
---------------------------

Playing a video with "mplayer -ao alsa:device=multi ..." works fine, I
can hear the 6-channel audio without any A/V sync issues. However,
this is on a uniprocessor system. On an SMP system, the A/V sync gets
out of sync from the start and drifts quite quickly.

I have narrowed it down to the pcm_multi component giving this
problem. On an SMP system, using just "mplayer -ao alsa ..." gives no
A/V sync issues (because it is not using multi) on the 6 channels.
Moreover, I have also tried "mplayer -ao alsa:device=dmixerfront ...",
"mplayer -ao alsa:device=dmixercenter ..." and "mplayer -ao
alsa:device=dmixerrear ...", all giving no A/V sync issues on the
individual devices.

Please advise how can I track down this problem in code, happy to make
changes and test.

PS: I need multi to work, so that I can add additional options like
softvol on top of it.

Regards
Keith

             reply	other threads:[~2010-04-25  5:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-25  5:07 Keith Chew [this message]
2010-04-27 19:28 ` PCM multi A/V Sync bug on SMP system Keith Chew
2010-04-28 20:12   ` Keith Chew
2010-04-30 11:09     ` Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=n2i20f65d531004242207zde83c421gac35d243420dcaff@mail.gmail.com \
    --to=keith.chew@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).