A multi-protocol compatible TDM multi-channel allocation method

By dynamically reconstructing TDM frames and protocol discrimination of signal characteristic parameters, the problems of high hardware complexity, high cost, poor protocol compatibility and poor signal synchronization in multi-channel audio transmission systems are solved. It realizes automatic identification and seamless switching of multiple protocols and supports the dynamic needs of diverse audio scenarios.

CN122179347APending Publication Date: 2026-06-09SICHUAN HUSHAN ELECTRIC APPLIANCE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610380961.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-26
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing multi-channel audio transmission systems suffer from problems such as high hardware complexity, high cost, poor protocol compatibility, static channel allocation and insufficient expansion flexibility, and poor signal synchronization, making it difficult to meet dynamic requirements, especially in long-distance and cascaded transmission scenarios.

Method used

By dynamically reconstructing the channel allocation strategy of TDM frames, combined with protocol discrimination and load monitoring of signal characteristic parameters, the system achieves automatic identification and seamless switching of multiple protocols, dynamically adjusts the channel allocation strategy, optimizes clock signal synchronization, and supports multiple output modules sharing a single TDM data line.

Benefits of technology

It improves protocol compatibility and switching efficiency, reduces material consumption and costs, achieves flexibility in channel expansion and sub-nanosecond signal synchronization, and adapts to diverse audio playback needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179347A_ABST
    Figure CN122179347A_ABST
Patent Text Reader

Abstract

This application discloses a multi-protocol compatible TDM multi-channel allocation method, relating to the field of audio data transmission technology. By using a protocol discrimination strategy based on signal characteristic parameters, compatibility and switching efficiency are improved. Then, based on the discriminated protocol type, the audio data to be allocated is encapsulated into dynamically reconstructed TDM frames, which allows multiple output modules to share a single TDM data line, reducing material consumption and cost. The channel allocation strategy is then obtained, and the default channel allocation strategy is adjusted according to the channel allocation strategy. Only a software update strategy is needed, and the flexibility of channel expansion and adjustment far exceeds that of existing static allocation schemes, which can adapt to diverse dynamic scenario requirements such as professional audio and in-vehicle audio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of audio data transmission technology, specifically to a TDM multi-channel allocation method compatible with multiple protocols. Background Technology

[0002] In existing multi-channel audio transmission systems, multi-channel audio data distribution mainly employs two schemes: Scheme 1: Multi-channel data distribution is achieved through a dedicated channel distribution chip (such as an audio matrix chip). The input multi-channel audio signals are distributed to different output devices (such as DAC chips and power amplifier chips) through the chip's internal hardware circuitry. This requires separate deployment of the distribution chip, along with its power supply and wiring. Scheme 2: Multiple independent data lines are used to connect different output devices. Each output device occupies a dedicated data transmission link, and the input device needs to output multiple sets of the same or different audio data to adapt to the channel requirements of different output devices.

[0003] In the above scheme, audio data transmission is mainly based on the DAI protocol system, including the I2S protocol (for single / dual-channel chip-level transmission) and the TDM protocol (for multi-channel system-level transmission). Some high-end scenarios may involve the AES3 / EBU protocol. Output devices (such as DACs and power amplifiers) need to receive audio data through the corresponding protocol interface to complete digital-to-analog conversion or power amplification. Meanwhile, existing technologies can also achieve I2S to TDM protocol conversion through hardware conversion chips (such as SRC and ASRC) or general software algorithm libraries. Basic channel data identification can be achieved by configuring peripheral chip registers through the MCU, and multi-channel data transmission over a single data line can be achieved through the inherent characteristics of the TDM protocol.

[0004] The shortcomings or deficiencies of the background technology are:

[0005] 1. High hardware complexity and high cost: Option 1 requires an additional dedicated channel allocation chip, which not only increases hardware procurement costs but also occupies more PCB board space and increases wiring difficulty; Option 2 requires the deployment of multiple independent data lines, resulting in increased PCB wiring density and increased material consumption (such as wires and interfaces), thus increasing the overall system cost.

[0006] 2. Poor protocol compatibility and low switching efficiency: Existing protocol conversion solutions are mostly general-purpose algorithms or dedicated hardware implementations, which can only complete basic protocol format conversion. They lack a fast recognition and seamless switching mechanism, and the recognition delay is usually greater than 100ms. Audio dropouts and stuttering are prone to occur during the switching process. Moreover, most of them only support I2S / TDM protocols and have poor adaptability to protocols such as AES3 / EBU. When the input data protocol is switched, manual intervention is required to reconfigure the system, and automatic recognition and seamless adaptation cannot be achieved.

[0007] 3. Insufficient flexibility in channel expansion and static allocation: Most existing TDM protocol applications use static channel allocation. The frame structure and channel allocation strategy are fixed before system startup and cannot be dynamically adjusted according to audio content, system load, or user needs during operation. If it is necessary to expand or adjust the channels, the system must be restarted and the hardware parameters must be reconfigured. The response is slow and audio transmission is easily interrupted, which cannot meet the dynamic needs of professional audio, in-vehicle audio and other scenarios.

[0008] 4. Poor signal synchronization and lack of targeted optimization: Existing co-clocking solutions only achieve basic clock synchronization and lack clock recovery, jitter elimination and delay compensation mechanisms for long-distance transmission and multi-level cascading scenarios. In practical applications, the jitter error of signal transmission is likely to exceed 1ns, and the synchronization error between channels is relatively large. At the same time, the PCG unit is a general configuration and has not been optimized for timing of audio TDM transmission, which cannot meet the strict synchronization requirements of sub-nanosecond level.

[0009] 5. Poor system adaptability: For different audio scenarios (such as professional recording of vocals / music separation, dynamic sound effects of car main speakers / subwoofers), the system cannot dynamically adjust the channel resource allocation strategy, resulting in low system resource utilization and difficulty in adapting to diverse audio playback needs. Summary of the Invention

[0010] The purpose of this application is to provide a TDM multi-channel allocation method compatible with multiple protocols, which solves the problems of high hardware complexity, high cost, low protocol compatibility switching efficiency, static channel allocation and insufficient expansion flexibility, and / or poor signal synchronization under long distance / cascaded transmission in existing multi-channel audio transmission systems.

[0011] This application is achieved through the following technical solution:

[0012] A multi-protocol compatible TDM multi-channel allocation method includes:

[0013] Initialize the default channel allocation strategy for dynamically reconstructed TDM frames, and adjust the data identification mode of the first output module and the second output module to the mode corresponding to the default channel allocation strategy;

[0014] Acquire audio data to be assigned, extract signal feature parameters corresponding to the audio data to be assigned, and identify the target protocol corresponding to the audio data to be assigned based on the signal feature parameters;

[0015] Based on the target protocol corresponding to the audio data to be allocated, the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame to obtain the target audio data frame;

[0016] Collect the audio feature parameters corresponding to the audio data to be allocated, the first load monitoring data corresponding to the first output module, and the second load monitoring data corresponding to the second output module;

[0017] Based on the audio feature parameters, the first load monitoring data, and the second load monitoring data, a channel allocation strategy is obtained, and the default channel allocation strategy is adjusted according to the channel allocation strategy to reconstruct the target audio data frame and obtain the reconstructed audio data frame.

[0018] While adjusting the default channel allocation strategy, the data recognition modes of the first output module and the second output module are adjusted simultaneously.

[0019] The reconstructed audio data frame is synchronously transmitted to the first output module and the second output module, so that the first output module and the second output module can output audio data based on the adjusted data recognition mode;

[0020] The dynamically reconstructed TDM frame represents a data frame compatible with the output channels of the first output module and the second output module; the first output module and the second output module are audio output modules with different protocols.

[0021] The method also includes:

[0022] During TDM multi-channel allocation, clock signals are tracked and recovered, jitter is eliminated, and precise delay compensation is performed to synchronize all data.

