Audio signal transmission system and method

By designing an audio signal transmission system including CODEC chip, I2S interface, cache module and storage unit, the problems of audio data loss and high chip cost in the prior art are solved, and seamless audio signal transmission and chip cost reduction are achieved.

CN119583738APending Publication Date: 2025-03-07ZHEJIANG XINMAI SILICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411668438.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the audio signal transmission in the security field, the existing technology may lead to the loss of audio data due to the slow CPU response time. Solutions such as replacing better performance CPUs or using DMAs will require a larger chip area, increasing chip cost.

Method used

An audio signal transmission system is designed to achieve seamless transmission of audio signals through communication connections between CODEC chip, I2S interface, cache module and storage unit. In the system, the audio sending control unit and the audio receiving control unit monitor the data amount and cache space respectively, and automatically trigger write or read requests to avoid CPU intervention.

Benefits of technology

The seamless transmission of audio signals between the I2S interface, the audio sending module and the audio receiving module, does not require CPU intervention and does not require additional chip area, thereby reducing chip cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583738A_ABST
    Figure CN119583738A_ABST
Patent Text Reader

Abstract

The invention provides an audio signal transmission system and method. A CODEC chip sends a processed first audio signal to a first cache module through an I2S interface; when the audio sending control unit monitors that the audio data volume in the first cache module reaches a data volume threshold value, the first storage unit obtains all audio signals from the first cache module, and the audio signals are sent to external equipment through the audio sending module; the audio receiving module sends a second audio signal from the external equipment to the second storage unit; when the audio receiving control unit monitors that the residual cache space of the second cache module meets a cache space threshold value, the second cache module reads audio data from the second storage unit, and the audio data is sent to the CODEC chip through the I2S interface and played; according to the system, seamless transmission of the audio signal between the I2S interface and the audio sending module and the audio receiving module is realized, CPU intervention is not needed, and extra chip area occupation is not needed, so that the chip cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio transmission, and in particular to an audio signal transmission system and method. Background Art

[0002] In the field of security, the video signal and audio signal are usually transmitted together through a coaxial cable between the back-end digital video recorder (Digital Video Recorder, referred to as DVR) and the front-end device. The audio signal is superimposed on the specified line of the video signal according to the protocol, and the front-end device is connected to the CODEC (codec) through the I2S (Inter-IC Sound, integrated circuit built-in audio bus) interface for playback and recording. In the related art, the CPU is usually used to process the data transmission between the I2S interface and the coaxial audio transceiver module, but on the chip with lower performance, the CPU response time is too slow and may not meet the requirements of real-time data transmission, resulting in audio data loss; to solve this problem, the related art can usually replace the CPU on the chip with a CPU with better performance, or use a general DMA (Direct Memory Access) to process data transmission to release CPU resources, but these methods require a large chip area, thereby increasing the chip cost. Summary of the invention

[0003] The object of the present invention is to provide an audio signal transmission system and method to reduce chip area occupation and reduce chip cost.

[0004] The present invention provides an audio signal transmission system, the system comprising: a CODEC chip, an I2S interface, a first buffer module, a first storage unit and an audio sending module which are sequentially connected in communication; the I2S interface is also sequentially connected in communication with a second buffer module, a second storage unit and an audio receiving module; the first buffer module and the first storage unit are respectively connected in communication with an audio sending control unit, and the second buffer module and the second storage unit are respectively connected in communication with an audio receiving control unit;

[0005] The CODEC chip is used to receive a first audio signal, process the first audio signal, and send the processed first audio signal to the first cache module through the I2S interface; the audio sending control unit is used to send a first write request to the first storage unit when it is detected that the amount of audio data in the first cache module reaches a preset data amount threshold; the first storage unit is used to obtain all cached audio signals from the first cache module according to the first write request, and send all audio signals to the external device through the audio sending module; the audio receiving module is used to receive a second audio signal from the external device, and send the second audio signal to the second storage unit;

[0006] The audio receiving control unit is used to send a first read request to the second storage unit when it is monitored that the remaining cache space in the second cache module meets the preset cache space threshold, so that the second cache module reads the audio data from the second storage unit and sends the audio data to the CODEC chip through the I2S interface to play the audio data.

[0007] Furthermore, the audio sending control unit includes: an I2S sending control module, which is used to send a first write enable instruction to the write interface corresponding to the first storage unit when it is monitored that the amount of audio data in the first cache module reaches a preset data amount threshold, so as to send a first write request to the first storage unit; it is also used to monitor the first capacity usage of the first storage unit in the process of the first storage unit obtaining all cached audio signals from the first cache module, and when the first capacity usage reaches the preset first capacity threshold, discard the most recently received audio signal and generate a first interrupt signal; a first storage control module, which is used to send the first interrupt signal to the CPU, so that the CPU executes the processing operation corresponding to the first interrupt signal.

