Earphone power-off method and electronic device

By turning off the second power supply in the electronic device and changing its voltage signal in reverse, the problem of POP sound when the headphones are unplugged is solved, and a better user experience is achieved.

WO2025035744A1PCT designated stage expired Publication Date: 2025-02-20HONOR DEVICE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/079864
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-17
Filing Date
2024-03-04
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

When removing the analog headset, existing electronic devices often produce sounds similar to "pop" or current sounds (POP sounds), affecting the user experience.

Method used

By turning off the second power supply in the electronic device and changing its voltage signal inversely with the voltage signal interrupted by the headset, the change time of the voltage signal is reduced or eliminated.

Benefits of technology

Effectively reduce or eliminate the POP sound when the headset is pulled out, and enhance the user's experience of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079864_20022025_PF_FP_ABST
    Figure CN2024079864_20022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides an earphone power-off method and an electronic device, applied to the scenario of an earphone being unplugged from an electronic device, enabling the earphone to be quickly powered off, thereby reducing or eliminating the POP noise generated during unplugging of the earphone and improving the user experience of the electronic device. The method can comprise: in response to an earphone being unplugged from an electronic device, turning off a second power supply in the electronic device, enabling a voltage signal of the second power supply and a voltage signal of interruption of the earphone to reversely change, so that the change time of the voltage signals can be shortened, thereby reducing or eliminating the POP noise; and updating configuration information of a register in the electronic device from second configuration information to first configuration information, then in response to the earphone being plugged into the electronic device, turning on the second power supply, and then updating the configuration information of the register from the first configuration information to the second configuration information, thereby facilitating quick power-off of the earphone when being unplugged from the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Headphone power-off method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 17, 2023, with application number 202311044054.3 and application name “Headphone Power-Off Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the technical field of electronic devices, and more particularly to a method for powering off headphones and electronic devices. Background Art

[0003] With the gradual popularization of the universal serial bus Type-C (USB Type-C) interface (abbreviated as Type-C interface), more and more electronic devices have cancelled the analog headphone (such as 3.5mm headphone) interface, but analog headphones have not withdrawn from the market. For example, electronic devices can be connected to analog headphones through the Type-C interface to transmit audio signals to the analog headphones.

[0004] For electronic devices that support analog headphones or use a Type-C port, unplugging analog headphones often produces a popping sound or electrical noise (called "pop noise"), which significantly impacts the user experience. Therefore, reducing or eliminating the pop noise is a pressing technical issue.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a method for powering off headphones and an electronic device, so that the headphones can be powered off quickly, thereby reducing or eliminating the POP sound generated by unplugging the headphones, which helps to improve the user experience of the electronic device.

[0007] In a first aspect, an embodiment of the present application provides a method for powering off headphones, which is applied to an electronic device. The method includes: in response to the headphones being unplugged from the electronic device, turning off a second power supply in the electronic device, causing the voltage signal of the second power supply to change in the opposite direction of the voltage signal of the headphones, thereby reducing the change time of the voltage signal, thereby reducing or eliminating the pop sound generated by the unplugging; and updating the configuration information of a register in the electronic device from the second configuration information to the first configuration information. Then, in response to the headphones being plugged into the electronic device, turning on the second power supply, and then updating the configuration information of the register from the first configuration information to the second configuration information, so that the headphones can be quickly powered off when they are unplugged from the electronic device. The second power supply is used to power the headphones, and turning off the second power supply causes the headphones to power off.

[0008] In conjunction with the method provided in the first aspect, in some embodiments, turning off the second power supply in the electronic device may be performed by turning off the second power supply based on the configuration information in the register being the second configuration information. In other words, the second power supply is turned off based on the second configuration information in the register, thereby powering off the headset.

[0009] In conjunction with the method provided in the first aspect, in some embodiments, turning on the second power supply may be based on the configuration information of the register being the first configuration information, turning on the second power supply. In other words, based on the first configuration information of the register, turning on the second power supply to power on the headset.

[0010] In conjunction with the method provided in the first aspect, in some embodiments, the voltage signal of the second power supply and the voltage signal of the headphone interruption change in opposite directions, including the voltage signal of the second power supply changing from a high level to a low level within a first time period after the voltage signal of the headphone interruption changes from a low level to a high level. It will be understood that the opposite direction of change includes the same change logic and opposite signal amplitudes. The same change logic means that the voltage signal of the second power supply changes level within the first time period after the voltage signal of the headphone interruption changes, and the opposite signal amplitude means that the level changes are opposite.

[0011] The first time period is less than 40 microseconds.

[0012] In conjunction with the method provided in the first aspect, in some embodiments, before updating the configuration information of the register in the electronic device from the second configuration information to the first configuration information, the method further includes: turning off a software switch in the electronic device, where the software switch is a switch between a second power supply and a first power supply, where the first power supply is used to power an audio module, and the audio module includes the first power supply, the second power supply, the register, and the software switch. Turning off the software switch disconnects the power path between the first power supply and the second power supply.

[0013] In conjunction with the method provided in the first aspect, in some embodiments, the audio module further includes a hardware gate circuit;

[0014] The first configuration information is used to configure a first configuration relationship of the hardware gate circuit, which is used by the hardware gate circuit to control the activation of the second power supply. The second configuration information is used to configure a second configuration relationship of the hardware gate circuit, which is used by the hardware gate circuit to control the deactivation of the second power supply and to control the voltage signal of the second power supply to change in the opposite direction to the voltage signal of the headphone interruption. In other words, the hardware gate circuit controls the opening or closing of the switch in the hardware gate circuit based on the configuration information of the register, thereby activating or deactivating the second power supply and causing the voltage signal of the second power supply to change in the opposite direction to the voltage signal of the headphone interruption.

