Multi-tone-range i2s audio switching control method based on vehicle-mounted domain control and related equipment

By introducing a digital audio routing controller and an asynchronous sampling rate conversion module, the problem of audio switching discontinuity caused by the central computing unit directly driving the terminal power amplifier was solved, realizing smooth and seamless switching of multi-domain systems and high-fidelity audio output.

CN122195384APending Publication Date: 2026-06-12XIAMEN HARINE TECH CORP LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN HARINE TECH CORP LTD
Filing Date
2026-02-07
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing in-vehicle audio systems where the central computing unit directly drives the terminal power amplifier are prone to physical link signal interruption or sudden changes when facing multi-frequency switching, resulting in popping or stuttering and affecting the continuity of audio output.

Method used

A digital audio routing controller is introduced as an intermediate layer. It generates routing configuration messages, configures the I2S interface clock mode, updates the digital cross matrix mapping table, and provides a sustain signal to the I2S power amplifier module during audio source switching to maintain continuous operating clock. Combined with the asynchronous sampling rate conversion module and acoustic space topology parameters, it achieves smooth and seamless switching.

Benefits of technology

It effectively eliminates popping and stuttering caused by clock interruptions or phase changes, improves the compatibility of multi-domain systems and the smoothness of audio switching, and ensures a high-fidelity audio experience and the privacy of independent sound fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122195384A_ABST
    Figure CN122195384A_ABST
Patent Text Reader

Abstract

The application provides a multi-audio-range I2S audio switching control method based on vehicle-mounted domain control and related equipment, relates to the technical field of automobile electronics and vehicle-mounted audio, and the method comprises the following steps: in response to a user's partition playing instruction, a central control unit generates a routing configuration message and sends the message to a digital audio routing controller; the digital audio routing controller configures the I2S interface clock mode of the input port corresponding to the audio format parameter and the target source identifier, updates a digital cross matrix mapping table according to the target source identifier and the target audio range identifier, and then determines a data transmission channel from the input port to a specified I2S power amplifier output port according to the digital cross matrix mapping table; and I2S digital audio streams sent by an audio source device are forwarded to the corresponding I2S power amplifier module according to the data transmission channel. By implementing the method, the risk of loudspeaker end explosion or lag can be reduced, and smooth and seamless switching of audio streams between multiple audio ranges is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of automotive electronics and in-vehicle audio technology, and in particular to a multi-domain I2S audio switching control method and related equipment based on in-vehicle domain control. Background Technology

[0002] With the rapid development of smart cockpit technology, modern automotive entertainment systems are becoming increasingly complex. Users' demands for in-vehicle audio experiences are no longer limited to a single, full-vehicle playback mode, but are shifting towards personalized experiences with multi-zone, independent sound fields. For example, the driver may need to focus on navigation voice commands or Bluetooth calls, while the front passenger and rear passengers may simultaneously enjoy high-quality music or watch streaming videos. To meet these diverse needs, in-vehicle audio system architecture is evolving from traditional distributed independent control to a centralized domain controller architecture. I2S (Inter-ICSound), as a standard digital audio transmission interface, is widely used in in-vehicle audio data transmission links due to its low jitter and high fidelity characteristics.

[0003] In related technologies, a centralized audio processing architecture directly managed by a central computing unit (SoC) is typically employed. Specifically, the SoC decodes and manages various audio source data in a unified manner through an internally integrated audio processing engine or the operating system's audio service middleware. The hardware output pins of the SoC are directly connected to the corresponding I2S amplifier chips for each partition via fixed PCB wiring or harnesses in a point-to-point manner. When the system needs to play audio, the SoC, based on the logical mapping relationship set by the upper-layer software, selects a specific internal I2S controller to send data. This controller then directly drives the connected physical link, synchronously sending clock and data signals to the final amplifier module, thereby driving the speakers to produce sound.

[0004] However, this architecture, where the central computing unit directly drives the terminal power amplifier, has inherent limitations when facing increasingly complex dynamic zone switching requirements. Since audio sources (such as Bluetooth music and navigation voice) often correspond to different sampling rates and clock formats, when the playback source or frequency range needs to be changed, the central computing unit must perform a shutdown, clock parameter reconfiguration, and restart operation on the underlying I2S interface. This hardware-level reset process can cause momentary interruptions or phase changes in the clock signal and data stream on the physical transmission link. The downstream power amplifier module, operating continuously, directly responds to this signal change, resulting in unavoidable pops or stutters at the speaker end, affecting the continuity of the audio output. Summary of the Invention

[0005] This application provides a multi-domain I2S audio switching control method and related equipment based on vehicle domain control, which is used to address the problem that when switching between audio domains or audio sources, the audio output may produce popping or stuttering noise due to the instantaneous interruption or sudden change of the physical link signal.

[0006] In a first aspect, this application provides a multi-domain I2S audio switching control method based on vehicle domain control, applied to a multi-domain I2S audio switching control system based on vehicle domain control. The system includes a central control unit, a digital audio routing controller, and multiple zone I2S power amplifier modules. The method includes: In response to the user's zone playback command, the central control unit generates a routing configuration message and sends it to the digital audio routing controller. The routing configuration message includes the target source identifier, the target audio range identifier, audio format parameters, and transition strategy. The digital audio routing controller configures the I2S interface clock mode of the input port corresponding to the target source identifier according to the audio format parameters, and updates the digital cross matrix mapping table according to the target source identifier and the target frequency range identifier. The digital cross matrix mapping table defines the correspondence between the input ports of multiple audio source devices and the output ports of I2S power amplifier modules of multiple physical frequency ranges. The digital audio routing controller determines the data transmission channel from the input port to the designated I2S power amplifier output port based on the digital cross matrix mapping table; The digital audio routing controller forwards the I2S digital audio stream sent by the audio source device to the corresponding I2S power amplifier module according to the data transmission channel. The I2S power amplifier module is used to drive the speaker in the corresponding frequency range to produce sound. During audio source switching, the digital audio routing controller provides a sustain signal to the I2S power amplifier module to keep the operating clock of the I2S power amplifier module continuous.

[0007] By adopting the above technical solution, after receiving the routing configuration containing the target source and audio range identifier, the digital audio routing controller does not directly switch the signal. Instead, it first configures the clock mode according to the audio format parameters and updates the digital cross matrix that defines the input-output mapping relationship. In the core switching execution phase, the controller forwards the audio stream using the established data transmission channel. During the interval of audio source switching, the controller actively provides a sustaining signal to the I2S power amplifier module, ensuring that the operating clock of the power amplifier module remains continuous during source device changes. This maintains the locked state of the power amplifier's phase-locked loop, suppresses phase abrupt changes caused by clock interruption or reset, and reduces the risk of popping or stuttering at the speaker end, thus achieving smooth and seamless switching of audio streams between multiple audio ranges.

[0008] In some embodiments, the step of the central control unit generating a routing configuration message and sending it to the digital audio routing controller specifically includes: The central control unit obtains the operating status and service priority of the source device currently occupying the target audio domain by parsing the partition playback command; The central control unit determines the audio switching transition strategy based on the comparison result between the service priority of the target source identifier and the service priority of the currently occupying source device. The transition strategy includes a mute switching mode, a mixing overlay mode, or a direct preemption mode. The central control unit encapsulates the target source identifier, target audio range identifier, audio format parameters, and the transition strategy into a routing configuration message, and sends it to the digital audio routing controller via the vehicle control bus.

[0009] By adopting the above technical solution, before generating the configuration message, the central control unit performs a deep analysis of the current environment to obtain the service priority and status of the devices running in the target audio domain. By logically comparing the priority of the target source of the new instruction with the priority of the currently occupying source, the system can intelligently decide on the most appropriate transition strategy (such as mute, mixing, or preemption). This service priority-based policy arbitration mechanism not only ensures the timely response of high-priority services (such as navigation and alarms) but also provides clear execution logic for the underlying hardware, enabling the audio system to manage audio output in an orderly manner according to preset logic when facing complex multi-task concurrent scenarios.

[0010] In some embodiments, the step of updating the digital cross-matrix mapping table based on the target source identifier and the target vocal range identifier specifically includes: The digital audio routing controller decomposes the audio source into multiple logical sub-channels according to the number of audio channels corresponding to the target source identifier; The digital audio routing controller retrieves the available TDM time slot index from the physical output port corresponding to the target audio range identifier; The digital audio routing controller obtains the current operating clock domain configuration of the physical output port and performs a consistency check with the sampling rate in the audio format parameters. After the verification is passed, the identifiers of the logical sub-channels are written into the registers or storage units associated with the physical output port and the TDM time slot index in the digital cross matrix mapping table, respectively, to obtain the updated digital cross matrix mapping table. If the verification fails, the logical sub-channel is bridged to an intermediate conversion node that matches the configuration of the running clock domain, and the output identifier of the intermediate conversion node is mapped to the storage unit corresponding to the physical output port in the digital cross matrix mapping table.

