Earphone audio front-end device, audio processing method and system thereof, and storage medium

CN122802835APending Publication Date: 2026-09-22QUESTYLE AUDIO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611251306.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0004]然而,耳机调音的门槛较高,普通用户难以针对具体耳机型号进行专业调音,且调音结果无法便捷分享和复用

Benefits of technology

[0027]综上所述,本申请实施例提供的应用于耳机音频前端设备的音频处理方法,包括获取调音码,所述调音码包括目标耳机的身份信息、DSP参数、设备适配信息和安全阈值信息;获取当前连接的耳机音频前端设备的硬件能力参数和输出链路类型信息;根据所述硬件能力参数和所述输出链路类型信息,判定所述调音码与所述耳机音频前端设备的适配性;在判定为适配或部分适配时,将所述DSP参数转换为所述耳机音频前端设备可执行的处理参数;基于所述处理参数和所述安全阈值,计算安全预增益值并执行削波风险检测,并将通过所述削波风险检测的所述处理参数写入所述耳机音频前端设备的本地存储模块,以使所述当前耳机音频前端设备利用所述处理参数对输入的音频信号进行处理,并将处理后的音频信号输出至对应的目标耳机。本申请实施例可以将针对目标耳机的调音结果封装为调音码,并根据不同音频前端设备的硬件能力自动完成参数适配转换及安全预增益校验,从而降低耳机调音门槛、实现调音配置的便捷分享与跨设备兼容复用,同时从源头规避削波失真风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802835A_ABST
    Figure CN122802835A_ABST
Patent Text Reader

Abstract

The application discloses an earphone audio front-end device and an audio processing method, system and storage medium thereof. The audio processing method applied to the earphone audio front-end device comprises the following steps: acquiring a tuning code; acquiring hardware capability parameters and output link type information of the currently connected earphone audio front-end device; determining the adaptability of the tuning code to the earphone audio front-end device according to the hardware capability parameters and the output link type information; converting DSP parameters into processing parameters executable by the earphone audio front-end device when the determination result is adaptation or partial adaptation; calculating a safety pre-gain value and performing a clipping risk detection based on the processing parameters and a safety threshold; and writing the processing parameters passing the clipping risk detection into a local storage module of the earphone audio front-end device, so that the current earphone audio front-end device processes input audio signals by using the processing parameters and outputs the processed audio signals to corresponding target earphones.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of audio processing technology, specifically to a headphone audio front-end device and its audio processing method, system, and storage medium. Background Technology

[0002] With smartphones, PCs, tablets, and game consoles becoming the primary audio playback sources, external headphone audio front-end devices are widely used to enhance headphone sound performance. Different headphones exhibit varying sound reproduction capabilities due to significant differences in frequency response, impedance, sensitivity, driver structure, cavity design, and fit. Furthermore, users have personalized sound preferences for the same headphones. Therefore, precise sound configuration and adaptation for specific headphone models has become a crucial technical challenge in the audio consumer market.

[0003] Currently, some decoding headphone amplifiers, Bluetooth headphones manufacturers' apps, or system-level audio settings already support parametric equalizers, digital filters, or preset sound effect adjustments.

[0004] However, headphone tuning has a high barrier to entry, making it difficult for ordinary users to perform professional tuning for specific headphone models, and tuning results cannot be easily shared and reused. Differences in Digital Signal Processing (DSP) capabilities across different devices lead to poor compatibility of the same tuning parameters, and Bluetooth transmitters also face additional constraints such as encoding formats and low-latency modes. Furthermore, user tuning lacks security verification, easily causing clipping distortion and encoder overload; in addition, Bluetooth headphones rely on manufacturer-closed apps, making a consistent tuning experience across devices impossible; finally, sound performance becomes fixed after hardware product release, lacking a sustainable ecosystem of updated tuning content. Summary of the Invention

[0005] This application provides a headphone audio front-end device and its audio processing method, system, and storage medium, which can lower the threshold for headphone tuning.

[0006] In a first aspect, embodiments of this application provide an audio processing method applied to a headphone audio front-end device, including: Obtain the tuning code, which includes the target earphone's identity information, DSP parameters, device adaptation information, and security threshold information; Obtain the hardware capability parameters and output link type information of the currently connected headphone audio front-end device; Based on the hardware capability parameters and the output link type information, determine the compatibility between the tuning code and the headphone audio front-end device; When it is determined that the device is adapted or partially adapted, the DSP parameters are converted into processing parameters that can be executed by the headphone audio front-end device. Based on the processing parameters and the safety threshold, a safety pre-gain value is calculated and clipping risk detection is performed. The processing parameters that pass the clipping risk detection are written into the local storage module of the headphone audio front-end device, so that the current headphone audio front-end device can use the processing parameters to process the input audio signal and output the processed audio signal to the corresponding target headphone.

[0007] In the audio processing method provided in this application embodiment, the carrier of the tuning code is any one or more of the following: QR code, encrypted string sharing code, local configuration file, cloud index link, application in-app sharing link, NFC tag, or web link.

[0008] In the audio processing method provided in the embodiments of this application, the DSP parameters include at least multiple segments of parametric equalizer parameters, and each segment of the parametric equalizer parameters includes a corresponding frequency point, gain value, and Q value.

[0009] In the audio processing method provided in this application embodiment, the step of converting the DSP parameters into processing parameters executable by the headphone audio front-end device includes: Obtain the maximum number of parametric equalizer bands supported by the headphone audio front-end device, and the original number of bands of the parametric equalizer parameters; Compare the maximum parameter equalizer segment number with the original segment number; When the maximum number of equalizer segments is greater than or equal to the original number of segments, the multi-segment equalizer parameters are mapped to processing parameters that can be executed by the headphone audio front-end device. When the maximum number of equalizer segments is less than the original number of segments, the parameters of the multi-segment equalizer are reduced in dimension, and the reduced multi-segment equalizer parameters are mapped to the processing parameters that can be executed by the headphone audio front-end device.

[0010] In the audio processing method provided in this application embodiment, the step of performing dimensionality reduction processing on the multi-band parametric equalizer parameters and mapping the dimensionality-reduced multi-band parametric equalizer parameters to processing parameters executable by the headphone audio front-end device includes: The weight value of each segment of the parametric equalizer parameter is calculated based on the absolute value of the gain value and the Q value. The frequency points corresponding to each parameter equalizer parameter are sorted in descending order of their weight values ​​to determine the core frequency point set and the candidate frequency point set. When the number of segments in the core frequency point set is greater than the number of segments in the maximum parameter equalizer, frequency points with frequencies lower than the first preset frequency threshold or higher than the second preset frequency threshold are removed from the core frequency point set until the number of frequency points in the core frequency point set is equal to the number of segments in the maximum parameter equalizer. When the number of segments in the core frequency point set is less than the number of segments in the maximum parameter equalizer, frequency points are added to the core frequency point set from the candidate frequency point set in descending order of the weight value, until the number of frequency points in the core frequency point set is equal to the number of segments in the maximum parameter equalizer. The parameter equalizer parameters corresponding to each frequency point in the processed core frequency point set are used as target DSP parameters; the target DSP parameters are mapped to the processing parameters that the headphone audio front-end device can execute.

[0011] In the audio processing method provided in this application embodiment, when the output link type is a wired decoding headphone amplifier output link, the step of mapping the target DSP parameters to processing parameters executable by the headphone audio front-end device includes: Obtain the set of target filter types supported by the output link of the wired decoding headphone amplifier; Identify the original filter type contained in the target DSP parameters; If the original filter type does not belong to the target filter type set, the original filter type is converted into the equivalent filter type with the lowest computational complexity in the target filter type set, and the corresponding filter coefficients are recalculated based on the converted filter type. If the target DSP parameters include a dynamic range compression module, and the wired decoding headphone amplifier output link does not support dynamic range compression processing, then the dynamic range compression module is disabled, and a static attenuation compensation flag corresponding to the compression ratio and compensation gain of the dynamic range compression module is generated. The processed target DSP parameters are associated with the static attenuation compensation flag and mapped to the processing parameters executable by the wired decoder amplifier output link.

[0012] In the audio processing method provided in this application embodiment, when the output link type is a Bluetooth audio transmitter output link, the step of mapping the target DSP parameters to processing parameters executable by the headphone audio front-end device includes: Obtain the current operating scenario of the Bluetooth audio transmitter output link, wherein the current operating scenario includes music mode, low-latency game mode, and call mode; When the current working scenario is the low-latency game mode or the call mode, obtain the preset system-level latency threshold value; Iterate through each digital signal processing module in the target DSP parameters and calculate the processing delay value introduced by each digital signal processing module. The digital signal processing module whose processing delay value is greater than the system-level delay threshold is marked as a high-delay module, and the high-delay module is forcibly disabled; Obtain the Bluetooth encoding format of the output link of the Bluetooth audio transmitter, and generate an encoding type tag corresponding to the Bluetooth encoding format; The processed target DSP parameters are associated with the encoding type flag and mapped to preprocessing parameters that can be executed by the Bluetooth audio transmitter output link before Bluetooth encoding.

[0013] In the audio processing method provided in this application embodiment, the step of calculating the safety pre-gain value based on the processing parameters and performing clipping risk detection includes: A clipping risk value is calculated based on the processing parameters, and the clipping risk value is used to characterize the severity of digital signal clipping caused by the processing parameters; Calculate the safety pregain value based on the clipping risk value; Clipping risk detection is performed based on the stated safety pre-gain value.

[0014] In the audio processing method provided in this application embodiment, the step of calculating the clipping risk value based on the processing parameters includes: A frequency response superposition model is established based on the processing parameters; Using the frequency response superposition model, the maximum transient peak level of the input audio signal after processing by the processing parameters is simulated, and the maximum transient peak level is used as the clipping risk value.

[0015] In the audio processing method provided in this application embodiment, the step of calculating the safety pre-gain value based on the clipping risk value includes: Obtain the preset safety target level threshold; Calculate the difference between the maximum transient peak level and the safety target level threshold, and use the difference as the safety pre-gain value.

[0016] In the audio processing method provided in this application embodiment, the step of performing clipping risk detection based on the safety pre-gain value includes: The safety pre-gain value is compared with a preset risk threshold value; When the safety pre-gain value is less than or equal to the risk threshold value, the clipping risk detection is deemed to have passed, and the processing parameters can be written. When the safety pre-gain value is greater than the risk threshold value and less than or equal to the preset interception threshold value, a clipping risk warning signal is generated, and after user confirmation, it is allowed to be written into the processing parameters. When the security pregain value is greater than the interception threshold value, the processing parameters are rejected.

[0017] In the audio processing method provided in this application embodiment, after calculating the safety pre-gain value based on the clipping risk value, it further includes: When the processing parameters carry a static attenuation compensation flag, the compensation gain value corresponding to the static attenuation compensation flag is read, and the safety pre-gain value is superimposed with the compensation gain value to generate a corrected safety pre-gain value. When the processing parameters carry an encoding type flag, the Bluetooth encoding format corresponding to the encoding type flag is read, the preset encoding input level threshold of the Bluetooth encoding format is obtained, the difference between the maximum transient peak level and the encoding input level threshold is calculated, and the larger of the difference and the security pre-gain value is used as the updated security pre-gain value.