[0015] In conjunction with the method provided in the first aspect, in some embodiments, the electronic device further includes an application processor (AP) module; turning off the software switch in the electronic device can be accomplished by a hardware gate circuit sending a first headphone interrupt voltage signal to the AP module, where the first headphone interrupt voltage signal is at a high level; the AP module generates a second switch control signal in response to the first headphone interrupt voltage signal having a level opposite to that of the received headphone interrupt voltage signal, and sends the second switch control signal to the software switch; the software switch controls the software switch to be in an off state in response to the second switch control signal, and sends a second switch state to the AP module, where the second switch state indicates that the software switch is in an off state. It is understood that the AP module controls the turning off of the software switch via the second switch control signal.

[0016] In combination with the method provided in the first aspect, in some embodiments, updating the configuration information of a register in an electronic device from the second configuration information to the first configuration information can be that, in response to the second switch state, the AP module sends a second configuration control signal to the register, where the second configuration control signal includes a control signal corresponding to the second configuration information; in response to the second configuration control signal, the register updates the configuration information from the second configuration information to the first configuration information, and sends the first configuration information to the hardware gate circuit.

[0017] In conjunction with the method provided in the first aspect, in some embodiments, before updating the configuration information of the register from the first configuration information to the second configuration information, the method further includes: a hardware gate circuit sending a second headphone interrupt voltage signal to the AP module, where the second headphone interrupt voltage signal is at a low level; the AP module, in response to the level of the second headphone interrupt voltage signal being opposite to the level of the received headphone interrupt voltage signal, generates a first switch control signal and sends the first switch control signal to the software switch; the software switch, in response to the first switch control signal, controls the software switch to be in an on state and sends a first switch state to the AP module, where the first switch state indicates that the software switch is in an on state. It is understandable that the AP module controls the on-state of the software switch via the first switch control signal.

[0018] In combination with the method provided in the first aspect, in some embodiments, updating the configuration information of a register in an electronic device from first configuration information to second configuration information can be that, in response to a first switch state, the AP module sends a first configuration control signal to the register, where the first configuration control signal includes a control signal corresponding to the first configuration information; in response to the first configuration control signal, the register updates the configuration information from the first configuration information to the second configuration information, and sends the second configuration information to the hardware gate circuit.

[0019] In a second aspect, an embodiment of the present application provides an electronic device, which includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.

[0020] In a third aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0021] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when the computer program product is run on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fifth aspect, an embodiment of the present application provides a chip system, which includes an application processor, an audio module, and an earphone module, and the chip system can execute the first aspect and any possible implementation of the first aspect. The application processor is used to execute the operation of the AP module.

[0023] It is understandable that the electronic device provided in the second aspect, the computer storage medium provided in the third aspect, the computer program product provided in the fourth aspect, and the chip system provided in the fifth aspect are all used to perform the method provided in the first aspect of this application. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0025] FIG2 is a schematic diagram of the pins of a circular plug simulating an earphone;

[0026] FIG3 is a schematic diagram of a circuit structure using an embodiment of the present application;

[0027] FIG4 is a timing diagram of a process of inserting earphones into the electronic device 100 according to an embodiment of the present application;

[0028] FIG5 is a waveform diagram of the electronic device 100 provided by an embodiment of the present application when headphones are inserted;

[0029] FIG6 is a timing diagram of a process of removing an earphone from an electronic device 100 according to an embodiment of the present application;

[0030] FIG7 is a waveform diagram showing a case where an earphone is unplugged from an electronic device 100;

[0031] FIG8 is a waveform diagram of an earphone being unplugged from an electronic device 100 according to an embodiment of the present application;

[0032] FIG9 is a hardware structure diagram of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0034] The terms "first," "second," "third," and the like in the embodiments of the present application are used to distinguish between different objects, rather than to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a list of steps or units may be included, or alternatively, steps or units not listed may be included, or other steps or units inherent to the process, method, product, or device may be included.

[0035] For electronic devices that support analog headphones or electronic devices that support analog headphones through a Type-C interface, when the analog headphones are inserted into the electronic device, the probability of generating a POP sound is low because the electronic device has a software-activated power-on logic for the external headphone circuit module. However, when the analog headphones are unplugged from the electronic device, since audio and other signals are always in a communication state and unplugging is an instantaneous physical action, the probability of generating a POP sound is high.

[0036] In view of this, embodiments of the present application provide a headphone power-off method and electronic device that, without changing the electronic device's circuit structure, can reduce or eliminate the popping sound generated by plugging and unplugging analog headphones, thereby improving the user experience of the electronic device. In other words, the popping sound can be reduced or eliminated without adding or subtracting circuitry.

[0037] In order to make the technical solution of the present application clearer, the application scenarios of the embodiments of the present application are first introduced below.

[0038] For example, please refer to Figure 1, which is an example diagram of an application scenario provided by an embodiment of the present application. The application scenario may include an electronic device 100, a Type-C adapter 200, and an earphone 300.

[0039] The electronic device 100 can be a mobile phone or a tablet computer; the electronic device 100 can also be a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device; the electronic device 100 can also be a music player, a walkman or other playback device. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device. The application scenario shown in Figure 1 takes the electronic device 100 as an example of a mobile phone.

