📄 readme.realmagichwl
字号:
line. Reboot and look at the IRQ map using: cat /proc/pciSMP safety---------- has been developed and tested only on dual Athlon (Asus A7M266-D). Some problems are caused by the motherboard: run the latest kernelFor instance (drivers/pci/quirks.c: quirk_amd_ordering())Apr 23 13:51:32 avalon kernel: BIOS disabled PCI ordering compliance, so we enabled it again.Linux kernel mailing list useful threads:* more detailed information about the AMD 1.6+ GHz MP smp-problem with latest kernelmw@suk.net (Thu Feb 21 2002 - 12:21:51 EET)* A7M266-D works? Jussi Laako (Mon Feb 11 2002 - 21:03:17 EET) * SMP motherboards (760 MPX chipset) and SMP howto Emmanuel Michon (Wed Mar 27 2002 - 01:11:10 EET)Building customized/stripped down versions of the module--------------------------------------------------------Read the beginning of file common.mk for possible options.For instance, to build a module without support for encoder (300KBytes smaller),and without hardware CSS, run:export REALMAGICHWL_FEATURES="-DWITH_LOGGING=1 -DWITH_PCI=1 -DWITH_DOLBY=1 -DWITH_MACROVISION=1"makeThe list of features appears when running insmod:Warning: loading realmagichwl_kernelland.o will taint the kernel: non-GPL license - Proprietary. Copyright (c) 2002 Sigma Designs Inc. All rights reserved (version 41 with logging pci dolby macrovision)./proc interface---------------Driver now has a /proc interface in: /proc/driver/realmagichwlThis allows to dump useful information. For instance, when the PC has threeEM84xx boards, three subdirectories are created there: 0, 1, and 2avalon# cat /proc/driver/realmagichwl/1/versions pci device id = 0x8475interrupt line = 17hwl version = 20quasar ucode version = 0x0118Remarks for boards with SM2288 encoder (harmony)------------------------------------------------* [data copy] obviously an encoder cannot wait when it is producing data; thetwo 31KBytes DMA buffers must be processed within approx. 0.1sec @4Mbps.To allow more flexibility: as soon as hardware IRQ signallingavailability of data is received, data is copied in a kernel memoryregion called the accumulator (REALMAGICHWL_ACCUMULATORSIZE). Thisbuffer allows reading processes to be quite lazy (if accumulator is2MB, it can survive during 2sec @4Mbps). So data is copied twice inthis case.If a process doing encoding is put to sleep, or interrupted with ^C without issuing ENCODER_PAUSE or ENCODER_STOP, data will overflow andthe kernel will log after a few seconds:Feb 22 16:32:12 erika kernel: (hwl0) shelterData:encoder running but CANNOT STORE DATAThis is handled properly and harmless but obviously the encoded bytesare dropped. Once the application is restarted the kernel will log:Feb 22 16:33:56 erika kernel: (hwl0) shelterData:encoder running, storing data ok* [side effects of decoder reset on encoder] The SM2288 encoder issupported through the local bus controller found on EM847x.EM847x reset procedure has been modified so that SM2288 is not reset,local bus controller is not reset, and should be run withSetCurrentIrqMask(LBC_INTERRUPT).However, when EM847x is reset, the PCI DMA channels are reset and if,at this precise time, a SM2288->host DMA transfer was happening, youwill see:Mar 31 04:09:43 frog kernel: (hwl#) decoders/cem847x.c:778 CQuasar__ReadDataFromLBC busy xcnt= 0xc, clear it !The matching chunk of data will certainly be corrupted.QPM_to_host_xfer_cnt is then forced to zero and encoder goes onrunning.This proves to happen 1 over 15 decoder resets with the followingparameters: encoder running @4Mbps, resetting the decoder once persecond. No other nasty consequence.* [building the version with diagnosis microcode] The special sm2288 firmware2288_diag.h is not in the standard distribution. Get it and drop it inrealmagichwl_kernelland/ucode/sm2288/, then:realmagichwl_kernelland$ make cleanallrealmagichwl_kernelland$ REALMAGICHWL_FEATURES="-DWITH_LOGGING=1 \-DWITH_PROC=1 -DWITH_PCI=1 -DWITH_DOLBY=1 -DWITH_CSS=1 -DWITH_MACROVISION=1 \-DWITH_SM2288=1 -DWITH_SM2288_DIAG=1" makeInsert this new kernel module. To run the diagnosis on allharmony present on the system, you can uncomment RUA_SM2288_DIAGNOSIS(h); inrealmagichwl_userland/allreset.c and run this application.A description of the sample applications----------------------------------------* allreset. Resets all boards on the PC (this application does not take a board numberas first argument)* capturevideovideo capture from the "digital video-in" port of a EM847x device(also supports simultaneous audio capture - if supported by the hardware -) * displayasciishows how to use the plain osdbuf (not fb) to print text and graphics* encode2filethe most simple program to use SM2288 encoder* encodetv2file(deprecated --- should merge soon with encode2file)* grabgrabs the content of Quasar video buffer in PIO mode (slow)* i2csampleshows how to use the i2c property interface, sample codeaccesses the EEPROM found on REALmagic boards in read/write mode* jpegtesta program that decompresses a JPEG in YUV planar format,and writes it in Quasar video buffer in PIO mode (slow)* monitora program to monitor Quasar registers* osdbuf_fb_controlthe program to control osdbuf and fb parameters, enable/disable them* playasyncvideo elementary streams playback without data copy* playaudiothe most simple program to play audio elementary streams* playvideothe most simple program to play MPEG-2 or MPEG-4video elementary streams* playvob (supports only VOB files with Dolby Digital/AC3 audio)unscrambled video object file playback * spliceplay (supports only VOB files with Dolby Digital/AC3 audio)video object files playback (seamless playback from file1 to file2 according)* reversevobsmooth reverse playback of a video object file (the audio stream is discarded)* sendconsoletoframebufferto move console around framebuffers when there is more than one* sndmixer_switcha program to enable/disable the soundcore compliant sound driver* yuvbuf_controlthe program to control yuvbuf parameters, enable/disable them* yuvbufdemodecompresses a JPEG in YUV planar format, maps yuvbufwrites it and moves it around (DMA mode).To store a 1632x918/4:2:2 picture you need a YUV buffer of, at least, 1632x918x2 = 2996352 bytes.If you supply a big picture (which can't fit into the YUV buffer), that picture will be scaled down using the JPEG lib, then the picture will be scaled up to 1080i (if needed) using the EM847x or EM840x device. The aspect ratio of the original picture will be kept during those operations.Note: by default, a 4 tap filter is applied on the picture by the EM847x when it scales up.* diagnosisrun diagnosis functions (register testing, DRAM testing) on a EM84xx and/or on a SM2288.* playosdtakes a .osd and displays it with quasar OSD engine. THIS PROGRAM REQUIRES THE OSDBUF IS _NOT_ ACTIVE.To produce .osd files, you need libpng on the system (run rpm -qa|grep libpng to know if libpng is installed). At the beginning youneed a 32bpp RGBA alpha-blended (T4) PNG image. (example:http://entropymine.com/jason/testbed/pngtrans/rgba8.png)Here is how to proceed:(get pngquant from: http://www.libpng.org/pub/png/src/pngquant-1.0-src.tgz)$ tar xzfv pngquant-1.0-src.tgz $ cd pngquant-1.0$ patch <../pngquant-1.0.diff $ make -f Makefile.unx $ cd ..$ pngquant-1.0/pngquant 256 rgba8.png // conversion from non-indexed to indexed$ make rgbaindexedpng2osd$ ./rgbaindexedpng2osd rgba8-fs8.png rgba8.osd // conversion from indexed to YUV quasar OSD$ ./playosd 0 200x100+150+250 rgba8.osdThe OSD cannot be scaled down. It can only be scaled up, so width (resp. height) has to be greaterthan image pixel width (resp. height).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -