[go: up one dir, main page]

CN108513218B - Audio channel control method and electronic equipment - Google Patents

Audio channel control method and electronic equipment Download PDF

Info

Publication number
CN108513218B
CN108513218B CN201810259965.0A CN201810259965A CN108513218B CN 108513218 B CN108513218 B CN 108513218B CN 201810259965 A CN201810259965 A CN 201810259965A CN 108513218 B CN108513218 B CN 108513218B
Authority
CN
China
Prior art keywords
switch
signal
time period
enable signal
path selection
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
CN201810259965.0A
Other languages
Chinese (zh)
Other versions
CN108513218A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201810259965.0A priority Critical patent/CN108513218B/en
Publication of CN108513218A publication Critical patent/CN108513218A/en
Application granted granted Critical
Publication of CN108513218B publication Critical patent/CN108513218B/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
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2420/00Details of connection covered by H04R, not provided for in its groups
    • H04R2420/03Connection circuits to selectively connect loudspeakers or headphones to amplifiers

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Stereophonic Arrangements (AREA)

Abstract

The present disclosure provides an audio path control method and an electronic device, the audio path control method including: when the earphone is determined to be connected, outputting a detection current through a first switch, wherein the detection current is used for detecting the insertion direction of the earphone; adjusting a second switch to a high resistance state within a target time period, the target time period covering a time period for which the detection current lasts; after the target time period, an audio output path of the electronic device is turned on through the second switch. According to the technical scheme, the second switch is adjusted to be in the high-resistance state in the target time period, namely the second switch is adjusted to be in the high-resistance state in the time period for detecting the current, so that the connection between the electronic equipment and the left and right sound channel passages of the earphone is disconnected, and the problem of POP sound on the earphone is solved.

Description

