2.6. RTC
上一页 | 第 2 章 Installation | 下一页

## 2.6. RTC

There are three timing methods in MPlayer.

- To use the old method, you don't have to do anything. It uses `usleep()` to tune A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be tuned even finer.

- The new timer code uses the RTC (RealTime Clock) for this task, because it has precise 1ms timers. The `-rtc` option enables it, but a properly set up kernel is required. If you are running kernel 2.4.19pre8 or later you can adjust the maximum RTC frequency for normal users through the `/proc` file system. Use one of the following two commands to enable RTC for normal users:

      echo 1024 > /proc/sys/dev/rtc/max-user-freq

      sysctl dev/rtc/max-user-freq=1024

  You can make this setting permanent by adding the latter to `/etc/sysctl.conf`.

  You can see the new timer's efficiency in the status line. The power management functions of some notebook BIOSes with speedstep CPUs interact badly with RTC. Audio and video may get out of sync. Plugging the external power connector in before you power up your notebook seems to help. In some hardware combinations (confirmed during usage of non-DMA DVD drive on an ALi1541 board) usage of the RTC timer causes skippy playback. It's recommended to use the third method in these cases.

- The third timer code is turned on with the `-softsleep` option. It has the efficiency of the RTC, but it doesn't use RTC. On the other hand, it requires more CPU.

上一页 | 上一级 | 下一页
2.5. Codec installation | 起始页 | 第 3 章 Usage