CN113242487B - Line control method, line control device, adapter and line control system - Google Patents

Line control method, line control device, adapter and line control system Download PDF

Info

Publication number
CN113242487B
CN113242487B CN202110511189.0A CN202110511189A CN113242487B CN 113242487 B CN113242487 B CN 113242487B CN 202110511189 A CN202110511189 A CN 202110511189A CN 113242487 B CN113242487 B CN 113242487B
Authority
CN
China
Prior art keywords
resistor
voltage
line control
value
earphone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110511189.0A
Other languages
Chinese (zh)
Other versions
CN113242487A (en
Inventor
许崇铭
陈尚立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhongke Lanxun Technology Co ltd
Original Assignee
Shenzhen Zhongke Lanxun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhongke Lanxun Technology Co ltd filed Critical Shenzhen Zhongke Lanxun Technology Co ltd
Priority to CN202110511189.0A priority Critical patent/CN113242487B/en
Publication of CN113242487A publication Critical patent/CN113242487A/en
Application granted granted Critical
Publication of CN113242487B publication Critical patent/CN113242487B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups

Abstract

The embodiment of the application discloses a line control method, a line control device, an adapter and a line control system, wherein the line control method is applied to an adapter circuit, the adapter circuit is used for being connected with electronic equipment and an earphone line respectively, the method comprises the steps of obtaining a first voltage provided by the electronic equipment through the adapter circuit, obtaining a second voltage of a connection point between the adapter circuit and the earphone line through the adapter circuit, and obtaining a current line control value based on the first voltage, the second voltage and a reference line control value, wherein the current line control value is used as an intersection value between two different line control intervals of a key on the earphone line. Through the mode, the phenomenon that the line control of the earphone line is abnormal can be prevented.

Description

Line control method, line control device, adapter and line control system
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a line control method, a line control device, an adapter, and a line control system.
Background
With the development of scientific technology, mobile phones have become necessary in people's lives, and applications are more and more complex. At present, many people listen to music by using mobile phones, so that keys are required to be designed on earphone wires to control the playing pause, the volume increase and the volume decrease of the music, a user does not need to take out the mobile phone to adjust the music, and the mobile phone is convenient for the user and is deeply popular with the user.
Meanwhile, because the earphone interfaces provided by the existing mobile phone are different, the adapter is required to be used for switching so that the earphone can be suitable for different mobile phones. The adapter is used for providing a working power supply through an interface of the mobile phone when in work, and when the earphone key is pressed down, the mobile phone can realize control of corresponding functions (music playing pause, volume increase and volume decrease) according to the voltage value changed by pressing down the key.
However, in the prior art, different mobile phones on the market provide different working voltages for the adapter, and different resistances of the headset wire resistance and the buttons on the headset wire on the market may cause the phenomenon of disorder of the wire control of some models and headset wires, so that the functions (the play pause, the volume increase and the volume decrease of music) of the mobile phones cannot be used normally.
Disclosure of Invention
The embodiment of the application aims to provide a line control method, a line control device, an adapter and a line control system, which can prevent the earphone line from generating abnormal line control.
In order to achieve the above object, in a first aspect, the present application provides a line control method, which is applied to an adapter circuit, where the adapter circuit is used to connect with an electronic device and an earphone line, respectively, and includes:
acquiring a first voltage provided by the electronic equipment through the adapter circuit;
acquiring a second voltage of a connection point between the adapter circuit and the earphone cable through the adapter circuit;
and acquiring a current drive-by-wire value based on the first voltage, the second voltage and a reference drive-by-wire value, wherein the current drive-by-wire value is used as an intersection value between two different drive-by-wire intervals of the keys on the earphone line.
In an optional manner, the adapter circuit includes a first resistor and a second resistor connected in series, a non-series end of the second resistor is connected to a power pin of the electronic device, and a non-series end of the first resistor is grounded;
the obtaining of the first voltage provided by the electronic device through the adapter circuit includes:
the first voltage is obtained by obtaining the voltage of a connection point between the first resistor and the second resistor.
In an optional manner, the adapter circuit further includes a third resistor and a fourth resistor connected in series, where a non-series end of the third resistor is connected to a power pin of the electronic device, and a non-series end of the fourth resistor is connected to the earphone cable;
through the adapter circuit acquires the adapter circuit with the second voltage of the tie point between the earphone includes:
and obtaining the second voltage by obtaining the voltage of a connection point between the non-series end of the fourth resistor and the earphone line.
In an optional manner, the obtaining a current drive-by-wire value based on the first voltage, the second voltage, and a reference drive-by-wire value includes:
obtaining a first voltage interval corresponding to the first voltage to obtain a first preset adjustment value corresponding to the first voltage interval;
obtaining a second voltage interval corresponding to the second voltage to obtain a second preset adjustment value corresponding to the second voltage interval;
and acquiring the current drive-by-wire value based on the first preset adjusting value, the second preset adjusting value and the reference drive-by-wire value.
In an optional manner, the obtaining the current drive-by-wire value based on the first preset adjustment value, the second preset adjustment value, and the reference drive-by-wire value includes:
and calculating the sum of the reference drive-by-wire value and the first preset adjusting value and the second preset adjusting value, and taking the sum as the current drive-by-wire value.
In an optional manner, the adapter circuit is further configured to connect a first reference voltage and a reference resistor, respectively, and the method further includes:
acquiring a second reference voltage of a connection point between the adapter circuit and the reference resistor based on the first reference voltage;
and obtaining a reference line control value based on the second reference voltage.
In a second aspect, an embodiment of the present application provides a drive-by-wire device, which is applied to an adapter circuit, the adapter circuit is used for being connected with an electronic device and an earphone cable, respectively, and includes:
the first acquiring unit is used for acquiring a first voltage provided by the electronic equipment through the adapter circuit;
the second acquisition unit is used for acquiring a second voltage of a connection point between the adapter circuit and the earphone cable through the adapter circuit;
and a third obtaining unit, configured to obtain a current drive-by-wire value based on the first voltage, the second voltage, and a reference drive-by-wire value, where the current drive-by-wire value is used as an intersection value between two different drive-by-wire intervals of the button on the earphone line.
In a third aspect, the present application provides an adapter, including:
the adapter circuit is used for being connected with the electronic equipment and the earphone cable respectively;
the adapter circuit includes main control chip, main control chip includes:
at least one processor and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform a method as described above.
In an optional manner, the adapter circuit further includes:
the circuit comprises a first resistor and a second resistor which are connected in series, wherein the non-series end of the first resistor is connected with a power pin of the electronic equipment, and the non-series end of the second resistor is grounded;
the earphone line comprises a third resistor and a fourth resistor which are connected in series, wherein the non-series end of the third resistor is connected with a power pin of the electronic equipment, and the non-series end of the fourth resistor is connected with the earphone line;
the connection point between the first resistor and the second resistor is connected with the main control chip, and the connection point between the non-serial end of the fourth resistor and the earphone cable is connected with the main control chip.
In a fourth aspect, an embodiment of the present application provides a linear control system, including: electronic equipment, earphone cord and the adapter of third aspect.
In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having stored thereon computer-executable instructions that, when executed by an adapter, cause the adapter to perform a method as described above.
The beneficial effects of the embodiment of the application are that: the method comprises the steps of obtaining a first voltage provided by the electronic equipment through the adapter circuit, obtaining a second voltage of a connection point between the adapter circuit and the earphone through the adapter circuit, and obtaining a current drive-by-wire value based on the first voltage, the second voltage and a reference drive-by-wire value.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings which correspond to and are not to be construed as limiting the embodiments, in which elements having the same reference numeral designations represent like elements throughout, and in which the drawings are not to be construed as limiting in scale unless otherwise specified.
Fig. 1 is a schematic structural diagram of connection between an adapter and a mobile phone line provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a mobile phone line provided in the embodiment of the present application;
fig. 3 is a flowchart of a drive-by-wire method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a drive-by-wire device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram illustrating a connection between an adapter U1 and an electronic device U2 according to an embodiment of the present disclosure. As shown in fig. 1, the adapter U1 includes an adapter circuit, which is connected to the electronic device U2 through a VCC pin to acquire an input voltage from the electronic device U2 through the VCC pin, and is connected to an earphone cable through a MIC pin.
It is understood that, in the embodiments of the present application, the electronic device refers to an electronic device having a data interface (e.g., TYPE-C interface) that can be used to connect with an adapter. Electronic devices include, but are not limited to: smart phones (such as Android phones and iOS phones that carry other operating systems), tablet computers, palm computers, and notebook computers.
Specific types of electronic devices are listed above, but those skilled in the art will appreciate that embodiments of the present invention are not limited to the above listed types, but may be applied to any other types of electronic devices.
The adapter circuit includes a main control chip 10, and the main control chip 10 may adopt a Micro Control Unit (MCU) or a Digital Signal Processing (DSP) controller, etc.
The main control chip 10 includes at least one processor 11 and a memory 12, where the memory 12 may be built in the main control chip 10 or external to the main control chip 10, and the memory 12 may also be a remotely disposed memory and connected to the main control chip 10 through a network.
Memory 12, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 12 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 12 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 12 may optionally include memory located remotely from the processor 11, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 11 executes various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 12 and calling data stored in the memory 12, thereby performing overall monitoring of the terminal, for example, implementing a line control method according to any embodiment of the present invention.
The number of the processors 11 may be one or more, and one processor 11 is illustrated in fig. 1. The processor 11 and the memory 12 may be connected by a bus or other means. The processor 11 may include a Central Processing Unit (CPU), digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), controller, field Programmable Gate Array (FPGA) device, or the like. The processor 11 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
Optionally, the adapter circuit further includes a first resistor R1 and a second resistor R2 connected in series, a non-series end of the first resistor R1 is connected to a power pin of the electronic device U2 through a VCC pin, and a non-series end of the second resistor R2 is grounded.
The adapter circuit further comprises a third resistor R3 and a fourth resistor R4 which are connected in series, the non-series end of the third resistor R3 is connected with a power pin of the electronic device U2 through a VCC pin, and the non-series end of the fourth resistor R4 is connected with an earphone cable.
A connection point between the first resistor R1 and the second resistor R2 is connected to the main control chip 10 through a sar adc pin, and a connection point between the non-serial end of the fourth resistor R4 and the earphone line is connected to the main control chip 10 through an ADKEY pin.
On one hand, the main control chip 10 may obtain the voltage divided by the first resistor R1 and the second resistor R2 of the voltage provided by the electronic device U2 by obtaining the voltage on the sar adc pin (the voltage is the divided voltage of the voltage provided by the electronic device U2 on the first resistor R1).
On the other hand, the main control chip 10 may obtain the voltage on the connection point P1 by obtaining the voltage on the ADKEY pin, where the voltage is obtained after the electronic device U2 passes through the third resistor R3, the fourth resistor R4, the headphone line resistance, and the resistance of the keys on the headphone line and is divided, so that the change conditions of the line resistance of the headphone line connected to the adapter and the resistance of the keys on the headphone line may be obtained according to the voltage on the connection point P1, for example, if the voltage on the connection point P1 increases, it may be determined that the line resistance of the headphone line connected to the adapter and the resistance of the keys on the headphone line also increase.
In an embodiment, please refer to fig. 2 in combination with fig. 1, and take the earphone line U3 shown in fig. 2 as an example for description. In the earphone line U3, it is assumed that three keys are provided on the earphone line, namely a key S1 (for controlling the playing or pausing of music), a key S2 (for controlling the increase of volume), and a key S3 (for controlling the decrease of volume). Meanwhile, assume that the total resistance of the branch of the key S1 is the fifth resistance R5, the total resistance of the branch of the key S2 is the sixth resistance R6, and the total resistance of the branch of the key S3 is the seventh resistance R7. When the key S1 is pressed, the electronic device U2, the third resistor R3, the fourth resistor R4, the fifth resistor R4, the key S1 and the node VCMBUF shown in fig. 1 form a loop, where the node VCMBUF is a node of the earphone cable, and usually has a voltage of about 1.4V, and the voltage at the connection point P1 is a voltage divided by the voltage provided by the electronic device U2 minus the voltage at the node VCMBUF and applied to the fifth resistor R5. Similarly, the voltage of the connection point P1 when the key S2 or the key S3 is pressed may be acquired. Since the resistances of the different earphone lines may have a difference, the difference in the resistances of the different earphone lines can be obtained by obtaining the voltage of the connection point P1.
It should be understood that the hardware configuration of the adapter shown in figure 1 is merely an example, and that the swing gate may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components, and that the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
Fig. 3 is a schematic flow diagram of a line control method according to an embodiment of the present invention, where the method is applied to an adapter circuit, and the adapter circuit is used to connect to an electronic device and an earphone cable, respectively. The method may be performed by the adapter shown in fig. 1, and as shown in fig. 3, the method includes:
301: the first voltage provided by the electronic equipment is obtained through the adapter circuit.
The voltages provided by different electronic devices may also be different, and therefore, it is necessary to detect the voltage provided by the electronic device electrically connected to the adapter. This is because the voltage directly affects the voltage at the connection point between the adapter circuit and the earphone cord, and thus the drive-by-wire value of the keys on the earphone cord. The line control value of the case on the earphone line mainly refers to an interface value between two different line control intervals of the keys on the earphone line.
Taking the earphone cord shown in fig. 2 as an example, assume that when the key S1 is pressed, the voltage at the connection point P1 is 0.5V; when the key S2 is pressed down, the voltage on the connection point P1 is 1V; when the key S3 is pressed, the voltage at the connection point P1 is 2V. Then, when the key S1 is pressed, the corresponding interval is (0, 0.7V); when the key S2 is pressed, the corresponding interval is (0.7V, 1.2V); when the key S3 is pressed, the corresponding interval is (1.2v, 2.2v), and then the voltage of the node VCMBUF (usually 1.4V) is combined, so that: when the voltage on the connection point P1 is preset in a drive-by-wire interval of (1.4V, 2.1V) through the main control chip 10, the key S1 is correspondingly pressed down; when the voltage on the connection point P1 is preset in a drive-by-wire interval of (2.1V, 2.6V) through the main control chip 10, the key S2 is correspondingly pressed down; when the voltage on the connection point P1 is preset in the drive-by-wire interval of (2.6V, 3.6V) through the main control chip 10, the key S3 is correspondingly pressed down. Wherein 2.1V is the boundary value between the drive-by-wire interval (1.4V, 2.1V) and the drive-by-wire interval (2.1V, 2.6V), and 2.6V is the boundary value between the drive-by-wire interval (2.1V, 2.6V) and the drive-by-wire interval (2.6V, 3.6V). It can be understood that, in the main control chip 10, the reference line-control value or the current line-control value exists in a digital signal format, that is, the digital signal corresponding to 2.1V or 3.6V described above is the current line-control value finally existing in the main control chip 10.
Obviously, when the adapter circuit is connected with different electronic devices, the different line control intervals can be caused due to different voltages provided by the electronic devices, and therefore, by acquiring the first voltage provided by the electronic devices, the boundary value between the two line control intervals can be adjusted according to the first voltage, so that the adjustment of each line control interval is realized, and each line control interval can be suitable for the currently connected electronic devices, so that the phenomenon of disorder of line control is prevented.
In one embodiment, the first voltage may be obtained using a circuit such as that shown in FIG. 1. The adapter circuit comprises a first resistor R1 and a second resistor R2 which are connected in series, the non-series end of the second resistor R2 is connected with a power supply pin of the electronic equipment through a VCC pin, and the non-series end of the first resistor R1 is grounded. Therefore, the adapter circuit can obtain the first voltage by obtaining the voltage of the connection point between the first resistor R1 and the second resistor R2.
It should be understood that, in this embodiment, the first voltage may be a voltage at a connection point between the first resistor R1 and the second resistor R2, because an electronic device, such as a mobile phone, generally provides a voltage of 5V, and a normal operating voltage of the main control chip in the adapter circuit is 3.3V, therefore, by setting the first resistor R1 and the second resistor R2 to divide the voltage, the voltage received by the main control chip in the adapter circuit can be within an operating voltage range thereof. Certainly, in other embodiments, if the operating voltage of the main control chip is 5V or greater than 5V, the first voltage may also be a voltage directly provided by the electronic device, and at this time, the voltage at the connection point between the first resistor R1 and the second resistor R2 is divided by the first voltage, and then by detecting the voltage at the connection point between the first resistor R1 and the second resistor R2, the first voltage V1 may also be obtained as:
Figure RE-GDA0003124550240000091
where V0 is a voltage at a connection point between the first resistor R1 and the second resistor R2, R1 is a resistance value of the first resistor R1, and R2 is a resistance value of the second resistor R2. Wherein, the voltage of the connection point between the first resistor R1 and the second resistor R2 is the voltage of the SARADC pin, and the SARADC pin is used forThe voltage on the sar adc pin is obtained by the main control chip.
302: and acquiring a second voltage of a connection point between the adapter circuit and the earphone through the adapter circuit.
Similar with electronic equipment's the condition, when the earphone cord that adapter circuit connected is different, the voltage on the tie point between adapter circuit and the earphone cord also can be different, also will cause the influence to each drive-by-wire interval. Then, through obtaining the second voltage of the tie point between adapter circuit and the earphone cord, then can be according to the juncture value between two drive-by-wire intervals of second voltage regulation to realize the regulation to each drive-by-wire interval, thereby make each drive-by-wire interval can be applicable to the earphone cord that is connected at present, in order to prevent the phenomenon that the drive-by-wire is in disorder.
Likewise, the circuit configuration shown in fig. 1 may be employed to obtain the second voltage. The adapter circuit further comprises a third resistor R3 and a fourth resistor R4 which are connected in series, the non-series end of the third resistor R3 is connected with a power pin of the electronic equipment through a VCC pin, and the non-series end of the fourth resistor R4 is connected with an earphone wire through a MIC pin. Therefore, the second voltage of the connection point between the adapter circuit and the earphone line is the voltage at the connection point P1 and also the voltage at the ADKEY pin, and the ADKEY pin is used for connecting to the main control chip, so that the main control chip obtains the voltage at the pin ADKEY (i.e. the second voltage).
303: and acquiring a current drive-by-wire value based on the first voltage, the second voltage and the reference drive-by-wire value, wherein the current drive-by-wire value is used as an intersection value between two different drive-by-wire intervals of the keys on the earphone line.
The reference line control value is a preset standard value, for example, taking the electronic device as a mobile phone as an example, a mobile phone (denoted as mobile phone a) and any one earphone line (denoted as earphone line B) with a standard voltage can be selected as the setting reference. The adapter circuit is respectively connected with the mobile phone A and the earphone cable B, then 5V of the voltage provided by the mobile phone A is the first reference voltage, and the resistance on the earphone cable B is the reference resistance (recorded as the resistance R0). Taking the circuit structures shown in fig. 1 and 2 as examples, this isIn the process, the connection point between the adapter circuit and the reference resistor is the connection point P1, and since the first reference voltage is 5V, the voltage on the connection point P1 is
Figure RE-GDA0003124550240000101
Where Vp1 is the voltage at the connection point P1, vref is the first reference voltage, R0 is the resistance of the resistor R0, R3 is the resistance of the third resistor R3, and R4 is the resistance of the fourth resistor R4. At this time, the voltage at the connection point P1 is the second reference voltage.
Further, by pressing the keys S1, S2, and S3 on the headphone cable B, respectively, second reference voltages corresponding thereto are obtained, and the reference line control value is determined by the obtained second reference voltages. For example, the second reference voltages obtained by pressing the key S1, the key S2, and the key S3 on the earphone cable B are 0.2V, 1V, and 2V, respectively, and the intervals of the second reference voltages may be set to (0v, 0.4v), (0.4v, 1.2v), (1.2v, and 2.2v), respectively, and in combination with the voltage (usually 1.4V) of the node VCMBUF in fig. 2, the line control intervals corresponding to the keys S1, S2, and S3 may be (1.4v, 1.8v), (1.8v, 2.6v), (2.6v, and 3.6v), respectively, so that the two obtained reference values are digital signals corresponding to 1.8V and 2.6V, respectively.
Further, after obtaining the above reference drive-by-wire value, by detecting the actually connected electronic device and headphone cable and obtaining the corresponding first voltage and second voltage, the magnitude of the required adjustment value with respect to the reference drive-by-wire value can be obtained according to the first voltage and the second voltage.
Specifically, in an embodiment, the corresponding adjustment value is obtained according to a voltage interval in which the first voltage and the second voltage are located. The voltage provided by the electronic device may be divided into a plurality of intervals, for example, the voltage may be divided into 4 intervals, which are (4.8v, 5.0v), (5.0v, 5.1v), (5.1v, 5.2v), 5.2V, and more than these, and each interval is provided with a corresponding first preset adjustment value. Similarly, the voltage at the connection point between the adapter circuit and the earphone line may be divided into a plurality of intervals, for example, into 2 intervals, and the voltage signal may be converted into a digital signal, where the precision is (3.3/255) V for each plus 1 of the digital signal, and then the 2 intervals may be (0, 225) and (225, 250), respectively, and then two second preset adjustment values may also be obtained correspondingly.
It should be understood that the first preset adjustment value and the second preset adjustment value are also digital signals.
In practical applications, the first preset adjustment value and the second preset adjustment value may be set according to an empirical value, or may be obtained by testing different electronic devices and earphone cords for multiple times. For example, in an embodiment, in combination with the circuit structures shown in fig. 1 and fig. 2 and taking a mobile phone as an example, for the key S1, it is assumed that the first preset adjustment value corresponding to (4.8v, 5.0v), (5.0v, 5.1v), (5.1v, 5.2v), 5.2V, and the above 4 intervals can be respectively set as: 0. +3, 0, +3.
Meanwhile, on the basis of (4.8v, 5.0v), corresponding to the 2 intervals of (0, 225) and (225, 250), second preset adjustment values may be set to 0, respectively; on the basis of (5.0 v,5.1 v), corresponding to the 2 intervals of (0, 225) and (225, 250), the second preset adjustment value may be set to 0, +3, respectively; on the basis of (5.1 v, 5.2v), corresponding to the 2 intervals of (0, 225) and (225, 250), the second preset adjustment value can be respectively set to 0 and 0; on the basis of 5.2V and above, corresponding to the 2 intervals of (0, 225) and (225, 250), the second preset adjustment value can be set to 0, +1, respectively.
The first preset adjustment value and the second preset adjustment value when the key S2 or the key S3 is pressed can be obtained based on the same setting method as the key S1, which is within the range easily understood by those skilled in the art and will not be described herein again.
Then, when the adapter circuit is connected with different electronic devices and the earphone cable, the current drive-by-wire value can be obtained only by obtaining the first voltage and the second voltage. For example, it is assumed that the mobile phone A1 and the earphone line B1 are connected to the adaptor, and the first voltage supplied by the mobile phone A1 is 5.1V, and 5.1V may belong to either the interval (5.10V ) or the interval (5.1V, 5.2v), and it is assumed that 5.1V belongs to the interval (5.0V, 5.1V), without limitation. As can be seen from the above, for the key S1, the first preset adjustment value at this time is +3. Meanwhile, if the detected digital signal corresponding to the second voltage is 230, it belongs to the interval (225, 250), and the corresponding second preset adjustment value is +3. Therefore, for the mobile phone A1 and the headset wire B1, the current drive-by-wire value is the sum of the reference drive-by-wire value obtained in the above embodiment, the first preset adjustment value and the second preset adjustment value, and assuming that the reference drive-by-wire value is 12, the current drive-by-wire value is 12+ 3= 3, in other words, for the mobile phone A1 and the headset wire B1, when the digital signal is in the (0, 18) interval, the key S1 is pressed correspondingly, and when the current drive-by-wire value is greater than 18, it is determined that the key S2 or the key S3 is pressed. Based on the same method as that for setting the key S1, the sections of the digital signals corresponding to the keys S2 and S3 pressed down can be respectively obtained.
In summary, when the adapter circuit is connected to different electronic devices and earphone cables, the adapter circuit can automatically detect the first voltage and the second voltage, and obtain the corresponding first preset adjustment value and second preset adjustment value through the detected first voltage and second voltage, so as to obtain the corresponding current wire control value, and then, it is also possible to prevent the wire control abnormality (for example, pressing a volume increase button, and as a result, the volume is decreased if the main control chip recognizes) caused by the difference in the voltages provided by the electronic devices and the difference in the resistance of the earphone cables.
Fig. 4 is a schematic structural diagram of a drive-by-wire apparatus according to an embodiment of the present disclosure. As shown in fig. 4, the by-wire apparatus 400 includes a first acquisition unit 401, a second acquisition unit 402, and a third acquisition unit 403. The first obtaining unit 401 is configured to obtain a first voltage provided by the electronic device through the adapter circuit. The second obtaining unit 402 is configured to obtain a second voltage of a connection point between the adapter circuit and the earphone line through the adapter circuit. The third obtaining unit 403 is configured to obtain a current drive-by-wire value based on the first voltage, the second voltage, and a reference drive-by-wire value, where the current drive-by-wire value is used as an intersection value between two different drive-by-wire intervals of a key on the earphone line.
Since the apparatus embodiment and the method embodiment are based on the same concept, the contents of the apparatus embodiment may refer to the method embodiment on the premise that the contents do not conflict with each other, and are not described herein again.
The embodiment of the application further provides a line control system, which comprises electronic equipment, an earphone cord and the adapter in any one of the embodiments.
Embodiments of the present application further provide a non-volatile computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an adapter, the adapter is enabled to execute the method in any of the above embodiments.
Embodiments of the present application also provide a computer program product comprising a computer program stored on a computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method as in any of the above embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; within the context of the present application, where technical features in the above embodiments or in different embodiments may also be combined, the steps may be implemented in any order and there are many other variations of the different aspects of the present application described above which are not provided in detail for the sake of brevity; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.

