A chip, a vehicle sound source playing method, a vehicle-mounted device and a storage medium

By adopting a dual-core system architecture in the vehicle-mounted device, the first core system controls the output of the prompt audio source, while the second core system performs the mixing operation. This solves the problem of high hardware costs in existing technologies, achieves fast and stable audio source mixing output, and reduces hardware costs.

CN115696173BActive Publication Date: 2025-12-19AUTOCHIPS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211115490.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2025-12-19
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

Existing technologies require the addition of an external DSP chip to achieve mixed playback of car alert sounds and multimedia system audio sources, which increases hardware costs and makes it difficult to achieve fast and stable mixed output.

Method used

It adopts a dual-core system architecture, in which the first core system starts up before the second core system and is used to control the output of the prompt sound source. After the second core system starts up, it performs the mixing operation to realize the mixed playback of the two sound sources. Data processing is performed through the DMAC buffer and mixer to avoid adding additional hardware.

Benefits of technology

It achieves fast and stable audio source mixing output, reduces hardware costs, reduces external hardware circuits, and ensures low latency and stable latency performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115696173B_ABST
    Figure CN115696173B_ABST
Patent Text Reader

Abstract

The application provides a chip, which is provided with a first core system and a second core system, wherein the first core system is started earlier than the second core system, the first core system is used for a first sound source, and the second core system is used for a second sound source; wherein the first sound source is a prompt sound source, and the second sound source is a multimedia sound source; the first core system is used for controlling the first sound source to output in response to a notification instruction after being started, so that the first sound source plays; and the second core system is used for performing a mixing operation after being started, so that the second sound source is mixed with the first sound source and is output. The application also provides a corresponding vehicle sound source playing method, a vehicle-mounted device and a storage medium. The above scheme of the application can realize fast and safe and stable output of the first sound source, low-delay and stable-delay mixing output, and does not need to increase additional hardware, reduce external hardware circuits and reduce costs.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The disclosed embodiments of the present application relate to the field of vehicle-mounted technology, and more particularly to a chip, a playing method of vehicle sound source, a vehicle-mounted device and a storage medium. BACKGROUND

[0002] With the development of the car system, the requirements for the functions in the car system are also increasingly high. Among them, mixing and playing various automobile prompt sounds and traditional multimedia system sound sources is an important function on the car. Unlike the traditional multimedia system sound source, the automobile prompt sound needs to be played quickly in a short time, while the traditional multimedia system sound source needs to be played continuously for a long time. Therefore, how to efficiently realize the mixing and playing of the two sound sources while quickly playing the automobile prompt sound in a short time is a problem to be solved in the current car system.

[0003] Currently, the main method to realize the mixing and playing of the automobile prompt sound and the multimedia system sound source while quickly playing the automobile prompt sound is to externally hang a DSP. The MCU drives the DSP to output the automobile prompt sound. After the car system is started, the multimedia sound is input to the DSP through an I2S, and the mixing and output are completed by the DSP. However, this method increases the external chip and hardware circuit, and increases the hardware cost. SUMMARY

[0004] According to the embodiments of the present application, a chip, a playing method of vehicle sound source, a vehicle-mounted device and a storage medium are provided.

[0005] According to the first aspect of the present application, an example chip is disclosed, which is installed with a first core system and a second core system. The first core system is started before the second core system. The first core system is used for a first sound source, and the second core system is used for a second sound source. The first sound source is a prompt sound source, and the second sound source is a multimedia sound source. The first core system is based on one core of a plurality of cores of the chip, and the second core system is based on other cores of the plurality of cores of the chip. Or the first core system is based on an auxiliary microprocessor in the chip, and the second core system is based on a single core or multiple cores in the chip. The first core system is used to control the first sound source to output in response to a notification instruction after being started, so that the first sound source is played. The second core system is used to perform a mixing operation after being started, so that the second sound source is mixed and output with the first sound source.

[0006] According to the second aspect of the present application, an example vehicle-mounted device is disclosed, which comprises the chip as described in the first aspect above.

