1. Technical Field
Embodiments of the present disclosure relate to audio technology, and more particularly to an electronic device and a method for enabling an open mobile terminal platform (OMTP) headset and a standard headset to be compatible.
2. Description of Related Art
Open mobile terminal platform (OMTP) is an industry group sponsored by mobile operators and manufacturers interested in supporting universally standard product specifications across the industry. The OMTP specification for 4-pole 3.5 mm headsets, switches the ground (GND) and MIC pins. As shown in
If connecting a standard headset into an OMTP headset socket or connecting an OMTP headset into a standard headset socket, a user may have the following experiences:
Thus, compatibility between the OMTP headset and the standard headset is desired.
The headset socket 20 includes a L audio slot 21, a R slot 22, a first slot 23, and a second slot 24. The first slot 23 and the second slot 24 may respectively be a MIC slot and a GND slot, or respectively be a GND slot and a MIC slot according to a headset plugged into the headset socket 20 is an OMTP headset or a standard headset. That is, if an OMTP headset is plugged into the headset socket 20, the first slot 23 and the second slot 24 are a MIC slot and a GND slot respectively. If a standard headset is plugged into the headset socket 20, the first slot 23 and the second slot 24 are a GND slot and a MIC slot respectively.
The switch unit 30 includes a first switch 31 and a second switch 32. Each of the first switch 31 and the second switch 32 includes a moving contact and two stationary contacts.
The detection unit 10 connects with the L audio slot 21 of the headset socket 20, and detects if a headset has been plugged into the headset socket 20. When a L audio pin of a headset touches with the L audio slot 21, the detection unit 10 may detect a change from a high level to a low level in the circuit between the detection unit 10 and the headset socket 20, thus, the detection unit 10 determines that there is a headset being plugged into the headset socket 20.
The L audio slot 21 and the R audio slot 22 connects with the processor unit 60, and receives audio data, such as music, from the processor unit 60.
The first slot 23 connects with the first moving contact 310 of the first switch 31, and the second slot 24 connects with the second moving contact 320 of the second switch 32.
The first switch 31 and the second switch 32 connect with the control unit 50. The first stationary contact 311 of the first switch 31 and the fourth stationary contact 322 of the second switch 32 connect with ground. The second stationary contact 312 of the first switch 31 and the third stationary contact 321 of the second switch 32 connect with the processor unit 60 and the A/D converter 40.
The control unit 50 controls the first moving contact 310 to contact with the first stationary contact 311 in the first switch 31 and the second moving contact 320 to contact with the third stationary contact 321 in the second switch, or controls the first moving contact 310 to contact with the second stationary contact 312 in the first switch 31 and the second moving contact 320 to contact with the fourth stationary contact 322 in the second switch 32.
As seen in
The A/D converter 40 measures a bias voltage in the circuit between the A/D converter 40 and the switch unit 30. The bias voltage is used to determine if a current switch status of the electronic device 1 matches with a headset that is plugged into the headset socket 20. The electronic device 1 may include a first and a second switch status. The first switch status of the electronic device 1 may be defined as the first moving contact 310 contacting with the first stationary contact 311 in the first switch 31 and the second moving contact 320 contacting with the third stationary contact 321 in the second switch 32. The second switch status of the electronic device 1 may be defined as the first moving contact 310 contacting with the second stationary contact 312 in the first switch 31 and the second moving contact 320 contacting with the fourth stationary contact 322 in the second switch 32.
If the bias voltage approaches 1 Volt, it is determined that the current switch status of the electronic device 1 matches with a headset plugged into the headset socket 20. That is, the current switch status of the electronic device 1 is the first switch status and the headset plugged into the headset socket 20 is a standard headset. Otherwise, the current switch status of the electronic device 1 is the second switch status and the headset plugged into the headset socket 20 is an OMTP headset.
If the bias voltage approaches 0 Volt, it is determined that the current switch status of the electronic device 1 does not match with a headset plugged into the headset socket 20. That is, the current switch status of the electronic device 1 is the first switch status while the headset plugged into the headset socket 20 is an OMTP headset. Otherwise, the current switch status of the electronic device 1 is the second switch status while the headset plugged into the headset socket 20 is a standard headset.
When the current switch status of the electronic device 1 does not match with the headset plugged into the headset socket 20, the control unit 50 needs to set another switch status for the electronic device 1.
In step S10, the processor unit 60 controls the control unit 50 to set a first switch status for the electronic device 1. As mentioned above, the first switch status is defined as the first moving contact 310 contacting with the first stationary contact 311 in the first switch 31 and the second moving contact 320 contacting with the third stationary contact 321 in the second switch 32.
In step S11, the processor unit 60 controls the detection unit 10 to detect a change from a high level to a low level in the circuit between the detection unit 10 and the headset socket 20. Step S12 is implemented if the detection unit 10 detects such change. Otherwise, step S11 is repeated if the detection unit 10 does not detect such change.
In step S12, the processor unit 60 determines that there is a headset being plugged into the headset socket 20. The headset may be a OMTP headset or a standard headset.
In step S13, the processor unit 60 turns on a bias voltage in the circuit between the A/D converter 40 and the switch unit 30.
In step S14, the processor unit 60 controls the A/D converter 40 to measure the bias voltage.
In step S15, the processor unit 60 determines if the headset plugged into the headset socket 20 matches with the first switch status according to the bias voltage. When the bias voltage approaches 1 Volt, it is determined that the headset plugged into the headset socket 20 matches with the first switch status, and then step S17 is implemented. Otherwise, when the bias voltage approaches 0 Volt, it is determined that the headset plugged into the headset socket 20 does not match with the first switch status, then step S16 is implemented.
In step S16, the processor unit 60 controls the control unit 50 to set a second switch status for the electronic device 1. As mentioned above, the second switch status is defined as the first moving contact 310 contacting with the second stationary contact 312 in the first switch 31 and the second moving contact 320 contacting with the fourth stationary contact 322 in the second switch 32. In the present embodiment, the second switch status must match with the headset plugged into the headset socket 20, and then step S17 is implemented.
In step S17, the headset plugged into the headset socket 20 outputs the audio data received from the processor unit 60
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
201210038109.5 | Feb 2012 | CN | national |