[0011] By adopting the above technical solution, the system introduces a refined clock domain verification mechanism when updating the digital cross-matrix mapping table. After decomposing the audio source into logical sub-channels, the controller not only searches for available time slots on the physical ports but also compares the consistency between the current operating clock of the physical ports and the sampling rate of the audio to be played. For those that pass the verification, direct mapping is performed, improving transmission efficiency; while for cases of sampling rate mismatch, the system automatically bridges the signal to an intermediate conversion node for adaptation before mapping. This breaks down the connection barriers caused by clock format differences between different audio sources and amplifiers of different frequency ranges, enabling the system to flexibly accommodate various audio sources and improving the compatibility and resource utilization of multi-frequency systems.

[0012] In some embodiments, after the step of updating the digital cross matrix mapping table based on the target source identifier and the target vocal range identifier, the method further includes: When a change in the clock mode of the input port is detected, the digital audio routing controller uses its internal clock source to send a sustain clock signal and a zero-fill data frame to the physical output port to keep the phase-locked loop of the I2S power amplifier module locked. The digital audio routing controller monitors the data fill volume of the receiving first-in-first-out queue corresponding to the new target source identifier in real time, and calculates the phase deviation between the input clock and the output sustain clock; When the data padding amount is detected to reach a preset anti-jitter threshold and the phase deviation is lower than a preset phase threshold, the sustain clock signal is stopped at the end of the current frame period and the clock signal corresponding to the new target source identifier is turned on.

[0013] By adopting the above technical solution, when the system detects a change in clock mode, the controller first uses its internal clock to send a sustain signal and zero-fill data to ensure that the physical connection at the power amplifier end is in a stable "hot" state. Subsequently, the system enters a precision monitoring mode, calculating in real time the data fill amount of the new audio source FIFO queue and the phase deviation of the input and output clocks. Only when the data volume is sufficient and the phase deviation meets an extremely low preset threshold is the switching performed at the end of the frame period. This physically eliminates the jitter interference caused by clock switching, improves the smoothness of the audio switching experience, and ensures a high-fidelity audio experience.

[0014] In some embodiments, after the central control unit encapsulates the target source identifier, target audio range identifier, audio format parameters, and the transition policy into a routing configuration message and sends it to the digital audio routing controller via the vehicle control bus, the method further includes: When the transition strategy is identified as a mixing overlay mode, the digital audio routing controller locks the clock domain of the currently occupying source device as the main clock domain and activates the internal asynchronous sampling rate conversion module. The asynchronous sampling rate conversion module converts the sampling rate of the input audio stream corresponding to the target source identifier into a sampling rate consistent with the master clock domain, thereby generating the data stream to be mixed. Based on the avoidance gain coefficient corresponding to the service priority, the audio data of the currently occupying source device is digitally attenuated to obtain the digitally attenuated audio data. A saturated adder is used to perform bitwise superposition of the digitally attenuated audio data with the data stream to be mixed, and the superimposed synthesized data stream is mapped to the physical output port corresponding to the target audio range identifier.

[0015] By adopting the above technical solution, the system implements a hardware-level signal processing flow for mixing scenarios. When the strategy is determined to be mixing mode, the controller locks the master clock domain and activates the asynchronous sampling rate conversion module to unify the audio streams from different sources to the same sampling rate standard, solving the clock synchronization problem of multi-source mixing. Subsequently, secondary audio is digitally attenuated according to the avoidance coefficient corresponding to priority, and then superimposed bit-by-bit with the primary audio using a saturation adder. High-quality mixing and dynamic range control are achieved in the digital domain, which not only prevents overflow distortion caused by the superposition of multiple signals, but also ensures clear subjective separation of primary and secondary audio.

[0016] In some embodiments, prior to the step of the digital audio routing controller forwarding the I2S digital audio stream sent by the audio source device to the corresponding I2S power amplifier module according to the data transmission channel, the method further includes: The digital audio routing controller acquires acoustic spatial topology parameters associated with the target audio domain identifier, the acoustic spatial topology parameters defining the acoustic isolation boundary between the target audio domain and adjacent non-target audio domains; Based on the acoustic isolation boundary and the preset maximum allowable crosstalk sound pressure threshold, calculate the initial maximum output gain of the target audio range at the moment the switching takes effect; When forwarding the I2S digital audio stream, the I2S digital audio stream is digitally limited according to the initial maximum output gain to limit audio signal leakage into the adjacent non-target audio range.

[0017] By adopting the above technical solution, the system incorporates the physical characteristics of the acoustic space into the electronic control logic. Before forwarding audio, the controller reads the spatial topology parameters describing the acoustic isolation boundaries between sound domains and calculates the initial maximum output gain at the moment of switching. During actual forwarding, the digital audio stream is pre-limited based on this gain. This active gain control based on spatial topology limits excessive audio signal energy output at the source, effectively suppressing sound leakage from specific sound domains to adjacent non-target sound domains. Thus, in a car environment with limited physical sound insulation, the privacy and isolation of each independent sound field are enhanced electronically.

[0018] In some embodiments, after the step of digitally limiting the I2S digital audio stream based on the initial maximum output gain, the method further includes: After the audio switching is completed, the actual leakage sound pressure level in the adjacent non-target sound range is collected based on the cockpit microphone; Calculate the sound pressure deviation between the actual leakage sound pressure level and the preset maximum allowable crosstalk sound pressure threshold; If the sound pressure deviation exceeds the preset deviation range, a corresponding gain correction coefficient is generated to adjust the initial maximum output gain.

[0019] By adopting the above technical solution, the system constructs a closed-loop adjustment link from output control to effect feedback. After limiting the amplitude based on theoretical calculations, the system uses the cabin microphone to collect the actual leakage sound pressure in non-target sound domains in real time and compares it with the allowable threshold. Once the calculated sound pressure deviation exceeds a reasonable range, the system automatically generates a correction coefficient to dynamically adjust the output gain. This adaptive calibration mechanism can compensate for acoustic model errors caused by environmental changes such as the distribution of occupants and interior aging, ensuring that the multi-domain system maintains optimal sound field isolation throughout its entire lifespan.

[0020] Secondly, this application provides a multi-domain I2S audio switching control system based on vehicle domain control, the device comprising: one or more processors and a memory; The memory is coupled to the one or more processors. The memory is used to store computer program code, which includes computer instructions. The one or more processors call the computer instructions so that the system can implement the multi-domain I2S audio switching control method based on vehicle domain control provided in the above embodiment, which will not be described in detail here.

[0021] Thirdly, this application provides a computer-readable storage medium including instructions that, when executed on a multi-domain I2S audio switching control system based on vehicle domain control, enable the system to implement a multi-domain I2S audio switching control method based on vehicle domain control provided in the above embodiments, which will not be elaborated here.

[0022] Fourthly, this application provides a computer program product that, when running on a multi-domain I2S audio switching control system based on vehicle domain control, enables the system to implement a multi-domain I2S audio switching control method based on vehicle domain control provided in the above embodiments, which will not be elaborated here.

