Embodiment
For the electronic equipment with dual camera (as, mobile phone with dual camera), different camera modules may be from different producers, when adopting identical sensor design in different camera modules, in prior art, each camera module is connected with a universal input and output port GPIO of primary processor respectively, two camera modules just need two universal input and output port at least, and the universal input and output port GPIO resource that takies is more.
For in the process of identification camera module, reduce and take universal input and output port GPIO resource, the embodiment of the present invention provides a kind of control method, system and electronic equipment of dual camera module, when adopting identical sensor design in different camera modules, can reduce the quantity that the camera module takies the universal input and output port of primary processor.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention at the every other embodiment that obtains.
Referring to Fig. 1, electrical block diagram for identification dual camera module system in prior art, this system comprises the first camera module 1, second camera module 2 and primary processor 3, wherein, the power control terminal mouth 11(of the first camera module 1 namely, powder Down port) and the power control terminal mouth 21 of second camera module 2 be connected with a universal input and output port GPIO in primary processor 3 respectively; The sign port of the first camera module 1 (also claiming sign identification port or ID port) 12 is connected with first universal input and output port (GPIO port) 31 of primary processor 3; The reseting port 13 of the first camera module 1 is connected with the second universal input and output port 33 of primary processor 3; The sign port 22 of second camera module 2 is connected with the 3rd general input/output port 33 of primary processor 3; The reseting port 23 of second camera module 2 is connected with input/output port 34 with the four-way of primary processor 3.
Need to prove, in this dual camera module system, adopt identical sensor design in different camera modules, therefore can not identify this camera module in this case by internal integrate circuit bus, the process of identification camera module is specially: when the current potential of setting the power control terminal mouth of certain camera module when primary processor is operating state, this camera module can receive and respond the corresponding operating order, control the signal of the reseting port of this camera module by universal input and output port, start this camera module; Afterwards, read this camera module of state recognition of sign port by the universal input and output port that is connected with the sign port, in order to identify producer's model of this camera module etc., call setup code corresponding to this camera module, complete the initialization of camera module.
As seen in the prior art, in order to identify the camera module, complete the initialization of this camera module to call setup code corresponding to this camera module, the sign port of each camera module all need take a universal input and output port, simultaneously, when switching for the major and minor camera in dual camera, assurance is about to be in the steady operation of the camera module of startup, the reseting port of each camera module also needs respectively to take a universal input and output port, causes the resource of the universal input and output port that takies more.
In order to solve problems of the prior art, be the structural representation of an embodiment of control system of a kind of dual camera of the embodiment of the present invention referring to Fig. 2, the system of the present embodiment comprises: the first camera module 1, second camera module 2 and primary processor 3;
The power control terminal mouth 11 of the first camera module 1 and the power control terminal mouth 21 of second camera module 2 are connected with a universal input and output port in this primary processor 3 respectively;
Primary processor 3 is for the current potential of the power control terminal mouth 21 of the power control terminal mouth 11 of controlling the first camera module 1 and second camera module 2, as, primary processor can the first camera module the current potential of power control terminal mouth be set to high level, the current potential of the power control terminal mouth of second camera module is set to low level.For the operating state current potential of the power control terminal mouth of camera module can for: setting low level current potential is the operating state current potential; Also can set when the current potential of power control terminal mouth is high level is operating state.Certainly the concrete current potential of setting operating state is high level or low level, can select according to actual needs.
The first universal input and output port 31 of primary processor 3 is connected with the sign port one 2 of the first camera module 1 or the sign port 22 of second camera module 2 by the first control switch 4.
This first control switch 4 is used for controlling the first universal input and output port 31 and is communicated with the sign port one 2 of the first camera module 1 or the sign port 22 of second camera module 2.That is to say, can control the mode of communicating of the first control switch by primary processor, and then by the circuit turn-on of the first control switch 1 with 2 of the sign port ones of the first universal input and output port 31 and the first camera module 1, and the circuit of 22 of the sign ports of the first universal input and output port 31 and second camera module 2 is in off-state; Or by the circuit turn-on of the first control switch 1 with 22 of the sign ports of the first universal input and output port 31 and second camera module 2, with the circuit disconnection of 2 of the sign port ones of the first universal input and output port 31 and the first camera module 1.
Wherein, the first control switch can be a single-pole double-throw switch (SPDT) by processor control, this control procedure is specially, after the power control terminal mouth of certain camera module is set to operating state, processor can send this camera module of indication to the first control switch by the first universal input and output port (being the GPIO interface) and enter the signal of telecommunication of operating state, the first control switch just directly is connected with the sign port of this camera module after receiving this signal of telecommunication, thereby processor can be identified this camera module.
The embodiment of the present invention is connected the first universal input and output port by the first control switch with the sign port of the first camera module or the sign port of second camera module.When the first camera module when in running order, can the sign port of the first control switch with the first camera module be communicated with by primary processor, in order to pass through the first control switch with the circuit turn-on between the sign port of the first universal input and output port and the first camera module; Equally, when the second camera module is in running order, also can by the first control switch with the first universal input and output port with the circuit turn-on between the sign port of the first camera module.Because the first camera module and second camera module can be simultaneously not in running order, therefore can will make the sign port of the first camera module and the sign port of second camera module share a universal input and output port by control switch, and then save the quantity of universal input and output port.
In actual applications for when the dual camera module switches, the camera that guarantees operating state can be in stable state, the reseting port of camera module also needs to be connected with universal input and output port in processor, referring to Fig. 2, the reseting port 13 of the first camera module 1 is connected with the second universal input and output port 32 of primary processor 3; The reseting port 23 of second camera module 2 is connected with the 3rd general input/output port 33 of primary processor 3.
Need to prove, the first universal input and output port in various embodiments of the present invention, the second universal input and output port, the 3rd general input/output port are all the universal input and output port in primary processor.As broad as long in function, adopting it is divided into first, second, third universal input and output port is for clearer being described of energy.
In order further to reduce universal input and output port quantity in the primary processor that the camera module takies, a universal input and output port of primary processor can be connected with the reseting port of the first camera module or the reseting port of second camera module by a control switch, referring to Fig. 3, be the electrical block diagram of another embodiment of the control system of a kind of dual camera of the embodiment of the present invention, the system of the present embodiment comprises: the first camera module 1, second camera module 2 and primary processor 3;
The power control terminal mouth 11 of the first camera module 1 and the power control terminal mouth 21 of second camera module 2 are connected with a universal input and output port of primary processor 3 respectively; Primary processor 3 is for the current potential of the power control terminal mouth 21 of the power control terminal mouth 11 of controlling the first camera module 1 and second camera module 2;
The first universal input and output port 31 of primary processor 3 is connected with the sign port one 2 of the first camera module 1 or the sign port 21 of second camera module 2 by the first control switch 4; The first control switch 4 is used for controlling the first universal input and output port 31 and is communicated with the sign port one 2 of the first camera module 1 or the sign port 22 of second camera module 2.
The second universal input and output port 32 of primary processor 3 is connected with the reseting port 13 of the first camera module 1 or the reseting port 23 of second camera module 2 by the second control switch 5.This second control switch 5 is used for controlling being communicated with of reseting port 23 of the reseting port 13 of described the second universal input and output port 32 and described the first camera module 1 or described second camera module 2.In other words, between the reseting port of the reseting port of the second universal input and output port of primary processor and the first camera module and second camera module, the second control switch is set, control the mode of communicating of the second control switch by processor, the second control switch can be communicated with the reseting port of the first camera module, makes the circuit turn-on between the second universal input and output port of the reseting port of the first camera module and primary processor; Or second control switch be communicated with the reseting port of second camera module, make the reseting port of second camera module be communicated with the second universal input and output port of primary processor.Wherein, the second control switch is similar to the first control switch, and this second control switch also can be a single-pole double-throw switch (SPDT) by processor control.After the power control terminal mouth of certain camera module is set to operating state, processor can send this camera module of indication to the second control switch by the second universal input and output port and enter the signal of telecommunication of operating state, and the second control switch just directly is connected with the reseting port of this camera module after receiving this signal of telecommunication.
the present embodiment has been set up the second control switch on the basis of a upper embodiment, the reseting port of the first camera module and the reseting port of second camera all are connected with the second universal input and output port of primary processor by the second control switch, and control circuit turn-on state between the reseting port of the reseting port of the second universal input and output port and the first camera module or second camera module by the second control switch, therefore, the reseting port of two camera modules can share a universal input and output port, thereby reduced the quantity that takies universal input and output port.
Owing to may not knowing before the identification camera module whether two sensor model number designs in the camera module are identical, therefore also comprise in embodiments of the present invention: inner Integration Bus, this inside Integration Bus is connected between primary processor and the first camera module and second camera module, namely, by an inner Integration Bus with primary processor and the first camera module, and primary processor is connected with the second camera module, and the address of inner Integration Bus is used for distinguishing the transducer in the first camera and second camera module.Can corresponding different Integration Bus address, inside due to the transducer in different camera modules, utilize successively inner Integration Bus address can distinguish transducer in different camera modules, thereby identify different camera modules.
Need to prove, in dual camera control system in the present invention, the first camera module and second camera module are identified, and can be processor to what the current potential of the power control terminal mouth of camera module was controlled, also can be the part of functions module of processor.
To be arranged on dual camera control system in mobile phone as example, what in processor, the potential state of the power control terminal mouth of the first camera module and second camera module is controlled can be mobile phone Analog Baseband chip in processor, can be also a part in mobile phone Analog Baseband chip.Can realize control to the module image induction chip in the first camera module and second camera module by the current potential that two camera modules in mobile phone are set, this module image induction chip is connected with the power control terminal mouth.
After the power control terminal mouth of certain camera module is set to operating state, mobile phone Analog Baseband chip in processor can be connected with the sign port of this camera module by the first universal input and output port, thereby this Analog Baseband chip is identified this camera module by the first universal input and output port.
Further, this Analog Baseband chip also is connected with the reseting port of this camera module by the second universal input and output port.
The embodiment of the present invention also provides a kind of electronic equipment of dual camera, and this electronic equipment is built-in with the as above described dual camera control system of embodiment.This electronic equipment can for the mobile terminal with dual camera such as mobile phone, PDA, also can be other electronic equipments with dual camera.
Device described above or system embodiment are only schematic, wherein said unit as the separating component explanation can or can not be also physically to separate, the parts that show as the unit can be or can not be also physical locations, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of module to realize the purpose of the present embodiment scheme.Those of ordinary skills namely can understand and implement in the situation that do not pay creative work.
Control system based on the dual camera of the embodiment of the present invention, the embodiment of the present invention also provides a kind of control method of dual camera, referring to Fig. 4, be the schematic flow sheet of an embodiment of the control method of a kind of dual camera of the present invention, the method for the present embodiment comprises:
Step S401: the camera module of selecting to need to start in the first camera module and second camera module is as target camera module;
System with dual camera, as mobile phone etc., generally can select one of them to operate at two cameras when using camera, therefore according to user's demand, primary processor is selected a camera module to be started in the first camera module and second camera module, the camera module that this is to be started is as target camera module.certainly, at primary processor in the first camera module and second camera module before the select target camera, may receive user's selection instruction, primary processor receives this instruction, and the required camera module of selection user, as being the camera module of use of taking pictures when the first camera module, when the user need to take pictures, the user can send the instruction of selecting camera by the operations such as button of pressing in the dual camera system, the Instruction Selection first camera module of primary processor meeting User is as target camera module, and be the operating state current potential with the potential setting of the power control terminal mouth of the first camera module.
Step S402: be the operating state current potential with the potential setting of the power control terminal mouth of target camera module;
Primary processor is the current potential that the power control terminal mouth of the first camera module and second camera module is set standby signal, in order to set the first camera module or the second camera module enters operating state.For example, when the standby signal of setting the first camera module was operating state, the first camera module carried out operating state, and carried out the operation such as initialization; The second camera module was in and treated operating state this moment, until primary processor is when setting the standby signal of second camera module and being operating state, the second camera module just enters operating state.
Selected target camera module in the first camera module and second camera module after, primary processor just can be directly be made as the operating state current potential with the current potential of the standby signal of target camera module.
Step 403: the first control switch is communicated with the sign port of described camera module, in order to pass through the first control switch with the circuit turn-on between the sign port of the first universal input and output port and target camera module.
When the current potential of the standby signal of target camera module is the operating state current potential, primary processor can switch to the first control switch the state that is communicated with the sign port of target camera module, and the sign port of target camera module and the circuit between the first control switch are in conducting state.Because an end of the first control switch is communicated with the first universal input and output port of primary processor all the time, therefore, can be with the circuit turn-on between the sign port of the first universal input and output port of primary processor and target camera module by the first control switch.
When the first universal input and output port with after the sign port of target camera module is communicated with, primary processor just can read by the first universal input and output port the identification information of the sign port of target camera module, and utilizes the identification information that reads that target camera module is identified.In other words, read the identification information of the sign port of target camera module by the first universal input and output port, and then can identify type information of this target camera module etc., as producer's model of this first camera module etc., and call setup code corresponding to this first camera module, complete the initialization of the first camera module.
Need to prove, the operating state current potential of the standby signal of camera module can for: the current potential of setting the power control terminal mouth is the operating state current potential when being low level; Also can set when the current potential of power control terminal mouth is high level is the operating state current potential, and certainly concrete setting operating state current potential is high level or low level, can select according to actual needs.
In order further to reduce universal input and output port quantity in the primary processor that the camera module takies, a universal input and output port of primary processor can be connected with the reseting port of the first camera module or the reseting port of second camera module by another control switch, referring to Fig. 5, be the flow chart of steps of another embodiment of the control method of a kind of dual camera of the present invention, the present embodiment comprises the following steps:
Step S501: the camera module of selecting to need to start in the first camera module and second camera module is as target camera module;
Step S502: be the operating state current potential with the potential setting of the power control terminal mouth of described target camera module;
Step S503: the reseting port of the second control switch with target camera module is communicated with so that by described the second control switch with the circuit turn-on between the reseting port of the second universal input and output port and target camera module;
By the second control switch with the circuit turn-on between the reseting port of the second universal input and output port and target camera module after, primary processor starts the relevant hardware that resets of target camera by the second universal input and output port, in order to for carrying out the identification of camera module, complete initialization and prepare.
Step S504: the first control switch is communicated with the sign port of described camera module, in order to pass through the first control switch with the circuit turn-on between the sign port of the first universal input and output port and target camera module.
Further, due to before the identification camera module, primary processor may not know whether two sensor model number designs in the camera module etc. are identical, after the potential setting with the power control terminal mouth of target camera module is the operating state current potential, also comprises:
Whether judgement can identify the sensor model number of target camera module by the address of internal integrate circuit bus, if not, the sign port of the first control switch with target camera module is communicated with.This process concrete can for: when the current potential of the standby signal of the first camera module is the operating state current potential, whether judgement can identify the sensor model number of the first camera module by the address of internal integrate circuit bus, if not, the sign port of the first control switch with the first camera module is communicated with, in order to read the sign port status by the first use input/output port, the first camera module identified;
When the current potential of the standby signal of second camera module is the operating state current potential, whether judgement can identify the sensor model number of the first camera module by the internal integrate circuit bus address, if not, the first control switch is communicated with the sign port of second camera module, just reads the sign port status by the first universal input and output port the second camera module is identified.
Description by above embodiment of the method, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out all or part of step of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: the various media that can be program code stored such as read-only memory (ROM), random-access memory (ram), magnetic disc or CD.
In several embodiment that the application provides, should be understood that, disclosed system, apparatus and method not surpassing in the application's spirit and scope, can realize in other way.Current embodiment is a kind of exemplary example, should be as restriction, and given particular content should in no way limit the application's purpose.For example, the division of described unit or subelement is only that a kind of logic function is divided, and during actual the realization, other dividing mode can be arranged, and for example a plurality of unit or a plurality of subelement combine.In addition, a plurality of unit can or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.
In addition, institute's descriptive system, the schematic diagram of apparatus and method and different embodiment, in the scope that does not exceed the application, can with other system, module, technology or method in conjunction with or integrated.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The above is only the specific embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.