Figuring out the card number of a cheap SAA7130 capture card
Posted by Admin • Sunday, June 19. 2011 • Category: Linux
So you bought yourself a cheap Philips SAA7130 (or SAA713X or SAA7134) capture card to record motion, you plugged it in and you are getting a black or grey screen. Looking in dmesg you see the famous
This script will try all the different card numbers, giving you the opportunity to check the results. I use motion, so every time I have it reload the module, start motion, and give me a chance to hit the webcam port with a browser to see if it's working.
Once you found the one that works, make sure it's loaded that way every time. Create /etc/modprobe.d/saa7134.conf (or similar):
saa7134[0]: Huh, no eeprom present (err=-5)?
And
What do you do? How do you try 175 card numbers and figure out which one works? Write a script!saa7134: Congratulations! Your TV card vendor saved a few saa7134: cents for a eeprom, thus your pci board has no saa7134: subsystem ID and I can't identify it automatically saa7134: I feel better now. Ok, here are the good news: saa7134: You can use the card=insmod option to specify saa7134: which board do you have. The list:
This script will try all the different card numbers, giving you the opportunity to check the results. I use motion, so every time I have it reload the module, start motion, and give me a chance to hit the webcam port with a browser to see if it's working.
Hopefully it's one of them. Naturally you need to have a camera plugged into the card. If you have a multi-chip card like mine, plug a camera into the first and the last port - you never know if the numbering is backwards - and hit the port you think is "first". Once you see a legible image, CTRL-C out of the script and proceed below:card=1 while [ $card -lt 175 ] ; do /etc/init.d/motion stop lsmod | cut -d ' ' -f 1 | grep saa713 | xargs rmmod modprobe saa7134 card=$card,$card,$card,$card #Mine is a 7134 with 4 chips - change this line to suit yours /etc/init.d/motion restart echo "Give it a shot for card $card" read junk /etc/init.d/motion stop card=$(($card+1)) done
Once you found the one that works, make sure it's loaded that way every time. Create /etc/modprobe.d/saa7134.conf (or similar):
options saa7134 card=26,26,26,26
(This is for a 4 encoder card. For an 8, repeat the card number 8 times, etc). Mine was card number 26, so that's what I have.
0 Comments
Add Comment