[0008] Furthermore, the I2S sending control module is also used to generate a second interrupt signal when it is detected that the first storage unit is empty; the first storage control module is used to send the second interrupt signal to the CPU so that the CPU executes a processing operation corresponding to the second interrupt signal.

[0009] Furthermore, the audio sending control unit includes: a first sending control module, which is used to send a first read enable instruction to the read interface corresponding to the first storage unit when it is monitored that the first capacity usage of the first storage unit reaches a preset second capacity threshold, so that the audio sending module reads all audio signals from the first storage unit; wherein the second capacity threshold is less than the first capacity threshold.

[0010] Further, the audio receiving control unit includes: a first receiving control module, which is used to send a second write enable instruction to the write interface corresponding to the second storage unit when it is monitored that the audio receiving module receives a second audio signal from an external device, so that the audio receiving module sends the second audio signal to the second storage unit; and is also used to monitor the second capacity usage of the second storage unit during the process of the audio receiving module sending the second audio signal to the second storage unit, and when the second capacity usage reaches a preset third capacity threshold, discard the latest received audio signal and generate a third interrupt signal;

[0011] The second storage control module is used to send a third interrupt signal to the CPU so that the CPU can execute a processing operation corresponding to the third interrupt signal; the first receiving control module is also used to allow the audio receiving module to continue sending the second audio signal to the second storage unit when it is monitored that the second capacity usage is lower than a preset fourth capacity threshold; wherein the fourth capacity threshold is lower than the third capacity threshold; the first receiving control module is also used to generate a fourth interrupt signal when it is monitored that the second storage unit is empty; the second storage control module is used to send the fourth interrupt signal to the CPU so that the CPU can execute a processing operation corresponding to the fourth interrupt signal.

[0012] Furthermore, the audio receiving control unit includes: an I2S receiving control module, which is used to send a second read enable instruction to the read interface corresponding to the second storage unit when it is monitored that the remaining cache space in the second cache module meets a preset cache space threshold, so as to send a first read request to the second storage unit.

[0013] Furthermore, the first sending control module is also used to monitor whether the audio sending module is connected to the external device, obtain a first monitoring result, and generate a first coaxial state identifier according to the first monitoring result; the first storage control module is used to output first state information according to the first coaxial state identifier.

[0014] Furthermore, the first receiving control module is also used to monitor whether the audio receiving module is connected to the external device, obtain a second monitoring result, and generate a second coaxial status identifier based on the second monitoring result; the second storage control module is used to output second status information based on the second coaxial status identifier.

[0015] Furthermore, the I2S sending control module and the I2S receiving control module operate under the I2S sampling clock; the first storage unit, the second storage unit, the first storage control module, the second storage control module, the first sending control module and the first receiving control module operate under the system clock; the audio sending module and the audio receiving module operate under the video encoding clock.

[0016] The present invention provides an audio signal transmission method, which includes: a CODEC chip receives a first audio signal, processes the first audio signal, and sends the processed first audio signal to a first cache module through an I2S interface; an audio sending control unit sends a first write request to a first storage unit when it is detected that the amount of audio data in the first cache module reaches a preset data amount threshold; the first storage unit obtains all cached audio signals from the first cache module according to the first write request, and sends all audio signals to an external device through the audio sending module; an audio receiving module receives a second audio signal from an external device, and sends the second audio signal to a second storage unit; and the audio receiving control unit sends a first read request to the second storage unit when it is detected that the remaining cache space in the second cache module meets the preset cache space threshold, so that the second cache module reads the audio data from the second storage unit, and sends the audio data to the CODEC chip through the I2S interface to play the audio data.

[0017] The audio signal transmission system and method provided by the present invention include a CODEC chip for receiving a first audio signal, processing the first audio signal, and sending the processed first audio signal to a first cache module through an I2S interface; an audio sending control unit for sending a first write request to a first storage unit when it is detected that the amount of audio data in the first cache module reaches a preset data amount threshold; the first storage unit for obtaining all cached audio signals from the first cache module according to the first write request, and sending all audio signals to an external device through the audio sending module; an audio receiving module for receiving a second audio signal from an external device, and sending the second audio signal to a second storage unit; and an audio receiving control unit for sending a first read request to the second storage unit when it is detected that the remaining cache space in the second cache module meets a preset cache space threshold, so that the second cache module reads the audio data from the second storage unit, and sends the audio data to the CODEC chip through the I2S interface to play the audio data. The system realizes seamless transmission of audio signals between the I2S interface and the audio sending module and the audio receiving module, without CPU intervention, and without occupying additional chip area, thereby reducing chip cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1A schematic diagram of an audio signal transmission system provided by an embodiment of the present invention;

