1. Technical Field
The present disclosure relates to electronic device, and particularly relates to an electronic device having built-in earphone.
2. Description of the Related Art
Commonly, electronic devices include earphone jacks for receiving a earphone when users privately listens audio files. The users must take out the earphone from the earphone jack when he or she wants to listen audio files with loudspeaker of the electronic device, which results in inconvenience for the users.
Therefore, there is room for improvement within the art.
The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The second switch 17 is connected between the audio playing unit 18 and the detecting unit 13. The processing unit 11 is connected to the first switch unit 16 via the interface unit 12. The second switch 17 is turned on when the audio playing unit 18 is received in the housing 100 of the electronic device 10, and turned off when the audio playing unit 18 is taken out from the housing 100. The detecting unit 13 determines whether the audio playing unit 18 is received in the housing 100 or not according to whether the second switch 17 is turned on or off, and generates a detecting signal correspondingly. The processing unit 11 generates a switch control signal in response to the detecting signal generated by the detecting unit 13, transmits the switch control signal to the first switch 16 via the interface unit 12. The first switch 16 is switched to a first connecting path or a second connecting path in response to the switch control signal generated by the processing unit 11. The first connecting path is from the processing unit 11 to the earphone driving unit 14 via the first switch 16, and the second connecting path is from the processing unit 11 to the loudspeaker driving unit 15 via the first switch 16. The processing unit 11 transmits audio signal to the earphone driving unit 14 via the first connecting path or to the loudspeaker driving unit 15 via the second connecting path.
When the earphone driving unit 14 receives the audio signal transmitted from the processing unit 11, the earphone driving unit 14 adjusts a power of the audio signal to a relatively lower level to match a earphone, and drives the audio playing unit 18 to play the audio signal in the relatively lower level power. When the loudspeaker driving unit 18 receives the audio signal transmitted from the processing unit 11, the loudspeaker driving unit 18 adjusts a power of the audio signal to a relatively higher level that matches a loudspeaker, and drives the audio playing unit 18 to play the audio signal in the relatively higher power. In the embodiment, the audio playing unit 18 is a earphone, which is connected to the second switch 17 via cord.
In the embodiment, the interface unit 12 is an I2S interface unit.
When the audio playing unit 18 is received in the housing 100 of the electronic device 10, the second switch 17 is triggered to be closed by the audio playing unit 18 which results in the second switch 17 being turned on. The detecting unit 13 generates a first detecting signal when detects the second switch 17 is turned on. The processing unit 11 generates a first switch control signal in response to the first detecting unit, and transmits the first switch control signal to the first switch 16 via the interface unit 12. A switch terminal of the first switch 16 is switched to connect the loudspeaker driving unit 15 in response to the first switch control signal, which results in connecting the processing unit 11 to the loudspeaker driving unit 15 via the first switch 16. Then, the processing unit 11 transmits the audio signal via cord 151 and 152 to the loudspeaker driving unit 15. The loudspeaker driving unit 15 drives the audio playing unit 18 to play the audio signal in the adjusted power, thereby the audio playing unit 18 plays audio signal as a loudspeaker when the audio playing unit 18 is received in the housing 100.
When the audio playing unit 18 is taken out from the housing 100 of the electronic device 10, the second switch 17 is released to be opened by the audio playing unit 18 which results in the second switch 17 being turned off. The detecting unit 13 generates a second detecting signal when detecting the second switch 17 is turned off. The processing unit 11 generates a second switch control signal in response to the second detecting unit, and transmits the second switch control signal to the first switch 16 via the interface unit 12. The switch terminal of the first switch 16 is switched to connect the earphone driving unit 14 in response to the second switch control signal, which results in connecting the processing unit 11 to the earphone driving unit 14 via the first switch 16. Then, the processing unit 11 transmits the audio signal via a wire 140 to the earphone driving unit 14. The earphone driving unit 14 drives the audio playing unit 18 to play the audio signal in the adjusted power, thereby the audio playing unit 18 plays audio signal as a earphone when the audio playing unit 18 is taken out from the housing 100.
It is understood that the present disclosure may be embodied in other forms without departing from the spirit thereof. The present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the disclosure is not to be limited to the details given herein.
Number | Date | Country | Kind |
---|---|---|---|
2012105177371 | Dec 2012 | CN | national |