[MPlayer-dev-eng] Real Time Clock into timer-lx.c?

Sidik Isani lksi at cfht.hawaii.edu
Sun Sep 22 16:31:00 CEST 2002


Hello Dominik -

On Sun, Sep 22, 2002 at 11:50:27AM +0200, Dominik Mierzejewski wrote:
> On Sunday, 22 September 2002, Sidik Isani wrote:
> > Hello -
> > 
> >   I'm still planning to send you that timing patch this weekend!
> >   (The one which makes video smooth with network audio and broken
> >   sound drivers.)  Please tell me what you think about the following
> >   though, so if needed I can back out other changes that are now in
> >   my tree before generating this patch.  This has to do with RTC.
> >   I get good results with it, but only if:
> > 
> >   1. Some previous program happens to have left it at >= 256Hz.
> 
> This is not required.
> 
> >   2. I'm running as root, or setuid-root
> 
> And this isn't either, if you have a recent kernel (i.e. 2.4.19
> or so, check DOCS).

  Ah, the *mplayer* DOCS.  I found it now.  The kernel docs had
  not been updated with /proc/sys/dev/rtc/max-user-freq yet.

> >   Even if 1. is true, kernel will not allow a normal user to enable
> >   the interrupt until they select something <= 64Hz.
> 
> Not true for recent kernels.

  I see.  So it is still true for an unmodified system.  The FAQ
  says how to modify it, but if someone doesn't, then since -rtc
  is the default now, non-optimal things can happen.

> [...] 
> >   I'd like to propose three things... and the patch if you like ;-)
> > 
> >   1. *Set* the RTC to 256Hz rather than accepting whatever frequency
> >      it was left at, ... or if that somehow causes a problem, set the
> >      frequency to 256Hz only if the old frequency happens to be lower
> >      than that.  Since only one application can use the RTC at a time,
> >      does anyone see a problem with just putting a value in?
> 
> What's wrong with current 1024Hz?

  Well, there is no "current 1024Hz", but 1024 works just as well as
  256 on mine, so why not.  I don't know what the overhead for a hw
  interrupt is on a powerPC (it has the RTC also), but it is still
  probably insignificant at 1KHz.  I have 2.4.19, and the CVS mplayer.
  Try compiling and running the RTC example in
  /usr/src/linux/Documentation/rtc.txt and then run mplayer . . .
  It runs at 64Hz! :-(

- Sidik



More information about the MPlayer-dev-eng mailing list