On Sat, Jun 27, 2009 at 8:17 PM, Andy Walls<awalls@xxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html