Enhanced earphone wearing detection method and device

By using the processor in the headset to read and judge the change in the sensor compensation value, the problem that the capacitive proximity sensor cannot accurately detect the earphones after wearing for a long time is solved, and a more accurate and reliable headphone wear status detection is achieved.

CN120238790APending Publication Date: 2025-07-01HARMAN INT IND INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311863574.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The existing capacitive proximity sensors are used for headphone wear detection, and there are temperature and humidity sensitivity problems, which leads to the sensing value not dropping to the threshold immediately when you take off the headphones after wearing for a long time, and the ear-output detection cannot be accurately detected; at the same time, the wearable state cannot be accurately detected when powering on, and the in-ear/ear-out detection is accidentally triggered.

Method used

By periodically reading the compensation values ​​of multiple channels of the sensor using the processor in the headset, setting the delay time and reading the compensation values ​​again, to judge the change in the sensor state. When the sensor compensation value drops beyond the percentage threshold, the sensor exit is detected and the state is reset.

Benefits of technology

It realizes accurate detection of sensor status changes after wearing for a long time and when turning on the headphones before and after wearing them, avoiding false triggers, and improving the reliability and efficiency of earphones' ear detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238790A_ABST
    Figure CN120238790A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method of enhanced headphone wear detection. On one hand, an enhanced earphone out-of-ear detection method is provided, according to the method, sensor compensation values (DIFx) before and after a set delay time T are detected and compared, and therefore the state change of sensor out-of-ear can be accurately and efficiently detected even if a user takes off the earphone after wearing the earphone for a long time. On the other hand, an earphone wearing detection method is provided, and the method can correctly detect the state of a sensor under the condition that the earphone is started up before or after a user wears the earphone by reading and inquiring a sensor interruption source (IRQSRC) or judging a sensing value (USEx) before compensation of the sensor. In addition, the invention also provides a corresponding earphone wearing detection device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to headphone detection. Specifically, the present disclosure relates to a method and apparatus for enhanced headphone wearing detection. Background Art

[0002] Using a capacitive proximity sensor to detect headphone wearing behavior is a commonly used solution for detecting headphone wearing nowadays. When the headphone approaches or moves away from the ear, the capacitance of the sensor pad changes. Therefore, the in-ear state of the sensor when the user puts on the headphone and the out-ear state of the sensor when the user takes off the headphone can be detected based on the capacitance change on the sensor.

[0003] However, there are two key problems in using a capacitive proximity sensor to detect headphone wearing currently: First, since the capacitive proximity sensor is sensitive to temperature and humidity, the sensed value will increase after long-term headphone wearing. Therefore, when the user takes off the headphone after long-term wearing, the sensed value may not immediately drop to the threshold, and thus the headphone out-ear may not be detected. Second, when the user wears the headphone on the head and then turns it on, using only the capacitive proximity sensor may not be able to detect the worn state. Moreover, after the headphone worn on the head is turned on, pressing and releasing the earcup of the headphone and even moving the head will wrongly trigger the in-ear / out-ear detection result.

[0004] Therefore, to solve the above problems, an enhanced method for detecting headphone wearing is needed, so that the change in the sensor state can be correctly detected using only one sensor after long-term headphone wearing and when the headphone is turned on before and after wearing. Summary of the Invention

[0005] According to one aspect of the present disclosure, a method for enhanced earphone out-of-ear detection is provided. The steps of the enhanced earphone out-of-ear detection method include turning on the earphone and wearing it on the head, setting the sensor state to in-ear, and then periodically reading the sensor compensation value from at least one of the multiple channels of the sensor via the processor. When the sensor compensation value read is lower than the previous sensor compensation value by more than a percentage threshold, read the delayed sensor compensation value after the set delay time; when the sensor compensation value read is not lower than the previous sensor compensation value or the sensor compensation value read is lower than the previous sensor compensation value by less than a percentage threshold, read the next sensor compensation of the at least one channel. The steps of the enhanced earphone out-of-ear detection method also include: when the delayed sensor compensation value is lower than the previous sensor compensation value by more than the percentage threshold, the sensor out-of-ear is detected and the earphone wearing is reset to out-of-ear, and when the delayed sensor compensation value is not lower than the previous sensor compensation value or the delayed sensor compensation value is lower than the previous sensor compensation value by less than a percentage threshold, read the next sensor compensation value of the at least one channel.

[0006] Another aspect of the present disclosure provides a non-transitory computer-readable medium storing instructions, which, when executed by a processor, implement the above-mentioned method for enhanced earphone ear detection.

[0007] According to another aspect of the present disclosure, a method for detecting earphones when they are powered on is provided. The steps of the method for detecting earphones when they are powered on include: determining whether the earphones are worn on the head when they are powered on via a power-on wearing state detection module. When it is detected that the earphones are worn on the head before they are powered on, that is, when they are powered on after wearing, the sensor state is set to in-ear via the wearing detection module after wearing and powering on, the sensing value before power-on compensation of at least one channel in the sensor is read and stored, an interrupt from the sensor is received, and the interrupt source is read and checked. When the interrupt source is a compensation interrupt, the sensor state is set to out-of-ear via the out-of-ear detection submodule, or when the interrupt source is not a compensation interrupt, the sensor state is confirmed to be in-ear or out-of-ear via the anti-press / release submodule. The steps of the method for detecting earphones when they are powered on also include: when it is determined that the earphones are not worn on the head after they are powered on, that is, when they are powered on before wearing, the wearing detection module before wearing and powering on performs the above-mentioned enhanced earphone out-of-ear detection method.

[0008] Yet another aspect of the present disclosure provides a non-transitory computer-readable medium storing instructions, which, when executed by a processor, implements the above-mentioned method for detecting wearing of headphones when they are powered on.

[0009] According to another aspect of the present disclosure, a device for detecting the wearing of headphones after they are powered on is provided. The device includes a power-on wearing state detection module, which is configured to detect whether the headphones are powered on after being worn or before being worn. The device also includes a power-on wearing detection module before wearing, which is configured to perform the above-mentioned enhanced headphone out-of-ear detection method when it is detected that the headphones are powered on before being worn. The device also includes a power-on wearing detection module before wearing and a power-on wearing detection module after wearing, which include an out-of-ear detection submodule and an anti-pressing / releasing submodule. The power-on wearing detection module after wearing is configured to set the sensor state to in-ear when it is detected that the headphones are powered on after being worn, read and store the pre-power-on compensation sensing value of at least one channel in the sensor, receive an interrupt from the sensor, and read and check the interrupt source. The out-of-ear detection submodule is configured to set the sensor state to out-of-ear when the interrupt source is a compensation interrupt. The anti-pressing / releasing submodule is configured to further confirm whether the sensor state is in-ear or out-of-ear by reading and querying the sensor interrupt source or judging the pre-compensation sensing value of the sensor when the interrupt source is not a compensation interrupt. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] These and / or other features, aspects and advantages of the present invention will be better understood upon reading the following detailed description with reference to the accompanying drawings, wherein like characters represent like parts throughout, and wherein:

[0011] Figure 1 A block diagram illustrating enhanced headphone wearing detection according to one or more embodiments of the inventive subject matter;

[0012] Figure 2 A flowchart of power-on wearing state detection according to one or more embodiments of the present invention is shown;

[0013] Figure 3 An exemplary result of earphone out-of-ear detection using a capacitive proximity sensor with a compensation mechanism is shown;

[0015] Figure 4 A flowchart showing a method for detecting an enhanced earphone out of the ear performed through one channel of a sensor according to one or more embodiments of the present inventive subject matter is shown;

[0016] Figure 5 A flowchart of a method for detecting wearing of an enhanced headset through multiple channels of a sensor according to one or more embodiments of the present inventive subject matter is shown;

[0017] FIG. 6A to FIG. 6D An example of comparing the headphone wearing detection results before and after adding an enhanced headphone wearing detection method through two channels of a capacitive proximity sensor according to one or more embodiments of the present inventive subject matter is shown;

[0018] Figure 7 An example of a sensor status detection method for turning on the device after wearing is shown according to one or more embodiments of the present inventive subject matter; and

[0019] Figure 8 Another example of a method for detecting a sensor state after being turned on after being worn is shown according to one or more embodiments of the present inventive subject matter. DETAILED DESCRIPTION

[0020] The following description of various embodiments is given for the purpose of illustration, but is not intended to be exhaustive or to limit the disclosed embodiments.Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.

[0021] It has become a common behavior for users to wear headphones to listen to audio. During use, it may be necessary to detect the sensor state of the headphones when wearing and taking off the headphones, so that, for example, audio playback can be started or stopped in time during the use of the headphones. In this article, the sensor state of the headphones when the user wears them and the headphones are turned on is defined as the in-ear state, and the sensor state when the user does not wear or take off the headphones is defined as the out-of-ear state.

[0022] It is conceivable that, in one case, the user may turn on the headset before putting it on the head, that is, the headset is turned on before wearing, that is, the sensor is out of the ear when the headset is turned on. In another case, the user may have put the headset on the head before turning it on, and then turn it on, that is, the headset is turned on after wearing, that is, the sensor is already in the ear when the headset is turned on. Therefore, it is necessary to detect the power-on wearing state to distinguish the above two scenarios.

[0023] A conventional solution for power-on wearing state detection may be to detect the wearing state by using an optical sensor as a wearing detection sensor. However, this may require opening a window on the housing of the earplug, or opening a window in front of (or around) the speaker of the earphone. However, when the earphone speaker is covered or blocked by some object, the earplug may be mistakenly detected.

[0024] In one solution, a proximity sensor can be combined with a Hall sensor to detect the wearing state of the headset after it is worn on the head and turned on. The Hall sensor and the magnetic material are placed in the housing or the headband to check whether the headset is being worn. However, sometimes when the headset is held in the hand and turned on, the Hall sensor may also be triggered by the magnetic material, because the Hall sensor may also be close to the magnetic material when the headset is held in the hand and turned on.

[0025] The inventive subject matter provides a method for detecting whether an earphone is turned on before or after being worn on the head, using only one sensor. For example, a proximity sensor (such as a capacitive proximity sensor) can be used to detect the sensor state. When the earphone is close to or away from the ear, the change in capacitance on the sensor pad can be used to detect whether the earphone sensor is out of the ear or in the ear.

[0026] Figure 1 1 shows a block diagram 100 of an enhanced earphone wearing detection device according to one or more embodiments of the present inventive subject matter. Figure 1 As shown, it mainly includes a power-on wearing state detection module 110, a power-on wearing detection module 120 before wearing, and a power-on wearing detection module 130 after wearing.

[0027] The power-on wearing state detection module 110 is configured to determine whether the headset is powered on after wearing or before wearing when the headset is powered on. When the headset is powered on, the power-on wearing state detection module 110 determines whether the headset has been worn on the head. If the headset is powered on before wearing, that is, the sensor state is out of the ear 112 when powered on, the power-on wearing detection module 120 before wearing will work; if the headset is powered on after wearing, that is, the sensor state is in the ear 114 when powered on, the power-on wearing detection module 130 after wearing will work.

[0028] Depend on Figure 1 It can be seen that the pre-wearing power-on wearing detection module 120 includes a normal wearing detection submodule 122 and an enhanced ear-out detection submodule 124. The post-wearing power-on wearing detection module includes an anti-pressing / release submodule 132 and an ear-out detection submodule 134. A microcontroller unit MCU is provided in the headset, which may include one or more processors. For example, a Bluetooth system-on-chip BT Soc or other chips may be used to implement the processing flow of each module and submodule. The workflow of each module and submodule will be specifically described below.

[0029] Figure 2 FIG. 2 is a flowchart 200 showing the power-on wearing state detection according to one or more embodiments of the present invention. Figure 1 The power-on wearing status detection module 110 is shown as being executed.

[0030] When the headset is turned on, in S210, the MCU reads the raw data RAWx of each channel of the sensor, where x represents the channel number. RAWx can be the unprocessed raw data of each channel. In S220, if the difference between the RAWx sensed in at least one channel used in the sensor and the calibration value CALx is greater than the headset's power-on threshold RAWTHRSx after wearing, where x represents the channel number, it is detected that the headset is being worn on the head and is turned on after wearing. On the contrary, it will be detected that the headset has not been worn, but the power has been turned on before wearing. Normally, RAWx after wearing will be greater than before wearing. In some cases, RAWx after wearing may also be smaller than before wearing, which is related to the calculation inside the sensor. This article uses the former case as an example for description, and it can be imagined that the mechanisms of the two cases are the same.

[0031] For sensor calibration, each channel of the sensor needs to be calibrated on the product line, and the sensing calibration value of channel x is expressed as CALx. Under specific temperature and humidity (room temperature 25°C and humidity 50% can be used as typical values ​​here), turn on the headset when it is not worn and read the raw data sensed by each channel of the sensor, and then set these raw data to the calibration value (CALx).

[0032] For setting the threshold for turning on the headset after wearing it, the sensor can have different raw data in different environments. The threshold RAWTHRSx for turning on the headset after wearing it needs to cover environments with various temperatures and humidity. For example, these raw data need to include:

[0033] Before wearing the headphones, turn on the power of the headphones at different temperatures and humidities (for example, -5℃ / 0, 25℃ / 50%, 40℃ / 90%), and read the raw data sensed by the sensor at each temperature and humidity, and express them as, for example, RAWx_BW_-5, RAWx_BW_25, and RAWx_BW_40.

[0034] After wearing the headphones, turn on the power of the headphones at different temperatures and humidities (for example, -5℃ / 0, 25℃ / 50%, 40℃ / 90%), and then read the raw data sensed by the sensor at each temperature and humidity respectively, and represent them as, for example, RAWx_AW_-5, RAWx_AW_25, and RAWx_AW_40.

[0035] Next, in S220, the difference between the raw data before power-on and the raw data after power-on is calculated at each temperature and humidity, i.e., for example, the difference between RAWx_BW_-5 and RAWx_AW_-5, the difference between RAWx_BW25 and RAWx-AW_25, and the difference between RAWx_BW_40 and RAWx_AW_40. The obtained differences should cover the differences of sensor channel x at different temperatures and humidities, and these differences are set as the threshold RAWTHRSx for the corresponding channel x to determine whether the headset is turned on after wearing, where x represents the channel number.

[0036] One channel or multiple channels of the sensor can be used, and the maximum number of channels that can be used depends on the structure of the sensor. The mechanism of using one channel or multiple channels for detection is the same. Here, two channels are used as an example, so the raw data read by the MCU for each channel of the proximity sensor can be expressed as (RAW1, RAW2); the sensing calibration value of the channel is expressed as (CAL1, CAL2); the threshold for powering on after wearing is (RAWTHRS1, RAWTHRS2). Therefore, the basis for determining whether to power on after wearing is that when RAW1-CAL1>RAWTHRS1&&RAW2-CAL2>RAWTHRS2 is satisfied, the power-on wearing detection module detects that the headset is powered on after wearing, that is, the sensor state is in-ear when powered on. Otherwise, the power-on wearing detection module detects that the headset is powered on before wearing, that is, the sensor state is out-of-ear when powered on.