Audio channel control method and electronic equipment
Technical Field
The present disclosure relates to the field of electronic manufacturing technologies, and in particular, to an audio channel control method and an electronic device.
Background
Mobile terminals such as smart phones cancel 3.5mm earphone interfaces gradually, and adopt Type-C interface connection simulation earphone. The Type-C earphone comprises four signal interfaces on an analog earphone interface, which are respectively as follows: microphone input interface, earphone ground interface, left and right sound channel output interface.
Due to the symmetrical structure of the Type-C interface, the earphone is inserted positively or reversely and can be connected with the mobile phone. After the smart phone determines that the Type-C analog earphone is connected, the smart phone outputs a detection current to detect the insertion direction of the earphone. If the earphone is reversely plugged, the current can flow back to the main board of the mobile phone through the left and right sound channel paths of the earphone, so that POP sound appears on the earphone.
Disclosure of Invention
The embodiment of the disclosure provides an audio channel control method and an electronic device, and the technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an audio path control method applied to an electronic device, the electronic device including a first switch and a second switch, the first switch being configured to detect an insertion direction of an earphone and switch a microphone input interface and a ground signal interface of the electronic device, the second switch being configured to switch a USB path and an audio output path of the electronic device; characterized in that the method comprises:
when the earphone is determined to be connected, outputting a detection current through the first switch, wherein the detection current is used for detecting the insertion direction of the earphone;
adjusting the second switch to a high resistance state for a target time period, the target time period covering a time period for which the detection current lasts;
after the target time period, an audio output path of the electronic device is turned on through the second switch.
According to the technical scheme provided by the disclosure, the second switch is adjusted to be in the high-resistance state in the target time period, the target time period covers the time period for which the detection current lasts, namely the starting point of the target time period is not later than the time point for starting output of the detection current, and the ending point of the target time period is not earlier than the time point for stopping output of the detection current, namely the second switch is adjusted to be in the high-resistance state in the time period for which the detection current lasts, so that the connection between the electronic equipment and the left and right sound channel passages of the earphone is disconnected, and the problem of POP sound on the earphone is solved.
In one embodiment, the outputting a sense current through the first switch includes:
and applying an enabling signal to the first switch at the starting point of the target time period, wherein the first switch outputs the detection current after the enabling signal is effective.
In one embodiment, the enable signal of the first switch is active high;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the channel selection signal is at a high level, the second switch conducts an audio output channel of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a low level;
the adjusting the second switch to a high-resistance state in a target time period, and after the target time period, turning on an audio output path of the electronic device through the second switch includes:
at the starting point of the target time period, adjusting the enable signal of the first switch from a low level to a high level and keeping the enable signal;
at the end point of the target time period, adjusting the path selection signal of the second switch from a low level to a high level and keeping the path selection signal;
and performing an exclusive nor operation on the enable signal of the first switch and the path selection signal of the second switch to generate an enable signal of the second switch.
In one embodiment, the enable signal of the first switch is active high;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a high level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts an audio output path of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a high level;
the adjusting the second switch to a high-resistance state in a target time period, and after the target time period, turning on an audio output path of the electronic device through the second switch includes:
at the starting point of the target time period, adjusting the enable signal of the first switch from a low level to a high level and keeping the enable signal;
at the end point of the target time period, adjusting the path selection signal of the second switch from a high level to a low level and keeping the path selection signal;
and performing exclusive-or operation on the enable signal of the first switch and the path selection signal of the second switch to generate the enable signal of the second switch.
In one embodiment, further comprising:
determining an insertion direction of the earphone;
according to the insertion direction of the earphone, a microphone input interface of the electronic equipment and a microphone input interface of the earphone are conducted through the first switch, and a ground signal interface of the electronic equipment and a ground signal interface of the earphone are conducted.
According to a second aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: the device comprises a first switch, a second switch and a control module;
the first switch is used for detecting the insertion direction of the earphone and switching a microphone input interface and a ground signal interface of the electronic equipment, and the second switch is used for switching a USB channel and an audio output channel of the electronic equipment;
the control module is used for indicating the first switch to output a detection current when the earphone is determined to be connected, wherein the detection current is used for detecting the insertion direction of the earphone; the second switch is further configured to be adjusted to a high-resistance state for a target time period, the target time period covering a time period for which the detection current lasts; and the second switch is further used for instructing the second switch to conduct an audio output path of the electronic equipment after the target time period.
In one embodiment, the control module comprises:
the first switch control submodule is used for applying an enabling signal to the first switch at the starting point of the target time period;
the first switch is used for outputting the detection current after the enable signal is effective.
In one embodiment, the enable signal of the first switch is active high;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the channel selection signal is at a high level, the second switch conducts an audio output channel of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a low level;
the control module includes: the first switch enabling submodule, the second switch access submodule and the second switch enabling submodule;
the first switch enabling submodule is used for adjusting an enabling signal of the first switch from a low level to a high level and keeping the enabling signal at the starting point of the target time period;
the second switch path submodule is used for adjusting a path selection signal of the second switch from a low level to a high level and keeping the path selection signal at the end point of the target time period;
and the second switch enabling submodule is used for carrying out exclusive OR operation on the enabling signal of the first switch and the path selection signal of the second switch to generate the enabling signal of the second switch.
In one embodiment, the enable signal of the first switch is active high;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a high level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts an audio output path of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a high level;
the control module includes: the first switch triggering submodule, the second switch switching submodule and the second switch control submodule are connected;
the first switch triggering submodule is used for adjusting the enabling signal of the first switch from a low level to a high level and keeping the enabling signal at the starting point of the target time period;
the second switch switching submodule is used for adjusting the path selection signal of the second switch from a high level to a low level and keeping the path selection signal at the end point of the target time period;
and the second switch control submodule is used for carrying out exclusive-or operation on the enable signal of the first switch and the path selection signal of the second switch to generate the enable signal of the second switch.
In one embodiment, the control module further comprises:
a determination submodule for determining an insertion direction of the earphone;
and the connection sub-module is used for indicating the first switch according to the insertion direction of the earphone, conducting a microphone input interface of the electronic equipment and a microphone input interface of the earphone, and conducting a ground signal interface of the electronic equipment and a ground signal interface of the earphone.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
the earphone comprises a processor, a first switch and a second switch, wherein the first switch is used for detecting the insertion direction of an earphone and switching a microphone input interface and a ground signal interface of the electronic equipment, and the second switch is used for switching a USB channel and an audio output channel of the electronic equipment;
further comprising a memory for storing processor-executable instructions;
wherein the processor is configured to:
when the earphone is determined to be connected, the first switch is instructed to output a detection current, and the detection current is used for detecting the insertion direction of the earphone;
adjusting the second switch to a high resistance state for a target time period, the target time period covering a time period for which the detection current lasts;
after the target time period, instructing the second switch to conduct an audio output path of the electronic device.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the audio path control method provided by the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating an audio path control method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating an audio path control method according to an exemplary embodiment.
Fig. 3 is a schematic diagram illustrating a connection between an electronic device and a headset according to an example embodiment.
Fig. 4 is a schematic diagram illustrating a connection between an electronic device and a headset according to an example embodiment.
Fig. 5A is an illustrative diagram of a control signal shown in accordance with an example embodiment.
FIG. 5B is a schematic diagram illustrating the connection of control signals according to an exemplary embodiment.
Fig. 6A is an illustrative diagram of a control signal shown in accordance with an example embodiment.
FIG. 6B is a schematic diagram illustrating the connection of control signals according to an exemplary embodiment.
FIG. 7 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 8 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 9 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 10 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 11 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 12 is a block diagram of an electronic device shown in accordance with an example embodiment.
Fig. 13 is a block diagram of a terminal device shown according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The POP sound is also called crackle, and may also be called POPs and clinks. When the user inserts the earphone into the mobile phone after wearing the earphone, the user can hear the POP sound if the POP sound appears.
Use the condition that Type-C interface earphone inserted the smart mobile phone as an example, because the symmetrical structure of Type-C interface, the Type-C plug of earphone is just inserting or is inserting the female seat of Type-C that all can insert the cell-phone backward. After the mobile phone detects that the earphone is inserted, a detection current is output to detect the insertion direction of the earphone, and then the mobile phone is correspondingly connected with a microphone input interface and a ground signal interface of the earphone.
If the earphone is plugged, the microphone input interface and the ground signal interface of the mobile phone are correctly connected with the microphone input interface and the ground signal interface of the earphone.
If the earphone is reversely inserted, the microphone input interface and the ground signal interface of the mobile phone are exchanged through a switch (hereinafter, a first switch) inside the mobile phone, so that the microphone input interface and the ground signal interface of the mobile phone are correctly connected with the microphone input interface and the ground signal interface of the earphone.
If the detection current output by the mobile phone flows back to the main board of the mobile phone through the left and right sound channel passages of the earphone, namely the current loop passes through the left and right sound channels of the earphone, POP sound can be generated on the earphone.
The embodiment of the disclosure provides an audio channel control method, in which a switch (hereinafter, a second switch) on a current loop where left and right channels of an earphone are located is set to be in a high-resistance state in a time period when a detection current lasts, and the current loop is disconnected to avoid causing a POP sound. And after the output of the detected current is stopped, the audio output channel of the electronic equipment is conducted through the second switch, and the audio output is normally carried out.
Fig. 1 is a flowchart illustrating an audio path control method according to an exemplary embodiment, which is applied to an electronic device with an audio output through a headset, such as a mobile phone, a tablet computer, a personal computer, and the like.
The electronic equipment comprises an interface which can be used as a USB connection interface and an audio output interface for connecting an earphone. The embodiment of the present disclosure is described by taking a case where the electronic device and the headphone interface are Type-C interfaces as an example.
The electronic equipment comprises a first switch and a second switch, wherein the first switch is used for detecting the insertion direction of the earphone and switching a microphone input interface and a ground signal interface of the electronic equipment, and the second switch is used for switching a USB channel and an audio output channel of the electronic equipment.
The audio channel control method comprises the following steps 101-103:
in step 101, when it is determined that the earphone is connected, a detection current is output through a first switch.
The detection current is used to detect the insertion direction of the earphone. The electronic equipment detects the insertion direction of the earphone through the detection current, and after the detection current is output, the voltage value of the position is sampled at the detection current output point. Because the impedance of the earphone is different when the earphone is inserted in the forward direction and inserted in the reverse direction, the insertion direction of the earphone can be judged according to the magnitude of the sampling voltage value.
When the earphone is plugged, the impedance between the microphone input interface and the ground signal interface of the earphone is small, and the detection current flows back to the mobile phone through a loop formed by the microphone interface and the ground signal interface of the earphone.
When the earphone is reversely plugged, the impedance between the microphone input interface of the earphone and the ground signal interface is large, if the impedance between the left and right sound channels of the earphone and the mobile phone is small, the component of the detection current flows through the left and right sound channel passages of the earphone and flows back to the main board of the mobile phone, and the POP sound appears on the earphone.
In step 102, the second switch is adjusted to a high resistance state for a target time period.
The electronic equipment is internally provided with a USB channel and an audio output channel, and the two channels share a Type-C interface.
The working states of the second switch include two types: an on-state and a high resistance state.
In the on-state, the second switch functions like a double throw switch, through which one of the paths can be gated.
In the high-impedance state, the second switch is in an off state.
In this embodiment, the second switch is in the high impedance state during the target time period. The target time period covers a time period for which the detection current lasts, that is, a starting point of the target time period is not later than a time point at which the detection current starts to be output, and an ending point of the target time period is not earlier than a time point at which the detection current stops being output, or a time period for which the detection current lasts, and is a time period within the target time period.
In the target time period, the second switch is in a high-resistance state, namely, the second switch is in the high-resistance state in the time period for detecting the current continuously.
When the earphone is reversely plugged, the impedance between the microphone input interface of the earphone and the ground signal interface is large, if the impedance between the left and right sound channels of the earphone and the mobile phone is small, the component of the detection current flows through the left and right sound channel passages of the earphone and flows back to the main board of the mobile phone, and the POP sound appears on the earphone.
In the scheme of the disclosure, the second switch is in a high-resistance state in the target time period, and the connection between the electronic equipment and the left and right sound channel passages of the earphone is disconnected, so that the problem of POP sound on the earphone is solved.
In step 103, after the target time period, an audio output path of the electronic device is turned on through the second switch.
After the target time period, the working state of the second switch is switched from the high-impedance state to the conducting state, and the audio output path is gated, and at the moment, the electronic equipment can output audio through the earphone.
According to the audio channel control method provided by the embodiment of the disclosure, the second switch is adjusted to the high-resistance state in the target time period, the target time period covers the time period for which the detection current lasts, namely, the second switch is adjusted to the high-resistance state in the time period for which the detection current lasts, and the connection between the electronic equipment and the left and right channel channels of the earphone is disconnected, so that the problem of POP sound on the earphone is solved.
Based on the audio path control method provided in the embodiment corresponding to fig. 1, fig. 2 is a flowchart of an audio path control method according to an exemplary embodiment, and in the embodiment corresponding to fig. 2, the change process of the operating states of the first switch and the second switch is further supplemented and explained with reference to the circuit structure shown in fig. 3.
The content of some steps is the same as or similar to the steps in the corresponding embodiment of fig. 1, and only the differences in the steps will be described in detail below. Referring to fig. 2, the audio channel control method provided in this embodiment includes steps 201 and 205:
in step 201, when it is determined that the earphone is accessed, an enable signal is applied to the first switch.
Referring to a schematic diagram of the connection between the electronic device 30 and the headset 31 shown in fig. 3, the electronic device 30 includes: a controller 301, a first switch 302, and a second switch 303.
The controller 301 is connected to the first switch 302 through a microphone input interface, a ground signal interface, and an enable signal interface of the first switch 302. The first switch 302 includes a current source for outputting the detection current.
Between the controller 301 and the second switch 303 are a USB path and an audio output path. The USB channel includes a USB _ DP signal line and a USB _ DM signal line. The audio output path includes a left channel signal line and a right channel signal line.
The earphone 31 is connected to the electronic device 30 through a microphone input interface, a ground signal interface, a left channel interface, and a right channel interface.
In one embodiment, the enable signal of the first switch is active high. The initial level of the enable signal of the first switch is low level, and the controller pulls the enable signal of the first switch high when the earphone is determined to be connected.
In step 202, the first switch outputs a sense current after the enable signal is asserted.
The enable signal of the first switch is pulled high, and the internal current source of the first switch outputs the detection current.
In step 203, the insertion direction of the earphone is determined.
The voltage value at that location is sampled at the sensed current output point. Because the impedance of the earphone is different when the earphone is inserted in the forward direction and inserted in the reverse direction, the insertion direction of the earphone can be judged according to the magnitude of the sampling voltage value.
In one embodiment, the earphone is determined to be plugged in when the sampling voltage is between 300mV and 2.15V. And when the sampling voltage is more than 2.15V, judging that the earphone is reversely plugged.
In step 204, the first switch is adjusted according to the insertion direction of the headset.
Fig. 3 shows the situation where the headset is plugged in. When the earphone is plugged, the first switch 302 is turned on in parallel, so as to conduct the microphone input interface of the electronic device 30 and the microphone input interface of the earphone 31, and conduct the ground signal interface of the electronic device 30 and the ground signal interface of the earphone 31.
Fig. 4 shows the situation where the headset is unplugged. When the earphone is reversely plugged, the first switch 303 is switched on, so that the microphone input interface of the electronic device 30 and the microphone input interface of the earphone 31 are conducted, and the ground signal interface of the electronic device 30 and the ground signal interface of the earphone 31 are conducted.
In step 205, the operating state of the second switch is adjusted by the control signal.
The operating state of the second switch can be adjusted by its control signal. The control signal of the second switch includes an enable signal and a path selection signal. When the enable signal of the second switch is at low level, the second switch is in high resistance state, and when the enable signal of the second switch is at high level, the second switch is in on state.
Generally, in order to solve the problem of charging when the mobile phone is turned off, the enable signal of the second switch cannot directly use a General Purpose Input/Output interface (GPIO), but is directly connected to the power supply, so that the second switch is in an on state and the USB channel is turned on. The GPIO cannot be used directly because it is not active at shutdown and cannot generate high levels. However, once the enable signal of the second switch is pulled high by the power supply, the second switch cannot achieve the high impedance state. In the embodiment of the disclosure, the second switch can be adjusted to be in a conducting state or a high-impedance state, so that the POP sound is prevented from being generated when the earphone is connected.
The control signals of the second switch are not shown in fig. 3, 4. The control signal of the second switch will be described separately with reference to fig. 5A, 5B, 6A, and 6B.
Referring to the functional description of the second switch shown in table 1, in one embodiment, when the second switch is in a conducting state and the path selection signal is low, the second switch conducts the USB path of the electronic device. The second switch is in a conducting state, and when the channel selection signal is at a high level, the second switch conducts the audio output channel of the electronic equipment.
TABLE 1
Enable signal ViasSelection signal Description of the function
0 × High resistance state
1 0 USB channel conduction
1 1 Audio channel conduction
Referring to the control signal diagram shown in fig. 5A, the initial level of the enable signal of the first switch is low, and the initial level of the path selection signal is low.
At the start point T1 of the target period, the enable signal of the first switch is adjusted from the low level to the high level and held.
At the end point T2 of the target period, the path selection signal of the second switch is adjusted from the high level to the low level and held.
Referring to the schematic diagram of the second switch enable signal shown in fig. 5B, the enable signal of the first switch and the path selection signal of the second switch are subjected to an exclusive nor operation to generate the second switch enable signal.
In the target time period, i.e., the time period T1-T2, the enable signal of the second switch is at a low level, and the second switch is in a high impedance state.
The time period for detecting the current is the time period from T1 to T3, and the time period between T3 to T2 is a reserved time margin.
In the time period from T1 to T3, the second switch is in a high-resistance state, and the connection between the electronic equipment and the left and right channel passages of the earphone is disconnected, so that the problem of POP sound on the earphone is solved.
Referring to the functional description of the second switch shown in table 2, in one embodiment, when the second switch is in a conducting state and the path selection signal is at a high level, the second switch conducts the USB path of the electronic device. The second switch is in a conducting state, and when the channel selection signal is in a low level, the second switch conducts the audio output channel of the electronic equipment.
TABLE 2
Enable signal Channel selection signal Description of the function
0 × High resistance state
1 0 Audio channel conduction
1 1 USB channel conduction
Referring to the control signal diagram shown in fig. 6A, the initial level of the enable signal of the first switch is low, and the initial level of the path selection signal is high.
At the start point Ta of the target period, the enable signal of the first switch is adjusted from a low level to a high level and held.
At the end point Tb of the target period, the path selection signal of the second switch is adjusted from the high level to the low level and held.
Referring to fig. 6B, the enable signal of the second switch is generated by xoring the enable signal of the first switch with the path selection signal of the second switch.
In the target time period, namely the Ta-Tb time period, the enabling signal of the second switch is in a low level, and the second switch is in a high resistance state.
The time period for which the current is detected is the Ta-Tc time period, and the time period between Tc-Tb is the reserved time margin.
In the Ta-Tc time period, the second switch is in a high-resistance state, so that the connection between the electronic equipment and the left and right sound channel passages of the earphone is disconnected, and the problem of POP sound on the earphone is solved.
According to the audio channel control method provided by the embodiment of the disclosure, the second switch is adjusted to the high-resistance state in the target time period, the target time period covers the time period for which the detection current lasts, namely, the second switch is adjusted to the high-resistance state in the time period for which the detection current lasts, and the connection between the electronic equipment and the left and right channel channels of the earphone is disconnected, so that the problem of POP sound on the earphone is solved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 7 is a block diagram illustrating an electronic device, which may implement some or all of its functions by software, hardware, or a combination of both, for performing the audio path control method described in the corresponding embodiments of fig. 1-6, according to an example embodiment. As shown in fig. 7, the electronic apparatus includes:
a first switch 71, a second switch 72, and a control module 73.
The first switch 71 is used for detecting the insertion direction of the earphone and switching the microphone input interface and the ground signal interface of the electronic device, and the second switch 72 is used for switching the USB path and the audio output path of the electronic device.
And a control module 73, configured to instruct the first switch 71 to output a detection current when it is determined that the earphone is connected, where the detection current is used to detect an insertion direction of the earphone. And also for adjusting the second switch 72 to the high resistance state for a target period of time that covers the period of time for which the current is sensed. And also for instructing the second switch 72 to turn on the audio output path of the electronic device after the target time period.
As shown in FIG. 8, in one embodiment, the control module 73 includes:
the first switch control submodule 731 is configured to apply an enable signal to the first switch 71 at a start point of the target period.
And a first switch 71 for outputting the detection current after the enable signal is asserted.
In one embodiment, the enable signal of the first switch 71 is active high.
The control signals of the second switch 72 include an enable signal and a path selection signal. The second switch 72 is in a high impedance state when the enable signal of the second switch 72 is low, and the second switch 72 is in a conducting state when the enable signal of the second switch 72 is high.
When the second switch 72 is in an on state and the path selection signal is at a low level, the second switch 72 turns on the USB path of the electronic device.
When the second switch 72 is in an on state and the channel selection signal is at a high level, the second switch 72 turns on the audio output channel of the electronic device.
The initial level of the enable signal of the first switch 71 is low, and the initial level of the path selection signal is low.
As shown in fig. 9, the control module 73 includes: a first switch enable sub-module 732, a second switch pass sub-module 733, and a second switch enable sub-module 734.
A first switch enable sub-module 732 for adjusting the enable signal of the first switch 71 from a low level to a high level and maintaining the same at a start point of the target period.
The second switch path sub-module 733 is configured to adjust the path selection signal of the second switch 72 from a low level to a high level and hold it at an end point of the target period.
The second switch enable sub-module 734 is configured to perform an exclusive nor operation on the enable signal of the first switch 71 and the path selection signal of the second switch 72 to generate the enable signal of the second switch 72.
In one embodiment, the enable signal of the first switch 71 is active high.
The control signals of the second switch 72 include an enable signal and a path selection signal. The second switch 72 is in a high impedance state when the enable signal of the second switch 72 is low, and the second switch 72 is in a conducting state when the enable signal of the second switch 72 is high.
When the second switch 72 is in an on state and the path selection signal is at a high level, the second switch 72 turns on the USB path of the electronic device.
When the second switch 72 is in the on state and the channel selection signal is at the low level, the second switch 72 turns on the audio output channel of the electronic device.
The initial level of the enable signal of the first switch 71 is low, and the initial level of the path selection signal is high.
As shown in fig. 10, the control module 73 includes: a first switch trigger submodule 737, a second switch switching submodule 735, and a second switch control submodule 736.
The first switch activating submodule 737 is configured to adjust the enable signal of the first switch 71 from a low level to a high level and maintain the enable signal at a start point of the target period.
The second switch switching submodule 735 is configured to adjust the path selection signal of the second switch 72 from a high level to a low level and hold the path selection signal at the end point of the target time period.
The second switch control submodule 736 is configured to perform an exclusive-or operation on the enable signal of the first switch 71 and the path selection signal of the second switch 72 to generate the enable signal of the second switch 72.
As shown in fig. 11, in one embodiment, the control module 73 further includes:
a decision submodule 738 for deciding the insertion direction of the earphone.
The connection sub-module 739 is used for instructing the first switch 71 to conduct the microphone input interface of the electronic device and the microphone input interface of the earphone, and to conduct the ground signal interface of the electronic device and the ground signal interface of the earphone according to the insertion direction of the earphone.
According to the electronic device provided by the embodiment of the disclosure, the second switch is adjusted to the high-resistance state in the target time period, the target time period covers the time period for which the detection current lasts, that is, the second switch is adjusted to the high-resistance state in the time period for which the detection current lasts, and the connection between the electronic device and the left and right sound channel passages of the earphone is disconnected, so that the problem of POP sound on the earphone is solved.
Fig. 12 is a block diagram illustrating an electronic device according to an exemplary embodiment, which may be implemented by software, hardware or a combination of the two as part or all of an electronic device for performing the audio path control method described in the embodiments corresponding to fig. 1-6. As shown in fig. 12, the electronic device 120 includes:
the earphone comprises a processor 1201, a first switch 1202 and a second switch 1203, wherein the first switch 1202 is used for detecting the insertion direction of the earphone and switching a microphone input interface and a ground signal interface of the electronic device, and the second switch 1203 is used for switching a USB channel and an audio output channel of the electronic device.
Also included is a memory 1204 for storing processor-executable instructions.
Wherein the processor 1201 is configured to:
when it is determined that the earphone is connected, the first switch 1202 is instructed to output a detection current for detecting the insertion direction of the earphone.
The second switch 1203 is adjusted to a high resistance state for a target period of time, which covers the period of time for which the current is detected.
After the target time period, the second switch 1203 is instructed to turn on the audio output path of the electronic device.
In one embodiment, the processor 1201 may be further configured to:
at the start of the target time period, an enable signal is applied to the first switch 1202, and the first switch 1202 outputs the detection current after the enable signal is asserted.
In one embodiment, the enable signal of the first switch 1202 is active high. The control signals of the second switch 1203 include an enable signal and a path selection signal. The second switch 1203 is in a high impedance state when the enable signal of the second switch 1203 is at a low level, and the second switch 1203 is in a conducting state when the enable signal of the second switch 1203 is at a high level.
When the second switch 1203 is in an on state and the path selection signal is at a low level, the second switch 1203 turns on the USB path of the electronic device.
When the second switch 1203 is in an on state and the path selection signal is at a high level, the second switch 1203 turns on an audio output path of the electronic device.
The initial level of the enable signal of the first switch 1202 is low, and the initial level of the path selection signal is low.
The processor 1201 may also be configured to:
at the start point of the target period, the enable signal of the first switch 1202 is adjusted from a low level to a high level and held.
At the end point of the target period, the path selection signal of the second switch 1203 is adjusted from the low level to the high level and held.
The enable signal of the first switch 1202 is subjected to an exclusive nor operation with the path selection signal of the second switch 1203 to generate an enable signal of the second switch 1203.
In one embodiment, the enable signal of the first switch 1202 is active high. The control signals of the second switch 1203 include an enable signal and a path selection signal. The second switch 1203 is in a high impedance state when the enable signal of the second switch 1203 is at a low level, and the second switch 1203 is in a conducting state when the enable signal of the second switch 1203 is at a high level.
When the second switch 1203 is in an on state and the path selection signal is at a high level, the second switch 1203 turns on the USB path of the electronic device.
When the second switch 1203 is in an on state and the path selection signal is at a low level, the second switch 1203 turns on an audio output path of the electronic device.
The initial level of the enable signal of the first switch 1202 is low, and the initial level of the path selection signal is high.
The processor 1201 may also be configured to:
at the start point of the target period, the enable signal of the first switch 1202 is adjusted from a low level to a high level and held.
At the end point of the target period, the path selection signal of the second switch 1203 is adjusted from the high level to the low level and held.
The enable signal of the first switch 1202 is exclusive-ored with the path selection signal of the second switch 1203 to generate an enable signal of the second switch 1203.
In one embodiment, the processor 1201 may be further configured to:
the insertion direction of the earphone is determined.
According to the insertion direction of the earphone, the first switch 1202 conducts the microphone input interface of the electronic device and the microphone input interface of the earphone, and conducts the ground signal interface of the electronic device and the ground signal interface of the earphone.
According to the electronic device provided by the embodiment of the disclosure, the second switch is adjusted to the high-resistance state in the target time period, the target time period covers the time period for which the detection current lasts, that is, the second switch is adjusted to the high-resistance state in the time period for which the detection current lasts, and the connection between the electronic device and the left and right sound channel passages of the earphone is disconnected, so that the problem of POP sound on the earphone is solved.
The electronic device provided by the embodiment of the present disclosure may be a terminal device as shown in fig 13,
fig. 13 is a block diagram illustrating a terminal device, where the terminal device 130 may be a smart phone, a tablet computer, or the like, according to an exemplary embodiment, and the terminal device 130 is configured to perform the audio path control method described in the embodiment corresponding to fig. 1 to fig. 6.
Terminal device 130 may include one or more of the following components: a processing component 1301, a memory 1302, a power component 1303, a multimedia component 1304, an audio component 1305, an input/output (I/O) interface 1306, a sensor component 1307, and a communication component 1308.
The processing component 1301 generally controls the overall operation of the terminal device 130, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1301 may include one or more processors 13011 to execute instructions to perform all or part of the steps of the methods described above. Further, processing component 1301 may include one or more modules that facilitate interaction between processing component 1301 and other components. For example, the processing component 1301 may include a multimedia module to facilitate interaction between the multimedia component 1304 and the processing component 1301.
The memory 1302 is configured to store various types of data to support operations at the terminal device 130. Examples of such data include instructions for any application or method operating on terminal device 130, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 1302 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read Only Memory (EPROM), a Programmable Read Only Memory (PROM, ROM), a Read Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The power supply component 1303 provides power to the various components of the terminal device 130. The power components 1303 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the terminal device 130.
The multimedia component 1304 includes a screen that provides an output interface between the terminal device 130 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1304 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal device 130 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1305 is configured to output and/or input an audio signal. For example, the audio component 1305 may include a Microphone (MIC) configured to receive external audio signals when the terminal device 130 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in memory 1302 or transmitted via communication component 1308. In some embodiments, the audio component 1305 also includes a speaker for outputting audio signals.
The I/O interface 1306 provides an interface between the processing component 1301 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 1307 includes one or more sensors for providing various aspects of status assessment for the terminal device 130. For example, sensor component 1307 may detect an open/closed status of terminal device 130, the relative positioning of components, such as a display and keypad of terminal device 130, sensor component 1307 may also detect a change in the position of terminal device 130 or a component of terminal device 130, the presence or absence of user contact with terminal device 130, orientation or acceleration/deceleration of terminal device 130, and a change in the temperature of terminal device 130. The sensor assembly 1307 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. Sensor assembly 1307 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1307 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 1308 is configured to facilitate communication between terminal device 130 and other devices in a wired or wireless manner. The terminal device 130 may access a Wireless network based on a communication standard, such as Wireless Fidelity (WiFi), 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1308 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 1308 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 130 may be implemented by one or more Application Specific Integrated circuits (abbreviated as:
ASIC), digital signal processor (english full name: digital Signal Processing, english abbreviation: DSP), digital signal processing equipment (english full name: digital Signal Processing Device, english abbreviation: DSPD), programmable logic devices (english full name: programmable Logic Device, english abbreviation: PLD), field programmable gate array (english full name: field
Programmable Gate Array, english abbreviation: FPGA), controller, microcontroller, microprocessor or other electronic component for performing the audio path control method described in the embodiments corresponding to fig. 1-6 above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided that includes instructions, such as memory 1302 including instructions, that are executable by processing component 1301 of terminal device 130 to perform the above-described method. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. When executed by the processing component 1301 of the terminal device 130, the instructions in the storage medium enable the terminal device 130 to perform the audio path control method described in the corresponding embodiments of fig. 1-6 above, the method including:
when the earphone is determined to be connected, the first switch outputs a detection current, and the detection current is used for detecting the insertion direction of the earphone.
The second switch is adjusted to a high resistance state for a target time period, which covers a time period for which the current is detected.
And after the target time period, the audio output path of the electronic equipment is conducted through the second switch.
In one embodiment, the method comprises:
and applying an enabling signal to the first switch at the starting point of the target time period, and outputting the detection current by the first switch after the enabling signal is effective.
In one embodiment, the method comprises:
the enable signal of the first switch is active high.
The control signal of the second switch includes an enable signal and a path selection signal. When the enable signal of the second switch is at low level, the second switch is in high resistance state, and when the enable signal of the second switch is at high level, the second switch is in on state.
The second switch is in a conducting state, and when the path selection signal is in a low level, the second switch conducts the USB path of the electronic device.
The second switch is in a conducting state, and when the channel selection signal is at a high level, the second switch conducts the audio output channel of the electronic equipment.
The initial level of the enable signal of the first switch is a low level, and the initial level of the path selection signal is a low level.
Adjusting the second switch to a high impedance state during a target time period, and turning on an audio output path of the electronic device through the second switch after the target time period, including:
at the starting point of the target period, the enable signal of the first switch is adjusted from a low level to a high level and maintained.
At the end point of the target period, the path selection signal of the second switch is adjusted from a low level to a high level and held.
The enable signal of the first switch and the path selection signal of the second switch are subjected to exclusive OR operation to generate the enable signal of the second switch.
In one embodiment, the method comprises:
the enable signal of the first switch is active high.
The control signal of the second switch includes an enable signal and a path selection signal. When the enable signal of the second switch is at low level, the second switch is in high resistance state, and when the enable signal of the second switch is at high level, the second switch is in on state.
The second switch is in a conducting state, and when the path selection signal is at a high level, the second switch conducts the USB path of the electronic device.
The second switch is in a conducting state, and when the channel selection signal is in a low level, the second switch conducts the audio output channel of the electronic equipment.
The initial level of the enable signal of the first switch is low level, and the initial level of the path selection signal is high level.
Adjusting the second switch to a high impedance state during a target time period, and turning on an audio output path of the electronic device through the second switch after the target time period, including:
at the starting point of the target period, the enable signal of the first switch is adjusted from a low level to a high level and maintained.
At the end point of the target period, the path selection signal of the second switch is adjusted from a high level to a low level and held.
And carrying out exclusive OR operation on the enable signal of the first switch and the path selection signal of the second switch to generate the enable signal of the second switch.
In one embodiment, the method comprises:
the insertion direction of the earphone is determined.
According to the insertion direction of the earphone, the microphone input interface of the electronic equipment and the microphone input interface of the earphone are conducted through the first switch, and the ground signal interface of the electronic equipment and the ground signal interface of the earphone are conducted.
According to the terminal device provided by the embodiment of the disclosure, the second switch is adjusted to the high-resistance state in the target time period, the target time period covers the time period for which the detection current lasts, that is, the second switch is adjusted to the high-resistance state in the time period for which the detection current lasts, and the connection between the electronic device and the left and right sound channel passages of the earphone is disconnected, so that the problem of POP sound on the earphone is solved.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (6)