[0023] In one possible implementation, the base frame length of the dynamically reconstructed TDM frame is 32 channels, with each channel corresponding to 24 bits of audio data; the dynamically reconstructed TDM frame also includes a frame synchronization signal and a dynamic reconstruction field; the dynamic reconstruction field is used to identify the number of valid channels in the current frame and the channel allocation strategy version; the frame synchronization signal also includes a signaling synchronization flag bit, which is used to cooperate with the uninterrupted transmission of the dynamic reconfiguration signaling, and the dynamic reconfiguration signaling is used to adjust the data recognition mode of the first output module and the second output module.

[0024] In one possible implementation, the default channel allocation strategy for dynamically reconstructed TDM frames is initialized, and the data identification modes of the first output module and the second output module are adjusted to modes corresponding to the default channel allocation strategy, including:

[0025] Channels 0 to 7 are initialized as the first output channel group corresponding to the first output module, channels 8 to 9 are initialized as the second output channel group corresponding to the second output module, and the remaining channels are initialized as dynamically reserved channels, thus obtaining the default channel allocation strategy.

[0026] Based on the default channel allocation strategy, the first output module is adjusted to a data recognition mode that only recognizes data from channels 0 to 7, and the second output module is adjusted to a data recognition mode that only recognizes data from channels 8 to 9.

[0027] In one possible implementation, the process includes acquiring audio data to be allocated, extracting signal feature parameters corresponding to the audio data to be allocated, and identifying the target protocol corresponding to the audio data to be allocated based on the signal feature parameters, including:

[0028] Acquire the audio data to be allocated, and extract the width of the frame synchronization signal, the frequency ratio of the clock signal, the encoding format of the data bits, and the frame interval features corresponding to the audio data to be allocated, to obtain the signal feature parameters corresponding to the audio data to be allocated.

[0029] Based on the signal feature parameters, a feature-differentiated weighted matching strategy is used to identify the target protocol corresponding to the audio data to be assigned.

[0030] In one possible implementation, based on the signal feature parameters, a feature-differentiated weighted matching strategy is used to identify the target protocol corresponding to the audio data to be assigned, including:

[0031] Obtain the difference between the signal feature parameters and the preset protocol feature thresholds of each protocol; wherein, each protocol sets a corresponding protocol feature threshold for each signal feature parameter;

[0032] For any given protocol, the matching degree is determined based on all the differential values ​​corresponding to the protocol.

[0033] Protocols with a matching degree greater than a preset threshold are selected as the target protocols corresponding to the audio data to be assigned.

[0034] In one possible implementation, based on the target protocol corresponding to the audio data to be allocated, the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame to obtain the target audio data frame, including:

[0035] If the target protocol corresponding to the audio data to be allocated is the I2S protocol, then the data of the two channels contained in the audio data to be allocated is mapped and encapsulated into the first two channels of the dynamically reconstructed TDM frame to obtain the dynamically reconstructed TDM frame.

[0036] If the target protocol corresponding to the audio data to be allocated is the TDM protocol, then the frame synchronization width and channel number corresponding to the audio data to be allocated are parsed, and the audio data in the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame according to the frame synchronization width and channel number.

[0037] If the target protocol corresponding to the audio data to be allocated is AES3, then the audio data to be allocated is deserialized and decoded to obtain 8-channel audio data. The 8-channel audio data is then encapsulated into channels 0 to 7 of the dynamically reconstructed TDM frame, and the remaining channels are filled with silence data to obtain the dynamically reconstructed TDM frame.

[0038] In one possible implementation, collecting the audio feature parameters corresponding to the audio data to be allocated, the first load monitoring data corresponding to the first output module, and the second load monitoring data corresponding to the second output module includes:

[0039] Collect the human voice features, music features, and vocal tract energy distribution corresponding to the audio data to be assigned, and obtain the audio feature parameters corresponding to the audio data to be assigned.

[0040] Collect the bandwidth utilization and module workload of the first output module to obtain the first load monitoring data of the first output module.

[0041] The bandwidth utilization and module workload of the second output module are collected to obtain the first load monitoring data of the second output module.

[0042] In one possible implementation, a channel allocation strategy is obtained based on the audio feature parameters, first load monitoring data, and second load monitoring data. The default channel allocation strategy is then adjusted according to the channel allocation strategy to reconstruct the target audio data frame, resulting in a reconstructed audio data frame. This includes:

[0043] Based on the audio feature parameters, the first load monitoring data, and the second load monitoring data, a fuzzy decision algorithm is used to determine the channel allocation strategy.

[0044] According to the channel allocation strategy, the dynamic reconstruction field in the default channel allocation strategy is modified to allocate some or all of the dynamically reserved channels to the first output module and / or the second output module to obtain reconstructed audio data frames.

[0045] In one possible implementation, while adjusting the default channel allocation strategy, the data recognition modes of the first output module and the second output module are simultaneously adjusted, including:

[0046] While adjusting the default channel allocation strategy, a dynamic reconfiguration signaling with a synchronization identifier is sent to each first output module and the second output module. The dynamic reconfiguration signaling includes the new channel identification rules and the effective time.

[0047] Compared with the prior art, this application has the following advantages and beneficial effects:

[0048] This application provides a TDM multi-channel allocation method compatible with multiple protocols. By using a protocol discrimination strategy based on signal characteristic parameters, it improves compatibility and switching efficiency. Then, based on the discriminated protocol type, the audio data to be allocated is encapsulated into dynamically reconstructed TDM frames, which allows multiple output modules to share a single TDM data line, reducing material consumption and cost. The channel allocation strategy is then obtained, and the default channel allocation strategy is adjusted according to the channel allocation strategy. Only a software update strategy is needed. The flexibility of channel expansion and adjustment far exceeds that of existing static allocation schemes, and it can adapt to diverse dynamic scenario requirements such as professional audio and in-vehicle audio. Attached Figure Description

[0049] To more clearly illustrate the technical solutions of the exemplary embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0050] Figure 1 A flowchart of a TDM multi-channel allocation method compatible with multiple protocols is provided in this application embodiment;

[0051] Figure 2 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;

[0052] Figure 3 This is a schematic diagram of the structure of a dynamically reconstructed TDM frame provided in an embodiment of this application. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this application are only for explaining this application and are not intended to limit this application.

[0054] like Figure 1 As shown, this application provides a TDM multi-channel allocation method compatible with multiple protocols, including:

[0055] S101. Initialize the default channel allocation strategy for dynamically reconstructing TDM frames, and adjust the data identification mode of the first output module and the second output module to the mode corresponding to the default channel allocation strategy.

[0056] S102. Obtain the audio data to be allocated, extract the signal feature parameters corresponding to the audio data to be allocated, and identify the target protocol corresponding to the audio data to be allocated based on the signal feature parameters;

[0057] S103. Based on the target protocol corresponding to the audio data to be allocated, the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame to obtain the target audio data frame.

[0058] S104. Collect the audio feature parameters corresponding to the audio data to be allocated, the first load monitoring data corresponding to the first output module, and the second load monitoring data corresponding to the second output module;

[0059] S105. Based on the audio feature parameters, the first load monitoring data and the second load monitoring data, obtain the channel allocation strategy, and adjust the default channel allocation strategy according to the channel allocation strategy to realize the reconstruction of the target audio data frame and obtain the reconstructed audio data frame.

[0060] It is worth noting that if the channel allocation strategy is to keep the default strategy, the default channel allocation strategy will be used directly for data transmission. In this case, the target audio data frame does not need to be adjusted. The first output module and the second output module will maintain the corresponding data recognition mode and directly send the target audio data frame.

[0061] S106. While adjusting the default channel allocation strategy, simultaneously adjust the data recognition mode of the first output module and the second output module.

[0062] S107. The reconstructed audio data frame is synchronously transmitted to the first output module and the second output module, so that the first output module and the second output module can output audio data based on the adjusted data recognition mode.

[0063] The dynamically reconstructed TDM frame represents a data frame compatible with the output channels of the first output module and the second output module; the first output module and the second output module are audio output modules with different protocols.

