On Thu, 18 Sep 2003, James Courtier-Dutton wrote:

> Jaroslav Kysela wrote:
> > On Wed, 17 Sep 2003, James Courtier-Dutton wrote:
> >
> >
> >>Output from sending stereo sound to the "dmix" device.
> >>bash-2.05b# cat status
> >>state: RUNNING
> >>trigger_time: 1063822024.640173000
> >>tstamp      : 1063822060.456968000
> >>delay       : -1719463
> >>avail       : 1731463
> >>avail_max   : 1731463
> >>-----
> >>hw_ptr      : 1719463
> >>appl_ptr    : 0
> >>bash-2.05b#
> >>
> >>Output from sending stereo sound to the "front" device.
> >>bash-2.05b# cat status
> >>state: RUNNING
> >>trigger_time: 1063823309.038609000
> >>tstamp      : 1063823320.869677000
> >>delay       : 14161
> >>avail       : 2223
> >>avail_max   : 3586
> >>-----
> >>hw_ptr      : 567983
> >>appl_ptr    : 582144
> >>
> >>As you can see, the "front" device acts correctly, with all the pointers
> >>acting as they should.
> >>But with "dmix", all the pointers are wrong.
> >>This is particularly problematic for me, as I need a properly
> >>functioning "delay" value for my application.
> >>
> >>This is using alsa from 2.6test5 kernel.
> >
> >
> > This is absolutely ok. The device is running in no-xrun mode, because
> > multi-applications have access to it. The dmix plugin has own hw_ptr and
> > appl_ptr for each instance and mangles the information from kernel to
> > correct values to follow the ALSA API.
> >
> > What is your problem? The resolution of the dmix plugin is always one
> > period (to make things faster), but it's not a problem to add the slow
> > calls.
> >
> >                                             Jaroslav
> >
> > -----
> > Jaroslav Kysela <[EMAIL PROTECTED]>
> > Linux Kernel Sound Maintainer
> > ALSA Project, SuSE Labs
> >
> >
>
> The problem is that my application relies on a correct "delay" value, so
> that it can use it to keep sound/video in sync.

I'm asking again, what is your problem in your application? Yes, avail in
driver is negative, because appl_ptr is NOT updated from the dmix clients
(and it is not possible - it is a shared thing), but the dmix plugin
should pass the right value (non-negative) to application. Please, don't
look to /proc tree with the dmix plugin. Appearently, you're confused,
because the dmix uses some tricks to let things working.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


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

Reply via email to