Claims (6)

1. The line control method is characterized by being applied to an adapter circuit, wherein the adapter circuit is used for being respectively connected with electronic equipment and an earphone cable and acquiring a first reference voltage provided by the electronic equipment and a reference resistor on the earphone cable;
the adapter circuit comprises a first resistor and a second resistor which are connected in series, the non-series end of the second resistor is connected with a power pin of the electronic equipment, and the non-series end of the first resistor is grounded;
the adapter circuit further comprises a third resistor and a fourth resistor which are connected in series, wherein the non-series end of the third resistor is connected with a power pin of the electronic equipment, and the non-series end of the fourth resistor is connected with the earphone cable;
the drive-by-wire method comprises the following steps:
obtaining a first voltage by obtaining a voltage of a connection point between the first resistor and the second resistor;
obtaining a second voltage by obtaining a voltage of a connection point between a non-series end of the fourth resistor and the earphone line;
acquiring a second reference voltage of a connection point between the adapter circuit and the reference resistor based on the first reference voltage;
obtaining a reference line control value based on the second reference voltage;
and acquiring a current line control value based on the first voltage, the second voltage and the reference line control value, wherein the current line control value is used as an intersection value between two different line control intervals of the keys on the earphone line.
2. The line control method of claim 1, wherein the obtaining a current line control value based on the first voltage, the second voltage, and the reference line control value comprises:
obtaining a first voltage interval corresponding to the first voltage to obtain a first preset adjustment value corresponding to the first voltage interval;
obtaining a second voltage interval corresponding to the second voltage to obtain a second preset adjustment value corresponding to the second voltage interval;
and acquiring the current drive-by-wire value based on the first preset adjusting value, the second preset adjusting value and the reference drive-by-wire value.
3. The line control method according to claim 2, wherein the obtaining the current line control value based on the first preset adjustment value, the second preset adjustment value, and the reference line control value comprises:
and calculating the sum of the reference drive-by-wire value and the first preset adjusting value and the second preset adjusting value, and taking the sum as the current drive-by-wire value.
4. An adapter, comprising:
the adapter circuit is used for being connected with electronic equipment and an earphone cable respectively and acquiring a first reference voltage provided by the electronic equipment and a reference resistor on the earphone cable;
the adapter circuit includes:
a main control chip;
the circuit comprises a first resistor and a second resistor which are connected in series, wherein the non-series end of the first resistor is connected with a power pin of the electronic equipment, and the non-series end of the second resistor is grounded;
the earphone line comprises a third resistor and a fourth resistor which are connected in series, wherein the non-series end of the third resistor is connected with a power pin of the electronic equipment, and the non-series end of the fourth resistor is connected with the earphone line;
the connecting point between the first resistor and the second resistor is connected with the main control chip, and the connecting point between the non-serial end of the fourth resistor and the earphone cable is connected with the main control chip;
the main control chip comprises:
at least one processor and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any of claims 1-3.
5. A line control system, characterized by comprising: an electronic device, an earphone cord and an adaptor as claimed in claim 4.
6. A non-transitory computer-readable storage medium having stored thereon computer-executable instructions that, when executed by an adapter, cause the adapter to perform the method of any of claims 1-3.
CN202110511189.0A 2021-05-11 2021-05-11 Line control method, line control device, adapter and line control system Active CN113242487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110511189.0A CN113242487B (en) 2021-05-11 2021-05-11 Line control method, line control device, adapter and line control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110511189.0A CN113242487B (en) 2021-05-11 2021-05-11 Line control method, line control device, adapter and line control system