[0040] The Type-C adapter 200 includes a Type-C plug and an analog headphone jack, which are connected via a data cable. The Type-C plug fits into the Type-C port of the electronic device 100, and is inserted into the analog headphone jack. The analog headphone jack fits into the circular plug of an analog headphone, and is inserted into the circular plug of an analog headphone. Once the Type-C plug is inserted into the Type-C port of the electronic device 100 and the analog headphone plug is inserted into the analog headphone jack, the electronic device 100 is connected to the analog headphone, and audio signals can be transmitted from the electronic device 100 to the analog headphone.

[0041] The earphones 300 are analog earphones, which can be understood as earphones without a Type-C plug, or as conventional 3.5mm earphones with a cylindrical plug. The analog earphones can be connected to the electronic device 100 via the Type-C adapter 200. The earphones involved in the embodiments of the present application are analog earphones.

[0042] The scenario shown in (1) of FIG1 is that the Type-C plug has been inserted into the Type-C interface of the electronic device 100, and the round plug of the earphone 300 is about to be inserted into the analog headphone jack. This scenario can be understood as a scenario in which the earphone 300 is about to be inserted into the electronic device 100. In the embodiment of the present application, the earphone 300 can be inserted into the electronic device 100 by directly inserting the earphone 300 into the 3.5mm headphone jack of the electronic device 100 through its round plug, or the earphone 300 can be inserted into the Type-C interface of the electronic device 100 through the Type-C adapter 200.

[0043] The scenario shown in (2) of Figure 1 is that the Type-C plug has been inserted into the Type-C interface of the electronic device 100, and the round plug of the earphone 300 is about to be unplugged from the analog headphone jack. This scenario can be understood as a scenario in which the earphone 300 is about to be unplugged from the electronic device 100. In the embodiment of the present application, the earphone 300 can be unplugged from the electronic device 100 by directly unplugging the earphone 300 from the 3.5mm headphone jack of the electronic device 100, or by unplugging the earphone 300 from the analog headphone jack of the Type-C adapter 200, rather than unplugging the Type-C plug from the electronic device 100.

[0044] That is to say, the embodiments of the present application can be applied to scenarios where headphones are directly plugged into or unplugged from electronic devices, scenarios where headphones are plugged into or unplugged from electronic devices via a Type-C adapter, and scenarios where headphones are plugged into or unplugged from electronic devices via other types of adapters.

[0045] Please refer to Figure 2, which is a schematic diagram of the pins of the circular plug of the analog headset. The circular plug of the analog headset includes four pins, namely pin SLEEVE, pin RING2, pin RING1 and pin TIP. As shown in (1) of Figure 2, pin SLEEVE is used for grounding, pin RING2 is used to implement the microphone function, pin RING1 is used to implement the right channel function, and pin TIP is used to implement the left channel function. As shown in (2) of Figure 2, pin SLEEVE is used to implement the microphone function, pin RING2 is used for grounding, pin RING1 is used to implement the right channel function, and pin TIP is used to implement the left channel function. The bold lines in Figure 2 represent the front view effect of the insulating ring.

[0046] The following is an introduction to the circuit structure diagram of the embodiment of the present application.

[0047] Please refer to Figure 3, which is a schematic diagram of a circuit structure using an embodiment of the present application. This circuit structure is a partial circuit structure of electronic device 100. The circuit structure shown in Figure 3 includes an audio module 301, an application processor (AP) module 302, an earphone module 303, an earphone interrupt signal module 304, and a main power supply V0 305 for the audio module.

[0048] The AP module 302 can implement the functions of an AP, and the operating system, user interface, and application programs of the electronic device 100 are all executed on the AP. The AP module can be integrated on a system on chip (SOC).

[0049] The earphone module 303 is a headphone circuit module on the electronic device 100, located outside the audio module 301. It is used to implement the earphone circuitry. The earphone circuitry is used to power the earphones on and off. When power is supplied, the earphone circuitry powers the earphones on; when power is not supplied, the earphone circuitry powers the earphones off.

[0050] The earphone interrupt signal module 304 is a module on the electronic device 100 outside the audio module 301 and is used to provide a high-level or low-level earphone interrupt signal.

[0051] The audio module 301 can be an audio module inside an integrated circuit (IC) chip, which can be used to control the power on or off of the earphone module 303 to achieve the power on or off of the earphone. The IC chip can be a SOC, a power management unit (PMU), a power management integrated circuit (PMIC), etc. If the AP module 302 and the audio module 301 are integrated on the same SOC, the AP module 302 and the audio module 301 are independent of each other on the SOC, but can communicate with each other. The AP module 302 and the audio module 301 can also be integrated on different SOCs.

[0052] The audio module's main power supply V0 305 is used to power the audio module 301. For ease of description, the audio module's main power supply V0 is referred to as V0 below. V0 identifies the external power supply that supplies power to the entire audio module 301. External refers to power outside the audio module or the IC chip where the audio module resides. V0 can be a PMU.

[0053] As shown in Figure 3, the audio module 301 includes an internal power supply V1 3011, a software switch 3012, a hardware gate circuit 3013, a power supply V2 3014 for supplying power to the headphone module, a register 3015, and a resistor 3016. For ease of description, the internal power supply V1 of the audio module is referred to as V1, and the power supply V2 for supplying power to the headphone module is referred to as V2.