[0018] Secondly, embodiments of this application provide a headphone audio front-end device, including: An audio input module is used to receive audio signals from an audio source device; A digital signal processing module is used to perform digital signal processing on the audio signal; A storage module is used to locally store at least one set of processing parameters executable by the headphone audio front-end device; The main control module is connected to the audio input module, the digital signal processing module, and the storage module, respectively; And, at least one set of output modules, said output modules comprising at least one of the following two sets of modules: The digital-to-analog conversion decoding module and the headphone amplification module are used to convert the processed audio signal into an analog signal and drive wired headphones; The Bluetooth encoding module and wireless transmission module are used to encode the processed audio signal into Bluetooth audio format and send it to the Bluetooth headset. The main control module receives processing parameters from an external terminal and stores these parameters in the storage module by binding them to the corresponding headphone model or connection name. The digital signal processing module retrieves the processing parameters from the storage module to process the audio signal. The audio signal processed by the digital signal processing module is then output to a wired or Bluetooth headphone via the output module.

[0019] In the headphone audio front-end device provided in the embodiments of this application, the headphone audio front-end device is any one of a portable decoding headphone amplifier, a USB digital-to-analog converter / headphone amplifier, a desktop decoding headphone amplifier, a Bluetooth audio transmitter, or a USB Bluetooth audio adapter.

[0020] In the headphone audio front-end device provided in this application embodiment, the main control module is further configured to, in response to the trigger signal of the physical control on the device body or the touch screen, read and switch different processing parameters from the storage module when the headphone audio front-end device is disconnected from the external terminal or when there is no network signal, and control the digital signal processing module to call the switched processing parameters to process the audio signal.

[0021] In the headphone audio front-end device provided in this application embodiment, the headphone audio front-end device further includes a pure mode switching module, which is used to control the signal routing switch of the digital signal processing module to bypass all the processing parameters when a user turns on the device, so that the audio signal is transmitted directly to the output module without passing through the multiplication and accumulation unit of the digital signal processing module.

[0022] Thirdly, embodiments of this application provide an audio processing method applied to a Bluetooth audio transmitter, including: Obtain the tuning code, which includes the target earphone's identity information, DSP parameters, device adaptation information, and security threshold information; Identify the currently connected Bluetooth audio transmitter and the paired Bluetooth headset, and read the pre-transmission digital signal processing capability parameters, Bluetooth encoding format, and current operating scenario of the Bluetooth audio transmitter; Based on the pre-transmission digital signal processing capability parameters and the current working Bluetooth encoding format, the DSP parameters are converted into processing parameters that the Bluetooth audio transmitter can execute before Bluetooth encoding; Based on the processing parameters, perform security pre-gain calculation and pre-encoding input level clipping risk detection; The processing parameters detected by clipping risk are written into the local storage module of the Bluetooth audio transmitter so that the Bluetooth audio transmitter receives audio signals from the audio source device, calls the processing parameters in the local storage module to process the audio signals before Bluetooth encoding, and encodes the processed audio signals into the corresponding Bluetooth audio format via the Bluetooth encoding module and transmits them to the Bluetooth headset via the wireless transmission module.

[0023] In the audio processing method provided in this application embodiment, the current working scenario includes music mode, game mode, and call mode; the audio processing method further includes: When the current working scenario is the game mode or the call mode, the digital signal processing module whose processing latency is higher than the system-level latency threshold is marked as a high latency module, and the high latency module is forcibly disabled, while only the digital signal processing module with zero latency or lower than the system-level latency threshold is retained.

[0024] In the audio processing method provided in this application embodiment, the Bluetooth encoding format includes any one of LDAC, aptX, aptX Adaptive, aptX Lossless, LC3, AAC, or SBC; the audio processing method further includes: The compensation coefficient of the security pre-gain value is dynamically adjusted according to different Bluetooth encoding formats, so that the maximum transient peak level input to the Bluetooth encoding module does not exceed the encoding input level threshold corresponding to the Bluetooth encoding format.

[0025] Fourthly, embodiments of this application provide an audio processing system, including: The tuning code generation module is used to obtain the acoustic features and identity information of the target earphone, generate corresponding DSP parameters based on the acoustic features, and encapsulate the DSP parameters, the identity information, the preset device adaptation information and the security threshold information into a tuning code; The tuning code parsing module is used to parse the tuning code to extract the DSP parameters, the identity information, the preset device adaptation information, and the security threshold information. The device capability identification module is used to read the hardware capability parameters and output link type information of the currently connected headphone audio front-end device; The parameter adaptation and conversion module is used to determine the compatibility between the tuning code and the headphone audio front-end device based on the hardware capability parameters and the output link type information; when it is determined to be compatible or partially compatible, it obtains the maximum number of parametric equalizer segments supported by the headphone audio front-end device and the original number of segments of the parametric equalizer parameters; compares the maximum number of parametric equalizer segments with the original number of segments; when the maximum number of parametric equalizer segments is greater than or equal to the original number of segments, it maps the multi-segment parametric equalizer parameters to processing parameters executable by the headphone audio front-end device; when the maximum number of parametric equalizer segments is less than the original number of segments, it calculates the weight value of each segment of the parametric equalizer parameter based on the absolute value of the gain value and the Q value; and sorts the frequency points corresponding to each parametric equalizer parameter in descending order of the weight values. The process involves several steps: first, determining a core frequency set and a candidate frequency set; second, when the number of segments in the core frequency set is greater than the maximum number of segments in the equalizer, removing frequency points from the core frequency set whose frequencies are lower than a first preset frequency threshold or higher than a second preset frequency threshold, until the number of frequency points in the core frequency set equals the maximum number of segments in the equalizer; third, when the number of segments in the core frequency set is less than the maximum number of segments in the equalizer, adding frequency points from the candidate frequency set in descending order of their weight values, until the number of frequency points in the core frequency set equals the maximum number of segments in the equalizer; fourth, using the equalizer parameters corresponding to each frequency point in the processed core frequency set as target DSP parameters; and fifth, mapping the target DSP parameters to processing parameters executable by the headphone audio front-end device. The safety pre-gain verification module is used to calculate the safety pre-gain value and perform clipping risk detection based on the processing parameters and the safety threshold. The parameter writing storage module is used to write the processing parameters that have passed the clipping risk detection into the local storage module of the headphone audio front-end device; An audio processing execution module, wherein the audio processing execution module is at least one of a wired audio processing submodule or a wireless audio processing submodule, wherein: The wired audio processing submodule is used to call the processing parameters in the wired decoding headphone amplifier output link to perform digital signal processing, and then output the signal to the wired headphones after digital-to-analog conversion and amplification. The wireless audio processing submodule is used to call the processing parameters for pre-transmission preprocessing before Bluetooth encoding in the Bluetooth audio transmitter output link, and then send it to the wireless headset after Bluetooth encoding.

[0026] Fifthly, this application provides a storage medium storing a plurality of instructions that are adapted for loading by a processor to execute any of the audio processing methods described above.

[0027] In summary, the audio processing method for a headphone audio front-end device provided in this application includes: acquiring a tuning code, wherein the tuning code includes the target headphone's identity information, DSP parameters, device compatibility information, and security threshold information; acquiring the hardware capability parameters and output link type information of the currently connected headphone audio front-end device; determining the compatibility between the tuning code and the headphone audio front-end device based on the hardware capability parameters and the output link type information; when the device is determined to be compatible or partially compatible, converting the DSP parameters into processing parameters executable by the headphone audio front-end device; calculating a security pre-gain value and performing clipping risk detection based on the processing parameters and the security threshold, and writing the processing parameters that have passed the clipping risk detection into the local storage module of the headphone audio front-end device, so that the current headphone audio front-end device can use the processing parameters to process the input audio signal and output the processed audio signal to the corresponding target headphone. This application embodiment can encapsulate the tuning results for the target headphones into tuning codes, and automatically complete parameter adaptation and conversion and safety pre-gain verification according to the hardware capabilities of different audio front-end devices, thereby reducing the threshold for headphone tuning, realizing convenient sharing and cross-device compatibility and reuse of tuning configurations, and avoiding the risk of clipping distortion from the source. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic flowchart of an audio processing method for a headphone audio front-end device provided in an embodiment of this application.

[0030] Figure 2 This is a schematic diagram of the structure of the headphone audio front-end device provided in the embodiments of this application.

[0031] Figure 3 This is a first structural schematic diagram of the output module provided in the embodiments of this application.

[0032] Figure 4 This is a schematic diagram of the second structure of the output module provided in the embodiments of this application.

[0033] Figure 5 This is a third structural diagram of the output module provided in the embodiments of this application.

[0034] Figure 6 This is a flowchart illustrating an audio processing method applied to a Bluetooth audio transmitter, as provided in an embodiment of this application.

[0035] Figure 7 This is a schematic diagram of the audio processing system provided in the embodiments of this application. Detailed Implementation

[0036] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0037] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0038] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0039] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0040] In the description of this application, it should be noted that the terms "upper," "lower," "left," "right," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. In addition, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0041] Currently, some decoding headphone amplifiers, Bluetooth headphones manufacturers' apps, or system-level audio settings already support parametric equalizers, digital filters, or preset sound effect adjustments.

[0042] However, headphone tuning has a high barrier to entry, making it difficult for ordinary users to perform professional tuning for specific headphone models, and tuning results cannot be easily shared and reused. Furthermore, differences in DSP capabilities across different devices lead to poor compatibility of the same tuning parameters, and Bluetooth transmitters face additional constraints such as encoding formats and low-latency modes. Additionally, user tuning lacks security verification, easily causing clipping distortion and encoder overload; furthermore, Bluetooth headphones rely on manufacturer-closed apps, making a consistent tuning experience across devices impossible; finally, sound performance becomes fixed after hardware product release, lacking a sustainable ecosystem of updated tuning content.

[0043] Based on this, embodiments of this application provide a headphone audio front-end device and its audio processing method, system, and storage medium. Specifically, the system can be integrated into the headphone audio front-end device, which refers to a device located before the headphones or earbuds in the working link, used to provide audio signals to the headphones or earbuds, including but not limited to portable decoding headphone amplifiers, USB digital-to-analog converters / headphone amplifiers (commonly known as "tailors"), desktop decoding headphone amplifiers, Bluetooth audio transmitters, and USB Bluetooth audio adapters. In this application, the term "headphone" broadly refers to wired headphones, wired earbuds, Bluetooth headphones, and Bluetooth earbuds.

[0044] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0045] (1) Tuning code: A data structure that carries sound configuration information for a specific target headphone or earphone, including at least the target headphone's identity information, DSP parameters, device compatibility information, and security threshold information. This tuning code can be carried in carriers such as QR codes, encrypted string sharing codes, local configuration files, cloud index links, application-internal sharing links, near-field communication tags, or web links.

[0046] (2) DSP parameters: These are the set of raw parameters encapsulated in the tuning code for digital signal processing of the audio signal. They can include at least the parameters of a multi-band parametric equalizer (PEQ), each of which includes the corresponding frequency point, gain value, and Q value. The DSP parameters can also include filter parameters, dynamic range compression parameters, low volume compensation parameters, and independent adjustment parameters for the left and right channels.

[0047] (3) Processing parameters: refers to the set of digital signal processing parameters generated after the DSP parameters have been adapted and converted, which can be directly called and executed by the headphone audio front-end device. Logically, the processing parameters and the DSP parameters form a relationship of "raw input" and "converted output".

[0048] (4) The identity information of the target earphone includes: the brand, full model, type (such as in-ear, over-ear, planar magnetic, dynamic, hybrid, Bluetooth earphones, etc.), impedance, sensitivity and other information of the target earphone.

[0049] (5) Device compatibility information includes: a list of audio front-end device models that are allowed to load the tuning code, the minimum firmware version number, the DSP algorithm version, the minimum performance threshold of the device, etc.

[0050] (6) Security threshold information includes: security pre-gain value, maximum output gain limit, clipping risk level, upper and lower boundaries of parameters, check code, anti-tampering digital signature, dangerous parameter interception rules, etc.

[0051] The technical solutions shown in this application will be described in detail below through specific embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the priority of the embodiments. In the following embodiments, the headphone audio front-end device is simply referred to as a device or the current device.