[0064] The method also includes:

[0065] During TDM multi-channel allocation, clock signals are tracked and recovered, jitter is eliminated, and precise delay compensation is performed to synchronize all data.

[0066] This invention achieves automatic identification and low-latency seamless switching of multiple protocols (I2S / TDM / AES3) through a multi-protocol fast identification and seamless switching algorithm based on signal characteristics. It defines a dynamically reconfigurable TDM frame structure and, combined with runtime dynamic channel scheduling and uninterrupted signaling mechanisms, enables dynamic allocation and reconfiguration of TDM frame channels based on audio content and system load. It optimizes the ADSP chip PCG unit configuration and designs sub-nanosecond clock recovery, jitter elimination, and latency compensation mechanisms to ensure signal synchronization under long-distance transmission / multi-level cascading. Simultaneously, it allocates data through TDM time slices, allowing multiple output devices to share a single TDM data line. Combined with protocol adaptation logic and output module channel identification configuration, it achieves multi-dimensional technical upgrades while reducing hardware complexity, addressing the core pain points of existing technologies.

[0067] To facilitate understanding of the technical solutions described in the embodiments of this application by those skilled in the art, the application scenarios of this application are first introduced. For example... Figure 2 As shown, this application scenario can include an ADSP core processing chip (with built-in protocol recognition algorithm module, dynamic scheduling module, and clock optimization module), a multi-channel input module, a first output module (CS43858 channel DAC chip), a second output module (MA12070P power amplifier chip), a control module (STM32 series MCU), and a clock compensation module (composed of a phase-locked loop (PLL), a jitter canceller, and a delay compensation register). The ADSP chip is the core processing unit, integrating a protocol feature recognition unit, a dynamic frame configuration unit, and a synchronization control unit. The clock compensation module works in conjunction with the PCG unit of the ADSP chip to optimize and compensate the clock signal.

[0068] The multi-channel input module consists of four ES9831 chips. The TDM / AES3 / I2S outputs of each ES9831 chip are connected to the SPORT0 module (multi-protocol receive mode) of the ADSP chip for transmitting multi-protocol, multi-channel audio data to the ADSP chip. The SPORT1 module (dynamically reconfigurable TDM output mode) of the ADSP chip is connected to the SDIN1 pin of the first output module via a TDM data line (DOUT1 pin). The SDI pin of the second output module is connected in parallel to this TDM data line. The input of the clock compensation module is connected to the PCG unit of the ADSP chip, and the outputs are respectively... The control module is connected to the clock pins of the multi-channel input module and each output module. It connects to the ADSP chip, the first output module, the second output module, and the clock compensation module via dual I2C buses (the main bus is used for regular parameter configuration, and the secondary bus is used for dynamic signaling transmission). The main bus is used to configure the initial operating parameters of each module (such as the initial TDM frame structure, protocol identification threshold, and clock reference parameters), while the secondary bus is used to transmit signaling instructions for dynamic channel reconfiguration, enabling uninterrupted parameter updates. Each output module is equipped with a signaling receiving and fast response unit to receive the dynamic reconfiguration instructions from the control module and synchronously update the channel identification rules without requiring a module restart.

[0069] like Figure 3 As shown, the basic frame length of the dynamically reconstructed TDM frame is 32 channels, with each channel corresponding to 24 bits of audio data. The dynamically reconstructed TDM frame also includes a frame synchronization signal and a dynamic reconstruction field. The dynamic reconstruction field is used to identify the number of valid channels in the current frame and the channel allocation strategy version. The frame synchronization signal also includes a signaling synchronization flag bit, which is used to cooperate with the uninterrupted transmission of the dynamic reconfiguration signaling. The dynamic reconfiguration signaling is used to adjust the data recognition mode of the first output module and the second output module.

[0070] For example, the basic frame length of the TDM frame can be configured to 32 channels (with a maximum support for dynamic allocation of 32 channels), the frame synchronization width to be 32 bits, and each channel to correspond to 24 bits of PCM audio data; a dynamic reconstruction field (occupying 4 bits) is defined for the frame structure to identify the number of valid channels and the channel allocation strategy version of the current frame; a signaling synchronization flag bit is added to the frame synchronization signal (FS) to facilitate uninterrupted transmission of dynamic reconfiguration signaling; the timing relationship between the bit clock (BCLK) and the frame synchronization signal is pre-optimized by the PCG unit to set the initial synchronization reference.

[0071] Optionally, the SPORT0 module of the ADSP chip can be configured as a multi-protocol receiving mode, enabling the built-in protocol feature recognition unit and configuring the signal feature recognition thresholds for I2S / TDM / AES3 protocols (such as the frequency ratio of LRCK to BCLK in I2S, the frame synchronization width in TDM, and the bit encoding features in AES3). The SPORT1 module can be configured as a dynamically reconfigurable TDM output mode, with the initial register configured as (0x03<<12)|(0x1F<<8)|(0x18<<0), where 0x03<<12 represents TDM mode, 0x1F<<8 represents a maximum frame length of 32 channels, and 0x18<<0 represents a 24-bit data width. The control module configures the initial parameters of the clock compensation module through the main I2C bus, setting the PLL multiplication factor, the filtering threshold of the jitter canceller, and the initial compensation value of the delay compensation register, so that the clock compensation module and the PCG unit of the ADSP chip can achieve clock synchronization.

[0072] In one possible implementation, the default channel allocation strategy for dynamically reconstructed TDM frames is initialized, and the data identification modes of the first output module and the second output module are adjusted to modes corresponding to the default channel allocation strategy, including:

[0073] Channels 0 to 7 are initialized as the first output channel group corresponding to the first output module, channels 8 to 9 are initialized as the second output channel group corresponding to the second output module, and the remaining channels are initialized as dynamically reserved channels, thus obtaining the default channel allocation strategy.

[0074] Based on the default channel allocation strategy, the first output module is adjusted to a data recognition mode that only recognizes data from channels 0 to 7, and the second output module is adjusted to a data recognition mode that only recognizes data from channels 8 to 9.

[0075] For example, the initial channel allocation strategy for TDM frames can be set as follows: channels 0-7 are the first output channel group (allocated to the CS4385 chip), channels 8-9 are the second output channel group (allocated to the MA12070P chip), and the remaining channels are dynamically reserved channels. The control module configures the registers of each output module through the main I2C bus to enable it to recognize the initial channel group data: the CS4385 chip's register 0x04 is configured to TDM mode, recognizing only channel 0-7 data; the MA12070P chip's register 0x11 is configured to BCLK multiple adaptation mode, recognizing only channel 8-9 data; at the same time, the signaling reception and fast response units of each output module are enabled, and the signaling reception baud rate of the secondary I2C bus is configured to 400Kbps to ensure fast signaling transmission.

[0076] In one possible implementation, the process includes acquiring audio data to be allocated, extracting signal feature parameters corresponding to the audio data to be allocated, and identifying the target protocol corresponding to the audio data to be allocated based on the signal feature parameters, including:

[0077] Acquire the audio data to be allocated, and extract the width of the frame synchronization signal, the frequency ratio of the clock signal, the encoding format of the data bits, and the frame interval features corresponding to the audio data to be allocated, to obtain the signal feature parameters corresponding to the audio data to be allocated.

[0078] Based on the signal feature parameters, a feature-differentiated weighted matching strategy is used to identify the target protocol corresponding to the audio data to be assigned.

[0079] In one possible implementation, based on the signal feature parameters, a feature-differentiated weighted matching strategy is used to identify the target protocol corresponding to the audio data to be assigned, including:

[0080] Obtain the difference between the signal feature parameters and the preset protocol feature thresholds of each protocol; wherein, each protocol sets a corresponding protocol feature threshold for each signal feature parameter;

[0081] For any given protocol, the matching degree is determined based on all the differential values ​​corresponding to the protocol.

[0082] Protocols with a matching degree greater than a preset threshold are selected as the target protocols corresponding to the audio data to be assigned.

