Audio data processing method and system, audio processor, electronic equipment and storage medium
By obtaining audio amplifier status data and downsampled recording data in the audio processor, and integrating it to form a monitoring data packet, the data misalignment problem in multi-channel audio processing is solved, synchronous monitoring of audio data is realized, and audio is improved Playback effect.
Patent Information
- Application Number
- CN202411136059.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-26
AI Technical Summary
In multi-channel audio processing, there are misalignments in the status data and audio data of the audio amplifier, resulting in the inability to monitor synchronously, affecting the audio playback effect.
The real-time status data of the audio amplifier is obtained by preset time intervals, and the real-time recording data is downsampled according to the preset frequency, and the recording channel identification, status data and sampled recording data are fused to form a monitoring data packet, and returned to the upper computer in real time for synchronous monitoring.
Synchronous monitoring of status data and audio data is realized, ensuring the improvement of audio playback effect.
Smart Images

Figure CN119028385A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio processing equipment, and in particular to an audio data processing method and system thereof, an audio processor, an electronic device and a storage medium. Background Art
[0002] With the development of electronic technology, audio data transmission has gradually changed from analog audio to digital audio. When processing audio data, the audio amplifier (Operational Amplifier, PA) in the digital audio processor not only has basic amplification and filtering functions, but also integrates more advanced sound effect processing functions and processing and protection functions for speaker parameters such as amplitude, temperature, and frequency. During the use of the digital audio processor, it is necessary to monitor the working status of the audio amplifier to avoid speaker damage due to abnormal conditions, and to provide feedback and correction of the timbre in a timely manner.
[0003] In the related art, when designing the digital audio circuit of a digital audio processor, the audio processor MCU (Microcontroller Unit) is usually connected to the audio amplifier through two buses, one of which is the I2C (Inter-Integrated Circuit) bus, which is used to configure and read the status data of the audio amplifier, and the other is the TDM (Time-Division Multiplexing) bus, which is used to send and receive audio data. In a scenario where multi-channel playback and recording need to be performed synchronously, the working status of the audio amplifier also needs to be monitored in real time at the main control end, so as to adjust the working parameters of the audio amplifier in time (such as adjusting the DSP parameters (Digital Signal Processing) in the audio amplifier). Therefore, it is necessary to synchronize the status data obtained by the I2C bus and the audio data obtained by the TDM bus.
[0004] In multi-channel audio processing, the number of audio amplifiers and the corresponding amount of status data are large, which makes the MCU connected to the audio amplifier overloaded. There are delays in the acquisition and transmission of data between the MCU and the audio amplifier, resulting in misalignment of status data and audio data, making it impossible to monitor them synchronously, and the audio playback effect is poor. Summary of the invention
[0005] In view of this, the embodiments of the present application provide an audio data processing method and system, an audio processor, an electronic device and a storage medium to solve or alleviate the problem in the related art that status data and audio data are misaligned and cannot be monitored synchronously, resulting in poor audio playback effects.
[0006] According to a first aspect of an embodiment of the present application, there is provided an audio data processing method, which is applied to an audio processor, and the method comprises: acquiring real-time status data of an audio amplifier according to a preset time interval to obtain status data; downsampling the real-time recording data of the audio amplifier according to a preset frequency to obtain sampled recording data; fusing the recording channel identifier, status data and sampled recording data of the audio amplifier into a monitoring data packet; and returning the monitoring data packet to a host computer via a recording channel of the real-time recording data, so that the host computer synchronously monitors the status data and the sampled recording data based on the recording channel identifier of the audio amplifier.
[0007] In some embodiments of the present application, the timing length of the monitoring data packet is not greater than the timing length of the real-time recording data.
[0008] In some embodiments of the present application, the recording channel identification, status data and sampled recording data of the audio amplifier are merged into a monitoring data packet, including: determining the start time and end time of the data period of the real-time recording data and the real-time status data; based on the start time and end time, determining the time information of multiple fields in the format of the monitoring data packet; writing the recording channel identification, status data and sampled recording data of the audio amplifier into different fields, and adding the time information of multiple fields.
[0009] In some embodiments of the present application, the audio data processing method further includes: in a recording channel of real-time recording data, clearing previous monitoring data packets before a start time; and caching the monitoring data packets in the recording channel.
[0010] In some embodiments of the present application, the audio data processing method further includes: collecting real-time status data and real-time recording data through a control line and a data line of a bus between the audio processor and the audio amplifier, respectively.
[0011] In some embodiments of the present application, the host computer generates real-time control parameters of the audio amplifier based on the recording channel identification of the audio amplifier, the status data and the sampled recording data; the audio data processing method also includes: obtaining the real-time control parameters, and returning them to the audio amplifier through a control line, so that the audio amplifier adjusts the real-time status based on the real-time control parameters.
[0012] According to a second aspect of an embodiment of the present application, an audio processor is provided, including: an acquisition module, which acquires real-time status data of an audio amplifier according to a preset time interval to obtain status data; a sampling module, which downsamples the real-time recording data of the audio amplifier according to a preset frequency to obtain sampled recording data; a fusion module, which fuses the recording channel identifier, status data and sampled recording data of the audio amplifier into a monitoring data packet; and a communication module, which returns the monitoring data packet to a host computer via the recording channel of the real-time recording data, so that the host computer synchronously monitors the status data and the sampled recording data based on the recording channel identifier of the audio amplifier.
[0013] According to a third aspect of the embodiments of the present application, there is provided an audio processing system, including: a host computer; an audio processor according to any one of the above embodiments; and an audio amplifier.
[0014] In some embodiments of the present application, the host computer generates real-time control parameters of the audio amplifier for the sampled state data and the sampled recording data based on the recording channel identifier of the audio amplifier, and sends the real-time control parameters to the audio processor; wherein the audio processor returns the real-time control parameters to the audio amplifier through the control line, so that the audio amplifier adjusts the real-time state based on the real-time control parameters.
[0015] According to the fourth aspect of the embodiments of the present application, an electronic device is provided, including: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the audio data processing method of any of the above embodiments.
[0016] According to a fifth aspect of the embodiments of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the audio data processing method of any of the above embodiments is implemented.
[0017] According to the audio data processing method and system, audio processor, electronic device and storage medium provided in the embodiments of the present application, status data and down-sampled recording data are obtained from real-time status data and real-time recording data, respectively, and the recording channel identifier, status data and sampled recording data of the audio amplifier are merged into a monitoring data packet, so that the monitoring data packet is returned to the host computer via the recording channel, thereby ensuring the synchronization between the status data and the sampled recording data, so that the host computer can calculate the amplitude according to the sampled recording data, and timely adjust the output parameters of the audio processor in combination with the status data, thereby ensuring a good audio playback effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in 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 only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0019] Figure 1 A flowchart of an audio data processing method according to an embodiment of the present application;
[0020] Figure 2 A schematic diagram of obtaining status data according to an embodiment of the present application;
[0021] Figure 3 A schematic diagram of obtaining sampled recording data according to an embodiment of the present application;
[0022] Figure 4 A schematic diagram of the fusion of monitoring data packets according to an embodiment of the present application;
[0023] Figure 5 is a control schematic diagram of an audio processing system according to an embodiment of the present application;
[0024] Figure 6 is a structural block diagram of an audio processor according to an embodiment of the present application;
[0025] Figure 7 is a structural block diagram of an audio processing system according to an embodiment of the present application;
[0026] Figure 8 The figure is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0028] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0029] Figure 1 The figure is a flowchart of an audio data processing method according to an embodiment of the present application.
[0030] like Figure 1As shown, the audio data processing method is applied to an audio processor, and the method includes:
[0031] S11: Acquire real-time status data of the audio amplifier according to a preset time interval to obtain status data.
[0032] Specifically, the real-time status data of the audio amplifier includes but is not limited to temperature data, center frequency data, watchdog status data and DSP status data. By setting a status acquisition software module in the audio processor MCU, the status acquisition software module can obtain the status data of the audio amplifier through the I2C bus connected between the MCU and the audio amplifier, wherein the status acquisition software module obtains the status data of the audio amplifier through the I2C bus means that the status acquisition software module obtains the status data of the audio amplifier from the I2C bus at preset time intervals through a timer.
[0033] Among them, the audio amplifier is arranged in the digital audio chip, and the preset time interval can be a time interval of 100us, 200us or 300us, etc. The specific value is not limited here. The temperature data, center frequency data, watchdog status data and DSP status data can be obtained in sequence according to the preset time interval, or all the data in the temperature data, center frequency data, watchdog status data and DSP status data can be obtained each time according to the preset time interval. The method of obtaining the status data can be adjusted according to actual needs.
[0034] In some embodiments, real-time status data is collected through a control line of a bus between the audio processor and the audio amplifier, wherein the control line may be an I2C bus.
[0035] For example, Figure 2 FIG. 1 is a schematic diagram of obtaining status data according to an embodiment of the present application. Figure 2 As shown, the preset time interval is 100us. The status acquisition software module in the audio processor obtains the status data of the audio amplifier from the I2C bus through the timer at preset time intervals. The audio amplifier is connected to the external speaker interface SPK1 (statistical process control), SPK2...SPKN for audio playback, and the input end of the status data acquisition module is connected to the I2C bus of each audio processor.
[0036] For example, status data is acquired through the I2C bus starting from 0ms, and temperature data (first status data) is acquired through the I2C bus at 0mS, and is marked as Temp0; center frequency data (second status data) is acquired through the I2C bus at 0mS+100uS, and is marked as F0; watchdog status data (third status data) is acquired through the I2C bus at 0mS+200uS, and is marked as WD0; DSP status data (fourth status data) is acquired through the I2C bus at 0mS+300uS, and is marked as DSPS0; temperature data (first status data) is acquired through the I2C bus at 0mS+400uS, and is marked as Temp1; and so on, to acquire status data according to preset time intervals.
[0037] S12: Down-sampling the real-time recording data of the audio amplifier according to a preset frequency to obtain sampled recording data.
[0038] In the field of digital signal processing, downsampling, also known as down sampling, is a process of reducing the signal sampling rate, usually used to reduce the data transmission rate or data size. The preset frequency refers to the preset frequency of downsampling, which can be adjusted according to actual needs. For example, the preset frequency is 1 / 4 (25%),
[0039] A recording downsampling module may be provided in the audio processor, and the module is used to downsample the recording data within a period of time according to a preset frequency to obtain sampled recording data.
[0040] In some embodiments, real-time recording data is collected via a data line of a bus between the audio processor and the audio amplifier, wherein the data line may be a TDM bus.
[0041] For example, Figure 3 FIG. 1 is a schematic diagram of obtaining sampled recording data according to an embodiment of the present application. Figure 3 As shown, in the 48kHz audio, there are 48 real-time recording data (such as D1, D2, D3, D4, D5...D48) every 1ms, the preset frequency is 1 / 4, and the real-time recording data within 1ms is downsampled at a preset frequency of 1 / 4 through the recording downsampling module, and the obtained 12 sampled recording data are the recording data of each data point such as D1, D5, D9, D13, D17, D21, D25, D29, D33, D37, D41 and D45. The input end of the recording downsampling module is connected to the TDM bus of each audio processor.
[0042] Among them, the most important information carried in the real-time recording data is the amplitude information of the current audio. The amplitude is a continuously changing quantity and almost no jump occurs. Therefore, downsampling the real-time recording data usually does not cause the loss of amplitude information, which can reduce the amount of recording data and ensure the integrity of the recording data.
[0043] S13: The recording channel identifier, status data and sampled recording data of the audio amplifier are integrated into a monitoring data packet.
[0044] It can be understood that the audio data processing method of the present application is aimed at the synchronization problem of state data and recording data in multi-channel audio processing technology. Therefore, when acquiring the state data and recording data, it is necessary to acquire the state data and recording data of the audio amplifier corresponding to each channel. The recording channel identifier can be represented by CHxx-yyy-zzz, where xx represents the channel number, yyy represents the number of mS, and zzz represents the zzzth group of data corresponding to the yyyth ms to the next sampling period.
[0045] In the design circuit of the audio processor, the status data of the audio amplifier is read from the I2C bus connected between the audio processor and the audio amplifier at preset timing intervals through a timer, and the recording data of the audio amplifier is read from the TDM bus connected between the audio processor and the audio amplifier, and the read status data and recording data are returned to the host computer at the same time, so that the host computer can obtain the synchronized status data and recording data of the audio amplifier and parse them to determine whether to adjust the status parameters of the audio amplifier, thereby ensuring the playback effect of the audio processor.
[0046] However, in multi-channel audio processing, the number of audio amplifiers and the corresponding number of status data are large, which makes the audio processor connected to the audio amplifier overloaded, which will limit the bandwidth and processing capacity of the audio processor to send audio data to the host computer. There are delays in the acquisition and transmission of data between the audio processor and the audio amplifier. The audio processor cannot synchronize the status data and recording data of the corresponding time in time, resulting in misalignment of the status data and recording data returned to the host computer (such as the status data and recording data are data of different channels). As a result, the host computer cannot adjust the status data in time according to the recording data, and it is difficult to ensure a good audio playback effect.
[0047] Therefore, in order to solve the problem of misalignment and asynchrony between status data and recording data, the present application acquires the real-time status data of the audio amplifier according to a preset time interval, downsamples the real-time recording data of the audio amplifier according to a preset frequency, and obtains sampled recording data, and then, based on the recording channel identification information of the audio amplifier, merges the status data and the sampled recording data belonging to the same recording channel to obtain a fused monitoring data packet.
[0048] In multi-channel audio processing technology, audio amplifiers and recording channels may have a one-to-one correspondence. Therefore, when merging the status data and sampled recording data, the status data and sampled recording data belonging to the same recording channel can be merged according to the recording identifier of the audio amplifier, thereby reducing the bandwidth requirement when the audio processor sends audio data to the host computer and ensuring the synchronization of the status data and sampled recording data.
[0049] For example, Figure 4 FIG. 1 is a schematic diagram of the fusion of monitoring data packets according to an embodiment of the present application, such as Figure 4 As shown, the data fusion module in the audio processor first writes the recording channel identifier of the audio amplifier into the 1 / 4 field position of the monitoring data packet. The recording channel identifier can be CH01-000-001, where CH01 indicates that the recording channel is the first channel, 000 indicates that the timestamp of the recording channel is 0ms, and 001 indicates the first group of data starting from 0ms. According to the content in the above example, the first group of data includes the state data and sampled recording data between 0ms-1ms. The input end of the data fusion module is connected to the output end of the recording downsampling module and the state data acquisition module, and the output end of the data fusion module is connected to the host computer.
[0050] Then, the audio processor writes the sampled recording data of the audio amplifier into the 2 / 4 field position of the monitoring data packet. The sampled recording data is Figure 3 The recording data of each data point such as D1, D5, D9, D13, D17, D21, D25, D29, D33, D37, D41 and D45 in the monitoring data packet are recorded; the status data of the audio amplifier is written into the 3 / 4 field position of the monitoring data packet, and the status data is Figure 2 Temp0, F0, WD0, DSPS0, Temp1, F1, WD1, DSPS1, Temp2, F2 and WD2 in the monitoring data packet, and write the remaining 1 bit to 0; finally, fill 0 in the 4 / 4 field position of the monitoring data packet to obtain the fused monitoring data packet.
[0051] S14: The monitoring data packet is returned to the host computer via the recording channel of the real-time recording data, so that the host computer synchronously monitors the status data and the sampled recording data based on the recording channel identifier of the audio amplifier.
[0052] The host computer can be a host on the PC (Personal Computer) side. After synchronously processing the status data and the sampled recording data to obtain a fused monitoring data packet, the monitoring data packet can be returned to the host computer through the recording channel of the real-time recording data, so that the host computer can separate the multi-channel monitoring data packet into multiple single-channel monitoring data packets according to the recording channel identifier of the audio amplifier, so as to parse the single-channel monitoring data packet, obtain the status data and the sampled recording data and monitor it, so as to optimize the working state of the audio amplifier in real time according to the real-time monitored status data and the sampled recording data, and improve the audio playback effect of the audio processor.
[0053] Among them, the audio processor can return the monitoring data packet through the recording channel through the USB (Universal Serial Bus) bus protocol, which can solve the problem of data transmission delay caused by the increase in the audio processor load in multiple channels, avoid the misalignment between the status data and the recording data, and ensure the synchronization between the status data and the sampled recording data. It should be noted that since the monitoring data packet of the present application is sent through the recording channel, in some embodiments, the timing length of the monitoring data packet is not greater than the timing length of the real-time recording data, so as to ensure that the monitoring data packet can successfully pass through the recording channel.
[0054] According to the audio data processing method of the embodiment of the present application, status data and down-sampled recording data are obtained from real-time status data and real-time recording data respectively, and the recording channel identifier, status data and sampled recording data of the audio amplifier are merged into a monitoring data packet, so as to return the monitoring data packet to the host computer via the recording channel, thereby ensuring the synchronization between the status data and the sampled recording data, so that the host computer can calculate the amplitude according to the sampled recording data, and timely adjust the output parameters of the audio processor in combination with the status data, thereby ensuring a good audio playback effect.
[0055] In some embodiments, the recording channel identification, status data and sampled recording data of the audio amplifier are merged into a monitoring data packet, including: determining the start time and end time of the data period of the real-time recording data and the real-time status data; based on the start time and end time, determining the time information of multiple fields in the format of the monitoring data packet; writing the recording channel identification, status data and sampled recording data of the audio amplifier into different fields, and adding the time information of multiple fields.
[0056] Specifically, when writing the status data and sampled recording data into different fields and fusing them to obtain a monitoring data packet, it is necessary to ensure that the time information of the fused monitoring data packet is consistent with the time information of the acquired status data and sampled recording data. Therefore, when the monitoring data packet is obtained by fusion, it is necessary to determine the start and end times of the data time periods of the real-time status data and real-time recording data corresponding to the status data and sampled recording data, and based on the start and end times, determine the time information of multiple fields in the format of the monitoring data packet.
[0057] Reference Figure 2 and Figure 3 , it can be determined that the start time of the real-time status data and the real-time recording data is 0ms, and the end time is 1ms. The data in the monitoring data packet includes the recording channel identifier, status data and sampled recording data of the audio amplifier. Therefore, based on the start time and end time, the time information of multiple fields in the monitoring data packet is determined to be 0ms-1ms, that is, Figure 4 The time information of each field (1 / 4 field, 2 / 4 field, 3 / 4 field and 4 / 4 field) is 0ms-1ms. In this way, when the recording channel identifier, status data and sampled recording data of the audio amplifier are written into different fields and merged to obtain a monitoring data packet, it can be ensured that the data in the monitoring data packet is data of the same time period, ensuring the synchronization between the status data and the sampled recording data.
[0058] In some embodiments, the audio data processing method further includes: in a recording channel of real-time recording data, clearing previous monitoring data packets before a start time; and caching the monitoring data packets in the recording channel.
[0059] It can be understood that the present application returns the fused monitoring data packet through the recording channel, which can solve the problem of data transmission delay caused by the increased load of the audio processor in multiple channels, avoid the misalignment between status data and recording data, and ensure the synchronization between status data and sampled recording data.
[0060] Furthermore, in order to improve the efficiency of audio data processing, before caching the fused monitoring data packet in the recording channel, the previous monitoring data packet before the start time may be cleared first. For example, the start time of the fused monitoring data packet is 1ms and the end time is 2ms. At this time, before caching the monitoring data packet in the recording channel, the previous monitoring data packet with a start time of 0ms and an end time of 1ms in the recording channel is cleared first, so that only the monitoring data packet with a start time of 1ms and an end time of 2ms is cached in the current recording channel. In this way, it can be ensured that the fused status data and the sampled recording data are data of the same time period, and the two can be synchronized. It can also reduce the data volume of the monitoring data packet and reduce the subsequent data processing burden on the monitoring data packet.
[0061] In some embodiments, the host computer generates real-time control parameters for the audio amplifier based on the recording channel identification pair of the audio amplifier and the state data and the sampled recording data; the audio data processing method also includes: obtaining the real-time control parameters and returning them to the audio amplifier through a control line, so that the audio amplifier adjusts the real-time state based on the real-time control parameters.
[0062] For example, Figure 5 FIG. 1 is a control schematic diagram of an audio processing system according to an embodiment of the present application. Figure 7 As shown, the audio processor obtains the real-time status data of the audio amplifier through the I2C bus, and obtains the real-time recording data of the audio amplifier through the TDM bus. Then, the real-time status data of the audio amplifier is obtained according to a preset time interval to obtain status data, and the real-time recording data of the audio amplifier is downsampled according to a preset frequency to obtain sampled recording data, and the recording channel identifier, status data and sampled recording data of the audio amplifier are merged into a monitoring data packet.
[0063] Then the audio processor sends the monitoring data packet to the host computer through the recording channel of the real-time recording data and the USB bus protocol, so that the host computer parses the data of the 1 / 4 field of the monitoring data packet to obtain the recording channel identification and communication information of the audio amplifier, and separates the multi-channel monitoring data packet into multiple single-channel monitoring data packets according to the recording channel identification, and then parses the data of the 2 / 4 field in each single-channel monitoring data packet to obtain the sampled recording data corresponding to each single channel, and parses the data of the 3 / 4 field in each single-channel monitoring data packet to obtain the status data corresponding to each single channel.
[0064] Then, the host computer inputs the recording channel identification and communication information, sampled recording data and status data into its internal protection and adjustment algorithm for calculation, and obtains the real-time control parameters of the audio amplifier corresponding to each single channel (the real-time control parameters can be DSP state adjustment parameters). Finally, the host computer sends the real-time control parameters to the audio processor through the USB bus protocol, and then the audio processor returns the real-time control parameters to the audio amplifier of the parameter to be adjusted through the control line I2C bus, so that the audio amplifier adjusts the real-time state based on the real-time control parameters, thereby timely adjusting the audio playback effect of the audio processor to ensure a good playback effect of the audio processor. Among them, the protection and adjustment algorithm inside the host computer can be written based on programming languages such as C, C++, Python or Java, and this application is not limited here.
[0065] In summary, the present application processes the collected real-time status data and real-time recording data of the audio amplifier to obtain status data and sampled recording data, so as to fuse the status data and sampled recording data with the recording channel identifier in real time, and return the fused monitoring data packet in real time through the recording channel. In this way, the data misalignment problem between the status data and the sampled recording data is avoided, and the parameter delay problem caused by the asynchrony between the control bus and the data bus is avoided, thereby achieving the purpose of synchronization of the status data and the sampled recording data, realizing real-time closed-loop control of the audio amplifier, so that the audio amplifier of each channel can be kept in the optimal working state under the control of the host computer, thereby ensuring the good quality of audio playback of each channel.
[0066] The audio data processing method of this embodiment can be executed by any appropriate electronic device with data processing capabilities, including but not limited to: a server, a mobile terminal (such as a mobile phone, a PAD, etc.) and a PC, etc.
[0067] Figure 6 The figure is a structural block diagram of an audio processor according to an embodiment of the present application.
[0068] like Figure 6 As shown, the audio processor 600 includes: an acquisition module 601, which is used to acquire the real-time status data of the audio amplifier according to a preset time interval to obtain the status data; a sampling module 602, which is used to downsample the real-time recording data of the audio amplifier according to a preset frequency to obtain sampled recording data; a fusion module 603, which is used to fuse the recording channel identifier, status data and sampled recording data of the audio amplifier into a monitoring data packet; a communication module 604, which is used to return the monitoring data packet to the host computer via the recording channel of the real-time recording data, so that the host computer can synchronously monitor the status data and the sampled recording data based on the recording channel identifier of the audio amplifier.
[0069] In some embodiments, the timing length of the monitoring data packet is no greater than the timing length of the real-time recording data.
[0070] [AW20230111ICN1][HS2410336CCN] degree.
[0071] In some embodiments, the fusion module 603 is specifically used to: determine the start time and end time of the data period of real-time recording data and real-time status data; based on the start time and end time, determine the time information of multiple fields in the format of the monitoring data packet; write the recording channel identifier, status data and sampled recording data of the audio amplifier into different fields, and add the time information of multiple fields.
[0072] In some embodiments of the present application, the audio processor 600 also includes: a clearing module (not shown in the figure), which is used to clear previous monitoring data packets before the start time in the recording channel of real-time recording data; and a cache module (not shown in the figure), which is used to cache the monitoring data packets in the recording channel.
[0073] In some embodiments of the present application, the audio processor 600 also includes: an acquisition module (not shown in the figure), which is used to collect real-time status data and real-time recording data through the control line and data line of the bus between the audio processor and the audio amplifier respectively.
[0074] In some embodiments of the present application, the host computer generates real-time control parameters of the audio amplifier based on the recording channel identifier of the audio amplifier, the status data and the sampled recording data; the acquisition module 601 is also used to: obtain the real-time control parameters, and return them to the audio amplifier through the control line, so that the audio amplifier adjusts the real-time state based on the real-time control parameters.
[0075] According to the audio processor of the embodiment of the present application, the status data and the down-sampled recording data are obtained from the real-time status data and the real-time recording data, respectively, and the recording channel identifier, the status data and the sampled recording data of the audio amplifier are merged into a monitoring data packet, so as to return the monitoring data packet to the host computer via the recording channel, thereby ensuring the synchronization between the status data and the sampled recording data, so that the host computer can calculate the amplitude according to the sampled recording data, and timely adjust the output parameters of the audio processor in combination with the status data, thereby ensuring a good audio playback effect.
[0076] The audio processor 600 of this embodiment is used to implement the corresponding audio data processing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the audio processor 600 of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0077] Figure 7 The figure is a structural block diagram of an audio processing system according to an embodiment of the present application.
[0078] like Figure 7 As shown, the audio processing system 700 includes: a host computer 701; an audio processor 600 of any of the above embodiments; and an audio amplifier 702. It can be understood that referring to Figure 5 It can be seen that the status data and sampled recording data of the audio amplifier 702 are sent to the audio processor 600 connected thereto through the I2C bus and the TDM bus. The audio processor 600 merges the recording channel identifier, status data and sampled recording data to obtain a monitoring data packet and sends it to the host computer 701 for processing to obtain real-time control parameters to adjust the audio playback effect of the audio amplifier 702.
[0079] According to the audio processing system of the embodiment of the present application, status data and down-sampled recording data are obtained from real-time status data and real-time recording data, respectively, and the recording channel identifier, status data and sampled recording data of the audio amplifier are merged into a monitoring data packet, so as to return the monitoring data packet to the host computer via the recording channel, thereby ensuring the synchronization between the status data and the sampled recording data, so that the host computer can calculate the amplitude according to the sampled recording data, and timely adjust the output parameters of the audio processor in combination with the status data, thereby ensuring a good audio playback effect.
[0080] The audio processing system 700 of this embodiment is used to implement the corresponding audio data processing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here. In addition, the functional implementation of each module in the audio processing system 700 of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be described in detail here.
[0081] In some embodiments of the present application, the host computer generates real-time control parameters of the audio amplifier for the sampled state data and the sampled recording data based on the recording channel identifier of the audio amplifier, and sends the real-time control parameters to the audio processor; wherein the audio processor returns the real-time control parameters to the audio amplifier through the control line, so that the audio amplifier adjusts the real-time state based on the real-time control parameters.
[0082] That is to say, the host computer sends the generated real-time control parameters to the audio processor through the USB bus protocol, and then the audio processor returns the real-time control parameters to the audio amplifier of the parameter to be adjusted through the control line I2C bus, so that the audio amplifier adjusts the real-time state based on the real-time control parameters, thereby timely adjusting the audio playback effect of the audio processor to ensure a good playback effect of the audio processor.
[0083] Figure 8 This is a structural block diagram of an electronic device according to an embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.
[0084] like Figure 8 As shown, the electronic device 800 may include: a processor 802, a memory 803, a communication interface 804 and a communication bus 805. The processor 802, the memory 803 and the communication interface 804 communicate with each other through the communication bus 805; the memory 803 is used to store at least one executable instruction, and the executable instruction enables the processor 802 to perform the operation corresponding to the audio data processing method of any of the above embodiments.
[0085] The processor 802 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0086] The memory 803 is used to store programs, and may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0087] According to the electronic device of the embodiment of the present application, status data and down-sampled recording data are obtained from real-time status data and real-time recording data, respectively, and the recording channel identifier, status data and sampled recording data of the audio amplifier are merged into a monitoring data packet, so as to return the monitoring data packet to the host computer via the recording channel, thereby ensuring the synchronization between the status data and the sampled recording data, so that the host computer can adjust the status data in time according to the recording data, thereby ensuring a good audio playback effect.
[0088] An embodiment of the present application further provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the audio data processing method of any of the above embodiments is implemented.
[0089] According to the computer storage medium of the embodiment of the present application, the status data and the down-sampled recording data are obtained from the real-time status data and the real-time recording data, respectively, and the recording channel identifier, the status data and the sampled recording data of the audio amplifier are merged into a monitoring data packet, so that the monitoring data packet is returned to the host computer via the recording channel, thereby ensuring the synchronization between the status data and the sampled recording data, so that the host computer can calculate the amplitude according to the sampled recording data, and timely adjust the output parameters of the audio processor in combination with the status data, thereby ensuring a good audio playback effect.
[0090] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0091] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or can be implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the audio data processing method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the audio data processing method shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the audio data processing method shown here.
[0092] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0093] The above implementation methods are only used to illustrate the embodiments of the present application, and are not intended to limit the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims. The systems, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions.
Claims
1. A method for processing audio data, It is characterized in that Applied to an audio processor, the method comprises: Acquire the real-time status data of the audio amplifier according to a preset time interval to obtain status data; Downsampling the real-time recording data of the audio amplifier according to a preset frequency to obtain sampled recording data; Merging the recording channel identifier of the audio amplifier, the status data and the sampled recording data into a monitoring data packet; The monitoring data packet is returned to the host computer via the recording channel of the real-time recording data, so that the host computer synchronously monitors the status data and the sampled recording data based on the recording channel identifier of the audio amplifier.
2. The audio data processing method according to claim 1, It is characterized in that The timing length of the monitoring data packet is not greater than the timing length of the real-time recording data.
3. The audio data processing method according to claim 1, It is characterized in that The recording channel identifier of the audio amplifier, the status data and the sampled recording data are merged into a monitoring data packet, including: Determine the start time and end time of the data period of the real-time recording data and the real-time status data; Based on the start time and the end time, determine time information of multiple fields in the format of the monitoring data packet; The recording channel identifier of the audio amplifier, the status data and the sampled recording data are written into different fields, and time information of the multiple fields is added.
4. The audio data processing method according to claim 3, It is characterized in that The method further comprises: In the recording channel of the real-time recording data, clearing the previous monitoring data packets before the starting time; The monitoring data packet is cached in the recording channel.
5. The audio data processing method according to claim 1, It is characterized in that The method further comprises: The real-time status data and the real-time recording data are collected respectively through a control line and a data line of a bus between the audio processor and the audio amplifier.
6. The audio data processing method according to claim 5, It is characterized in that The host computer generates real-time control parameters of the audio amplifier based on the state data and the sampled recording data based on the recording channel identifier of the audio amplifier; The method further comprises: The real-time control parameter is acquired and returned to the audio amplifier through the control line, so that the audio amplifier adjusts the real-time state based on the real-time control parameter.
7. An audio processor, It is characterized in that include: An acquisition module acquires real-time status data of the audio amplifier according to a preset time interval to obtain status data; A sampling module downsamples the real-time recording data of the audio amplifier according to a preset frequency to obtain sampled recording data; A fusion module, which fuses the recording channel identifier of the audio amplifier, the status data and the sampled recording data into a monitoring data packet; The communication module returns the monitoring data packet to the host computer via the recording channel of the real-time recording data, so that the host computer synchronously monitors the status data and the sampled recording data based on the recording channel identifier of the audio amplifier.
8. An audio processing system, It is characterized in that include: Host computer; The audio processor according to claim 7; Audio amplifier.
9. The system according to claim 8, It is characterized in that The host computer generates a real-time control parameter of the audio amplifier based on the sampling state data and the sampled recording data based on the recording channel identifier of the audio amplifier, and sends the real-time control parameter to the audio processor; The audio processor returns the real-time control parameter to the audio amplifier through the control line, so that the audio amplifier adjusts the real-time state based on the real-time control parameter.
10. An electronic device, include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the audio data processing method according to any one of claims 1-6.
11. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the audio data processing method according to any one of claims 1 to 6 is implemented.