[0052] Please see Figure 1 , Figure 1 This is a flowchart illustrating an audio processing method applied to a headphone audio front-end device according to an embodiment of this application. This audio processing method can be executed by a mobile application, tablet application, desktop software, web-based tuning tool, or firmware management tool in conjunction with the headphone audio front-end device. The specific flow of this audio processing method is as follows: 101. Obtain the tuning code, which includes the target headphone's identity information, DSP parameters, device compatibility information, and security threshold information.

[0053] The tuning code is a standardized data structure that includes at least the following fields: target headphone identification information (such as headphone brand, full model, type identifier, etc.), DSP parameters (such as the frequency points, gain values, and Q value arrays of the multi-band parametric equalizer, etc.), device compatibility information (such as a list of audio front-end device models allowed to load the tuning code and the minimum firmware version number, etc.), and security threshold information (such as security pre-gain values, checksums, and tamper-proof digital signatures, etc.). The tuning code data structure may also include basic information fields (such as a unique tuning code identifier, version number, creator identifier, etc.) and headphone-specific information fields (such as the target headphone brand, model, and type identifier, etc.).

[0054] The tuning code can be carried by one or more of the following: a QR code, an encrypted string sharing code, a local configuration file, a cloud index link, an in-application sharing link, a near-field communication (NFC) tag, or a webpage link. In practice, users can obtain the tuning code in various ways. For example, users can use a mobile application to scan a QR code printed on product packaging, instructions, or a webpage to obtain the tuning code; users can also receive and input encrypted string sharing codes shared by other users; users can also obtain the tuning code by clicking on in-application sharing links or webpage links; or users can obtain the tuning code by sensing a near-field communication (NFC) tag; users can also obtain the tuning code by importing a local configuration file.

[0055] In this embodiment, by encapsulating the sound configuration for the target headphones into a tuning code, the tuning result no longer relies on inefficient methods such as screenshots, text parameters, or manual input in forums for dissemination. Instead, it can be easily shared like a QR code or link, significantly reducing the cost of disseminating the tuning configuration and the error rate of importing it. Simultaneously, the device compatibility information and security threshold information built into the tuning code allow the receiving device to pre-determine whether the tuning code is suitable for itself, avoiding compatibility issues caused by blind importing.

[0056] 102. Obtain the hardware capability parameters and output link type information of the currently connected headphone audio front-end device.

[0057] In some embodiments, after obtaining the tuning code, the mobile application or device main control module can read the hardware capability parameters and output link type information of the currently connected headphone audio front-end device through wired communication (such as USB communication) or wireless communication (such as Bluetooth communication).

[0058] The hardware capability parameters may include the maximum number of parametric equalizer bands supported by the headphone audio front-end device, the set of compatible filter types, whether dynamic range compression is supported, the supported sampling rate range, digital signal processing accuracy, available storage space size, maximum output gain limit, current firmware version number, current DSP algorithm version number, and local configuration storage capacity, etc.

[0059] The output link type information indicates the current output method used by the headphone audio front-end device to drive the headphones. In some embodiments, the output link type information may include a wired decoding headphone amplifier output link and a Bluetooth audio transmitter output link. When the output link type is a wired decoding headphone amplifier output link, it means that the device drives the wired headphones through a digital-to-analog converter decoding module and a headphone amplifier module; when the output link type is a Bluetooth audio transmitter output link, it means that the device sends audio signals to the Bluetooth headphones through a Bluetooth encoding module and a wireless transmission module.

[0060] It should be noted that when the headphone audio front-end device is a Bluetooth audio transmitter, it can further read information such as the Bluetooth System-on-Chip (SoC) model, the list of currently supported Bluetooth encoding formats, the Bluetooth encoding format currently in use, the current working scenario (such as music mode, low-latency game mode, or call mode), the digital signal processing capability parameters before transmission, the current digital margin before transmission, and the connection status of the Bluetooth headphones.

[0061] Understandably, by reading this hardware capability parameter, the upper limit of the device's processing capability can be accurately determined, providing a basis for decision-making in subsequent parameter adaptation and conversion, thereby avoiding writing parameters that exceed the device's processing capability into the device, which could lead to execution failure or abnormal sound.

[0062] 103. Determine the compatibility between the tuning code and the headphone audio front-end device based on the hardware capability parameters and output link type information.

[0063] In some embodiments, the device compatibility information in the tuning code can be compared with the hardware capability parameters of the current device to determine whether the tuning code is compatible with the current headphone audio front-end device.

[0064] Specifically, you can first read the device compatibility information in the tuning code, and then compare the current device model, current firmware version number, DSP algorithm version and other information with the corresponding fields in the device compatibility information one by one.

[0065] If the current device model is in the list of allowed device models, the current firmware version is not lower than the minimum firmware version, the current DSP algorithm version meets the requirements, and all hardware capability parameters of the current device are not lower than the minimum performance threshold of the device, then it is determined to be fully compatible.

[0066] If the current device model is not in the list of allowed device models, but all hardware capability parameters meet or exceed the device's minimum performance threshold, it is considered partially compatible (i.e., the device has the hardware capability to execute the tuning code, but has not been officially verified for compatibility). If the current device's hardware capability parameters (such as the maximum number of bands supported by the parametric equalizer) are lower than the device's minimum performance threshold, or if the current firmware version is lower than the minimum firmware version, it is considered incompatible.

[0067] For example, the device compatibility information for a certain tuning code requires that the maximum supported parametric equalizer bands be no less than 10 and the firmware version be no less than V2.1.0. If the current headphone audio front-end device supports 12 parametric equalizer bands and the firmware version is V2.2.0, it is considered fully compatible; if the current device only supports 5 parametric equalizer bands but the firmware version meets the requirements, it is considered partially compatible (insufficient device computing power); if the current device's firmware version is only V1.8.0, it is considered incompatible, the import is rejected, and the user is prompted to upgrade the firmware.

[0068] In this embodiment of the application, by determining compatibility, it is possible to pre-determine whether the tuning code is compatible with the current device before writing the parameters, thereby avoiding device execution failure or sound abnormalities caused by blind import, and improving user experience and device security.

[0069] 104. When the device is determined to be compatible or partially compatible, the DSP parameters are converted into processing parameters that can be executed by the headphone audio front-end device.

[0070] In the specific implementation process, when it is determined to be fully compatible, the DSP parameters can be mapped to the processing parameters that the current device can execute without loss; when it is determined to be partially compatible, the DSP parameters can be reduced in dimensionality before being mapped to the processing parameters; when it is determined to be incompatible, the import can be refused or the user can be prompted to upgrade the firmware.

[0071] It should be noted that the various adaptation processes in the above parameter adaptation and conversion process are not independent parallel operations, but rather a serial processing flow executed step by step according to a preset priority order. Specifically, the parametric equalizer band number adaptation can be performed first. This adaptation is the most basic level and must be performed regardless of whether the output link type is a wired decoder / headphone amplifier output link or a Bluetooth audio transmitter output link. After completing the parametric equalizer band number adaptation, subsequent adaptation processes can be executed based on the output link type information. That is, when the output link type is a wired decoder / headphone amplifier output link, the system continues to perform filter type adaptation and dynamic range compression module adaptation; when the output link type is a Bluetooth audio transmitter output link, filter type adaptation is skipped (because there is no digital-to-analog converter decoding module and headphone amplification module in the Bluetooth transmitter link, no filter type conversion is required), and Bluetooth transmitter-specific adaptation is performed instead. The above adaptation processes have a strict execution order and conditional triggering relationship. Each subsequent adaptation process is executed after the previous adaptation process is completed, and its own processing strategy is adjusted according to the result of the previous adaptation process.

[0072] The specific implementation methods of this step will be described in detail below from several aspects, including parametric equalizer segment adaptation, filter type adaptation, dynamic range compression module adaptation, and Bluetooth transmitter-specific adaptation.

[0073] (a) Parametric equalizer band adaptation: After performing the above parameter equalizer band adaptation, when the output link type is a wired decoder headphone amplifier output link, filter type adaptation can be further performed.

[0074] Specifically, DSP parameters can include at least multiple parametric equalizer parameters, each of which includes the corresponding frequency point, gain value, and Q value (quality factor).

[0075] In practice, the step of "converting DSP parameters into processing parameters executable by the headphone audio front-end device" may include the following steps: First, obtain the maximum number of parametric equalizer bands supported by the headphone audio front-end device, and the original number of bands in the parametric equalizer parameters in the DSP parameters. Then, compare the maximum number of parametric equalizer bands with the original number of bands.

[0076] When the maximum number of parametric equalizer bands is greater than or equal to the original number of bands, it means that the current device's parametric equalizer processing capability is sufficient to fully execute all parametric equalizer parameters in the tuning code. Multi-band parametric equalizer parameters can be directly mapped to processing parameters that can be executed by the headphone audio front-end device. The frequency point, gain value, and Q value of each parametric equalizer parameter remain unchanged.

[0077] When the maximum number of parametric equalizer segments is less than the original number of segments, it means that the current device's parametric equalizer processing capability is insufficient to fully execute all parametric equalizer parameters in the tuning code. Therefore, it is necessary to perform dimensionality reduction processing on the multi-segment parametric equalizer parameters and map the dimensionality-reduced multi-segment parametric equalizer parameters to processing parameters that can be executed by the headphone audio front-end device.

[0078] The step "reducing the dimensionality of the multi-band parametric equalizer parameters and mapping the reduced parameters to processing parameters executable by the headphone audio front-end device" can be specifically described as follows: First, the weight values ​​of each segment of the parametric equalizer parameters can be calculated based on the absolute value of the gain and the Q value.

[0079] The weight value can be calculated as follows: Weight value = Absolute value of gain × Q value. A larger absolute value of gain indicates a greater contribution of that section of the equalizer parameters to the overall volume; a larger Q value indicates a narrower range of influence and more concentrated correction of specific frequencies. The weight value, obtained by multiplying the two, comprehensively reflects the importance of that section of the equalizer parameters to the overall listening experience.

[0080] Then, the frequency points corresponding to each equalizer parameter are sorted in descending order of weight value to determine the core frequency point set and the candidate frequency point set.

[0081] Specifically, the top-ranked frequency points after sorting can be assigned to the core frequency point set, and the remaining frequency points can be assigned to the candidate frequency point set. The number of frequency points in the core frequency point set can be preset to half the original number of bands, or it can be set according to actual needs.

[0082] When the number of frequency points in the core frequency point set is greater than the maximum number of equalizer segments, frequency points with frequencies lower than the first preset frequency threshold or higher than the second preset frequency threshold can be removed from the core frequency point set until the number of frequency points in the core frequency point set is equal to the maximum number of equalizer segments.

[0083] In this embodiment, the first preset frequency threshold can be 20 Hz, and the second preset frequency threshold can be 18000 Hz. The human ear has low sensitivity to extremely low frequencies (below 20 Hz) and extremely high frequencies (above 18 kHz), so the parametric equalizer parameters that eliminate these frequency points have the least impact on the listening experience.

[0084] When the number of frequency points in the core frequency point set is less than the maximum number of equalizer segments, frequency points are added to the core frequency point set in descending order of weight value from the candidate frequency point set until the number of frequency points in the core frequency point set equals the maximum number of equalizer segments.

[0085] Finally, the parameter equalizer parameters corresponding to each frequency point in the processed core frequency point set are used as target DSP parameters, and the target DSP parameters are mapped to processing parameters that can be executed by the headphone audio front-end device.

