Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using a video input card (AverMedia EZMaker Gold, saa7134 protocol, virtual device on /dev/video0, working with v4l2).
Over time, I realised that when I turn on the computer while it is connected to the VCR, and the VCR is on - the card works perfectely fine, however:
1. When I turn the computer on when the VCR is either disconnected or shut, it sometimes works, but mostly doesn't.
2. When, after turning-on as usual, with the VCR on, the computer goes into stand-by (suspension), the card usually stops working.
After either of these two, if I want to use tvtime or record TV using mencoder, I have to reboot the system. Not even logout-login does anything...
And what do I mean by "doesn't work"?
A) tvtime takes about 5 secs to start, then gives a blank, blue, screen.
B) mencoder ("mencoder tv:// -tv driver=v4l2:input=0:norm=pal:width=720:height=576:outfmt=yuy2:device=/dev/video0:forceaudio:audiorate=32000 buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:keyint=25 -oac pcm -o foo.avi") gives the following message:
It would be very very nice to be able to use my lovely card even though I started the computer with the VCR off, or put the machine in suspend...
Thank you very very much!
Oded R. =)
In each of the situations A) it's working, and B) it's NOT working, have you happened to check 'lsmod' to see if the issue is that the required module(s) for the device are or are not loaded into the kernel?
If there is a difference, note the missing modules, and try modprobing it/them before trying to use the card after either a sleep or a VCR-less bootup.
I venture a guess, that the card doesn't do anything unless there is some sort of input being sent to it, and that it doesn't (always) correctly detect the (VCR) that is connected to it.
This is what I did:
1. /sbin/lsmod >lsmod-tv-not-working.txt
2. Restart computer with the VCR connected and on. Check with tvtime and mencoder that the TV card is working.
3. /sbin/lsmod >lsmod-tv-working.txt
4. diff lsmod-tv-not-working.txt lsmod-tv-working.txt >tv.patch
OK, pretty clever idea however, I can't make heads nor tails of what I'm looking at there..
I see the < and > thingies, but what do they mean, and which file do they each refer to?
If you could present this data in a simpler to read way (at least for me anyway) then I/we *might* be able to tell what's going on. Or, if you have the diff file, email it to me so I can look at it in the viewer.
Of course, if someone else can figure out what's up here, feel free
I thought this was a diff file... Isn't it?
If it isn't, how do I make one?
Anyway, the "<" means that this is a line found in the first (tv not working) file that wasn't found by 'diff' in the second file (tv working). The ">" is the opposite - this line was found in the second file and wasn't found in the first file.
Well.. I see stuff there twice, first with < and then the second time with > so something is amiss here.
Since no one has stepped in here yet with some advice, how about posting the actual two files you made, before you diff'd them, as it would be more clear.. and probably use [code] tags, if it's a really long list.
You're welcome -- hopefully you get it sorted out sooner or later.
I've read some v4l mailing list threads, and though many users have gotten the same error, I haven't read specifically of one using a VCR input as you are.
That said however, try the following (when the card is in the non-working state):
STEP1:modprobe -r saa7134 (or modprobe -fr saa7134 if the first way complains)
then, reinsert the module like this:
modprobe saa7134
and test it. if that doesn't work by itself, remove the module again using STEP1, and then try:
modprobe saa7134 noninterlaced=1
Let me know if anything happens. Still looking around for more stuff you.. BTW the lsmod's appear virtually identical as far as actual loaded modules. The issue seems to be "initializing the card", which should happen when inserting the module saa7134 as mentioned above.
If by chance the modprobe works with the "noninterlaced" option, we will need to make you a 'modprobe' rule which will apply this automatically.
Good luck
Last edited by GrapefruiTgirl; 05-18-2007 at 05:07 AM.
Fantastic -- I love it when a plan comes together!
Code:
alias bond0 bonding
options bonding mode=active-backup miimon=1000 primary=eth0
There's an example of a modprobe rule. This is from a text-file I called 'bonding', which is stored in the location /etc/modprobe.d/.. The alias part means I (or the system) can use either 'modprobe bonding' or 'modprobe bond0' and get the same result: the module called 'bonding' gets inserted.. It's literally an alias. I am not certain you would need an alias for your situation. Probably not necessary.
The options line is where you specify, in your case, 'noninterlaced=1'
Try creating such a file for yourself, and try it out.
NOTE: you use fedora, and I don't so there may be minor semantic differences, but I think the requirements are basically the same. Also, if you have a modprobe.conf file in /etc then you can put the rule in there instead, but I believe that if you have files in /modprobe.d folder, they take priority over the modprobe.conf file.
First of all, thanks!
Second - anyone who quotes the "A Team" receives a few points as far as I'm concerned...
Now, this works, and when I boot the machine the card always works (AWAIK), but after stand-by I still have to remove and re-insert the saa7134 module.
Though this is unbelievably better than having to restart the computer (and I must thank you again for that...), I wonder if there is some way to avoid this as well... But don't bother too much, it really is very good as it is right now..!
(sorry it took me so long, I have many many exams right now...)
thanks again,
Oded R. =)
PS: As you said, I really didn't need the alias, it works w/o it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.