Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-19 Thread Devin Heitmueller
Hi David, It sounds like we want a solution that      * lives in core code      * doesn't require tuner drivers to save state      * manages hybrid tuners appropriately      * allows for gradual API change-over (no flag day for tuners or        for capture devices)      * has a reasonable

Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-18 Thread Hans Verkuil
On Mon June 18 2012 06:49:58 David Dillow wrote: Without this patch, MythTV requires some workarounds to be able to capture analog TV on my HVR-850. I need to keep the v4l device open via 'sleep 365d /dev/video0' or some other mechanism or there will be no recording. Also, I need to run vq4l2

Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-18 Thread David Dillow
On Mon, 2012-06-18 at 09:29 +0200, Hans Verkuil wrote: On Mon June 18 2012 06:49:58 David Dillow wrote: What does the V4L2 API spec say about tuning frequency being persistent when there are no users of a video capture device? Is MythTV wrong to have that assumption, or is cx231xx wrong to

Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-18 Thread Devin Heitmueller
On Mon, Jun 18, 2012 at 10:15 AM, David Dillow d...@thedillows.org wrote: Tuner standards and frequencies must be persistent. So cx231xx is wrong. Actually, all V4L2 settings must in general be persistent (there are some per-filehandle settings when dealing with low-level subdev setups or

Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-18 Thread Hans Verkuil
On Mon June 18 2012 16:15:40 David Dillow wrote: On Mon, 2012-06-18 at 09:29 +0200, Hans Verkuil wrote: On Mon June 18 2012 06:49:58 David Dillow wrote: What does the V4L2 API spec say about tuning frequency being persistent when there are no users of a video capture device? Is MythTV

Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-18 Thread David Dillow
On Mon, 2012-06-18 at 10:23 -0400, Devin Heitmueller wrote: This isn't just the cx231xx driver. Almost all USB devices that have tuners which support power management have this problem (em28xx/au0828/cx231xx with Xceive or tda18271 tuners). Really the tuner_core should be resending the

Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-18 Thread Devin Heitmueller
On Mon, Jun 18, 2012 at 10:32 AM, David Dillow d...@thedillows.org wrote: Hmm, it sounds like perhaps changing the standby call in the tuner core to asynchronously power down the tuner may be the way to go -- ie, when we tell it to standby, it will do a schedule_work for some 10 seconds later

Re: [RFC] [media] cx231xx: restore tuner settings on first open

2012-06-18 Thread David Dillow
On Mon, 2012-06-18 at 10:36 -0400, Devin Heitmueller wrote: On Mon, Jun 18, 2012 at 10:32 AM, David Dillow d...@thedillows.org wrote: Hmm, it sounds like perhaps changing the standby call in the tuner core to asynchronously power down the tuner may be the way to go -- ie, when we tell it to

[RFC] [media] cx231xx: restore tuner settings on first open

2012-06-17 Thread David Dillow
Without this patch, MythTV requires some workarounds to be able to capture analog TV on my HVR-850. I need to keep the v4l device open via 'sleep 365d /dev/video0' or some other mechanism or there will be no recording. Also, I need to run vq4l2 and change the standard away and back to NTSC or