Summary of the invention
In view of above content, be necessary to provide a kind of mobile device, its mobile device acoustic pattern under talking state and holding state that can automatically switch.
In addition, also be necessary to provide a kind of sound mode switching method, its mobile device acoustic pattern under talking state and holding state that can automatically switch.
A kind of mobile device is equipped with proximity sensor or optical sensor in this mobile device, this mobile device comprises: degree of approach judge module is used to judge whether to receive the reflected signal that proximity sensor sends; The light source judge module, whether the brightness of the environment light source that is used to judge that optical sensor sends is less than the threshold values of setting; The acoustic pattern handover module, be used for when mobile device during in talking state, if receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is then switched mobile device to receiver mode less than the threshold values of setting; If do not receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is more than or equal to the threshold values of setting, and then the acoustic pattern with mobile device switches to speaker mode; Described acoustic pattern handover module, also be used for when mobile device during at holding state, if receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is less than the threshold values of setting, and then the acoustic pattern with mobile device switches to silent mode; If do not receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is more than or equal to the threshold values of setting, and then the acoustic pattern with mobile device switches to bell mode.
A kind of sound mode switching method of mobile device, this mobile device is equipped with proximity sensor or light source sensor, this method comprises the steps: when mobile device is in talking state, if receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is then switched mobile device to receiver mode less than the threshold values of setting; If do not receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is more than or equal to the threshold values of setting, and then the acoustic pattern with mobile device switches to speaker mode; When mobile device is in holding state, if receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is less than the threshold values of setting, and then the acoustic pattern with mobile device switches to silent mode; If do not receive the reflected signal that proximity sensor sends, or the brightness of the environment light source that sends of optical sensor is more than or equal to the threshold values of setting, and then the acoustic pattern with mobile device switches to bell mode.
Compared to prior art, described mobile device and sound mode switching method thereof, the acoustic pattern of mobile device under talking state and holding state can automatically switch.
Embodiment
As shown in Figure 1, be the structural representation ofmobile device 2 of the present invention.This mobile device 2 (present embodiment is that example describes with the mobile phone) mainly comprisescontroller 20, proximity sensor (Proximity sensor) 21, optical sensor (Light sensor) 22,receiver 23,loud speaker 24,keypad 25 andloudspeaker 26 etc.In the present embodiment, describedproximity sensor 21,optical sensor 22 andreceiver 23 are installed together (consulting the description among Fig. 4), in other embodiments, describedproximity sensor 21 andoptical sensor 22 also can be installed in other appropriate location of mobile device 2.In the present embodiment, describedreceiver 23 is meant the receiver in the mobile phone, is used to receive calls.Describedkeypad 25 can be the keypad in the mobile phone etc.Describedloudspeaker 26 is used to enlarge the volume of mobile phone, and plays back byloud speaker 24.
Describedproximity sensor 21 is used to detect the reflected signal ofobject 1, and sends the signal that detects to controller 20.Describedoptical sensor 22 is used to detect the brightness of environment light source 3, and sends the data that detect to controller 20.
Describedcontroller 20 is used for the acoustic pattern of the data automatic switchovermobile device 2 that detects according toproximity sensor 21 andoptical sensor 22, and the operation of controllingreceiver 23,loud speaker 24,keypad 25 and loudspeaker 26.For example,controller 20control loudspeakers 24 are sounded, and receive the data ofkeypad 25 inputs etc.
As shown in Figure 2, be the functional block diagram of controller shown in Fig. 1 20.Wherein, describedcontroller 20 comprises condition judgment module 201, degree of approach judge module 202, light source judge module 203 and sound mode switch module 204.The alleged module of the present invention is a computer program code segments of finishing a specific function, is more suitable for therefore below the present invention software description all being described with module in describing the implementation of software in computer than program.
Described condition judgment module 201 is used to judgemobile device 2 residing states, and described state comprises talking state and holding state etc.Under the default situations,mobile device 2 is a holding state, calls in as phone, and after the user presses inkeypad 25 and answers key, condition judgment module 201 will receive the signal that this button is pressed, and judges thatmobile device 2 is a talking state.
Described degree of approach judge module 202 is used to judge whether to receive the reflected signal thatproximity sensor 21 sends, if receive the reflected signal thatproximity sensor 21 sends, then expression has object near mobile device 2.For example, when the user receives calls, if theclose proximity sensor 21 of ear, then degree of approach judge module 202 will receive the reflected signal thatproximity sensor 21 sends.
Whether the brightness of the environment light source 3 that described light source judge module 203 is used to judge thatoptical sensor 22 sends less than the threshold values of setting, if the brightness of environment light source 3 less than the threshold values of setting, then expression has object near mobile device 2.For example, when the user receives calls, if ear nearoptical sensor 22, then the brightness of the environment light source 3 that detects ofoptical sensor 22 will diminish.
Described acoustic pattern handover module 204 is used for whenmobile device 2 during in talking state, if ear is nearmobile device 2, then the acoustic pattern withmobile device 2 switches to receiver mode A, if ear away frommobile device 2, then the acoustic pattern withmobile device 2 switches to speaker mode B.Under receiver mode A, In Call is less than the In Call of speaker mode B.
Described acoustic pattern handover module 204 also is used for whenmobile device 2 during at holding state, if object is arranged nearmobile device 2, then the acoustic pattern withmobile device 2 switches to silent mode D, if do not have object nearmobile device 2, then the acoustic pattern withmobile device 2 switches to bell mode C.Under silent mode D,, will remind the user with vibration mode if whenmobile device 2 receives the information that other electronic installation (as mobile phone) sends over.
For example, as shown in Figure 3, be the state diagram that acoustic pattern handover module 204 switches between the alternative sounds pattern.When the user answers one when taking on the telephone,mobile device 2 enters talking state, ifproximity sensor 21 detects the brightness of the reflected signal ofobject 1 or the environment light source 3 thatoptical sensor 22 detects less than the threshold values of setting (being that ear is near arriving mobile device 2), then the acoustic pattern withmobile device 2 switches to receiver mode A (consulting shown in Fig. 4 A); Ifproximity sensor 21 does not detect the threshold values (being that ear is away from mobile device 2) that the brightness of the reflected signal ofobject 1 or the environment light source 3 thatoptical sensor 22 detects surpasses (comprise and equaling) setting, then the acoustic pattern withmobile device 2 switches to speaker mode B (consulting shown in Fig. 4 B).Consulting Fig. 4 A and Fig. 4 B is described, is mobile device switches acoustic pattern under talking state instance graph.Wherein,proximity sensor 21,optical sensor 22,receiver 23,loud speaker 24 and printed circuit board (PCB) (Printed Circuit Board, PCB) 27 etc. are installed in themobile device 2.
Whenmobile device 2 during at holding state, ifproximity sensor 21 detects the brightness of the reflected signal ofobject 1 or the environment light source 3 thatoptical sensor 22 detects less than the threshold values of setting (object promptly being arranged near mobile device 2), then the acoustic pattern withmobile device 2 switches to silent mode D; (consulting shown in Fig. 5 A) ifproximity sensor 21 does not detect the threshold values (promptly not having object near mobile device 2) that the brightness of the reflected signal ofobject 1 or the environment light source 3 thatoptical sensor 22 detects surpasses (comprise and equaling) setting, then the acoustic pattern withmobile device 2 switches to bell mode C (consulting shown in Fig. 5 B).Consulting Fig. 5 A and Fig. 5 B is described, is mobile device switches acoustic pattern under holding state instance graph.
As shown in Figure 6, be the flow chart of sound mode switching method preferred embodiment of the present invention.
Step S1, condition judgment module 201 is judgedmobile device 2 residing states, described state comprises talking state and holding state etc.
Whether step S2 ifmobile device 2 is in talking state, then judges ear nearmobile device 2 by degree of approach judge module 202 or light source judge module 203, if the closemobile device 2 of ear, execution in step S3 then, otherwise, execution in step S4.
Particularly, if degree of approach judge module 202 receives the reflected signal thatproximity sensor 21 sends, or the brightness that light source judge module 203 is judged the environment light source 3 thatoptical sensor 22 sends represents then that less than the threshold values of setting ear is near mobile device 2.If degree of approach judge module 202 does not receive the reflected signal thatproximity sensor 21 sends, or light source judge module 203 judges that the brightness of the environment light source 3 thatoptical sensor 22 sends surpasses the threshold values of (comprise and equaling) setting, represents that then ear is away frommobile device 2.
Step S3, acoustic pattern handover module 204 switches to receiver mode A with the acoustic pattern ofmobile device 2.
Step S4, acoustic pattern handover module 204 switches to speaker mode B with the acoustic pattern ofmobile device 2.
Step S5 ifmobile device 2 is in holding state, has then judged whether object nearmobile device 2 by degree of approach judge module 202 or light source judge module 203, if object is arranged nearmobile device 2, and execution in step S6 then, otherwise, execution in step S7.
Particularly, if degree of approach judge module 202 receives the reflected signal thatproximity sensor 21 sends, or the brightness that light source judge module 203 is judged the environment light source 3 thatoptical sensor 22 sends then represents to have the closemobile device 2 of object less than the threshold values of setting.If degree of approach judge module 202 does not receive the reflected signal thatproximity sensor 21 sends, or light source judge module 203 judges that the brightness of the environment light source 3 thatoptical sensors 22 send surpasses the threshold values that (comprise and equaling) set, and then expression does not have object nearmobile device 2.
Step S6, acoustic pattern handover module 204 switches to silent mode D with the acoustic pattern ofmobile device 2.
Step S7, acoustic pattern handover module 204 switches to bell mode C with the acoustic pattern ofmobile device 2.
In the present embodiment, describedmobile device 2 is a mobile phone, and in other embodiments, describedmobile device 2 also can have the electronic equipment of Data Processing function for PDA (Personal Digital Assistant, personal digital assistant) etc.
It should be noted that at last, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not break away from the spirit and scope of technical solution of the present invention.