[0086] Through the above-mentioned dimensionality reduction processing, even if the maximum number of equalizer bands of the headphone audio front-end device is limited, the system can automatically retain the core equalizer parameters that have the greatest impact on the listening experience, while removing or supplementing secondary equalizer parameters. This makes the final processed parameters as close as possible to the original tuning effect under limited computing power, achieving effective downgrading and adaptation of high-end tuning parameters on low-end devices.

[0087] It should be noted that parameter equalizer segment adaptation is a prerequisite for all subsequent adaptation processing. Regardless of the output link type, parameter equalizer segment adaptation must be completed first to ensure that the parameter equalizer portion of the target DSP parameters has been converted into processing parameters that are executable under the current device's maximum parameter equalizer segment constraint before proceeding with subsequent specific adaptation processing for different output link types.

[0088] (ii) Filter type adaptation: After performing parametric equalizer band number adaptation, when the output link type is a wired DAC / headphone amplifier output link, filter type adaptation and dynamic range compression module adaptation can be performed. Filter type adaptation and dynamic range compression module adaptation are supplementary adaptation processes based on the completed parametric equalizer band number adaptation, used to resolve potential filter type incompatibility and dynamic range compression module missing issues in wired DAC / headphone amplifier output links.

[0089] When the output link type is a wired decoding headphone amplifier output link, the step "mapping the target DSP parameters to the processing parameters executable by the headphone audio front-end device" may include the following steps: Specifically, the first step is to obtain the set of target filter types supported by the wired decoding headphone amplifier output link.

[0090] Understandably, different headphone audio front-end devices may support different types of digital filters. For example, some devices only support Infinite Impulse Response (IIR) filters, while others support both IIR and Finite Impulse Response (FIR) filters.

[0091] Then, the original filter type contained in the target DSP parameters is identified. If the original filter type does not belong to the target filter type set, the original filter type is converted into the equivalent filter type with the lowest computational complexity in the target filter type set, and the corresponding filter coefficients are recalculated based on the converted filter type.

[0092] For example, if the target DSP parameters include an FIR filter type, but the current wired decoder amplifier output link only supports IIR filters, the FIR filter is converted to an IIR filter, and the filter coefficients of the IIR filter are recalculated so that the converted IIR filter approximates the original FIR filter in terms of frequency response characteristics. Since the computational complexity of IIR filters is generally lower than that of FIR filters, selecting the equivalent filter type with the lowest computational complexity from the target filter type set for conversion can reduce the computational burden on the device while ensuring basic sound quality.

[0093] Furthermore, if the target DSP parameters include a Dynamic Range Compression (DRC) module, but the wired decoder amplifier output link does not support DRC processing, the DRC module can be disabled, and a static attenuation compensation flag corresponding to the compression ratio and compensation gain of the DRC module can be generated. This static attenuation compensation flag is used to make corresponding compensation adjustments to the pre-gain value during subsequent safe pre-gain calculations.

[0094] Finally, the processed target DSP parameters are associated with the static attenuation compensation flag and mapped to the processing parameters that can be executed by the wired decoder amplifier output link.

[0095] (III) Bluetooth transmitter-specific adaptation: After performing parametric equalizer band number adaptation, when the output link type is a Bluetooth audio transmitter output link, filter type adaptation can be skipped (because there is no digital-to-analog converter decoding module and headphone amplifier module in the Bluetooth transmitter link, no filter type conversion is needed), and Bluetooth transmitter-specific adaptation can be performed instead. Bluetooth transmitter-specific adaptation is a supplementary adaptation process for Bluetooth transmitter-specific scenarios, based on the processing results of the parametric equalizer band number adaptation, and is used to solve the parameter adaptation problem of Bluetooth transmitter under different working scenarios and different Bluetooth encoding formats.

[0096] When the output link type is a Bluetooth audio transmitter output link, the step "Mapping the target DSP parameters to the processing parameters executable by the headphone audio front-end device" may include the following steps: First, the current operating mode of the Bluetooth audio transmitter output link can be obtained, which may include music mode, low-latency game mode, and call mode.

[0097] When the current working scenario is a low-latency gaming mode or call mode, a preset system-level latency threshold (e.g., 10 milliseconds) can be obtained. Then, each digital signal processing module in the target DSP parameters is traversed, and the processing latency introduced by each digital signal processing module is calculated. Digital signal processing modules with processing latency values ​​greater than the system-level latency threshold are marked as high-latency modules and forcibly disabled. Only digital signal processing modules with processing latency values ​​less than or equal to the system-level latency threshold are retained.

[0098] For example, certain complex dynamic range compression modules or long-tap FIR filters may introduce processing delays of several milliseconds or even tens of milliseconds. In music playback scenarios, these delays have little impact on user experience, but in gaming or call scenarios, audio-visual asynchrony or voice echo will severely affect the user experience. By automatically disabling high-latency modules when the working scenario is low-latency game mode or call mode, it is possible to ensure that the end-to-end audio latency of the Bluetooth audio transmitter meets the requirements of gaming and call scenarios while maintaining basic frequency response correction and pre-gain functions.

[0099] Furthermore, the Bluetooth encoding format of the Bluetooth audio transmitter output link can be obtained, and an encoding type tag corresponding to the Bluetooth encoding format can be generated. The processed target DSP parameters are associated with the encoding type tag and mapped to the preprocessing parameters that can be executed by the Bluetooth audio transmitter output link before Bluetooth encoding. This encoding type tag is used for differentiated adjustment based on the input level tolerance of different Bluetooth encoding formats during subsequent security pregain calculations.

[0100] Through the aforementioned Bluetooth transmitter-specific adaptation processing, the tuning code can not only be loaded and executed normally on wired decoding headphone amplifiers, but also automatically adjust the executable processing parameters on Bluetooth audio transmitters according to the current working scenario and Bluetooth encoding format, thus achieving effective adaptation of the tuning code in Bluetooth transmitter scenarios.

[0101] To more clearly illustrate the sequential execution relationship and combination method among the above adaptation processes, the following is an application scenario.

[0102] Suppose a tuning code contains 10-band parametric equalizer parameters, a dynamic range compression module, and a long-tap FIR filter. The currently connected headphone audio source is a Bluetooth audio transmitter that supports a maximum of 6 bands for the parametric equalizer, does not support dynamic range compression, and is currently operating in low-latency gaming mode with a system-level latency threshold of 10 milliseconds. The dynamic range compression module has a processing latency of 8 milliseconds, and the long-tap FIR filter has a processing latency of 15 milliseconds.

[0103] First, the number of equalizer segments can be adapted. Since the maximum number of equalizer segments (6 segments) is less than the original number of segments (10 segments), the weight values ​​of the equalizer parameters for each segment can be calculated according to the dimensionality reduction process. The equalizer parameters corresponding to the 6 core frequency points with the highest weights are retained, and the remaining 4 frequency points with lower weights are removed to generate the dimensionality-reduced equalizer parameters. At this point, the equalizer part of the processed parameters has been reduced from 10 segments to 6 segments.

[0104] After completing the parametric equalizer band adaptation, the current output link type is identified as a Bluetooth audio transmitter output link. Therefore, filter type adaptation is skipped, and Bluetooth transmitter-specific adaptation is performed instead. The system is currently operating in low-latency game mode, with a system-level latency threshold of 10 milliseconds. The processing latency of each digital signal processing module in the DSP parameters is calculated to be 8 milliseconds (less than 10 milliseconds, so it is retained), and the processing latency of the long-tap FIR filter is 15 milliseconds (greater than 10 milliseconds, so it is marked as a high-latency module and forcibly disabled). Simultaneously, the current Bluetooth encoding format is obtained, and the corresponding encoding type label is generated.

[0105] After the above serial adaptation process, the final generated processing parameters include: the dimensionality-reduced 6-segment parametric equalizer parameters, the retained dynamic range compression module, the bypass flag corresponding to the disabled long-tap FIR filter, and the Bluetooth encoding type flag. These processing parameters then proceed to step 105 for security pre-gain calculation and clipping risk detection.

[0106] As can be seen from the above combined embodiments, parametric equalizer band adaptation is executed first as the base layer and must be completed regardless of the output link type; Bluetooth transmitter-specific adaptation is executed as the scene layer after the base layer is completed and is only triggered when the output link type is a Bluetooth audio transmitter. The various adaptation processes are executed in a serial order of "basic adaptation → link-specific adaptation" to jointly complete the complete conversion of DSP parameters into device-executable processing parameters.

[0107] It should be noted that although the above-mentioned parameter equalizer segment adaptation, filter type adaptation and Bluetooth transmitter-specific adaptation are presented in the form of a complete process executed serially in this embodiment, each of the three can also be implemented independently to solve the technical problems in their respective scenarios.

[0108] Among them, the parametric equalizer band number adaptation can be independently implemented on any type of headphone audio front-end device. Its core lies in the dimensionality reduction processing of multi-band parametric equalizer parameters in DSP parameters according to the maximum number of parametric equalizer bands supported by the device, so as to solve the technical problem that the tuning parameters cannot be fully executed when the device's parametric equalizer computing power is insufficient.

[0109] Filter type adaptation can be implemented independently in the wired decoder headphone amplifier output link. Its core lies in converting the original filter type in the DSP parameters according to the set of filter types supported by the device, so as to solve the technical problem that the DSP parameters cannot be executed due to filter type incompatibility.

[0110] The Bluetooth transmitter-specific adapter can be implemented independently on the Bluetooth audio transmitter output link. Its core is to disable the high-latency module in the DSP parameters and make differentiated adjustments to the safety pre-gain value according to the current working scenario and Bluetooth encoding format. This solves the technical problems of audio and video desynchronization caused by excessive latency introduced by the digital signal processing module in low-latency scenarios and overload before encoding caused by differences in input level tolerance of different Bluetooth encoding formats.

[0111] The above three adaptation methods address the technical problem of incompatible execution of headphone tuning parameters on different audio front-end devices from three different dimensions: insufficient computing power of the parametric equalizer, incompatible filter types, and Bluetooth transmitter scenario adaptation. Each of them constitutes a complete technical solution and can be selected individually or used in any combination according to the needs of the actual application scenario.

[0112] 105. Based on the processing parameters and safety threshold, calculate the safety pre-gain value and perform clipping risk detection. Write the processing parameters that pass the clipping risk detection into the local storage module of the headphone audio front-end device, so that the current headphone audio front-end device can process the input audio signal using the processing parameters and output the processed audio signal to the corresponding target headphone.

[0113] Specifically, before writing the processing parameters into the headphone audio front-end device, a safe pre-gain value can be calculated based on the processing parameters and safety threshold information, and clipping risk detection can be performed to prevent problems such as digital signal clipping, distortion, popping, or encoder overload caused by user tuning.

[0114] The steps for safety pre-gain calculation and clipping risk detection can be as follows: First, a clipping risk value can be calculated based on the processing parameters. This clipping risk value is used to characterize the severity of digital signal clipping caused by the processing parameters.

[0115] Specifically, a frequency response superposition model can be established based on the processing parameters. This model involves superimposing the frequency responses of various digital signal processing modules, such as equalizers and filters, within the processing parameters to obtain the comprehensive frequency response of the entire digital signal processing chain. Then, using this model, the maximum transient peak level of the input audio signal (e.g., a 0 dBFS full-scale sweep signal) after processing by the parameters is simulated, and this maximum transient peak level is used as the clipping risk value.

[0116] For example, if the processing parameters include multiple parametric equalizer parameters, the sum of the gain values ​​of each parametric equalizer parameter at certain frequency points may cause a high peak value in the overall frequency response near a certain frequency point. By using a frequency response superposition model, the maximum transient peak level corresponding to this peak value can be accurately calculated, thereby quantifying the clipping risk.

[0117] Then, the safety pre-gain value is calculated based on the clipping risk value. Specifically, a preset safety target level threshold (e.g., -0.5 dB full scale (-0.5 dBFS)) can be obtained, and the difference between the maximum transient peak level and the safety target level threshold can be calculated. This difference is used as the safety pre-gain value.