[0007] According to a third aspect of the present application, an example method for playing a vehicle sound source is disclosed, applied to a vehicle-mounted device, the vehicle-mounted device comprising a chip as described in the first aspect above, comprising: starting the first core system to control the first sound source to output in response to a notification instruction, so that the first sound source plays; and / or starting the second core system to perform a mixing operation, so that the second sound source mixes with the first sound source, so that the mixed first sound source and the second sound source play.

[0008] According to a fourth aspect of the present application, an example vehicle-mounted device is disclosed, comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the method for playing a vehicle sound source according to the third aspect.

[0009] According to a fifth aspect of the present application, an example non-volatile computer-readable storage medium is disclosed, having program instructions stored thereon, the program instructions being executed by a processor to implement the method for playing a vehicle sound source according to the third aspect.

[0010] The present application has the following beneficial effects: by starting the first core system before the second core system, the first core system controls the first sound source to output in response to a notification instruction after being started, so that the first sound source plays, and the second core system is configured to perform a mixing operation after being started, so that the second sound source mixes with the first sound source, so that the mixed first sound source and the second sound source play, realizing fast and safe and stable output of the first sound source, low-delay and stable-delay mixing output, without increasing additional hardware, reducing external hardware circuit and reducing cost.

[0011] These and other objects of the present application will no doubt become apparent to those skilled in the art after reading the following detailed description of the preferred embodiments illustrated in the figures and drawings. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 is a structural schematic diagram of a chip according to an embodiment of the present application;

[0013] Figure 2 is a structural schematic diagram of a chip according to another embodiment of the present application;

[0014] Figure 3 is a structural schematic diagram of a chip according to yet another embodiment of the present application;

[0015] Figure 4 is a structural schematic diagram of a chip according to still another embodiment of the present application;

[0016] Figure 5is a structural diagram of a buffer of a DMAC in an embodiment of the present application;

[0017] Figure 6 is a structural diagram of an in-vehicle device in an embodiment of the present application;

[0018] Figure 7 is a flow diagram of a playing method of an in-vehicle sound source in an embodiment of the present application;

[0019] Figure 8 is a structural diagram of an in-vehicle device in another embodiment of the present application;

[0020] Figure 9 is a structural diagram of a non-volatile computer readable storage medium in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The scheme of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0022] In the following description, specific details are set forth in order to provide a thorough understanding of the present application. However, persons having ordinary skill in the art will appreciate that embodiments of the present application can be practiced without the specific details.

[0023] The term "and / or" herein is merely an association relationship of the associated objects, and represents that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents that the front and rear associated objects are in an "or" relationship. In addition, "multiple" herein represents two or more than two. In addition, the term "at least one" herein represents any one of multiple or any combination of at least two of multiple, for example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0024] Please refer to Figure 1 , Figure 1 is a structural diagram of a chip in an embodiment of the present application. The chip 100 is installed with a first core system 110 and a second core system 120, wherein the first core system 110 is started before the second core system 120, the first core system 110 is used for a first sound source, and the second core system 120 is used for a second sound source.

[0025] The first core system 110 and the second core system 120 can be installed in two independent regions in the chip 100, and the first core system 110 and the second core system 120 can be independently run.

[0026] For example, the chip 100 can be a multi-core based system on chip, accordingly, the first core system 110 can be based on one core of the multi-cores, i.e., one core of the multi-cores is used for the first core system 110, and the second core system 120 can be based on the other core of the multi-cores, i.e., the other core of the multi-cores is used for the second core system 120.

[0027] For another example, the chip 100 can also be a single-core or multi-core system on chip including an auxiliary microprocessor, for example, a single-core or multi-core system on chip including R5F, accordingly, the first core system 110 can be based on the auxiliary microprocessor, i.e., the auxiliary microprocessor is used for the first core system 110, and the second core system 120 can be based on the single-core or multi-core, i.e., the single-core or multi-core is used for the second core system 120.

[0028] The first core system 110 is used for a first sound source, and the second core system 120 is used for a second sound source. The first core system 110 can be a real-time operating system (FreeRTOS) and execute instrument vehicle body information type functions, for example, execute the first sound source output, and the second core system 120 can be an Android system and execute an in-vehicle infotainment system (IVI) function, for example, execute the second sound source output.

[0029] The first sound source is a prompt sound source, which refers to a sound that needs to be quickly output after the chip is powered on, for example, a turn signal prompt sound, a seat belt prompt sound, a headlight prompt sound, a reversing radar sound, and a fault prompt sound, etc. The range and types of the first sound source can be set in advance according to actual conditions, and the first sound source can be stored in the first core system 110 in advance, for example, in a wav (pcm) format and a 48KHz sampling rate. The first core system 110 completes the output of the first sound source through a preset sound output logic. Specifically, in some examples, as shown in FIG. 1, the first sound source is transmitted through an audio policy (Audio Policy) and an audio driver (Audio Driver) in the first core system 110, for example, to a storage structure of the chip 100 for output. In addition, in addition to controlling the output of the first sound source to play the first sound source, the first core system 110 can also be used to implement other functions, for example, system related interface display, real-time reversing image display, etc., which are not limited herein. Figure 2

[0030] The second sound source is a multimedia sound source, for example, an in-vehicle music sound source, an in-vehicle video sound source, an in-vehicle broadcast sound source, etc. It should be noted that the second sound source can also be a sound source outside the range of the first sound source set in advance according to actual conditions.

[0031] ​The first core system 110 is configured to, after being started, control the first audio source output in response to a notification instruction, so that the first audio source is played; and the second core system 120 is configured to, after being started, perform a mixing operation, so that the second audio source is mixed with the first audio source, and thus the mixed first audio source and the second audio source are played.

[0032] The notification instruction can be an instruction received by the first core system 110 after being started, for example, an instruction for playing the first audio source sent by the CAN bus or the external MCU.

[0033] After the chip 100 is powered on, the first core system 110 is started first, receives the notification instruction sent by the CAN bus or the external MCU, and outputs and plays the first audio source. Specifically, in the example shown in FIG. 1, in the first core system 110, the first audio source is transmitted, for example, to a storage structure of the chip 100 for output, through an audio policy and an audio driver. Figure 2

[0034] After the first core system 110 is started, the second core system 120 is started, and after being started, the first audio source is acquired and mixed with the second audio source for output, that is, the first audio source and the second audio source with the same time length are mixed and output, so that the mixed first audio source and the second audio source are played. Specifically, in some examples, as shown in FIG. 2, in the second core system 120, the first audio source and the second audio source are transmitted to a mixer in an audio hardware abstraction layer (Audio HAL) through an audio policy, the first audio source and the second audio source are mixed through the mixer, and the mixed data is transmitted to an audio driver, for example, to a storage structure of the chip 100 for output. Figure 2

[0035] It should be noted that after the second core system 120 is started, if there is no second audio source output and the first core system 110 needs to output the first audio source, the first core system 110 can still control the first audio source output in response to the notification instruction, so that the first audio source is played. After the second core system 120 is started, if the second audio source needs to be output and the first core system 110 also needs to output the first audio source, the second core system 120 acquires the first audio source output by the first core system 110 and mixes the first audio source with the second audio source for output.

[0036] ​​In the embodiment, the first core system 110 is started before the second core system 120, and after the first core system 110 is started, the first core system 110 controls the first audio source output in response to a notification instruction to make the first audio source play. The second core system 120 is used to perform a mixing operation after being started to make the second audio source mix with the first audio source, so that the mixed first audio source and the second audio source play, realizing fast and safe and stable output of the first audio source, low delay, stable delay mixing output, without increasing additional hardware, reducing external hardware circuit, and reducing cost.

[0037] As described above, the chip 100 includes the first core system 110 and the second core system 120. In some embodiments, referring to Figure 3 , Figure 3 is a structural schematic diagram of a chip according to another embodiment of the present application. Based on the above embodiment, the chip 100 further includes a direct memory access controller (DMAC) 130.

[0038] The first core system 110 determines a first start write position, and writes the first audio source from the first start write position to the buffer of the DMAC 130, so that the DMAC 130 reads the first audio source from the reading position in the buffer of the DMAC 130, thereby realizing control of the first audio source output. The first start write position is a first preset distance from the reading position in the buffer of the DMAC 130.

[0039] The DMAC 130 includes a buffer, and the buffer of the DMAC 130 is used to cache the first audio source output by the first core system 110 and / or the mixed audio source output by the second system. The mixed audio source is the mixed first audio source and second audio source.

[0040] The first start write position refers to the position of the buffer of the DMAC 130, that is, the position of the buffer of the DMAC 130 where the first core system 110 writes the first audio source. The first core system 110 writes the data of the first audio source from the first start write position to the buffer of the DMAC 130, that is, the process of the first core system 110 writing the first audio source from the first start write position to the first start write position and the subsequent positions of the buffer of the DMAC 130. Specifically, in some examples, as shown in Figure 4 , in the first core system 110, the first audio source is transmitted from the first start write position to the buffer of the DMAC 130 through the audio policy and the audio driver for output.

[0041] The read position refers to the position of the buffer of the DMAC 130, i.e., the position at which the DMAC 130 starts reading the buffer thereof. The DMAC 130 reads the data of the first sound source from the read position of the buffer of the DMAC 130, thereby achieving control of the output of the first sound source. The first core system 110 can know the read position of the DMAC 130 by reading the register of the DMAC 130.

[0042] The first preset distance is the distance between the first start write position and the read position, which can be preset according to actual conditions. In other words, the first start write position is determined according to the first preset distance and the read position. Before the first core system 110 writes the first sound source into the buffer of the DMAC 130, the first core system 110 can obtain the read position of the DMAC 130 by reading the register of the DMAC 130, and then determine the position that is first preset distance away from the read position as the first start write position according to the first preset distance. Then, the first core system 110 writes the first sound source from the first start write position until the writing of the first sound source is completed. The first preset distance can be a fixed distance or a distance that varies according to the size of the buffer of the DMAC 130.

[0043] It should be noted that the DMAC 130 reads the audio data from the buffer thereof to output, e.g., reads the first sound source from the read position to achieve control of the output of the first sound source, which usually also requires an I2S module. The present application does not describe this, but those skilled in the art can understand that the I2S module is required for controlling the output of the audio data. Therefore, the general knowledge about the I2S module also belongs to part of the present application.

[0044] The following will be described by taking Figure 5 as an example, wherein, Figure 5 is a structural schematic diagram of the buffer of the DMAC 130 according to an embodiment of the present application. The buffer of the DMAC 130 is about the data length corresponding to a preset time length of audio, e.g., the data length corresponding to 42 ms of audio. The buffer of the DMAC 130 can be divided into n nodes, where n is a positive integer greater than 1.

[0045] Suppose the read position of the DMAC 130 is node 1, and the first preset distance is 6 nodes. After the first core system 110 reads the register of the DMAC 130, the first core system 110 obtains the read position as node 1, and then determines the first start write position as node 7 according to the first preset distance of 6 nodes.

[0046] The first core system 110 writes the first sound source from the first start write position (node 7) to the buffer of the DMAC 130. For example, the first sound source occupies 3 nodes, the first core system 110 starts writing from the first start write position (node 7) and writes to node 9, thus the DMAC 130 starts reading the first sound source from the read position (node 1) of the buffer of the DMAC 130, sequentially reads the first preset distance (6 nodes) and the size of the first sound source (3 nodes), i.e. reads the first sound source completely, thus achieving the control of the output of the first sound source. In addition, when there is no data of the first sound source to be output, the first core system 110 writes zero data to the buffer of the DMAC 130. For example, in the above example in which the first sound source occupies 3 nodes, after the first core system 110 writes to node 9, there is no data of the first sound source to be written, thus the first core system 110 starts writing zero data from node 10, but the current write node of the first core system 110 does not exceed the read position (node 1) of the DMAC 130.

[0047] It should be noted that the DMAC 130 reads the data in the buffer of the DMAC 130 and outputs the data in the buffer of the DMAC 130 at the same time. For example, in the above example in which the first sound source occupies 3 nodes, when the read position reaches node 2, there is no data in node 2, thus the DMAC 130 outputs zero data until the read position reaches node 7, i.e. the first start write position, and starts outputting the first sound source.

[0048] It should be noted that if the first sound source is large and occupies more than (n-7) nodes, i.e. when writing to node n, the writing of the first sound source is not completed, at this time, the buffer of the DMAC 130 can be used in a loop, i.e. the remaining data is written from node 1 again, but the write position does not exceed the current read position (node 1) of the DMAC 130 to prevent overwriting.

[0049] As described above, the DMAC 130 reads the first sound source written by the first core system 110 from the buffer of the DMAC 130. In some embodiments, each time the DMAC 130 reads from the buffer of the DMAC 130, the DMAC 130 updates the read position and generates an interrupt, and the second core system 120 determines the second start write position during the interrupt to perform the mixing operation starting from the second start write position, wherein the second start write position is a second preset distance from the read position in the buffer of the DMAC 130, and the second preset distance is smaller than the first preset distance.

[0050] Each time the DMAC 130 reads from the buffer of the DMAC 130, the DMAC 130 updates the read position and generates an interrupt.

[0051] Continuing with the above example Figure 5For example, the DMAC 130 reads the first sound source from the buffer of the DMAC 130 starting from the read position (node 1), sequentially reads the first preset distance (6 nodes) and the size occupied by the first sound source, for example, 3 nodes, and each time the reading is performed, i.e., each time a node is read, the read position is updated to the next node, for example, node 2, and an interrupt is generated.

[0052] The duration of each interrupt can be the time used for each reading, for example, the time for reading a node, i.e., the duration of the interrupt is the length of a node. During the interrupt, the second core system 120 can perform relevant operations on the DMAC 130, thereby implementing exclusive access to the interrupt. Specifically, the second core system 120 determines the second starting write position during the interrupt, so as to perform the mixing operation starting from the second starting write position.

[0053] The second starting write position refers to the position of the buffer of the DMAC 130, i.e., the position to which the second core system 120 writes the mixed data obtained by the mixing operation to the buffer of the DMAC 130. The mixing operation is to mix the data of the first sound source with the corresponding data of the second sound source. Specifically, in some examples, as shown in FIG. 1, in the second core system 120, the first sound source and the second sound source are transmitted to the mixer (Mixer) in the audio hardware abstraction layer (Audio HAL) through the audio policy (Audio Policy), the first sound source and the second sound source are mixed through the mixer (Mixer), and are transmitted to the audio driver (Audio Driver) to transmit the mixed data to the buffer of the DMAC 130 starting from the second starting write position for output. Figure 4

[0054] The second preset distance is the distance between the second starting write position and the read position, which can be preset according to actual conditions, in other words, the second starting write position is determined according to the second preset distance and the read position. Before the second core system 120 starts to perform the mixing operation, the read position of the DMAC 130 can be obtained by reading the register of the DMAC 130, and then the position at the second preset distance from the read position is determined as the second starting write position according to the preset second preset distance, wherein the preset first preset distance can be a fixed distance or a distance that varies according to the size of the buffer of the DMAC 130.

[0055] Continuing with the above example, Figure 5 ​For example, assume that the second preset distance is 1 node, which is less than the first preset distance (6 nodes). During the interrupt period when the read position of the DMAC 130 is node 1, the second core system 120 obtains the read position of the DMAC 130 as node 1 by reading the register of the DMAC 130, and then determines the second start write position as node 2 according to the second preset distance of 1 node. Thus, the second core system 120 starts to perform the mixing operation from the second start write position (node 2), and at this time, the second core system 120 starts to perform the mixing operation at the position (node 2) next to the read position (node 1). That is, the time length of the mixing operation performed by the second core system 120 is the time length of one node, i.e., the time length of one interrupt.

[0056] As described above, during the interrupt period, the second core system 120 starts to perform the mixing operation from the second start write position. In some embodiments, during the interrupt period, the second core system 120 reads the data of the first sound source written at the second start write position from the buffer of the DMAC 130, mixes the data of the first sound source with the corresponding data of the second sound source, and writes the mixed data to the second start write position, thereby realizing the mixing operation.

[0057] Continuing with the above example Figure 5 For example, as described above, during the interrupt period when the read position of the DMAC 130 is node 1, the second core system 120 determines the second start write position as node 2, and at this time, the second core system 120 first reads the data of the first sound source written at the second start write position (node 2), i.e., reads the data of one node, and then mixes the data of the first sound source written at the second start write position with the corresponding data of the second sound source, i.e., performs additive mixing of the data of one node of the first sound source with the data of one node of the second sound source, to obtain mixed data, and then writes the mixed data to the second start write position (node 2), i.e., the mixed data overwrites the data of the first sound source written at the second start write position (node 2).

[0058] Then, the DMAC 130 performs a read from the buffer of the DMAC 130 again, at this time, the read position of the DMAC 130 is updated to node 2, and another interrupt, i.e. the time length of one node, is generated. Further, during the interrupt when the read position of the DMAC 130 is node 2, the second core system 120 first reads the data of the first sound source written at the next position (node 3) of the second start write position (node 2), i.e. reads the data of one node, then mixes the data of the first sound source written at the second start write position with the corresponding data of the second sound source, i.e. mixes and overflow processes the data of one node of the first sound source with the data of one node of the second sound source, to obtain mixed data, then writes the mixed data to the next position (node 3) of the second start write position (node 2), i.e. the mixed data overwrites the data of the first sound source written at the next position (node 3) of the second start write position (node 2), wherein the overflow processing is used to avoid the case of mixing overflow, i.e. the case of popping, which will not be described here.

[0059] By analogy, until the mixing operation of the first sound source and the second sound source is completed, the mixing operation is realized.

[0060] It should be noted that, in the Figure 5 In the example, since the second preset distance is less than the first preset distance, the first core system 110 always writes the data of the first sound source to the buffer of the DMAC 130 earlier than the second core system 120, and the second core system 120 writes the mixed data to the buffer of the DMAC 130 only after 6 nodes after the first core system 110 writes the data of the first sound source to the buffer of the DMAC 130.

[0061] As described above, the buffer of the DMAC 130 can be used in a loop. On the basis of the above embodiment, the buffer of the DMAC 130 includes a ring buffer, and the DMAC 130 divides the ring buffer into n nodes, wherein n is a positive integer greater than 1; the data read and / or written by the DMAC 130 from the buffer of the DMAC 130 is the data of one node, and the time length of the interrupt is the time length of one node.

[0062] The buffer of the DMAC 130 includes a ring buffer, also known as a circular queue, a circular buffer, which is a structure used to represent a fixed-size, head-tail connected buffer, i.e. Figure 5 Node 1 in the ring buffer in the above embodiment is actually connected to node n at the head and tail to form a ring structure.

[0063] The DMAC 130 divides the ring buffer into n nodes, where n is a positive integer greater than 1, and the value of n can be set according to actual conditions. For example, n can be 16, which is not limited herein.

[0064] When the data length corresponding to the audio in the buffer of the DMAC 130 is about 42 ms, that is, the data length corresponding to the audio in the ring buffer is about 42 ms, and n is 16, each node is about 2.66 ms.

[0065] As described above, the data of one node of the first sound source and the data of one node of the second sound source are added to perform mixdown and overflow processing, and the mixed data is obtained. In some embodiments, the mixed data is one node of data.

[0066] The mixed data is one node of data, that is, each mixdown operation is performed on the data of one node length of the first sound source and the second sound source. If the last remaining data length of the first sound source or the second sound source at a certain node is less than one node, zero data is used to fill it up. For example, when the buffer of the DMAC 130 is about 42 ms and n is 16, assuming that the first sound source or the second sound source is 2 ms of data, that is, not an integer multiple of the node length, after mixdown, the remaining part is filled with zero.

[0067] As described above, the mixed data is one node of data, and in some embodiments, the mixed data is also output to be used as a reference sound path.

[0068] For example, the mixed data obtained after mixdown can be written back to the next node of the read node of the DMAC 130 to be used as a reference sound output. The reference sound can be used for a talk ECNR, that is, a reference sound source for echo cancellation or noise reduction in a talk front-end voice processing module.

[0069] As described above, the first start write position is determined by the first preset distance between the read position of the DMAC 130 and the second start write position is determined by the second preset distance between the read position of the DMAC 130. In some embodiments, the second preset distance is one node, and the first preset distance is at least n / 2 nodes.

[0070] That is, the second start write position is one node away from the read position of the DMAC 130, and the first start write position is at least n / 2 nodes away from the read position of the DMAC 130.

[0071] It can be understood that n is an even number. For example, when n is 16, the first preset distance is at least 8 nodes.

[0072] Please refer to Figure 6 , Figure 6is a structural schematic diagram of a vehicle-mounted device according to an embodiment of the present application. The vehicle-mounted device 600 includes a chip 610, which can be the chip 100 as shown in Figure 1 or Figure 2 described above, and will not be described here again.

[0073] Please refer to Figure 7 , Figure 7 is a flowchart of a playing method of a vehicle sound source according to an embodiment of the present application. The method is applied to a vehicle-mounted device, which includes a chip 100 as shown in Figure 1 or Figure 2 , and specifically, as shown in Figure 7 , the method can include the following steps:

[0074] S71: starting a first core system 110, so that the first core system 110 controls a first sound source output in response to a notification instruction, so that the first sound source plays.

[0075] The notification instruction can be an instruction that the first core system 110 can receive after starting, for example, an instruction for playing the first sound source sent by a CAN bus or an external MCU.

[0076] The first core system 110 for the first sound source can be a real-time operating system (FreeRTOS) that executes instrument vehicle body information type functions, such as executing the first sound source output.

[0077] The first sound source refers to a sound that needs to be quickly sounded after the chip is powered on, for example, a turn signal prompt sound, a seat belt prompt sound, a headlight prompt sound, a reversing radar sound, and a fault prompt sound, etc. The range and type of the first sound source can be set in advance according to actual conditions, and the first sound source can be stored in the first core system 110 in advance, for example, it can be stored in the wav(pcm) format and the sampling rate of 48KHz. The first core system 110 completes the output of the first sound source through a preset sound logic, i.e., an audio strategy. In addition, in addition to controlling the first sound source output to make the first sound source play, the first core system 110 can also be used to implement other functions, such as system related interface display, real-time reversing image display, etc., which are not limited here.

[0078] After the chip 100 is powered on, the first core system 110 is started, receives a notification instruction sent through a CAN bus or an external MCU, controls a first sound source output, so that the first sound source plays.

[0079] S72: starting a second core system 120, so that the second core system 120 executes a mixing operation, so that a second sound source and the first sound source are mixed and output.

[0080] The second core system 120 is used for a second sound source, which can be an Android system, and performs an in-vehicle infotainment (IVI) function, for example, performs second sound source output, and the second sound source can be a multimedia system sound source and / or a sound source outside the range of the first sound source.

[0081] After the first core system 110 is started, the second core system 120 is started, and after being started, the first sound source is acquired, and mixed with the second sound source for output, that is, the first sound source and the second sound source with the same time length are mixed and output, so that the mixed first sound source and the second sound source are played.

[0082] Please refer to Figure 8 , Figure 8 is a structural schematic diagram of a vehicle-mounted device according to another embodiment of the present application. The vehicle-mounted device 80 includes a memory 81 and a processor 82 coupled with each other. The processor 82 is configured to execute program instructions stored in the memory 81 to implement the steps of the above-mentioned vehicle sound source playing method embodiments. In a specific implementation scenario, the vehicle-mounted device 80 can include, but is not limited to, an intelligent cockpit, an IVI (In-Vehicle Infotainment, in-vehicle infotainment) device, or a dashcam device.

[0083] Specifically, the processor 82 is configured to control itself and the memory 81 to implement the steps of any of the above-mentioned vehicle sound source playing method embodiments, or implement the steps in the above-mentioned vehicle sound source playing method embodiments. The processor 82 can also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 82 can be an integrated circuit chip with signal processing capability. The processor 82 can also be a general-purpose processor, a DSP (Digital Signal Processor, digital signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. In addition, the processor 82 can be implemented by an integrated circuit chip together.

[0084] Please refer to Figure 9 , Figure 9 is a structural schematic diagram of a non-volatile computer readable storage medium according to an embodiment of the present application. The computer readable storage medium 90 stores program instructions 901 executable by a processor, and the program instructions 901 are used to implement the steps of any of the above-mentioned vehicle sound source playing method embodiments.

[0085] The above description of the various embodiments is intended to be illustrative of the various embodiments and is not intended to limit the scope of what is claimed. Many variations and modifications can be made to the above-described embodiments.

[0086] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is merely a logical function division, and actual implementation can have another division manner, for example, the units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0087] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0088] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0089] Those skilled in the art can make many modifications and changes to the device and method while keeping the teachings of the present application. Therefore, the above disclosure should be regarded as limited only by the scope of the appended claims.

Claims

1. A chip, characterized by The chip is installed with a first core system and a second core system, wherein the first core system is started prior to the second core system, the first core system is used for a first sound source, and the second core system is used for a second sound source; The first sound source is a prompt sound source, and the second sound source is a multimedia sound source. The first core system is based on an auxiliary microprocessor in the chip, and the second core system is based on a single core or a multi-core in the chip. The first core system is used for controlling the first sound source to output after being started, so that the first sound source plays in response to a notification instruction. The second core system is used for performing a mixing operation after being started, so that the second sound source is mixed with the first sound source to output. The second core system acquires the first sound source output by the first core system and mixes the first sound source with the second sound source to output.

2. The chip of claim 1, wherein, The chip includes a direct memory access controller. The first core system determines a first starting write position and writes the first sound source to a buffer of the direct memory access controller from the first starting write position, so that the direct memory access controller reads the first sound source from a reading position in the buffer of the direct memory access controller, thereby controlling the first sound source to output, wherein the first starting write position is a first preset distance from the reading position in the buffer of the direct memory access controller.

3. The chip of claim 2, wherein, The direct memory access controller updates the reading position once and generates an interrupt each time the direct memory access controller reads from the buffer of the direct memory access controller. The second core system determines a second starting write position during the interrupt to perform the mixing operation from the second starting write position, wherein the second starting write position is a second preset distance from the reading position in the buffer of the direct memory access controller, and the second preset distance is less than the first preset distance.

4. The chip of claim 3, wherein, During the interrupt, the second core system reads data of the first sound source written at the second starting write position from the buffer of the direct memory access controller, mixes the data of the first sound source with corresponding data of the second sound source, and writes the mixed data to the second starting write position, thereby performing the mixing operation.

5. The chip of claim 3 or 4, wherein The buffer of the direct memory access controller includes a ring buffer, and the direct memory access controller equally divides the ring buffer into n nodes, wherein n is a positive integer greater than 1. The data read and / or written by the direct memory access controller from the buffer of the direct memory access controller is data of one node, and the duration of the interrupt is the duration of the one node.

6. The chip of claim 5, wherein, The mixed data is also output to be used as a reference sound path.

7. The chip of claim 5, wherein, The second preset distance is one node, and the first preset distance is at least n / 2 nodes.

8. An in-vehicle device characterized by comprising: The chip includes the chip according to any one of claims 1-7.

9. A method of playing a sound source for a vehicle, characterized by, The chip as claimed in any one of claims 1-7 is executed to: start the first core system, the first core system being based on an auxiliary microprocessor in the chip; control a first sound source to play in response to a notification instruction, so that the first sound source is a prompt sound source; start the second core system, the second core system being based on a single core or a multi-core in the chip; and control the second core system to perform a sound mixing operation, so that the second sound source is mixed with the first sound source, the second sound source being a multimedia sound source.

10. The method of claim 9, wherein the audio source is a vehicle audio source. The control of the first sound source to play includes: The first core system determines a first start write position, and writes the first sound source to a buffer of a direct memory access controller of the chip from the first start write position, so that the direct memory access controller reads the first sound source from a read position in the buffer of the direct memory access controller, thereby achieving the control of the output of the first sound source, wherein the first start write position is a first preset distance from the read position in the buffer of the direct memory access controller.

11. The method of claim 10, wherein the audio source is a vehicle audio source. The method for playing the vehicle sound source further includes: The direct memory access controller updates the read position once and generates an interrupt each time the direct memory access controller reads from the buffer of the direct memory access controller; The second core system determines a second start write position during the interrupt, so as to start the sound mixing operation from the second start write position, wherein the second start write position is a second preset distance from the read position in the buffer of the direct memory access controller, and the second preset distance is smaller than the first preset distance.

12. An in-vehicle device characterized by comprising: The vehicle-mounted device includes a memory and a processor coupled to each other, and the processor is configured to execute program instructions stored in the memory to implement the method for playing the vehicle sound source according to claim 9.

13. A non-volatile computer-readable storage medium storing program instructions thereon, characterized in that, The program instructions are executed by the processor to implement the method for playing the vehicle sound source according to claim 9.

Citation Information

Patent Citations

  • Device and method for controlling an audio output for a motor vehicle

    CN106717028A