This phase requires
test bench power supply (TBPS),
PCI card adapter for TBPS,
PC with Linux distribution (we test under Ubuntu, kernel 2.6.20),
Altera Programmer (AP) application installed
JTAG cable (with adapter, can be either parallel port or USB version), plugged into the PC
AP can run on the same computer PCI and functional tests of the card are done later.
Start AP (need not be restarted for subsequent cards). Check that max. current on TBPS to 280 mA. !!!CHECK THAT TBPS VOLTAGE IS SET TO 3.3V !!!
Plug card into TBPS adapter. Make sure orientation is right, the key on the adapter connector facing the rear side of the LML26415 card.
connect JTAG cable to LML26415, red marking on the cable facing the front side of the card (bracket, RCA connectors side)
Turn on TBPS power, check that current is < 280mA □
click JTAG “auto detect” button (AP), make sure EP2C8 shows as first device in the chain □
select EP2C8 device line and click “replace programming file” button, select HDL26415_83V4.jic file. This needs to be done only for the first card during volume testing.
check box “program/configure device” on EPCS4 line (2nd line from the top now). This also needs to be done only for the first card.
click the “Start” button
wait till programming is complete (approx. 25 seconds), make sure there were no errors (no messages in red or popups, “Successfully performed operation(s)” message is last but one in the messages window) □
Turn off TBPS, wait 2 sec, turn on TBPS, make sure LEDs are blinking now – green faster then red □
Power down TBPS, disconnect JTAG cable, unplug the card from TBPS adapter.
This completes PHASE 0, now move to testing the card on the PC.
Test environment for LML26415 cards. This needs to be done only once.
Download test
application binary package:
wget
http://linuxmedialabs.com/LMLCD/LML26415/lml26415_test_bin.tgz
Unpack it into your home
directory:
tar
zxf lml26415_test_bin.tgz
Download
test video stream, move it to lml26415_test_bin
directory
wget
http://linuxmedialabs.com/LMLCD/LML26415/x1.qbx
mv x1.qbx
lml26415_test_bin
Download
driver source package:
wget
http://linuxmedialabs.com/LMLCD/LMLQHAL/LMLQHAL_839.tgz
Unpack it
into your home directory:
tar
zxvf ../LMLQHAL_839.tgz
Change
directory to LMLQHAL
cd
LMLQHAL
Make sure you have Linux kernel sources installed and configured on your system
build
lml26415 driver:
./build.sh
The
output should look similar to this:
Building loadble kernel module
CC [M] /home/vleo/tmp/LMLQHAL/qhal/linuxdrv/qhal_host.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/linuxdrv/qhal_wrapper.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/linuxdrv/i386/I2CBus.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/linuxdrv/i386/platform.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/seve1/qhal_bs.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/seve1/qhal_em.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/seve1/qhal_mbox.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/seve1/qhal_pm.o
CC [M] /home/vleo/tmp/LMLQHAL/qhal/seve1/qhal_qcc.o
LD [M] /home/vleo/tmp/LMLQHAL/qhal/qhal.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/vleo/tmp/LMLQHAL/qhal/qhal.mod.o
LD [M] /home/vleo/tmp/LMLQHAL/qhal/qhal.ko
copy the
qhal.ko file into lml26415_test_bin
cp
qhal.ko ../lml26415_test_bin
LML26415 has to be plugged into the system.
Change
directory to lml26415_test_bin
(created in the previous step)
chdir
../lml26415_test_bin
run command to make sure that LML26415 is recognized by PCI subsystem:
lspci | grep 264
should return line similar to this (xx may vary):
00:xx.0 Class 4000: Linux Media Labs, LLC Unknown device 2644 (rev 01)
insert kernel module for 26415 support:
sudo
insmod qhal.ko
check dmesg
output:
sudo dmesg
| tail
the output
will look similar to this:
[16854.641343] QHAL: QHAL linux driver for kernel 2.6.20-15-generic, SVN revision sdk4.x-r10728
[16854.647156] cs_paddr[0]= febff400 cs_paddr_size[0]= 1024 conf.iv = 11 ivect[0]= 11
[16854.647784] qhalhost_interrupt_connect(), IRQ ctl reg v.addr 0xe0ab4400 == 0x0000
[16854.648171] qhalhost_interrupt_clear_enable(), IRQ ctl == 0x0100
[16854.648180] QHAL: QHAL initialized properly.
run
preliminary test:
sudo
lml26415test_pci_i2c.sh
that should produce output
lulddk dirver present
conf D[16] = 0xfebff400
mem D[284] = 0x6415831a
PCI I2C TEST PASSED OK
LML26415 PCI bracket I/O connector assignment is as follows, from top to bottom:
audio 3.5 mm input
audio 3.5 mm output
DB-15 for audio mic, S-Video, optically decoupled inputs, RS-485
RCA for video input
RCA for video output
Cables should be connected as follows:
Cable from audio input to audio source output (DVD player or video camera) – RCA to 3.5mm cable
Cable from video input to audio source output (DVD player) – RCA to RCA
Cable from audio output to audio amplifier input (3.5mm to RCA)
Cable from video output to TV monitor input (RCA to RCA)
Color bars
NTSC:
sudo
./video_bypass.pl -N -b -c
PAL:
sudo
./video_bypass.pl -P -b -c
Video playback
NTSC
sudo
./do_playback
PAL
sudo
./do_playback _PAL
Video capture/playback test
NTSC
record 30 sec of video from your video source:
sudo
./do_recordtest
playback recorded MP4
clip:
sudo
./do_playbacktest
PAL
sudo
./do_recordtest_PAL
sudo ./do_playbacktest_PAL
Become superuser (or use sudo, if installed)
install sudo (depends on distribution)
edit /etc/sudoers files as follows, we assume tests would be done under user “tester”, and host name is “myhost”
/usr/sbin/visudo
add this line to the
end:
tester
myhost,localhost = (root) NOPASSWD: ALL
save the file and exit (ZZ)
This will allow to execute sudo commands exactly as written in the manual, without further requests for password.
page