[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By introducing a digital audio routing controller as an intermediate layer, the system actively sends a sustaining clock signal and zero-fill data to the power amplifier module during the vacuum period of audio source switching, forcibly maintaining the locked state of the power amplifier's phase-locked loop. Combined with precise monitoring of FIFO data volume and input / output clock phase deviation, the system completes the switching only within the time window when the signal is most stable, completely eliminating pops and stutters caused by clock interruptions or phase changes from the physical level, achieving an extremely smooth experience for multi-frequency switching.

[0024] 2. By dynamically updating the digital cross-matrix mapping table and working in conjunction with the built-in asynchronous sampling rate conversion module, the system solves the compatibility problem of multi-source heterogeneous audio. The system can not only intelligently arbitrate mute, preemption, or mixing strategies based on service priorities, but it can also automatically identify and bridge audio streams with different sampling rates. When mixing is required, the system unifies signals from different clock domains at the hardware level and performs attenuation and superposition in the digital domain. This architecture allows the central control unit to flexibly schedule audio sources of any format across any audio domain without consuming computing power for software resampling, thus improving the processing efficiency and flexibility of the domain control architecture.

[0025] 3. Based on preset acoustic spatial topology parameters, the system calculates and applies digital limiting before signal output, actively suppressing sound leakage into adjacent non-target sound domains. Furthermore, the system incorporates a microphone feedback mechanism, dynamically generating correction coefficients to adjust the output gain by comparing actual leakage sound pressure with theoretical thresholds in real time. This method addresses the challenge of achieving independent sound field isolation in the confined space of a vehicle, enhancing the privacy and independence of multi-zone experiences. Attached Figure Description

[0026] Figure 1 This is a flowchart illustrating a multi-domain I2S audio switching control method based on vehicle domain control in an embodiment of this application. Figure 2 This is another flowchart illustrating a multi-domain I2S audio switching control method based on vehicle domain control in an embodiment of this application; Figure 3 This is a flowchart illustrating the dynamic control of speaker output gain in an embodiment of this application. Figure 4 This is a data transmission architecture diagram of the multi-domain I2S audio switching control system based on vehicle domain control in this application embodiment; Figure 5 This is a schematic diagram of the physical device structure of a multi-domain I2S audio switching control system based on vehicle domain control in the embodiments of this application. Detailed Implementation

[0027] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0028] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0029] For ease of understanding, the method provided in this implementation is described in process below. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a multi-domain I2S audio switching control method based on vehicle domain control in an embodiment of this application.

[0030] S101. In response to the user's zone playback command, the central control unit generates a routing configuration message and sends it to the digital audio routing controller.

[0031] Among them, the zone playback command refers to the operation command initiated by the user based on the interactive interface of the vehicle domain control system (such as the central control screen, voice control, steering wheel buttons) to specify a specific audio source to be played in a specific cabin audio range; the target source identifier refers to the encoding or identification information used to uniquely distinguish different audio source devices in the vehicle system, corresponding to various audio sources such as AM / FM radio and Bluetooth audio; the target audio range identifier refers to the encoding or identification information used to uniquely identify different physical playback areas in the cabin, corresponding to independent audio ranges such as the driver's area and the front passenger area; the audio format parameters refer to the technical specifications of the digital audio stream output by the audio source, including sampling rate, bit width, number of channels, etc.; the routing configuration message refers to the structured data message encapsulated and generated by the central control unit, containing all the key information required for audio routing; the central control unit is the core control module of the system, running the vehicle operating system, and is responsible for audio application management, user interaction logic processing, and global audio routing control command generation; the digital audio routing controller is the core hardware module of the system, used to receive routing configuration commands and execute digital audio stream routing switching.

[0032] This step is executed when the system detects a user's request to play audio in a specific zone. Specific scenarios include, but are not limited to: the driver requesting navigation voice to be played in the driver's area via voice command, while rear passengers select to play USB music in the rear audio zone via the central control screen; front passengers operating the central control screen to switch the audio source in the front audio zone, switching from Bluetooth calls to music from the local media player; and system background services triggering specific audio sources to play in a designated audio zone (such as safety warning voices playing in the full audio zone or a specific audio zone).

[0033] Specifically, when a user initiates a zone playback command through an interactive method supported by the in-vehicle system, the central control unit captures the command. The central control unit parses the command to determine the audio source the user wishes to play (i.e., the target source) and the desired carriage area (i.e., the target audio range). Subsequently, the central control unit collects the audio format parameters corresponding to the target audio source to ensure format matching during subsequent routing. Simultaneously, the central control unit queries the current occupancy status of the target audio range, including whether other audio sources are already playing in that range and the service priority of the currently occupying audio source, thereby determining an appropriate transition strategy. After completing the above information collection and decision-making, the central control unit encapsulates the target source identifier, target audio range identifier, audio format parameters, and transition strategy into a routing configuration message according to a preset data structure, and then sends this message to the digital audio routing controller via the in-vehicle control bus (such as I2C, SPI, or CAN bus).

[0034] S102. The digital audio routing controller configures the I2S interface clock mode of the input port corresponding to the target source identifier according to the audio format parameters, and updates the digital cross matrix mapping table according to the target source identifier and the target audio range identifier.

[0035] Among them, the I2S interface clock mode refers to the clock synchronization mode when the I2S interface transmits digital audio data, including configuration parameters such as clock polarity and clock phase, to ensure the synchronization accuracy of audio data transmission; the input port refers to the physical interface on the digital audio router controller used to receive the I2S digital audio streams output by each audio source device; the digital cross matrix mapping table refers to the data table stored inside the digital audio router controller that records the correspondence between the audio source input ports and the I2S power amplifier module output ports; the I2S power amplifier module refers to a module containing multiple independent I2S audio power amplifiers, each amplifier corresponding to a physical frequency range, used to receive the I2S digital audio stream and digitally amplify it to drive the speakers to produce sound; the output port refers to the physical interface on the digital audio router controller used to send the I2S digital audio stream to each I2S power amplifier module.

[0036] Specifically, after receiving and parsing the routing configuration message, the digital audio routing controller extracts the audio format parameters and target source identifier. Based on information such as sampling rate and bit width in the audio format parameters, the digital audio routing controller configures the I2S interface clock mode for the input port corresponding to the target source identifier, ensuring that the clock parameters of this input port are consistent with the output clock parameters of the target audio source, thus avoiding audio data transmission distortion or loss due to clock mismatch. Subsequently, the digital audio routing controller extracts the target source identifier and target frequency range identifier from the message and queries the internally stored digital cross-matrix mapping table. This mapping table originally recorded the correspondence between all current audio source input ports and the output ports of each frequency range I2S amplifier module. The controller updates this mapping table based on the new target source identifier and target frequency range identifier, establishing a new correspondence between the target source input port and the corresponding I2S amplifier module output port. If the target frequency range already has a mapping relationship with other audio source input ports, the controller can process the original mapping relationship accordingly (such as replacement, retention, or overlay) based on a transition strategy.

[0037] S103. The digital audio routing controller determines the data transmission channel from the input port to the specified I2S power amplifier output port based on the digital cross-matrix mapping table.

[0038] The data transmission channel refers to the logical path within the digital audio routing controller used to transmit I2S digital audio streams. It consists of an input port, an internal signal processing unit, an output port, and related control lines, ensuring that audio data is transmitted losslessly from the target source input port to the designated I2S amplifier output port. The designated I2S amplifier output port refers to the output port in the digital cross-matrix mapping table that corresponds to the target frequency range identifier and is used to send audio data to the I2S amplifier module of that frequency range.

[0039] Specifically, after updating the mapping table, the digital audio routing controller performs path retrieval based on the updated digital cross-matrix mapping table. Specifically, it determines the corresponding input port based on the target source identifier, then determines the corresponding designated I2S amplifier output port based on the target frequency range identifier, and finally searches and allocates an idle logical path within the controller's internal logical link resources to connect the input port and the designated output port.

[0040] During this process, the controller detects the availability of the channel, including whether the channel is occupied by other audio routes, whether the signal transmission bandwidth of the channel meets the format requirements of the target audio source, and whether the transmission delay of the channel is within the allowable range. If a suitable idle channel is detected, the controller locks the channel through its internal control logic, configures the channel's signal transmission parameters (such as data bit width adaptation, synchronization signal alignment, etc.), and completes the establishment of the data transmission channel. If there is no idle channel at present, the controller releases low-priority occupied channels or waits for an idle channel to be released according to the preset channel scheduling strategy (such as priority scheduling, polling scheduling, etc.) before establishing the target transmission channel, ensuring that audio data can be stably and losslessly transmitted from the input port to the designated I2S power amplifier output port.

[0041] S104. The digital audio routing controller forwards the I2S digital audio stream sent by the audio source device to the corresponding I2S power amplifier module according to the data transmission channel.

[0042] In this context, I2S digital audio stream refers to a serial digital audio data sequence output by an audio source device, conforming to the I2S interface standard, and includes audio sampling data, synchronization signals, and other information; audio source device refers to the hardware device that provides audio data, including AM / FM radios, Bluetooth audio modules, USB audio devices, etc.; sustain signal refers to the signal sent by the digital audio routing controller during audio source switching to maintain the continuous operating clock of the I2S power amplifier module, including sustain clock signal and zero-fill data frame; operating clock refers to the synchronization clock signal required for the normal operation of the I2S power amplifier module, used to ensure that the power amplifier module correctly decodes and amplifies the audio data; and loudspeaker refers to the audio playback device connected to the I2S power amplifier module, used to convert the amplified audio electrical signal into a sound wave signal.