[0020] Figure 2 A schematic diagram of another audio signal transmission system provided by an embodiment of the present invention;

[0021] Figure 3 A control state diagram of audio transmission provided by an embodiment of the present invention;

[0022] Figure 4 An I2S interface receiving mode timing diagram provided by an embodiment of the present invention;

[0023] Figure 5 A timing diagram of an I2S interface writing to a storage array provided by an embodiment of the present invention;

[0024] Figure 6 A control state diagram of audio reception provided by an embodiment of the present invention;

[0025] Figure 7 A timing diagram of an I2S interface reading data from a storage array provided by an embodiment of the present invention;

[0026] Figure 8 The present invention provides a flowchart of an audio signal transmission method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] In the related art, the CPU on the chip can be replaced with a CPU with better performance, or a general DMA (Direct Memory Access) can be used to process data transmission to release CPU resources, but these methods all require a large chip area, thereby increasing the chip cost. Based on this, an embodiment of the present invention provides an audio signal transmission system and method, which can be applied to applications that require audio signal transmission.

[0029] To facilitate understanding of this embodiment, an audio signal transmission system disclosed in an embodiment of the present invention is first introduced. Figure 1As shown, the system includes: a CODEC chip, an I2S interface, a first cache module, a first storage unit, and an audio sending module that are sequentially connected in communication; the I2S interface is also sequentially connected in communication with the second cache module, the second storage unit, and the audio receiving module; the first cache module and the first storage unit are respectively connected in communication with the audio sending control unit, and the second cache module and the second storage unit are respectively connected in communication with the audio receiving control unit;

[0030] The CODEC chip is used to receive the first audio signal, process the first audio signal, and send the processed first audio signal to the first cache module through the I2S interface; the above-mentioned CODEC chip can be understood as an integrated circuit, which is used to convert analog signals into digital signals (encoding), or convert digital signals into analog signals (decoding). It is usually composed of an encoder and a decoder, and can realize the compression, transmission and decompression of audio and other signals. The above-mentioned I2S interface is used for the transmission of digital audio signals between internal devices of the system; the above-mentioned first cache module can adopt a FIFO (First-In-First-Out) buffer, and the FIFO buffer can be used to realize the first-in-first-out reading and writing mode of data; the above-mentioned first audio signal can be an analog audio signal provided by an audio signal source, for example, the audio signal source can be a microphone, a DVD player, etc.; in actual implementation, the audio signal source can output the first audio signal, and the first audio signal can be received by the CODEC chip, and the CODEC chip can encode the received first audio signal to obtain the encoded first audio signal, and the encoded first audio signal can be sent to the first cache module through the I2S interface.

[0031] The audio sending control unit is used to send a first write request to the first storage unit when it is monitored that the amount of audio data in the first cache module reaches a preset data amount threshold; the preset data amount threshold can be set according to actual needs, for example, it can be 32 audio data, etc.; in actual implementation, during the process of the I2S interface sending the processed first audio signal to the first cache module, the audio sending control unit can monitor the amount of audio data cached in the first cache module in real time. When the amount of audio data reaches the preset data amount threshold, the first write request can be automatically sent to the first storage unit. For example, once 32 audio data are accumulated in the first cache module, the first write request can be automatically initiated.

[0032] The first storage unit is used to obtain all the buffered audio signals from the first buffer module according to the first write request, and send all the audio signals to the external device through the audio sending module; specifically, after receiving the first write request, the first storage unit can allow data to be written, and at this time, all the audio signals buffered in the first buffer module can be written to the first storage unit. The audio sending module then obtains all the audio signals from the first storage unit and sends them to the connected external device, for example, the external device can be a video recorder, etc.

[0033] The audio receiving module is used to receive a second audio signal from an external device and send the second audio signal to a second storage unit; the second audio signal is usually a different signal from the above-mentioned first audio signal, and the second audio signal can be a digital audio signal; in this embodiment, the external device can send a second audio signal to the audio receiving module, and the audio receiving module can write the received second audio signal directly into the second storage unit.

[0034] The audio receiving control unit is used to send a first read request to the second storage unit when it is monitored that the remaining cache space in the second cache module meets the preset cache space threshold, so that the second cache module reads the audio data from the second storage unit and sends the audio data to the CODEC chip through the I2S interface to play the audio data.

