On Wed, Jun 15, 2011 at 4:37 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > But the driver has that information, so it should act accordingly. > > So on first open you can check whether the current input has a tuner and > power on the tuner in that case. On S_INPUT you can also poweron/off accordingly > (bit iffy against the spec, though). So in that case the first use case would > actually work. It does require that tuner-core.c supports s_power(1), of course. This will get messy, and is almost certain to get screwed up and cause regressions at least on some devices. > BTW, I noticed in tuner-core.c that the g_tuner op doesn't wake-up the tuner > when called. I think it should be added, even though most (all?) tuners will > need time before they can return anything sensible. Bear in mind that some tuners can take several seconds to load firmware when powered up. You don't want a situation where the tuner is reloading firmware continuously, the net result being that calls to v4l2-ctl that used to take milliseconds now take multiple seconds. > BTW2: it's not a good idea to just broadcast s_power to all subdevs. That should > be done to the tuner(s) only since other subdevs might also implement s_power. > For now it's pretty much just tuners and some sensors, though. > > You know, this really needs to be a standardized module option and/or sysfs > entry: 'always on', 'wake up on first open', 'wake up on first use'. That would definitely be useful, but it shouldn't be a module option since you can have multiple devices using the same module. It really should be an addition to the V4L API. 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