[0043] Specifically, after the data transmission channel is established, the digital audio routing controller receives the I2S digital audio stream sent by the audio source device in real time and imports the audio stream into the established data transmission channel. During transmission, the controller monitors the audio stream in real time to ensure the integrity and synchronization of data transmission. According to the parameters configured in the channel, it performs necessary format adaptation processing on the audio stream (such as bit width adjustment, synchronization signal calibration, etc.), and then accurately forwards the processed audio stream to the corresponding I2S power amplifier module.

[0044] After receiving the audio stream, the I2S amplifier module digitally amplifies the digital audio signal to provide enough power to drive speakers. The amplified signal is then transmitted to the speaker in the corresponding frequency range, where it converts the electrical signal into sound waves to play the audio. During audio source switching (i.e., switching from the original audio source to the target audio source), to prevent clock interruptions from causing the I2S amplifier module's phase-locked loop to lose lock, resulting in popping or stuttering, the digital audio routing controller actively sends a sustain signal to the I2S amplifier module. This sustain signal includes a sustain clock signal with the same frequency as the amplifier's current operating clock, and zero-fill data frames used to fill the data stream. This ensures at the physical layer that the amplifier module's operating clock remains continuous until normal audio stream transmission resumes after the switching is complete.

[0045] In the above embodiments, after receiving the routing configuration containing the target source and audio domain identifier, the digital audio routing controller does not directly switch the signal. Instead, it first configures the clock mode according to the audio format parameters and updates the digital cross matrix that defines the input-output mapping relationship. During the core switching execution phase, the controller forwards the audio stream using the established data transmission channel. During the intervals between audio source switching, the controller actively provides a sustaining signal to the I2S power amplifier module, ensuring that the power amplifier module's operating clock remains continuous during source device changes. This maintains the locked state of the power amplifier's phase-locked loop, suppresses phase abrupt changes caused by clock interruptions or resets, and reduces the risk of popping or stuttering at the speaker end, thus achieving smooth and seamless switching of audio streams between multiple audio domains.

[0046] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating a multi-domain I2S audio switching control method based on vehicle domain control in an embodiment of this application.

[0047] S201. The central control unit obtains the operating status and service priority of the source device currently occupying the target audio domain by parsing the partition playback command.

[0048] Among them, the operating status refers to the working status information of the source device currently occupying the target audio domain, including whether the device is playing, paused, whether the data transmission is normal, and whether there is a fault; the service priority refers to the priority level preset by the system for various audio source devices or audio services, which is used to determine the priority order of different audio services when competing for resources or switching. High-priority services (such as navigation voice and safety warning voice) can occupy audio domain resources first.

[0049] This step is executed after the central control unit captures the user's zone playback command and before generating the routing configuration message. Specific scenarios include when the user switches the audio source for a certain audio range (such as switching the front audio range from music to Bluetooth call), or when a new audio service request occupies an audio range already occupied by other audio sources (such as a navigation voice request to play in the driver's zone audio range where music is currently playing).

[0050] Specifically, the central control unit captures the user-initiated zone playback command, which may contain basic information such as the target audio source and target frequency range specified by the user. Subsequently, the central control unit performs deep analysis of the command, extracting the target frequency range identifier to clarify the specific frequency range for which audio playback or switching is required. Based on the target frequency range identifier, the central control unit queries the current occupancy status of that frequency range via the system control bus to determine whether other audio source devices are already operating in that frequency range (i.e., the currently occupying source device).

[0051] If a currently occupying source device exists, the central control unit further communicates with the occupying source device to obtain its operating status and determine whether the device is working properly and whether the audio data transmission is stable. At the same time, the central control unit retrieves the service priority corresponding to the currently occupying source device from the system's preset service priority configuration table, as well as the service priority corresponding to the target source identifier in the partition playback instruction.

[0052] S202. Determine the audio switching transition strategy based on the comparison result between the service priority of the target source identifier and the service priority of the currently occupying source device.

[0053] Among them, the mute switching mode refers to the mode in which the audio output of the currently occupying source device is muted during the audio source switching process, and the target source audio playback is started after the audio stream of the target source device is stably transmitted, which can avoid noise at the moment of switching; the mixing and overlay mode refers to the mode in which the audio stream of the target source is overlaid with the audio stream of the currently occupying source device when the priority of the target source service is equal to or meets the preset mixing conditions, such as the mixed playback of navigation voice and music; the direct preemption mode refers to the mode in which the audio output of the currently occupying source device is directly interrupted when the priority of the target source service is higher than the priority of the currently occupying source device service, and the transmission and playback of the target source audio stream are started, ensuring that the high-priority service responds in a timely manner.

[0054] Specifically, after the central control unit obtains the service priority of the target source (referred to as "target priority") and the service priority of the currently occupying source device (referred to as "current priority"), it initiates the priority comparison logic. It then determines whether the target audio range exists in the currently occupied source device: If the target audio range does not have a currently occupied source device, there is no need to perform priority comparison, and the transition strategy is directly determined to be the default direct playback mode (no switching required). If a device currently occupying the target audio domain exists, the target priority is compared numerically or hierarchically with the current priority. If the target priority is higher than the current priority (e.g., the target source is navigation voice, and the current source is music), the transition strategy is set to direct preemption mode to ensure that high-priority services quickly occupy audio domain resources. If the target priority is equal to the current priority (e.g., both are entertainment services, or two different types of music), a mute switching mode can be selected according to the system's preset rules to avoid noise caused by the superposition of the two audio sources. If the target priority is lower than the current priority, but the system preset supports mixing low-priority and high-priority services (e.g., music and navigation voice, with navigation voice being high priority), the transition strategy is set to mixing and superimposing mode, superimposing low-priority service audio without interrupting the high-priority service.

[0055] S203. The target source identifier, target audio range identifier, audio format parameters, and transition policy are encapsulated into a routing configuration message and sent to the digital audio routing controller via the vehicle control bus.

[0056] Among them, the vehicle control bus refers to the bus system used for data transmission and communication between vehicle devices. This system can use I2C, SPI or CAN bus, etc., and has the characteristics of stable transmission, strong anti-interference ability and transmission rate adapted to vehicle scenarios.

[0057] Specifically, after determining the transition strategy, the central control unit has collected all the core information required for route switching, including the target source identifier, target audio range identifier, audio format parameters, and the transition strategy (clearly defining the switching method). Subsequently, the central control unit encapsulates this information in a structured manner according to the system's preset routing configuration message format. During encapsulation, corresponding fields are assigned to different types of information, and a message header (containing message type, length, checksum, etc.) and message trailer are added to ensure message integrity and identifiability. After encapsulation, the central control unit establishes a communication link with the digital audio routing controller via the vehicle control bus (such as the CAN bus) and sends out the encapsulated routing configuration message. During transmission, the central control unit monitors the message transmission status; if it does not receive a reception confirmation signal from the digital audio routing controller, it will retransmit to ensure that the routing configuration command is successfully delivered.

[0058] S204. When the transition strategy is identified as mixing overlay mode, the digital audio routing controller locks the clock domain of the currently occupying source device as the main clock domain and activates the internal asynchronous sampling rate conversion module.

[0059] The clock domain refers to a circuit module or signal transmission area that is synchronously controlled by the same clock signal. Devices or signals within the same clock domain operate according to a unified clock beat, ensuring the synchronization of data transmission and processing. The master clock domain refers to the clock domain selected by the system as the reference clock in the mixing and overlay mode. The clock signals of other audio sources need to be adapted to the clock parameters of this master clock domain to solve the problem of multi-source audio clock synchronization. The asynchronous sampling rate conversion module refers to the hardware module integrated inside the digital audio routing controller, which is used to convert audio streams with different sampling rates into a unified sampling rate, realize the mixing and overlay of audio sources with different sampling rates, and does not rely on the software processing of the central control unit.

[0060] Specifically, after receiving the routing configuration message, the digital audio routing controller parses the transition policy field to determine if it is in a mixing overlay mode. If it is identified as a mixing overlay mode, it means that the audio stream from the target source needs to be overlaid with the audio stream from the currently occupying source device in the same audio domain. However, different audio sources may come from different clock domains, and their clock parameters (such as sampling rate) may differ. Direct overlay will cause audio distortion and stuttering. Therefore, the digital audio routing controller obtains the clock domain corresponding to the currently occupying source device and locks it as the master clock domain, using the clock parameters (such as clock frequency and sampling rate) of this clock domain as a reference. Subsequently, the digital audio routing controller activates its internally integrated asynchronous sampling rate conversion module. This module has hardware-level sampling rate conversion capabilities and can independently complete the conversion of audio streams with different sampling rates without occupying the computing power of the central control unit, ensuring the efficiency and real-time performance of the mixing process.