1. An audio channel control method is applied to an electronic device, the electronic device comprises a first switch and a second switch, the first switch is used for detecting the insertion direction of an earphone and switching a microphone input interface and a ground signal interface of the electronic device, and the second switch is used for switching a USB channel and an audio output channel of the electronic device; characterized in that the method comprises:
when the earphone is determined to be connected, outputting a detection current through the first switch, wherein the detection current is used for detecting the insertion direction of the earphone;
adjusting the second switch to a high resistance state for a target time period, the target time period covering a time period for which the detection current lasts;
after the target time period, conducting an audio output path of the electronic device through the second switch;
the outputting of the detection current through the first switch includes:
applying an enabling signal to the first switch at the starting point of the target time period, wherein the first switch outputs the detection current after the enabling signal is effective;
the enable signal of the first switch is active at a high level;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the channel selection signal is at a high level, the second switch conducts an audio output channel of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a low level;
the adjusting the second switch to a high-resistance state in a target time period, and after the target time period, turning on an audio output path of the electronic device through the second switch includes:
at the starting point of the target time period, adjusting the enable signal of the first switch from a low level to a high level and keeping the enable signal;
at the end point of the target time period, adjusting the path selection signal of the second switch from a low level to a high level and keeping the path selection signal;
performing an exclusive nor operation on the enable signal of the first switch and the path selection signal of the second switch to generate an enable signal of the second switch;
or,
the enable signal of the first switch is active at a high level;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a high level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts an audio output path of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a high level;
the adjusting the second switch to a high-resistance state in a target time period, and after the target time period, turning on an audio output path of the electronic device through the second switch includes:
at the starting point of the target time period, adjusting the enable signal of the first switch from a low level to a high level and keeping the enable signal;
at the end point of the target time period, adjusting the path selection signal of the second switch from a high level to a low level and keeping the path selection signal;
and performing exclusive-or operation on the enable signal of the first switch and the path selection signal of the second switch to generate the enable signal of the second switch.
2. The audio path control method according to claim 1, further comprising, after the outputting of the detection current by the first switch:
determining an insertion direction of the earphone;
according to the insertion direction of the earphone, a microphone input interface of the electronic equipment and a microphone input interface of the earphone are conducted through the first switch, and a ground signal interface of the electronic equipment and a ground signal interface of the earphone are conducted.
3. An electronic device, comprising: the device comprises a first switch, a second switch and a control module;
the first switch is used for detecting the insertion direction of the earphone and switching a microphone input interface and a ground signal interface of the electronic equipment, and the second switch is used for switching a USB channel and an audio output channel of the electronic equipment;
the control module is used for indicating the first switch to output a detection current when the earphone is determined to be connected, wherein the detection current is used for detecting the insertion direction of the earphone; the second switch is further configured to be adjusted to a high-resistance state for a target time period, the target time period covering a time period for which the detection current lasts; the second switch is further used for instructing the second switch to conduct an audio output path of the electronic equipment after the target time period;
the control module includes:
the first switch control submodule is used for applying an enabling signal to the first switch at the starting point of the target time period;
the first switch is used for outputting the detection current after an enabling signal is effective;
the enable signal of the first switch is active at a high level;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the channel selection signal is at a high level, the second switch conducts an audio output channel of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a low level;
the control module includes: the first switch enabling submodule, the second switch access submodule and the second switch enabling submodule;
the first switch enabling submodule is used for adjusting an enabling signal of the first switch from a low level to a high level and keeping the enabling signal at the starting point of the target time period;
the second switch path submodule is used for adjusting a path selection signal of the second switch from a low level to a high level and keeping the path selection signal at the end point of the target time period;
the second switch enabling submodule is used for carrying out exclusive OR operation on the enabling signal of the first switch and the path selection signal of the second switch to generate the enabling signal of the second switch;
or,
the enable signal of the first switch is active at a high level;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a high level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts an audio output path of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a high level;
the control module includes: the first switch triggering submodule, the second switch switching submodule and the second switch control submodule are connected;
the first switch triggering submodule is used for adjusting the enabling signal of the first switch from a low level to a high level and keeping the enabling signal at the starting point of the target time period;
the second switch switching submodule is used for adjusting the path selection signal of the second switch from a high level to a low level and keeping the path selection signal at the end point of the target time period;
and the second switch control submodule is used for carrying out exclusive-or operation on the enable signal of the first switch and the path selection signal of the second switch to generate the enable signal of the second switch.
4. The electronic device of claim 3, wherein the control module further comprises:
a determination submodule for determining an insertion direction of the earphone;
and the connection sub-module is used for indicating the first switch according to the insertion direction of the earphone, conducting a microphone input interface of the electronic equipment and a microphone input interface of the earphone, and conducting a ground signal interface of the electronic equipment and a ground signal interface of the earphone.
5. An electronic device, comprising:
the earphone comprises a processor, a first switch and a second switch, wherein the first switch is used for detecting the insertion direction of an earphone and switching a microphone input interface and a ground signal interface of the electronic equipment, and the second switch is used for switching a USB channel and an audio output channel of the electronic equipment;
further comprising a memory for storing processor-executable instructions;
wherein the processor is configured to:
when the earphone is determined to be connected, the first switch is instructed to output a detection current, and the detection current is used for detecting the insertion direction of the earphone;
adjusting the second switch to a high resistance state for a target time period, the target time period covering a time period for which the detection current lasts;
after the target time period, instructing the second switch to conduct an audio output path of the electronic device;
the outputting of the detection current through the first switch includes:
applying an enabling signal to the first switch at the starting point of the target time period, wherein the first switch outputs the detection current after the enabling signal is effective;
the enable signal of the first switch is active at a high level;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the channel selection signal is at a high level, the second switch conducts an audio output channel of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a low level;
the adjusting the second switch to a high-resistance state in a target time period, and after the target time period, turning on an audio output path of the electronic device through the second switch includes:
at the starting point of the target time period, adjusting the enable signal of the first switch from a low level to a high level and keeping the enable signal;
at the end point of the target time period, adjusting the path selection signal of the second switch from a low level to a high level and keeping the path selection signal;
performing an exclusive nor operation on the enable signal of the first switch and the path selection signal of the second switch to generate an enable signal of the second switch;
or,
the enable signal of the first switch is active at a high level;
the control signal of the second switch comprises an enable signal and a path selection signal; the second switch is in a high-resistance state when the enable signal of the second switch is at a low level, and the second switch is in a conducting state when the enable signal of the second switch is at a high level;
when the second switch is in a conducting state and the path selection signal is at a high level, the second switch conducts a USB path of the electronic equipment;
when the second switch is in a conducting state and the path selection signal is at a low level, the second switch conducts an audio output path of the electronic equipment;
an initial level of an enable signal of the first switch is a low level, and an initial level of the path selection signal is a high level;
the adjusting the second switch to a high-resistance state in a target time period, and after the target time period, turning on an audio output path of the electronic device through the second switch includes:
at the starting point of the target time period, adjusting the enable signal of the first switch from a low level to a high level and keeping the enable signal;
at the end point of the target time period, adjusting the path selection signal of the second switch from a high level to a low level and keeping the path selection signal;
and performing exclusive-or operation on the enable signal of the first switch and the path selection signal of the second switch to generate the enable signal of the second switch.
6. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, carry out the steps of the audio path control method of any of claims 1-2.
CN201810259965.0A 2018-03-27 2018-03-27 Audio channel control method and electronic equipment Active CN108513218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810259965.0A CN108513218B (en) 2018-03-27 2018-03-27 Audio channel control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810259965.0A CN108513218B (en) 2018-03-27 2018-03-27 Audio channel control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN108513218A CN108513218A (en) 2018-09-07
CN108513218B true CN108513218B (en) 2021-01-26

