Earphone power-off method and electronic equipment
By turning off the second power supply and changing the voltage signal in reverse in response to the headset being unplugged in the electronic device, the problem of POP sound when unplugged is solved, and the headset is quickly powered off and user experience is improved.
Patent Information
- Application Number
- CN202311044054.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-17
- Publication Date
- 2025-02-21
AI Technical Summary
When removing the analog headset, existing electronic devices often produce sounds similar to "pop" or current sounds (POP sounds), affecting the user experience.
By implementing a headphone power-down method in an electronic device, the second power supply is turned off in response to the headphone being unplugged and the voltage signal of the headphone is reversed to the voltage signal interrupted by the headphone, so as to reduce or eliminate the change time of the voltage signal. POP sound.
This method can quickly power off the headphones, reduce or eliminate the POP sound when unplugged, and improve the user's experience of electronic devices.
Smart Images

Figure CN119497009A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of electronic devices, and more particularly to a method for powering off an earphone and an electronic device. Background Art
[0002] With the gradual popularization of the universal serial bus Type-C (USB Type-C) interface (referred to as Type-C interface), more and more electronic devices have cancelled the analog headphone (such as 3.5mm headphone) interface, but the analog headphone has not withdrawn from the market. For example, electronic devices can be connected to the analog headphone through the Type-C interface to transmit audio signals to the analog headphone.
[0003] For electronic devices that support analog headphones or electronic devices that support analog headphones through the Type-C interface, when the analog headphones are unplugged from the electronic device, a sound similar to "puff" or electric current sound (this type of sound is called POP sound) is usually produced. The POP sound will greatly affect the user's experience of the electronic device. Therefore, how to reduce or eliminate the POP sound generated by unplugging is a technical problem that needs to be solved urgently. Summary of the invention
[0004] 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.
[0005] In the first aspect, the embodiment of the present application provides a method for powering off a headset, which is applied to an electronic device, and the method includes: in response to the headset 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 headset interruption, so as to reduce the change time of the voltage signal, thereby reducing or eliminating the POP sound generated by unplugging; and updating the configuration information of the register in the electronic device from the second configuration information to the first configuration information, and then in response to the headset being inserted 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 headset can be quickly powered off when it is unplugged from the electronic device. Among them, the second power supply is used to power the headset, and turning off the second power supply causes the headset to be powered off.
[0006] In combination with the method provided in the first aspect, in some embodiments, turning off the second power supply in the electronic device may be based on the configuration information of the register being the second configuration information, turning off the second power supply. In other words, based on the second configuration information of the register, turning off the second power supply so that the headset is powered off.
[0007] In combination 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 so that the headset is powered on.
[0008] In combination with the method provided in the first aspect, in some embodiments, the voltage signal of the second power source and the voltage signal of the headphone interruption change in the opposite direction, including that the voltage signal of the second power source changes from a high level to a low level in a first time period after the voltage signal of the headphone interruption changes from a low level to a high level. It can be understood that the reverse change includes the same change logic and opposite signal amplitude, the same change logic means that the voltage signal of the second power source changes level in the first time period after the voltage signal of the headphone interruption changes, and the opposite signal amplitude means that the level change is opposite.
[0009] The first time period is less than 40 microseconds.
[0010] In combination 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, it also includes: turning off the software switch in the electronic device, the software switch is a switch between the second power supply and the first power supply, the first power supply is used to power the 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.
[0011] In combination with the method provided in the first aspect, in some embodiments, the audio module further includes a hardware gate circuit;
[0012] The first configuration information is used to configure the first configuration relationship of the hardware gate circuit, and the first configuration relationship is used for the hardware gate circuit to control the opening of the second power supply; the second configuration information is used to configure the second configuration relationship of the hardware gate circuit, and the second configuration relationship is used for the hardware gate circuit to control the closing of the second power supply, and 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 according to the configuration information of the register, thereby realizing the opening of the second power supply, or the closing of the second power supply, and the voltage signal of the second power supply changes in the opposite direction to the voltage signal of the headphone interruption.
[0013] In combination 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 may be a hardware gate circuit sending a first earphone interrupt voltage signal to the AP module, the first earphone interrupt voltage signal being a high level; the AP module generates a second switch control signal in response to the level of the first earphone interrupt voltage signal being opposite to the level of the received earphone interrupt voltage signal, and sends the second switch control signal to the software switch; the software switch controls the software switch to be in a closed state in response to the second switch control signal, and sends a second switch state to the AP module, the second switch state indicating that the software switch is in a closed state. It can be understood that the AP module controls the closing of the software switch through the second switch control signal.
[0014] 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, 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.
[0015] In combination 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, it also includes: the hardware gate circuit sends a second earphone interrupt voltage signal to the AP module, and 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 interrupt voltage signal being opposite to the level of the received earphone interrupt 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 the first switch state to the AP module, and the first switch state indicates that the software switch is in an on state. It can be understood that the AP module controls the on-state of the software switch through the first 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 first configuration information to second configuration information may be that in response to a first switch state, the AP module sends a first configuration control signal to the register, the first configuration control signal including 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.
[0017] 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.
[0018] 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.
[0019] In a fourth aspect, an embodiment of the present application provides a computer program product 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.
[0020] In a fifth aspect, an embodiment of the present application provides a chip system, the chip system 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.
[0021] It can be understood 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 execute the method provided in the first aspect of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0023] Figure 2 It is a schematic diagram of the pins of the circular plug of the analog headphone;
[0024] Figure 3 is a schematic diagram of a circuit structure using an embodiment of the present application;
[0025] Figure 4 is a timing diagram of a process of inserting earphones into the electronic device 100 provided by an embodiment of the present application;
[0026] Figure 5 is a waveform diagram of the electronic device 100 provided by the embodiment of the present application being inserted into headphones;
[0027] Figure 6is a timing diagram of a process of removing a headset from an electronic device 100 according to an embodiment of the present application;
[0028] Figure 7 is a waveform diagram of an earphone being dialed out of the electronic device 100;
[0029] Figure 8 is a waveform diagram of the earphone provided in the embodiment of the present application being unplugged from the electronic device 100;
[0030] Fig. 9 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] The terms "first", "second", "third", etc. in the embodiments of the present application are distinguished from different objects, rather than being used to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a series of steps or units are included, or alternatively, steps or units not listed are also included, or other steps or units inherent to these processes, methods, products or devices are also included.
[0033] 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 delays such as software startup in the power-on logic of 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 higher.
[0034] In view of this, the embodiments of the present application provide a method for powering off headphones and an electronic device, which can reduce or eliminate the POP sound generated by plugging and unplugging analog headphones without changing the circuit structure of the electronic device, thereby helping to improve the user experience of the electronic device. In other words, the POP sound can be reduced or eliminated without adding or reducing circuits.
[0035] 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.
[0036] For example, see Figure 1 , 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 a headset 300.
[0037] The electronic device 100 may be a mobile phone or a tablet computer; the electronic device 100 may 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, a vehicle-mounted device, a smart home device, and / or a smart city device; the electronic device 100 may 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. Figure 1 The application scenario shown takes the electronic device 100 as a mobile phone as an example.
[0038] The Type-C adapter 200 includes a Type-C plug and an analog headphone jack, and the Type-C plug and the analog headphone jack are connected via a data cable. The Type-C plug fits with the Type-C interface and is used to be inserted into the Type-C interface of the electronic device 100; the analog headphone jack fits with the round plug of the analog headphone and is used to be inserted into the round plug of the analog headphone. After the Type-C plug is inserted into the Type-C interface 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 then the electronic device 100 can transmit audio signals to the analog headphone.
[0039] The earphone 300 refers to an analog earphone, which can be understood as an earphone without a Type-C plug, or can be understood as a common cylindrical plug 3.5mm earphone. The analog earphone can be connected to the electronic device 100 via the Type-C adapter 200. The earphone involved in the embodiment of the present application refers to an analog earphone.
[0040] Figure 1The scenario shown in (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 headset 300 is about to be inserted into the analog headset jack. This scenario can be understood as a scenario in which the headset 300 is about to be inserted into the electronic device 100. In the embodiment of the present application, the headset 300 is inserted into the electronic device 100 by directly inserting the headset 300 into the 3.5mm headset jack of the electronic device 100 through its round plug, or the headset 300 is inserted into the Type-C interface of the electronic device 100 through the Type-C adapter 200.
[0041] Figure 1 The scenario shown in (2) 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 earphone 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 directly from the 3.5mm earphone jack of the electronic device 100, or the earphone 300 can be unplugged from the analog earphone jack of the Type-C adapter 200, instead of the Type-C plug being unplugged from the electronic device 100.
[0042] 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 Type-C adapters, and scenarios where headphones are plugged into or unplugged from electronic devices via other types of adapters.
[0043] See also Figure 2 , is a schematic diagram of the pins of the circular plug of the analog headphone. The circular plug of the analog headphone includes four pins, which are pin SLEEVE, pin RING2, pin RING1 and pin TIP. Figure 2 As shown in (1), the SLEEVE pin is used for grounding, the RING2 pin is used for realizing the microphone function, the RING1 pin is used for realizing the right channel function, and the TIP pin is used for realizing the left channel function. Figure 2 As shown in (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. Figure 2 The bold lines in the figure represent the front view of the insulating ring.
[0044] The following is an introduction to the circuit structure diagram of the embodiment of the present application.
[0045] See also Figure 3 , is a schematic diagram of a circuit structure of an embodiment of the present application. The circuit structure is a partial circuit structure of an electronic device 100. Figure 3The circuit structure shown includes an audio module 301, an application processor (AP) module 302, an earphone module 303, an earphone interrupt signal module 304 and a total power supply V0305 of the audio module.
[0046] The AP module 302 can realize the functions of the 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 (System on Chip, SOC).
[0047] The earphone module 303 is an earphone circuit module on the electronic device 100, outside the audio module 301, and is used to implement the function of the earphone circuit. The earphone circuit is used to power on or off the earphone. When there is power supply, the earphone circuit can power on the earphone; when there is no power supply, the earphone circuit can power off the earphone.
[0048] 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.
[0049] The audio module 301 may be an audio module inside an integrated circuit (IC) chip, which may 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 may be a SOC, a power management unit (PMU), a power management integrated circuit (PMIC), etc. For the AP module 302 and the audio module 301 being integrated on the same SOC, the AP module 302 and the audio module 301 are independent of each other on the SOC, but may communicate with each other. The AP module 302 and the audio module 301 may also be integrated on different SOCs.
[0050] The total power supply V0 305 of the audio module is used to power the audio module 301. For the convenience of description, the total power supply V0 of the audio module is referred to as V0 below. V0 is used to identify the external power supply that supplies power to the entire audio module 301, and the external refers to the outside of the audio module or the IC chip where the audio module is located. V0 can be a PMU.
[0051] like Figure 3As shown, the audio module 301 includes a power supply V1 3011 inside the audio module, a software switch 3012, a hardware gate circuit 3013, a power supply V2 3014 for supplying power to the earphone module, a register 3015, and a resistor 3016. For the convenience of description, the power supply V1 inside the audio module is referred to as V1, and the power supply V2 for supplying power to the earphone module is referred to as V2.
[0052] V1 is used to identify the power supply after V0 enters the audio module, and V1 is used to supply power to the circuit or module inside the audio module. V2 is used to identify the power supply that supplies power to the earphone 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. When the software switch 3012 is turned on, a power path between V1 and the hardware gate circuit 3013 can be established, and then the hardware gate circuit 3013 can open the switch between V1 and V2 (including opening the switch for V1 input and opening the switch for output to V2), and then V2 can supply power to the earphone module 303. When the software switch 3012 is turned off, the power path between V1 and the hardware gate circuit 3013 is disconnected, and then the hardware gate circuit 3013 closes the switch between V1 and V2 (including closing the switch for V1 input and / or closing the switch for output to V2), and then V2 stops supplying power to the earphone module 303.
[0053] The hardware gate circuit 3013 is used to control the opening or closing of each switch according to the configuration information provided by the register 3015, for example, to control the opening or closing of the switch between V1 and V2, and is also used to feed back a high-level or low-level headphone interrupt signal to the AP module 302. The hardware gate circuit 3013 may include at least one of an AND gate circuit, an OR gate circuit, a NOT gate circuit, and the like. 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-level or low-level headphone interrupt signal, and send the headphone interrupt signal to the AP module. It should be noted that the AP module is not powered by V1, but by other chips on the electronic device 100.
[0054] The register 3015 is used to provide configuration information to the hardware gate circuit 3013, so that the hardware gate circuit 3013 controls the opening or closing of each switch according to the configuration information. The configuration information provided by the register 3015 may include the configuration relationship between the various gate circuits of the hardware gate circuit 3013, so that the hardware gate circuit 3013 can control the opening or closing of each switch according to the configuration information. In the embodiment of the present application, the register 3015 can also receive an AP control signal from the AP module and modify the configuration information of the gate circuit based on the AP control signal.
[0055] The resistor 3016 is a pull-up resistor, one end of which is connected to V1 and the other end is connected to the headset interrupt signal module 304, so that V1 can provide a high level of power to the headset interrupt signal module 304. In this way, before the electronic device 100 is plugged into the headset, the headset interrupt signal module 304 generates and sends a high level headset interrupt signal. When or after the electronic device 100 is plugged into the headset, the power path between the headset interrupt signal module 304 and V1 is disconnected, and the headset interrupt signal module 304 is grounded, thereby generating and sending a low level headset interrupt signal. The headset interrupt signal can also be described as HP_EINT.
[0056] The following is based on Figure 3 The circuit structure shown introduces the processing process of inserting earphones into the electronic device 100 and the processing process of removing earphones from the electronic device 100.
[0057] See also Figure 4 , is a timing diagram of the processing process of the electronic device 100 being inserted into the earphone provided in the embodiment of the present application. Figure 4 The steps may include but are not limited to:
[0058] 401, the earphone interrupt signal module changes the earphone interrupt signal from a high level to a low level.
[0059] Before the earphone is inserted into the electronic device 100, the earphone interrupt signal module provides a high-level earphone interrupt signal and continues to provide a high-level earphone interrupt signal. When the earphone is inserted into the electronic device 100, the spring in the analog earphone jack of the electronic device 100 is short-circuited with the ground (Ground, GND), so that the earphone interrupt signal module changes the earphone interrupt signal from a high level to a low level. It can be understood that the physical behavior of inserting the earphone into the electronic device 100 causes the earphone interrupt signal to instantly change to a low level.
[0060] 402, the earphone interrupt signal module sends a low-level earphone interrupt signal to the hardware gate circuit.
[0061] The earphone interrupt signal module sends the low-level earphone interrupt signal to the hardware gate circuit, so that the hardware gate circuit sends the low-level earphone interrupt signal to the AP module. 403, the hardware gate circuit sends the low-level earphone interrupt signal to the AP module.
[0062] 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.
[0063] 404. The AP module generates a first switch control signal.
[0064] In response to the received 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 essence of the first switch control signal is the AP control signal. The AP module can recognize that the electronic device 100 is plugged into a headphone by changing from receiving a high-level headphone interrupt signal to receiving a low-level headphone interrupt signal.
[0065] 405 , the AP module sends the first switch control signal to the software switch.
[0066] The AP module sends the first switch control signal to the software switch in the audio module.
[0067] In response to the timer of the de-bouncing 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 de-bouncing 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 de-bouncing 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 de-bouncing 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 de-bouncing time of the AP module in different electronic devices may be different, but most of the de-bouncing times are within 250ms to 260ms.
[0068] 406, software switch is turned on.
[0069] In response to receiving the first switch control signal, the software switch is turned on 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 turned on, the software switch is equivalent to a power conductor between V1 and the hardware gate circuit.
[0070] 407 , the hardware gate circuit opens the switch between V1 and V2 based on the first configuration information.
[0071] 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 each gate circuit of the hardware gate circuit, and 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 enables the hardware gate circuit to open the switch between V1 and V2.
[0072] 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.
[0073] Turning on the switch between V1 and V2 can be turning on the switch for V1 input and the switch for V2 output. Turning on the switch for V1 input can be understood as allowing V1 to input power to V2 through the hardware gate circuit; turning on the switch for V2 output can be understood as allowing power to be input to V2, so that V1 can input power to V2. Since the path between V1 and V2 is opened, V1 can supply power to V2, and then V2 can supply power to the earphone module, so that the earphone can be powered on.
[0074] 408. The software switch sends a switch status to the AP module, where the switch status indicates that the software switch is turned on.
[0075] 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.
[0076] After step 406, step 407 and step 408 may be performed. Step 407 and step 408 may be performed simultaneously.
[0077] 409. The AP module sends a first configuration control signal to the register.
[0078] In response to the received switch state 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 the configuration information, for example, to update the first configuration information to the second configuration information. The essence of the first configuration control signal is also an AP control signal, but its function is different 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.
[0079] The second configuration information includes a second configuration relationship between each gate circuit of the hardware gate circuit, and 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 make the voltage signal of V2 change in the opposite direction to the voltage signal of the headphone interrupt signal. The reverse change includes the same change logic and opposite signal amplitude, that is, the voltage signal of V2 changes from a high level to a low level in the 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.
[0080] 410. The register updates the first configuration information to the second configuration information.
[0081] 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.
[0082] 411. The register sends the second configuration information to the hardware gate circuit.
[0083] In response to writing the second configuration information into the register, the register sends the second configuration information to the hardware gate circuit, so that when the earphone is 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.
[0084] Figure 4 In the illustrated embodiment, when the power path between V1 and the hardware gate circuit has been 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 dialing out can be reduced or avoided.
[0085] For example, see Figure 5 The electronic device 100 is shown as a waveform diagram when headphones are plugged into it. Figure 5 In the figure, the voltage of the headphone interrupt signal is always high before the headphone is inserted, and immediately changes to low when the headphone is inserted; the voltage of V2 is always low before the headphone is inserted, and changes to high after a period of time (i.e., the time difference shown by the dotted line) after the headphone is inserted; the voltage of MIC_P is always low before the headphone is inserted, and changes to high after a period of time (i.e., the time difference shown by the dotted line) after the headphone is inserted. In other words, the change of the voltage of MIC_P is consistent with the change of the voltage of V2. Among them, MIC_P refers to the voltage in the analog headphone jack that is connected to the Figure 2 The time difference shown by the dotted line can be understood as the debounce time, and its value range is 250ms~260ms. Figure 5 Take 260ms as an example. The debounce time can also be understood as the delay time between V2 and the actual insertion time.
[0086] See also Figure 6 , is a timing diagram of the processing process of the earphone being unplugged from the electronic device 100 provided in an embodiment of the present application. Figure 6 The steps may include but are not limited to:
[0087] 601, the earphone interrupt signal module changes the earphone interrupt signal from a low level to a high level.
[0088] Before the earphone is unplugged from the electronic device 100, the earphone interrupt signal module provides a low-level earphone interrupt signal and continues to provide a low-level earphone interrupt signal. When the earphone is unplugged from the electronic device 100, the spring in the analog earphone jack of the electronic device 100 is separated from the GND, so that the earphone interrupt signal module changes the earphone interrupt signal from a low level to a high level. It can be understood that the physical act of unplugging the earphone from the electronic device 100 causes the earphone interrupt signal to instantly change to a high level.
[0089] 602, the earphone interrupt signal module sends a high-level earphone interrupt signal to the hardware gate circuit.
[0090] 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.
[0091] Updated to 603, the hardware gate circuit controls V2 to power off based on the second configuration information.
[0092] In response to the received high-level headphone interrupt signal, based on the second configuration information, V2 is controlled to be powered off, and the voltage signal of V2 changes in the opposite direction to the voltage signal of the headphone interrupt signal. Controlling V2 to power off may include: closing a switch output to V2 so that V2 can be powered off quickly.
[0093] 604, the hardware gate circuit sends a high-level earphone interrupt signal to the AP module.
[0094] In response to the received high-level earphone interrupt signal, the hardware gate circuit sends the high-level earphone interrupt signal to the AP module. In the embodiment of the present application, step 603 may be performed before step 604, or step 603 and step 604 may be performed simultaneously.
[0095] 605, the AP module generates a second switch control signal.
[0096] In response to the received high-level headphone interrupt signal, the AP module generates a second switch control signal. The second switch control signal is used to control the software switch to close. The essence of the second switch control signal is also an AP control signal. The AP module can recognize that the headphone is unplugged from the electronic device 100 by changing from receiving a low-level headphone interrupt signal to receiving a high-level headphone interrupt signal.
[0097] 606 , the AP module sends the second switch control signal to the software switch.
[0098] The AP module sends the second switch control signal to the software switch in the audio module.
[0099] 607, software switch is closed.
[0100] 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.
[0101] 608, the software switch sends a switch status to the AP module, where the switch status indicates that the software switch is closed.
[0102] 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.
[0103] 609. The AP module sends a second configuration control signal to the register.
[0104] In response to the received switch state 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 the configuration information, for example, to update the second configuration information to the first configuration information. The essence of the second configuration control signal is also an AP control signal, but its function is different 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.
[0105] For the first configuration information, see Figure 4 The specific description of step 407 in the illustrated embodiment will not be repeated here.
[0106] 610. The register updates the second configuration information to the first configuration information.
[0107] 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.
[0108] 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). In this way, the impact on the power-on of the headset can be reduced or avoided. If the second configuration information is not updated to the first configuration information, when the electronic device 100 is plugged into a headset, the headset may be burned out due to the rapid power-on of the headset.
[0109] 611. The register sends the first configuration information to the hardware gate circuit.
[0110] 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 the electronic device 100 is plugged into the earphone, the hardware gate circuit can turn on the switch between V1 and V2 based on the first configuration information. Figure 6In the embodiment shown, since 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 V2 is powered down almost synchronously with the headphone interrupt signal being pulled high, so that the headphone is powered down at the first time it is pulled high. At this time, even if the headphone pin SLEEVE, the pin RING1 or the pin TIP is short-circuited with the GND in the analog headphone jack, no POP sound is generated. Thus, the POP sound generated by dialing out can be reduced or avoided.
[0111] If step 603 is not executed, but steps 604 to 607 are directly executed after step 602, that is, when the AP module detects a high-level headphone interrupt signal, it controls the software switch to close to close the gate circuit of V1 input, and then the hardware gate circuit controls V2 to power off. This process takes more than 2ms. For example, see Figure 7 An exemplary diagram showing an earphone being unplugged from the electronic device 100 is shown. Figure 7 In the example, the voltage of the headphone interrupt signal is always low before the headphone is unplugged, and becomes high after the headphone is unplugged. However, the voltage of V2 is high after the headphone is unplugged, and the high level is maintained for a period of time ( Figure 7 Take this period of time as 2ms as an example), and it will become a low level after this period of time. Within this 2ms, when the earphone is unplugged, if the earphone's pin SLEEVE, pin RING1 or pin TIP is short-circuited with the GND in the analog headphone jack, since the earphone has not been completely powered off, a POP sound will be generated.
[0112] For example, see Figure 8 The waveform diagram shown is when the earphone is dialed out from the electronic device 100. Figure 8 , the voltage of the headphone interrupt signal is always at a low level before being unplugged, and becomes a high level after a period of time after being unplugged; the voltage of V2 is always at a high level before being unplugged, and becomes a low level after a period of time after being unplugged. In other words, the change logic of the voltage of the headphone interrupt signal is opposite to the change logic of the voltage of V2. It can be understood that the voltage change logic of V2 is the same as that of the headphone interrupt signal, and the signal amplitudes are opposite. The same voltage change logic refers to changing the level of V2 within the first time period after unplugging, that is, the voltage of V2 becomes a low level within the first time period after the voltage of the headphone interrupt signal becomes a high level; the opposite signal amplitude refers to the opposite signal level, that is, the voltage signal of the headphone interrupt signal changes from a low level to a high level, and the voltage signal of V2 changes from a high level to a low level. Figure 8 The period of time indicated by the dotted line can be understood as the voltage change time of V2, and its value range is within 330 microseconds. Figure 8 Take 330 microseconds as an example. This value range is smaller than the value range of the debounce time, so it can effectively reduce the POP sound caused by unplugging, and even avoid any POP sound. Figure 8There is a slight delay between the voltage change of the headphone interrupt signal and the voltage change of V2, and the slight delay may be a first time period, and the first time period is less than 40 microseconds. The slight delay may be a delay in the processing of the comparator circuit in the hardware gate circuit.
[0113] contrast Figure 7 and Figure 8 It can be seen that after the voltage signal of the headphone interrupt signal changes from low level to high level, Figure 8 The high level of V2 lasts for 2ms before it turns to low level, which is much longer than Figure 7 The voltage change time of V2 is 330 microseconds, so the POP sound generated by dialing out can be effectively reduced or avoided by using the embodiment of the present application.
[0114] In the embodiments of the present application:
[0115] 1. V1 in the above embodiment can also be described as a first power source, and V2 in the above embodiment can also be described as a second power source. The second power source powering the earphone can be understood as V2 powering the earphone 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.
[0116] 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 a headphone interrupt signal that becomes a high level when the headphone is unplugged from the electronic device. The second headphone interrupt voltage signal refers to a headphone interrupt signal that becomes a low level when the headphone is plugged into the electronic device.
[0117] 3. The voltage signal of the second power supply changes in the opposite direction to the voltage signal of the earphone interruption. Figure 8 The waveforms shown are the voltage changes of V2 and the voltage changes of the headphone interrupt signal.
[0118] 4. Figure 4 The switch state of step 409 in the illustrated embodiment can also be described as a first switch state, Figure 6 The switching state of step 608 in the illustrated embodiment may also be described as a second switching state.
[0119] Fig. 9 The schematic diagram of the hardware structure of the electronic device 100 is exemplarily shown.
[0120] 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 screen 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.
[0121] It is to be understood that the structure illustrated in the embodiment 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 in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0122] 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-mentioned embodiment.
[0123] 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.
[0124] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0125] In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.
[0126] The USB interface 130 is an interface that complies with the USB standard specification, 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 a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc. In an embodiment of the present application, the USB Type C interface is used to connect an analog headset via a Type-C adapter.
[0127] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic 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 in the above embodiments, or a combination of multiple interface connection methods.
[0128] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0129] 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 supplies power to the processor 110, the internal memory 121, the display screen 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 number, battery health status (leakage, impedance), etc. 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.
[0130] 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.
[0131] 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 the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0132] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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.
[0133] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a 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.
[0134] 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 integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0135] 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 the network and other devices through wireless communication technology. The wireless communication technology 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).
[0136] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0137] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0138] Random access memory may 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 DDR SDRAM is generally referred to as DDR5 SDRAM), etc. Non-volatile memory may include disk storage devices and flash memory.
[0139] 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.
[0140] 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 .
[0141] 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 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0142] The electronic device 100 can implement audio functions such as music playing and recording through the audio processing module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor.
[0143] 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 arranged in the processor 110, or some functional modules of the audio processing module 170 can be arranged in the processor 110.
[0144] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0145] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0146] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by approaching the microphone 170C with his mouth to input the sound signal into the microphone 170C.
[0147] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0148] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. 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 motion posture of the electronic device 100. The air pressure sensor 180C is used to measure the 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, also known as a "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation on or near it. The bone conduction sensor 180M can obtain a vibration signal.
[0149] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0150] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. Indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0151] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting the SIM card interface 195 or pulling the SIM card interface 195 out. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
[0152] The term "user interface (UI)" in the specification, claims and drawings of this application refers to the medium 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 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>The controls contained in the interface are specified by nodes such as . A node corresponds to a control or attribute in the interface. After parsing and rendering, the node is presented as user-visible content. 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 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. For example, GTML is defined by 、 、 <video> 、 <canvas>To define the elements and attributes of a web page.
[0153] The most common form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operation that is displayed in a graphical manner. It can be an icon, window, control or other interface element displayed on the display screen of an electronic device, where a control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements.
[0154] 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 also include plural expressions, 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..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrase "when determining..." or "if (stated condition or event) is detected" may 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.
[0155] 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 devices. 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 a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. 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 contains one or more available media integration. 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), etc.
[0156] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.< / 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 interruption; 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 change in the opposite direction to the voltage signal of the headphone interruption.
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.