[0054] V1 is used to identify the power supply after V0 enters the audio module. V1 is used to power the circuits or modules within the audio module. V2 is used to identify the power supply that supplies power to the headphone module 303. The opening or closing of the software switch 3012 is controlled by the AP control signal sent by the AP module 302. In other words, the AP control signal can control the opening or closing of the software switch 3012. Turning on the software switch 3012 establishes a power path between V1 and the hardware gate circuit 3013. The hardware gate circuit 3013 then opens the switch between V1 and V2 (including the switch that inputs V1 and the switch that outputs V2), allowing V2 to supply power to the headphone module 303. Turning off the software switch 3012 disconnects the power path between V1 and the hardware gate circuit 3013. The hardware gate circuit 3013 then closes the switch between V1 and V2 (including the switch that inputs V1 and / or the switch that outputs V2), stopping V2 from supplying power to the headphone module 303.

[0055] The hardware gate circuit 3013 is used to control the opening or closing of various switches based on the configuration information provided by the register 3015, for example, controlling the opening or closing of the switch between V1 and V2. It is also used to feedback a high or low headphone interrupt signal to the AP module 302. The hardware gate circuit 3013 may include at least one of an AND gate, an OR gate, or a NOT gate. The hardware gate circuit 3013 may also include a comparator circuit, which is used to compare the headphone interrupt signal transmitted by the headphone interrupt signal module 304 with a reference signal to output a high or low headphone interrupt signal, and transmit the headphone interrupt signal to the AP module. It should be noted that the AP module is not powered by V1, but rather by other chips on the electronic device 100.

[0056] Register 3015 is used to provide configuration information to hardware gate circuit 3013, so that hardware gate circuit 3013 controls the opening or closing of each switch based on the configuration information. The configuration information provided by register 3015 may include the configuration relationship between the various gate circuits of hardware gate circuit 3013, so that hardware gate circuit 3013 can control the opening or closing of each switch based on the configuration information. In this embodiment of the present application, register 3015 may also receive an AP control signal from the AP module and modify the gate circuit configuration information based on the AP control signal.

[0057] Resistor 3016 is a pull-up resistor, one end of which is connected to V1 and the other end to the headphone interrupt signal module 304. This allows V1 to provide a high-level power supply to the headphone interrupt signal module 304. Thus, before headphones are plugged into the electronic device 100, the headphone interrupt signal module 304 generates and transmits a high-level headphone interrupt signal. When or after headphones are plugged into the electronic device 100, the power path between the headphone interrupt signal module 304 and V1 is disconnected, and the headphone interrupt signal module 304 is grounded, thereby generating and transmitting a low-level headphone interrupt signal. The headphone interrupt signal can also be described as HP_EINT.

[0058] The following describes the processing of inserting an earphone into the electronic device 100 and the processing of removing the earphone from the electronic device 100 based on the circuit structure shown in FIG3 .

[0059] Please refer to Figure 4, which is a timing diagram of the processing process of the electronic device 100 being plugged into a headset according to an embodiment of the present application. Figure 4 may include but is not limited to the following steps:

[0060] 401. The earphone interrupt signal module changes the earphone interrupt signal from a high level to a low level.

[0061] Before headphones are plugged into electronic device 100, the headphone interrupt signal module provides a high-level headphone interrupt signal and continues to provide a high-level headphone interrupt signal. When headphones are plugged into electronic device 100, the spring inside the analog headphone jack of electronic device 100 shorts the ground (GND), causing the headphone interrupt signal module to change the headphone interrupt signal from a high level to a low level. It is understandable that the physical act of plugging headphones into electronic device 100 causes the headphone interrupt signal to momentarily change to a low level.

[0062] 402 : The earphone interrupt signal module sends a low-level earphone interrupt signal to the hardware gate circuit.

[0063] The headset interrupt signal module sends the low-level headset interrupt signal to the hardware gate circuit, so that the hardware gate circuit sends the low-level headset interrupt signal to the AP module. 403, the hardware gate circuit sends the low-level headset interrupt signal to the AP module.

[0064] In response to the received low-level earphone interrupt signal, the hardware gate circuit sends the low-level earphone interrupt signal to the AP module.

[0065] 404. The AP module generates a first switch control signal.

[0066] In response to receiving a low-level headphone interrupt signal, the AP module generates a first switch control signal. The first switch control signal is used to control the software switch to turn on. The first switch control signal is essentially an AP control signal. The AP module can recognize that a headphone is plugged into the electronic device 100 by changing from receiving a high-level headphone interrupt signal to receiving a low-level headphone interrupt signal.

[0067] 405 , the AP module sends the first switch control signal to the software switch.

[0068] The AP module sends the first switch control signal to the software switch in the audio module.

[0069] In response to the timer of the debounce time timing out, the AP module sends a first switch control signal to the software switch to open the software switch, and then the hardware gate circuit can open the switch between V1 and V2. That is, after the timer of the debounce time times out, the hardware gate circuit opens the switch between V1 and V2 to power on V2. In response to the timer of the debounce time timing out, the AP module controls the opening of the software switch through the first switch control signal, which can reduce or avoid the POP sound generated by inserting headphones, making the power-on of V2 more stable. The AP module includes a timer for the debounce time. In response to receiving a low-level headphone interrupt signal, the AP module starts the timer. The timing time of the timer reaches the rated time or the countdown time of the timer returns to zero, that is, the timer times out. The debounce time of the AP module in different electronic devices may vary, but most of the debounce times are within 250ms to 260ms.

[0070] 406, software switch is turned on.

[0071] In response to receiving the first switch control signal, the software switch opens to establish a power path between V1 and the hardware gate circuit. The power path between V1 and the hardware gate circuit includes a power path between V1 and the software switch and a power path between the software switch and the hardware gate circuit. When the software switch is open, it acts as a power conductor between V1 and the hardware gate circuit.