[0118] For example, if the maximum transient peak level is +2dBFS (i.e., 2dB beyond the full scale) and the safe target level threshold is -0.5dBFS, then the safe pre-gain value is 2.5dB (i.e., a -2.5dB global attenuator needs to be inserted at the beginning of the digital signal processing link to pull the output level down to below -0.5dBFS).

[0119] It should be noted that when the safety pregain value is positive, it indicates the amount of attenuation required. In a practical implementation, a global attenuator can be inserted at the beginning of the digital signal processing link, with the attenuation amount being the safety pregain value.

[0120] After calculating the safety pregain value based on the clipping risk value, the following supplementary processing can be performed: When the processing parameters include a static attenuation compensation flag, the compensation gain value corresponding to the static attenuation compensation flag can be read. The safety pre-gain value is then superimposed on the compensation gain value to generate a corrected safety pre-gain value. This is because when the dynamic range compression module is disabled, the level control function originally provided by the compression ratio and compensation gain provided by that module is lost, requiring equivalent compensation by adjusting the safety pre-gain value.

[0121] When the processing parameters carry an encoding type flag, the Bluetooth encoding format corresponding to the encoding type flag can be read, the preset encoding input level threshold of the Bluetooth encoding format can be obtained, the difference between the maximum transient peak level and the encoding input level threshold can be calculated, and the larger of the difference and the safety pre-gain value can be used as the updated safety pre-gain value.

[0122] Different Bluetooth encoding formats have different tolerances for input levels. For example, SBC encoding is prone to clipping distortion at 0dBFS, while LDAC encoding is more sensitive to high-frequency overload. By dynamically adjusting the safety pregain value according to the Bluetooth encoding format, it can be ensured that the peak level of the digital signal input to the Bluetooth encoding module does not exceed the encoding input level threshold corresponding to that encoding format, thus avoiding clipping before encoding or encoder overload.

[0123] Then, clipping risk detection is performed based on the safety pre-gain value. Specifically, the safety pre-gain value can be compared with a preset risk threshold value. When the safety pre-gain value is less than or equal to the risk threshold value, the clipping risk detection is considered passed, and writing processing parameters is allowed. When the safety pre-gain value is greater than the risk threshold value but less than or equal to a preset interception threshold value, a clipping risk warning signal is generated, and writing processing parameters is allowed after user confirmation. When the safety pre-gain value is greater than the interception threshold value, writing processing parameters is rejected.

[0124] For example, the risk threshold can be set to 3 dB, and the interception threshold can be set to 6 dB. If the safety pre-gain value is 2 dB (less than 3 dB), the clipping risk is low, and writing can be allowed after automatically inserting a -2 dB global attenuator at the beginning of the digital signal processing link; if the safety pre-gain value is 4 dB (greater than 3 dB but less than 6 dB), the clipping risk is medium, and a clipping risk warning signal can be generated and a pop-up window can be displayed on the application interface to remind the user to confirm, after which writing can be allowed; if the safety pre-gain value is 7 dB (greater than 6 dB), the clipping risk is extremely high, and writing to processing parameters can be directly rejected and a risk warning can be generated.

[0125] Through the aforementioned safety pre-gain calculation and clipping risk detection mechanism, problems such as digital signal clipping, distortion, popping, and Bluetooth pre-encoding overload caused by user tuning can be predicted and avoided from the source before parameters are written to the device, greatly improving the safety of tuning operations.

[0126] After the processing parameters for clipping risk detection are written into the local storage module of the headphone audio front-end device, the current headphone audio front-end device can use these parameters to perform digital signal processing on the input audio signal and output the processed audio signal to the corresponding target headphones. Specifically, for wired decoding amplifiers, the audio signal passes through the digital signal processing module, the digital-to-analog converter decoding module, and the headphone amplification module in sequence before being output to the wired headphones; for Bluetooth audio transmitters, the audio signal undergoes pre-processing by the digital signal processing module before being encoded by the Bluetooth encoding module and transmitted to the Bluetooth headphones via the wireless transmission module.

[0127] Furthermore, the local storage module of the headphone audio front-end device can store multiple sets of different processing parameters, each bound to a corresponding headphone model or connection name. Users can switch between different processing parameters via an application or physical controls on the device. Even when the headphone audio front-end device is disconnected from an external terminal or has no network signal, users can still trigger the switching of processing parameters via physical buttons, knobs, screen touch controls, or indicator lights. The main control module responds to this trigger signal, reads and switches different processing parameters from the storage module, and controls the digital signal processing module to use the switched parameters to process the audio signal. This eliminates the need for users to reconnect to the application or download an internet connection when switching between different headphones, greatly improving ease of use.

[0128] In some embodiments, the headphone audio front-end device may further include a clean mode switching module, which, upon receiving a user activation command, controls the signal routing switch of the digital signal processing module to bypass all processing parameters, allowing the audio signal to be transmitted directly to the output module without passing through the multiplication and accumulation unit of the digital signal processing module. When clean mode (or DSP bypass mode) is enabled, the audio signal undergoes no digital equalization processing and directly enters the digital-to-analog converter decoding module and the headphone amplification module (wired output) or Bluetooth encoding module (wireless output), satisfying the monitoring needs of some users for uncolored, original sound. Users can freely switch between the tuning mode and clean mode.

[0129] Please see Figure 2 This application provides a headphone audio front-end device for implementing the above-described audio processing method applied to a headphone audio front-end device. The headphone audio front-end device may include an audio input module 201, a digital signal processing module 202, a storage module 203, a main control module 204, and at least one set of output modules 205.

[0130] The audio input module 201 is used to receive audio signals from an audio source device. This audio source device can be a smartphone, personal computer, tablet, game console, or portable player, etc. The audio input module may include a USB audio input interface (such as a USB-C interface or Lightning interface), a Bluetooth audio input interface, or other digital audio input interfaces.

[0131] The digital signal processing module 202 is used to perform digital signal processing on the audio signal. The digital signal processing module 202 can be integrated into a USB control chip, Bluetooth system-on-a-chip, digital-to-analog converter chip, microcontroller, or a standalone digital signal processing chip. Based on the processing parameters retrieved from the storage module, the digital signal processing module 202 can perform digital signal processing operations such as frequency response correction, dynamic protection, and pre-gain adjustment on the audio signal received by the audio input module.

[0132] Storage module 203 is used to locally store at least one set of processing parameters executable by the headphone audio front-end device, and each set of processing parameters is bound to a corresponding headphone model or headphone connection name. Storage module 203 can be flash memory, electrically erasable programmable read-only memory (EEPROM), or other non-volatile storage media. The processing parameters stored in storage module 203 are the processing parameters written after the aforementioned adaptation, conversion, and security verification.

[0133] The main control module 204 is connected to the audio input module 201, the digital signal processing module 202, and the storage module 203. The main control module 204 is used to receive processing parameters sent by external terminals (such as mobile applications, desktop software, etc.) and store the processing parameters in the storage module 203 by binding them to the corresponding headphone model or connection name.

[0134] In some embodiments, the main control module 204 is also used to read and switch different processing parameters from the storage module 203 in response to the trigger signal of the physical control on the device or the touch screen when the device is disconnected from the external terminal or there is no network signal, and to control the digital signal processing module 202 to call the switched processing parameters to process the audio signal.

[0135] like Figure 3 , Figure 4 and Figure 5 As shown, the output module 205 may include at least one of the following two groups of modules: The digital-to-analog converter (DAC) 2051 and headphone amplifier 2052 are used to convert the processed audio signal into an analog signal and drive wired headphones. The DAC 2051 converts the audio signal processed by the digital signal processing module 202 into an analog audio signal. The headphone amplifier amplifies the analog audio signal and outputs it to the wired headphones through a headphone jack (such as a 3.5mm or 4.4mm balanced jack). The headphone amplifier 2052 can employ a current-mode headphone amplifier architecture or other headphone amplifier architectures.

[0136] The Bluetooth encoding module 2053 and the wireless transmission module 2054 are used to encode the processed audio signal into a Bluetooth audio format and send it to the Bluetooth headset. The Bluetooth encoding module 2053 encodes the audio signal processed by the digital signal processing module 202 into a specified Bluetooth audio format (such as LDAC, aptX, aptX Adaptive, aptX Lossless, LC3, AAC, or SBC, etc.), and the wireless transmission module 2054 transmits the encoded audio signal to the Bluetooth headset through the Bluetooth antenna.

[0137] In this embodiment, the headphone audio front-end device can be any one of a portable decoding headphone amplifier, a USB digital-to-analog converter / headphone amplifier (commonly known as a "tail"), a desktop decoding headphone amplifier, a Bluetooth audio transmitter, or a USB Bluetooth audio adapter.

[0138] When the headphone audio front-end device is a portable decoding headphone amplifier, a USB digital-to-analog converter / headphone amplifier, or a desktop decoding headphone amplifier, its output module 205 includes a digital-to-analog conversion decoding module 2051 and a headphone amplification module 2052 for driving wired headphones. When the headphone audio front-end device is a Bluetooth audio transmitter or a USB Bluetooth audio adapter, its output module 205 includes a Bluetooth encoding module 2053 and a wireless transmission module 2054 for transmitting audio signals to Bluetooth headphones.

[0139] In some embodiments, the headphone audio front-end device may also include the two sets of output modules 205 mentioned above, namely wired and wireless dual output capabilities. It can drive wired headphones through the digital-to-analog converter decoding module 2051 and the headphone amplifier module 2052, and send audio signals to Bluetooth headphones through the Bluetooth encoding module 2053 and the wireless transmission module 2054.

[0140] In some embodiments, the headphone audio front-end device may further include a clean mode switching module, which, upon receiving a user's activation command, controls the signal routing switch of the digital signal processing module 202 to bypass all processing parameters, so that the digital audio signal is transmitted directly to the output module 205 without passing through the multiplication and accumulation unit of the digital signal processing module.

[0141] To facilitate better implementation of the audio processing method for headphone audio front-end devices provided in this application, this application also provides an audio processing method for Bluetooth audio transmitters. The meanings of the terms used are the same as in the above-described audio processing method; for specific implementation details, please refer to the description in the embodiments of the audio processing method for headphone audio front-end devices. Please refer to... Figure 6 The specific process of this audio processing method applied to Bluetooth audio transmitters can be as follows: 301. Obtain the tuning code, which includes the target headphone's identity information, DSP parameters, device compatibility information, and security threshold information.

[0142] The specific implementation method of this step is the same as that described in 101 above, and will not be repeated here.

[0143] 302. Determine the currently connected Bluetooth audio transmitter and the paired Bluetooth headset, and read the Bluetooth audio transmitter's pre-transmission digital signal processing capability parameters, Bluetooth encoding format, and current operating scenario.

[0144] Specifically, after obtaining the tuning code, the Bluetooth audio transmitter can read its own pre-transmission digital signal processing capability parameters (such as whether it supports parametric equalizers, the maximum number of supported parametric equalizer bands, supported filter types, etc.), the current Bluetooth encoding format, and the current working scenario through the internal communication bus or registers.

[0145] The Bluetooth codec can be any one of LDAC, aptX, aptX Adaptive, aptX Lossless, LC3, AAC, or SBC. The current working mode can be music mode, low-latency game mode, or call mode.

[0146] In some embodiments, the Bluetooth audio transmitter can also obtain relevant information about the paired Bluetooth headset through the Bluetooth connection with the Bluetooth headset, including the Bluetooth headset model, connection name, list of supported Bluetooth codecs, etc.

