Camera standby mode issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Camera standby mode issue

1,904 Views
veeranjaneyulug
Contributor III

Hi Every one,

I'm using  linux kernel 3.14.28 version ,ov5640_mipi camera ,yocto setup 1.7 version ,imx6 platform.How can I put camera into stand by mode while streaming .If any body knows please guide me.Or I dont know specific software standby register .In ov5640 data sheet they clearly given only software reset and software power down(reg is 0x3008).

Need to add any support code in driver ? in ov5640_mipi.c file

ov5640_probe() function,ov5640_power on ,reset standby mode and all given .but i dont know when camera is power on and power off.what about mipi camera default state ? mipi camera gpio pin Number?.

Can you any explain me.

Thanks & Regards

veeranjaneyulu

0 Kudos
Reply
5 Replies

1,435 Views
igorpadykov
NXP Employee
NXP Employee

Hi veeranjaneyulu

when put in standby mode, camera will not send data, so

it is not very clear requirement : "How can I put camera into stand by mode

while streaming". Regarding OV5640 low power modes:

two suspend modes are available for OV5640:

- hardware standby

- SCCB software sleep

To initiate hardware standby mode, the PWDN pin must be tied high. When this

occurs, the OV5640 internal device clock is halted and internal counters are reset and

registers are maintained.

Executing a software power down through the SSB interface suspends internal

circuitry activity but does not halt the device clock. All register content is maintained

in standby mode.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,435 Views
veeranjaneyulug
Contributor III

Hi igor,

Our requirement is we are getting data from gstreamer pipelines .we are not getting data from gstreamer that time only our camera will be going into sleep mode.

How to control camera standby mode api by using sysfs entry .In driver source code we added standby mode sysfs entry stuff.

static ssize_t ov5640_mipi_standby(struct device *dev, struct device_attribute *attr, char *buf,size_t size)

{

        unsigned long val;

        pr_info("ov5640_mipi_standby\n");

        if (strict_strtoul(buf, 10, &val))

                return -EINVAL;

        switch(val){

               case  0 : ov5640_write_reg(0x3008, 0x42);

                         break;

               case  1 : ov5640_write_reg(0x3008, 0x82);

                         break;

               default : pr_err("Standby invalid range request: %lu, discarded\n", val);

                         return -EINVAL;

        }

        pr_info("VEERA:%s\n",__func__);

        return size;

}

static struct kobj_attribute standby =

__ATTR(saturation_ctrl, 0666, NULL, ov5640_mipi_standby);

static struct attribute *attributes_ov5640_mipi[] = {

        &brightness.attr,

        &contrast.attr,

        &hue.attr,

        &saturation.attr,

        &standby.attr,

        NULL,

};

like that previous we have control camera brightness and saturation ,hue etc by using sysfs entrys through test application.

0 Kudos
Reply

1,435 Views
veeranjaneyulug
Contributor III

Thanks for your mail.That one i know but how to know when camera is powerdown and reset ? in driver code ?

0 Kudos
Reply

1,435 Views
veeranjaneyulug
Contributor III

Camera standby mode means when we are running video streaming through control application.so we will put into camera standby mode by using sysfs calls. Those sysfs/ioctl call used in out control application.

0 Kudos
Reply

1,435 Views
veeranjaneyulug
Contributor III

From ov5640_standby() and ov5640_reset() pwn we know ov5640_mipi powerdown gpio pin num 19 and power reset gpio pin 20.how to control camera standby/power api through test application/sysfs.

Thanks

veeranjaneyulu

0 Kudos
Reply