[0035] The above preset cache space threshold can be set according to actual needs, for example, it can be the space corresponding to 32 audio data, etc.; in actual implementation, since the audio data cached in the second cache module will be sent to the CODEC chip through the I2S interface, the audio receiving control unit can monitor the remaining cache space in the second cache module in real time. When the remaining cache space meets the preset cache space threshold, it can automatically send a first read request to the second storage unit. For example, to facilitate one-time reading, when the space corresponding to 32 audio data is vacated in the second cache module, the first read request can be automatically initiated. The second cache module can read the audio data from the second storage unit, and send the read audio data to the CODEC chip through the I2S interface. The CODEC chip can decode the received audio data to play the audio data.

[0036] The above audio signal transmission system realizes seamless transmission of audio signals between the I2S interface and the audio sending module and the audio receiving module without CPU intervention and without occupying additional chip area, thereby reducing chip costs.

[0037] Further, such as Figure 2A schematic diagram of another audio signal transmission system is shown, wherein the audio sending control unit includes: an I2S sending control module and a first storage control module; wherein the I2S sending control module is used to send a first write enable instruction to a write interface corresponding to the first storage unit when it is monitored that the amount of audio data in the first cache module reaches a preset data amount threshold, so as to send a first write request to the first storage unit; and is also used to monitor the first capacity usage of the first storage unit in the process of the first storage unit obtaining all cached audio signals from the first cache module, and when the first capacity usage reaches the preset first capacity threshold, discard the most recently received audio signal and generate a first interrupt signal; the first storage control module is used to send the first interrupt signal to the CPU, so that the CPU executes the processing operation corresponding to the first interrupt signal.

[0038] The above-mentioned first storage unit usually includes a first storage array, and a write interface and a read interface connected to the first storage array; the above-mentioned first capacity usage can be understood as the size of the space that has been used in the first storage unit; the above-mentioned first capacity threshold is usually the upper limit of the capacity of the first storage unit; in actual implementation, when the I2S sending control module monitors that the amount of audio data in the first cache module reaches a preset data amount threshold, it can send a first write enable instruction to the write interface corresponding to the first storage unit, and the first write enable instruction can be used as the above-mentioned first write request. After receiving the write enable instruction, the write interface allows all audio signals cached in the first cache module to be written to the connected first storage array, and the first storage array then sends all audio signals to the audio sending module through the connected read interface.

[0039] In the process of writing all audio signals to the first storage array, the I2S sending control module will monitor in real time whether the first storage array is full. Specifically, when it is monitored that the first capacity usage reaches the preset first capacity threshold, it means that the first storage array has reached the capacity limit. In this case, the latest received audio signal will be discarded and an error interrupt will be triggered. A first interrupt signal can be generated and sent to the first storage control module. The first storage control module can send the received first interrupt signal to the CPU, and the CPU can perform corresponding processing according to the first interrupt signal. For example, some or all modules can be restarted to re-execute the audio signal transmission process, and a first alarm signal can also be output to promptly prompt the user that an abnormality has occurred during the transmission process; the first alarm signal can be implemented in the form of voice prompts, flashing alarm indicator lights or text prompts, and can be set according to actual needs, which is not limited here.

[0040] Furthermore, the I2S sending control module is also used to generate a second interrupt signal when it is detected that the first storage unit is empty; the first storage control module is used to send the second interrupt signal to the CPU so that the CPU executes a processing operation corresponding to the second interrupt signal.

[0041] During the process of sending the audio signal, the I2S sending control module usually continuously monitors whether the first storage array in the first storage unit is empty. If the first storage array is empty, an error interrupt is usually triggered to ensure the continuity and stability of data transmission. A second interrupt signal can be generated and sent to the first storage control module. The first storage control module can send the received second interrupt signal to the CPU, and the CPU can perform corresponding processing according to the second interrupt signal. For example, some or all modules can be restarted to re-execute the audio signal transmission process, or a second alarm signal can be output to promptly prompt the user that an abnormality has occurred during the transmission process; the second alarm signal can be implemented in the form of voice prompts, flashing alarm indicator lights or text prompts, and can be set specifically according to actual needs, which is not limited here.

[0042] Furthermore, the audio sending control unit includes: a first sending control module, which is used to send a first read enable instruction to the read interface corresponding to the first storage unit when it is monitored that the first capacity usage of the first storage unit reaches a preset second capacity threshold, so that the audio sending module reads all audio signals from the first storage unit; wherein the second capacity threshold is less than the first capacity threshold.