[0072] 407 : The hardware gate circuit opens the switch between V1 and V2 based on the first configuration information.

[0073] The first configuration information is obtained by the hardware gate circuit from the register. In response to the register writing the first configuration information, the register sends the first configuration information to the hardware gate circuit. The first configuration information includes a first configuration relationship between the various gate circuits of the hardware gate circuit. The hardware gate circuit can adjust the structure of the hardware gate circuit based on the first configuration relationship to open the switch between V1 and V2. In other words, the first configuration relationship causes the hardware gate circuit to open the switch between V1 and V2.

[0074] In response to the power path between V1 and the hardware gate circuit being established, the hardware gate circuit opens the switch between V1 and V2 based on the first configuration information.

[0075] Turning on the switch between V1 and V2 turns on both the input to V1 and the output to V2. Turning on the V1 input switch allows V1 to input power to V2 through a hardware gate circuit; turning on the V2 output switch allows power to be input to V2, allowing V1 to input power to V2. Since the path between V1 and V2 is open, V1 can supply power to V2, which in turn can supply power to the headphone module, thus powering up the headphones.

[0076] 408. The software switch sends a switch status to the AP module, where the switch status indicates that the software switch is turned on.

[0077] In response to the software switch being turned on, the software switch sends a switch status to the AP module, indicating that the software switch is turned on.

[0078] After step 406, steps 407 and 408 may be performed. Step 407 and step 408 may be performed simultaneously.

[0079] 409. The AP module sends a first configuration control signal to the register.

[0080] In response to receiving a switch status indicating that the software switch is turned on, the AP module sends a first configuration control signal to the register. The first configuration control signal is used to instruct the register to update configuration information, for example, to update the first configuration information to the second configuration information. The first configuration control signal is essentially an AP control signal, but its function differs from that of the first switch control signal. The first configuration control signal may include a control signal corresponding to the second configuration information, so that the register updates its configuration information from the first configuration information to the second configuration information.

[0081] The second configuration information includes a second configuration relationship between gate circuits of the hardware gate circuit. The hardware gate circuit can adjust the structure of the hardware gate circuit based on the second configuration relationship to close the switch output to V2 and cause the voltage signal of V2 to change in the opposite direction to the voltage signal of the headphone interrupt signal. The opposite change includes the same change logic but opposite signal amplitude, that is, the voltage signal of V2 changes from a high level to a low level within a first time period after the headphone interrupt signal changes from a low level to a high level. The first time period is less than 40 microseconds.

[0082] 410. The register updates the first configuration information to the second configuration information.

[0083] In response to the received first configuration control signal, the register updates the first configuration information to the second configuration information. Optionally, the register deletes the first configuration information and writes the second configuration information.

[0084] 411. The register sends the second configuration information to the hardware gate circuit.

[0085] In response to the register writing the second configuration information, the register sends the second configuration information to the hardware gate circuit, so that when the earphones are unplugged from the electronic device 100, the hardware gate circuit can control V2 to power off based on the second configuration information to reduce or avoid the POP sound generated by unplugging.

[0086] In the embodiment shown in FIG4 , when the power path between V1 and the hardware gate circuit is established, the AP module also controls the register to update the configuration information so that when the earphone is unplugged from the electronic device 100 , the POP sound generated by the dialing out can be reduced or avoided.

[0087] For example, see the waveform diagram of the electronic device 100 when the earphone is inserted as shown in FIG5 . In FIG5 , the voltage of the earphone interrupt signal is always high before the earphone is inserted, and immediately becomes low when the earphone is inserted; the voltage of V2 is always low before the earphone is inserted, and becomes high after a period of time (i.e., the time difference shown by the dotted line) after the earphone is inserted; the voltage of MIC_P is always low before the earphone is inserted, and becomes high after a period of time (i.e., the time difference shown by the dotted line) after the earphone is inserted. In other words, the change in the voltage of MIC_P is consistent with the change in the voltage of V2. Among them, MIC_P refers to the pin in the analog headphone jack that matches the pin SLEEVE shown in (2) of FIG2 . The time difference shown by the dotted line can be understood as the debounce time, and its value range is 250ms to 260ms. FIG5 takes 260ms as an example. The debounce time can also be understood as the delay time between V2 and the actual insertion time.

[0088] Please refer to FIG6 , which is a timing diagram of the processing process of the earphone being unplugged from the electronic device 100 according to an embodiment of the present application. FIG6 may include but is not limited to the following steps:

[0089] 601, the earphone interrupt signal module changes the earphone interrupt signal from a low level to a high level.

[0090] Before the headset is unplugged from the electronic device 100, the headset interrupt signal module provides a low-level headset interrupt signal and continues to provide the low-level headset interrupt signal. When the headset is unplugged from the electronic device 100, the spring inside the analog headphone jack of the electronic device 100 separates from the ground, causing the headset interrupt signal module to change the headset interrupt signal from a low level to a high level. It is understandable that the physical act of unplugging the headset from the electronic device 100 causes the headset interrupt signal to instantly become high.

[0091] 602. The earphone interrupt signal module sends a high-level earphone interrupt signal to the hardware gate circuit.

[0092] The earphone interrupt signal module sends the high-level earphone interrupt signal to the hardware gate circuit, so that the hardware gate circuit sends the high-level earphone interrupt signal to the AP module.

[0093] Updated to 603, the hardware gate circuit controls V2 to power off based on the second configuration information.

