Hello everyone, Last few days, I've got a big question popping up handling white balance with V4L2_CID_WHITE_BALANCE_TEMPERATURE CID. Because in digital camera we generally control over user interface with pre-defined white balance name. I mean, user controls white balance with presets not with kelvin number. I'm very certain that TEMPERATURE CID is needed in many of video capture devices, but also 100% sure that white balance preset control is also necessary for digital cameras. How can we control white balance through preset name with existing V4L2 API? For now, I define preset names in user space with supported color temperature preset in driver like following. #define MANUAL_WB_TUNGSTEN 3000 #define MANUAL_WB_FLUORESCENT 4000 #define MANUAL_WB_SUNNY 5500 #define MANUAL_WB_CLOUDY 6000 and make driver to handle those presets like this. (I split in several ranges to make driver pretend to be generic) case V4L2_CID_WHITE_BALANCE_TEMPERATURE: if (vc->value < 3500) { /* tungsten */ err = ce131f_cmds(c, ce131f_wb_tungsten); } else if (vc->value < 4100) { /* fluorescent */ err = ce131f_cmds(c, ce131f_wb_fluorescent); } else if (vc->value < 6000) { /* sunny */ err = ce131f_cmds(c, ce131f_wb_sunny); } else if (vc->value < 6500) { /* cloudy */ err = ce131f_cmds(c, ce131f_wb_cloudy); } else { printk(KERN_INFO "%s: unsupported kelvin range\n", __func__); } ...... I think this way seems to be ugly. Don't you think that another CID is necessary to handle WB presets? Because most of mobile camera modules can't make various color temperatures in expecting kelvin number with user parameter. Any opinion will be appreciated. Regards, Nate -- 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