[0147] 303. Based on the digital signal processing capability parameters before transmission and the current Bluetooth encoding format, convert the DSP parameters into processing parameters that the Bluetooth audio transmitter can execute before Bluetooth encoding.

[0148] The specific implementation method of this step is basically the same as the description of Bluetooth transmitter-specific adaptation in section 104 above, and will not be repeated here.

[0149] It should be noted that the digital signal processing of the Bluetooth audio transmitter occurs before Bluetooth encoding; that is, frequency response correction, dynamic protection, and scene-specific sound enhancement are completed before the audio signal enters the Bluetooth encoding module 2053. The processed digital audio signal is then encoded by the Bluetooth encoding module 2053 and sent to the Bluetooth headset. This is fundamentally different from the traditional method of tuning at the Bluetooth headset receiver. This embodiment places the tuning processing at the transmitter, enabling the same Bluetooth headset to achieve a consistent tuning experience on different audio source devices (such as mobile phones, computers, game consoles, tablets, etc.), regardless of whether each audio source device has a specific headset manufacturer's application installed.

[0150] 304. Perform security pre-gain calculation and input level clipping risk detection before encoding based on processing parameters.

[0151] The specific implementation method of this step is basically the same as the description of safety pre-gain calculation and clipping risk detection in section 105 above.

[0152] In view of the characteristics of Bluetooth audio transmitters, this embodiment may further include: dynamically adjusting the compensation coefficient of the safety pre-gain value according to different Bluetooth encoding formats, so that the maximum transient peak level input to the Bluetooth encoding module does not exceed the encoding input level threshold corresponding to the Bluetooth encoding format.

[0153] Specifically, different Bluetooth encoding formats have different tolerances for input levels. For example, SBC encoding is more sensitive to input levels and is prone to chopping distortion near 0dBFS; while LDAC encoding supports higher transmission rates, it is more sensitive to high-frequency overload. In practical implementation, based on the currently operating Bluetooth encoding format, the preset encoding input level threshold of that format can be obtained. Then, the difference between the maximum transient peak level and the encoding input level threshold can be calculated. This difference is used as a compensation coefficient for the safety pre-gain value, dynamically adjusting the safety pre-gain value to ensure that the peak level of the digital signal input to the Bluetooth encoding module never exceeds the encoding input level threshold of that encoding format.

[0154] 305. Write the processing parameters that pass the clipping risk detection into the local storage module of the Bluetooth audio transmitter so that the Bluetooth audio transmitter can receive the audio signal from the audio source device, call the processing parameters in the local storage module, process the audio signal before Bluetooth encoding, and encode the processed audio signal into the corresponding Bluetooth audio format through the Bluetooth encoding module, and send it to the Bluetooth headset through the wireless transmission module.

[0155] The specific implementation of this step is basically the same as the description in section 105 above regarding writing the processing parameters into the local storage module and audio signal processing.

[0156] It should be noted that when the current working scenario is game mode or call mode, digital signal processing modules with processing latency higher than the system-level latency threshold can be marked as high latency modules and forced to be disabled, retaining only digital signal processing modules with zero latency or lower than the system-level latency threshold.

[0157] For example, in game mode, complex dynamic range compression modules and long-tap FIR filters can be automatically disabled, retaining only lightweight parametric equalizer frequency response correction and pre-gain functions to ensure that the end-to-end audio latency of the Bluetooth audio transmitter meets the audio-visual synchronization requirements of the game scene.

[0158] With the audio processing method of the Bluetooth audio transmitter provided in this application embodiment, Bluetooth headset users can obtain a unified sound tuning experience across brands, mobile phones, computers, and game consoles without relying on the closed application of Bluetooth headset manufacturers, through an external Bluetooth audio transmitter.

[0159] To facilitate better implementation of the audio processing method provided in the embodiments of this application, this application also provides an audio processing system. The meanings of the terms used are the same as in the audio processing method described above, and specific implementation details can be found in the descriptions of the audio processing method embodiments. Please refer to... Figure 7The audio processing system may include a tuning code generation module 401, a tuning code parsing module 402, a device capability identification module 403, a parameter adaptation and conversion module 404, a security pre-gain verification module 405, a parameter writing and storage module 406, and an audio processing execution module 407.

[0160] The tuning code generation module 401 is used to obtain the acoustic characteristics and identity information of the target earphone, generate corresponding DSP parameters based on the acoustic characteristics, and encapsulate the DSP parameters, identity information, preset device adaptation information and security threshold information into tuning codes.

[0161] In some embodiments, the source of the acoustic characteristics of the target headphones obtained by the tuning code generation module 401 may include any one or more combinations of the following: measurement curves tuned by official engineers, publicly available third-party measurement databases (such as frequency response measurement data from various headphone testing organizations), parameters manually adjusted by the user, or parameters recommended by artificial intelligence algorithms.

[0162] The tuning code generation module 401 can calculate and generate DSP parameters such as frequency points, gain values, and Q values ​​for a multi-band parametric equalizer based on the difference between the acquired acoustic features and a preset target curve (such as a Harman target curve). Then, the tuning code generation module 401 encapsulates the DSP parameters, the target headphone's identity information (brand, model, etc.), preset device compatibility information (list of applicable device models, minimum firmware version, etc.), and safety threshold information (safety pre-gain value, maximum gain limit, etc.) into a standardized tuning code data structure. In some embodiments, the tuning code may also include creator identification, official certification identification, a whitelist of applicable device models, and minimum firmware version requirements.

[0163] Through the tuning code generation module 401, official acoustic engineers, certified creators, and ordinary users can all create and share tuning codes for specific headphones, forming an open ecosystem for co-creating headphone tuning content.

[0164] The tuning code parsing module 402 is used to parse the tuning code to extract DSP parameters, identity information, preset device adaptation information, and security threshold information.

[0165] Specifically, after a user obtains the tuning code through scanning a QR code, importing a file, or clicking a link, the tuning code parsing module 402 can decode and parse the tuning code, extracting the various data fields encapsulated within it, providing a data foundation for subsequent adaptation, conversion, and security verification. The tuning code parsing module 402 can also verify the integrity of the tuning code (such as verifying the hash value) and its tamper-proof digital signature, ensuring that the tuning code has not been maliciously tampered with during transmission.

[0166] The device capability identification module 403 is used to read the hardware capability parameters and output link type information of the currently connected headphone audio front-end device.

[0167] Specifically, the device capability identification module 403 can interact with the currently connected headphone audio front-end device via wired or wireless communication to read the device's hardware capability parameters (such as the maximum number of equalizer bands, the set of compatible filter types, whether dynamic range compression is supported, etc.), firmware version information, and output link type (wired decoding headphone amplifier output link or Bluetooth audio transmitter output link).

[0168] When the output link type is a Bluetooth audio transmitter output link, the device capability identification module 403 can further read information such as the Bluetooth system-on-a-chip model, the currently supported and actually working Bluetooth encoding format, and the current working scenario (music mode, low-latency game mode, or call mode).

[0169] The parameter adaptation and conversion module 404 is used to convert DSP parameters into processing parameters that can be executed by the headphone audio front-end device based on hardware capability parameters and output link type information.

[0170] Specifically, the parameter adaptation and conversion module 404 can fully load or trim and downgrade the DSP parameters in the tuning code and convert them into processing parameters that can be executed by the headphone audio front-end device, according to the hardware capability parameters and output link type information read by the device capability identification module, and in accordance with the parameter equalizer band number adaptation, filter type adaptation, dynamic range compression module adaptation and Bluetooth transmitter-specific adaptation methods described in the aforementioned 104.

[0171] The safety pre-gain verification module 405 is used to calculate the safety pre-gain value and perform clipping risk detection based on processing parameters and safety thresholds.

[0172] Specifically, the safety pre-gain verification module 405 can establish a frequency response superposition model based on the processing parameters according to the safety pre-gain calculation and clipping risk detection method described in 105 above, simulate and calculate the maximum transient peak level, calculate the safety pre-gain value based on the difference between the maximum transient peak level and the safety target level threshold, and then compare the safety pre-gain value with the risk threshold and the interception threshold to perform hierarchical clipping risk detection.

[0173] The parameter writing storage module 406 is used to write the processing parameters that have passed the clipping risk detection into the local storage module of the headphone audio front-end device.

[0174] Specifically, after the safety pre-gain verification module determines that the clipping risk detection has passed, the parameter writing storage module 406 can send the processing parameters to the local memory of the headphone audio front-end device via wired or wireless communication, so that the headphone audio front-end device can still independently call the processing parameters after disconnecting from the external terminal.

[0175] The audio processing execution module 407 can be at least one of a wired audio processing submodule or a wireless audio processing submodule. Wherein: The wired audio processing submodule can be used to call processing parameters in the wired decoding headphone amplifier output link to perform digital signal processing, and then output the signal to wired headphones after digital-to-analog conversion and amplification.

[0176] Specifically, the wired audio processing submodule can receive digital audio signals from the audio source device, call the processing parameters corresponding to the current headphone model in the storage module, complete frequency response correction, dynamic protection and pre-gain adjustment through the digital signal processing module, convert them into analog signals through the digital-to-analog converter decoding module, and then amplify them through the headphone amplifier module to drive the wired headphones.

[0177] The wireless audio processing submodule can be used to call processing parameters for pre-transmission processing before Bluetooth encoding in the Bluetooth audio transmitter output link, and then send it to the wireless headset after Bluetooth encoding.

[0178] Specifically, the wireless audio processing submodule can receive digital audio signals from the audio source device, call the processing parameters in the storage module corresponding to the current Bluetooth headset model or connection name, and perform pre-transmission preprocessing such as frequency response correction, dynamic protection and scene-based sound enhancement before Bluetooth encoding. The processed digital audio signal is then encoded by the Bluetooth encoding module and sent to the Bluetooth headset through the wireless transmission module.

[0179] For specific implementation methods of each of the above units, please refer to the embodiments of the audio processing method described above, which will not be repeated here.

[0180] To more clearly illustrate the technical solutions and beneficial effects of the embodiments of this application, the following examples are provided in conjunction with several specific practical application scenarios.

[0181] Application Scenario 1: Importing official tuning codes for headphones into a portable decoding headphone amplifier.

[0182] The user connects their mobile phone to a portable DAC / amplifier (model M15X) and opens the accompanying application. The user wears a pair of HD600 headphones, which are plugged into the headphone jack of the DAC / amplifier.

[0183] Users scan the official tuning QR code for the headphones within the application. After the application parses the QR code, it displays information on the interface, including the headphone model (HD600), tuning style (classical vocals), creator's identity (official acoustics lab), and compatible device range.

[0184] The application reads the hardware capability parameters of the currently connected M15X DAC / amp via USB communication (such as the maximum supported parametric equalizer bands of 12, firmware version V2.2.0, etc.) and output link type (wired DAC / amp output link). The application compares the device compatibility information in the tuning code (requiring a minimum firmware version of V2.1.0 and minimum support for a 10-band parametric equalizer) with the M15X's hardware capability parameters, determining a complete compatibility. The application then maps the DSP parameters (10-band parametric equalizer parameters) in the tuning code to executable processing parameters for the M15X.

[0185] The safety pre-gain verification module establishes a frequency response superposition model based on the processing parameters. Simulation calculations reveal that the maximum transient peak level after superimposing multiple positive gain segments is +1.5 dBFS, while the safety target level threshold is -0.5 dBFS. The calculated safety pre-gain value is 2.0 dB, which is less than the risk threshold of 3 dB, thus the clipping risk detection is deemed successful. The application automatically inserts a -2.0 dB global attenuator at the beginning of the digital signal processing link, writes the processing parameters to the M15X's local storage module, and binds it to the "HD600" headphone model.