[0083] In one possible implementation, the matching degree determination rule can be set as follows:

[0084] When the matching degree is ≥95%, it is directly determined to be the corresponding protocol;

[0085] When the matching degree is ∈ [80%, 95%), the multi-cycle feature verification mechanism is activated, the feature acquisition cycle is extended to 50μs, and 3 rounds of continuous feature acquisition and matching are added. If the matching degree of 3 consecutive rounds is ≥85%, it is determined to be the corresponding protocol; otherwise, the fuzzy protocol processing flow is entered.

[0086] When the matching degree is less than 80%, the fuzzy protocol processing flow is directly entered: the input data is cached in a temporary buffer with a depth of 2 frames, an alarm signal of "protocol recognition failure" is sent to the control module, the control module triggers the default protocol adaptation strategy (preferentially adapting to TDM protocol, frame synchronization width of 32 bits by default, and number of channels of 8 by default), and outputs a prompt to the user terminal through the secondary I2C bus. If no manual configuration command is received or no valid feature is detected for 500 consecutive ms, the I2S protocol is automatically switched to for backup adaptation.

[0087] In one possible implementation, based on the target protocol corresponding to the audio data to be allocated, the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame to obtain the target audio data frame, including:

[0088] If the target protocol corresponding to the audio data to be allocated is the I2S protocol, then the data of the two channels contained in the audio data to be allocated is mapped and encapsulated into the first two channels of the dynamically reconstructed TDM frame to obtain the dynamically reconstructed TDM frame.

[0089] If the target protocol corresponding to the audio data to be allocated is the TDM protocol, then the frame synchronization width and channel number corresponding to the audio data to be allocated are parsed, and the audio data in the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame according to the frame synchronization width and channel number.

[0090] If the target protocol corresponding to the audio data to be allocated is AES3, then the audio data to be allocated is deserialized and decoded to obtain 8-channel audio data. The 8-channel audio data is then encapsulated into channels 0 to 7 of the dynamically reconstructed TDM frame, and the remaining channels are filled with silence data to obtain the dynamically reconstructed TDM frame.

[0091] Optionally, the specific encapsulation process and channel mapping rules can be as follows:

[0092] Parse the frame synchronization (FS) width of the input TDM signal: The high-level duration of the FS signal is identified by the edge detection unit of the ADSP chip to determine the input frame synchronization width (denoted as FSin, unit: bit).

[0093] The number of input TDM signal channels is calculated using the formula Chin=FSin / 24 (where 24 is the bit width of a single-channel audio data).

[0094] Parse the bit clock (BCLK) frequency of the input TDM signal: Obtain the BCLK frequency through the frequency detection module of the PCG unit and verify whether it matches the preset 2.8224MHz / 5.6448MHz standard audio clock. If the deviation is >1%, start the clock compensation module to perform frequency calibration.

[0095] (2) Dynamically reconstructed TDM frame encapsulation rules:

[0096] When the number of input channels Chin≤32: the nth channel (n=0,1,...,Chin-1) of the input TDM signal is losslessly mapped to the nth channel of the dynamically reconstructed TDM frame. The Chin~31 channels of the dynamically reconstructed TDM frame are filled with 0x00 (mute data), and the actual number of effective channels Chin is identified in the "Number of Effective Channels" bit of the dynamic reconstruction field.

[0097] When the number of input channels Chin > 32: the channel priority filtering mechanism is activated, the first 8 channels (main audio channels) of the input TDM signal are reserved first, and the top 24 channels with the highest energy ratio among the last 24 channels are selected according to the low frequency energy ratio, for a total of 32 channels. These channels are mapped to channels 0 to 31 of the dynamically reconstructed TDM frame in the order of "main channel first, high energy channel last". The "channel allocation strategy version" bit of the dynamic reconstruction field is marked as "overload adaptation mode", and log information is sent to the control module.

[0098] (3) Encapsulation verification and fault tolerance: After encapsulation, the reconstructed frame data is verified by the CRC32 verification module; if packet loss is detected in the input TDM data (the data of a certain channel is 0xFF for 3 consecutive frames), the valid data of the previous frame is filled in the corresponding channel of the reconstructed frame; the encapsulation time is ≤2ms, and the data is transferred at high speed through the DMA direct memory access module of the ADSP chip; if the target protocol is the AES3 protocol, the audio data to be allocated is deserialized and decoded to obtain 8-channel audio data, and the 8-channel audio data is encapsulated into the 0 to 7 channels of the dynamically reconstructed TDM frame, and the remaining channels are filled with silence data to obtain the dynamically reconstructed TDM frame.

[0099] For example, the protocol feature recognition unit of the ADSP chip performs real-time signal feature extraction on the audio data of the input module. The extracted features include: the width of the frame synchronization signal, the frequency ratio of the clock signal, the encoding format of the data bits, and the frame interval features. The specific recognition and switching process is as follows:

[0100] (1) Feature acquisition: The feature parameters of the input signal are continuously acquired with an acquisition period of 10μs to form a feature dataset;

[0101] (2) Fast decision: The collected feature dataset is matched with the pre-configured I2S / TDM / AES3 protocol feature thresholds. The threshold weighted fast decision algorithm is used to calculate the matching degree. This algorithm sets differentiated weighting coefficients for the core features of each protocol. The weight of core features such as frame synchronization width and clock frequency ratio accounts for ≥80%, and the weight of secondary features accounts for ≤20%. When the matching degree is ≥95%, it is directly determined to be the corresponding protocol. The entire recognition process has a delay of ≤10ms. This delay is the total time from the start of feature collection to the completion of protocol type determination, including multiple rounds of feature collection, weighted calculation and protocol matching. It is within the range of delays that are imperceptible to the human ear and is far lower than the recognition delay of more than 100ms in the existing technology.

[0102] (3) Seamless Conversion: If the protocol is identified as I2S, the two channels of data are seamlessly mapped to the first two channels of the TDM frame, and channels are dynamically reserved to fill with silent data. If the protocol is identified as TDM, the frame synchronization width and number of channels are parsed, the effective audio data is extracted and losslessly encapsulated into a dynamically reconfigurable TDM frame structure. This lossless encapsulation is a complete bit-level encapsulation of the original audio data. The encapsulation process only adapts the data to the frame structure format without any compression, omission, or modulation processing, ensuring the original integrity of the audio data and avoiding problems such as audio distortion and signal-to-noise ratio reduction caused by data loss. If the protocol is identified as AES3, the serial data is first deserialized and decoded, and then the data is losslessly encapsulated into a TDM frame structure. During the conversion process, a data buffer pool technology (buffer depth of 1 frame of data) is used to avoid audio dropouts and stuttering during protocol switching, achieving seamless switching.

[0103] In one possible implementation, collecting the audio feature parameters corresponding to the audio data to be allocated, the first load monitoring data corresponding to the first output module, and the second load monitoring data corresponding to the second output module includes:

[0104] Collect the human voice features, music features, and vocal tract energy distribution corresponding to the audio data to be assigned, and obtain the audio feature parameters corresponding to the audio data to be assigned.

[0105] Collect the bandwidth utilization and module workload of the first output module to obtain the first load monitoring data of the first output module.

[0106] The bandwidth utilization and module workload of the second output module are collected to obtain the first load monitoring data of the second output module.

[0107] In one possible implementation, a channel allocation strategy is obtained based on the audio feature parameters, first load monitoring data, and second load monitoring data. The default channel allocation strategy is then adjusted according to the channel allocation strategy to reconstruct the target audio data frame, resulting in a reconstructed audio data frame. This includes:

[0108] Based on the audio feature parameters, the first load monitoring data, and the second load monitoring data, a fuzzy decision algorithm is used to determine the channel allocation strategy.

[0109] The method of using a fuzzy decision-making algorithm to determine the channel allocation strategy specifically includes:

[0110] Data acquisition: Acquire 6-dimensional core input parameters, including low-frequency energy ratio and channel energy distribution uniformity in audio feature parameters, bandwidth utilization and chip workload in the first load monitoring data, and bandwidth utilization and chip workload in the second load monitoring data.