[0061] In one specific embodiment, the system can parse the routing configuration message through the digital audio routing controller, extract the transition strategy field, and identify the current transition strategy as the mixing overlay mode through the field identifier (such as "01" representing the mixing overlay mode); according to the target audio domain identifier in the message, the system queries the digital cross matrix mapping table to determine the input port corresponding to the source device currently occupying the audio domain; through the clock detection module of the input port, the system obtains the clock signal parameters (such as clock frequency and sampling rate) of the currently occupying source device to determine its corresponding clock domain; the digital audio routing controller sends a clock domain locking command to set the clock domain as the master clock domain, prohibiting its clock parameters from changing during mixing; the digital audio routing controller sends an activation command to the internal asynchronous sampling rate conversion module, and at the same time configures the sampling rate parameter of the master clock domain (such as 48kHz) as the target sampling rate of the module; the asynchronous sampling rate conversion module starts a self-test process to check whether the module hardware is normal and whether the clock synchronization with the master clock domain is normal, and after the self-test is passed, it sends an activation success signal back to the digital audio routing controller.

[0062] S205. The asynchronous sampling rate conversion module converts the sampling rate of the input audio stream corresponding to the target source identifier to the sampling rate consistent with the master clock domain, generating the data stream to be mixed.

[0063] Specifically, after the asynchronous sampling rate conversion module is activated and its parameters are configured, the digital audio routing controller imports the input audio stream corresponding to the target source identifier into this module. The sampling rate of the input audio stream may differ from the sampling rate of the master clock domain (e.g., the input audio stream sampling rate is 44.1kHz, while the master clock domain sampling rate is 48kHz). Direct mixing in this case would result in audio rhythm distortion and discrepancies. Upon receiving the input audio stream, the asynchronous sampling rate conversion module processes it using a hardware-level sampling rate conversion algorithm (such as interpolation or decimation) based on the preset target sampling rate (i.e., the master clock domain sampling rate).

[0064] During the conversion process, the module can precisely interpolate or extract the audio data to ensure that the sampling rate of the converted audio stream is completely consistent with the master clock domain, while preserving the original audio quality to the maximum extent and avoiding signal distortion or noise introduction. After the conversion is completed, a data stream to be mixed is generated. This data stream is consistent with the audio stream of the currently occupying source device in terms of clock synchronization and sampling rate, and can be directly used for subsequent attenuation and superposition processing.

[0065] In some embodiments, the system can send data transmission control commands to the target source device through a digital audio routing controller, controlling the target source device to output the input audio stream at a fixed rate to ensure the stability of the streaming data. After receiving the input audio stream, the asynchronous sampling rate conversion module temporarily stores it in a FIFO buffer to avoid data overflow or loss. The module reads the clock signal in the master clock domain and uses this clock signal as a reference to generate the target clock signal required for conversion. An asynchronous sampling rate conversion algorithm (such as a conversion algorithm based on a polyphase filter bank) is used to convert the audio data in the FIFO buffer in real time. This algorithm can achieve high-precision sampling rate conversion under asynchronous clock conditions and reduce phase distortion. During the conversion process, the module dynamically adjusts the filtering parameters and optimizes the conversion effect according to the frequency characteristics of the input audio stream to ensure that both high-frequency and low-frequency signals can be accurately converted. After generating the data stream to be mixed, the module marks it as "mixable" and sends it to the mixing processing unit through the internal bus, while simultaneously feeding back a conversion completion signal to the digital audio routing controller.

[0066] S206. Based on the avoidance gain coefficient corresponding to the service priority, digitally attenuate the audio data of the currently occupied source device, and map the synthesized data stream after bit-by-bit superposition of the digitally attenuated audio data and the data stream to be mixed to the physical output port corresponding to the target audio range identifier.

[0067] Among them, the avoidance gain coefficient refers to the coefficient preset according to different service priorities, which is used to adjust the audio data gain of the currently occupying source device. The audio source with lower priority corresponds to a higher avoidance gain coefficient, so as to achieve the distinction between primary and secondary audio sources when superimposing audio; digital attenuation refers to reducing the amplitude of audio data through digital signal processing technology without changing the frequency characteristics and phase relationship of the audio; saturation adder refers to the hardware adder integrated inside the digital audio routing controller, which has the function of preventing signal superposition overflow. When the amplitude of the superimposed signal exceeds the preset range, it is automatically limited to the saturation value to avoid audio distortion.

[0068] Specifically, the digital audio routing controller retrieves the corresponding avoidance gain coefficient from the system's preset gain coefficient configuration table, based on the service priority of the currently occupying source device. Subsequently, the controller performs digital attenuation processing on the audio data from the currently occupying source device, adjusting the amplitude of the audio data according to the avoidance gain coefficient to ensure that the attenuated audio signal does not overlap with the data stream to be mixed. After attenuation, the controller activates its internal saturation adder, performing bit-by-bit superposition of the digitally attenuated audio data and the data stream to be mixed. The saturation adder monitors the amplitude of the superimposed signal in real time; if it exceeds the preset dynamic range of the audio signal, it immediately limits the signal to a saturation value to prevent clipping distortion. After superposition, a synthesized data stream is generated. The controller then queries the digital cross-matrix mapping table based on the target audio range identifier to determine the corresponding physical output port and maps the synthesized data stream to that port.

[0069] S207. The digital audio routing controller decomposes the audio source into multiple logical sub-channels according to the number of audio channels corresponding to the target source identifier, and retrieves the available TDM timeslot index from the physical output port corresponding to the target audio domain identifier.

[0070] Among them, the number of audio channels refers to the number of audio channels supported by the audio source device corresponding to the target source identifier, such as mono (1 channel), stereo (2 channels), 5.1 channel (6 channels), etc.; logical sub-channel refers to the virtual channel after decomposing the physical audio channel according to the transmission requirements. Each logical sub-channel corresponds to an independent audio data segment and can be allocated transmission resources independently; TDM time slot index refers to the time slot number allocated to different logical sub-channels in the time division multiplexing (TDM) transmission mode, which is used to transmit the data of multiple logical sub-channels on the same physical bus in a time division manner; retrieval refers to the digital audio routing controller scanning and querying the TDM time slots supported by the physical output port to determine the unoccupied time slot number.

[0071] Specifically, the digital audio routing controller parses the audio format parameters corresponding to the target source identifier, extracts the audio channel quantity information, and determines the number of physical channels contained in the target source. Subsequently, according to the requirements of the TDM transmission protocol, each physical audio channel is decomposed into an independent logical sub-channel, and each logical sub-channel is assigned a unique identifier to facilitate subsequent time slot allocation and data transmission tracking.

[0072] Next, the controller queries the TDM transmission configuration of the physical output port corresponding to the target audio domain identifier to determine the total number of TDM time slots supported by that port, the transmission bandwidth of each time slot, and the currently occupied time slots. By checking all time slots one by one, it selects time slots that are not occupied by other audio streams and whose transmission bandwidth meets the requirements of the corresponding logical sub-channels, and records the index numbers of these time slots. If the number of available time slots is insufficient, the controller will allocate time slots to important logical sub-channels based on the priority of the audio channels (e.g., the main channel has higher priority than the surround channel), or optimize time slot utilization by compressing audio data or adjusting the TDM frame structure to ensure that all logical sub-channels can obtain the corresponding transmission time slots.

[0073] S208. Obtain the current operating clock domain configuration of the physical output port and perform a consistency check with the sampling rate in the audio format parameters.

[0074] Among them, the running clock domain configuration refers to the clock-related parameter configuration of the physical output port, including clock frequency, clock source, clock phase, etc., which determines the data transmission synchronization reference of the port; the consistency check refers to verifying whether the running clock domain configuration of the physical output port matches the sampling rate in the audio format parameters, ensuring clock synchronization during audio data transmission and avoiding data misalignment or distortion.

[0075] Specifically, the digital audio routing controller uses its internal clock domain detection module to read the operating clock domain configuration information of the physical output port corresponding to the target audio domain, including clock frequency parameters. Then, it obtains the target source's sampling rate from the audio format parameters of the routing configuration message. Based on the preset correspondence between sampling rate and clock frequency (e.g., a sampling rate of 48kHz corresponds to a clock frequency of typically 12.288MHz), it calculates the theoretical clock frequency required by the target source. It compares the current actual clock frequency of the physical output port with the theoretical clock frequency to determine if they are consistent or within the allowable deviation range (e.g., deviation not exceeding 0.1%). If they are consistent, it indicates that the clock domain configuration of the physical output port matches the target source's sampling rate, and the consistency check passes. If they are inconsistent, it indicates a clock synchronization risk, and the check fails. In this case, the subsequent clock adaptation process needs to be initiated to ensure the synchronization of audio data transmission.