[0037] The following will be divided into the first case where the earphone is turned on before being worn and the second case where the earphone is turned on after being worn.

[0038] In the first case, the headset is powered on first and then worn on the head, so the headset first enters the power-on and wearing detection module before wearing, such as Figure 1 As shown in 120 , the pre-wearing power-on wearing detection module 120 includes a normal wearing detection submodule 122 and an enhanced ear-out detection submodule 124 .

[0039] In the solution of headphone wearing detection, when the headphone approaches or moves away from the user's ear, the capacitance of the sensor pad changes, and thus the change in the sensor value generates and triggers an MCU interrupt. The normal wearing detection sub-module 122 detects the insertion and removal of the headphone sensor based on the capacitance change on the sensor. Since the headphone users can be male or female, and the diameters of the users' heads may be different from each other, the changes in these sensed values may be different for different users. Therefore, adjustment is needed to make it effective for most users. A compensation mechanism can be adopted for the change in the capacitance sensed on the sensor pad. The sensor compensation mechanism uses two values, one is the real-time value and the other is the reference value. The difference obtained by subtracting the reference value from the real-time value is used as the sensor value read by the MCU, which is denoted as the sensor compensation value. When the real-time value changes, the reference value also changes accordingly to keep the sensor sensed value as stable as possible, so that the sensor compensation value is stable. However, using this compensation mechanism is not effective for some users.

[0040] Figure 3 Exemplarily, the detection result of headphone wearing is shown by, for example, a capacitive proximity sensor. The names of multiple sensing channels of the sensor are respectively denoted as PHx, where x is the channel number. The sensor compensation value obtained by subtracting the reference value from the real-time value of the sensing channel PHx is denoted as PHx_DIF. In Figure 3 taking the use of two detection channels PH1 and PH4 as an example, curve 310 represents channel PH1. As Figure 3 shown, the detection result of using the capacitive proximity sensor channel PH1 to detect headphone wearing is as follows: starting from when the user wears the headphone (as shown by 320), after about 20 minutes when the user wears the headphone, the difference between the real-time value and the reference value of the sensing channel PH1 of the capacitive proximity sensor, that is, the sensor compensation value PH1_DIF increases from 34w to 52w. Then, when the user removes the headphone from the head (as shown by the reference numeral 330), the compensation value PH1_DIF of the sensing channel PH1 drops from 52w to 18w; similarly, curve 340 represents channel PH4. The detection result of using the capacitive proximity sensor channel PH4 to detect headphone wearing is as follows: starting from when the user wears the headphone (as shown by 320), after about 20 minutes when the user wears the headphone, the compensation value PH4_DIF of channel PH4 increases from 60w to 80w. After removing the headphone again, the compensation value PH4_DIF of the sensing channel PH4 drops from 80w to 16w. It can be seen that in this detection example, the sensor compensation values sensed by the two channels PH1 and PH4 of the sensor do not reach the compensation value threshold of 12w for detecting the removal of the sensor from the ear.

[0041] In fact, during this ear removal detection, when the user removed the earphone about 20 minutes after wearing it, the time it took for the compensation value of the capacitive proximity sensor channel PH1 to drop from 52w to the threshold of 12w was 41s (as shown by reference numeral 350); the time it took for the compensation value sensed by the detection channel PH4 of the capacitive proximity sensor to drop from 80w to the threshold of 12w was 24s (as shown by reference numeral 360). However, the normal detection time from removing the earphone to detecting the removal of the earphone should be within 2s. In contrast, in the above example, it takes at least 24s for the sensor value to reach the detection threshold. Thus, in the earphone wearing detection scheme using the compensation mechanism, the sensed value may not drop to the threshold in time, and the action of the user removing the earphone cannot be detected in time.

[0042] To solve these problems in the above earphone removal detection, the present inventive subject matter provides a method for enhanced earphone removal detection. The provided method can operate in parallel with the capacitive proximity sensor for detecting earphone wearing as in the above example, and can be executed, for example, in the enhanced ear removal detection sub-module 124 as shown in Figure 1 to enhance the reliability and efficiency of detecting the removal of the earphone sensor.

[0043] Figure 4 FIG. 400 shows a flowchart of a method for performing enhanced earphone removal detection through one channel of a sensor according to one or more embodiments of the present inventive subject matter.

[0044] When it is known that the earphone is powered on and has been worn on the head, the sensor status STA has been set to ear-in, for example, represented as STA = 1. At S402, the processor MCU periodically reads the compensated sensor compensation value DIF. The period of reading the sensor compensation value determines the scan interval for reading the sensed sensor compensation value. For example, the typical value of this period can be set to 1s, that is, the MCU reads the sensor value every 1 second.

[0045] Let the currently read sensor compensation value DIF be represented as DIF(n), then DIF(n - 1) represents the previous DIF value read; DIF(n + 1) represents the next DIF value. When, for example, the user removes the earphone and the sensor sensing pad leaves the human body, under certain strategies, DIF(n) will decrease, or under other strategies, DIF(n) can increase. Whether DIF(n) decreases or increases is related to the calculation of the sensor. It can be understood that the method provided by the present inventive subject matter is effective for both of these strategies. Here, the strategy of DIF(n) decreasing is taken as an example for illustration.

[0046] At S404, if DIF(n) is less than DIF(n - 1) and the decreasing value (|DIF(n) - DIF(n - 1)|) as a percentage of DIF(n - 1) exceeds the percentage threshold OFFDET, then at S406, the MCU will read DIF again (i.e., DIF(n + T)) after a delay time T. At S408, if DIF(n + T) is less than DIF(n - 1), and the decreasing value (|DIF(n + T) - DIF(n - 1)|) as a percentage of DIF(n - 1) exceeds the percentage threshold OFFDET, then it is detected that the sensor is out of the ear and the sensor state STA = 0 is reset, and the MCU will end this loop.

[0047] Among them, OFFDET is a set percentage threshold. This percentage threshold is set according to the initial sensed value (DIF(0)) after the headset is worn and the sensed value DIF_LTW after long - term wearing. This OFFSET can be set to be less than DIF(0) / DIF_LTW. The OFFSET for different channels can be different. As mentioned above, the delay time T determines the time for enhanced out - of - ear detection. The shorter T is, the shorter the response time is. This delay time T cannot be too short, otherwise some state changes cannot be filtered out. Usually, if the sampling period of DIF is set to 1 s, then T can be set to 2 s or 3 s.

[0048] Returning to S404, if DIF(n) is greater than or equal to DIF(n - 1), or the decreasing value (|DIF(n) - DIF(n - 1)|) as a percentage of DIF(n - 1) does not exceed the threshold OFFDET, then the MCU will end this loop and return to S402 to start a new loop.

[0049] At S408, if DIF(n + T) is greater than or equal to DIF(n - 1), or the decreasing value (|DIF(n + T) - DIF(n - 1)|) as a percentage of DIF(n - 1) does not exceed the threshold OFFDET, then the MCU will end this loop and return to S402 to start a new loop.

[0050] During the execution of the above detection, if an interrupt IRQ is sent to the MCU during the sensor detection of the normal wearing detection sub - module, then at S410, the MCU will read the sensor state STA and check: if STA is 0, it reports that the sensor state is detected as out of the ear and clears the sensor data. If STA is 1, then at S412, the MCU exits the IRQ.

[0051] Figure 5FIG. 500 is a flowchart showing a method for detecting enhanced headphone wearing through two channels of a sensor according to one or more embodiments of the inventive subject matter. It is known that when the headphone is powered on and worn on the head, the sensor status settings are both set to in-ear for channel x (x = 1 or 2), i.e., STA1 = 1, STA2 = 1. At S502, the processor MCU periodically reads the sensor data, and the sensor compensation values for channel 1 and channel 2 are DIF1 and DIF2 respectively.

[0052] Then, sensor status detection is performed separately for the two channels of the sensor. For example, for channel 1, at S504, DIF1(n) is compared with DIF1(n - 1), and the percentage of (|DIF1(n) - DIF1(n - 1)|) in DIF1(n - 1) is calculated.

[0053] At S504, if DIF1(n) is less than DIF1(n - 1), and the percentage of the decreasing value (|DIF1(n) - DIF1(n - 1)|) in DIF1(n - 1) exceeds the percentage threshold OFFDET, then at S506, the MCU will read the sensor sensed value DIF1(n + T) after the delay time T;

[0054] At S504, if DIF1(n) is greater than or equal to DIF1(n - 1), or the percentage of the decreasing value (|DIF1(n) - DIF1(n - 1)|) in DIF1(n - 1) does not exceed the percentage threshold OFFDET, then at S510, the MCU will read and check the value (DIF2) of the second channel by using the same method as for the first channel;

[0055] At S506, the MCU reads the sensor sensed value DIF1(n + T) after the delay time T, and then at S508, if DIF1(n + T) is less than DIF1(n - 1), or the percentage of the decreasing value (|DIF1(n + T) - DIF1(n - 1)|) in DIF1(n - 1) exceeds the percentage threshold OFFDET, then it is detected that the sensor is out of the ear, and the MCU sets the sensor status to out-of-ear (STA1 = 0) and clears the sensor data;

[0056] At S508, if DIF1(n + T) is greater than or equal to DIF1(n - 1), or the percentage OFFDET of the decreasing value (|DIF1(n + T) - DIF1(n - 1)|) in DIF1(n - 1) does not exceed the percentage threshold OFFDET, then the processing flow goes to S510, and the MCU will read and check the value (DIF2) of the second channel by using the same method as for the first channel.

[0057] At S510, if DIF2(n) is less than DIF2(n - 1), or the percentage of the decreasing value (|DIF2(n) - DIF2(n - 1)|) in DIF2(n - 1) exceeds the percentage threshold OFFDET, then it enters S512, and the MCU will read the sensor sensing value DIF2(n + T) after the delay time T.

[0058] Then it enters S514. If DIF2(n + T) is less than DIF2(n - 1), or the percentage of the decreasing value (|DIF1(n + T) - DIF1(n - 1)|) in DIF1(n - 1) exceeds the percentage threshold OFFDET, then it is detected that the earbud is out of the ear, and the MCU sets the sensor status to earbud out STA1 = 0 and clears the sensor data.

[0059] At S514, if DIF2(n) is greater than or equal to DIF2(n - 1), or the percentage of the decreasing value (|DIF2(n) - DIF2(n - 1)|) in DIF2(n - 1) does not exceed the percentage threshold OFFDET, then the MCU will end this loop and return to S502 to start a new loop.

[0060] During the above execution process, if the sensor in the normal wearing detection sub - module sends an interrupt IRQ to the MCU, at S520, the MCU will read and check the current sensor status STAx. If STA1 = 0 or STA2 = 0, then it is detected that the sensor is out of the ear, and the sensor data is cleared. If both STA1 and STA2 are 1, then at S522 the MCU exits the interrupt IRQ.

[0061] It can be seen that when multiple channels of the sensor are used, the enhanced earbud out - of - ear detection method can read and check the sensor values of each channel of the sensor one by one. If any one of the channels meets the requirements of the enhanced earbud out - of - ear detection, then it is detected that the sensor is out of the ear, and then the sensor data is cleared, and the MCU ends this loop; if this channel does not meet the conditions of the enhanced earbud out - of - ear detection, the MCU will read and check the next channel. If all channels do not meet the conditions of the enhanced earbud out - of - ear detection, the MCU will end this loop and start a new loop.

[0062] In the method for enhanced earbud out - of - ear detection through multiple channels of the sensor, when the earbuds are powered on and already worn on the head, the sensor status setting channels x (x = 1 or 2) are both configured as in - ear, that is, STAx = 1. The processor MCU periodically reads the sensor data, and the compensation values of channel x are DIFx respectively. For example, the typical value of the reading period can be set to 1 s.

[0063] If the current sensor compensation value reading is represented as DIFx(n), then DIFx(n - 1) represents the previous sensor compensation value, and DIFx(n + 1) represents the next sensor compensation value. When the sensing gasket is far from the human body, under certain strategies, DIFx(n) can decrease, or under other strategies, DIFx(n) can increase. Whether DIFx(n) decreases or increases is related to the calculation of the sensor. It can be understood that the method provided by the inventive subject matter is effective for both of these two strategies. Here, the strategy of DIFx(n) decreasing is taken as an example for illustration.

[0064] If DIFx(n) is less than DIFx(n - 1), and the decreasing value (|DIFx(n) – DIFx(n - 1)|) as a percentage of DIFx(n - 1) exceeds the percentage threshold OFFDET, then the MCU will detect the sensor compensation value again after a delay time T (i.e., DIFx(n + T)): If DIFx(n + T) is less than DIFx(n - 1), and the decreasing value (|DIFx(n + T) - DIFx(n - 1)|) as a percentage of DIFx(n - 1) exceeds the percentage threshold (OFFDET), then ear - out is detected and the sensor state STA = 0 is reset, and the sensor data will be cleared, and the MCU ends this loop.

[0065] FIG. 6A to FIG. 6D An example of the comparison of the ear - out detection results of the earphone before and after adding the method of enhanced earphone wearing detection through two channels of a capacitive proximity sensor according to one or more embodiments of the inventive subject matter is shown. In FIG. 6A to FIG. 6D the detection, the sampling period of the sensor value DIF is set to 1 s for both, OFFSET is set to 50%, and the delay time T is set to 2 s. The user wears the earphone for more than half an hour, and the sensed values DIF1 and DIF2 of the two channels are recorded.

[0066] Fig. 6A and Figure 6B respectively show the comparison of the detection results of the first channel of the capacitive proximity sensor before and after adding the method of enhanced earphone wearing detection. Fig. 6A The process of the change in the sensor compensation value that may cause the change in the sensor state in is marked by the ellipse 610, and this part is magnified on the right side of the figure. It can be seen that Fig. 6A in, the value DIF1 of channel 1 of the sensor needed at least 209 - 27 = 187 seconds to detect ear - out before using the enhanced ear - out detection method. In contrast, after adding the enhanced ear - out detection method to channel 1 of the sensor, by Figure 6BThe process of change in the sensor compensation value marked by the ellipse 620 in [Figure] that causes a change in the sensor state can be seen in the enlarged view on the right to be shortened from DIF(n - 1) to DIF(n) and then to DIF(n + 1) within 3 seconds (as described by the label 622), that is, it can be detected that the sensor state becomes out-of-ear.

[0067] Similarly, Figure 6C and Fig.6D respectively show the comparison of the detection results of the first channel of the capacitive proximity sensor before and after adding the method for enhanced headphone wearing detection. For channel 2 of the sensor, Figure 6C in [Figure], the value DIF2 of channel 2 of the sensor marked by 630 requires at least 235 - 27 = 208 seconds to detect out-of-ear before using the enhanced out-of-ear detection method on the right. In contrast, after adding the enhanced out-of-ear detection method for channel 2 of the sensor, Fig.6D the process of change in the sensor compensation value marked by the ellipse 640 in [Figure] that causes a change in the sensor state can be seen in the enlarged view on the right that DIF2 can drop to the threshold within 3 seconds (as described by the label 642), so that it can be detected that the sensor state becomes out-of-ear.

[0068] Thus, it can be seen that the out-of-ear action cannot be immediately detected before using the enhanced out-of-ear detection method, but it takes more than 3 minutes to detect that the headphones have been removed. In contrast, after using the enhanced out-of-ear detection method provided by the present inventive subject matter, it can be ensured that the sensor state becomes out-of-ear is detected within about 3 seconds. Therefore, by adopting the enhanced out-of-ear detection method provided by the present inventive subject matter, the defect that out-of-ear cannot be detected after long-term wearing can be solved, so that the headphones can also immediately and successfully detect that the headphones are removed from the ears after long-term wearing;

[0069] Now return to refer to Figure 1 and Figure 2 , in the second case where the power-on wearing state detection module 110 detects that the headphones are worn after power-on, the sensor state is in-ear, that is, the headphones have been worn on the head before power-on, then the headphone wearing detection enters the power-on after wearing detection module 130. Refer to Figure 1 , the power-on after wearing detection module 130 includes an anti-press / release sub-module 132 and an out-of-ear detection sub-module 134.

[0070] In some scenarios, the user may press the earcup of the headphones but not remove the headphones. The headphones may be pressed, and then the pressure on the headphones may be released, but the headphones are not removed to make the headphones become out-of-ear. Therefore, the anti-press / release sub-module 132 is needed, which is configured to avoid erroneously detecting out-of-ear in such scenarios.

[0071] Figure 7 illustrates an example 700 of sensor status detection when powered on after wearing, in accordance with one or more embodiments of the inventive subject matter. In this example, as Figure 7 shown, when the earphone is powered on after being worn, the sensor status when worn and powered on is ear-in PWRON_WEARING = 1, as shown at S702.

[0072] At S704, the MCU reads and stores the pre-compensation sensed value USEx_PWRON of at least one channel of the sensor before compensation. For example, in an example where two channels of the sensor are used, the pre-compensation sensed values of channel 1 and channel 2 are USE1_PWRON and USE2_PWRON respectively.

[0073] At S706, when the MCU receives an interrupt IRQ from the sensor, it will enter S708 where the MCU reads and checks the interrupt source IRQSRC.

[0074] When the earphone is worn on the head and removed from the head while powered on, the sensor senses and sends an interrupt, and the interrupt source is a compensation interrupt, for example, configured as 0x10 in the register.

[0075] Therefore, at S708, if the interrupt source received by the MCU is a compensation interrupt, that is, the interrupt source IRQSRC == 0x10, the processing flow will enter the ear-out detection sub-module, and at S710, enter the ear-out detection sub-module, where it queries whether the interrupt is a compensation interrupt triggered by a change in the sensed value of the sensor due to detecting that the earphone has been removed, that is, the interrupt source IRQSRC in the register == 0x10, then the MCU resets the sensor status to PWRON_WEARING = 0, that is, it detects that the sensor is out of the ear and sets the sensor status to out-of-ear.

[0076] Otherwise, at S708, if the interrupt source received by the MCU is not a compensation interrupt, it will enter S712, where the MCU will read the pre-compensation sensed value USEx of each channel of the sensor, where x represents the channel number. At S712, the MCU will calculate the difference between the current pre-compensation sensed value and the pre-compensation sensed value at power-on (USEx - USEx_PWRON), and then compare the calculated difference with the pre-compensation sensed threshold USEx_PWRON_THRS.

[0077] For some sensors, the current sensed value USEx can be greater than the pre-compensation sensed value USEx_PWRON at power-on; for other sensors, the current pre-compensation sensed value USEx can be less than the pre-compensation sensed value USEx_PWRON at power-on, but the mechanisms for detecting earphone wearing of these two proximity sensors for the inventive subject matter are the same.

[0078] At S708, if the subtracted difference (USEx - USEx_PWRON) for any channel of the sensor is greater than the sensed threshold USEx_PWRON_THRS before compensation, then at S714, the MCU will confirm that the earphone has not been removed, the sensor state is in-ear, and the interrupt IRQ will be exited; on the contrary, if at S708 for each channel of the sensor, the subtracted difference (USEx - USEx_PWRON) is less than or equal to the sensed threshold USEx_PWRON_THRS before compensation, the MCU detects that the earphone is out of the ear, and then it will enter S710. In the out-of-ear detection sub-module, the MCU resets the sensor state to out-of-ear, that is, PWRON_WEARING = 0.

[0079] At Figure 7 Taking the example that two channels of the sensor are used in S712, the MCU reads the currently sensed value before compensation for each channel and checks: (USE1 - USE1_PWRON > USE1_PWRON_THRS) || (USE2 - USE2_PWRON > USE2_PWRON_THRS). If any one of channel 1 or channel 2 satisfies the above condition, then at S714 it is confirmed that the earphone is worn on the head (not removed); otherwise, if neither channel 1 nor channel 2 satisfies the condition, then at S710 it is detected that the earphone is out of the ear, and the sensor state PWRON_WEARING = 0 is reset.

[0080] Figure 8 Another example 800 of the sensor state detection method for power-on after wearing is shown in accordance with one or more embodiments of the present inventive subject matter. In this example, the earphone is powered on after wearing. At S802, the earphone is powered on and worn, and the sensor state is in-ear, PWRON_WEARING = 1.

[0081] Then at S804, the MCU reads and stores the sensed value before compensation at power-on for each channel of the sensor USEx_PWRON, where x represents the channel number. In the example where two channels of the sensor are used for detection, the MCU reads and stores the sensed values before compensation at power-on for sensor channels 1 and 2, USE1_PWRON and USE2_PWRON.

[0082] At S806, when the MCU receives an interrupt IRQ from the proximity sensor, the MCU will read and check the interrupt source IRQSRC of the IRQ at S808.

[0083] As described above, when the earphone is removed from the head after being powered on while worn, the interrupt source can be a compensation interrupt, for example, set in the register as IRQSRC == 0x10.

[0084] At S808, if the interrupt source received by the MCU is a compensation interrupt, i.e., the interrupt source IRQSRC == 0x10, it will enter S810 where the out-of-ear detection sub-module is used to detect the out-of-ear state. At S810, it will query whether the interrupt is a compensation interrupt triggered by the change in the sensed value of the sensor due to the detection that the earphone has been removed, i.e., the interrupt source IRQSRC in the register == 0x10. Thus, the MCU will reset the sensor state to out-of-ear PWRON_WEARING = 0, which means it has detected the out-of-ear state of the sensor and set the sensor state to out-of-ear.

[0085] Otherwise, at S808, if the interrupt source received by the MCU is not a compensation interrupt, it will enter S812 for further query. If the MCU queries that the interrupt source is a near interrupt source or a far interrupt source (for example, set in the register as IRQSRC == 0x40 || IRQSRC == 0x20), the MCU will confirm that the earphone is still being worn on the ear, maintain the sensor state as in-ear, and exit the interrupt (as shown at S814). Otherwise, at S810, it will enter the out-of-ear detection sub-module, where it detects the out-of-ear state of the sensor, and thus the MCU will reset the sensor state to out-of-ear PWRON_WEARING = 0.

[0086] By using the enhanced earphone wearing detection method provided by the present inventive concept, the following advantages can be obtained:

[0087] · The defect that the out-of-ear state cannot be detected after long-term wearing can be solved. The removal of the earphone from the ear can also be successfully detected immediately after long-term wearing;

[0088] · Whether the earphone is powered on before or after wearing, the wearing state of the earphone at power-on can be detected;

[0089] · The power-on wearing detection is only based on one proximity sensor, so it is simple and reliable. After adding the enhanced method of the present inventive concept running in parallel, it has no impact on the original earphone wearing detection design that also only uses one proximity sensor;

[0090] · The problem that the in-ear / out-of-ear detection cannot be triggered when the earphone is already worn on the head and powered on is solved; and

[0091] · The enhanced earphone wearing detection method can be software-based, which does not increase costs and can flexibly set various parameters.

[0092] The description of the embodiments has been presented for purposes of illustration and description. Based on the above description, appropriate modifications and changes can be made to the embodiments, or such modifications and changes can be obtained from practicing the described methods. For example, unless otherwise stated, one or more of the described methods can be performed by a suitable device and / or combination of devices. The methods can be performed by executing stored instructions with one or more logic devices (e.g., processors) in combination with one or more additional hardware elements such as storage devices, memories, hardware network interfaces / antennas, switches, actuators, clock circuits, etc. The described methods and associated actions can also be performed in various orders in parallel and / or simultaneously, in addition to the order described in this application. The described systems are exemplary in nature and can include additional elements and / or omit elements. The subject matter of the inventive subject includes all novel and non-obvious combinations of the various systems and configurations and other features, functions, and / or properties disclosed.

[0093] Elements of various real-time scenarios of modules, elements, and components for implementing the methods provided by the inventive subject can be fabricated as one or more electronic devices residing on the same chip or chipset, including but not limited to arrays of fixed or programmable logic elements (e.g., transistors or gates, etc.). One or more elements of various embodiments of the devices described herein can also be implemented, in whole or in part, as one or more instruction sets, which can be arranged to be executed on one or more arrays of fixed or programmable logic elements (e.g., microprocessors, embedded processors, IP cores, digital signal processors, FPGAs, ASSPs, and ASICs, etc.).

[0094] Examples of one or more implementations of the inventive subject are described in the following clauses:

[0095] Clause 1. A method for enhancing earbud out-of-ear detection, comprising the following steps:

[0096] After turning on the earbuds and wearing them on the head, detect and set the sensor status to in-ear;

[0097] Periodically read, via a processor, the sensor compensation value of at least one channel of the sensor;

[0098] When the sensor compensation value drops by more than a percentage threshold compared to the previous sensor compensation value, read the delayed sensor compensation value after a read delay time;

[0099] When the sensor compensation value does not drop compared to the previous sensor compensation value or the sensor compensation value drops by less than the percentage threshold compared to the previous sensor compensation value, read and check the next sensor compensation value of the at least one channel;

[0100] When the delay sensor compensation value drops by more than the percentage threshold compared to the previous sensor compensation value, it is detected that the sensor has come out of the ear and the sensor status is reset to out-of-ear; and

[0101] When the delay sensor compensation value does not drop compared to the previous sensor compensation value, or when the drop in the delay sensor compensation value compared to the previous sensor compensation value is less than the percentage threshold, the next sensor compensation value of the at least one channel is read and checked.

[0102] Clause 2. The method as described in Clause 1, wherein the sensor compensation value is the difference between the real-time value of the at least one channel sensor and the reference value.

[0103] Clause 3. The method as described in Clause 1 or Clause 2, wherein the delay time is set to be greater than the period for reading the sensor compensation value.

[0104] Clause 4. The method as described in any one of Clauses 1 to 3, the method further comprising querying the sensor status via a processor based on an interrupt received from the sensor, wherein the sensor senses that the earphone is approaching or moving away from the ear and generates an interrupt.

[0105] Clause 5. The method as described in any one of Clauses 1 to 4, the method further comprising:

[0106] If the sensor status is out-of-ear, it is detected that the sensor has come out of the ear; or

[0107] If the sensor status is in-ear, the interrupt is exited.

[0108] Clause 6. The method as described in any one of Clauses 1 to 5, applying the method to each of multiple channels of the sensor respectively, wherein when the delay sensor compensation value read by at least any one of the multiple channels of the sensor drops by more than the percentage threshold compared to the previous sensor compensation value, it is detected that the sensor has come out of the ear and the sensor status is reset to out-of-ear.

[0109] Clause 7. The method as described in any one of Clauses 1 to 6, wherein the sensor is a proximity sensor.

[0110] Clause 8. The method as described in any one of Clauses 1 to 7, wherein the sensor is a capacitive proximity sensor.

[0111] Clause 9. The method as described in any one of Clauses 1 to 8, wherein the processor is a Bluetooth system-on-chip.

[0112] Clause 10. A non-transitory computer-readable medium storing instructions, the instructions when executed by a processor implement the method as described in any one of Clauses 1 - 9.

[0113] Clause 11. A method for detecting headphone wearing, comprising the following steps:

[0114] Detect whether the headphones are powered on after wearing or before wearing via the power-on wearing state detection module;

[0115] When it is detected that the headphones are powered on before wearing, the enhanced headphone out-of-ear detection method described in any one of Clauses 1-9 is executed by the before-wearing power-on wearing detection module; or

[0116] When it is detected that the headphones are powered on after wearing, execute via the after-wearing power-on wearing detection module:

[0117] Set the sensor state to in-ear;

[0118] Read and store the sensed values before power-on compensation for each channel in the sensor;

[0119] Receive an interruption from the sensor;

[0120] Read and check the interruption source of the interruption, where:

[0121] When the interruption source is a compensation interruption, detect that the sensor is out-of-ear via the out-of-ear detection sub-module and set the sensor state to out-of-ear; or

[0122] When the interruption source is not a compensation interruption, determine whether the sensor state is in-ear or out-of-ear via the anti-press / release sub-module.

[0123] Clause 12. The method according to Clause 11, wherein detecting whether the headphones are powered on after wearing or before wearing via the power-on wearing state detection module includes:

[0124] Read the raw sensor data of each channel in the sensor when the headphones are powered on;

[0125] Compare the raw data with the after-wearing power-on threshold of the channel, where:

[0126] When the raw data is greater than the after-wearing power-on threshold, it is detected that the headphones are powered on after wearing; and when the raw data is not greater than the after-wearing power-on threshold, it is detected that the headphones are powered on before wearing.

[0127] Clause 13. The method according to Clause 11 or Clause 12, wherein determining whether the sensor state is in-ear or out-of-ear via the anti-press / release sub-module includes:

[0128] Read the current sensed value before compensation of the at least one channel;

[0129] Compare the current sensed value before compensation with the sensed value before power-on compensation, where:

[0130] For any channel of the sensor, when the difference between the current sensed value before compensation and the sensed value before compensation at startup is greater than the sensed threshold before compensation for that channel, confirm that the sensor state is inserted into the ear and exit the interrupt;

[0131] For all channels of the sensor, when the difference between the current sensed value before compensation and the sensed value before compensation at startup is not greater than the sensed threshold before compensation for that channel, detect that the sensor is removed from the ear via the ear removal detection sub-module and reset the sensor state to removed from the ear.

[0132] Clause 14. The method as described in any one of Clauses 11 to 13, wherein confirming whether the sensor state is inserted into the ear or removed from the ear via the anti-press / release sub-module includes:

[0133] When the interrupt source is a near interrupt source or when the interrupt source is a far interrupt source, confirm that the sensor state is inserted into the ear and exit the interrupt;

[0134] When the interrupt source is not a near interrupt source and not a far interrupt source, detect that the sensor is removed from the ear via the ear removal detection sub-module and reset the sensor state to removed from the ear.

[0135] Clause 15. The method as described in any one of Clauses 11 to 15, wherein when the sensor senses that the earphone housing is pressed and reaches the near threshold, a near interrupt is sent, and the interrupt source is a near interrupt source.

[0136] Clause 16. The method as described in any one of Clauses 11 to 15, wherein when the sensor senses that the pressure on the earphone housing is released and reaches the far interrupt threshold, a far interrupt is sent, and the interrupt source is a far interrupt source.

[0137] Clause 17. The method as described in any one of Clauses 11 to 16, wherein detecting that the sensor is removed from the ear via the ear removal detection sub-module and resetting the sensor state to removed from the ear includes confirming that the compensation interrupt is triggered by a change in the sensor sensed value.

[0138] Clause 18. The method as described in any one of Clauses 11 to 17, wherein the sensor includes and only includes one sensor.

[0139] Clause 19. The method as described in any one of Clauses 11 to 18, wherein the sensor is a proximity sensor, and wherein the sensor is a capacitive proximity sensor.

[0140] Clause 20. A non-transitory computer-readable medium storing instructions, which when executed by a processor implement the method as described in any one of Clauses 11 - 19.

[0141] Clause 21. A device for detecting earphone wearing, which includes one or more processors configured to include:

[0142] The power-on and wearing state detection module is configured to detect whether the earphone is powered on after being worn or before being worn;

[0143] The pre-power-on and wearing detection module is configured to perform the enhanced earphone out-of-ear detection method as described in any one of Clauses 1-9 when it is detected that the earphone is powered on before being worn, and

[0144] The post-power-on and wearing detection module includes an out-of-ear detection sub-module and an anti-press / release sub-module. The post-power-on and wearing detection module is configured to, when it is detected that the earphone is powered on after being worn:

[0145] Set the sensor state to in-ear;

[0146] Read and store the sensed values before power-on compensation for each channel in the sensor;

[0147] Receive an interrupt from the sensor;

[0148] Read and check the interrupt source of the interrupt,

[0149] wherein, the out-of-ear detection sub-module is configured to set the sensor state to out-of-ear when the interrupt source is a compensation interrupt;

[0150] wherein, the anti-press / release sub-module is configured to further confirm whether the sensor state is in-ear or out-of-ear when the interrupt source is not a compensation interrupt.

[0151] Clause 22. The device as described in Clause 21, wherein the power-on and wearing state detection module is configured to:

[0152] Read the raw sensor data of each channel in the sensor when the earphone is powered on;

[0153] Compare the raw data with the post-power-on threshold of the corresponding channel, wherein:

[0154] When the raw data is greater than the post-power-on threshold, it is detected that the earphone is powered on after being worn; and

[0155] When the raw data is not greater than the post-power-on threshold, it is detected that the earphone is powered on before being worn.

[0156] Clause 23. The device as described in Clause 21 or Clause 22, wherein the anti-press / release sub-module is configured to:

[0157] Read the current sensed value before compensation for each channel;

[0158] Compare the current sensed value before compensation with the sensed value before power-on compensation, where: for any channel of the sensor, when the difference between the current sensed value before compensation and the sensed value before power-on compensation is greater than the sensed threshold before compensation for that channel, confirm that the sensor state is in-ear and exit the interruption;

[0159] For all channels of the sensor, when the difference between the current sensed value before compensation and the sensed value before power-on compensation is not greater than the sensed threshold before compensation for that channel, the out-ear detection sub-module is configured to detect that the sensor is out of the ear and reset the sensor state to out-ear.

[0160] Clause 24. The device as described in any one of Clauses 21 to 24, wherein the anti-press / release sub-module is configured to:

[0161] When the interruption source is a near interruption or when the interruption source is a far interruption, confirm that the sensor state is in-ear and exit the interruption;

[0162] When the interruption source is neither a near interruption source nor a far interruption source, the out-ear detection sub-module is configured to detect that the sensor is out of the ear and reset the sensor state to out-ear.

[0163] Clause 25. The device as described in Clause 24, wherein when the sensor senses that the earphone housing is pressed and reaches the near threshold, a near interruption is sent, and the interruption source is a near interruption source.

[0164] Clause 26. The device as described in any one of Clauses 21 to 24, wherein when the sensor senses that the press on the earphone housing is released and reaches the far interruption threshold, a far interruption is sent, and the interruption source is a far interruption source.

[0165] Clause 27. The device as described in any one of Clauses 21 to 26, wherein the out-ear detection sub-module is configured to detect that the sensor is out of the ear and reset the sensor state to out-ear based on confirming that the compensation interruption is triggered by a change in the sensor sensed value.

[0166] Clause 28. The device as described in any one of Clauses 21 to 27, wherein the sensor includes and only includes one sensor.

[0167] Clause 29. The device as described in any one of Clauses 27 to 28, wherein the sensor is a proximity sensor, and wherein the sensor is a capacitive proximity sensor.

[0168] The terms chosen for use herein are intended to best explain the principles of the embodiments, the practical application, or the improvement of the technology found in the market, or to enable other ordinary technicians in the field to understand the embodiments disclosed herein.

[0169] In the foregoing, reference signs have been used to identify the embodiments presented in this disclosure. However, the scope of this disclosure is not limited to the specifically described embodiments. On the contrary, any combination of the foregoing features and elements, whether or not they relate to different embodiments, is contemplated to implement and practice the contemplated embodiments.

[0170] Moreover, although the embodiments disclosed herein may achieve advantages over other possible solutions or over the prior art, whether a given embodiment achieves a particular advantage does not limit the scope of this disclosure. Accordingly, the foregoing aspects, features, embodiments, and advantages are merely illustrative and are not to be regarded as elements or limitations of the appended claims unless expressly recited therein.

[0171] While the foregoing is directed to embodiments of this disclosure, other and further embodiments of this disclosure may be devised without departing from the basic scope thereof, and the scope of this disclosure is determined by the appended claims.

Claims

1. A method for enhancing ear - out detection of an earphone, comprising the following steps: After turning on the earphone, wear it on the head and set the sensor status to ear - in; Periodically read the sensor compensation value in at least one of multiple channels of the sensor via a processor; When the sensor compensation value drops by more than a percentage threshold compared to the previous sensor compensation value, read the delayed sensor compensation value after a read delay time; When the sensor compensation value does not drop compared to the previous sensor compensation value or the sensor compensation value drops by less than the percentage threshold compared to the previous sensor compensation value, read and check the next sensor compensation value of the at least one channel; Wherein, when the delayed sensor compensation value drops by more than the percentage threshold compared to the previous sensor compensation value, it is detected that the sensor is out of the ear and the sensor status is reset to ear - out; And When the delayed sensor compensation value does not drop compared to the previous sensor compensation value, or the delayed sensor compensation value drops by less than the percentage threshold compared to the previous sensor compensation value, read and check the next sensor compensation value of the at least one channel.

2. The method according to claim 1, wherein the sensor compensation value is the difference between the real - time value of at least one - channel sensor and a reference value.

3. The method according to claim 1, wherein, The read delay time is set to be greater than the period of reading the sensor compensation value.