[0186] Afterwards, the user disconnects the phone from the M15X. While offline, the M15X allows for one-click access to the HD600's exclusive tuning configuration via a button on the device, without needing to reconnect to the application. During listening, the user can switch to DSP bypass mode at any time using the device's clean mode switch to enjoy uncolored, original sound output.

[0187] Application Scenario 2: Importing user tuning codes for in-ear earphones into a small USB digital-to-analog converter / headphone amplifier.

[0188] The user wears a pair of in-ear earbuds and connects them to their phone via a small USB digital-to-analog converter / headphone amplifier. The user scans for vocal enhancement tuning codes shared by other users in the app.

[0189] After parsing the tuning code, the application found that it contained 10-band parametric equalizer parameters and a dynamic low-frequency processing module. The application then read the hardware capabilities of the current tailpiece and discovered that the device only supported a maximum of 5 parametric equalizer bands and did not support dynamic range compression, indicating a partial compatibility issue.

[0190] The parameter adaptation and conversion module calculates the weight values ​​(absolute gain value × Q value) of the parameters of each segment of the equalizer according to the dimensionality reduction process. It retains the mid-frequency core frequency point of the human voice with the highest weight and the key low-frequency control frequency point (4 in total). It merges the adjacent high-frequency points into 1 frequency point by Q value fusion, resulting in a total of 5 frequency points. It then disables the dynamic low-frequency processing module and generates the corresponding static attenuation compensation mark.

[0191] The safety pre-gain verification module recalculates the safety pre-gain value based on the dimensionality-reduced processing parameters and performs clipping risk detection. After passing the detection, the processing parameters are written to the local storage module of the small tail. During the listening process, the user obtains a vocal enhancement tuning effect after dimensionality reduction and adaptation. Although the number of parameter segments of the parametric equalizer is reduced and dynamic low-frequency processing is disabled, the clarity of mid-range vocals and the control effect of key low frequencies are preserved.

[0192] Application Scenario 3: Importing Bluetooth headset tuning codes into a Bluetooth audio transmitter.

[0193] Users connect a USB Bluetooth audio transmitter to their personal computer and pair it with a Bluetooth headset that supports LDAC encoding. Users then select the headset model in the accompanying application or scan the corresponding tuning code.

[0194] After parsing the tuning code, the application identifies the current device as a Bluetooth audio transmitter and the current output link as an LDAC encoding link. The application reads the Bluetooth audio transmitter's pre-transmission digital signal processing capability parameters (the maximum supported number of equalizer bands is 10), the current working Bluetooth encoding format (LDAC), and the current working scene (music mode).

[0195] The parameter adaptation and conversion module converts the DSP parameters in the tuning code into preprocessing parameters that the Bluetooth audio transmitter can execute before LDAC encoding. The safety pregain verification module dynamically adjusts the safety pregain value according to the preset encoding input level threshold (-2dBFS) of the LDAC encoding format to ensure that the maximum transient peak level input to the LDAC encoding module does not exceed -2dBFS. The preprocessing parameters that pass the detection are written to the local storage module of the Bluetooth audio transmitter.

[0196] After receiving the digital audio signal from the PC, the Bluetooth audio transmitter uses the preprocessing parameters to perform frequency response correction and pre-gain processing before LDAC encoding. The processed audio signal is then encoded by the LDAC encoding module and transmitted to the Bluetooth headset via the wireless transmission module. Regardless of whether the user connects the Bluetooth audio transmitter to a PC, mobile phone, or game console, the Bluetooth headset always achieves a consistent sound quality, regardless of whether the headset manufacturer's application is installed on each device.

[0197] Application Scenario 4: Loading tuning codes in low-latency gaming mode using a Bluetooth audio transmitter.

[0198] Users connect a Bluetooth audio transmitter to their game console and pair it with a gaming headset that supports low-latency Bluetooth codecs. Users then select the "Footstep Enhancement / Voice Clarity" audio tuning option in the accompanying app.

[0199] The application reads that the Bluetooth audio transmitter is currently in low-latency game mode, with a system-level latency threshold of 10 milliseconds. The parameter adaptation and conversion module iterates through the DSP parameters in the tuning code and finds that it includes a dynamic range compression module and a long-tap FIR filter, introducing processing latency of 8 milliseconds and 5 milliseconds respectively. Since the processing latency of both modules is less than 10 milliseconds, they are both retained. If a module introduces a processing latency exceeding 10 milliseconds, it is marked as a high-latency module and forcibly disabled.

[0200] After completing the pre-coding clipping detection, the security pre-gain verification module writes the preprocessing parameters into the Bluetooth audio transmitter. When the user is playing games on the game console, they can obtain the sound tuning effect of footstep enhancement and voice clarity optimization for this gaming headset through the external Bluetooth audio transmitter, and the end-to-end audio latency meets the audio-visual synchronization requirements of the game scene. The user does not need to install any headset manufacturer's application on the game console.

[0201] Application Scenario 5: Quick access to the official headphone tuning library.

[0202] For 50 mainstream wired headphones and 30 mainstream Bluetooth headphones on the market, headphone audio front-end equipment manufacturers have created official tuning codes for each headphone model, with each model having multiple versions such as original sound reference, vocal enhancement, low-frequency control, gaming, and low-volume night mode.

[0203] Users can directly browse the official tuning library in the accompanying application, select their current headphone model and choose their preferred tuning style version with one click, and the application will automatically send the corresponding tuning parameters to the headphone audio front-end device.

[0204] Users do not need any professional knowledge of digital signal processing parameter adjustment to obtain professional-grade sound effects for their own headphones, which greatly reduces the barrier to entry for headphone tuning.

[0205] Application Scenario 6: Ordinary users create and share their own headphone tuning codes.

[0206] Ordinary users connect their own headphones to their headphone audio source device and manually adjust parameters such as vocals, low frequencies, and high frequencies through the parametric equalizer interface of the accompanying application. The application automatically converts the user's adjustments into standardized multi-band parametric equalizer parameters (frequency points, gain values, and Q values) and calculates a safe pre-gain value.

[0207] After adjustment, the user clicks the "Generate Share Code" button. The application will then encapsulate the tuning code, containing the headphone model, DSP parameters, device compatibility information, and security threshold information, into a QR code image. The user can then share this QR code image with other users on social media, audio forums, or through instant messaging software.

[0208] When other users scan the code to import the tuning code, the system automatically identifies its own device type and computing power, completing either a full load or a downgraded adaptation. In this way, ordinary users can also participate in the creation and sharing of headphone tuning content, forming a lightweight headphone tuning content ecosystem in which official and certified creators and ordinary users participate together.

[0209] Application Scenario 7: Pure Mode Bypass Application.

[0210] In daily listening, users sometimes want to enjoy personalized sound processed by tuning codes, and sometimes they want to hear the headphones' original, uncolored sound. The headphone audio front-end device has a separate physical switch for a pure mode.

[0211] When the Clean Mode switch is off, the digital signal processing module normally calls the processing parameters in the storage module to process the audio signal. When the user toggles the Clean Mode switch to the on state, the Clean Mode switching module controls the signal routing switch inside the digital signal processing module, switching the audio signal transmission path from "audio input module → digital signal processing module (multiplication and accumulation unit) → output module" to "audio input module → signal routing switch direct → output module," so that the digital audio signal bypasses the multiplication and accumulation unit of the digital signal processing module and is directly transmitted to the output module.

[0212] For wired headphone amplifiers, the audio signal goes directly into the digital-to-analog converter (DAC) and headphone amplifier modules; for Bluetooth transmitters, the audio signal bypasses the digital signal processing corresponding to the tuning code and goes directly into the Bluetooth encoding module. Users can freely switch between tuning mode and clean mode at any time, catering to both personalized tuning needs and the desire for uncolored sound.

[0213] In summary, the audio processing method, audio front-end device, audio processing system, and computer-readable storage medium provided in this application significantly reduce the tuning operation threshold for ordinary users by encapsulating the DSP parameters for specific headphones into a standardized tuning code data structure, and enable convenient sharing and import of tuning configurations; through a parameter adaptation and conversion mechanism based on device hardware capability parameters and output link type information, complete loading or downgrading adaptation of the same tuning code on different computing devices is achieved, solving the problem of cross-device incompatibility of tuning parameters; and by performing security pre-gain calculation and clipping risk detection before parameter writing, the risk of clipping is avoided from the source. Risks of digital signal clipping, distortion, and Bluetooth pre-encoding overload are mitigated. Multiple sets of processing parameters are stored locally on the device and can be independently accessed offline, improving user convenience in multi-headphone scenarios. For Bluetooth audio transmitters, pre-processing before transmission is achieved by calling processing parameters before Bluetooth encoding, enabling a unified tuning experience across brands and devices, filling the technical gap in cross-device sound adaptation within the Bluetooth headphone ecosystem. Simultaneously, a tuning code generation and sharing mechanism involving official, certified creators, and ordinary users upgrades traditionally fixed-sound-performance hardware products into an open sound platform with continuously updated tuning content. An independent pure mode switching module allows users to freely switch between personalized tuning and original sound monitoring.

[0214] This application provides a storage medium storing multiple instructions that can be loaded by a processor to execute the audio processing method for a headphone audio front-end device or the audio processing method for a Bluetooth audio transmitter provided in this application.

[0215] The storage medium can be any tangible medium capable of storing computer programs, including but not limited to: read-only memory (ROM), random access memory (RAM), disk storage media, optical storage media, flash memory devices, etc.

[0216] Since the instructions stored in the storage medium can execute the audio processing method for a headphone audio front-end device provided in the embodiments of this application, or the audio processing method for a Bluetooth audio transmitter, the beneficial effects that any audio processing method provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0217] The above provides a detailed description of the headphone audio front-end device, its audio processing method, system, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of this application. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An audio processing method, characterized in that, Used in headphone audio front-end devices, including: Obtain the tuning code, which includes the target headphone's identity information, DSP parameters, device adaptation information, and security threshold information; the DSP parameters include at least multiple segments of parametric equalizer parameters, each segment of the parametric equalizer parameters including the corresponding frequency point, gain value, and Q value; Obtain the hardware capability parameters and output link type information of the currently connected headphone audio front-end device; Based on the hardware capability parameters and the output link type information, determine the compatibility between the tuning code and the headphone audio front-end device; When a match is determined to be compatible or partially compatible, the maximum number of parametric equalizer segments supported by the headphone audio front-end device and the original number of segments of the parametric equalizer parameters are obtained; the maximum number of parametric equalizer segments and the original number of segments are compared; when the maximum number of parametric equalizer segments is greater than or equal to the original number of segments, the multi-segment parametric equalizer parameters are mapped to processing parameters executable by the headphone audio front-end device; when the maximum number of parametric equalizer segments is less than the original number of segments, the weight value of each segment of the parametric equalizer parameters is calculated based on the absolute value of the gain value and the Q value. The frequency points corresponding to each parameter equalizer parameter are sorted in descending order of their weight values ​​to determine the core frequency point set and the candidate frequency point set. When the number of segments in the core frequency point set is greater than the number of segments in the maximum parameter equalizer, frequency points with frequencies lower than the first preset frequency threshold or higher than the second preset frequency threshold are removed from the core frequency point set until the number of frequency points in the core frequency point set is equal to the number of segments in the maximum parameter equalizer. When the number of segments in the core frequency point set is less than the number of segments in the maximum parameter equalizer, frequency points are added to the core frequency point set from the candidate frequency point set in descending order of the weight value, until the number of frequency points in the core frequency point set is equal to the number of segments in the maximum parameter equalizer. The parameter equalizer parameters corresponding to each frequency point in the processed core frequency point set are used as target DSP parameters; the target DSP parameters are mapped to the processing parameters that the headphone audio front-end device can execute. Based on the processing parameters and the safety threshold, a safety pre-gain value is calculated and clipping risk detection is performed. The processing parameters that pass the clipping risk detection are written into the local storage module of the headphone audio front-end device, so that the current headphone audio front-end device can use the processing parameters to process the input audio signal and output the processed audio signal to the corresponding target headphone.

