comparison DOCS/documentation.html @ 6617:5e9b842fd06e

further updates for RTC
author diego
date Sun, 30 Jun 2002 22:10:47 +0000
parents a2937bae0651
children 917fa27c7d32
comparison
equal deleted inserted replaced
6616:0b5a789d7fab 6617:5e9b842fd06e
662 <UL> 662 <UL>
663 <LI><B>To use the old method</B>, you don't have to do anything. It uses 663 <LI><B>To use the old method</B>, you don't have to do anything. It uses
664 <CODE>usleep()</CODE> to tune A/V sync, with +/- 10ms accuracy. However 664 <CODE>usleep()</CODE> to tune A/V sync, with +/- 10ms accuracy. However
665 sometimes the sync has to be tuned even finer.</LI> 665 sometimes the sync has to be tuned even finer.</LI>
666 <LI><B>The new timer</B> code uses PC's RTC (Real Time Clock) for this task, 666 <LI><B>The new timer</B> code uses PC's RTC (Real Time Clock) for this task,
667 because it has precise 1ms timers. This requires root privileges, or a 667 because it has precise 1ms timers. It is automagically enabled when
668 <I>setuid root</I> <B>MPlayer</B> binary. If you are running kernel 668 available, but requires root privileges, a <I>setuid root</I>
669 2.4.19pre8 or later you can adjust the maximum RTC frequency for normal 669 <B>MPlayer</B> binary or a properly set up kernel.
670 users through the <CODE>/proc</CODE> filesystem. Use this command to enable 670 <BR>
671 RTC for normal users: 671 If you are running kernel 2.4.19pre8 or later you can adjust the maximum
672 RTC frequency for normal users through the <CODE>/proc</CODE> filesystem.
673 Use this command to enable RTC for normal users:
672 <P> 674 <P>
673 <CODE>echo 1025 > /proc/sys/dev/rtc/max-user-freq</CODE> 675 <CODE>echo 1024 > /proc/sys/dev/rtc/max-user-freq</CODE>
674 </P> 676 </P>
675 If you do not have such a new kernel, you can also change one line in 677 If you do not have such a new kernel, you can also change one line in
676 <CODE>drivers/char/rtc.c</CODE> and recompile your kernel. Find the line 678 <CODE>drivers/char/rtc.c</CODE> and recompile your kernel. Find the
677 <P> 679 section that reads
678 <CODE>if ((rtc_freq > 64) && (!capable(CAP_SYS_RESOURCE)))</CODE> 680 <PRE>
679 </P> 681 * We don't really want Joe User enabling more
682 * than 64Hz of interrupts on a multi-user machine.
683 */
684 if ((rtc_freq > 64) && (!capable(CAP_SYS_RESOURCE)))
685 </PRE>
680 and change the 64 to 1024. You should really know what you are doing, though. 686 and change the 64 to 1024. You should really know what you are doing, though.
681 <BR> 687 <BR>
682 You can see the new timer's efficiency in the status line. In some hardware 688 You can see the new timer's efficiency in the status line.
683 combinations (confirmed during usage of non-DMA DVD drive on an ALi1541 board) 689 <BR>
684 usage of the RTC timer causes skippy playback. It's recommended to use the 690 The power management functions of some notebook BIOSes with speedstep CPUs
685 following method in these cases.</LI> 691 interact badly with RTC. Audio and video may get out of sync. Plugging the
692 external power connector in before you power up your notebook seems to help.
693 You can always turn off RTC support with the <CODE>-nortc</CODE> switch.
694 In some hardware combinations (confirmed during usage of non-DMA DVD
695 drive on an ALi1541 board) usage of the RTC timer causes skippy playback.
696
697 It's recommended to use the following method in these cases.</LI>
686 <LI><B>The third timer code</B> is turned on with the <CODE>-softsleep</CODE> 698 <LI><B>The third timer code</B> is turned on with the <CODE>-softsleep</CODE>
687 option. It has the efficiency of the RTC, but it doesn't use RTC. On the other 699 option. It has the efficiency of the RTC, but it doesn't use RTC. On the other
688 hand, it requires more CPU.</LI> 700 hand, it requires more CPU.</LI>
689 </UL> 701 </UL>
690 </LI> 702 </LI>
691 </UL> 703 </UL>
692 704
693 Note: <B>NEVER install setuid MPlayer binary on a 705 Note: <B>NEVER install a setuid root MPlayer binary on a
694 multiuser system!</B> It's a clear way for everyone to gain root. 706 multiuser system!</B> It's a clear way for everyone to gain root.
695 707
696 708
697 <P>Then build <B>MPlayer</B>:</P> 709 <P>Then build <B>MPlayer</B>:</P>
698 710