[0043] The above-mentioned second capacity threshold can be set according to actual needs; in actual implementation, the first storage array can be dynamically managed. In order to avoid overflow of the first storage array, a suitable "water level" can be set for the first storage array, that is, a second capacity threshold is set. The first sending control module can monitor the first capacity usage of the first storage array in the first storage unit. When it is monitored that the first capacity usage reaches the preset second capacity threshold, a first read enable instruction can be sent to the read interface corresponding to the first storage unit. After the read interface receives the first read enable instruction, the audio sending module is allowed to read all audio signals from the first storage array.

[0044] Further, such as Figure 2As shown, the audio receiving control unit includes: a first receiving control module and a second storage control module; wherein the first receiving control module is used to send a write enable instruction to a write interface corresponding to the second storage unit when monitoring that the audio receiving module receives a second audio signal from an external device, so that the audio receiving module sends the second audio signal to the second storage unit; and is also used to monitor the second capacity usage of the second storage unit during the process of the audio receiving module sending the second audio signal to the second storage unit, and when the second capacity usage reaches a preset third capacity threshold, discard the latest received audio signal and generate a third interrupt signal; the second storage control module is used to send the third interrupt signal to the CPU, so that the CPU executes a processing operation corresponding to the third interrupt signal;

[0045] The above-mentioned second storage unit usually includes a second storage array, and a write interface and a read interface connected to the second storage array; the above-mentioned second capacity usage can be understood as the size of the space that has been used in the second storage unit; the above-mentioned third capacity threshold is usually the upper limit of the capacity of the second storage unit; in actual implementation, when the first receiving control module monitors that the audio receiving module receives the second audio signal from the external device, it can send a write enable instruction to the write interface corresponding to the second storage unit. After the write interface receives the write enable instruction, it allows the second audio signal received by the audio receiving module to be written to the connected second storage array.

[0046] In the process of writing the second audio signal to the second storage array, the first receiving control module will monitor in real time whether the second storage array is full. Specifically, when it is monitored that the second capacity usage reaches the preset third capacity threshold, it means that the second storage array has reached the capacity limit. In this case, the most received audio signal will be discarded and an error interrupt will be triggered. A third interrupt signal can be generated and sent to the second storage control module. The second storage control module can send the received third interrupt signal to the CPU, and the CPU can perform corresponding processing according to the third interrupt signal. For example, some or all modules can be restarted to re-execute the audio signal transmission process, and a third alarm signal can also be output to promptly prompt the user that an abnormality has occurred during the transmission process; the third alarm signal can be implemented in the form of voice prompts, flashing alarm indicator lights or text prompts, and can be set according to actual needs, which is not limited here.

[0047] The first receiving control module is further used to allow the audio receiving module to continue to send the second audio signal to the second storage unit when it is monitored that the second capacity usage is lower than a preset fourth capacity threshold; wherein the fourth capacity threshold is lower than the third capacity threshold;

[0048] The above-mentioned fourth capacity threshold can be set according to actual needs; in actual implementation, when an error occurs, the first receiving control module usually continues to monitor the above-mentioned second capacity usage, and when the second capacity usage is lower than the fourth capacity threshold, it starts to continue writing new second audio signals to the second storage array.

[0049] The first receiving control module is also used to generate a fourth interrupt signal when it is detected that the second storage unit is empty; the second storage control module is used to send the fourth interrupt signal to the CPU so that the CPU executes a processing operation corresponding to the fourth interrupt signal.

[0050] During the process of sending the audio signal, the first receiving control module usually continuously monitors whether the second storage array in the second storage unit is empty. If the second storage array is empty, an error interrupt will usually be triggered to ensure the continuity and stability of data transmission. A fourth interrupt signal can be generated and sent to the second storage control module. The second storage control module can send the received fourth interrupt signal to the CPU, and the CPU can perform corresponding processing according to the fourth interrupt signal. For example, some or all modules can be restarted to re-execute the audio signal transmission process, or a fourth alarm signal can be output to promptly prompt the user that an abnormality has occurred during the transmission process; the fourth alarm signal can be implemented in the form of voice prompts, flashing alarm indicator lights or text prompts, and can be set specifically according to actual needs and is not limited here.

[0051] Furthermore, the audio receiving control unit includes: an I2S receiving control module, which is used to send a second read enable instruction to the read interface corresponding to the second storage unit when it is monitored that the remaining cache space in the second cache module meets a preset cache space threshold, so as to send a first read request to the second storage unit.

[0052] In actual implementation, the I2S receiving control module can monitor the remaining cache space in the second cache unit. When it is monitored that the remaining cache space meets the preset cache space threshold, a read enable instruction can be sent to the read interface corresponding to the second storage unit. The read enable instruction can be used as the above-mentioned first read request. After the read interface receives the read enable instruction, the second cache module is allowed to read audio data from the second storage unit.