2. The audio processing method as described in claim 1, characterized in that, The carrier of the tuning code can be any one or more of the following: QR code, encrypted string sharing code, local configuration file, cloud index link, in-application sharing link, NFC tag, or web link.

3. The audio processing method as described in claim 1, characterized in that, When the output link type is a wired decoding headphone amplifier output link, mapping the target DSP parameters to processing parameters executable by the headphone audio front-end device includes: Obtain the set of target filter types supported by the output link of the wired decoding headphone amplifier; Identify the original filter type contained in the target DSP parameters; If the original filter type does not belong to the target filter type set, the original filter type is converted into the equivalent filter type with the lowest computational complexity in the target filter type set, and the corresponding filter coefficients are recalculated based on the converted filter type. If the target DSP parameters include a dynamic range compression module, and the wired decoding headphone amplifier output link does not support dynamic range compression processing, then the dynamic range compression module is disabled, and a static attenuation compensation flag corresponding to the compression ratio and compensation gain of the dynamic range compression module is generated. The processed target DSP parameters are associated with the static attenuation compensation flag and mapped to the processing parameters executable by the wired decoder amplifier output link.

4. The audio processing method as described in claim 1, characterized in that, When the output link type is a Bluetooth audio transmitter output link, mapping the target DSP parameters to processing parameters executable by the headphone audio front-end device includes: Obtain the current operating scenario of the Bluetooth audio transmitter output link, wherein the current operating scenario includes music mode, low-latency game mode, and call mode; When the current working scenario is the low-latency game mode or the call mode, obtain the preset system-level latency threshold value; Iterate through each digital signal processing module in the target DSP parameters and calculate the processing delay value introduced by each digital signal processing module. The digital signal processing module whose processing delay value is greater than the system-level delay threshold is marked as a high-delay module, and the high-delay module is forcibly disabled; Obtain the Bluetooth encoding format of the output link of the Bluetooth audio transmitter, and generate an encoding type tag corresponding to the Bluetooth encoding format; The processed target DSP parameters are associated with the encoding type flag and mapped to preprocessing parameters that can be executed by the Bluetooth audio transmitter output link before Bluetooth encoding.

5. The audio processing method as described in claim 1, characterized in that, The step of calculating the safety pre-gain value based on the processing parameters and performing clipping risk detection includes: A clipping risk value is calculated based on the processing parameters, and the clipping risk value is used to characterize the severity of digital signal clipping caused by the processing parameters; Calculate the safety pregain value based on the clipping risk value; Clipping risk detection is performed based on the stated safety pre-gain value.

6. The audio processing method as described in claim 5, characterized in that, The step of calculating the clipping risk value based on the processing parameters includes: A frequency response superposition model is established based on the processing parameters; Using the frequency response superposition model, the maximum transient peak level of the input audio signal after processing by the processing parameters is simulated, and the maximum transient peak level is used as the clipping risk value.

7. The audio processing method as described in claim 6, characterized in that, The calculation of the safety pre-gain value based on the clipping risk value includes: Obtain the preset safety target level threshold; Calculate the difference between the maximum transient peak level and the safety target level threshold, and use the difference as the safety pre-gain value.

8. The audio processing method as described in claim 7, characterized in that, The step of performing clipping risk detection based on the security pre-gain value includes: The safety pre-gain value is compared with a preset risk threshold value; When the safety pre-gain value is less than or equal to the risk threshold value, the clipping risk detection is deemed to have passed, and the processing parameters can be written. When the safety pre-gain value is greater than the risk threshold value and less than or equal to the preset interception threshold value, a clipping risk warning signal is generated, and after user confirmation, it is allowed to be written into the processing parameters. When the security pregain value is greater than the interception threshold value, the processing parameters are rejected.

9. The audio processing method as described in claim 7, characterized in that, After calculating the safety pregain value based on the clipping risk value, the process also includes: When the processing parameters carry a static attenuation compensation flag, the compensation gain value corresponding to the static attenuation compensation flag is read, and the safety pre-gain value is superimposed with the compensation gain value to generate a corrected safety pre-gain value. When the processing parameters carry an encoding type flag, the Bluetooth encoding format corresponding to the encoding type flag is read, the preset encoding input level threshold of the Bluetooth encoding format is obtained, the difference between the maximum transient peak level and the encoding input level threshold is calculated, and the larger of the difference and the security pre-gain value is used as the updated security pre-gain value.

10. A headphone audio front-end device for implementing the audio processing method as described in any one of claims 1-9, characterized in that, include: An audio input module is used to receive audio signals from an audio source device; A digital signal processing module is used to perform digital signal processing on the audio signal; A storage module is used to locally store at least one set of processing parameters executable by the headphone audio front-end device; The main control module is connected to the audio input module, the digital signal processing module, and the storage module, respectively; And, at least one set of output modules, said output modules comprising at least one of the following two sets of modules: The digital-to-analog conversion decoding module and the headphone amplification module are used to convert the processed audio signal into an analog signal and drive wired headphones; The Bluetooth encoding module and wireless transmission module are used to encode the processed audio signal into Bluetooth audio format and send it to the Bluetooth headset. The main control module is used to receive processing parameters sent by an external terminal and store the processing parameters in the storage module by binding them to the corresponding headphone model or connection name. The digital signal processing module is used to retrieve the processing parameters in the storage module to process the audio signal; the audio signal processed by the digital signal processing module is output to wired headphones or Bluetooth headphones via the output module.

11. The headphone audio front-end device as described in claim 10, characterized in that, The headphone audio front-end device is any one of a portable decoding headphone amplifier, a USB digital-to-analog converter / headphone amplifier, a desktop decoding headphone amplifier, a Bluetooth audio transmitter, or a USB Bluetooth audio adapter.

12. The headphone audio front-end device as described in claim 10, characterized in that, The main control module is also used to read and switch different processing parameters from the storage module in response to trigger signals from physical controls on the device or touch screen when the headphone audio front-end device is disconnected from the external terminal or when there is no network signal, and to control the digital signal processing module to call the switched processing parameters to process the audio signal.

13. The headphone audio front-end device as described in claim 10, characterized in that, The headphone audio front-end device also includes a pure mode switching module, which, upon receiving a user's activation command, controls the signal routing switch of the digital signal processing module to bypass all the processing parameters, so that the audio signal is transmitted directly to the output module without passing through the multiplication and accumulation unit of the digital signal processing module.

14. An audio processing method, characterized in that, Applications include Bluetooth audio transmitters, including: Obtain the tuning code, which includes the target headphone's identity information, DSP parameters, device adaptation information, and security threshold information; Identify the currently connected Bluetooth audio transmitter and the paired Bluetooth headset, and read the pre-transmission digital signal processing capability parameters, Bluetooth encoding format, and current operating scenario of the Bluetooth audio transmitter; Based on the pre-transmission digital signal processing capability parameters and the current working Bluetooth encoding format, the DSP parameters are converted into processing parameters that the Bluetooth audio transmitter can execute before Bluetooth encoding; Based on the processing parameters, perform security pre-gain calculation and pre-encoding input level clipping risk detection; The processing parameters detected by clipping risk are written into the local storage module of the Bluetooth audio transmitter so that the Bluetooth audio transmitter receives audio signals from the audio source device, calls the processing parameters in the local storage module to process the audio signals before Bluetooth encoding, and encodes the processed audio signals into the corresponding Bluetooth audio format via the Bluetooth encoding module and transmits them to the Bluetooth headset via the wireless transmission module.

15. The audio processing method as described in claim 14, characterized in that, The current working scenario includes music mode, game mode, and call mode; the audio processing method further includes: When the current working scenario is the game mode or the call mode, the digital signal processing module whose processing latency is higher than the system-level latency threshold is marked as a high latency module, and the high latency module is forcibly disabled, while only the digital signal processing module with zero latency or lower than the system-level latency threshold is retained.

16. The audio processing method as described in claim 14, characterized in that, The Bluetooth encoding format includes any one of LDAC, aptX, aptX Adaptive, aptX Lossless, LC3, AAC, or SBC; the audio processing method further includes: The compensation coefficient of the security pre-gain value is dynamically adjusted according to different Bluetooth encoding formats, so that the maximum transient peak level input to the Bluetooth encoding module does not exceed the encoding input level threshold corresponding to the Bluetooth encoding format.

17. An audio processing system for implementing the audio processing method as described in any one of claims 1-9, characterized in that, include: The tuning code generation module is used to obtain the acoustic features and identity information of the target earphone, generate corresponding DSP parameters based on the acoustic features, and encapsulate the DSP parameters, the identity information, the preset device adaptation information and the security threshold information into a tuning code; The tuning code parsing module is used to parse the tuning code to extract the DSP parameters, the identity information, the preset device adaptation information, and the security threshold information. The device capability identification module is used to read the hardware capability parameters and output link type information of the currently connected headphone audio front-end device; The parameter adaptation and conversion module is used to determine the compatibility between the tuning code and the headphone audio front-end device based on the hardware capability parameters and the output link type information; when it is determined to be compatible or partially compatible, it obtains the maximum number of parametric equalizer segments supported by the headphone audio front-end device and the original number of segments of the parametric equalizer parameters; compares the maximum number of parametric equalizer segments and the original number of segments; when the maximum number of parametric equalizer segments is greater than or equal to the original number of segments, it maps the multi-segment parametric equalizer parameters to processing parameters that can be executed by the headphone audio front-end device; when the maximum number of parametric equalizer segments is less than the original number of segments, it calculates the weight value of each segment of the parametric equalizer parameter based on the absolute value of the gain value and the Q value; and sorts the frequency points corresponding to each parametric equalizer parameter in descending order of the weight values ​​to determine the core frequency point set and the candidate frequency point set. When the number of segments in the core frequency point set is greater than the number of segments in the maximum parameter equalizer, frequency points with frequencies lower than a first preset frequency threshold or higher than a second preset frequency threshold are removed from the core frequency point set until the number of frequency points in the core frequency point set equals the number of segments in the maximum parameter equalizer; when the number of segments in the core frequency point set is less than the number of segments in the maximum parameter equalizer, frequency points are added to the core frequency point set from the candidate frequency point set in descending order of the weight value until the number of frequency points in the core frequency point set equals the number of segments in the maximum parameter equalizer. The parameter equalizer parameters corresponding to each frequency point in the processed core frequency point set are used as the target DSP parameters. The target DSP parameters are mapped to processing parameters that can be executed by the headphone audio front-end device; The safety pre-gain verification module is used to calculate the safety pre-gain value and perform clipping risk detection based on the processing parameters and the safety threshold. The parameter writing storage module is used to write the processing parameters that have passed the clipping risk detection into the local storage module of the headphone audio front-end device; An audio processing execution module, wherein the audio processing execution module is at least one of a wired audio processing submodule or a wireless audio processing submodule, wherein: The wired audio processing submodule is used to call the processing parameters in the wired decoding headphone amplifier output link to perform digital signal processing, and then output the signal to the wired headphones after digital-to-analog conversion and amplification. The wireless audio processing submodule is used to call the processing parameters for pre-transmission preprocessing before Bluetooth encoding in the Bluetooth audio transmitter output link, and then send it to the wireless headset after Bluetooth encoding.

18. A storage medium, characterized in that, The storage medium stores a plurality of instructions, which are applicable to a processor for loading to execute the audio processing method according to any one of claims 1-9, or to execute the audio processing method according to any one of claims 14-16.