[0111] Normalization: The 6-dimensional core input parameters are mapped to the closed interval [0,1] using a linear normalization algorithm to obtain a standardized input vector, eliminating the dimensional differences between different parameters. The formula for the linear normalization algorithm is as follows:

[0112] ;

[0113] in, As the first The normalized standard input values ​​of each parameter For the first The original collected values ​​of each parameter, For the first The maximum hardware threshold for each parameter. For the first The minimum hardware threshold for each parameter; the time taken for a single round of this step is ≤2ms, providing a standardized and unified input basis for subsequent execution of the algorithm;

[0114] Input parameter fuzzification: Define a fuzzy set with a universe of discourse of [0,1] and fuzzy subsets {low (L), medium (M), high (H)}. Calculate the membership value of each standardized parameter corresponding to each fuzzy subset using a triangular membership function, converting the precise value into a fuzzy linguistic value. The formulas for the triangular membership function for any standardized parameter x^i and corresponding fuzzy subsets {low (L), medium (M), high (H)} are as follows:

[0115] ;

[0116] ;

[0117] ;

[0118] in, , , Standardized parameters The membership values ​​correspond to low, medium, and high fuzzy subsets; this step uses the triangular membership function, which is suitable for the fast computing requirements of embedded hardware, and the time taken per round is ≤2ms;

[0119] Fuzzy rule inference: A dedicated fuzzy rule library is constructed with "audio features as the core and load status as a hard constraint." This library consists of 18 IF-THEN rules covering combinations of fuzzy subsets of 6-dimensional input parameters. Rule triggering priority is set so that audio features take precedence over system load, and hardware load hard constraint rules are implemented. The Mamdani inference method is used for fuzzy rule inference to obtain the final membership values ​​of the fuzzy subsets {low (L), medium (M), high (H)} corresponding to the decision value Y. The core formula is:

[0120]

[0121] in, For the decision value Y, the corresponding number of... The final membership value of a fuzzy subset. For the rule sequence number of the dedicated fuzzy rule base, to For the first The fuzzy subsets corresponding to the 6 input parameters in the rule. For the first Each input parameter corresponds to a fuzzy subset. The membership value, For the smaller conjunctive operation, For the disjunction operation to take the largest value;

[0122] The hardware load hard constraint rule is as follows: if the bandwidth utilization rate or chip workload of the first output module corresponds to a high (H) fuzzy subset, then the fuzzy value of the decision value Y does not exceed the medium (M), and it is prohibited to add channels to the first output module; if the bandwidth utilization rate or chip workload of the second output module corresponds to a high (H) fuzzy subset, then the fuzzy value of the decision value Y is not lower than the medium (M), and it is prohibited to add channels to the second output module; this step is the core innovation of the fuzzy decision algorithm, and the rule base is customized in combination with the audio transmission service requirements, with a single round of inference time ≤3ms;

[0123] Defuzzification of inference results: The centroid method is used to defuzzify the inference results, converting the fuzzy membership values ​​into precise decision values ​​Y in the interval [0,1]. The formula is as follows:

[0124] ;

[0125] in, For accurate decision values, For decision value The final membership values ​​corresponding to low, medium, and high fuzzy subsets, The fixed quantization value is the corresponding to the fuzzy subset; the centroid method balances the defuzzification accuracy and the difficulty of hardware implementation, and is the mainstream solution in the industry. The time taken for a single round of this step is ≤1ms.

[0126] (6) Strategy Mapping: The precise decision value Y is mapped to a preset channel allocation strategy set according to a preset interval threshold. The value range of the precise decision value Y corresponds one-to-one with the strategies in the channel allocation strategy set to obtain the final TDM frame channel allocation strategy. The mapping relationship is as follows:

[0127] When Y∈[0,0.4), a channel allocation strategy prioritizing human voice / main channel is implemented, wherein the first output module is allocated TDM frame channels 0~7 and the second output module is allocated TDM frame channels 8~9.

[0128] When Y∈[0.4,0.6), the channel allocation strategy for balanced mapping is as follows: the first output module is allocated TDM frame channels 0~6, and the second output module is allocated TDM frame channels 7~10.

[0129] When Y∈[0.6,1], a channel allocation strategy prioritizing music / bass is mapped, wherein the strategy allocates TDM frame channels 0~5 to the first output module and TDM frame channels 6~13 to the second output module.

[0130] According to the channel allocation strategy, the dynamic reconstruction field in the default channel allocation strategy is modified to allocate some or all of the dynamically reserved channels to the first output module and / or the second output module, thereby obtaining reconstructed audio data frames. For example, assuming that channels 10-13 are to be allocated to the MA12070P chip, it is only necessary to modify the dynamic reconstruction field and revise the identification rules of the output module through dynamic reconfiguration signaling.

[0131] In one possible implementation, while adjusting the default channel allocation strategy, the data recognition modes of the first output module and the second output module are simultaneously adjusted, including:

[0132] While adjusting the default channel allocation strategy, a dynamic reconfiguration signaling with a synchronization identifier is sent to each first output module and the second output module. The dynamic reconfiguration signaling includes the new channel identification rules and the effective time.

[0133] For example, the control module works in conjunction with the ADSP chip to monitor the system status and audio content characteristics in real time, and dynamically adjusts the channel allocation strategy of TDM frames based on the monitoring results to achieve uninterrupted channel reconfiguration. The specific process is as follows:

[0134] (1) Status monitoring: The audio feature analysis unit of the ADSP chip extracts the features of the input audio in real time (such as human voice / music features, channel energy distribution), and the control module monitors the system load in real time (such as the working status of each output module and data transmission bandwidth), and exchanges the monitoring data in real time;

[0135] (2) Strategy Decision-Making: Multiple channel allocation strategies are preset (e.g., music mode: allocate channels 10-13 to the MA12070P chip to increase the number of bass channels; vocal mode: retain the initial channel allocation and optimize the signal gain of the main channel; light load mode: reduce the number of effective channels and reduce system power consumption). The control module selects the optimal channel allocation strategy based on monitoring data through a fuzzy decision-making algorithm. This fuzzy decision-making algorithm takes audio feature parameters (such as low-frequency energy ratio and channel energy distribution uniformity) and system load parameters (such as bandwidth utilization and module workload) as input variables, presets the membership function and decision rules of each variable, and outputs the optimal channel allocation strategy through fuzzification, fuzzy inference, and defuzzification steps. It can realize comprehensive decision-making of multi-dimensional parameters, avoid the limitations of single parameter judgment, and adapt to complex audio and system scenarios.

[0136] (3) Frame Structure Reconstruction: The dynamic frame configuration unit of the ADSP chip modifies the dynamic reconstruction field of the TDM frame in real time according to the selected strategy, and adjusts the number of effective channels and the channel allocation relationship. In the 4-bit data of the dynamic reconstruction field, the high 2 bits indicate the number of effective channels of the current TDM frame (in units of 4 channels), and the low 2 bits indicate the channel allocation strategy version. The modification process is to rewrite the bit-level of this 4-bit field in real time. The channel allocation relationship is adjusted by redefining the corresponding channel intervals of each output module. The entire modification and adjustment process is completed within a single frame TDM data transmission cycle, and the continuity of the frame synchronization signal is maintained without interrupting data transmission.

[0137] (4) Uninterrupted signaling transmission: The control module sends dynamic reconfiguration signaling with synchronization flags to each output module through the secondary I2C bus. The signaling includes new channel identification rules and effective time (aligned with the frame synchronization signal of the TDM frame).

[0138] (5) Fast Response Update: After receiving the signaling, the signaling receiving and fast response units of each output module update the channel identification rules at the start of the next frame synchronization signal. The entire reconfiguration process has a response time of ≤50ms and no audio interruption or distortion, realizing uninterrupted dynamic reconfiguration of the channel.