[0053] Furthermore, the first sending control module is also used to monitor whether the audio sending module is connected to the external device, obtain a first monitoring result, and generate a first coaxial state identifier according to the first monitoring result; the first storage control module is used to output first state information according to the first coaxial state identifier.

[0054] The above-mentioned first monitoring result can be "connection established" or "connection not established"; the above-mentioned first coaxial status identifier can be represented by letters or numbers, for example, "Y" can be used to represent "connection established", "N" can be used to represent "connection not established", etc.; in actual implementation, the first sending control module can monitor in real time whether the audio sending module and the external device have successfully established a communication connection, and generate a corresponding first coaxial status identifier based on the first monitoring result obtained, and send the first coaxial status identifier to the first storage control module. The first storage control module can output first status information based on the first coaxial status identifier. The first status information can be used to indicate whether the audio sending module and the external device have established a connection. For example, the first status information can be "the audio sending module and the external device have established a connection", "the audio sending module and the external device have not established a connection", etc.

[0055] Furthermore, the first receiving control module is also used to monitor whether the audio receiving module is connected to the external device, obtain a second monitoring result, and generate a second coaxial status identifier based on the second monitoring result; the second storage control module is used to output second status information based on the second coaxial status identifier.

[0056] The above-mentioned second monitoring result can be "connection established" or "connection not established"; the above-mentioned second coaxial status identifier can be represented by letters or numbers, for example, "Y" can be used to represent "connection established", "N" can be used to represent "connection not established", etc.; in actual implementation, the first receiving control module can monitor in real time whether the audio receiving module and the external device have successfully established a communication connection, and generate a corresponding second coaxial status identifier based on the second monitoring result obtained, and send the second coaxial status identifier to the second storage control module, and the second storage control module can output second status information based on the second coaxial status identifier, and the second status information can be used to indicate whether the audio receiving module and the external device have established a connection. For example, the second status information can be "the audio receiving module and the external device have established a connection", "the audio receiving module and the external device have not established a connection", etc.

[0057] Furthermore, the I2S sending control module and the I2S receiving control module operate under the I2S sampling clock; the first storage unit, the second storage unit, the first storage control module, the second storage control module, the first sending control module and the first receiving control module operate under the system clock; the audio sending module and the audio receiving module operate under the video encoding clock.

[0058] For ease of understanding, Figure 2As shown, the system can be divided into two parts according to the data flow: audio transmission and audio reception. The audio transmission part refers to the CODEC chip receiving the first audio signal, temporarily storing it in the first cache module and the first storage array through the I2S interface, and then using the coaxial audio transmission protocol to superimpose the audio data on the video signal through the audio transmission module. The audio reception part refers to the second audio signal received by the coaxial cable, which is cached by the second storage array and the second cache module, and then transmitted to the CODEC chip through the I2S interface for playback.

[0059] The above-mentioned I2S sampling clock is the basic clock signal used to transmit audio signals in the I2S bus standard. The above-mentioned system clock usually refers to the clock system, which is usually a circuit composed of an oscillator, a timer wake-up device, a frequency divider, etc.; the above-mentioned video encoding clock refers to the time reference used to synchronize and control the generation and transmission of video frames during the video encoding process. In this embodiment, the audio signal transmission system can be divided into modules according to the clock domain, such as Figure 2 As shown, the I2S sending control module and the I2S receiving control module work under the I2S sampling clock; the first storage unit, the second storage unit, the first storage control module, the second storage control module, the first sending control module and the first receiving control module in the middle work under the system clock; the audio sending module and the audio receiving module on the right work under the video encoding clock.

[0060] For ease of understanding, Figure 3 The control state diagram of an audio transmission shown in the figure is initially in an idle state. When the I2S interface has received 32 audio data cumulatively and stored 32 audio data cumulatively in the first cache module, it enters a data transmission request state and checks the connection state, that is, checks whether the coaxial end is ready. It can also be understood as checking whether the audio transmission module has established a communication connection with the external device. If the coaxial end is ready and the first storage array is not empty, it enters a data transmission state. After the data transmission is completed, it enters a transmission end state; if the first storage array is empty, it enters an error state; if the first storage array is full, it enters an error state. For a specific timing diagram, see Figure 4 An I2S interface receiving mode timing diagram and Figure 5 FIG. 1 is a timing diagram showing an I2S interface writing to a storage array.

[0061] like Figure 6The control state diagram of an audio reception shown in the figure is initially in an idle state. When the audio transmission is enabled and the audio receiving module writes the received audio data into the second storage array, it enters a check state, that is, it checks whether the second cache module already has space corresponding to 32 audio data. If so, it enters a data transmission state. After the data transmission is completed, it enters a transmission end state; if the second storage array is empty, it enters an error state; if the second storage array is full, it enters an error state. For a specific timing diagram, please refer to Figure 7 FIG. 1 is a timing diagram showing an I2S interface for reading data from a storage array.