Family

ID=63378857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810259965.0A Active CN108513218B (en) 2018-03-27 2018-03-27 Audio channel control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN108513218B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175015B (en) * 2019-05-29 2022-05-27 Oppo广东移动通信有限公司 Method and device for controlling volume of terminal equipment and terminal equipment
CN111193501B (en) * 2019-12-31 2023-03-24 上海创功通讯技术有限公司 Control circuit and handheld electronic equipment
CN114630230B (en) * 2022-05-12 2022-10-14 荣耀终端有限公司 Electronic equipment, pull-up circuit and method for suppressing earphone POP sound

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103022831A (en) * 2012-12-30 2013-04-03 青岛歌尔声学科技有限公司 Earphone socket, earphone noise reduction device and earphone socket implementation method
CN105812979A (en) * 2016-04-21 2016-07-27 歌尔声学股份有限公司 Earphone
CN205647889U (en) * 2016-03-31 2016-10-12 歌尔股份有限公司 Headset
CN106231491A (en) * 2016-08-01 2016-12-14 深圳市福智软件技术有限公司 The method of power down POP sound is extracted in a kind of elimination

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201733365A (en) * 2016-03-11 2017-09-16 捷音特科技股份有限公司 Acoustic adjusting system, earphone device and the acoustic adjusting method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103022831A (en) * 2012-12-30 2013-04-03 青岛歌尔声学科技有限公司 Earphone socket, earphone noise reduction device and earphone socket implementation method
CN205647889U (en) * 2016-03-31 2016-10-12 歌尔股份有限公司 Headset
CN105812979A (en) * 2016-04-21 2016-07-27 歌尔声学股份有限公司 Earphone
CN106231491A (en) * 2016-08-01 2016-12-14 深圳市福智软件技术有限公司 The method of power down POP sound is extracted in a kind of elimination