[0139] For long-distance transmission (≥10m) and multi-level cascading scenarios, sub-nanosecond signal synchronization is achieved through the coordinated optimization of the clock compensation module and the ADSP chip PCG unit. The specific mechanism is as follows:

[0140] (1) Special optimization of PCG unit: The PCG unit of the ADSP chip is configured with dedicated audio TDM transmission, and the clock division coefficient of the PCG unit is configured to be 24-bit precise division, so that the jitter error of the generated MCLK / BCLK / WS clock signal is ≤0.1ns; at the same time, the clock lock mode of the PCG unit is configured to ensure the frequency stability of the clock signal.

[0141] (2) Real-time clock recovery: The phase-locked loop (PLL) of the clock compensation module performs real-time phase-locked tracking of the clock signal output by the ADSP chip. When long-distance transmission causes the clock signal to attenuate or deviate, the PLL quickly recovers the phase and frequency of the clock signal, with a recovery response time ≤5ns.

[0142] (3) Jitter Removal: The jitter remover employs a multi-stage active filtering algorithm, which is a four-stage cascaded low-pass active filtering algorithm based on an active operational amplifier. It consists of a pre-buffer stage, two active RC filter stages, and a post-shaping stage cascaded in sequence. The pre-buffer stage achieves impedance matching and signal amplification of the clock signal, avoiding signal attenuation during the filtering process. The two active RC filter stages adopt an infinite gain multi-path feedback topology to accurately filter out high-frequency jitter interference in the clock signal. The post-shaping stage performs edge shaping on the filtered clock signal to ensure that the duty cycle of the clock signal is stable at 50%. Through the multi-stage cascaded filtering architecture, this algorithm achieves layered filtering of jitter interference in different frequency bands (1MHz~1GHz), with a clock jitter suppression ratio ≥90dB. Finally, the recovered clock signal is filtered to completely eliminate clock jitter caused by electromagnetic interference and line loss introduced during transmission, keeping the jitter error under sub-nanosecond level (≤0.5ns).

[0143] (4) Precise Delay Compensation: The delay compensation register performs real-time detection and quantification of the signal transmission delay of each module. Based on the detection results (in units of 0.1ns), it outputs precise delay compensation values ​​to each module to compensate for the transmission delay differences of different links and different modules, ensuring that the synchronization error of multi-channel data transmission is ≤0.1ns.

[0144] The ADSP chip outputs the TDM data after protocol conversion and frame structure reconstruction to the common TDM data line through the SPORT1 module. The clock compensation module synchronously outputs the optimized clock signal to each input and output module. Each output module accurately extracts its corresponding channel data from the TDM frame according to the currently effective channel identification rules, and completes the reception and processing of audio signals in combination with the optimized clock signal. Throughout the transmission process, the data and clock signal are strictly synchronized to ensure audio playback quality.

[0145] Based on the above technical solution, the technical effects produced by the embodiments of this application are as follows:

[0146] (1) Significantly reduce hardware complexity and cost: Data is allocated by TDM time slices, and multiple output modules share a single TDM data line, eliminating the need for dedicated channel allocation chips and multiple sets of independent data lines, reducing PCB board space occupation and material consumption, and reducing hardware costs by more than 30%; at the same time, software algorithms are used to realize multi-protocol conversion and dynamic channel scheduling, replacing dedicated protocol conversion chips and channel scheduling chips, further reducing hardware procurement costs.

[0147] (2) Achieve automatic identification and seamless switching of multiple protocols, greatly improving compatibility and switching efficiency: Through a threshold weighted fast decision algorithm based on signal characteristics and data buffer pool technology, it achieves automatic identification (identification delay ≤10ms) and seamless switching of three mainstream audio protocols: I2S / TDM / AES3. The switching process is free of interruption and stuttering; no additional protocol conversion module is required, adapting to different types of input devices, significantly improving compatibility, and solving the pain points of low protocol switching efficiency and poor adaptability of existing technologies.

[0148] (3) Achieve uninterrupted dynamic channel reconfiguration during runtime, resulting in a leap in flexibility and system adaptability: Through a dynamically reconfigurable TDM frame structure and a dual I2C bus uninterrupted signaling mechanism, dynamic channel allocation and reconfiguration based on audio content and system load are achieved. The reconfiguration response time is ≤50ms, with no audio interruption or distortion. The TDM frame supports dynamic allocation of up to 32 channels. If channel expansion or adjustment is required, only a software update strategy is needed, without redesigning hardware wiring or restarting the system. The flexibility of channel expansion and adjustment far exceeds that of existing static allocation schemes, and can adapt to diverse dynamic scenario requirements such as professional audio and in-vehicle audio.

[0149] (4) Achieve sub-nanosecond signal synchronization with excellent synchronization performance under long-distance / cascaded transmission: Through dedicated optimization of the PCG unit and a clock recovery / jitter elimination / delay compensation linkage mechanism, the jitter error of the clock signal is ≤0.5ns, and the synchronization error of multi-channel data transmission is ≤0.1ns. Even in long-distance transmission (≥10m) and multi-level cascaded scenarios, extremely strict signal synchronization can still be guaranteed. It completely solves the problem of poor synchronization in complex scenarios of existing technologies, avoids phase misalignment of audio signals between multiple output devices, and greatly improves the audio playback effect.

[0150] (5) Simplify hardware design and improve system stability and resource utilization: The CS4385 chip only needs to enable the SDIN1 pin, and the MA12070P chip is directly connected in parallel to the common data line, reducing wiring density and PCB design difficulty; at the same time, the dynamic channel scheduling mechanism can reasonably allocate channel resources according to the system status, improve system resource utilization, reduce ineffective power consumption, and improve the overall system stability.

[0151] (6) Separation of signaling and data transmission to improve system response speed: Dual I2C buses are used to separate the transmission of conventional configuration and dynamic signaling, avoiding transmission conflicts between signaling and data, ensuring fast and reliable transmission of dynamic reconfiguration signaling, and further improving the system response speed and stability.

[0152] Based on the above technical solutions, this application provides two specific implementation examples to further illustrate the technical principles.

[0153] Specific implementation case 1: Professional audio recording and playback system (professional high-requirement scenario).

[0154] 1. Hardware configuration;

[0155] (1) ADSP chip: ADSP-21565, main frequency 983.04MHz, built-in protocol feature recognition unit and dynamic frame configuration unit, and generates reference clock through PLL frequency multiplication of 24.576MHz crystal oscillator;

[0156] (2) Multi-channel input module: 4 ES9831 chips, each chip integrates 2 ADCs to form an 8-channel acquisition array, supporting 24bit / 192kHz sampling rate, and supporting I2S / TDM / AES3 multi-protocol output;

[0157] (3) First output module: CS43858 channel DAC chip, dynamic range 114dB, THD+N≤-100dB, built-in signaling reception and fast response unit;

[0158] Second output module: MA12070P power amplifier chip, supports 2 or more input channels, differential output mode, and built-in signaling receiver and fast response unit;

[0159] (4) Control module: STM32F103MCU, configured with dual I2C buses (master / slave), master bus baud rate 100Kbps, slave bus baud rate 400Kbps;

[0160] (5) Clock compensation module: It consists of AD9516 phase-locked loop, multi-stage active filter jitter eliminator, and 0.1ns-level delay compensation register, and is linked with the PCG unit of the ADSP chip;

[0161] ⑹ Transmission link: The TDM data cable uses shielded twisted pair cable, with a transmission distance of 15m (for long-distance transmission scenarios).

[0162] 2. Specific configuration and working process;

[0163] (1) Initial configuration;

[0164] TDM frame basic structure: configured with 32 channels, frame synchronization width of 32 bits (including 1 bit signaling synchronization flag), dynamic reconstruction field of 4 bits, 24 bits PCM data bit width, BCLK frequency of 12.288MHz (adapted to 192kHz sampling rate).

