Multi-channel audio data processing method and device
By introducing the configuration interface and a common data bus design into the audio data processing device, the problem of single functions of the existing device and inability to update the configuration is solved, and flexible processing of multi-channel audio data and miniaturization portability are realized.
Patent Information
- Application Number
- CN202111263677.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The existing audio data processing device has a single function, cannot update the configuration, and has limited channels, which makes the device unable to achieve miniaturization and portability.
By introducing a configuration interface, it supports multi-channel audio data processing, including configuration types such as data exchange, copying, summing, power distribution and sampling rate conversion, and uses the shared data bus of the digital signal processor and the encoding decoder for parallel processing.
It realizes flexible processing and configuration of multi-channel audio data, supports parallel processing of no less than 8 channels, miniaturizes the device, and is convenient to carry and use.
Smart Images

Figure CN113961167B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio data processing, and in particular to a multi-channel audio data processing method and device. Background Art
[0002] With the technological development in related fields such as microphone array signal processing technology and multi-site signal monitoring interference technology, it is necessary to collect multi-channel audio data and output different data samples as required to simulate various application scenarios, realize the simulation and application of multi-channel signal processing performance or monitoring interference effects at the same time, and improve the efficiency of algorithm evaluation.
[0003] The existing audio data processing devices have relatively simple functions and do not have the function of updating configurations. In addition, the number of channels is generally small. In order to expand the number of channels, a large number of A / D and D / A conversion chips are usually used. When the processor is connected to the conversion chip, independent transmission data lines and reception data lines are used. The wiring is relatively complicated, the chip stacking phenomenon is serious, the device cannot be miniaturized, and it is inconvenient to carry and use. Summary of the invention
[0004] In view of at least one defect or improvement requirement of the prior art mentioned in the background technology, the present invention provides a multi-channel audio data processing method, comprising the following steps:
[0005] S101. Perform data memory management on input audio data;
[0006] S102. Obtaining a mode configuration instruction, and determining a processing method for the input audio data and a corresponding data output channel based on the mode configuration instruction;
[0007] S103. Process the input audio data according to the processing method and the corresponding data output channel and output it.
[0008] According to the multi-channel audio data processing method provided by the present invention, the data memory management of the input audio data is specifically as follows:
[0009] The DMA controller in the digital signal processor is configured so that the input audio data received by each channel is arranged in a continuous address space in the order of the channel number, and then outputted as is by the corresponding data output channel in a one-to-one correspondence manner with the channel number.
[0010] According to the multi-channel audio data processing method provided by the present invention, the mode configuration instruction includes a start bit, an instruction information segment and an end bit; the instruction information segment includes one or more configuration types of data exchange, replication, addition, power allocation and sampling rate conversion.
[0011] According to the multi-channel audio data processing method provided by the present invention, when the configuration type is sampling rate conversion, the instruction information segment also includes a sampling rate value; when the configuration type is data exchange, copying or addition, the instruction information segment also includes the input channel number and output channel number involved in processing the input audio data; when the configuration type is power allocation, the instruction information segment also includes power allocation parameters of each output channel.
[0012] According to the multi-channel audio data processing method provided by the present invention, the processing means of the input audio data is buffer memory copy.
[0013] In another aspect, the present invention provides a multi-channel audio data processing device capable of implementing any of the above processing methods, comprising an external data connector, an interface level converter, a digital signal processor, a codec and an external audio connector electrically connected in sequence;
[0014] The external data connector and the digital signal processor are also connected via a power management chip;
[0015] Also connected to the digital signal processor are a non-volatile memory and a crystal oscillator;
[0016] An external device can update the configuration of the multi-channel audio data processing apparatus through the configuration interface of the external data connector.
[0017] According to the multi-channel audio data processing device provided by the present invention, the configuration type of the updated configuration includes one or more of data exchange, replication, addition, power allocation and sampling rate conversion, and multiple channels in the data frame of the input audio data can be configured with different configuration types respectively.
[0018] According to the multi-channel audio data processing device provided by the present invention, the codec uses multiple coding and decoding units of the same model, and the digital signal processor and the audio transmission paths of the multiple coding and decoding units share the same set of MCASP data buses, supporting parallel processing of no less than 8 channels of audio data.
[0019] According to the multi-channel audio data processing device provided by the present invention, the digital signal processor and the instruction control path of the encoder and decoder are connected through an I2C bus.
[0020] The present invention provides a multi-channel audio data processing method and device. By introducing a configuration interface, an update configuration mechanism is added to the process of audio data processing, so that multiple channels in a data frame of input audio data can be respectively configured with different configuration types such as data exchange, replication, addition, power distribution and sampling rate conversion to achieve different functions; support parallel collection of audio data of no less than 8 channels; select a codec for analog-to-digital conversion, and a digital signal processor and the audio transmission paths of multiple codec units share the same group of data buses, thereby realizing miniaturization of the device, easy to carry, and can use a USB interface for power supply and update configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some preferred embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 is a flowchart of a multi-channel audio data processing method provided by an embodiment of the present invention;
[0023] Figure 2 It is a time division multiplexing schematic diagram of a multi-channel audio data processing method provided by an embodiment of the present invention;
[0024] Figure 3 1 is a data memory management diagram of a multi-channel audio data processing method provided by an embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of a processing process of a multi-channel audio data processing method provided by an embodiment of the present invention;
[0026] Figure 5 The present invention provides a multi-channel audio data processing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with some drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all 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] like Figure 1As shown, in one embodiment, the present invention provides a multi-channel audio data processing method, comprising steps S101-S103:
[0029] S101. Perform data memory management on input audio data.
[0030] The digital signal processor inside the device and the audio transmission paths of multiple encoding and decoding units share the same MCASP data bus connection, and the digital signal processor and the encoding and decoding use time division multiplexing to transmit audio data.
[0031] like Figure 2 As shown, the time-division multiplexed data format is commonly used to transmit data between a digital signal processor and one or more analog-to-digital converters (ADCs), digital-to-analog converters (DACs), or S / PDIF receivers (DIRs). In a basic synchronous serial transmission process, the time-division multiplexed data format includes three components, namely a clock signal, a data signal, and a frame synchronization signal. In the time-division multiplexed transmission process, all data bits are synchronized with the serial clock, and the data bits are grouped into time slots, which are also called channels. A data frame is composed of multiple time slots (or channels). Each time-division multiplexed data frame is defined by a frame synchronization signal, which is usually marked by a rising edge to start the time, and the signal bit width lasts for the length of a data frame time slot. The time-division multiplexed data format is often used in the case of a fixed sampling rate, so the data transmission is continuous and periodic. There is no delay between time slots. The first bit of time slot N+1 is sent out immediately following the last bit of time slot N when the next serial clock arrives. Also, the first bit of the first time slot of the next data frame is sent out immediately following the last bit of the last time slot of the previous data frame when the next serial clock arrives. Since the frame synchronization signal cannot locate the boundary of each time slot, the number of bits in each time slot of the sender and receiver must be the same. Therefore, using a high-precision crystal oscillator and replacing the independent ADC and DAC combination with a codec is helpful to ensure the accuracy of data sampling.
[0032] When performing data memory management, the DMA controller in the digital signal processor is configured so that the input audio data received by each channel is arranged in a continuous address space in the order of the channel number, and then outputted as is by the corresponding data output channel in a one-to-one correspondence manner. Data memory management of input audio data is performed to reduce the complexity of subsequent processing algorithms and reduce the processing delay of subsequent configuration modification.
[0033] In one embodiment, Figure 3As shown, data memory management uses a certain number of data frames as the minimum processing unit, including: one time slot includes A bits of data, one frame includes B time slots, and a certain number of data frames includes C data frames.
[0034] Taking the digital signal processor receiving audio data as an example, the source address of the DMA controller in the digital signal processor is fixed, which is the MCASP receiving interface cache address, and the destination address is the digital signal processor memory space IN[B][C]. The change amount of the destination address between adjacent time slots in a frame is BX=A, and the change amount of the destination address between adjacent frames is CX=(-(B-1)*C*A+A). After the DMA controller completes the movement of C data frames, it notifies the digital signal processor through an interrupt. After the above process, the audio data received by each channel will be arranged in a continuous address space according to the channel number, represented by an array IN[B][C], and the size of each element of the array is A bits. Assuming the sampling frequency is fs (unit kHz), the data processing delay of each unit is A*B*C / fs (unit ms).
[0035] Under the default configuration conditions, in order to ensure that the input audio data is output as is by the corresponding output channel in a one-to-one correspondence manner, the data of IN[B][C] is directly copied to OUT[B][C].
[0036] Similarly, when the digital signal processor sends audio data, the destination address of the DMA controller is fixed, which is the MCASP send interface cache address, and the source address is the digital signal processor memory space OUT[B][C]. The change amount of the source address between adjacent time slots in a frame is BX=A, and the change amount of the source address between adjacent frames is CX=(-(B-1)*C*A+A). After the above process, the input audio data will be sent out by the corresponding output channel.
[0037] S102. Obtain a mode configuration instruction, and determine a processing method for the input audio data and a corresponding data output channel based on the mode configuration instruction. Send a mode configuration instruction through the setting of an external device, detect the instruction content, and determine a processing method for the input audio data and a corresponding data output channel.
[0038] In one embodiment, the data output channel uses an RS232 interface with an interface rate of 115200. The mode configuration instruction needs to have a start bit, an instruction information segment, and an end bit. The instruction information segment needs to include one or more configuration types of data exchange, copying, addition, power allocation, or sampling rate conversion.
[0039] When the configuration type is sampling rate conversion, the instruction information segment needs to include the sampling rate value (8kHz-96kHz); when the configuration type is data exchange, copying, and addition, the instruction information segment needs to include the input channel number and output channel number involved in the audio data processing; in particular, when the configuration type is power allocation, the instruction information segment also needs to include the power allocation parameters of each output channel.
[0040] S103. Process the input audio data according to the processing method and the corresponding data output channel and output it.
[0041] In one embodiment, Figure 4 As shown, by utilizing the beneficial effects of data memory management, in the process of processing audio data, buffer memory copying is used as the main processing means.
[0042] During the data exchange process, assuming that the audio data received by channel M and channel N need to be sent through channel N and channel M respectively, it is only necessary to copy the receive buffer memory corresponding to channel M and channel N to the send buffer memory corresponding to channel N and channel M respectively when the DMA interrupt is triggered.
[0043] During the copy process, assuming that the audio data received by channel M needs to be sent through channels N1, N2, and N3, it is only necessary to copy the receive buffer memory corresponding to channel M to the send buffer memory corresponding to channels N1, N2, and N3 when the DMA interrupt is triggered.
[0044] In the summing process, it is assumed that the maximum power supported by any channel of the device for receiving and transmitting n data frames is P max At the same time, the audio data received by channels M1, M2, and M3 need to be sent out through channel N.
[0045] First, calculate the sum of the audio data power P received by M1, M2, and M3 for n data frames. total .
[0046]
[0047] If P total ≤P max , then it is only necessary to add and copy the receive buffer memory corresponding to channels M1, M2, and M3 to the send buffer memory corresponding to channel N when the DMA interrupt is triggered;
[0048] If P total >P max , then when the DMA interrupt is triggered, the receive buffer memory corresponding to channels M1, M2, and M3 needs to be multiplied by P max / P total Then add and copy to the send buffer memory corresponding to channel N;
[0049] During the power allocation processing, assuming that the audio data received by channel M needs to be sent through channels N1, N2, and N3 according to the proportional coefficients of P1, P2, and P3, where PM = P1+P2+P3, then when the DMA interrupt is triggered, the receive buffer memory corresponding to channel M needs to be multiplied by P1 / PM, P2 / PM, and P3 / PM respectively and then copied to the send buffer memory corresponding to channels N1, N2, and N3.
[0050] In the summing process and the power allocation process, the above calculation and processing are the internal signal processing mechanisms, and the purpose is to ensure that data does not overflow and that the output signal does not change abnormally.
[0051] During the sampling rate conversion process, only the MCASP interface configuration and the codec configuration need to be changed to make the sampling clock frequency correspond to the new sampling rate value.
[0052] In another embodiment, Figure 5 As shown, the present invention provides a multi-channel audio data processing device capable of implementing any of the above processing methods, comprising an external data connector, an interface level converter, a digital signal processor, a codec and an external audio connector electrically connected in sequence;
[0053] The external data connector and the digital signal processor are also connected via a power management chip;
[0054] Also connected to the digital signal processor are a non-volatile memory and a crystal oscillator;
[0055] The external device can update the configuration of the multi-channel audio data processing device through the configuration interface of the external data connector. The configuration type of the updated configuration includes one or more of data exchange, replication, addition, power allocation and sampling rate conversion, and multiple channels in the data frame of the input audio data can be configured with different configuration types respectively.
[0056] The instruction control path of the digital signal processor and the codec are connected using an I2C bus. Preferably, the codec uses multiple codec units of the same model, and the digital signal processor and the audio transmission paths of the multiple codec units share the same MCASP data bus, supporting parallel processing of no less than 8 channels of audio data, and the data bus includes signal lines such as data input, data output, sampling clock, frame clock and bit clock.
[0057] The digital signal processor is used to receive configuration instructions and complete the audio data processing process; the power management chip is used to convert the external input power supply voltage into the appropriate voltage required for other chips to work; the non-volatile memory is used to store the processor startup program and necessary configuration information; the crystal oscillator is used to ensure the accuracy of the sampling clock; the encoder and decoder is used to complete the multi-channel audio data acquisition and output process; the interface level converter is used to realize the communication between the digital signal processor and the external control device (such as an external computer terminal).
[0058] In another embodiment, the digital signal processor can use a DSP chip of model TMS320C6748BZWTD4 with a main clock of up to 456MHz; the power management chip can use a DCDC chip of model TPS650250RHB, with an external voltage of 5V USB power input and three power outputs of 3.3V, 1.8V and 1.3V respectively; the non-volatile memory can use a NAND chip of model MT29F4G16ABADAH4 FLASH chip, storage space reaches 16Gb; crystal oscillator can choose high stability voltage controlled crystal oscillator, crystal oscillator output frequency is 24.576MHZ, frequency stability is 1ppm; encoding and decoding units use 4 pieces, the same model, configured with different physical addresses, can choose CODEC chip model TLV320AIC3106IRGZ, support 8kHz-96kHz audio data input and output, analog signal voltage is 3.3V; interface level converter can choose USB to UART chip model FT232RQ; external data connector and external audio connector can choose RCA interface audio connector and USBtype B interface data connector. The device size can be 146mm (length) x 106mm (width) x 25mm (height).
[0059] The above descriptions are only some preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A multi-channel audio data processing method, characterized in that: The method is implemented by a multi-channel audio data processing device, wherein the multi-channel audio data processing device comprises an external data connector, an interface level converter, a digital signal processor, a codec and an external audio connector which are electrically connected in sequence; the external data connector and the digital signal processor are also connected via a power management chip; a non-volatile memory and a crystal oscillator are also respectively connected to the digital signal processor; an external device can update the configuration of the multi-channel audio data processing device via a configuration interface of the external data connector; The digital signal processor and the codec use a time division multiplexing method to transmit audio data, the codec uses a plurality of codec units of the same model, and the digital signal processor and the audio transmission paths of the plurality of codec units share the same MCASP data bus; The method comprises the following steps: S101. Perform data memory management on input audio data; S102. Obtain a mode configuration instruction, and determine a processing method for the input audio data and a corresponding data output channel based on the mode configuration instruction; the mode configuration instruction is sent through an external device setting; the mode configuration instruction includes a start bit, an instruction information segment, and an end bit; the instruction information segment includes one or more configuration types of data exchange, replication, addition, power allocation, and sampling rate conversion; S103. Process the input audio data according to the processing method and the corresponding data output channel and output it.
2. The multi-channel audio data processing method according to claim 1, characterized in that: The data memory management of the input audio data is specifically as follows: The DMA controller in the digital signal processor is configured so that the input audio data received by each channel is arranged in a continuous address space in the order of the channel number, and then outputted as is by the corresponding data output channel in a one-to-one correspondence manner with the channel number.
3. The multi-channel audio data processing method according to claim 1, characterized in that: When the configuration type is sampling rate conversion, the instruction information segment also includes a sampling rate value; when the configuration type is data exchange, copying or addition, the instruction information segment also includes the input channel number and output channel number involved in processing the input audio data; when the configuration type is power allocation, the instruction information segment also includes power allocation parameters of each output channel.
4. The multi-channel audio data processing method according to claim 1, characterized in that: The processing means of the input audio data is buffer memory copy.
5. A multi-channel audio data processing device capable of implementing any processing method in claims 1-4, characterized in that: The configuration types of the update configuration include one or more of data exchange, replication, addition, power allocation and sampling rate conversion, and multiple channels in the data frame of the input audio data can be configured with different configuration types respectively.
6. The multi-channel audio data processing device according to claim 5, characterized in that: The codec uses multiple codec units of the same model, and the digital signal processor and the audio transmission paths of the multiple codec units share the same MCASP data bus, supporting parallel processing of no less than 8 channels of audio data.
7. The multi-channel audio data processing device according to claim 5, characterized in that: The digital signal processor and the instruction control path of the encoder / decoder are connected via an I2C bus.
Citation Information
Patent Citations
Data storage means for multi-channel voice process
CN101043282A
Multichannel audio signal parallel acquisition device
CN206209693U