Patent Description:
Many electronic devices are connectable to external audio equipment. For example, mobile phones, tablet computers, notebook computers, can be connected to audio equipment, such as earphones/headphones, speakers, and headsets. Such audio equipment and electronic devices are usually connected via connector elements such as audio plugs and audio jack sockets. For example, many headphones have a <NUM> audio plug, which can be used to connect to a <NUM> audio jack socket provided by an electronic device.

Typically, electronic devices usually rely on some detection mechanisms to detect whether the audio plug has been inserted into the audio jack socket. Accordingly, the electronic device can perform some corresponding operations, such as interrupting or starting audio playback, switching audio playback from built-in speakers to external audio equipment, or avoiding popping sound caused by plugging and unplugging the audio plug. On the other hand, when water enters the audio jack socket, there may be conduction between contacts of the audio jack socket, which will further cause the electronic device to misjudge the insertion of the audio plug. As a result, the electronic devices will fail to properly control audio playback as the audio plug is plugged in or unplugged, or switch between the built-in speaker and the external audio equipment.

On the other hand, <NUM> audio plugs are usually two-ring three-pole type (TRS type) or three-ring four-pole type (TRRS type). The two-ring three-pole type <NUM> audio plug can be used to transmit stereo analog audio signals, while the three-ring four-pole type <NUM> audio plug cannot only transmit stereo analog audio signals, but also transmit a mono microphone signal. In addition, the three-ring four-pole type <NUM> audio jack comprises a CTIA type and an OMTP type depending on definition of its poles. Since these different types of <NUM> audio plugs are quite common, electronic devices also need to correctly identify the specific connector type, so as to correctly control the external audio equipment and identify signals on each pole of the audio plugs.

<CIT> teaches an output controlling circuit which can control the output of a signal to an audio jack socket. The output controlling circuit comprises a plurality of detection circuits coupled to contacts of the audio jack socket. When there is water ingress, there will be a short circuit between two or more contact, meaning that the other contacts will have a particular impedance value. By setting predetermined impedance ranges for the detection circuits and detecting impedance of the pins, a connector type of an audio plug inserted into the audio jack socket and a state of water ingress can be determined. When it is determined that water ingress has occurred, a power supply can be blocked. When an audio plug of a different connector type than a standard type is detected, a warning signal can be generated.

<CIT> teaches an audio jack detection circuit which uses an impedance detection circuit configured to generate an impedance between a ground pin and a ground detection pin coupled to a terminal of an audio jack socket. According to a result of the impedance detection, an open state, a water ingress state, and a jack insertion state of the audio jack socket can be determined. The audio jack detection circuit uses pull-up resistors to vary a detection range of the impedance detection circuit.

Although the above related arts can determine a state of water ingress and an insertion state of an audio jack socket, these related art methods require a plurality of detection circuits operating concurrently for generating a plurality of detection voltages, which increases power consumption.

In view of this, the present invention provides a state detection circuit for use in an audio interface to detect a connector type of audio equipment and a water ingress state of an audio jack socket in an audio interface. In embodiments of the present invention, by detecting a voltage cross two contacts of the audio jack socket that are connected to a first pole of an audio plug, it is determined whether ingress of water occurs in the audio jack socket. If it is determined that the ingress of water fails to occur, it is determined that the conductor entering the audio jack socket is the audio plug. Accordingly, embodiments of the present invention determine a connector type of the audio plug and a type of the audio equipment to which the audio plug belongs by detecting a voltage on a contact of the audio jack socket that is connected to a fourth pole of the audio plug. Since the present invention requires no extra contacts for state detection, it is suitable for existing audio jack sockets, and can also provide the ability of identifying different types of audio plugs and detecting the water ingress state of the audio jack socket.