[0062] The above system designs a set of 64x16-bit FIFO (corresponding to the above first cache module and the second cache module) at the I2S interface to cache the audio data sent and received by the I2S interface. The system can be used for cross-clock data processing between the I2S sampling clock and the system clock to ensure the correct and continuous data transmission. The system also designs a set of 512x32-bit transceiver dual-port RAM (Random Access Memory, corresponding to the above first storage unit and the second storage unit) as the main audio data cache area. The main function of this set of dual-port RAM is to buffer the rate fluctuation between the CODEC chip sampling data and the coaxial audio data, balance the unevenness of the data flow, and ensure data integrity and transmission stability.

[0063] In the prior art, since the CPU processing response time is inconsistent each time, a set of dual-port RAM for transceiver is required between the I2S interface and the CPU, and a set of dual-port RAM for transceiver is also required between the CPU and the audio transceiver module. The data characteristics of this system are that the sampling frequency of the audio signal and the rate of the coaxial audio are basically consistent (8K / 16K), and there is no need for CPU intervention. Only one set of dual-port RAM for transceiver is needed to ensure that data is not lost within the rate fluctuation range of both sides, eliminating a set of 512x32-bit dual-port RAM and reducing costs.

[0064] The above system solves the interconnection problem between the I2S interface and the CODEC chip at a low cost on a SOC (System on Chip) chip with relatively weak performance, and realizes an efficient automatic data transmission mechanism, which allows audio data to be seamlessly transmitted between the I2S interface and the coaxial audio transceiver module. After the system is running, there is no need for direct CPU intervention, which reduces the CPU load to a minimum, releases the CPU processing power, significantly improves the data transmission speed, and realizes efficient data transmission. Since no additional chip area is required, the chip cost is reduced.

[0065] The system uses a unified cache between the I2S interface and the coaxial audio transceiver module through data cache management, prevents data overflow and loss through logical control, and reduces system costs through cache optimization. It improves resource utilization efficiency, uses fewer control resources, and efficiently realizes audio data interconnection between the I2S interface and the coaxial audio transceiver module. During the entire transmission process, the CPU does not need to be involved. In this way, a lower-cost CPU can be configured in the SOC system with coaxial audio, which not only does not require additional costs, but can also reduce the cost of the entire system after optimizing the design.

[0066] The embodiment of the present invention discloses a method for transmitting an audio signal. Figure 8 As shown, the method comprises the following steps:

[0067] Step S802: The CODEC chip receives a first audio signal, processes the first audio signal, and sends the processed first audio signal to a first buffer module through an I2S interface;

[0068] Step S804: When the audio data volume in the first buffer module is detected to have reached a preset data volume threshold, the audio sending control unit sends a first write request to the first storage unit.

[0069] Step S806: the first storage unit obtains all the buffered audio signals from the first buffer module according to the first write request, and sends all the audio signals to the external device through the audio sending module;

[0070] Step S808, the audio receiving module receives a second audio signal from an external device, and sends the second audio signal to a second storage unit;

[0071] Step S810, when the audio receiving control unit monitors that the remaining cache space in the second cache module meets the preset cache space threshold, it sends a first read request to the second storage unit, so that the second cache module reads the audio data from the second storage unit, and sends the audio data to the CODEC chip through the I2S interface to play the audio data.

[0072] The above audio signal transmission method realizes seamless transmission of audio signals between the I2S interface and the audio sending module and the audio receiving module without CPU intervention and without occupying additional chip area, thereby reducing chip costs.

