Power control for an image sensor
The present disclosure relates to methods and apparatus for power control of a computing device including an image sensor. An example method includes receiving, from an application running on the computing device, a camera close call; receiving, from the application, an indication of the context of the camera close call; and based on the context of the camera close call, setting an operation mode of at least one of the processor or the bus.
1 . A method of power control of a computing device comprising a processor and a bus, the method comprising:
receiving, from an application running on the computing device, a camera close call, wherein the camera close call is an application programming interface (API) call to an API of a framework running on the computing device;
issuing a camera close event, based on the camera close call, to an interface between the framework and a camera driver, wherein the interface communicates with the camera driver configured to control a camera sensor of the computing device;
receiving, from the application, context information indicating whether the camera close call is associated with a close of the camera or a mode switch of the camera;
issuing a callback to the application, based on the camera close call, to determine the context of the camera close call, wherein the callback is issued by the interface in response to the camera close event; and
based on the context information, setting an operation mode of at least one of the processor or the bus.
2 . The method of claim 1 , wherein based on the context information, setting the operation mode of the at least one of the processor or the bus comprises:
in response to the context information indicating the camera close call is associated with the close of the camera, setting the operation mode of the at least one of the processor or the bus to a first operation mode; and
in response to the context information indicating the camera close call is associated with the mode switch of the camera, setting the operation mode of the at least one of the processor or the bus to a second operation mode.
3 . The method of claim 2 , wherein the second operation mode corresponds to operating the processor at a higher frequency than the first operation mode.
4 . The method of claim 2 , wherein the context information indicating the camera close call is associated with the mode switch comprises context information indicating the camera close call is associated with at least one of: a change between a standard dynamic range mode and a high dynamic range mode, a change between capturing still images and capturing video, or a change between a first camera sensor and a second camera sensor.
5 . The method of claim 2 , wherein the context information indicating the camera close call is associated with the close of the camera comprises context information indicating the camera close call is associated with at least one of: input on a close button of the computing device or input on a home button of the computing device.
6 . The method of claim 1 , further comprising:
after setting the operation mode, deallocating resources for a camera sensor of the computing device.
7 . A computing device comprising:
a bus;
one or more memories comprising computer-executable code; and
one or more processors configured to execute the computer-executable code to cause the computing device to:
receive, from an application running on the computing device, a camera close call, wherein the camera close call is an application programming interface (API) call to an API of a framework running on the computing device;
issue a camera close event, based on the camera close call, to an interface between the framework and a camera driver, wherein the interface communicates with the camera driver configured to control a camera sensor of the computing device;
receive, from the application, context information indicating whether the API camera close call is associated with a close of the camera or a mode switch of the camera;
issue a callback to the application, based on the camera close call, to determine the context of the camera close call, wherein the callback is issued by the interface in response to the camera close event; and
based on the context information, set an operation mode of at least one of the one or more processors or the bus.
8 . The computing device of claim 7 , wherein based on the context information, to set the operation mode of the at least one of the one or more processors or the bus, the one or more processors are configured to cause the computing device to:
in response to the context information indicating the camera close call is associated with the close of the camera, set the operation mode of the at least one of the one or more processors or the bus to a first operation mode; and
in response to the context information indicating the camera close call is associated with the mode switch of the camera, set the operation mode of the at least one of the one or more processors or the bus to a second operation mode.
9 . The computing device of claim 8 , wherein the second operation mode corresponds to operating the processor at a higher frequency than the first operation mode.
10 . The computing device of claim 8 , wherein the context information indicating the camera close call is associated with the mode switch comprises context information indicating the camera close call is associated with at least one of: a change between a standard dynamic range mode and a high dynamic range mode, a change between capturing still images and capturing video, or a change between a first camera sensor and a second camera sensor.
11 . The computing device of claim 8 , wherein the context information indicating the camera close call is associated with the close of the camera comprises context information indicating the camera close call is associated with at least one of: input on a close button of the computing device or input on a home button of the computing device.
12 . The computing device of claim 7 , wherein the one or more processors are further configured to cause the computing device to:
after setting the operation mode, deallocate resources for a camera sensor of the computing device.
13 . A non-transitory computer readable medium storing instructions that, when executed by a computing device, cause the computing device to perform operations for power control, the operations comprising:
receiving, from an application running on the computing device, a camera close call, wherein the camera close call is an application programming interface (API) call to an API of a framework running on the computing device;
issuing a camera close event, based on the camera close call, to an interface between the framework and a camera driver, wherein the interface communicates with the camera driver configured to control a camera sensor of the computing device;
receiving, from the application, context information indicating whether the API camera close call is associated with a close of the camera or a mode switch of the camera;
issuing a callback to the application, based on the camera close call, to determine the context of the camera close call, wherein the callback is issued by the interface in response to the camera close event; and
based on the context information, setting an operation mode of at least one of a processor or a bus.