[0094] In response to a high-level headphone interrupt signal received, based on the second configuration information, V2 is controlled to be powered down, and a voltage signal of V2 changes in the opposite direction to a voltage signal of the headphone interrupt signal. Controlling V2 to power down may include: closing a switch output to V2, so that V2 can be quickly powered down.

[0095] 604 , the hardware gate circuit sends a high-level earphone interrupt signal to the AP module.

[0096] In response to the received high-level headphone interrupt signal, the hardware gate circuit sends the high-level headphone interrupt signal to the AP module. In the embodiment of the present application, step 603 can be performed before step 604, or step 603 and step 604 can be performed simultaneously.

[0097] 605 , the AP module generates a second switch control signal.

[0098] In response to receiving a high-level headset interrupt signal, the AP module generates a second switch control signal. The second switch control signal is used to control the software switch to be turned off. The second switch control signal is essentially an AP control signal. The AP module can recognize that the headset has been unplugged from the electronic device 100 by changing from receiving a low-level headset interrupt signal to receiving a high-level headset interrupt signal.

[0099] 606 , the AP module sends the second switch control signal to the software switch.

[0100] The AP module sends the second switch control signal to the software switch in the audio module.

[0101] 607, software switch is closed.

[0102] In response to receiving the second switch control signal, the software switch is closed to disconnect the power path between V1 and the hardware gate circuit.

[0103] 608. The software switch sends a switch status to the AP module, where the switch status indicates that the software switch is closed.

[0104] In response to the software switch being turned off, the software switch sends a switch status to the AP module, indicating that the software switch has been turned off.

[0105] 609. The AP module sends a second configuration control signal to the register.

[0106] In response to receiving a switch status indicating that the software switch is closed, the AP module sends a second configuration control signal to the register. The second configuration control signal is used to instruct the register to update configuration information, for example, to update the second configuration information to the first configuration information. The second configuration control signal is essentially an AP control signal, but its function differs from that of the second switch control signal. The second configuration control signal may include a control signal corresponding to the first configuration information, so that the register updates its configuration information from the second configuration information to the first configuration information.

[0107] The first configuration information can be found in the detailed description of step 407 in the embodiment shown in FIG4 , and will not be described again here.

[0108] 610. The register updates the second configuration information to the first configuration information.

[0109] In response to the received second configuration control signal, the register updates the second configuration information to the first configuration information. Optionally, the register deletes the second configuration information and writes the first configuration information.

[0110] The register updates the second configuration information to the first configuration information, which can be understood as restoring the configuration information to the initial configuration information (i.e., the first configuration information). This can reduce or avoid the impact on the power-on of the headset. If the second configuration information is not updated to the first configuration information, when the electronic device 100 is plugged into the headset, the headset will power on quickly, which may burn out the headset.

[0111] 611. The register sends the first configuration information to the hardware gate circuit.

[0112] In response to the register writing the first configuration information, the register sends the first configuration information to the hardware gate circuit, so that when headphones are plugged into the electronic device 100, the hardware gate circuit can open the switch between V1 and V2 based on the first configuration information. In the embodiment shown in Figure 6, because the hardware gate circuit detects a high-level headphone interrupt signal, it controls V2 to power down based on the second configuration information, so that the V2 power-down is almost synchronized with the headphone interrupt signal going high, causing the headphones to power down as soon as it goes high. At this time, even if the headphone pins SLEEVE, RING1, or TIP are short-circuited to the GND of the analog headphone jack, no pop tone will be generated. This can reduce or avoid the pop tone caused by dialing out.

[0113] If step 603 is not executed, and steps 604 to 607 are executed directly after step 602, the AP module, upon detecting a high-level headphone interrupt signal, controls the software switch to close, thereby disabling the gate circuit of the V1 input. The hardware gate circuit then controls V2 to power down. This process takes more than 2ms. For example, see FIG7 , which illustrates an example of a headphone being unplugged from electronic device 100. In FIG7 , the voltage of the headphone interrupt signal is low before being unplugged and then becomes high after being unplugged. However, the voltage of V2 is high after being unplugged and remains high for a period of time ( FIG7 , for example, this period is 2ms), after which it becomes low. During this 2ms period, if the headphone pins SLEEVE, RING1, or TIP are shorted to GND in the analog headphone jack when the headphone is unplugged, a popping sound will be generated because the headphone has not yet been fully powered down.

[0114] For example, see the waveform diagram of a headset being unplugged from electronic device 100 shown in Figure 8. In Figure 8, the voltage of the headset interrupt signal is low before the headset is unplugged and then changes to high some time after. The voltage of V2 is also high before the headset is unplugged and then changes to low some time after. In other words, the logic of the voltage change of the headset interrupt signal is opposite to that of the voltage change of V2. It can be understood that the voltage change logic of V2 and the headset interrupt signal is the same, but the signal amplitudes are opposite. The same voltage change logic means that the voltage level of V2 changes within the first period after the headset is unplugged, i.e., the voltage of V2 changes to low within the first period after the headset interrupt signal becomes high. The opposite signal amplitudes mean that the signal levels are opposite, i.e., the voltage of the headset interrupt signal changes from low to high, while the voltage of V2 changes from high to low. The period indicated by the dashed line in Figure 8 can be understood as the voltage change time of V2, which ranges from 330 microseconds. Figure 8 uses 330 microseconds as an example. This value range is smaller than the debounce time range, effectively reducing the pop sound caused by unplugging the earphone, or even preventing it altogether. In Figure 8, there's a slight delay between the voltage change of the headphone interrupt signal and the voltage change of V2. This slight delay can be the first time period, which is less than 40 microseconds. This slight delay may be the processing delay of the comparator circuit in the hardware gate circuit.