[0076] S209. Write the identifiers of the logical sub-channels into the registers or storage units associated with the physical output ports and TDM time slot indexes in the digital cross matrix mapping table to obtain the updated digital cross matrix mapping table.

[0077] Specifically, after the consistency check passes, the digital audio routing controller determines the register or storage unit address associated with the physical output port corresponding to the target audio range in the digital cross-matrix mapping table. Then, based on the correspondence between logical sub-channels and TDM time slot indices, the identifier of each logical sub-channel is written into the corresponding register or storage unit. During the writing process, the controller binds and stores the logical sub-channel identifier, physical output port number, and TDM time slot index according to a preset mapping table format, ensuring that each logical sub-channel can be accurately mapped to the corresponding physical output port and TDM time slot.

[0078] Simultaneously, the controller verifies the written data, checking its completeness and consistency with expectations. If errors or missing data are found, it is immediately rewritten. After all logical sub-channel identifiers are written, the original digital cross-matrix mapping table is updated, and the new mapping relationship officially takes effect. Subsequent audio data transmission will be routed and forwarded according to the updated mapping table.

[0079] S210. Bridge the logic sub-channel to an intermediate conversion node that matches the operating clock domain configuration, and map the output identifier of the intermediate conversion node to the storage unit corresponding to the physical output port in the digital cross matrix mapping table.

[0080] The intermediate conversion node refers to the hardware module integrated inside the digital audio routing controller, which is used to realize clock domain conversion and sampling rate adaptation, and has the function of converting audio data with different clock domains and different sampling rates into a unified format; the output identifier refers to the unique identification information of the intermediate conversion node, which is used to establish the correspondence between the intermediate conversion node and the physical output port in the digital cross matrix mapping table.

[0081] Specifically, when the consistency check fails, the digital audio routing controller first queries its internal intermediate conversion node resource pool to select an intermediate conversion node that matches the current operating clock domain configuration of the physical output port (i.e., the output clock domain of the conversion node is consistent with the operating clock domain of the physical output port). Subsequently, a bridging path is established between each logical sub-channel and the intermediate conversion node to ensure that the audio data of the logical sub-channel can be transmitted to the intermediate conversion node.

[0082] The intermediate conversion node can perform clock domain conversion and sampling rate adaptation on the input audio data, converting it into a format that matches the operating clock domain of the physical output port. Next, the controller obtains the output identifier of the intermediate conversion node, queries the storage unit in the digital cross-matrix mapping table corresponding to the physical output port of the target audio domain, and writes the output identifier of the intermediate conversion node into that storage unit, replacing the original direct mapping relationship between the logical sub-channel identifier and the physical output port.

[0083] After the update is completed, the digital cross-matrix mapping table records the correspondence between the output identifier of the intermediate conversion node and the physical output port. Subsequent audio data will first be transmitted to the intermediate conversion node for processing, and then transmitted to the target physical output port through the output port of the conversion node.

[0084] S211. When a change in the clock mode of the input port is detected, a sustain clock signal and a zero-fill data frame are sent to the physical output port using the internal clock source to keep the phase-locked loop of the I2S power amplifier module in a locked state.

[0085] The internal clock source refers to the clock generation module built into the digital audio router controller, which has high stability and high precision and is used to provide temporary clock support when the external clock changes. The phase-locked loop (PLL) is the core circuit inside the I2S power amplifier module used to achieve clock synchronization. It can track the phase and frequency of the input clock signal to ensure that the power amplifier module correctly decodes and amplifies the audio data. A loss of PLL lock will cause audio distortion, popping, or stuttering.

[0086] Specifically, the digital audio routing controller monitors the clock mode status of the input ports in real time, including parameters such as clock frequency, phase, and polarity. When a change in these parameters is detected (i.e., switching from the clock mode of the original audio source to the clock mode of the target source), the controller immediately activates its internal clock source. The internal clock source generates a sustain clock signal that matches the current operating clock frequency of the I2S power amplifier module, ensuring that the power amplifier module's phase-locked loop (PLL) will not lose lock due to interruption of the original clock. Simultaneously, the controller generates a zero-fill data frame. This data frame has the same format as a normal audio data frame, except that the data portion is zero, used to fill the data stream gaps during clock switching and prevent the power amplifier module from generating abnormal noise due to data stream interruption. Subsequently, the controller synchronously sends the sustain clock signal and the zero-fill data frame to the I2S power amplifier module through the physical output port, continuously providing the power amplifier module with a stable clock and data input until the clock signal of the new target source is stably established, ensuring that the PLL remains locked.

[0087] In some embodiments, the system can use the built-in clock monitoring module of the digital audio router to collect the clock signal parameters of the input port in real time, compare them with the currently recorded clock mode, and detect whether a change has occurred. When a change in clock mode is detected, an internal clock source start command is immediately triggered. The internal clock source generates a corresponding sustain clock signal based on the working clock parameters of the I2S power amplifier module (pre-stored in the controller) to ensure that the frequency and phase are consistent with the original clock. The controller starts the zero-fill data frame generation module to generate zero-fill data frames according to the audio format (number of channels, bit width) corresponding to the target audio range to ensure that the data frame structure is compliant. The sustain clock signal and the zero-fill data frame are synchronized and aligned through the signal synchronization module of the physical output port to avoid signal misalignment. The sustain signal is continuously sent to the I2S power amplifier module, while monitoring the clock signal status of the new target source to prepare for subsequent switching. If an abnormality is detected in the power amplifier module feedback during the sustain signal transmission, the stability of the sustain clock signal is automatically improved (e.g., by enabling a backup clock oscillator) to ensure that the phase-locked loop does not fail.

[0088] S212. Monitor the data filling amount of the receiving first-in-first-out queue corresponding to the new target source identifier in real time, and calculate the phase deviation between the input clock and the output sustain clock.

[0089] Specifically, while sending the sustain signal, the digital audio routing controller buffers the I2S digital audio stream corresponding to the new target source identifier into the receive FIFO queue. The controller monitors the data fill level of this queue in real time, calculates the amount of buffered data by reading the queue's read / write pointer position, and determines whether the data transmission is stable and meets the minimum buffer size required for switching (to avoid insufficient data causing stuttering after switching). Simultaneously, the controller has a built-in phase detection module that collects the phase information of the input clock (the clock signal of the new target source) and the output sustain clock (the clock signal generated by the internal clock source), calculating the phase deviation between them. The phase deviation is calculated based on the output sustain clock, by comparing the rising or falling edges of the two clock signals to determine the magnitude of the phase difference. The controller continuously updates the data fill level and phase deviation monitoring results.

[0090] S213. When the data padding amount is detected to reach the preset anti-jitter threshold and the phase deviation is lower than the preset phase threshold, the clock signal is stopped at the end of the current frame period and the clock signal corresponding to the new target source identifier is turned on.

[0091] Among them, the anti-jitter threshold refers to the minimum data fill threshold preset by the system to ensure stable transmission of the new target source audio stream. A threshold higher than this can avoid audio stuttering caused by insufficient data after switching. The preset phase threshold refers to the maximum phase deviation allowed by the system to ensure clock synchronization. A threshold lower than this can avoid audio distortion caused by clock asynchrony. The end of the current frame period refers to the moment when the current audio data frame transmission is completed. Switching the clock signal at this time can avoid interrupting the audio data being transmitted, further improving the smoothness of switching.

[0092] Specifically, the digital audio routing controller continuously compares the data padding with the jitter threshold and the phase deviation with the preset phase threshold. When both conditions are met simultaneously, it indicates that the audio stream from the new target source has been transmitted stably, and the clock signal and the sustain clock signal are well synchronized, meeting the switching conditions. The controller monitors the transmission progress of the current audio data frame, waiting for the end of the current frame period (i.e., after all data transmission of the current audio frame is completed) to avoid data interruption caused by clock switching during frame transmission. After reaching the end of the frame period, the controller stops sending the sustain clock signal and zero-padding data frames, and then quickly connects the clock signal corresponding to the new target source identifier. At the same time, it imports the new target source audio stream buffered in the first-in-first-out queue into the data transmission channel, realizing the synchronous switching of the clock signal and the audio data stream. During the switching process, the controller monitors the working status of the I2S power amplifier module in real time to ensure that the phase-locked loop remains locked, avoiding interference such as popping and stuttering.