As will be seen more clearly from the detailed description following below, a state detection device for use in an audio interface is disclosed. The state detection device comprises: a first voltage detection circuit, a second voltage detection circuit and a state determination circuit. The first voltage detection circuit is coupled to a first contact and a second contact of an audio jack socket, and configured to detect a voltage across the first contact and the second contact to generate a first detection value. The second voltage detection circuit is coupled to a third contact of the audio jack socket, and configured to detect a voltage on the third contact to generate a second detection value. The state determination circuit is coupled to the first voltage detection circuit and the second voltage detection circuit, configured to determine a water ingress state of the audio jack socket according to the first detection value and a first threshold, and determine a connector type of an audio plug that is inserted into the audio jack socket according to the second detection value. When the first detection value is higher than the first threshold, the state determination circuit determines that ingress of water occurs in the audio jack socket, and when the first detection value is lower than the first threshold, the state determination circuit determines that no ingress of water occurs in the audio jack socket, and determines that the audio plug is inserted into the audio jack socket. The second voltage detection circuit is activated only when the state determination circuit determines that no ingress of water occurs in the audio jack socket.

As will be seen more clearly from the detailed description following below, a state detection method for use in an audio interface is disclosed. The state detection method comprises: detecting a voltage across a first contact and a second contact of an audio jack socket to generate a first detection value; detecting a voltage on a third contact of the audio jack socket to generate a second detection value; and determining a water ingress state of the audio jack socket according to the first detection value and a first threshold, and determining a connector type of an audio plug that is inserted into the audio jack socket according to the second detection value. When the first detection value is higher than the first threshold, it is determined that ingress of water occurs in the audio jack socket, and when the first detection value is lower than the first threshold, it is determined that no ingress of water occurs in the audio jack socket, and it is determined that the audio plug is inserted into the audio jack socket. Detecting the voltage on the third contact to generate the second detection value is only performed when it is determined that no ingress of water occurs in the audio jack socket.

Claim <NUM> defines a state detection device according to the invention and claim <NUM> defines a state detection method according to the invention.

<FIG> shows a schematic diagram of a state detection device <NUM> and its application according to one embodiment of the present invention. The state detection device <NUM> of the present invention may be used in an audio interface <NUM> to detect whether an audio plug <NUM> (i.e., a male connector) is inserted into the audio jack socket (i.e., a female connector) <NUM>, a type of the audio plug <NUM>, and whether the audio jack socket <NUM> has ingress of water. The audio interface <NUM> may be a sound card or a sound processing system of an electronic device (such as a mobile phone, a personal computer, a tablet computer, a notebook computer, a multimedia player, and so on), where the audio interface <NUM> may also include (not shown) power amplifiers, digital/analog converters, digital audio processors, and so on. The audio plug <NUM> may be a two-ring three-pole type (such as, a TRS type) connector, which includes a first pole <NUM>, a second pole <NUM>, and a third pole <NUM>. Alternatively, the audio plug <NUM> may be a three-ring four-pole type (such as, TRRS type) connector, which includes a first pole <NUM>, a second pole <NUM>, a third pole <NUM> and a fourth pole <NUM>. As shown in <FIG>, the audio plug <NUM> belongs to a part of audio equipment. For example, the two-ring three-pole audio plug <NUM> can be connected to headphones/earphones (as shown in the figure), speakers and other loudspeaker device <NUM> through a wire. The three-ring four-pole audio plug <NUM> can be connected to a sound picking-up and loudspeaker combination device <NUM> that integrates headphones/earphones and microphones. Moreover, the audio plug <NUM> may be a three-ring four-pole male connector of an audio extension cable <NUM>. Generally speaking, when the audio plug <NUM> is the two-ring three-pole type, the first pole <NUM> is used to receive a left-channel audio signal generated by the audio interface <NUM> and transmit it to the loudspeaker device <NUM>, the second pole <NUM> is used to receive a right-channel audio signal generated by the audio interface <NUM> and transmit it to the loudspeaker device <NUM>, and the third pole <NUM> is a ground terminal. When the audio plug <NUM> is the three-ring four-pole type, the first pole <NUM> is used to receive the left-channel audio signal generated by the audio interface <NUM> and transmit it to a loudspeaker part of the sound picking-up and loudspeaker combination device <NUM>, and the second pole <NUM> is used to receive the right-channel audio signal generated by the audio interface <NUM>, and transmit it to the loudspeaker part of the sound picking-up and loudspeaker combination device <NUM>. One of the third pole <NUM> and the fourth pole <NUM> is the ground terminal, and the other is used to transmit a microphone signal generated by a sound picking-up part of the sound picking-up and loudspeaker combination device <NUM> to the audio interface <NUM>.

Please refer to <FIG> again. The state detection device <NUM> of the present invention is coupled to a plurality of conductive contacts in the audio jack socket <NUM>. These conductive contacts include at least a contact <NUM>, a contact <NUM>, a contact <NUM>, a contact <NUM> and contact <NUM>. If the audio plug <NUM> is the two-ring three-pole type connector, the contact <NUM> in the audio jack socket <NUM> (at an innermost part of an upper end of the audio jack socket <NUM>) is connected to the first pole <NUM> of the audio plug <NUM>, which is used to transmit the left-channel audio signal. The contact <NUM> (at an outer part of the upper end of the audio jack socket <NUM>) is connected to the second pole <NUM> of the audio plug <NUM>, which is used to transmit the right-channel audio signal. The contact point <NUM> (at an outer part of a lower end of the audio jack socket <NUM> but deviated from the position of the contact <NUM>) is connected to the third pole <NUM> of the audio plug <NUM>, and is further coupled to a ground terminal GND. The contact <NUM> (the outermost ring of the audio jack socket <NUM>) is also connected to the third pole <NUM> of the audio plug <NUM>. In addition, when the audio plug <NUM> is the three-ring four-pole type connector, in addition to the contacts <NUM>-<NUM> of the audio jack socket <NUM> are connected to the first to third poles <NUM>-<NUM> of the audio plug <NUM>, the contact <NUM> of the audio jack socket <NUM> is connected to the fourth pole <NUM> of the audio plug <NUM> for transmitting the microphone signal. Furthermore, the contact <NUM> of the audio jack socket <NUM> (at an innermost part of the lower end of the audio jack socket <NUM>, corresponding to the position of the contact point <NUM>) is connected to the first pole <NUM> of the audio plug <NUM>.

The state detection device <NUM> includes a first voltage detection circuit <NUM>, a second voltage detection circuit <NUM>, and a state determination circuit <NUM>. In one embodiment, the first voltage detection circuit <NUM> and the second voltage detection circuit <NUM> may be analog-to-digital converters, respectively. The first voltage detection circuit <NUM> is coupled to the contact <NUM> of the audio jack socket <NUM> and is coupled to the contact <NUM> through a voltage divider <NUM>. When the audio plug <NUM> is inserted and connected to the audio jack socket <NUM>, the first voltage detection circuit <NUM> can be coupled to the first pole <NUM> of the audio plug <NUM>. The second voltage detection circuit <NUM> is coupled to the contact <NUM> of the audio jack socket <NUM>, and an input terminal of the second voltage detection circuit <NUM> is selectively connected to a voltage VDD2 through a pull-up resistor Ra3. Moreover, when the audio plug <NUM> is inserted and connected to the audio jack socket <NUM>, the second voltage detection circuit <NUM> can be coupled to the third pole <NUM> of the audio plug <NUM> (if the audio plug <NUM> is the two-ring three-pole type) or the fourth pole <NUM> (if the audio plug <NUM> is the three-ring four-pole type).

Please refer to <FIG> in conjunction with <FIG>. When the audio plug <NUM> is inserted into the audio jack socket <NUM>, an impedance RL between the contact <NUM> and the contact <NUM> is approximately equal to an impedance at the first pole <NUM> of the audio plug <NUM>, such as, an impedance of the loudspeaker device <NUM> or the sound picking-up and loudspeaker combination device <NUM>, or an impedance of a first pole <NUM> of the audio extension cable <NUM>, which usually falls within a range of <NUM>-<NUM> ohms. As shown in <FIG>, once ingress of water occurs in the audio jack socket <NUM> and water fills the hollow space of the audio jack socket <NUM>, the impedance RL between the contact <NUM> and the contact <NUM> will become water impedance RW. As the impedance of salt water is different from that of fresh water (the impedance of the salt water will vary with time), the impedance RW will fall in a range of <NUM>-<NUM> ohms. Voltage values on the contact <NUM> and the contact <NUM> that are sampled by the first voltage detection circuit <NUM> will also vary accordingly. Therefore, the state determination circuit <NUM> in the state detection device <NUM> can determine whether ingress of water occurs in the audio jack socket <NUM> according a first detection value DET1 output by the first voltage detection circuit <NUM>. As shown in <FIG>, assuming that voltage VDD1=<NUM>. 3V, voltage VDD2=<NUM>. 3V, resistor Ra3=<NUM> ohms, resistor Rc1=<NUM> ohms of the voltage divider <NUM> and the resistor Ra1=<NUM> Ohm and the resistor Ra2=<NUM> ohms, various states and different types of audio plugs <NUM> will cause the first detection value DET1 sampled by the first voltage detection circuit <NUM> and the second detection value DET2 sampled by the second voltage detection circuit <NUM> to change. As can be seen from the table, the first detection value DET1 is significantly increased when ingress of water occurs in the audio jack socket <NUM> (for example, <NUM>-<NUM>. Therefore, the state determination circuit <NUM> may be provided with a first predetermined threshold TH1 (for example, but not limited to a value between <NUM>. 038V and <NUM>. When the first detection value DET1 sampled by the first voltage detection circuit <NUM> is higher than the first predetermined threshold TH1, it is determined that ingress of water currently occurs in the audio jack socket <NUM>. When the first detection value DET1 is lower than the first predetermined threshold TH1, it is determined that no ingress of water occurs in the audio jack socket <NUM>, and the conductor entering the audio jack socket <NUM> may be the audio plug <NUM>. In one embodiment, only when the first detection value DET1 is lower than the first predetermined threshold TH1, the second voltage detection circuit <NUM> will be activated to determine a connector type of the audio plug <NUM>.

Furthermore, as shown by <FIG>, if the audio plug <NUM> is the two-ring three-pole male connector belonging to the cable of the loudspeaker device <NUM>, once it is inserted into the audio jack socket <NUM>, the contact <NUM> and the contact <NUM> will be shorted (i.e., both connected to the third pole <NUM> of the audio plug <NUM>), and the impedance RL between these two contacts is extremely low. Considering the existence of contact impedance, the impedance RL is approximately between <NUM> and <NUM> ohms. On the other hand, if the audio plug <NUM> is the three-ring four-pole male connector belonging to a cable of the sound picking-up and loudspeaker combination device <NUM>, the impedance RL between the contact <NUM> and the contact <NUM> (which are respectively connected to the third pole <NUM> and the four pole <NUM> of the audio plug <NUM>) is approximately equal to the impedance Rm of the sound picking-up part in the sound picking-up and loudspeaker combination device <NUM>, which falls between <NUM> to <NUM> ohms. Moreover, if the audio plug <NUM> is the three-ring four-pole male connector of an audio extension cable <NUM>, and an audio jack socket at the other end of the audio extension cable <NUM> is not connected to a conductor, the impedance RL between contact <NUM> and the contact <NUM> (which are respectively connected to the third pole <NUM> and the fourth pole <NUM> of the audio plug <NUM>) is infinite.

Furthermore, as can be understood by table in <FIG>, the second detection value DET2 on the contact <NUM> sampled by the second voltage detection circuit <NUM> has three types of value distributions. If the audio plug <NUM> is the two-ring three-pole type, the second detection value DET2 has the smallest value (e.g., <NUM>-<NUM>. If the audio plug <NUM> is the three-ring four-pole type, the second detection value DET2 has the intermediate value (e.g., <NUM>. 747V-<NUM>. If the audio plug <NUM> is the three-ring four-pole male connector of the audio extension cable, the second detection value DET2 has the largest value (e.g., <NUM>. Therefore, the state determination circuit <NUM> can preset two thresholds TH2 (for example, but not limited to a value between <NUM>-<NUM>. 3V) and TH3 (for example, but not limited to a value between <NUM>-<NUM>. When the second detection value DET2 sampled by the second voltage detection circuit <NUM> is higher than the threshold TH2, it is determined that the audio plug <NUM> is the three-ring four-pole male connector belonging to the audio extension cable <NUM>. When the second detection value DET2 is lower than the threshold TH3, it is determined that the audio plug <NUM> is the two-ring three-pole male connector belonging to the cable of the loudspeaker device <NUM>, and when the second detection value DET2 is lower than the threshold TH2 but higher than the threshold TH3, it is determined that the audio plug <NUM> is the three-ring four-pole male connector belonging to the cable of the sound picking-up and loudspeaker combination device <NUM>.

In one embodiment, the state detection device <NUM> further includes an insertion detection circuit <NUM> and a voltage divider <NUM>. In one embodiment, the insertion detection circuit <NUM> of the state detection device <NUM> detects whether a conductor enters the audio jack socket <NUM>. Only when the detection result of the insertion detection circuit <NUM> indicates that the conductor enters the audio jack socket <NUM>, the first voltage detection circuit <NUM> and the second voltage detection circuit <NUM> can be activated. After detecting that the conductor enters the audio jack socket <NUM>, the first voltage detection circuit <NUM> is activated. According to the first detection value DET1 provided by the first voltage detection circuit <NUM>, the state determination circuit <NUM> determines the conductor entering the audio jack socket <NUM> is either the audio plug <NUM> or water. Furthermore, only when it is determined that the conductor entering the audio jack socket <NUM> is the audio plug <NUM>, the second voltage detection circuit <NUM> will be activated. According to the second detection value DET2 provided by the second voltage detection circuit <NUM>, the connector type can be determined. It is note that, in some embodiments, the insertion detection circuit <NUM> may be omitted, and the insertion detection is performed directly based on the first detection value DET1 outputted by the first voltage detection circuit <NUM>.

Furthermore, the voltage divider <NUM> includes resistors Rc1, Ra1, and Ra2. The purpose of the resistor Rc1 is to adjust a voltage division provided to the first voltage detection circuit <NUM>, such that the first voltage detection circuit <NUM> can better detect across the voltage between the contact <NUM> and the contact <NUM>, where the resistor Ra3 coupled to the voltage VDD2 has same purpose. Furthermore, the purpose of the resistors Ra1 and Ra2 are used to prevent audio signals outputted from the audio interface <NUM> from interfering with the insertion detection circuit <NUM> and causing it to malfunction.

After the state detection circuit <NUM> generates the detection result, the audio interface <NUM> can correctly control the connected audio equipment, such as: sending a correct corresponding signal to the audio equipment via the contacts, starting or interrupting audio playback, switching audio playback device (such as switching from built-in speakers to external audio equipment), or notifying the electronic device of ingress of water.

<FIG> illustrates a flow chart of state detection performed by the state detection device <NUM> according to one embodiment of the present invention. First, at step S510, the insertion detection circuit <NUM> is utilized to determine whether a conductor enters the audio jack socket <NUM>; if the determination result shows yes, the flow goes to step S520; if the determination result shows not, the flow stops at step S510, which keeps determining whether a conductor enters the audio jack socket <NUM>. At step S520, the first voltage detection circuit <NUM> is activated. At this time, according to the first detection value DET1 sampled by the first voltage detection circuit <NUM> (i.e., the voltage across the contact <NUM> and the contact <NUM> of the audio jack socket <NUM>) and the first threshold TH1, it is determined whether ingress of water occurs; if the determination result shows yes, the flow stops at step S520, where the first voltage detection circuit <NUM> remains activated, waiting for the insertion of the audio plug <NUM>. If the determination result of step S520 shows no, the flow goes to step S530, where the first voltage detection circuit <NUM> is de-activated, and the second voltage detection circuit <NUM> is activated. According to the second detection value DET2 sampled by the second voltage detection circuit <NUM> (i.e., the voltage of the contact <NUM> of the audio jack socket <NUM> relative to the ground terminal), the second threshold TH2 and the third threshold TH3, it is determined the connector type is: three-ring four-pole male connector belonging to an audio extension cable, two-ring three-pole connector male connector belonging to a cable of the loudspeaker device <NUM>, or three-ring four-pole male connector belonging to a cable of the sound picking-up and loudspeaker combination device <NUM>. Once it is determined that the connector type is the three-ring four-pole male connector belonging to the audio extension cable, the second voltage detection circuit <NUM> can remain activated to detect. The second voltage detection circuit <NUM> can end detecting until the connector type is determined as the two-ring three-pole male connector belonging to the cable of the loudspeaker device <NUM>, or until the connector type is determined as the three-ring four-pole male connector belonging to the cable of the sound picking-up and loudspeaker combination device <NUM>. Once the detection ends, the flow goes to step S540, where the insertion detection circuit <NUM> monitors the insertion state to detect whether the audio plug <NUM> is removed from the audio jack socket <NUM>. If it is removed, the flow ends.

Briefly summarized, the present invention provides circuits and related methods for detecting a connector type of audio equipment and a water ingress state of the audio jack socket of an audio interface. In the present invention, by detecting a voltage across two contacts (i.e., the contact <NUM> and the contact <NUM>) of the audio jack socket <NUM> that are connected the first pole <NUM> of the audio plug <NUM>, it can be determined that whether ingress of water occurs, or whether the audio plug <NUM> is inserted into the audio jack socket <NUM>. A feature of the present invention is that water ingress detection can correctly detect whether salt water or fresh water enters the audio jack socket <NUM>, and this is accomplished only via the first voltage detection circuit <NUM>. In addition, the present invention also detects a voltage on the contact (i.e., contact <NUM>) on the audio jack socket <NUM> that is connected to the fourth pole <NUM> of the audio plug <NUM>, thereby to determine a connector type of the audio plug and a type of audio equipment to which the audio plug belongs. Since the present invention does not use extra contacts for state detection, it is suitable for existing audio jack sockets, and can provide ability of identifying multiple connector types and detecting the water ingress state of the audio jack socket at the same time.

Embodiments in accordance with the present invention can be implemented as an apparatus, method, or computer program product. Accordingly, the present embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects that can all generally be referred to herein as a "module" or "system. " Furthermore, the present embodiments may take the form of a computer program product embodied in any tangible medium of expression having computer-usable program code embodied in the medium. In terms of hardware, the present invention can be accomplished by applying any of the following technologies or related combinations: an individual operation logic with logic gates capable of performing logic functions according to data signals, and an application specific integrated circuit (ASIC), a programmable gate array (PGA) or a field programmable gate array (FPGA) with a suitable combinational.

Claim 1:
A state detection device (<NUM>) for use in an audio interface (<NUM>), comprising:
an audio jack socket (<NUM>); and
a first voltage detection circuit (<NUM>), coupled to a first contact (<NUM>) and a second contact (<NUM>) of the audio jack socket (<NUM>), and configured to detect a voltage across the first contact (<NUM>) and the second contact (<NUM>) to generate a first detection value (DET1); and
a second voltage detection circuit (<NUM>), coupled to a third contact (<NUM>) of the audio jack socket (<NUM>), and configured to detect a voltage on the third contact (<NUM>) to generate a second detection value (DET2); and
a state determination circuit (<NUM>), coupled to the first voltage detection circuit (<NUM>) and the second voltage detection circuit (<NUM>), configured to determine a water ingress state of the audio jack socket (<NUM>) according to the first detection value (DET1) and a first threshold (TH1), and determine a connector type of an audio plug (<NUM>) that is inserted into the audio jack socket (<NUM>) according to the second detection value (DET2);
characterized in that
when the first detection value (DET1) is higher than the first threshold (TH1), the state determination circuit (<NUM>) determines that ingress of water occurs in the audio jack socket (<NUM>), and when the first detection value (DET1) is lower than the first threshold (TH1), the state determination circuit (<NUM>) determines that no ingress of water occurs in the audio jack socket (<NUM>), and determines that the audio plug (<NUM>) is inserted into the audio jack socket (<NUM>); and the second voltage detection circuit (<NUM>) is activated only when the state determination circuit (<NUM>) determines that no ingress of water occurs in the audio jack socket (<NUM>).