Publications (2)

Publication Number Publication Date
CN113242487A CN113242487A (en) 2021-08-10
CN113242487B true CN113242487B (en) 2022-12-02

Family

ID=77133289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110511189.0A Active CN113242487B (en) 2021-05-11 2021-05-11 Line control method, line control device, adapter and line control system

Country Status (1)

Country Link
CN (1) CN113242487B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164263B (en) * 2011-03-08 2012-09-05 华为终端有限公司 Device and method of audio/video signal transmission interface
CN103118191B (en) * 2013-01-28 2015-01-21 Tcl通讯(宁波)有限公司 Using control method and mobile terminal for iPhone wire control earphone
CN103607676B (en) * 2013-11-22 2016-09-14 加一联创电子科技有限公司 A kind of wire-controlled apparatus for earphone and earphone
CN204206434U (en) * 2014-12-04 2015-03-11 青岛歌尔声学科技有限公司 For eliminating audio frequency processing circuit and the line control earphone of headset plugging noise
CN105934931B (en) * 2014-12-26 2019-07-19 华为技术有限公司 A kind of terminal installation
CN204836506U (en) * 2015-07-24 2015-12-02 歌尔声学股份有限公司 Headset patch cord
CN205987270U (en) * 2016-07-26 2017-02-22 广东佳禾声学科技有限公司 Type of digifax mixed type C plug earphone
US10250730B2 (en) * 2016-08-22 2019-04-02 Merry Electronics (Shenzhen) Co., Ltd. Adapter apparatus for earphone accessory
CN207783084U (en) * 2018-01-04 2018-08-28 深圳市纳祥科技有限公司 Audio repeating circuit, audio switching device and earphone
CN209313161U (en) * 2019-03-08 2019-08-27 深圳市简听科技有限公司 A kind of audio frequency adaptor with acoustic processing