[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An audio signal transmission system, characterized in that: The system comprises: a CODEC chip, an I2S interface, a first cache module, a first storage unit and an audio sending module which are sequentially connected in communication; the I2S interface is also sequentially connected in communication with a second cache module, a second storage unit and an audio receiving module; the first cache module and the first storage unit are respectively connected in communication with an audio sending control unit, and the second cache module and the second storage unit are respectively connected in communication with an audio receiving control unit; The CODEC chip is used to receive the first audio signal, process the first audio signal, and send the processed first audio signal to the first cache module through the I2S interface; The audio sending control unit is used to send a first write request to the first storage unit when monitoring that the amount of audio data in the first cache module reaches a preset data amount threshold; The first storage unit is used for acquiring all the buffered audio signals from the first buffer module according to the first write request, and sending all the audio signals to the external device through the audio sending module; The audio receiving module is used to receive a second audio signal from the external device and send the second audio signal to the second storage unit; The audio receiving control unit is used to send a first read request to the second storage unit when it is monitored that the remaining cache space in the second cache module meets a preset cache space threshold, so that the second cache module reads the audio data from the second storage unit, and sends the audio data to the CODEC chip through the I2S interface to play the audio data.

2. The system according to claim 1, characterized in that The audio transmission control unit comprises: The I2S sending control module is used to send a first write enable instruction to the write interface corresponding to the first storage unit to send a first write request to the first storage unit when it is monitored that the amount of audio data in the first cache module reaches a preset data amount threshold; and is also used to monitor the first capacity usage of the first storage unit in the process of the first storage unit acquiring all the cached audio signals from the first cache module, and when the first capacity usage reaches a preset first capacity threshold, discard the latest received audio signal and generate a first interrupt signal; The first storage control module is used to send the first interrupt signal to the CPU so that the CPU executes a processing operation corresponding to the first interrupt signal.

3. The system according to claim 2, characterized in that The I2S sending control module is further used to generate a second interrupt signal when detecting that the first storage unit is empty; The first storage control module is used to send the second interrupt signal to the CPU so that the CPU executes a processing operation corresponding to the second interrupt signal.

4. The system according to claim 2, characterized in that The audio transmission control unit comprises: The first sending control module is used to send a first read enable instruction to the read interface corresponding to the first storage unit when it is monitored that the first capacity usage of the first storage unit reaches a preset second capacity threshold, so that the audio sending module reads all the audio signals from the first storage unit; wherein the second capacity threshold is less than the first capacity threshold.

5. The system according to claim 4, characterized in that The audio receiving control unit comprises: a first receiving control module, configured to, when monitoring that the audio receiving module receives a second audio signal from the external device, send a second write enable instruction to the write interface corresponding to the second storage unit, so that the audio receiving module sends the second audio signal to the second storage unit; and further configured to monitor the second capacity usage of the second storage unit during the process of the audio receiving module sending the second audio signal to the second storage unit, and when the second capacity usage reaches a preset third capacity threshold, discard the most recently received audio signal and generate a third interrupt signal; a second storage control module, configured to send the third interrupt signal to the CPU so that the CPU performs a processing operation corresponding to the third interrupt signal; The first receiving control module is further configured to allow the audio receiving module to continue to send the second audio signal to the second storage unit when it is detected that the usage of the second capacity is lower than a preset fourth capacity threshold; wherein the fourth capacity threshold is lower than the third capacity threshold; The first receiving control module is further configured to generate a fourth interrupt signal when detecting that the second storage unit is empty; The second storage control module is used to send the fourth interrupt signal to the CPU, so that the CPU executes a processing operation corresponding to the fourth interrupt signal.

6. The system according to claim 5, characterized in that The audio receiving control unit comprises: The I2S receiving control module is used to send a second read enable instruction to the read interface corresponding to the second storage unit to send a first read request to the second storage unit when it is monitored that the remaining cache space in the second cache module meets a preset cache space threshold.

7. The system according to claim 4, characterized in that The first sending control module is further used to monitor whether the audio sending module is connected to the external device, obtain a first monitoring result, and generate a first coaxial state identifier according to the first monitoring result; The first storage control module is used to output first status information according to the first coaxial status identifier.

8. The system according to claim 5, characterized in that The first receiving control module is further used to monitor whether the audio receiving module is connected to the external device, obtain a second monitoring result, and generate a second coaxial state identifier according to the second monitoring result; The second storage control module is used to output second state information according to the second coaxial state identifier.

9. The system according to claim 6, characterized in that The I2S sending control module and the I2S receiving control module operate under the I2S sampling clock; The first storage unit, the second storage unit, the first storage control module, the second storage control module, the first sending control module and the first receiving control module operate under a system clock; The audio sending module and the audio receiving module operate under a video encoding clock.

10. An audio signal transmission method, characterized in that: The method comprises: The CODEC chip receives the first audio signal, processes the first audio signal, and sends the processed first audio signal to the first cache module through the I2S interface; The audio sending control unit sends a first write request to the first storage unit when monitoring that the amount of audio data in the first cache module reaches a preset data amount threshold; The first storage unit obtains all the buffered audio signals from the first buffer module according to the first write request, and sends all the audio signals to the external device through the audio sending module; The audio receiving module receives a second audio signal from the external device and sends the second audio signal to a second storage unit; When the audio receiving control unit monitors that the remaining cache space in the second cache module meets the preset cache space threshold, it sends a first read request to the second storage unit so that the second cache module reads the audio data from the second storage unit, and sends the audio data to the CODEC chip through the I2S interface to play the audio data.