[0093] like Figure 3 The diagram shown is a flowchart illustrating the dynamic control of speaker output gain in an embodiment of this application.

[0094] S301, The digital audio routing controller acquires the acoustic spatial topology parameters associated with the target audio range identifier.

[0095] Among them, acoustic spatial topology parameters refer to the set of parameters pre-stored in the system that describe the spatial location, layout and acoustic characteristics of each sound domain in the carriage, including sound domain boundary coordinates, speaker installation positions, sound absorption coefficient of the carriage interior walls, etc.; acoustic isolation boundary refers to the virtual acoustic boundary that divides the target sound domain from the adjacent non-target sound domain, used to define the ideal propagation range of audio signals, and exceeding this boundary is considered signal leakage.

[0096] Specifically, the digital audio routing controller parses the target frequency domain identifier in the routing configuration message to determine the corresponding frequency domain number (e.g., "Frequency Domain 1 - Driver's Area"); it sends a query request to the system's built-in acoustic parameter database, which uses a structured storage method and uses the frequency domain identifier as an index to associate the corresponding set of topology parameters; the database returns the acoustic spatial topology parameters of the target frequency domain, including the three-dimensional coordinates of the acoustic isolation boundary, the identifiers and spacing of adjacent non-target frequency domains, and the acoustic reflection coefficient of the inner wall of the carriage; the controller performs integrity verification on the received parameters, checking whether key parameters (such as boundary coordinates and spacing) are missing or abnormal, and if abnormalities are found, it calls the default parameters; it stores the verified acoustic spatial topology parameters in a temporary buffer; if the database query fails, it automatically uses the backup parameters pre-stored inside the controller to ensure that the process is not interrupted.

[0097] S302. Based on the acoustic isolation boundary and the preset maximum allowable crosstalk sound pressure threshold, calculate the initial maximum output gain of the target audio range at the moment the switching takes effect.

[0098] Specifically, the digital audio routing controller retrieves a preset maximum permissible crosstalk sound pressure level threshold. This threshold is a fixed or dynamic value preset based on human auditory comfort and multi-domain isolation requirements (adjustable in some scenarios according to user settings). Then, combining the acoustic isolation boundary information from the acoustic space topology parameters, it analyzes the acoustic propagation path and attenuation characteristics between the target frequency domain and adjacent non-target frequency domains—the closer the acoustic isolation boundaries, the weaker the acoustic attenuation characteristics, the easier it is for audio signals to leak, and the lower the initial maximum output gain needs to be. The controller uses a built-in gain calculation algorithm to correlate parameters such as the attenuation characteristics of the acoustic isolation boundaries and the distance between the target frequency domain and adjacent frequency domains with the preset maximum permissible crosstalk sound pressure level threshold, ultimately obtaining the initial maximum output gain at the moment the switch takes effect. This gain is the maximum safe output gain for the speakers in the target frequency domain, ensuring that at this gain, the sound pressure level leaked to adjacent non-target frequency domains at the moment of switching does not exceed the preset threshold.

[0099] S303. When forwarding the I2S digital audio stream, perform digital limiting processing on the I2S digital audio stream based on the initial maximum output gain to limit the audio signal leakage to the adjacent non-target audio range.

[0100] Specifically, after the digital audio routing controller imports the I2S digital audio stream into the data transmission channel, it activates its internal digital limiting module. This module reads the initial maximum output gain stored in the gain control register and converts it into the corresponding audio signal amplitude threshold. Subsequently, the digital limiting module monitors each sampling point of the I2S digital audio stream in real time to determine whether its amplitude exceeds the threshold. If the sampling point amplitude does not exceed the threshold, the signal remains unchanged and transmission continues; if the sampling point amplitude exceeds the threshold, the amplitude of that sampling point is forcibly limited within the threshold range to prevent excessive output power due to excessively high signal amplitude, which could lead to a large amount of audio signal leakage into adjacent non-target frequency ranges. During the limiting process, the controller ensures that the phase and frequency characteristics of the signal are not affected, adjusting only the amplitude to avoid audio distortion while maintaining audio coherence and listening comfort.

[0101] S304. After the audio switching is completed, the actual leakage sound pressure level in the adjacent non-target sound range is collected by the cockpit microphone, and the sound pressure deviation between the actual leakage sound pressure level and the preset maximum allowable crosstalk sound pressure threshold is calculated.

[0102] Specifically, after the audio switching is complete (i.e., after the new audio source is playing stably in the target audio range), the digital audio routing controller sends a collection command to the cabin microphones in adjacent non-target audio ranges. Upon receiving the command, the cabin microphones initiate sound pressure level (SPL) acquisition, capturing sound pressure signals from the surrounding environment in real time, focusing on acquiring the SPL corresponding to the audio signal leaking from the target audio range. During the acquisition process, the microphones filter the signal to remove interference from other irrelevant noises inside the vehicle (such as engine noise and wind noise), ensuring that the acquired SPL accurately reflects the actual leakage. The microphones transmit the acquired actual leakage SPL data to the digital audio routing controller. After receiving the data, the controller retrieves the preset maximum permissible crosstalk SPL threshold and calculates the SPL deviation between the two. If the SPL deviation is positive, it indicates that the actual leakage exceeds the permissible range, requiring adjustment of the initial maximum output gain; if it is negative or zero, it indicates that the leakage is within the permissible range, requiring no adjustment.

[0103] S305. If the sound pressure deviation exceeds the preset deviation range, a corresponding gain correction coefficient will be generated to adjust the initial maximum output gain.

[0104] Specifically, the digital audio routing controller retrieves a preset deviation range (e.g., ±1dB) and compares the calculated sound pressure level deviation with this range. If the sound pressure level deviation is within the preset range, it indicates that the current initial maximum output gain control is effective and no adjustment is needed. If the sound pressure level deviation exceeds the preset range (e.g., a deviation of +2dB indicates excessive leakage; or a deviation of -3dB indicates insufficient gain leading to insufficient volume in the target audio range), the gain correction process is initiated. The controller calculates the corresponding gain correction coefficient based on the magnitude and direction of the sound pressure level deviation: if leakage exceeds the limit (positive deviation exceeds the range), a gain correction coefficient less than 1 is generated (e.g., a correction coefficient of 0.8 corresponds to a deviation of +2dB), reducing the output gain; if the gain is too low (negative deviation exceeds the range), a gain correction coefficient greater than 1 is generated (e.g., a correction coefficient of 1.2 corresponds to a deviation of -3dB), increasing the output gain. Subsequently, the controller multiplies the initial maximum output gain by the gain correction coefficient to obtain the adjusted new maximum output gain and updates it to the gain control register. Subsequent audio stream limiting processing will be performed based on the new gain parameters. Meanwhile, the controller will continuously monitor the sound pressure deviation. If the deviation still exceeds the range after adjustment, the above correction process will be repeated until the sound pressure deviation is within the preset range.

[0105] Figure 4 This is a data transmission architecture diagram of the multi-domain I2S audio switching control system based on vehicle domain control in this application embodiment; The central control unit is the core of the system, comprising two functional modules: an audio application & routing strategy module and an audio source module. The audio application & routing strategy module receives user zone playback commands, parses these commands, and generates routing configuration strategies. It also sends control commands to the digital audio routing controller via the system control bus (I2S / SPI / CAN). The audio source module provides various digital audio streams (such as Bluetooth, USB, navigation, etc.) and transmits raw digital audio streams to the digital audio routing controller via multiple I2S inputs.

[0106] The digital audio routing controller is the core of audio stream routing and scheduling, with a built-in digital audio cross-matrix mapping table. This table records the correspondence between "audio source input ports" and "amplifier channel output ports," storing the routing configuration issued by the central control unit and specifying which audio source should be transmitted to which amplifier channel in which frequency range. After receiving control commands from the central control unit and I2S audio streams from the audio source modules, it determines the transmission path of the audio stream based on the configuration of the "digital audio cross-matrix mapping table."

[0107] The I2S amplifier module contains multiple independent amplifier channels (amplifier channels 1 to N). Each amplifier channel refers to a power amplification unit corresponding to a physical frequency range. It receives the audio stream sent by the digital audio routing controller through the "data transmission channel", amplifies it, and then drives the corresponding speaker.