Also Published As

Publication number Publication date
CN108513218A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN110796988B (en) Backlight adjusting method and device
US11469962B2 (en) Method and apparatus for configuring information of indicating time-frequency position of SSB, and method and apparatus for determining time-frequency position of SSB
CN109890021A (en) Bluetooth headset switching method, bluetooth headset and terminal
CN110875769B (en) Wireless communication device and antenna switching method
CN105407433A (en) Method and device for controlling sound output equipment
CN108513218B (en) Audio channel control method and electronic equipment
CN111049984A (en) Audio playback control method and apparatus, and storage medium
CN104378715A (en) Device and method for lowering earphone POP sound
CN108270922A (en) Method of speech processing and device
CN108093132B (en) Terminal device and ringtone volume control method
US20210247244A1 (en) Temperature control
US11205906B2 (en) Charging processing method, terminal device and storage medium
CN109922203B (en) Terminal, screen off method and device
CN108446094B (en) Audio acquisition circuit, terminal equipment, audio acquisition method and device
CN112448745B (en) WIFI antenna selection control device, method and terminal
CN112821508A (en) Charging method, charging device and storage medium
CN106658674B (en) Mobile terminal and method for outputting conducted power
CN113922457B (en) Charging method, charging device, electronic equipment and storage medium
CN111294685B (en) Method, device, terminal and storage medium for reducing earphone insertion noise
CN114428563B (en) Method and device for determining display frame rate and touch sampling rate and storage medium
CN106936972B (en) Method, device and system for controlling audio channel
CN106776424B (en) Connector, control method and control device thereof, and electronic equipment
CN108539823B (en) Charging method and device
CN106170038B (en) Recording method and device
CN114142543A (en) Battery charging and discharging loop, charging method and device and electronic equipment

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