* Bah! How do I change channels? @ 2009-06-26 3:04 George Adams 2009-06-26 11:50 ` Andy Walls 0 siblings, 1 reply; 23+ messages in thread From: George Adams @ 2009-06-26 3:04 UTC (permalink / raw) To: video4linux-list, linux-media Having gotten my Pinnacle HDTV Pro Stick working again under some old v4l drivers, I'm now facing a much more mundane problem - I can't figure out how to use the command line to change the channel. The video feed (a closed-circuit feed) that's coming to the card is over a coax cable, and is on (analog) channel 3. My goal is to take the input and use Helix Encoder to produce RealVideo output that can be played using Real Player (yeah, not the ideal situation, but it's what we're using for now) Helix Producer (unlike "mencoder/mplayer") doesn't have the ability to change the channel - it can only take whatever is coming over the channel that the Pinnacle device is currently tuned to. Devin pointed me to the "v4lctl" command, but I'm not having any luck with it yet. The following does NOT work (i.e. Helix Producer produces a feed of just static) > v4lctl setchannel 3 > v4lctl setfreqtab us-bcast; v4lctl setnorm NTSC; v4lctl setchannel 3 (I tried all combinations with "us-cable" and "us-cable-hrc" for the frequency tables, and "NTSC-M" for the norm), but nothing worked. But scantv seems to indicate that the channel is there: > scantv -n NTSC -f us-bcast -a -c /dev/video0 -C /dev/null scanning freqencies... ?? 44.00 MHz (- ): | no ?? 44.25 MHz (- ): | no ?? 44.50 MHz (- ): | no ... ?? 59.00 MHz (- ): | no ?? 59.25 MHz (- ): | no ?? 59.50 MHz (- ): | no ?? 59.75 MHz (- ): \ raise ?? 60.00 MHz (- ): | yes ?? 60.25 MHz (- ): | yes ?? 60.50 MHz (- ): | yes ?? 60.75 MHz (- ): | yes ?? 61.00 MHz (- ): | yes ?? 61.25 MHz (3 ): | yes ?? 61.50 MHz (- ): | yes ?? 61.75 MHz (- ): | yes ?? 62.00 MHz (- ): | yes ?? 62.25 MHz (- ): / fall => 61.25 MHz (3 ): ??? [unknown (61.25)] channel = 3 ?? 62.50 MHz (- ): | no ?? 62.75 MHz (- ): | no ?? 63.00 MHz (- ): | no ?? 63.25 MHz (- ): | no So, there it is. Is there something wrong with my v4lctl command, then? Interestingly, after running tvtime-scanner, I note this in my ~/.tvtime/stationlist.xml file: It has also spotted channel 3, but this time at 61.50Mhz, rather than 61.25Mhz (which is where I thought it ought to be). So here is what WORKS: - run tvtime, tune to channel 3, quit the program and start Helix Producer. It will "see" the correct channel and show a nice clear picture. - or, run an mplayer command like the following. When it quits 5 seconds later, start Helix Producer. Again, Helix will show the picture from channel 3: > mplayer -vo xv tv:// -tv driver=v4l2:alsa:immediatemode=0:adevice=hw.1,0:norm=ntsc:chanlist=us-cable:channel=3 -endpos 5 So, my horrible hack to get this working is to run the "mplayer" command before I start Helix Producer. But surely there must be a better way! Can I make v4lctl do the right thing? Or is there another command-line tool that I can use? Thanks again. _________________________________________________________________ Windows Live™ SkyDrive™: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 3:04 Bah! How do I change channels? George Adams @ 2009-06-26 11:50 ` Andy Walls 2009-06-26 13:42 ` Devin Heitmueller 0 siblings, 1 reply; 23+ messages in thread From: Andy Walls @ 2009-06-26 11:50 UTC (permalink / raw) To: George Adams; +Cc: video4linux-list, linux-media On Thu, 2009-06-25 at 23:04 -0400, George Adams wrote: > Having gotten my Pinnacle HDTV Pro Stick working again under some old > v4l drivers, I'm now facing a much more mundane problem - I can't > figure out how to use the command line to change the channel. > > The video feed (a closed-circuit feed) that's coming to the card is > over a coax cable, and is on (analog) channel 3. My goal is to take > the input and use Helix Encoder to produce RealVideo output that can > be played using Real Player (yeah, not the ideal situation, but it's > what we're using for now) > > Helix Producer (unlike "mencoder/mplayer") doesn't have the ability to > change the channel - it can only take whatever is coming over the > channel that the Pinnacle device is currently tuned to. Devin pointed > me to the "v4lctl" command, but I'm not having any luck with it yet. I use either v4l2-ctl or ivtv-tune $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 /dev/video0: 61.250 MHz $ v4l2-ctl -d /dev/video0 -f 61.250 Frequency set to 980 (61.250000 MHz) Regards, Andy ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 11:50 ` Andy Walls @ 2009-06-26 13:42 ` Devin Heitmueller 2009-06-26 17:19 ` Robert Krakora 2009-06-27 4:25 ` George Adams 0 siblings, 2 replies; 23+ messages in thread From: Devin Heitmueller @ 2009-06-26 13:42 UTC (permalink / raw) To: Andy Walls; +Cc: George Adams, video4linux-list, linux-media On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls<awalls@radix.net> wrote: > I use either v4l2-ctl or ivtv-tune > > $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 > /dev/video0: 61.250 MHz > > $ v4l2-ctl -d /dev/video0 -f 61.250 > Frequency set to 980 (61.250000 MHz) > > > Regards, > Andy Hello Andy, I had sent George some email off-list with basically the same commands. I think what might be happening here is the tuner gets powered down when not in use, so I think it might be powered down between the v4l-ctl command and the running of the other application. I have sent him a series of commands to try where he modprobes the xc3028 driver with "no_poweroff=1", and we will see if that starts working. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 13:42 ` Devin Heitmueller @ 2009-06-26 17:19 ` Robert Krakora 2009-06-26 17:23 ` Devin Heitmueller 2009-06-27 4:25 ` George Adams 1 sibling, 1 reply; 23+ messages in thread From: Robert Krakora @ 2009-06-26 17:19 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Andy Walls, video4linux-list, linux-media On Fri, Jun 26, 2009 at 9:42 AM, Devin Heitmueller<dheitmueller@kernellabs.com> wrote: > On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls<awalls@radix.net> wrote: >> I use either v4l2-ctl or ivtv-tune >> >> $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 >> /dev/video0: 61.250 MHz >> >> $ v4l2-ctl -d /dev/video0 -f 61.250 >> Frequency set to 980 (61.250000 MHz) >> >> >> Regards, >> Andy > > Hello Andy, > > I had sent George some email off-list with basically the same > commands. I think what might be happening here is the tuner gets > powered down when not in use, so I think it might be powered down > between the v4l-ctl command and the running of the other application. > > I have sent him a series of commands to try where he modprobes the > xc3028 driver with "no_poweroff=1", and we will see if that starts > working. > > Devin > > -- > Devin J. Heitmueller - Kernel Labs > http://www.kernellabs.com > > -- > video4linux-list mailing list > Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe > https://www.redhat.com/mailman/listinfo/video4linux-list > > I had ran into this before with the KWorld a few months back. However, whatever problem existed that forced me to add "no_poweroff=1" to modprobe.conf for the em28xx module has went away. I have been able to use v4l-ctl or ivtv-tune without any problems to tune analog channels over cable. -- Rob Krakora Senior Software Engineer MessageNet Systems 101 East Carmel Dr. Suite 105 Carmel, IN 46032 (317)566-1677 Ext. 206 (317)663-0808 Fax ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 17:19 ` Robert Krakora @ 2009-06-26 17:23 ` Devin Heitmueller 2009-06-26 17:28 ` Robert Krakora 2009-06-26 18:34 ` Andy Walls 0 siblings, 2 replies; 23+ messages in thread From: Devin Heitmueller @ 2009-06-26 17:23 UTC (permalink / raw) To: Robert Krakora; +Cc: Andy Walls, video4linux-list, linux-media On Fri, Jun 26, 2009 at 1:19 PM, Robert Krakora<rob.krakora@messagenetsystems.com> wrote: > I had ran into this before with the KWorld a few months back. > However, whatever problem existed that forced me to add > "no_poweroff=1" to modprobe.conf for the em28xx module has went away. > I have been able to use v4l-ctl or ivtv-tune without any problems to > tune analog channels over cable. Well, bear in mind that if you run v4l-ctl *after* the program is streaming it should work. However, if you run v4l-ctl and then try to stream I suspect it will fail. If it's working, then perhaps I should take a look at the power management code in em28xx/xc2028 since I don't know why it would work (and perhaps the tuner is *not* being powered down like it should be). Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 17:23 ` Devin Heitmueller @ 2009-06-26 17:28 ` Robert Krakora 2009-06-26 17:32 ` Devin Heitmueller 2009-06-26 18:34 ` Andy Walls 1 sibling, 1 reply; 23+ messages in thread From: Robert Krakora @ 2009-06-26 17:28 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Andy Walls, video4linux-list, linux-media On Fri, Jun 26, 2009 at 1:23 PM, Devin Heitmueller<dheitmueller@kernellabs.com> wrote: > On Fri, Jun 26, 2009 at 1:19 PM, Robert > Krakora<rob.krakora@messagenetsystems.com> wrote: >> I had ran into this before with the KWorld a few months back. >> However, whatever problem existed that forced me to add >> "no_poweroff=1" to modprobe.conf for the em28xx module has went away. >> I have been able to use v4l-ctl or ivtv-tune without any problems to >> tune analog channels over cable. > > Well, bear in mind that if you run v4l-ctl *after* the program is > streaming it should work. However, if you run v4l-ctl and then try to > stream I suspect it will fail. > > If it's working, then perhaps I should take a look at the power > management code in em28xx/xc2028 since I don't know why it would work > (and perhaps the tuner is *not* being powered down like it should be). > > Devin > > -- > Devin J. Heitmueller - Kernel Labs > http://www.kernellabs.com > > Devin: Yes, it is run after mplayer initially tunes it. However, what is the difference between mplayer tuning and v4l-ctl tuning? They are both submitting the same IOCTLs to the driver to accomplish the same end result; or is mplayer probably submitting some additional IOCTLS to "wake" the device? Best Regards, -- Rob Krakora Senior Software Engineer MessageNet Systems 101 East Carmel Dr. Suite 105 Carmel, IN 46032 (317)566-1677 Ext. 206 (317)663-0808 Fax ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 17:28 ` Robert Krakora @ 2009-06-26 17:32 ` Devin Heitmueller 2009-06-26 18:15 ` Robert Vincent Krakora 0 siblings, 1 reply; 23+ messages in thread From: Devin Heitmueller @ 2009-06-26 17:32 UTC (permalink / raw) To: Robert Krakora; +Cc: Andy Walls, video4linux-list, linux-media On Fri, Jun 26, 2009 at 1:28 PM, Robert Krakora<rob.krakora@messagenetsystems.com> wrote: > Yes, it is run after mplayer initially tunes it. However, what is the > difference between mplayer tuning and v4l-ctl tuning? They are both > submitting the same IOCTLs to the driver to accomplish the same end > result; or is mplayer probably submitting some additional IOCTLS to > "wake" the device? The issue is that the tuner gets powered down when the v4l device is closed. So, when running mplayer first, and then v4l-ctl is being used to tune, the file handle is held active by mplayer. But if you run v4l-ctl first, the v4l-ctl opens the handle, tunes successfully, and then closes the handle (which powers down the tuner). Then when running mplayer (or whatever app), the handle gets reopened but the tuner is not tuned to the target frequency that v4l-ctl set. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 17:32 ` Devin Heitmueller @ 2009-06-26 18:15 ` Robert Vincent Krakora 0 siblings, 0 replies; 23+ messages in thread From: Robert Vincent Krakora @ 2009-06-26 18:15 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Andy Walls, video4linux-list, linux-media Devin Heitmueller wrote: > On Fri, Jun 26, 2009 at 1:28 PM, Robert > Krakora<rob.krakora@messagenetsystems.com> wrote: > >> Yes, it is run after mplayer initially tunes it. However, what is the >> difference between mplayer tuning and v4l-ctl tuning? They are both >> submitting the same IOCTLs to the driver to accomplish the same end >> result; or is mplayer probably submitting some additional IOCTLS to >> "wake" the device? >> > > The issue is that the tuner gets powered down when the v4l device is > closed. So, when running mplayer first, and then v4l-ctl is being > used to tune, the file handle is held active by mplayer. But if you > run v4l-ctl first, the v4l-ctl opens the handle, tunes successfully, > and then closes the handle (which powers down the tuner). Then when > running mplayer (or whatever app), the handle gets reopened but the > tuner is not tuned to the target frequency that v4l-ctl set. > > Devin > > Aaahh yes...I think that you have told me that once before...sorry for making you repeat yourself... However, with ivtv-tune I can issue a tune to a channel and then open mplayer with no tuning parameters and that channel is playing... -- Rob Krakora Senior Software Engineer MessageNet Systems 101 East Carmel Dr. Suite 105 Carmel, IN 46032 (317)566-1677 Ext. 206 (317)663-0808 Fax ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 17:23 ` Devin Heitmueller 2009-06-26 17:28 ` Robert Krakora @ 2009-06-26 18:34 ` Andy Walls 2009-06-26 18:47 ` Devin Heitmueller 1 sibling, 1 reply; 23+ messages in thread From: Andy Walls @ 2009-06-26 18:34 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Robert Krakora, video4linux-list, linux-media On Fri, 2009-06-26 at 13:23 -0400, Devin Heitmueller wrote: > On Fri, Jun 26, 2009 at 1:19 PM, Robert > Krakora<rob.krakora@messagenetsystems.com> wrote: > > I had ran into this before with the KWorld a few months back. > > However, whatever problem existed that forced me to add > > "no_poweroff=1" to modprobe.conf for the em28xx module has went away. > > I have been able to use v4l-ctl or ivtv-tune without any problems to > > tune analog channels over cable. > > Well, bear in mind that if you run v4l-ctl *after* the program is > streaming it should work. However, if you run v4l-ctl and then try to > stream I suspect it will fail. > > If it's working, then perhaps I should take a look at the power > management code in em28xx/xc2028 since I don't know why it would work Hmm, that sure sounds like a V4L2 spec violation. From the V4L2 close() description: "Closes the device. Any I/O in progress is terminated and resources associated with the file descriptor are freed. However data format parameters, current input or output, control values or other properties remain unchanged." Regards, Andy > (and perhaps the tuner is *not* being powered down like it should be). > > Devin > ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 18:34 ` Andy Walls @ 2009-06-26 18:47 ` Devin Heitmueller 2009-06-26 19:02 ` Andy Walls 0 siblings, 1 reply; 23+ messages in thread From: Devin Heitmueller @ 2009-06-26 18:47 UTC (permalink / raw) To: Andy Walls; +Cc: Robert Krakora, video4linux-list, linux-media On Fri, Jun 26, 2009 at 2:34 PM, Andy Walls<awalls@radix.net> wrote: > Hmm, that sure sounds like a V4L2 spec violation. From the V4L2 close() > description: > > "Closes the device. Any I/O in progress is terminated and resources > associated with the file descriptor are freed. However data format > parameters, current input or output, control values or other properties > remain unchanged." > > > Regards, > Andy I have no idea how that would work with power management. It would mean that all the tuners and demod drivers which don't maintain state across powerdown would have to maintain some sort of cache of all of the programmed registers, and we would need to add some sort of "wakeup" callback which reprograms the device accordingly (currently we have a sleep callback but not a corresponding callback to wake the device back up). As a requirement, it might have been suitable for PCI cards where you don't care about power management (and therefore never power anything down), but I don't know how practical that is for USB or minicard devices where power management is critical because you're on a battery. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 18:47 ` Devin Heitmueller @ 2009-06-26 19:02 ` Andy Walls 2009-06-26 19:29 ` Devin Heitmueller 0 siblings, 1 reply; 23+ messages in thread From: Andy Walls @ 2009-06-26 19:02 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Robert Krakora, video4linux-list, linux-media On Fri, 2009-06-26 at 14:47 -0400, Devin Heitmueller wrote: > On Fri, Jun 26, 2009 at 2:34 PM, Andy Walls<awalls@radix.net> wrote: > > Hmm, that sure sounds like a V4L2 spec violation. From the V4L2 close() > > description: > > > > "Closes the device. Any I/O in progress is terminated and resources > > associated with the file descriptor are freed. However data format > > parameters, current input or output, control values or other properties > > remain unchanged." > > > > > > Regards, > > Andy > > I have no idea how that would work with power management. It would > mean that all the tuners and demod drivers which don't maintain state > across powerdown would have to maintain some sort of cache of all of > the programmed registers, and we would need to add some sort of > "wakeup" callback which reprograms the device accordingly (currently > we have a sleep callback but not a corresponding callback to wake the > device back up). That sounds about right. > As a requirement, it might have been suitable for PCI cards where you > don't care about power management (and therefore never power anything > down), but I don't know how practical that is for USB or minicard > devices where power management is critical because you're on a > battery. All I'm saying is that it is obviously the expected behavior, it the specified behavior, and all the userland apps and scripts are written with that behavior in mind. The applications' expectation of that behavior is, of course, why we are having this discussion. Assuming arguendo, maintaing state in the face of power management is a hard requirement on the driver; I'll still contend it's harder to change the existing base of applications and user scripts. Until the spec and all the existing apps change, not adhering to the spec leads to user confusion. My $0.02 Regards, Andy > Devin ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 19:02 ` Andy Walls @ 2009-06-26 19:29 ` Devin Heitmueller 2009-06-26 19:56 ` Robert Vincent Krakora 2009-06-26 20:34 ` Andy Walls 0 siblings, 2 replies; 23+ messages in thread From: Devin Heitmueller @ 2009-06-26 19:29 UTC (permalink / raw) To: Andy Walls; +Cc: Robert Krakora, video4linux-list, linux-media On Fri, Jun 26, 2009 at 3:02 PM, Andy Walls<awalls@radix.net> wrote: > All I'm saying is that it is obviously the expected behavior, it the > specified behavior, and all the userland apps and scripts are written > with that behavior in mind. > > The applications' expectation of that behavior is, of course, why we are > having this discussion. > > Assuming arguendo, maintaing state in the face of power management is a > hard requirement on the driver; I'll still contend it's harder to change > the existing base of applications and user scripts. Until the spec and > all the existing apps change, not adhering to the spec leads to user > confusion. I guess that means that every product that has a tuner which implements the sleep callback is broken. And yet this is the first case I've heard a user complain, which makes me wonder how big a population is out there that is using scripts to control the tuner. I suspect most people are just using applications like MythTV, xawtv or tvtime, which won't have these issues. I don't intend to come across as argumentative, but if we haven't heard a massive outcry about this by now, maybe nobody actually cares and thus we shouldn't spend the time to build a whole infrastructure to preserve the driver state across the low power mode. Those people who really do care can just disable the power management with a modprobe option. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 19:29 ` Devin Heitmueller @ 2009-06-26 19:56 ` Robert Vincent Krakora 2009-06-26 20:33 ` Devin Heitmueller 2009-06-26 20:34 ` Andy Walls 1 sibling, 1 reply; 23+ messages in thread From: Robert Vincent Krakora @ 2009-06-26 19:56 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Andy Walls, video4linux-list, linux-media Devin Heitmueller wrote: > On Fri, Jun 26, 2009 at 3:02 PM, Andy Walls<awalls@radix.net> wrote: > >> All I'm saying is that it is obviously the expected behavior, it the >> specified behavior, and all the userland apps and scripts are written >> with that behavior in mind. >> >> The applications' expectation of that behavior is, of course, why we are >> having this discussion. >> >> Assuming arguendo, maintaing state in the face of power management is a >> hard requirement on the driver; I'll still contend it's harder to change >> the existing base of applications and user scripts. Until the spec and >> all the existing apps change, not adhering to the spec leads to user >> confusion. >> > > I guess that means that every product that has a tuner which > implements the sleep callback is broken. And yet this is the first > case I've heard a user complain, which makes me wonder how big a > population is out there that is using scripts to control the tuner. I > suspect most people are just using applications like MythTV, xawtv or > tvtime, which won't have these issues. > > I don't intend to come across as argumentative, but if we haven't > heard a massive outcry about this by now, maybe nobody actually cares > and thus we shouldn't spend the time to build a whole infrastructure > to preserve the driver state across the low power mode. Those people > who really do care can just disable the power management with a > modprobe option. > > Devin > > Devin: I care and I love the infrastructure that has been created. However, it seems as though there are devices that do not conform to the paradigm or maybe they are not truly in "low power" mode. My guess is the latter otherwise there would be a flurry of complaints. Best Regards, -- Rob Krakora Senior Software Engineer MessageNet Systems 101 East Carmel Dr. Suite 105 Carmel, IN 46032 (317)566-1677 Ext. 206 (317)663-0808 Fax ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 19:56 ` Robert Vincent Krakora @ 2009-06-26 20:33 ` Devin Heitmueller 0 siblings, 0 replies; 23+ messages in thread From: Devin Heitmueller @ 2009-06-26 20:33 UTC (permalink / raw) To: Robert Vincent Krakora; +Cc: Andy Walls, video4linux-list, linux-media On Fri, Jun 26, 2009 at 3:56 PM, Robert Vincent > I care and I love the infrastructure that has been created. However, it > seems as though there are devices that do not conform to the paradigm or > maybe they are not truly in "low power" mode. My guess is the latter > otherwise there would be a flurry of complaints. Unfortunately, it's a little more complicated. In the beginning, none of the drivers did power management, and nobody cared because they were all PCI cards and nobody would notice a 1 watt difference in consumption on a 300 watt power supply. These devices would maintain persistent state across v4l closes because the chips were never powered down. Other devices, such as some USB devices, do have the power management hooks implemented. I don't know what the percentages are here (I would have to look at the driver code to figure that out). These devices power down the chips when asked to by the bridge, and it is typically triggered when no userland apps still have the v4l device open. In cases such as this, the power management works but it would break cases where people used scripts to control the device. There's probably a third class of devices worth mentioning: those that really should be doing power management but aren't. This includes all the USB devices which burn your fingers and drain your laptop battery from the time you plug it in until the time you unplug it, regardless of whether you are using it. It's not about "caring" or how much we do or do not love the infrastructure. It's about deciding what are the most important goals given limited developer resources. In this case, it's a question of which is more important: incurring the cost of overhauling all the drivers that do power management to have state persist after a power down versus telling those users who use scripts to manually disable power management. Since we have no idea how many users use scripts to control their tuners, and right now we don't know how many devices are effected, we cannot really make any decisions one way or the other. My hope is to see power management properly implemented in more drivers since I'm concerned about the environment. However, if I have to do a huge overhaul of the state management in every driver just to accommodate an unknown quantity of users, then I would have to think twice about that. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-26 19:29 ` Devin Heitmueller 2009-06-26 19:56 ` Robert Vincent Krakora @ 2009-06-26 20:34 ` Andy Walls 1 sibling, 0 replies; 23+ messages in thread From: Andy Walls @ 2009-06-26 20:34 UTC (permalink / raw) To: Devin Heitmueller; +Cc: Robert Krakora, video4linux-list, linux-media On Fri, 2009-06-26 at 15:29 -0400, Devin Heitmueller wrote: > On Fri, Jun 26, 2009 at 3:02 PM, Andy Walls<awalls@radix.net> wrote: > > All I'm saying is that it is obviously the expected behavior, it the > > specified behavior, and all the userland apps and scripts are written > > with that behavior in mind. > > > > The applications' expectation of that behavior is, of course, why we are > > having this discussion. > > > > Assuming arguendo, maintaing state in the face of power management is a > > hard requirement on the driver; I'll still contend it's harder to change > > the existing base of applications and user scripts. Until the spec and > > all the existing apps change, not adhering to the spec leads to user > > confusion. > > I guess that means that every product that has a tuner which > implements the sleep callback is broken. And yet this is the first > case I've heard a user complain, which makes me wonder how big a > population is out there that is using scripts to control the tuner. I > suspect most people are just using applications like MythTV, xawtv or > tvtime, which won't have these issues. > I don't intend to come across as argumentative, but if we haven't > heard a massive outcry about this by now, maybe nobody actually cares > and thus we shouldn't spend the time to build a whole infrastructure > to preserve the driver state across the low power mode. Devin, I'm not saying we need to fix every broken tuner driver. I would suggest, however, that if you fix the one at hand, you will provide a template which others could follow as the problem crops up with other devices. > Those people > who really do care can just disable the power management with a > modprobe option. I doubt you'll here a massive outcry, as most users use a large monlithic application (e.g. MyhtTV) that keep at least two device nodes open, so even if they momentarily close one, it doesn't matter. Where it hurts not to preserve state is for: 1. development and troubleshooting - small tools that do one thing and can do them in whatever order you want simply are really nice to have work. In this thread I've seen a user trying to troubleshoot being affected by not preserving state. 2. user work arounds or conveniences - a small tool used in a script to twiddle a device setting. Preserving state is often *not* used for saving the last tuned frequency, but for other things like the last used input, volume level, VBI settings, etc. As I wave the V4L2 spec around like a blind follower of some sacred law, I'm begin to feel like Piggy clinging to the conch shell in _The_Lord_of_the_Flies_ , so.... If you think the V4L2 spec is bad, then propose a modification in writing (an RFC) that you think makes sense. Propose exceptions for tuners and/or power management. I'm not trying to be argumentative either. I guess I'm just not a big fan of "kicking the can down the road". We all bear the burden of the spec non-compliance in the power managment design and/or implementation, in the form of additional user support and less flexible troubleshooting steps, until it is resolved. I do, however, appreciate that there is only so much time to do useful work and that one has to prioritize. And I do also appreciate the large amount of enegry you put into v4l-dvb. Regards, Andy > Devin ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: Bah! How do I change channels? 2009-06-26 13:42 ` Devin Heitmueller 2009-06-26 17:19 ` Robert Krakora @ 2009-06-27 4:25 ` George Adams 2009-06-27 21:57 ` Robert Krakora 2009-06-28 1:39 ` hermann pitton 1 sibling, 2 replies; 23+ messages in thread From: George Adams @ 2009-06-27 4:25 UTC (permalink / raw) To: dheitmueller, awalls; +Cc: video4linux-list, linux-media Thanks again to both of you for your help. I gave the no_poweroff flag a try, but didn't see any difference. I also tried a "setchannel 3" during the middle of the encoding session, and also saw no change. But I think I've found the problem: > v4lctl setnorm NTSC; v4lctl setfreqtab us-bcast; v4lctl -v 1 setchannel 3 vid-open: trying: v4l2-old... vid-open: failed: v4l2-old vid-open: trying: v4l2... v4l2: open v4l2: device info: em28xx 0.1.1 / Pinnacle PCTV HD Pro Stick @ usb-0000:00:1a.7-1 vid-open: ok: v4l2 freq: reading /usr/share/xawtv/Index.map v4l2: tuner cap: v4l2: tuner rxs: v4l2: tuner cur: MONO cmd: "setchannel" "3" v4l2: freq: 0.000 v4l2: close What? freq: 0.000 ? After finding the ivtv package and compiling its utils, I confirm it with this: > v4l2-ctl -F Frequency: 0 (0.000000 MHz) > ivtv-tune -c 3 /dev/video0: 61.250 MHz > v4l2-ctl -F Frequency: 980 (61.250000 MHz) > v4lctl setchannel 3 > v4l2-ctl -F Frequency: 0 (0.000000 MHz) So mysteriously, it seems like v4lctl is just plain not working. And ivtv-tune, on the other hand, is working just fine. After I do that and start Helix Producer, I see channel 3 just like I had hoped. (strangely, v4lctl can do other things fine, like change the norm from NTSC to PAL. It just can't change the channel.) So, sorry that it went off in rabbit trails of the device powering down and so forth. I wonder what happened to my v4lctl program, though? xawtv itself (running in X) seems to work fine when I tell it to change the channel... > Date: Fri, 26 Jun 2009 09:42:06 -0400 > Subject: Re: Bah! How do I change channels? > From: dheitmueller@kernellabs.com > To: awalls@radix.net > CC: g_adams27@hotmail.com; video4linux-list@redhat.com; linux-media@vger.kernel.org > > On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls wrote: >> I use either v4l2-ctl or ivtv-tune >> >> $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 >> /dev/video0: 61.250 MHz >> >> $ v4l2-ctl -d /dev/video0 -f 61.250 >> Frequency set to 980 (61.250000 MHz) >> >> >> Regards, >> Andy > > Hello Andy, > > I had sent George some email off-list with basically the same > commands. I think what might be happening here is the tuner gets > powered down when not in use, so I think it might be powered down > between the v4l-ctl command and the running of the other application. > > I have sent him a series of commands to try where he modprobes the > xc3028 driver with "no_poweroff=1", and we will see if that starts > working. > > Devin > > -- > Devin J. Heitmueller - Kernel Labs > http://www.kernellabs.com _________________________________________________________________ Lauren found her dream laptop. Find the PC that’s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-27 4:25 ` George Adams @ 2009-06-27 21:57 ` Robert Krakora 2009-06-28 0:17 ` Andy Walls 2009-06-28 1:39 ` hermann pitton 1 sibling, 1 reply; 23+ messages in thread From: Robert Krakora @ 2009-06-27 21:57 UTC (permalink / raw) To: George Adams; +Cc: dheitmueller, awalls, video4linux-list, linux-media On Sat, Jun 27, 2009 at 12:25 AM, George Adams<g_adams27@hotmail.com> wrote: > > Thanks again to both of you for your help. I gave the no_poweroff flag a try, but didn't see any difference. I also tried a "setchannel 3" during the middle of the encoding session, and also saw no change. > > But I think I've found the problem: > >> v4lctl setnorm NTSC; v4lctl setfreqtab us-bcast; v4lctl -v 1 setchannel 3 > vid-open: trying: v4l2-old... > vid-open: failed: v4l2-old > vid-open: trying: v4l2... > v4l2: open > v4l2: device info: > em28xx 0.1.1 / Pinnacle PCTV HD Pro Stick @ usb-0000:00:1a.7-1 > vid-open: ok: v4l2 > freq: reading /usr/share/xawtv/Index.map > v4l2: tuner cap: > v4l2: tuner rxs: > v4l2: tuner cur: MONO > cmd: "setchannel" "3" > v4l2: freq: 0.000 > v4l2: close > > > What? freq: 0.000 ? After finding the ivtv package and compiling its utils, I confirm it with this: > >> v4l2-ctl -F > Frequency: 0 (0.000000 MHz) > >> ivtv-tune -c 3 > /dev/video0: 61.250 MHz > >> v4l2-ctl -F > Frequency: 980 (61.250000 MHz) > >> v4lctl setchannel 3 > >> v4l2-ctl -F > Frequency: 0 (0.000000 MHz) > > > So mysteriously, it seems like v4lctl is just plain not working. And ivtv-tune, on the other hand, is working just fine. After I do that and start Helix Producer, I see channel 3 just like I had hoped. > > (strangely, v4lctl can do other things fine, like change the norm from NTSC to PAL. It just can't change the channel.) > > So, sorry that it went off in rabbit trails of the device powering down and so forth. I wonder what happened to my v4lctl program, though? xawtv itself (running in X) seems to work fine when I tell it to change the channel... > > > > > > >> Date: Fri, 26 Jun 2009 09:42:06 -0400 >> Subject: Re: Bah! How do I change channels? >> From: dheitmueller@kernellabs.com >> To: awalls@radix.net >> CC: g_adams27@hotmail.com; video4linux-list@redhat.com; linux-media@vger.kernel.org >> >> On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls wrote: >>> I use either v4l2-ctl or ivtv-tune >>> >>> $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 >>> /dev/video0: 61.250 MHz >>> >>> $ v4l2-ctl -d /dev/video0 -f 61.250 >>> Frequency set to 980 (61.250000 MHz) >>> >>> >>> Regards, >>> Andy >> >> Hello Andy, >> >> I had sent George some email off-list with basically the same >> commands. I think what might be happening here is the tuner gets >> powered down when not in use, so I think it might be powered down >> between the v4l-ctl command and the running of the other application. >> >> I have sent him a series of commands to try where he modprobes the >> xc3028 driver with "no_poweroff=1", and we will see if that starts >> working. >> >> Devin >> >> -- >> Devin J. Heitmueller - Kernel Labs >> http://www.kernellabs.com > _________________________________________________________________ > Lauren found her dream laptop. Find the PC that’s right for you. > http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290 > > -- > video4linux-list mailing list > Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe > https://www.redhat.com/mailman/listinfo/video4linux-list > > George: Try 'v4l2-ctl -d /dev/video0 -f 61.250' to tune to broadcast channel 3 per one of Devin's e-mails to you. I do not know why setchannel is not working for you. I use both ivtv-tune v4l2-ctl and both do work and v4l2-ctl should work in this instance for you. I always open my USB TV device via mplayer not specifiying a channel and then use ivtv-tune executed by a script that is run by an application to tune channels. I happened to notice that if I closed mplayer and used ivtv-tune to tune to another channel and then open my USB TV device, it would be tuned to that channel. Andy: I too care about the environment. I am trying to find some extra time to figure out if my KWorld 330U USB TV devices are actually going into low power mode or not. I would say not as they get really hot, so I unplug them when I am not using them. I told Devin I would work on this and I have an accurate analog amp meter, but I got very busy at work and at home with the kids. However, I don't believe that the answer is to disable power management as some of these parts get so hot that leaving them in a powered state and tuned to a channel will probably damage the device. Remember, these are silicon tuners, not the old discrete tuners that have way more surface area to dissipate heat. Devin: Great job answering questions as usual. ;-) Best Regards, -- Rob Krakora Senior Software Engineer MessageNet Systems 101 East Carmel Dr. Suite 105 Carmel, IN 46032 (317)566-1677 Ext. 206 (317)663-0808 Fax ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-27 21:57 ` Robert Krakora @ 2009-06-28 0:17 ` Andy Walls 2009-06-28 1:24 ` Devin Heitmueller 0 siblings, 1 reply; 23+ messages in thread From: Andy Walls @ 2009-06-28 0:17 UTC (permalink / raw) To: Robert Krakora; +Cc: George Adams, dheitmueller, video4linux-list, linux-media On Sat, 2009-06-27 at 17:57 -0400, Robert Krakora wrote: > Andy: > > I too care about the environment. I am trying to find some extra time > to figure out if my KWorld 330U USB TV devices are actually going into > low power mode or not. I would say not as they get really hot, so I > unplug them when I am not using them. I told Devin I would work on > this and I have an accurate analog amp meter, but I got very busy at > work and at home with the kids. However, I don't believe that the > answer is to disable power management as some of these parts get so > hot that leaving them in a powered state and tuned to a channel will > probably damage the device. Remember, these are silicon tuners, not > the old discrete tuners that have way more surface area to dissipate > heat. Oh, I'm not against power management. But state is lost - somethings that's fixable with a lot of work apparently. I was thinking maybe the V4L2 spec could change. I was also pondering maybe the final close() shouldn't be the trigger for powering devices down. How about the final close() + 30 seconds? Or the final close() + some user set interval. It seems like scheduling delayed work to do something like that should be easy enough. That would require a spec change about state being only preserved until power management powered the thing down and probably an additional ioctl() added to set the powerdown delay. The driver could probably default delay to some interval that would be good for most users. I don't know. Just ideas... Regards, Andy ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Bah! How do I change channels? 2009-06-28 0:17 ` Andy Walls @ 2009-06-28 1:24 ` Devin Heitmueller 0 siblings, 0 replies; 23+ messages in thread From: Devin Heitmueller @ 2009-06-28 1:24 UTC (permalink / raw) To: Andy Walls; +Cc: Robert Krakora, George Adams, video4linux-list, linux-media On Sat, Jun 27, 2009 at 8:17 PM, Andy Walls<awalls@radix.net> wrote: > Oh, I'm not against power management. But state is lost - somethings > that's fixable with a lot of work apparently. I was thinking maybe the > V4L2 spec could change. > > I was also pondering maybe the final close() shouldn't be the trigger > for powering devices down. How about the final close() + 30 seconds? > Or the final close() + some user set interval. It seems like scheduling > delayed work to do something like that should be easy enough. That > would require a spec change about state being only preserved until power > management powered the thing down and probably an additional ioctl() > added to set the powerdown delay. The driver could probably default > delay to some interval that would be good for most users. > > I don't know. Just ideas... On the DVB side, there actually is a modprobe parameter for dvb_frontend that allows you to defer putting the device to sleep (defaults to zero seconds). It would be a little trickier to do this in v4l because of the differences in the in-kernel threading (dvb has a dedicated thread for controlling the device). Also, it's globally defined, which is good from a consistency standpoint but annoying in cases where some devices really should defer sleep for some period. For example, the HVR-950q's i2c implementation is *really* slow (8 seconds to load the xc5000 firmware). If I had been able to control the delay on a per-device basis in the board definition I could have set it to sleep after 10 seconds by default, which would have helped in cases like the Kaffeine channel scanner which continuously closes/opens the frontend as it scans. Anyway, it's good to discuss this issue, since I hadn't really considered the implications of the power management until George's email. I'm just not sure what the best approach is at this point and will have to give it some more thought. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: Bah! How do I change channels? 2009-06-27 4:25 ` George Adams 2009-06-27 21:57 ` Robert Krakora @ 2009-06-28 1:39 ` hermann pitton 2009-06-28 2:36 ` George Adams 1 sibling, 1 reply; 23+ messages in thread From: hermann pitton @ 2009-06-28 1:39 UTC (permalink / raw) To: George Adams; +Cc: dheitmueller, awalls, video4linux-list, linux-media Hi, Am Samstag, den 27.06.2009, 00:25 -0400 schrieb George Adams: > Thanks again to both of you for your help. I gave the no_poweroff flag a try, but didn't see any difference. I also tried a "setchannel 3" during the middle of the encoding session, and also saw no change. hm, I'm late on the party, but for Gerd's v4lctl try to RTFM. The "setchannel" options reads from .xawtv. For me it still works, but issues with tda827x silicon tuners are known walking the ioctls. Cheers, Hermann > But I think I've found the problem: > > > v4lctl setnorm NTSC; v4lctl setfreqtab us-bcast; v4lctl -v 1 setchannel 3 > vid-open: trying: v4l2-old... > vid-open: failed: v4l2-old > vid-open: trying: v4l2... > v4l2: open > v4l2: device info: > em28xx 0.1.1 / Pinnacle PCTV HD Pro Stick @ usb-0000:00:1a.7-1 > vid-open: ok: v4l2 > freq: reading /usr/share/xawtv/Index.map > v4l2: tuner cap: > v4l2: tuner rxs: > v4l2: tuner cur: MONO > cmd: "setchannel" "3" > v4l2: freq: 0.000 > v4l2: close > > > What? freq: 0.000 ? After finding the ivtv package and compiling its utils, I confirm it with this: > > > v4l2-ctl -F > Frequency: 0 (0.000000 MHz) > > > ivtv-tune -c 3 > /dev/video0: 61.250 MHz > > > v4l2-ctl -F > Frequency: 980 (61.250000 MHz) > > > v4lctl setchannel 3 > > > v4l2-ctl -F > Frequency: 0 (0.000000 MHz) > > > So mysteriously, it seems like v4lctl is just plain not working. And ivtv-tune, on the other hand, is working just fine. After I do that and start Helix Producer, I see channel 3 just like I had hoped. > > (strangely, v4lctl can do other things fine, like change the norm from NTSC to PAL. It just can't change the channel.) > > So, sorry that it went off in rabbit trails of the device powering down and so forth. I wonder what happened to my v4lctl program, though? xawtv itself (running in X) seems to work fine when I tell it to change the channel... > > > > > > > > Date: Fri, 26 Jun 2009 09:42:06 -0400 > > Subject: Re: Bah! How do I change channels? > > From: dheitmueller@kernellabs.com > > To: awalls@radix.net > > CC: g_adams27@hotmail.com; video4linux-list@redhat.com; linux-media@vger.kernel.org > > > > On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls wrote: > >> I use either v4l2-ctl or ivtv-tune > >> > >> $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 > >> /dev/video0: 61.250 MHz > >> > >> $ v4l2-ctl -d /dev/video0 -f 61.250 > >> Frequency set to 980 (61.250000 MHz) > >> > >> > >> Regards, > >> Andy > > > > Hello Andy, > > > > I had sent George some email off-list with basically the same > > commands. I think what might be happening here is the tuner gets > > powered down when not in use, so I think it might be powered down > > between the v4l-ctl command and the running of the other application. > > > > I have sent him a series of commands to try where he modprobes the > > xc3028 driver with "no_poweroff=1", and we will see if that starts > > working. > > > > Devin > > > > -- > > Devin J. Heitmueller - Kernel Labs > > http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: Bah! How do I change channels? 2009-06-28 1:39 ` hermann pitton @ 2009-06-28 2:36 ` George Adams 2009-06-28 3:53 ` hermann pitton 0 siblings, 1 reply; 23+ messages in thread From: George Adams @ 2009-06-28 2:36 UTC (permalink / raw) To: hermann-pitton; +Cc: dheitmueller, awalls, video4linux-list, linux-media A final wrapup (and again, thanks all of you - I'm indebted to you for your help): after booting: > v4l2-ctl -F Frequency: 9076 (567.250000 MHz) > ivtv-tune -c 3 /dev/video0: 61.250 MHz > v4l2-ctl -F Frequency: 980 (61.250000 MHz) > v4l2-ctl -f 61.25 Frequency set to 980 (61.250000 MHz) > v4l2-ctl -F Frequency: 980 (61.250000 MHz) > v4lctl setchannel 3 > v4l2-ctl -F Frequency: 0 (0.000000 MHz) Conclusion: I'll stick with ivtv-tune or v4l2-ctl and ignore the misbehaving v4lctl Hermann: Thanks, but I think you're mistaking the v4lctl "setstation" command (which relies on .xawtv) and the "setchannel" command (which does not, at least according to the man page.) ---------------------------------------- > Subject: RE: Bah! How do I change channels? > From: hermann-pitton@arcor.de > To: g_adams27@hotmail.com > CC: dheitmueller@kernellabs.com; awalls@radix.net; video4linux-list@redhat.com; linux-media@vger.kernel.org > Date: Sun, 28 Jun 2009 03:39:05 +0200 > > Hi, > > Am Samstag, den 27.06.2009, 00:25 -0400 schrieb George Adams: >> Thanks again to both of you for your help. I gave the no_poweroff flag a try, but didn't see any difference. I also tried a "setchannel 3" during the middle of the encoding session, and also saw no change. > > hm, I'm late on the party, but for Gerd's v4lctl try to RTFM. > > The "setchannel" options reads from .xawtv. > > For me it still works, but issues with tda827x silicon tuners are known > walking the ioctls. > > Cheers, > Hermann > > >> But I think I've found the problem: >> >>> v4lctl setnorm NTSC; v4lctl setfreqtab us-bcast; v4lctl -v 1 setchannel 3 >> vid-open: trying: v4l2-old... >> vid-open: failed: v4l2-old >> vid-open: trying: v4l2... >> v4l2: open >> v4l2: device info: >> em28xx 0.1.1 / Pinnacle PCTV HD Pro Stick @ usb-0000:00:1a.7-1 >> vid-open: ok: v4l2 >> freq: reading /usr/share/xawtv/Index.map >> v4l2: tuner cap: >> v4l2: tuner rxs: >> v4l2: tuner cur: MONO >> cmd: "setchannel" "3" >> v4l2: freq: 0.000 >> v4l2: close >> >> >> What? freq: 0.000 ? After finding the ivtv package and compiling its utils, I confirm it with this: >> >>> v4l2-ctl -F >> Frequency: 0 (0.000000 MHz) >> >>> ivtv-tune -c 3 >> /dev/video0: 61.250 MHz >> >>> v4l2-ctl -F >> Frequency: 980 (61.250000 MHz) >> >>> v4lctl setchannel 3 >> >>> v4l2-ctl -F >> Frequency: 0 (0.000000 MHz) >> >> >> So mysteriously, it seems like v4lctl is just plain not working. And ivtv-tune, on the other hand, is working just fine. After I do that and start Helix Producer, I see channel 3 just like I had hoped. >> >> (strangely, v4lctl can do other things fine, like change the norm from NTSC to PAL. It just can't change the channel.) >> >> So, sorry that it went off in rabbit trails of the device powering down and so forth. I wonder what happened to my v4lctl program, though? xawtv itself (running in X) seems to work fine when I tell it to change the channel... >> >> >> >> >> >> >>> Date: Fri, 26 Jun 2009 09:42:06 -0400 >>> Subject: Re: Bah! How do I change channels? >>> From: dheitmueller@kernellabs.com >>> To: awalls@radix.net >>> CC: g_adams27@hotmail.com; video4linux-list@redhat.com; linux-media@vger.kernel.org >>> >>> On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls wrote: >>>> I use either v4l2-ctl or ivtv-tune >>>> >>>> $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 >>>> /dev/video0: 61.250 MHz >>>> >>>> $ v4l2-ctl -d /dev/video0 -f 61.250 >>>> Frequency set to 980 (61.250000 MHz) >>>> >>>> >>>> Regards, >>>> Andy >>> >>> Hello Andy, >>> >>> I had sent George some email off-list with basically the same >>> commands. I think what might be happening here is the tuner gets >>> powered down when not in use, so I think it might be powered down >>> between the v4l-ctl command and the running of the other application. >>> >>> I have sent him a series of commands to try where he modprobes the >>> xc3028 driver with "no_poweroff=1", and we will see if that starts >>> working. >>> >>> Devin >>> >>> -- >>> Devin J. Heitmueller - Kernel Labs >>> http://www.kernellabs.com > > _________________________________________________________________ Windows Live™ SkyDrive™: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009 ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: Bah! How do I change channels? 2009-06-28 2:36 ` George Adams @ 2009-06-28 3:53 ` hermann pitton 2009-06-29 1:19 ` hermann pitton 0 siblings, 1 reply; 23+ messages in thread From: hermann pitton @ 2009-06-28 3:53 UTC (permalink / raw) To: George Adams; +Cc: dheitmueller, awalls, video4linux-list, linux-media Hi, Am Samstag, den 27.06.2009, 22:36 -0400 schrieb George Adams: > A final wrapup (and again, thanks all of you - I'm indebted to you for your help): > > after booting: > > > v4l2-ctl -F > Frequency: 9076 (567.250000 MHz) > > > ivtv-tune -c 3 > /dev/video0: 61.250 MHz > > v4l2-ctl -F > Frequency: 980 (61.250000 MHz) > > > v4l2-ctl -f 61.25 > Frequency set to 980 (61.250000 MHz) > > v4l2-ctl -F > Frequency: 980 (61.250000 MHz) > > > v4lctl setchannel 3 > > v4l2-ctl -F > Frequency: 0 (0.000000 MHz) > > Conclusion: I'll stick with ivtv-tune or v4l2-ctl and ignore the misbehaving v4lctl > > Hermann: Thanks, but I think you're mistaking the v4lctl "setstation" command (which relies on .xawtv) and the "setchannel" command (which does not, at least according to the man page.) I can for sure tell, that, if I rename/remove my .xawtv, "setchannel" does not work anymore and I see exactly what you reported initially. That can be looked up in the code and it also should not matter that I have a dual install of xawtv-3.95 and 4x since both start to exist. Cheers, Hermann > > > ---------------------------------------- > > Subject: RE: Bah! How do I change channels? > > From: hermann-pitton@arcor.de > > To: g_adams27@hotmail.com > > CC: dheitmueller@kernellabs.com; awalls@radix.net; video4linux-list@redhat.com; linux-media@vger.kernel.org > > Date: Sun, 28 Jun 2009 03:39:05 +0200 > > > > Hi, > > > > Am Samstag, den 27.06.2009, 00:25 -0400 schrieb George Adams: > >> Thanks again to both of you for your help. I gave the no_poweroff flag a try, but didn't see any difference. I also tried a "setchannel 3" during the middle of the encoding session, and also saw no change. > > > > hm, I'm late on the party, but for Gerd's v4lctl try to RTFM. > > > > The "setchannel" options reads from .xawtv. > > > > For me it still works, but issues with tda827x silicon tuners are known > > walking the ioctls. > > > > Cheers, > > Hermann > > > > > >> But I think I've found the problem: > >> > >>> v4lctl setnorm NTSC; v4lctl setfreqtab us-bcast; v4lctl -v 1 setchannel 3 > >> vid-open: trying: v4l2-old... > >> vid-open: failed: v4l2-old > >> vid-open: trying: v4l2... > >> v4l2: open > >> v4l2: device info: > >> em28xx 0.1.1 / Pinnacle PCTV HD Pro Stick @ usb-0000:00:1a.7-1 > >> vid-open: ok: v4l2 > >> freq: reading /usr/share/xawtv/Index.map > >> v4l2: tuner cap: > >> v4l2: tuner rxs: > >> v4l2: tuner cur: MONO > >> cmd: "setchannel" "3" > >> v4l2: freq: 0.000 > >> v4l2: close > >> > >> > >> What? freq: 0.000 ? After finding the ivtv package and compiling its utils, I confirm it with this: > >> > >>> v4l2-ctl -F > >> Frequency: 0 (0.000000 MHz) > >> > >>> ivtv-tune -c 3 > >> /dev/video0: 61.250 MHz > >> > >>> v4l2-ctl -F > >> Frequency: 980 (61.250000 MHz) > >> > >>> v4lctl setchannel 3 > >> > >>> v4l2-ctl -F > >> Frequency: 0 (0.000000 MHz) > >> > >> > >> So mysteriously, it seems like v4lctl is just plain not working. And ivtv-tune, on the other hand, is working just fine. After I do that and start Helix Producer, I see channel 3 just like I had hoped. > >> > >> (strangely, v4lctl can do other things fine, like change the norm from NTSC to PAL. It just can't change the channel.) > >> > >> So, sorry that it went off in rabbit trails of the device powering down and so forth. I wonder what happened to my v4lctl program, though? xawtv itself (running in X) seems to work fine when I tell it to change the channel... > >> > >> > >> > >> > >> > >> > >>> Date: Fri, 26 Jun 2009 09:42:06 -0400 > >>> Subject: Re: Bah! How do I change channels? > >>> From: dheitmueller@kernellabs.com > >>> To: awalls@radix.net > >>> CC: g_adams27@hotmail.com; video4linux-list@redhat.com; linux-media@vger.kernel.org > >>> > >>> On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls wrote: > >>>> I use either v4l2-ctl or ivtv-tune > >>>> > >>>> $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 > >>>> /dev/video0: 61.250 MHz > >>>> > >>>> $ v4l2-ctl -d /dev/video0 -f 61.250 > >>>> Frequency set to 980 (61.250000 MHz) > >>>> > >>>> > >>>> Regards, > >>>> Andy > >>> > >>> Hello Andy, > >>> > >>> I had sent George some email off-list with basically the same > >>> commands. I think what might be happening here is the tuner gets > >>> powered down when not in use, so I think it might be powered down > >>> between the v4l-ctl command and the running of the other application. > >>> > >>> I have sent him a series of commands to try where he modprobes the > >>> xc3028 driver with "no_poweroff=1", and we will see if that starts > >>> working. > >>> > >>> Devin > >>> > >>> -- > >>> Devin J. Heitmueller - Kernel Labs > >>> http://www.kernellabs.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: Bah! How do I change channels? 2009-06-28 3:53 ` hermann pitton @ 2009-06-29 1:19 ` hermann pitton 0 siblings, 0 replies; 23+ messages in thread From: hermann pitton @ 2009-06-29 1:19 UTC (permalink / raw) To: George Adams; +Cc: dheitmueller, awalls, video4linux-list, linux-media Hi, Am Sonntag, den 28.06.2009, 05:53 +0200 schrieb hermann pitton: > Hi, > > Am Samstag, den 27.06.2009, 22:36 -0400 schrieb George Adams: > > A final wrapup (and again, thanks all of you - I'm indebted to you for your help): > > > > after booting: > > > > > v4l2-ctl -F > > Frequency: 9076 (567.250000 MHz) > > > > > ivtv-tune -c 3 > > /dev/video0: 61.250 MHz > > > v4l2-ctl -F > > Frequency: 980 (61.250000 MHz) > > > > > v4l2-ctl -f 61.25 > > Frequency set to 980 (61.250000 MHz) > > > v4l2-ctl -F > > Frequency: 980 (61.250000 MHz) > > > > > v4lctl setchannel 3 > > > v4l2-ctl -F > > Frequency: 0 (0.000000 MHz) > > > > Conclusion: I'll stick with ivtv-tune or v4l2-ctl and ignore the misbehaving v4lctl > > > > Hermann: Thanks, but I think you're mistaking the v4lctl "setstation" command (which relies on .xawtv) and the "setchannel" command (which does not, at least according to the man page.) > > I can for sure tell, that, if I rename/remove my .xawtv, "setchannel" > does not work anymore and I see exactly what you reported initially. > > That can be looked up in the code and it also should not matter that I > have a dual install of xawtv-3.95 and 4x since both start to exist. for the record: The above is true for a FlyVideo3000 (card=2) on the saa7134 driver. It has a hardwired analog IF demod chip and no extras for PM on the PLL chip. It gets more interesting with tuners with some tda988x and further. The rest is the well known history ;) Cheers, Hermann > > > > > > ---------------------------------------- > > > Subject: RE: Bah! How do I change channels? > > > From: hermann-pitton@arcor.de > > > To: g_adams27@hotmail.com > > > CC: dheitmueller@kernellabs.com; awalls@radix.net; video4linux-list@redhat.com; linux-media@vger.kernel.org > > > Date: Sun, 28 Jun 2009 03:39:05 +0200 > > > > > > Hi, > > > > > > Am Samstag, den 27.06.2009, 00:25 -0400 schrieb George Adams: > > >> Thanks again to both of you for your help. I gave the no_poweroff flag a try, but didn't see any difference. I also tried a "setchannel 3" during the middle of the encoding session, and also saw no change. > > > > > > hm, I'm late on the party, but for Gerd's v4lctl try to RTFM. > > > > > > The "setchannel" options reads from .xawtv. > > > > > > For me it still works, but issues with tda827x silicon tuners are known > > > walking the ioctls. > > > > > > Cheers, > > > Hermann > > > > > > > > >> But I think I've found the problem: > > >> > > >>> v4lctl setnorm NTSC; v4lctl setfreqtab us-bcast; v4lctl -v 1 setchannel 3 > > >> vid-open: trying: v4l2-old... > > >> vid-open: failed: v4l2-old > > >> vid-open: trying: v4l2... > > >> v4l2: open > > >> v4l2: device info: > > >> em28xx 0.1.1 / Pinnacle PCTV HD Pro Stick @ usb-0000:00:1a.7-1 > > >> vid-open: ok: v4l2 > > >> freq: reading /usr/share/xawtv/Index.map > > >> v4l2: tuner cap: > > >> v4l2: tuner rxs: > > >> v4l2: tuner cur: MONO > > >> cmd: "setchannel" "3" > > >> v4l2: freq: 0.000 > > >> v4l2: close > > >> > > >> > > >> What? freq: 0.000 ? After finding the ivtv package and compiling its utils, I confirm it with this: > > >> > > >>> v4l2-ctl -F > > >> Frequency: 0 (0.000000 MHz) > > >> > > >>> ivtv-tune -c 3 > > >> /dev/video0: 61.250 MHz > > >> > > >>> v4l2-ctl -F > > >> Frequency: 980 (61.250000 MHz) > > >> > > >>> v4lctl setchannel 3 > > >> > > >>> v4l2-ctl -F > > >> Frequency: 0 (0.000000 MHz) > > >> > > >> > > >> So mysteriously, it seems like v4lctl is just plain not working. And ivtv-tune, on the other hand, is working just fine. After I do that and start Helix Producer, I see channel 3 just like I had hoped. > > >> > > >> (strangely, v4lctl can do other things fine, like change the norm from NTSC to PAL. It just can't change the channel.) > > >> > > >> So, sorry that it went off in rabbit trails of the device powering down and so forth. I wonder what happened to my v4lctl program, though? xawtv itself (running in X) seems to work fine when I tell it to change the channel... > > >> > > >> > > >> > > >> > > >> > > >> > > >>> Date: Fri, 26 Jun 2009 09:42:06 -0400 > > >>> Subject: Re: Bah! How do I change channels? > > >>> From: dheitmueller@kernellabs.com > > >>> To: awalls@radix.net > > >>> CC: g_adams27@hotmail.com; video4linux-list@redhat.com; linux-media@vger.kernel.org > > >>> > > >>> On Fri, Jun 26, 2009 at 7:50 AM, Andy Walls wrote: > > >>>> I use either v4l2-ctl or ivtv-tune > > >>>> > > >>>> $ ivtv-tune -d /dev/video0 -t us-bcast -c 3 > > >>>> /dev/video0: 61.250 MHz > > >>>> > > >>>> $ v4l2-ctl -d /dev/video0 -f 61.250 > > >>>> Frequency set to 980 (61.250000 MHz) > > >>>> > > >>>> > > >>>> Regards, > > >>>> Andy > > >>> > > >>> Hello Andy, > > >>> > > >>> I had sent George some email off-list with basically the same > > >>> commands. I think what might be happening here is the tuner gets > > >>> powered down when not in use, so I think it might be powered down > > >>> between the v4l-ctl command and the running of the other application. > > >>> > > >>> I have sent him a series of commands to try where he modprobes the > > >>> xc3028 driver with "no_poweroff=1", and we will see if that starts > > >>> working. > > >>> > > >>> Devin > > >>> > > >>> -- > > >>> Devin J. Heitmueller - Kernel Labs > > >>> http://www.kernellabs.com > > ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2009-06-29 1:20 UTC | newest] Thread overview: 23+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-06-26 3:04 Bah! How do I change channels? George Adams 2009-06-26 11:50 ` Andy Walls 2009-06-26 13:42 ` Devin Heitmueller 2009-06-26 17:19 ` Robert Krakora 2009-06-26 17:23 ` Devin Heitmueller 2009-06-26 17:28 ` Robert Krakora 2009-06-26 17:32 ` Devin Heitmueller 2009-06-26 18:15 ` Robert Vincent Krakora 2009-06-26 18:34 ` Andy Walls 2009-06-26 18:47 ` Devin Heitmueller 2009-06-26 19:02 ` Andy Walls 2009-06-26 19:29 ` Devin Heitmueller 2009-06-26 19:56 ` Robert Vincent Krakora 2009-06-26 20:33 ` Devin Heitmueller 2009-06-26 20:34 ` Andy Walls 2009-06-27 4:25 ` George Adams 2009-06-27 21:57 ` Robert Krakora 2009-06-28 0:17 ` Andy Walls 2009-06-28 1:24 ` Devin Heitmueller 2009-06-28 1:39 ` hermann pitton 2009-06-28 2:36 ` George Adams 2009-06-28 3:53 ` hermann pitton 2009-06-29 1:19 ` hermann pitton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox