Disclosure of Invention
Therefore, it is necessary to provide an earphone recognition device to solve the technical problem of the complicated structure of the conventional earphone recognition device.
An earphone recognition device is characterized by comprising a main control chip, a first interface, a second interface, a third interface and a fourth interface;
the first interface, the second interface, the third interface and the fourth interface are arranged in an earphone jack and are respectively connected with any one of an earphone plug end, a public end and an electret microphone end, a first public voltage detection end of the main control chip is connected with the first interface, a second public voltage detection end of the main control chip is connected with the second interface, a first earphone plug detection end of the main control chip is connected with the third interface, and a second earphone plug detection end of the main control chip is connected with the fourth interface;
the main control chip respectively acquires a first voltage of a first public voltage detection end, a second voltage of a second public voltage detection end, a third voltage of a first earphone plug detection end and a fourth voltage of a second earphone plug detection end, identifies the insertion state of an earphone according to the first voltage and the second voltage, identifies whether a third interface or a fourth interface is connected with the earphone plug according to the third voltage and the fourth voltage, and configures an audio output channel of the inserted earphone according to the identification result.
The earphone recognition device is characterized in that a first interface, a second interface, a third interface and a fourth interface are arranged in an earphone jack to be respectively connected with any one of an earphone plug end, a public end and an electret microphone end, a first public voltage detection end of a main control chip is connected with the first interface, a second public voltage detection end of the main control chip is connected with the second port, a first earphone plug detection end is connected with the third interface, a second earphone plug detection end of the main control chip is connected with the fourth interface, a first voltage of the first public voltage detection end, a second voltage of the second public voltage detection end, a third voltage of the first earphone plug detection end and a fourth voltage of the second earphone plug detection end are respectively obtained through the main control chip, so that the insertion state of an earphone is recognized according to the first voltage and the second voltage, and whether the third interface or the fourth interface is connected with the earphone plug or not is recognized according to the third voltage and the fourth voltage, and the audio output channel of the inserted earphone is configured according to the identification result, the identification structure of the inserted earphone is effectively simplified, the identification efficiency of the inserted earphone is improved, and the corresponding identification cost is reduced.
In one embodiment, the main control chip respectively sets the output voltages of the first earphone plug detection end and the second earphone plug detection end as set voltage values, starts a pull-down resistor of the first common voltage detection end, and determines that the earphone plug is not inserted into the earphone jack if the first voltage is identified to be equal to the ground voltage; and if the first voltage is identified to be greater than the ground voltage, judging that the earphone plug is inserted into the earphone jack.
This embodiment can carry out accurate discernment to whether earphone plug inserts the earphone jack according to corresponding first voltage through opening the pull-down resistance of first public voltage sense terminal.
In one embodiment, the main control chip respectively sets the output voltages of the first earphone plug detection end and the second earphone plug detection end as set voltage values, starts a pull-down resistor of the second common voltage detection end, and determines that the earphone plug is not inserted into the earphone jack if the second voltage is equal to the ground voltage; and if the second voltage is identified to be greater than the ground voltage, judging that the earphone plug is inserted into the earphone jack.
According to the embodiment, whether the earphone plug is inserted into the earphone jack can be accurately identified according to the corresponding second voltage by starting the pull-down resistor of the second common voltage detection end.
In one embodiment, after the main control chip determines that the earphone plug is inserted into the earphone jack, the main control chip sets an output voltage value of the detection end of the first earphone plug and an output voltage value of the detection end of the second earphone plug respectively, and determines that the third interface is connected to the earphone plug when detecting that the third voltage is equal to the fourth voltage.
The embodiment can accurately identify the earphone plug accessed by the third interface.
As an embodiment, after determining that the third interface is connected to the headphone plug, the main control chip closes the output of the first headphone plug detection end or the second headphone plug detection end, sets the first headphone plug detection end or the second headphone plug detection end as a headphone common end, and configures an audio output channel for the third interface.
In this embodiment, after the third interface is connected to the headphone plug, corresponding headphone configuration may be performed to ensure subsequent normal operation of the headphone.
In one embodiment, after the main control chip determines that the earphone plug is inserted into the earphone jack, the main control chip sets an output voltage value of the detection end of the first earphone plug and an output voltage value of the detection end of the second earphone plug respectively, and determines that the fourth interface is connected to the earphone plug when detecting that the third voltage is not equal to the fourth voltage.
The embodiment can accurately identify the earphone plug accessed by the fourth interface.
As an embodiment, main control chip sets up first electret microphone input and second electret microphone input, first electret microphone input passes through first electric capacity and connects the third interface, second electret microphone input passes through the second electric capacity and connects the fourth interface, the third interface passes through first resistance and connects outside bias power supply circuit, the fourth interface passes through the second resistance and connects bias power supply circuit.
As an embodiment, when detecting that the fourth voltage is equal to the first voltage or the second voltage, the main control chip determines that the earphone plug inserted into the fourth interface is an earphone plug of an OMTP standard; and when the third voltage is detected to be equal to the first voltage or the second voltage, determining that the earphone plug inserted into the fourth interface is the earphone plug of the CTIA standard.
The embodiment can correspondingly identify the type of the earphone plug inserted into the fourth interface.
As an embodiment, if the earphone plug is an earphone plug of an OMTP standard, the main control chip closes the output of the detection end of the first earphone plug, sets the detection end of the earphone plug as an earphone common end, sets the input end of the first electret microphone as an input pin of the electret microphone, accesses the bias power supply circuit to turn on the bias voltage of the electret microphone, and configures an audio output channel for the inserted earphone according to the OMTP standard.
As an embodiment, if the earphone plug is an earphone plug of the CTIA standard, the main control chip closes the output of the detection end of the second earphone plug, sets the detection end of the first earphone plug as an earphone common end, sets the input end of the second electret microphone as an input pin of the electret microphone, accesses the bias power supply circuit to start the bias voltage of the electret microphone, and configures an audio output channel for the inserted earphone according to the CTIA standard.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an earphone recognition device according to an embodiment, and the earphone recognition device includes a main control chip 20, a first interface 11, a second interface 12, a third interface 13, and a fourth interface 14;
the first interface 11, the second interface 12, the third interface 13 and the fourth interface 14 are arranged in an earphone jack and respectively connected to any one of an earphone plug end, a common end and an electret microphone end, the first common voltage detection end DAC _ L of the main control chip 20 is connected to the first interface 11, the second common voltage detection end DAC _ R of the main control chip 20 is connected to the second interface 12, the first earphone plug detection end VCMO0 of the main control chip 20 is connected to the third interface 13, and the second earphone plug detection end VCMO1 of the main control chip 20 is connected to the fourth interface 14;
the main control chip 20 respectively obtains the first voltage V of the first common voltage detection terminal DAC _ Lad1A second voltage V of the second common voltage detection terminal DAC _ Rad2The third voltage V of the detection end VCMO0 of the first earphone plugad3And a fourth voltage V of a second earphone plug detection end VCMO1ad4According to said first voltage Vad1And a second voltage Vad2Recognizing the insertion state of the earphone according to the third voltage Vad3And a fourth voltage Vad4Identifying the third interface 13 or the fourth interfaceWhether the port 14 is connected with an earphone plug or not and configures an audio output channel of the inserted earphone according to the recognition result.
The main control chip 20 may be an intelligent chip capable of writing in related detection programs to perform output control of each pin and voltage detection, and may be disposed in a playback device (such as a tablet computer, a mobile phone, and the like) where the earphone jack is located. Specifically, the internal structure of the main control chip 20 may include an analog multiplexer MUX and a port voltage detection circuit ADC as shown in fig. 2, where the main control chip 20 may perform relevant signal identification and output control on each pin terminal (e.g., the first common voltage detection terminal DAC _ L, the second common voltage detection terminal DAC _ R, the first headphone plug detection terminal VCMO0, and the second headphone plug detection terminal VCMO1) through the built-in multiplexer MUX, and perform detection on the voltage corresponding to each pin terminal through the port voltage detection circuit ADC.
In the earphone recognition device provided in this embodiment, the first interface 11, the second interface 12, the third interface 13, and the fourth interface 14 are disposed in the earphone jack to respectively access any one of the earphone plug end, the common end, and the electret microphone end, the first common voltage detection end DAC _ L of the main control chip 20 is connected to the first interface 11, the second common voltage detection end DAC _ R is connected to the second interface 12, the first earphone plug detection end VCMO0 is connected to the third interface 13, the second earphone plug detection end VCMO1 is connected to the fourth interface 14, and the first voltage V of the first common voltage detection end DAC _ L is respectively obtained by the main control chip 20ad1A second voltage V of the second common voltage detection terminal DAC _ Rad2The third voltage V of the detection end VCMO0 of the first earphone plugad3And a fourth voltage V of a second earphone plug detection end VCMO1ad4According to a first voltage Vad1And a second voltage Vad2Recognizing the insertion state of the earphone according to the third voltage Vad3And a fourth voltage Vad4Whether the third interface 13 or the fourth interface 14 is connected with the earphone plug or not is identified, and the audio output channel of the inserted earphone is configured according to the identification result, so that the identification structure of the inserted earphone is effectively simplified, the identification efficiency of the inserted earphone is improved, and the corresponding identification cost is reduced。
In one embodiment, the main control chip respectively sets the output voltages of the first earphone plug detection end and the second earphone plug detection end as set voltage values, starts a pull-down resistor of the first common voltage detection end, and determines that the earphone plug is not inserted into the earphone jack if the first voltage is identified to be equal to the ground voltage; and if the first voltage is identified to be greater than the ground voltage, judging that the earphone plug is inserted into the earphone jack.
The set voltage value can be set according to the model characteristics of the main control chip, and specifically can be set to be greater than the ground voltage VgndIf the output voltage of the first earphone plug detection end and the second earphone plug detection end is VplugThe main control chip detects the first voltage Vad1Equal to the ground voltage, i.e. Vad1=VgndWhen the earphone plug is plugged into the earphone jack, judging that the earphone plug is not plugged into the earphone jack; upon detection of the first voltage Vad1Greater than ground, i.e. Vad1>VgndIn particular, the first voltage V is detectedad1=(VplugR3/(Re + R3)), where R3 is the resistance of the pull-down resistor at the first common voltage detecting terminal, and Re is the impedance of the earphone speaker, which can be preset according to the related empirical values.
This embodiment can be through opening the pull-down resistance of first public voltage detection end, whether insert the earphone jack according to the first voltage that detects and carry out accurate discernment.
In one embodiment, the main control chip respectively sets the output voltages of the first earphone plug detection end and the second earphone plug detection end as set voltage values, starts a pull-down resistor of the second common voltage detection end, and determines that the earphone plug is not inserted into the earphone jack if the second voltage is equal to the ground voltage; and if the second voltage is identified to be greater than the ground voltage, judging that the earphone plug is inserted into the earphone jack.
The set voltage value can be set according to the model characteristics of the main control chip, and can be specifically set to be one largeAt ground terminal voltage VgndIf the output voltage of the first earphone plug detection end and the second earphone plug detection end is VplugThe main control chip detects the second voltage Vad2Equal to the ground voltage, i.e. Vad2=VgndWhen the earphone plug is plugged into the earphone jack, judging that the earphone plug is not plugged into the earphone jack; upon detection of the second voltage Vad2Greater than ground, i.e. Vad2>VgndIn particular by detecting said second voltage Vad2=(VplugR3/(Re + R3)), where R3 is the resistance of the pull-down resistor at the second common voltage detecting terminal, and Re is the impedance of the earphone speaker, which can be preset according to the related empirical values.
This embodiment can be through opening the pull-down resistance of second public voltage detection end, whether insert the earphone jack according to the second voltage that detects and carry out accurate discernment.
As an embodiment, an internal structural schematic diagram of the main control chip at the first common voltage detection terminal DAC _ L or the second common voltage detection terminal DAC _ R may refer to fig. 3, where a pin port (the first common voltage detection terminal DAC _ L or the second common voltage detection terminal DAC _ R) may be connected to the pull-down resistor R3 through a switch device, and the main control chip may control the on and off of the corresponding pull-down resistor through the switch device; the pin port of the first common voltage detection end DAC _ L or the second common voltage detection end DAC _ R can also be connected with a port voltage detection circuit arranged in the main control chip to detect the voltage of the corresponding port.
In an embodiment, after the main control chip determines that the headphone plug is inserted into the headphone jack, the main control chip sets an output voltage value of the detection end of the first headphone plug and an output voltage value of the detection end of the second headphone plug, respectively, and detects the third voltage Vad3And a fourth voltage Vad4And when the first interface is equal to the second interface, judging that the third interface is connected with the earphone plug.
The output voltage value of the first earphone plug detection end and the output voltage value of the second earphone plug detection end can be correspondingly set according to the model characteristics of the corresponding main control chip respectivelyUnder normal circumstances, the output voltage value of the detection end of the first earphone plug is not equal to the output voltage value of the detection end of the second earphone plug; if the output voltage value of the first earphone plug detection end is Vdet0The output voltage value of the detection end of the second earphone plug is Vdet1Then V isdet0≠Vdet1。
In the embodiment, the headset plug accessed by the third interface can be accurately identified by detecting the voltages corresponding to the first headset plug detection end and the second headset plug detection end, so that the corresponding identification process is simplified.
As an embodiment, after determining that the third interface is connected to the headphone plug, the main control chip closes the output of the first headphone plug detection end VCMO0 or the second headphone plug detection end VCMO1, sets the first headphone plug detection end VCMO0 or the second headphone plug detection end VCMO1 as a headphone common end, and configures an audio output channel for the third interface.
The main control chip can also adjust the audio parameters of the equipment in which the earphone is inserted (namely the playing equipment in which the earphone jack is located) so as to match the use of the inserted earphone and improve the use effect of the earphone.
In this embodiment, the port voltage detection circuit built in the main control chip detects Vad3=Vad4When the earphone is connected with the 3-pin earphone type device (the earphone with the earphone plug connected through the third interface), the main control chip closes the output of the VCMO1 or the VCMO0, the VCMO0 or the VCMO1 is set as the earphone public end, and an audio output channel is configured for the 3-pin earphone type device (the earphone with the earphone plug connected through the third interface), so that the accuracy of earphone configuration is guaranteed.
In one embodiment, after the main control chip determines that the headphone plug is inserted into the headphone jack, the main control chip sets an output voltage value of a detection end of the first headphone plug and an output voltage value of a detection end of the second headphone plug respectively, and when the third voltage V is detectedad3And a fourth voltage Vad4And when the difference is not equal, the fourth interface is judged to be connected with the earphone plug.
The output voltage value of the first earphone plug detection end and the output voltage value of the second earphone plug detection end can be correspondingly set according to the model characteristics of the corresponding main control chip, and generallyUnder the condition, the output voltage value of the detection end of the first earphone plug is not equal to the output voltage value of the detection end of the second earphone plug; if the output voltage value of the first earphone plug detection end is Vdet0The output voltage value of the detection end of the second earphone plug is Vdet1Then V isdet0≠Vdet1。
The fourth interface can be connected with various types of earphone plugs, such as CTIA standard earphone plug or OMTP standard earphone plug. In particular, in Vad3 ≠ Vad4, and Vad1(or V)ad2)=Vad3When the earphone plug connected with the fourth interface belongs to the CTIA standard, the main control chip can configure an audio output channel for the inserted earphone equipment according to the CTIA standard; at Vad3≠Vad4And V isad1(or V)ad2)=Vad4And when the earphone plug accessed by the fourth interface belongs to the OMTP standard, the main control chip can configure an audio output channel for the inserted earphone equipment according to the OMTP standard. The main control chip can identify the type of the earphone plug accessed by the fourth interface, and adjust the audio parameters according to the identified type so as to be matched with the earphone of the type to be used on corresponding playing equipment, thereby realizing the self-adaptive identification and configuration of the playing equipment on the inserted earphone.
In the embodiment, the headset plug accessed by the fourth interface can be accurately identified by detecting the voltage corresponding to the first headset plug detection end and the second headset plug detection end, so that the corresponding identification process is simplified.
As an embodiment, referring to fig. 4, the main control chip 20 may further include a first electret microphone input terminal MIC0 and a second electret microphone input terminal MIC1, where the first electret microphone input terminal MIC0 is connected to the third interface 13 through a first capacitor 31, the second electret microphone input terminal MIC1 is connected to the fourth interface 14 through a second capacitor 32, the third interface 13 is connected to an external bias power supply circuit through a first resistor 33, and the fourth interface 14 is connected to the bias power supply circuit through a second resistor 34.
The first resistor 33 and the second resistor 34 are bias resistors, respectively, and the first capacitor 31 and the second capacitor 32 are dc blocking capacitors, respectively.
In this embodiment, the main control chip 20 may further perform setting of a first electret microphone input terminal MIC0 and a second electret microphone input terminal MIC1, as shown in fig. 4, the first electret microphone input terminal MIC0 may be sequentially connected to an external bias power supply circuit through a first capacitor 31 and a first resistor 33, and the second electret microphone input terminal MIC1 may be sequentially connected to the external bias power supply circuit through a second capacitor 32 and a second resistor 34, so that the main control chip starts the bias voltage of the electret microphone through the first electret microphone input terminal MIC0 or the second electret microphone input terminal MIC1, and configures the electret microphone of the inserted earphone.
As an embodiment, the main control chip detects the fourth voltage Vad4Is equal to the first voltage Vad1Or a second voltage Vad2When the earphone plug inserted into the fourth interface is judged to be the earphone plug of the OMTP standard; upon detecting that the third voltage Vad3 is equal to the first voltage Vad1Or a second voltage Vad2And judging that the earphone plug inserted into the fourth interface is the earphone plug of CTIA standard.
As an embodiment, if the earphone plug is an earphone plug of an OMTP standard, the main control chip closes the output of the first earphone plug detection end VCMO0, sets the earphone plug detection end VCMO1 as an earphone common end, sets the first electret microphone input end MIC0 as an input pin of the electret microphone, accesses the bias power supply circuit to start the bias voltage of the electret microphone, and configures an audio output channel for the inserted earphone according to the OMTP standard.
The main control chip can also adjust the audio parameters of the playing device into which the earphone is inserted according to the OMTP standard so as to match the use of the earphone on the playing device, thereby realizing the self-adaptive identification and configuration of the playing device on the inserted earphone.
In this embodiment, the main control chip detects Vad3≠Vad4And V isad1(or V)ad2)=Vad4When the microphone is turned off, the output of the VCMO0 can be turned off, VCMO1 can be set as the earphone common terminal, MIC0 can be set as the input pin of the electret microphone, and the switch can be turned onStarting the bias voltage of the electret microphone, configuring an audio output channel for the inserted earphone equipment according to the OMTP standard, and adjusting the audio parameters of the playing equipment in which the earphone is inserted so as to ensure the accuracy in the setting and configuration process of the earphone.
As an embodiment, if the earphone plug is an earphone plug of the CTIA standard, the main control chip closes the output of the second earphone plug detection end VCMO1, sets the first earphone plug detection end VCMO0 as an earphone common end, sets the second electret microphone input end MIC1 as an input pin of the electret microphone, accesses the bias power supply circuit to start the bias voltage of the electret microphone, and configures an audio output channel for the inserted earphone according to the CTIA standard.
The main control chip can also adjust the audio parameters of the playing device into which the earphone is inserted according to the CTIA standard so as to realize the self-adaptive identification and configuration of the playing device to the inserted earphone by matching the use of the earphone on the playing device.
In this embodiment, the main control chip detects Vad3≠Vad4And V isad1(or V)ad2)=Vad3When the earphone is plugged in, the output of VCMO1 is closed, VCMO0 is set as an earphone public end, MIC1 is set as an input pin of an electret microphone, the bias voltage of the electret microphone is started, an audio output channel is configured for the plugged earphone equipment according to the CTIA standard, the audio parameters of the playing equipment plugged in by the earphone are adjusted, and the accuracy of corresponding earphone configuration can be ensured.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.