[0165] ①ADSP chip configuration: SPORT0 is a multi-protocol receiving mode, configured with feature recognition thresholds for I2S (LRCK:BCLK=1:256), TDM (32-bit frame synchronization), and AES3 (bit encoding is biphase mark encoding); SPORT1 is a dynamically reconfigurable TDM output mode, with initial register configuration of (0x03<<12)|(0x1F<<8)|(0x18<<0);

[0166] ②PCG unit optimization: configured with 24-bit precise frequency division and clock-locked mode, the generated MCLK / BCLK / WS jitter error is ≤0.1ns;

[0167] ③ Initial channel allocation: Channels 0-7 → CS4385 (monitoring headphones), Channels 8-9 → MA12070P (main speaker), Channels 10-13 are dynamically reserved (bass enhancement channels), and the rest are spare channels;

[0168] ④ Clock compensation module configuration: PLL multiplication factor is 2048, jitter canceller filter threshold is 0.1ns, and delay compensation register initial value is 0ns.

[0169] (2) Seamless switching between multiple protocols during runtime;

[0170] When the external input device is switched from a TDM protocol microphone array to an AES3 protocol professional audio player:

[0171] ① The protocol feature identification unit of ADSP collects signal features with a period of 10μs, detects AES3 features such as biphase mark coding and frame interval of 125μs, with a weighted matching degree of 98%, and completes protocol determination within 10ms;

[0172] ② The data buffer pool temporarily stores the current TDM data, while deserializing and decoding the AES3 data, and encapsulating it into a 32-channel TDM frame without loss. The 8 channels of AES3 data are mapped to channels 0-7, and the remaining channels are filled with silent data.

[0173] ③ There is no interruption or stuttering during the switching process, and the audio playback of the monitoring headphones and the main speaker is continuous, achieving seamless switching from AES3 to TDM.

[0174] (3) Dynamic channel reconfiguration without interruption during runtime;

[0175] When the audio content switches from human voice recording to music playback:

[0176] ①The ADSP's audio feature analysis unit extracted music features with a 30% increase in low-frequency energy proportion**, and the control module detected that the system load was light (bandwidth utilization ≤40%).

[0177] ② The control module selects the music mode allocation strategy through a fuzzy decision algorithm: channels 8-13 are allocated to the MA12070P chip, increasing the number of bass channels (from 2 channels to 6 channels).

[0178] ③ ADSP dynamically reconstructs the TDM frame structure and modifies the dynamic reconstruction field to “00110010” (effective channel 14, music mode strategy).

[0179] ④ The control module sends a reconfiguration signal to the MA12070P via the secondary I2C bus. The signal takes effect at the start time of the next frame synchronization signal.

[0180] ⑤After receiving the signaling, the MA12070P signaling receiving unit updates the channel identification rules (identifying channels 8-13) at the frame synchronization signal alignment time. The entire reconfiguration process takes 45ms, and the music playback is uninterrupted and distortion-free, with a significant improvement in bass effect.

[0181] (4) Sub-nanosecond synchronization under long-distance transmission;

[0182] ①With a TDM data line transmission distance of 15m, the clock compensation module achieves the following effect:

[0183] ②The PLL performs real-time phase-locking on the clock signal output by the PCG unit to restore the phase shift caused by long-distance transmission, with a recovery response time of 3ns;

[0184] ③ The jitter eliminator reduces clock jitter from the original 2ns to 0.3ns (sub-nanosecond level) through multi-stage active filtering.

[0185] ④ The delay compensation register detects that the transmission delay difference between CS4385 and MA12070P is 0.5ns, and outputs a compensation value of 0.5ns to MA12070P;

[0186] ⑤ The synchronization error of the final multi-channel data transmission is ≤0.1ns, and the audio phase of the monitoring headphones and the main speaker is completely aligned without phase misalignment.

[0187] In this implementation case, the system supports multi-channel audio transmission with 8 inputs and 32 dynamic outputs, with end-to-end latency ≤1.8ms, THD+N ≤-102dB, and phase difference between multiple output devices ≤0.1ns; it supports automatic recognition and seamless switching of I2S / TDM / AES3 protocols (recognition ≤10ms, switching without stuttering); it achieves uninterrupted dynamic channel reconfiguration during operation (response ≤50ms); it maintains sub-nanosecond synchronization even at a long distance of 15m; it eliminates the need for dedicated allocation chips and protocol conversion chips, reducing hardware costs by 35% and PCB wiring density by 40%; and it perfectly adapts to the high requirements of professional recording studios for multi-channel recording, multi-protocol input, and dynamic sound effect adjustment.

[0188] Specific implementation case 2: In-vehicle multi-channel audio system (complex in-vehicle scenarios).

[0189] 1. Hardware configuration;

[0190] (1) ADSP chip: TITMS320C6748, supports TDM mode and multi-protocol recognition, and has a built-in audio feature analysis unit;

[0191] (2) Multi-channel input module: 2 ES9831 chips to form a 4-channel acquisition array (vehicle microphone), supporting I2S / TDM protocol;

[0192] (3) First output module: CS43444 channel DAC chip (front and rear door speakers), with built-in signaling receiver unit;

[0193] (4) Second output module: TPA3116D2 power amplifier chip (subwoofer), with built-in signaling receiver unit;

[0194] (5) Control module: STM32F407MCU, dual I2C bus, adapted to high and low temperature automotive environments;

[0195] (6) Clock compensation module: Si5351 clock chip (integrating PLL, jitter elimination, and delay compensation), linked with the ADSPPCG unit;

[0196] (7) Transmission link: The vehicle wiring is a multi-branch link with a maximum transmission distance of 8m, which is subject to electromagnetic interference.

[0197] 2. Specific configuration and working process;

[0198] (1) Initial configuration;

[0199] ①TDM frame basic structure: configured with 16 channels, frame synchronization width of 32 bits, dynamic reconstruction field of 4 bits, to adapt to the limited bandwidth of the vehicle;

[0200] ②Initial channel allocation: Channels 0-3 → CS4344 (door speakers), Channels 4-5 → TPA3116D2 (subwoofer), the rest are dynamically reserved channels;

[0201] ③PCG unit and clock compensation module configuration: adapted to vehicle 12V power supply, PCG unit configured in low power clock lock mode, and clock compensation module filtering threshold adapted to vehicle electromagnetic interference environment.

[0202] (2) Dynamic channel reconfiguration at runtime (adaptation for vehicle scenarios);

[0203] When the vehicle switches from driving mode to parked entertainment mode:

[0204] ① The control module detected a decrease in the load of the vehicle system, and the ADSP extracted the audio content and switched from navigation voice to in-vehicle music (high frequency + low frequency energy enhancement).

[0205] ② Control module decision entertainment mode strategy: allocate channels 6-7 to CS4344 (rear speaker enhancement), and allocate channels 8-9 to TPA3116D2 (subwoofer dual-channel enhancement); it is worth noting that the various channel allocation schemes described in this application are only preferred examples. The number of channels can be set for different output modules according to the data channels corresponding to the protocols that the output modules can recognize.

[0206] ③ The signaling transmission via the secondary I2C bus is synchronized with the frame, and the channel reconfiguration is completed within 40ms, ensuring uninterrupted music playback and simultaneous enhancement of rear-row sound effects and bass effects.

[0207] (3) Optimization of clock synchronization under vehicle electromagnetic interference;

[0208] The in-vehicle environment is subject to complex electromagnetic interference. The clock compensation module reduces the clock jitter from 5ns to 0.4ns, and the delay compensation register provides precise compensation of 0.3ns for the link delay difference between the door speakers and the subwoofer, ensuring that the synchronization error between multiple devices is ≤0.1ns, with no audio distortion or phase misalignment.

[0209] (4) Channel expansion (vehicle model differentiation adaptation);

[0210] For higher-spec models, audio output for the rear entertainment screen needs to be added:

[0211] ① The newly added DAC chip (PCM5102) only needs to be connected in parallel on the shared TDM data line, without rewiring;

[0212] ② The control module updates the channel allocation strategy through software, allocates channels 10-11 to the newly added DAC chip, modifies the dynamic reconstruction field of TDM frames, and completes the uninterrupted expansion within 50ms;

[0213] ③ No need to redesign hardware circuits, reducing the differentiated development costs for different configuration models.

[0214] This system is adaptable to high and low temperature environments in vehicles (-10℃~+40℃) and has strong anti-electromagnetic interference capabilities. Under an 8m multi-branch transmission link, the signal synchronization error is ≤0.1ns, with no phase misalignment or audio distortion. It supports uninterrupted dynamic channel reconfiguration during operation, adapting to multiple scenarios such as in-vehicle navigation, music, and entertainment. The channel expansion is flexible, eliminating the need for rewiring and reducing the cost of differentiated development for different vehicle models by more than 30%. The hardware structure is compact, adapting to the limited installation space in vehicles and meeting the high reliability and high adaptability requirements of in-vehicle audio systems.

[0215] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0216] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0217] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0218] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0219] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0220] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A TDM multi-channel allocation method compatible with multiple protocols, characterized in that, include: Initialize the default channel allocation strategy for dynamically reconstructing TDM frames, and adjust the data identification mode of the first output module and the second output module to the mode corresponding to the default channel allocation strategy; Acquire audio data to be assigned, extract signal feature parameters corresponding to the audio data to be assigned, and identify the target protocol corresponding to the audio data to be assigned based on the signal feature parameters; Based on the target protocol corresponding to the audio data to be allocated, the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame to obtain the target audio data frame; Collect the audio feature parameters corresponding to the audio data to be allocated, the first load monitoring data corresponding to the first output module, and the second load monitoring data corresponding to the second output module; Based on the audio feature parameters, the first load monitoring data, and the second load monitoring data, a channel allocation strategy is obtained, and the default channel allocation strategy is adjusted according to the channel allocation strategy to reconstruct the target audio data frame and obtain the reconstructed audio data frame. While adjusting the default channel allocation strategy, the data recognition modes of the first output module and the second output module are adjusted simultaneously. The reconstructed audio data frame is synchronously transmitted to the first output module and the second output module, so that the first output module and the second output module can output audio data based on the adjusted data recognition mode; The dynamically reconstructed TDM frame represents a data frame compatible with the output channels of the first output module and the second output module; the first output module and the second output module are audio output modules with different protocols.

2. The TDM multi-channel allocation method compatible with multiple protocols according to claim 1, characterized in that, Also includes: During TDM multi-channel allocation, clock signals are tracked and recovered, jitter is eliminated, and precise delay compensation is performed to synchronize all data.

3. The TDM multi-channel allocation method compatible with multiple protocols according to claim 1, characterized in that, The basic frame length of the dynamically reconstructed TDM frame is 32 channels, with each channel corresponding to 24 bits of audio data. The dynamically reconstructed TDM frame also includes a frame synchronization signal and a dynamic reconstruction field. The dynamic reconstruction field is used to identify the number of valid channels in the current frame and the channel allocation strategy version. The frame synchronization signal also includes a signaling synchronization flag bit, which is used to cooperate with the uninterrupted transmission of the dynamic reconfiguration signaling. The dynamic reconfiguration signaling is used to adjust the data recognition mode of the first output module and the second output module.

4. The TDM multi-channel allocation method compatible with multiple protocols according to claim 3, characterized in that, Initialize the default channel allocation strategy for dynamically reconstructed TDM frames, and adjust the data identification modes of the first output module and the second output module to the mode corresponding to the default channel allocation strategy, including: Channels 0 to 7 are initialized as the first output channel group corresponding to the first output module, channels 8 to 9 are initialized as the second output channel group corresponding to the second output module, and the remaining channels are initialized as dynamically reserved channels, thus obtaining the default channel allocation strategy. Based on the default channel allocation strategy, the first output module is adjusted to a data recognition mode that only recognizes data from channels 0 to 7, and the second output module is adjusted to a data recognition mode that only recognizes data from channels 8 to 9.

5. The TDM multi-channel allocation method compatible with multiple protocols according to claim 1, characterized in that, Acquire audio data to be assigned, extract signal feature parameters corresponding to the audio data to be assigned, and identify the target protocol corresponding to the audio data to be assigned based on the signal feature parameters, including: Acquire the audio data to be allocated, and extract the width of the frame synchronization signal, the frequency ratio of the clock signal, the encoding format of the data bits, and the frame interval features corresponding to the audio data to be allocated, to obtain the signal feature parameters corresponding to the audio data to be allocated. Based on the signal feature parameters, a feature-differentiated weighted matching strategy is used to identify the target protocol corresponding to the audio data to be assigned.

6. The TDM multi-channel allocation method compatible with multiple protocols according to claim 5, characterized in that, Based on the aforementioned signal feature parameters, a feature-differentiated weighted matching strategy is used to identify the target protocol corresponding to the audio data to be assigned, including: Obtain the difference between the signal feature parameters and the preset protocol feature thresholds of each protocol; wherein, each protocol sets a corresponding protocol feature threshold for each signal feature parameter; For any given protocol, the matching degree is determined based on all the differential values ​​corresponding to the protocol. Protocols with a matching degree greater than a preset threshold are selected as the target protocols corresponding to the audio data to be assigned.

7. The TDM multi-channel allocation method compatible with multiple protocols according to claim 4, characterized in that, Based on the target protocol corresponding to the audio data to be allocated, the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame to obtain the target audio data frame, including: If the target protocol corresponding to the audio data to be allocated is the I2S protocol, then the data of the two channels contained in the audio data to be allocated is mapped and encapsulated into the first two channels of the dynamically reconstructed TDM frame to obtain the dynamically reconstructed TDM frame. If the target protocol corresponding to the audio data to be allocated is the TDM protocol, then the frame synchronization width and channel number corresponding to the audio data to be allocated are parsed, and the audio data in the audio data to be allocated is encapsulated into a dynamically reconstructed TDM frame according to the frame synchronization width and channel number. If the target protocol corresponding to the audio data to be allocated is AES3, then the audio data to be allocated is deserialized and decoded to obtain 8-channel audio data. The 8-channel audio data is then encapsulated into channels 0 to 7 of the dynamically reconstructed TDM frame, and the remaining channels are filled with silence data to obtain the dynamically reconstructed TDM frame.

8. The TDM multi-channel allocation method compatible with multiple protocols according to claim 7, characterized in that, The process of collecting audio feature parameters corresponding to the audio data to be allocated, first load monitoring data corresponding to the first output module, and second load monitoring data corresponding to the second output module includes: Collect the human voice features, music features, and vocal tract energy distribution corresponding to the audio data to be assigned, and obtain the audio feature parameters corresponding to the audio data to be assigned. Collect the bandwidth utilization and module workload of the first output module to obtain the first load monitoring data of the first output module. The bandwidth utilization and module workload of the second output module are collected to obtain the first load monitoring data of the second output module.

9. The TDM multi-channel allocation method compatible with multiple protocols according to claim 8, characterized in that, Based on the audio feature parameters, the first load monitoring data, and the second load monitoring data, a channel allocation strategy is obtained, and the default channel allocation strategy is adjusted according to the channel allocation strategy to reconstruct the target audio data frame, resulting in a reconstructed audio data frame, including: Based on the audio feature parameters, the first load monitoring data, and the second load monitoring data, a fuzzy decision algorithm is used to determine the channel allocation strategy. According to the channel allocation strategy, the dynamic reconstruction field in the default channel allocation strategy is modified to allocate some or all of the dynamically reserved channels to the first output module and / or the second output module to obtain reconstructed audio data frames.

10. The TDM multi-channel allocation method compatible with multiple protocols according to claim 3, characterized in that, While adjusting the default channel allocation strategy, the data recognition modes of the first output module and the second output module are adjusted simultaneously, including: While adjusting the default channel allocation strategy, a dynamic reconfiguration signaling with a synchronization identifier is sent to each first output module and the second output module. The dynamic reconfiguration signaling includes the new channel identification rules and the effective time.