Also Published As

Publication number Publication date
CN113242487A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
US10222855B2 (en) Method and system for managing the power supply voltage of a USB Type-C source device
WO2016101509A1 (en) Charging control method and device
JP6715827B2 (en) Electronics interface for device headset jack
JP2017511937A (en) Method, apparatus, and computer program product for transitioning to USB Type-C accessory device docking mode
DE112016000994T5 (en) A LOW-TYPE C RECEIVER WITH HIGH EMISSION AND DC LEVEL SUPPRESSION
CN201758417U (en) Earphone compatible device and mobile terminal
DE112009000147T5 (en) Mobile device that allows UART and USB communication using the same connector, and methods of operating the same
CN103237189A (en) Electronic equipment, MHL (mobile high-definition link) connector, MHL system and connector detection method
CN104270160B (en) A kind of button detection device and method
CN105120063A (en) Volume prompting method of input voice and electronic device
CN113242487B (en) Line control method, line control device, adapter and line control system
US20180097315A1 (en) Power adapter, terminal device, charging system, and charging method
US10194231B2 (en) Circuit for detecting button action on earphone, terminal, and earphone
CN107908387B (en) Signal transmission circuit, signal transmission system, signal transmission method and intelligent terminal
CN113220617B (en) Detection circuit, detection method and terminal of plug-and-play device
CN214375036U (en) Mobile device test system
WO2016045093A1 (en) Wireless internet access terminal, current limiting control apparatus and current limiting control method
CN108540111A (en) Pressure detection circuit and electronic equipment
CN106878511B (en) A kind of camera arrangement and mobile terminal
CN205081331U (en) Novel USB interface converter
CN212588408U (en) Converter for converting TYPE-C signal into HDMI signal
CN110943502B (en) Charging method, split terminal and computer storage medium
EP3345405B1 (en) Microphone compatibility
CN115166344A (en) Method, circuit, device and readable storage medium for current detection circuit
US9552028B2 (en) Portable electronic device and voltage converting circuit thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant