A software mixing method suitable for an automobile intelligent instrument

CN115862648BActive Publication Date: 2026-10-20NANJING DESAY SV AUTOMOTIVE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211399495.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2026-10-20
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

[0003]本发明为克服上述现有的汽车智能仪表在使用声音提示功能时,存在使用专用硬件处理多通道同时播放声音时,成本高昂,使用软件优先级处理多通道同时播放声音时,用户体验和实时性都很差的问题,提供一种适用于汽车智能仪表的软件混音方法

Benefits of technology

[0029]本发明通过设置两个互相为触发源,且能够触发中断处理程序的DMA,交替将第一声音数据的一段第一数据单元和第二声音数据的一段第二数据单元的混合声音进行搬运输出,实现将第一声音数据和第二声音数据的同时搬运输出,本方法在任意不具备额外声音处理硬件的智能仪表上均能实现任意通道的声音混合。且本方法实时性高,声音播放延时上限可控,多声音同时播放时不会发生打断、排队等情况,用户体验良好。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115862648B_ABST
    Figure CN115862648B_ABST
Patent Text Reader

Abstract

The application relates to a software mixing method suitable for an automobile intelligent instrument, which comprises the following steps: decomposing first sound data and second sound data, which need to be mixed and played, into multiple first data units and multiple second data units respectively; pre-configuring a first DMA and a second DMA, wherein the first DMA and the second DMA are used for carrying the first sound data and the second sound data to a sound output interface; alternately carrying mixed sound of a first data unit of the first sound data and a second data unit of the second sound data by the first DMA and the second DMA; and carrying the first sound data and the second sound data until the carrying is completed. The application can realize sound mixing of any channel on any intelligent instrument without additional sound processing hardware. The method has high real-time performance, the upper limit of sound playing delay is controllable, and the method will not cause interruption, queuing and the like when multiple sounds are played simultaneously, so that the user experience is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio data transmission technology, and in particular to a software mixing method suitable for automotive smart dashboards. Background Technology

[0002] Most automotive smart dashboards feature audible alerts and voice navigation. However, limited by the MCU's (Microcontroller Unit) processing capabilities, they struggle with scenarios requiring simultaneous playback of multiple audio channels. Previously, this was addressed by adding dedicated audio processing hardware or prioritizing audio alerts in software, employing sequential playback / interruption insertion. However, hardware-based solutions typically involve expensive DSPs, drastically increasing production costs. Software-based prioritization can lead to interruptions by higher-priority audio or require waiting for the current audio to finish before the next one can play, compromising user experience and real-time alerts. Summary of the Invention

[0003] To overcome the problems of existing automotive smart instrument panels, such as high cost when using dedicated hardware to process multiple channels of sound playing simultaneously, and poor user experience and real-time performance when using software priority processing for multiple channels of sound playing simultaneously, this invention provides a software mixing method suitable for automotive smart instrument panels.

[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0005] A software mixing method for automotive smart dashboards includes the following steps:

[0006] S10. Decompose the first audio data and the second audio data that need to be mixed and played into multiple first data units and multiple second data units respectively;

[0007] S20. Pre-configure a first DMA and a second DMA, the first DMA and the second DMA being used to transfer the first audio data and the second audio data to the audio output interface;

[0008] S30. Load the first two segments of the first data unit of the first sound data into the first DMA and the second DMA respectively, and start the first DMA and the second DMA in sequence to realize the transfer and output of the first two segments of the first data unit;

[0009] S40. The first DMA and the second DMA alternately transfer and output the mixed sound of the subsequent multiple segments of the first data unit of the first sound data and a segment of the second data unit of the second sound data, so as to realize the simultaneous transfer and output of the first sound data and the second sound data.

[0010] S50. Complete the transfer and output of the first and second audio data.

[0011] Furthermore, as a preferred technical solution, step S30 specifically includes:

[0012] S301. Load the (i-2)th segment and the (i-1)th segment of the first audio data into the first DMA and the second DMA respectively;

[0013] S302. Start the first DMA to transfer and output the (i-2)th segment of the first data unit of the first audio data, and at the same time, mark the second audio data as to be played;

[0014] S303. After the first DMA completes the transfer and output of the first data unit of the (i-2)th segment of the first sound data, the second DMA is started to transfer and output the first data unit of the (i-1)th segment of the first sound data. At the same time, the interrupt handler is triggered to mix the first data unit of the first sound data with the second data unit of the second sound data to form the first mixed sound, and the first DMA is set to prepare for transfer and output.

[0015] S304. After the second DMA completes the transfer and output of the second segment of the first data unit of the first audio data, the first DMA is triggered to start.

[0016] Furthermore, as a preferred technical solution, step S40 specifically includes:

[0017] S401. Start the first DMA to begin transferring output and trigger the interrupt handler to mix the first data unit of the i-th segment of the first sound data with the second data unit of the j-th segment of the second sound data to form a first mixed sound; at the same time, trigger the interrupt handler to mix the first data unit of the (i+1)-th segment of the first sound data with the second data unit of the (j+1)-th segment of the second sound data to form a second mixed sound, and set the second DMA to prepare for transfer output.

[0018] S402. After the first DMA completes the transfer and output of the first mixed sound, the second DMA is started to transfer and output the second mixed sound. At the same time, the interrupt handler is triggered to mix the first data unit of the (i+2)th segment of the first sound data with the first data unit of the (j+2)th segment of the second sound data to form the third mixed sound, and the first DMA is set to prepare for transfer and output.

[0019] S403. Repeat steps S401 and S402 until the output of multiple first data units of the first sound data and multiple second data units of the second sound data is completed.

[0020] Furthermore, as a preferred technical solution, the first DMA and the second DMA are trigger sources for each other, and both the first DMA and the second DMA can trigger the interrupt handler.

[0021] Furthermore, as a preferred technical solution, in steps S303 and S402, when setting the first DMA to prepare for output transfer, the first DMA is not started, but the first DMA is triggered after the second DMA transfer is completed.

[0022] In step S401, when setting the second DMA to prepare for output transfer, the second DMA is not started, but the second DMA is triggered after the first DMA transfer is completed.

[0023] Furthermore, as a preferred technical solution, both the first mixed sound and the second mixed sound are obtained by the interrupt handler using a mixing algorithm.

[0024] Furthermore, as a preferred technical solution, both the first sound data and the second sound data are stored in the memory of the MCU, and the first sound data and the second sound data can be accessed by the first DMA and the second DMA.

[0025] Furthermore, as a preferred technical solution, the storage capacity of each first data unit and each second data unit is decomposed according to the actual computing power of the MCU.

[0026] Furthermore, as a preferred technical solution, the storage capacity of each first data unit is the same, the storage capacity of each second data unit is the same, and the storage capacity of each first data unit and each second data unit is the same.

[0027] Furthermore, as a preferred technical solution, the storage capacity of each first data unit or each second data unit is 8 bytes, 16 bytes, 32 bytes, 64 bytes, 128 bytes, 256 bytes, or 512 bytes.

[0028] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0029] This invention utilizes two DMAs that act as mutual trigger sources and can trigger interrupt handlers to alternately transfer and output a mixture of a first data unit from a first audio data set and a second data unit from a second audio data set. This achieves simultaneous transfer and output of both the first and second audio data sets. This method can achieve audio mixing of any channel on any smart instrument without additional audio processing hardware. Furthermore, this method offers high real-time performance, controllable audio playback latency, and prevents interruptions or queuing when multiple audio sets are played simultaneously, resulting in a superior user experience. Attached Figure Description

[0030] Figure 1 This is a flowchart of the steps of the present invention.

[0031] Figure 2 This is a schematic diagram of the specific steps in step S30 of the present invention;

[0032] Figure 3 This is a schematic diagram of the specific steps in step S40 of the present invention.

[0033] Figure 4 This is a schematic diagram illustrating the principle of the present invention.

[0034] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. To better illustrate this embodiment, some components in the drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions of the product. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings. The same or similar reference numerals correspond to the same or similar components. The terms describing positional relationships in the drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. Detailed Implementation

[0035] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer definition of the scope of protection of the present invention.

[0036] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper", "lower", "left", "right", "top", "bottom", "inner", "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present patent.

[0037] Furthermore, if terms such as "first" or "second" are used for descriptive purposes only, they are mainly used to distinguish different devices, components or parts (the specific types and structures may be the same or different), and are not used to indicate or imply the relative importance or quantity of the indicated devices, components or parts, and should not be construed as indicating or implying relative importance.

[0038] Example 1

[0039] This embodiment addresses the problems of high costs associated with using dedicated hardware to process multiple channels of sound simultaneously when using the sound prompt function in existing automotive smart instruments, and poor user experience and real-time performance when using software priority processing for simultaneous sound playback. It provides a software mixing method suitable for automotive smart instruments.

[0040] This embodiment discloses a software mixing method applicable to automotive smart instruments, taking the implementation of two-channel real-time mixing as an example. For mixing with more channels, it is only necessary to add more channel data synthesis calculations during data synthesis, and the implementation method is exactly the same.

[0041] In this embodiment, the first sound data and the second sound data need to be stored in the memory of the MCU first. The first sound data and the second sound data can be accessed by the first DMA and the second DMA.

[0042] This implementation example Figure 1 As shown, the steps include:

[0043] S10. Decompose the first and second audio data that need to be mixed and played into multiple first data units and multiple second data units respectively.

[0044] In this step, the storage capacity of each first data unit and each second data unit is decomposed according to the actual computing power of the MCU, while the sampling rate of the first sound data and the second sound data can be flexibly changed to achieve a balance between real-time performance and processing accuracy.

[0045] In this embodiment, the storage capacity of each first data unit after decomposition is the same, and the storage capacity of each second data unit is the same. In order to achieve a better mixing process, the storage capacity of each first data unit and each second data unit is also the same.

[0046] In this embodiment, the storage capacity of each first data unit or each second data unit is 8 bytes, 16 bytes, 32 bytes, 64 bytes, 128 bytes, 256 bytes, or 512 bytes, etc.

[0047] S20. Pre-configure the first DMA and the second DMA, which are used to transfer the first audio data and the second audio data to the audio output interface.

[0048] The first DMA and the second DMA are each other's trigger sources, and both the first DMA and the second DMA can trigger the interrupt handler.

[0049] S30. Load the first two segments of the first audio data into the first DMA and the second DMA respectively, and start the first DMA and the second DMA in sequence to realize the transfer and output of the first two segments of the first data.

[0050] This step specifically includes:

[0051] S301. Load the (i-2)th segment of the first data unit and the (i-1)th segment of the first audio data into the first DMA and the second DMA, respectively.

[0052] S302. Start the first DMA to begin transferring and outputting the (i-2)th segment of the first data unit of the first audio data, and at the same time, mark the second audio data as to be played.

[0053] S303. After the first DMA completes the transfer and output of the first data unit of the (i-2)th segment of the first audio data, the second DMA is started to transfer and output the first data unit of the (i-1)th segment of the first audio data. At the same time, the interrupt handler is triggered to mix the first data unit of the first audio data with the second data unit of the second audio data to form the first mixed audio, and the first DMA is set to prepare for transfer and output.

[0054] S304. After the second DMA completes the transfer and output of the second segment of the first data unit of the first audio data, the first DMA is triggered to start.

[0055] In this step, it is assumed that the first audio data is divided into more segments than the second audio data. Therefore, when playback starts, the first audio data is used as the starting point. The first two segments of the first audio data are loaded into the first DMA and the second DMA respectively, while the second audio data is marked as ready for playback.

[0056] In addition, in step S303, when setting the first DMA to prepare for output transfer, the first DMA is not started, but the first DMA is triggered after the second DMA transfer is completed.

[0057] The interrupt handler uses a mixing algorithm to mix a first data unit and a second data unit.

[0058] The mixing algorithms include the following:

[0059] 1. Add the first data unit and the second data unit together directly.

[0060] 2. Add the first data unit and the second data unit together and then divide by the number of mixing channels.

[0061] 3. After directly adding the first data unit and the second data unit together, perform a Clip operation (limiting the data to between the maximum and minimum values). If there is overflow, set the maximum value.

[0062] 4. After directly adding the first data unit and the second data unit together, perform saturation processing, and then distort the data when it approaches the maximum value.

[0063] 5. After directly adding the first data unit and the second data unit together, perform normalization by multiplying all values ​​by a coefficient to normalize the amplitude.

[0064] 6. After directly adding the first data unit and the second data unit together, use the attenuation factor to limit the amplitude.

[0065] The above mixing algorithms are all commonly used mixing algorithms. The specific implementation process will not be described with examples. This embodiment can be selected according to actual needs.

[0066] S40. The first DMA and the second DMA alternately transfer and output the mixed sound of the subsequent multiple segments of the first data unit of the first audio data and a segment of the second data unit of the second audio data, so as to realize the simultaneous transfer and output of the first audio data and the second audio data.

[0067] This step specifically includes:

[0068] S401. Start the first DMA to begin transferring output and trigger the interrupt handler to mix the first data unit of the i-th segment of the first sound data with the second data unit of the j-th segment of the second sound data to form a first mixed sound; at the same time, trigger the interrupt handler to mix the first data unit of the (i+1)-th segment of the first sound data with the second data unit of the (j+1)-th segment of the second sound data to form a second mixed sound, and set the second DMA to prepare for transfer output.

[0069] S402. After the first DMA completes the transfer and output of the first mixed sound, the second DMA is started to transfer and output the second mixed sound. At the same time, the interrupt handler is triggered to mix the first data unit of the i+2th segment of the first sound data with the first data unit of the j+2th segment of the second sound data to form the third mixed sound, and the first DMA is set to prepare for transfer and output.

[0070] S403. Repeat steps S401 and S402 until the output of multiple first data units of the first sound data and multiple second data units of the second sound data is completed.

[0071] In this step, when setting up the first DMA to prepare for output transfer, the first DMA is not started. Instead, the first DMA is started after the second DMA transfer is completed. Similarly, when setting up the second DMA to prepare for output transfer, the second DMA is not started. Instead, the second DMA is started after the first DMA transfer is completed.

[0072] S50. Complete the transfer and output of the first and second audio data.

[0073] This embodiment uses two mutually triggering DMAs (First DMA and Second DMA) capable of triggering interrupt handlers to alternately transfer and output a mixed sound consisting of a segment of the first data unit of the first audio data and a segment of the second data unit of the second audio data. This achieves simultaneous transfer and output of the first and second audio data. This method can achieve audio mixing of any channel on any smart instrument without additional audio processing hardware. Furthermore, this embodiment offers high real-time performance, controllable audio playback latency, and prevents interruptions or queuing when multiple audios are played simultaneously, resulting in a good user experience.

[0074] Furthermore, this embodiment uses the implementation of two-channel real-time mixing as an example. For mixing with more channels, it is only necessary to add more channel data synthesis calculations during data synthesis, and the implementation method is exactly the same.

[0075] Example 2

[0076] This embodiment further illustrates step S30 of a software mixing method suitable for automotive smart instruments, based on embodiment 1.

[0077] In this embodiment, see Figure 4 The first audio data is divided into more segments than the second audio data. The first data unit of the (i-2)th segment is the first data unit of the first segment, the first data unit of the (i-1)th segment is the first data unit of the second segment, the first data unit of the ith segment is the first data unit of the third segment, and the second data unit of the jth segment is the second data unit of the first segment.

[0078] Therefore, step S30 can be:

[0079] First, load the first data unit of the first audio data segment and the second data unit of the first audio data segment into the first DMA and the second DMA respectively.

[0080] The first DMA is started to transfer and output the first segment of the first data unit of the first audio data, and at the same time, the second audio data is marked as to be played.

[0081] After the first DMA completes the transfer and output of the first data unit of the first audio data, the second DMA is started to transfer and output the second data unit of the first audio data. At the same time, the interrupt handler is triggered to mix the third data unit of the first audio data with the first data unit of the second audio data to form the first mixed audio. The first DMA is then set to prepare for transfer and output. At this time, the first DMA is not started, but waits for the second DMA to complete the transfer and output before the first DMA is started.

[0082] S304. After the second DMA completes the transfer and output of the second segment of the first data unit of the first audio data, the first DMA is triggered to start.

[0083] Example 3

[0084] This embodiment further illustrates step S40 of a software mixing method suitable for automotive smart instruments, based on embodiment 1.

[0085] In this embodiment, see Figure 4 The first audio data is divided into more segments than the second audio data. The first data unit of the i-th segment is the first data unit of the third segment, the first data unit of the (i+1)-th segment is the first data unit of the fourth segment, the first data unit of the (i+2)-th segment is the first data unit of the fifth segment, and the second data unit of the j-th segment is the second data unit of the first segment, the second data unit of the (j+1)-th segment is the second data unit of the second segment, and the second data unit of the (j+2)-th segment is the second data unit of the third segment.

[0086] Therefore, step S40 can be:

[0087] The first DMA is started to begin transferring and outputting, triggering an interrupt handler to mix the third segment of the first audio data with the second segment of the first audio data to form a first mixed audio. At the same time, the interrupt handler is triggered to mix the fourth segment of the first audio data with the second segment of the second audio data to form a second mixed audio, and the second DMA is set up to prepare for transfer and outputting.

[0088] After the first DMA completes the transfer and output of the first mixed sound, the second DMA is started to transfer and output the second mixed sound. At the same time, the interrupt handler is triggered to mix the fifth segment of the first data unit of the first sound data with the first segment of the third data unit of the second sound data to form the third mixed sound, and the first DMA is set to prepare for transfer and output.

[0089] Repeat the above two steps until the multiple segments of the second data unit of the second audio data and the multiple segments of the first data unit of the first audio data are mixed, transported and output. Then, use Example 2 to transport and output the remaining multiple segments of the first audio data. After all the multiple segments of the first audio data are transported and output, the transport of both the first audio data and the second audio data is completed.

[0090] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A software mixing method suitable for automotive smart instrument panels, characterized in that, Including the following steps: S10. Decompose the first audio data and the second audio data that need to be mixed and played into multiple first data units and multiple second data units respectively; S20. Pre-configure a first DMA and a second DMA, the first DMA and the second DMA being used to transfer the first audio data and the second audio data to the audio output interface; S30. Load the first two segments of the first data unit of the first sound data into the first DMA and the second DMA respectively, and start the first DMA and the second DMA in sequence to realize the transfer and output of the first two segments of the first data unit; S40. The first DMA and the second DMA alternately transfer and output the mixed sound of the subsequent multiple segments of the first data unit of the first sound data and a segment of the second data unit of the second sound data, so as to realize the simultaneous transfer and output of the first sound data and the second sound data. S50. Complete the transfer and output of the first and second audio data; Specifically, step S40 includes: S401. Start the first DMA to begin transferring output and trigger the interrupt handler to mix the first data unit of the i-th segment of the first sound data with the second data unit of the j-th segment of the second sound data to form a first mixed sound; at the same time, trigger the interrupt handler to mix the first data unit of the (i+1)-th segment of the first sound data with the second data unit of the (j+1)-th segment of the second sound data to form a second mixed sound, and set the second DMA to prepare for transfer output. S402. After the first DMA completes the transfer and output of the first mixed sound, the second DMA is started to transfer and output the second mixed sound. At the same time, the interrupt handler is triggered to mix the first data unit of the (i+2)th segment of the first sound data with the first data unit of the (j+2)th segment of the second sound data to form the third mixed sound, and the first DMA is set to prepare for transfer and output. S403. Repeat steps S401 and S402 until the output of multiple first data units of the first sound data and multiple second data units of the second sound data is completed.

2. The software mixing method for automotive intelligent instruments according to claim 1, characterized in that, Step S30 specifically includes: S301. Load the (i-2)th segment and the (i-1)th segment of the first audio data into the first DMA and the second DMA respectively; S302. Start the first DMA to transfer and output the (i-2)th segment of the first data unit of the first audio data, and at the same time, mark the second audio data as to be played; S303. After the first DMA completes the transfer and output of the first data unit of the (i-2)th segment of the first sound data, the second DMA is started to transfer and output the first data unit of the (i-1)th segment of the first sound data. At the same time, the interrupt handler is triggered to mix the first data unit of the first sound data with the second data unit of the second sound data to form the first mixed sound, and the first DMA is set to prepare for transfer and output. S304. After the second DMA completes the transfer and output of the second segment of the first data unit of the first audio data, the first DMA is triggered to start.

3. The software mixing method for automotive intelligent instrument panels according to claim 2, characterized in that, The first DMA and the second DMA are each other's trigger sources, and both the first DMA and the second DMA can trigger the interrupt handler.

4. The software mixing method for automotive intelligent instruments according to claim 1, characterized in that, In steps S303 and S402, when the first DMA is set to prepare for output transfer, the first DMA is not started, but the first DMA is triggered to start after the second DMA transfer is completed. In step S401, when setting the second DMA to prepare for output transfer, the second DMA is not started, but the second DMA is triggered after the first DMA transfer is completed.

5. A software mixing method for automotive intelligent instruments according to claim 2, characterized in that, Both the first and second mixed sounds are obtained by the interrupt handler using a mixing algorithm.

6. The software mixing method for automotive intelligent instrument panels according to claim 1, characterized in that, The first and second audio data are both stored in the MCU's memory, and the first and second audio data can be accessed by the first DMA and the second DMA.

7. A software mixing method for automotive intelligent instrument panels according to claim 6, characterized in that, The storage capacity of each first data unit and each second data unit is decomposed according to the actual computing power of the MCU.

8. A software mixing method for automotive intelligent instrument panels according to claim 1, characterized in that, The storage capacity of each first data unit is the same, the storage capacity of each second data unit is the same, and the storage capacity of each first data unit and each second data unit is the same.

9. A software mixing method for automotive intelligent instrument panels according to claim 8, characterized in that, The storage capacity of each first data unit or each second data unit is 8 bytes, 16 bytes, 32 bytes, 64 bytes, 128 bytes, 256 bytes, or 512 bytes.

Citation Information

Patent Citations

  • Data processor

    JP2006085601A

  • Direct memory access descriptor-based synchronization

    US20150006765A1