4. The method according to claim 1, wherein, The method further comprises querying the sensor status via a processor based on an interrupt received from the sensor, wherein the sensor senses the approach or departure of the earphone from the ear and issues the interrupt.

5. The method according to claim 4, wherein, The method further comprises: If the sensor status is ear - out, it is detected that the sensor is out of the ear; or If the sensor status is ear - in, the interrupt is exited.

6. The method according to any one of claims 1-5, wherein, Apply the method to each of multiple channels of the sensor, wherein when the delayed sensor compensation value read by at least any one of the multiple channels of the sensor drops by more than the percentage threshold compared to the previous sensor compensation value, it is detected that the sensor is out of the ear and the sensor status is reset to ear - out.

7. The method according to claim 1, wherein, The sensor is a proximity sensor.

8. The method according to claim 7, wherein, The sensor is a capacitive proximity sensor.

9. The method according to claim 1, wherein The processor is a Bluetooth system - on - chip.

10. A non - transitory computer - readable medium storing instructions, which when executed by a processor implement the method according to any one of claims 1 - 9.

11. A method for detecting earphone wearing, comprising the following steps: Detect whether the earphone is turned on after wearing or before wearing via a power - on wearing state detection module; When it is detected that the earphone is turned on before wearing, execute the method for enhancing ear - out detection of the earphone according to any one of claims 1 - 9 by a pre - power - on wearing detection module; or When it is detected that the earphone is turned on after wearing, via a post - power - on wearing detection module: Set the sensor status to ear - in; Read and store the pre - compensation sensed value of each channel in the sensor; Receive an interrupt from the sensor; Read and check the interrupt source of the interrupt, wherein: When the interrupt source is a compensation interrupt, detect that the sensor is out of the ear via an ear - out detection sub - module and set the sensor status to ear - out; Or When the interrupt source is not a compensation interrupt, confirm whether the sensor state is ear-in or ear-out via the anti-press / release sub-module.

12. The method according to claim 11, wherein, Detecting whether the earphone is powered on after wearing or before wearing via the power-on wearing state detection module includes: Reading the original sensor data of each channel in the sensor when the earphone is powered on; Comparing the original data with the power-on-after-wearing threshold of each channel, where: When the original data is greater than the power-on-after-wearing threshold, it is detected that the earphone is powered on after wearing; and When the original data is not greater than the power-on-after-wearing threshold, it is detected that the earphone is powered on before wearing.

13. The method according to claim 11, wherein, Confirming whether the sensor state is ear-in or ear-out via the anti-press / release sub-module includes: Reading the current sensed value before compensation of each channel; Comparing the current sensed value before compensation with the sensed value before compensation at power-on, where: For any channel of the sensor, when the difference between the current sensed value before compensation and the sensed value before compensation at power-on is greater than the sensed value before compensation threshold of this channel, confirm that the sensor state is ear-in and exit the interrupt; For all channels of the sensor, when the difference between the current sensed value before compensation and the sensed value before compensation at power-on is not greater than the sensed value before compensation threshold of each channel, detect that the sensor is ear-out via the ear-out detection sub-module and reset the sensor state to ear-out.

14. The method according to claim 11, wherein, Confirming whether the sensor state is ear-in or ear-out via the anti-press / release sub-module includes: When the interrupt source is a near interrupt source or when the interrupt source is a far interrupt source, confirm that the sensor state is ear-in and exit the interrupt; When the interrupt source is not a near interrupt source and not a far interrupt source, detect that the sensor is ear-out via the ear-out detection sub-module and reset the sensor state to ear-out.

15. The method according to claim 14, wherein, When the sensor senses that the earphone housing is pressed and reaches the near threshold, a near interrupt is sent, and the interrupt source is a near interrupt source.

16. The method according to claim 15, wherein, When the sensor senses that the press on the earphone housing is released and reaches the far interrupt threshold, a far interrupt is sent, and the interrupt source is a far interrupt source.

17. The method according to claim 11, wherein, Detecting that the sensor is ear-out via the ear-out detection sub-module and resetting the sensor state to ear-out includes confirming that the compensation interrupt is triggered by a change in the sensor sensed value.

18. The method according to claim 11, wherein the sensor comprises and only comprises one sensor.

19. The method according to claim 11, wherein The sensor is a proximity sensor, wherein the sensor is a capacitive proximity sensor.

20. A non-transitory computer-readable medium storing instructions, which when executed by a processor implement the method according to any one of claims 11-19.

21. An earphone wearing detection device, which comprises one or more processors and is configured to include: A power-on wearing state detection module, which is configured to detect whether the earphone is powered on after wearing or before wearing; A power-on-before-wearing detection module, which is configured to execute the method of enhanced earphone ear-out detection according to any one of claims 1-9 when it is detected that the earphone is powered on before wearing, and The post - wearing power - on wearing detection module, which includes an out - of - ear detection sub - module and an anti - press / release sub - module, is configured to, when it is detected that the earphone is powered on after being worn: Set the sensor status to in - ear; Read and store the sensed values before power - on compensation for each channel in the sensor; Receive an interrupt from the sensor; Read and check the interrupt source of the interrupt; Wherein, the out - of - ear detection sub - module is configured to set the sensor status to out - of - ear when the interrupt source is a compensation interrupt; Wherein, the anti - press / release sub - module is configured to further confirm whether the sensor status is in - ear or out - of - ear when the interrupt source is not a compensation interrupt.

22. The apparatus according to claim 21, wherein, The power - on wearing status detection module is configured to: Read the raw sensor data of each channel in the sensor when the earphone is powered on; Compare the raw data with the post - wearing power - on threshold of each channel, where: When the raw data is greater than the post - wearing power - on threshold, it is detected that the earphone is powered on after being worn; and When the raw data is not greater than the post - wearing power - on threshold, it is detected that the earphone is powered on before being worn.

23. The device according to claim 21, wherein The anti - press / release sub - module is configured to: Read the current sensed value before compensation of each channel; Compare the current sensed value before compensation with the sensed value before power - on compensation, where: For any channel of the sensor, when the difference between the current sensed value before compensation and the sensed value before power - on compensation is greater than the sensed value threshold before compensation of this channel, confirm that the sensor status is in - ear and exit the interrupt; For all channels of the sensor, when the differences between the current sensed values before compensation and the sensed values before power - on compensation are not greater than the sensed value thresholds before compensation of their respective channels, detect that the sensor is out - of - ear via the out - of - ear detection sub - module and reset the sensor status to out - of - ear.

24. The device according to claim 21, wherein, The anti - press / release sub - module is configured to: When the interrupt source is a near interrupt source or a far interrupt source, confirm that the sensor status is in - ear and exit the interrupt; When the interrupt source is neither a near interrupt source nor a far interrupt source, detect that the sensor is out - of - ear via the out - of - ear detection sub - module and reset the sensor status to out - of - ear.

25. The device according to claim 24, wherein, Send a near interrupt when the sensor senses that the earphone housing is pressed and reaches the near threshold, and the interrupt source is a near interrupt.

26. The device according to claim 25, wherein Send a far interrupt when the sensor senses that the pressure on the earphone housing is released and reaches the far - interrupt threshold, and the interrupt source is a far interrupt.

27. The device according to claim 21, wherein The out - of - ear detection sub - module is configured to detect that the sensor is out - of - ear and reset the sensor status to out - of - ear based on confirming that the compensation interrupt is triggered by a change in the sensor sensed value.

28. The apparatus according to claim 21, wherein the sensor includes and only includes one sensor.

29. The device according to claim 27, wherein, The sensor is a proximity sensor, and among them, the sensor is a capacitive proximity sensor.