[0108] The speaker frequency range (frequency range 1~N) refers to the independent playback areas divided in the car (such as the driver's area, the front passenger area, the rear passenger area, etc.). Each frequency range corresponds to the output of a power amplifier channel. The power amplifier channel transmits the amplified audio signal to the speaker in that frequency range through the "drive" link, so as to realize the function of playing different audio sources independently in different frequency ranges.

[0109] Specifically, the central control unit receives user zone playback instructions, generates routing strategies, and sends them to the digital audio routing controller; the audio source module transmits I2S digital audio streams to the digital audio routing controller; the digital audio routing controller routes the audio stream of the specified audio source to the power amplifier channel of the corresponding frequency range according to the "digital audio cross matrix mapping table"; after the corresponding power amplifier channel amplifies the audio stream, it drives the speakers of the target frequency range to produce sound, ultimately realizing independent audio playback of multiple frequency ranges.

[0110] The multi-domain I2S audio switching control system based on vehicle domain control in this invention is applied to electronic devices. Figure 5 A schematic diagram of the architecture of an electronic device suitable for implementing embodiments of the present invention is shown.

[0111] It should be noted that, Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0112] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by instructions (computer programs), or by instructions (computer programs) controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. The electronic device of this embodiment includes a storage medium and a processor, wherein the storage medium stores multiple instructions that can be loaded by the processor to execute any step of the method provided in the embodiments of the present invention.

[0113] Specifically, the storage medium and the processor are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more signal lines. The storage medium stores computer-executable instructions that implement data access control methods, including at least one software functional module that can be stored in the storage medium in the form of software or firmware. The processor executes various functional applications and data processing by running the software program and module stored in the storage medium. The storage medium can be, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The storage medium stores the program, and the processor executes the program after receiving the execution instructions.

[0114] Furthermore, the software programs and modules within the aforementioned storage medium may also include an operating system, which may include various software components and / or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.) and can communicate with various hardware or software components to provide an operating environment for other software components. The processor may be an integrated circuit chip with signal processing capabilities. The aforementioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc., which can implement or execute the methods, steps, and logic flowcharts disclosed in this embodiment. The general-purpose processor may be a microprocessor or any conventional processor.

[0115] Since the instructions stored in the storage medium can execute the steps in any of the methods provided in the embodiments of the present invention, the beneficial effects of any of the methods provided in the embodiments of the present invention can be achieved, as detailed in the preceding embodiments, and will not be repeated here.

[0116] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A multi-domain I2S audio switching control method based on vehicle domain control, applied to a multi-domain I2S audio switching control system based on vehicle domain control, the system comprising a central control unit, a digital audio routing controller, and multiple zone I2S power amplifier modules, characterized in that, The method includes: In response to the user's zone playback command, the central control unit generates a routing configuration message and sends it to the digital audio routing controller. The routing configuration message includes the target source identifier, the target audio range identifier, audio format parameters, and transition strategy. The digital audio routing controller configures the I2S interface clock mode of the input port corresponding to the target source identifier according to the audio format parameters, and updates the digital cross matrix mapping table according to the target source identifier and the target frequency range identifier. The digital cross matrix mapping table defines the correspondence between the input ports of multiple audio source devices and the output ports of I2S power amplifier modules of multiple physical frequency ranges. The digital audio routing controller determines the data transmission channel from the input port to the designated I2S power amplifier output port based on the digital cross matrix mapping table; The digital audio routing controller forwards the I2S digital audio stream sent by the audio source device to the corresponding I2S power amplifier module according to the data transmission channel. The I2S power amplifier module is used to drive the speaker in the corresponding frequency range to produce sound. During audio source switching, the digital audio routing controller provides a sustain signal to the I2S power amplifier module to keep the operating clock of the I2S power amplifier module continuous.

2. The method according to claim 1, characterized in that, The step of the central control unit generating a routing configuration message and sending it to the digital audio routing controller specifically includes: The central control unit obtains the operating status and service priority of the source device currently occupying the target audio domain by parsing the partition playback command; The central control unit determines the audio switching transition strategy based on the comparison result between the service priority of the target source identifier and the service priority of the currently occupying source device. The transition strategy includes a mute switching mode, a mixing overlay mode, or a direct preemption mode. The central control unit encapsulates the target source identifier, target audio range identifier, audio format parameters, and the transition strategy into a routing configuration message, and sends it to the digital audio routing controller via the vehicle control bus.

3. The method according to claim 1, characterized in that, The step of updating the digital cross-matrix mapping table based on the target source identifier and the target vocal range identifier specifically includes: The digital audio routing controller decomposes the audio source into multiple logical sub-channels according to the number of audio channels corresponding to the target source identifier; The digital audio routing controller retrieves the available TDM time slot index from the physical output port corresponding to the target audio range identifier; The digital audio routing controller obtains the current operating clock domain configuration of the physical output port and performs a consistency check with the sampling rate in the audio format parameters. After the verification is passed, the identifiers of the logical sub-channels are written into the registers or storage units associated with the physical output port and the TDM time slot index in the digital cross matrix mapping table, respectively, to obtain the updated digital cross matrix mapping table. If the verification fails, the logical sub-channel is bridged to an intermediate conversion node that matches the configuration of the running clock domain, and the output identifier of the intermediate conversion node is mapped to the storage unit corresponding to the physical output port in the digital cross matrix mapping table.

4. The method according to claim 3, characterized in that, After the step of updating the digital cross matrix mapping table based on the target source identifier and the target vocal range identifier, the method further includes: When a change in the clock mode of the input port is detected, the digital audio routing controller uses its internal clock source to send a sustain clock signal and a zero-fill data frame to the physical output port to keep the phase-locked loop of the I2S power amplifier module locked. The digital audio routing controller monitors the data fill volume of the receiving first-in-first-out queue corresponding to the new target source identifier in real time, and calculates the phase deviation between the input clock and the output sustain clock; When the data padding amount is detected to reach a preset anti-jitter threshold and the phase deviation is lower than a preset phase threshold, the sustain clock signal is stopped at the end of the current frame period and the clock signal corresponding to the new target source identifier is turned on.

5. The method according to claim 2, characterized in that, After the central control unit encapsulates the target source identifier, target audio range identifier, audio format parameters, and the transition strategy into a routing configuration message and sends it to the digital audio routing controller via the vehicle control bus, the method further includes: When the transition strategy is identified as a mixing overlay mode, the digital audio routing controller locks the clock domain of the currently occupying source device as the main clock domain and activates the internal asynchronous sampling rate conversion module. The asynchronous sampling rate conversion module converts the sampling rate of the input audio stream corresponding to the target source identifier into a sampling rate consistent with the master clock domain, thereby generating the data stream to be mixed. Based on the avoidance gain coefficient corresponding to the service priority, the audio data of the currently occupying source device is digitally attenuated to obtain the digitally attenuated audio data. A saturated adder is used to perform bitwise superposition of the digitally attenuated audio data with the data stream to be mixed, and the superimposed synthesized data stream is mapped to the physical output port corresponding to the target audio range identifier.

6. The method according to claim 1, characterized in that, Before the step of the digital audio routing controller forwarding the I2S digital audio stream sent by the audio source device to the corresponding I2S power amplifier module according to the data transmission channel, the method further includes: The digital audio routing controller acquires acoustic spatial topology parameters associated with the target audio domain identifier, the acoustic spatial topology parameters defining the acoustic isolation boundary between the target audio domain and adjacent non-target audio domains; Based on the acoustic isolation boundary and the preset maximum allowable crosstalk sound pressure threshold, calculate the initial maximum output gain of the target audio range at the moment the switching takes effect; When forwarding the I2S digital audio stream, the I2S digital audio stream is digitally limited according to the initial maximum output gain to limit audio signal leakage into the adjacent non-target audio range.

7. The method according to claim 6, characterized in that, After the step of digitally limiting the I2S digital audio stream based on the initial maximum output gain, the method further includes: After the audio switching is completed, the actual leakage sound pressure level in the adjacent non-target sound range is collected based on the cockpit microphone; Calculate the sound pressure deviation between the actual leakage sound pressure level and the preset maximum allowable crosstalk sound pressure threshold; If the sound pressure deviation exceeds the preset deviation range, a corresponding gain correction coefficient is generated to adjust the initial maximum output gain.

8. A multi-domain I2S audio switching control system based on vehicle-mounted domain control, characterized in that, The device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the system to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on a multi-domain I2S audio switching control system based on vehicle domain control, the system performs the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on a multi-domain I2S audio switching control system based on vehicle domain control, the system performs the method as described in any one of claims 1-7.