[0115] By comparing Figures 7 and 8, it can be seen that after the voltage signal of the headphone interrupt signal changes from a low level to a high level, the high level of V2 in Figure 8 lasts for 2ms before changing to a low level, which is much longer than the voltage change time of V2 in Figure 7 of 330 microseconds. Therefore, the embodiment of the present application can effectively reduce or avoid the POP sound generated by dialing out.

[0116] In the embodiments of this application:

[0117] 1. V1 in the above embodiment can also be described as the first power source, and V2 in the above embodiment can also be described as the second power source. The second power source powering the earphones can be understood as V2 powering the earphones through the earphone module. Turning off the second power source can be understood as turning off the switch output to V2, and turning on the second power source can be understood as turning on the switch between V1 and V2, so that V1 supplies power to V2.

[0118] 2. The voltage of the headphone interrupt signal in the above embodiment can also be described as a headphone interrupt voltage signal. The first headphone interrupt voltage signal refers to the headphone interrupt signal that becomes high when the headphone is unplugged from the electronic device. The second headphone interrupt voltage signal refers to the headphone interrupt signal that becomes low when the headphone is plugged into the electronic device.

[0119] 3. The voltage signal of the second power supply and the voltage signal of the headphone interrupt change in opposite directions. See the voltage change of V2 and the voltage change of the headphone interrupt signal in the waveform diagram shown in FIG8 .

[0120] 4. The switch state of step 409 in the embodiment shown in FIG4 can also be described as the first switch state, and the switch state of step 608 in the embodiment shown in FIG6 can also be described as the second switch state.

[0121] FIG9 exemplarily shows a schematic diagram of the hardware structure of the electronic device 100 .

[0122] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio processing module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0123] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0124] The processor 110 may include one or more processing units, for example: the processor 110 may include an AP, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. In an embodiment of the present application, the AP can implement the functions of the AP module. In an embodiment of the present application, the processor 110 also includes an audio module for implementing the functions of the audio module in the above embodiment.

[0125] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0126] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0127] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0128] The USB interface 130 is an interface that complies with USB standard specifications, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices. In an embodiment of the present application, the USB Type-C interface is used to connect analog headphones via a Type-C adapter.

[0129] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0130] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0131] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0132] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0133] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0134] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0135] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0136] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0137] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0138] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0139] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0140] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation of DDR SDRAM is generally referred to as DDR5 SDRAM), etc. Non-volatile memory can include disk storage devices and flash memory.

[0141] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0142] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0143] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.

[0144] The electronic device 100 can implement audio functions such as music playback and recording through the audio processing module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0145] The audio processing module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio processing module 170 can also be used to encode and decode audio signals. In some embodiments, the audio processing module 170 can be provided in the processor 110, or some functional modules of the audio processing module 170 can be provided in the processor 110.

[0146] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0147] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0148] Microphone 170C, also known as a "microphone" or "speaker," is used to convert sound signals into electrical signals. When making a call or sending a voice message, a user can speak by approaching microphone 170C with their mouth to input the sound signal into microphone 170C.

[0149] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0150] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be set on the display screen 194. The gyroscope sensor 180B can be used to determine the movement posture of the electronic device 100. The air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The distance sensor 180F is used to measure the distance. The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor 180L is used to sense the brightness of the ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect the temperature. The touch sensor 180K is also called a "touch device". Touch sensor 180K can be mounted on display screen 194. Together, touch sensor 180K and display screen 194 form a touch screen, also known as a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. Bone conduction sensor 180M can capture vibration signals.

[0151] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0152] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or touch vibration feedback. Indicator 192 can be an indicator light that can be used to indicate charging status, power level changes, messages, missed calls, notifications, etc.

[0153] SIM card interface 195 is used to connect a SIM card. A SIM card can be connected to and disconnected from electronic device 100 by inserting or removing it from SIM card interface 195. Electronic device 100 may support one or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 may support Nano SIM cards, Micro SIM cards, and SIM cards.

[0154] The term "user interface (UI)" in the specification, claims and drawings of this application refers to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface of an application is a source code written in a specific computer language such as Java and Extensible Markup Language (XML). The interface source code is parsed and rendered on the terminal device, and finally presented as content that the user can recognize, such as pictures, text, buttons and other controls. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, pictures and text. The properties and contents of controls in the interface are defined by tags or nodes, such as XML through <textview> 、 <imgview> 、 <videoview>Nodes such as <head> and <body> are used to specify the controls contained in the interface. A node corresponds to a control or attribute in the interface, and the node is presented as user-visible content after parsing and rendering. In addition, many applications, such as hybrid applications, usually also contain web pages in their interfaces. A web page, also known as a page, can be understood as a special control embedded in the application interface. A web page is a source code written in a specific computer language, such as hypertext markup language (GTML), cascading style sheets (CSS), JavaScript (JS), etc. The web page source code can be loaded and displayed as user-recognizable content by a browser or a web page display component with similar functions to a browser. The specific content contained in a web page is also defined by tags or nodes in the web page source code, such as GTML through 、 、 <video> 、 <canvas>To define the elements and attributes of a web page.

[0155] A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operations that uses graphics. It can be an icon, window, control, or other interface element displayed on the display of an electronic device. Controls can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and other visual interface elements.

[0156] As used in the specification and appended claims of the present application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items. As used in the above embodiments, the term "when..." can be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, the phrase "when determining..." or "if (stated condition or event) is detected" can be interpreted to mean "if determining..." or "in response to determining..." or "when (stated condition or event) is detected" or "in response to detecting (stated condition or event)", depending on the context.

[0157] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0158] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.< / canvas> < / video> < / videoview> < / imgview> < / textview>

Claims

1. A method for powering off a headset, characterized in that: The method is applied to an electronic device, and the method comprises: In response to the earphone being unplugged from the electronic device, turning off the second power supply in the electronic device so that the voltage signal of the second power supply changes in the opposite direction to the voltage signal of the earphone disconnection; Updating the configuration information of the register in the electronic device from the second configuration information to the first configuration information; In response to earphones being inserted into the electronic device, turning on the second power supply; Updating the configuration information of the register from the first configuration information to the second configuration information; Wherein, the second power supply is used to power the earphone.

2. The method according to claim 1, characterized in that The step of shutting down the second power supply in the electronic device comprises: Based on the configuration information of the register being the second configuration information, the second power supply is turned off.

3. The method according to claim 1, characterized in that: The step of turning on the second power supply includes: Based on the configuration information of the register being the first configuration information, the second power supply is turned on.

4. The method according to any one of claims 1 to 3, characterized in that: The voltage signal of the second power source and the voltage signal of the headphone interruption change inversely, that is, the voltage signal of the second power source and the voltage signal of the headphone interruption have the same change logic, and the signal amplitudes are opposite.

5. The method according to claim 4, characterized in that The voltage signal of the second power supply has the same change logic as the voltage signal of the headphone interruption, and the signal amplitudes are opposite, including that within the first time period after the voltage signal of the headphone interruption changes from a low level to a high level, the voltage signal of the second power supply changes from a high level to a low level.

6. The method according to claim 5, characterized in that The first time period is less than 40 microseconds.

7. The method according to any one of claims 1 to 6, characterized in that: Before updating the configuration information of the register in the electronic device from the second configuration information to the first configuration information, the method further includes: Turn off the software switch in the electronic device, where the software switch is a switch between the second power supply and the first power supply, where the first power supply is used to power an audio module, and the audio module includes the first power supply, the second power supply, the register, and the software switch.

8. The method according to claim 7, characterized in that The audio module also includes a hardware gate circuit; The first configuration information is used to configure a first configuration relationship of the hardware gate circuit, and the first configuration relationship is used by the hardware gate circuit to control the start of the second power supply; The second configuration information is used to configure a second configuration relationship of the hardware gate circuit, and the second configuration relationship is used by the hardware gate circuit to control the shutdown of the second power supply and control the voltage signal of the second power supply to be connected to the headset. The disconnected voltage signal changes in the opposite direction.

9. The method according to claim 8, characterized in that The electronic device also includes an application processor AP module; The step of turning off the software switch in the electronic device includes: The hardware gate circuit sends a first earphone interrupt voltage signal to the AP module, where the first earphone interrupt voltage signal is a high level; The AP module generates a second switch control signal in response to the level of the first earphone interruption voltage signal being opposite to the level of the received earphone interruption voltage signal, and sends the second switch control signal to the software switch; The software switch controls the software switch to be in an off state in response to the second switch control signal, and sends a second switch state to the AP module, where the second switch state is used to indicate that the software switch is in an off state.

10. The method according to claim 9, characterized in that The updating of the configuration information of the register in the electronic device from the second configuration information to the first configuration information comprises: In response to the second switch state, the AP module sends a second configuration control signal to the register, where the second configuration control signal includes a control signal corresponding to the second configuration information; In response to the second configuration control signal, the register updates configuration information from the second configuration information to the first configuration information, and sends the first configuration information to the hardware gate circuit.

11. The method according to claim 9, characterized in that Before updating the configuration information of the register from the first configuration information to the second configuration information, the method further includes: The hardware gate circuit sends a second earphone interrupt voltage signal to the AP module, where the second earphone interrupt voltage signal is a low level; The AP module generates a first switch control signal in response to the level of the second earphone interruption voltage signal being opposite to the level of the received earphone interruption voltage signal, and sends the first switch control signal to the software switch; The software switch controls the software switch to be in an on state in response to the first switch control signal, and sends a first switch state to the AP module, where the first switch state is used to indicate that the software switch is in an on state.

12. The method according to claim 11, characterized in that The updating the configuration information of the register in the electronic device from the first configuration information to the second configuration information comprises: In response to the first switch state, the AP module sends a first configuration control signal to the register, where the first configuration control signal includes a control signal corresponding to the first configuration information; In response to the first configuration control signal, the register updates configuration information from the first configuration information to the second configuration information, and sends the second configuration information to the hardware gate circuit.

13. An electronic device, characterized in that: The method comprises one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, wherein the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the method according to any one of claims 1 to 12 is executed.

14. A chip system, characterized in that: The chip system includes an application processor, an audio module and an earphone module, and the chip system executes the method according to any one of claims 1-12.

15. A computer program product comprising instructions, characterized in that When the computer program product runs on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 12.

16. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the method according to any one of claims 1 to 12 is executed.

Citation Information

Patent Citations

  • A terminal and a system which can reduce noise generated in earphone insertion and pulling processes

    CN104380697A

  • Earphone insertion-extraction plosive suppression circuit

    CN106162445A

  • Method for eliminating pull-out power-down POP sound

    CN106231491A

  • Circuit and method for eliminating plug and play noise of headphone

    CN106535038A

  • Earphone type identification device, earphone type identification method, equipment and storage medium

    CN114979925A