Audio data transmission method and device, chip and computer readable storage medium
Patent Information
- Application Number
- CN202310734955.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-06-20
AI Technical Summary
而多核异构芯片只有一个物理声卡用于采集音频数据,使得多核异构芯片只有一路音频数据输入,在同一时刻多个不同的处理器核也只能从物理声卡获取同一种内容和格式的音频数据,这将无法满足多个处理器核同时需要不同格式和内容的音频数据的应用场景
[0045]本申请实施例提供的音频数据传输方法,方法应用于包括第二处理器核和至少两个第一处理器核的多核异构芯片,每个所述第一处理器核确定待接收音频数据的参数,并基于所述待接收音频数据的参数确定所述第一处理器核对应的第一虚拟声卡;所述第二处理器核基于待接收音频数据的播放信息从源音频数据中确定所述待接收音频数据,其中,任意两个第一处理器核发送的待接收音频数据的播放信息均不相同,所述源音频数据由所述第二处理器核对应的一个物理声卡采集;所述第二处理器核向所述第一处理器核发送所述待接收音频数据在共享内存中的存储地址信息;所述第一处理器核对应的第一虚拟声卡基于所述存储地址信息获取所述待接收音频数据。如此,不同的第一处理器核所需的音频数据的格式和内容不同,不同的第一处理器核根据自身所需的待接收的音频数据确定对应的虚拟声卡,并将待接收的音频数据的播放信息发送至第二处理器核,使得第二处理器核能够根据每个第一处理器核对音频数据的需求,从第二处理器核对应的一个物理声卡所采集的源音频数据中确定每个第一处理器核所需的待接收音频数据;满足多个处理器核同时需要不同格式和内容的音频数据的应用场景。
Smart Images

Figure CN116841950B_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing technology, and more particularly to audio data transmission methods, apparatus, electronic devices, and computer-readable storage media. Background Technology
[0002] In electronic devices using multi-core heterogeneous chips, each processor core may require audio data. Different processor cores use audio data for voice calls, recording driving voices, and vehicle noise reduction analysis. Because different processor cores use audio data for different functions, the format and content of the audio data required by different processor cores may differ. However, multi-core heterogeneous chips only have one physical sound card for acquiring audio data, meaning that multi-core heterogeneous chips have only one audio data input. At any given time, multiple different processor cores can only obtain audio data of the same content and format from the physical sound card. This cannot meet the application scenarios where multiple processor cores simultaneously require audio data of different formats and contents. Summary of the Invention
[0003] This application provides an audio data transmission method, apparatus, chip, and computer-readable storage medium, which can meet application scenarios where multiple processor cores simultaneously require audio data of different formats and contents.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] In a first aspect, embodiments of this application provide an audio data transmission method. The method is applied to a multi-core heterogeneous chip including a second processor core and at least two first processor cores. Each processor core of the multi-core heterogeneous chip and the hardware resources connected to that processor core constitute a hardware domain, and there is physical isolation between the hardware domains. The method includes:
[0006] Each of the first processor cores determines the parameters of the audio data to be received, and determines the first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received;
[0007] The second processor core determines the audio data to be received from the source audio data based on the playback information of the audio data to be received. The playback information is sent from the first processor core to the second processor core through inter-core communication. The playback information of the audio data to be received sent by any two first processor cores is different. The source audio data is collected by a physical sound card corresponding to the second processor core.
[0008] The second processor core sends the storage address information of the audio data to be received in the shared memory to the first processor core;
[0009] The first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information.
[0010] In some alternative embodiments, the second processor core determines the audio data to be received from the source audio data based on playback information of the audio data to be received, including:
[0011] The playback information includes the purpose of the audio data to be received, and the second processor core determines that the audio data in the source audio data that matches the purpose of the audio data to be received is the audio data to be received.
[0012] In some alternative embodiments, the second processor core determines the audio data to be received from the source audio data based on playback information of the audio data to be received, including:
[0013] The playback information includes the channel information of the audio data to be received. The second processor core determines that the audio data in the source audio data that matches the channel information of the audio data to be received is the audio data to be received.
[0014] In some alternative embodiments, before the second processor core sends the storage address information of the audio data to be received in shared memory to the first processor core, the method further includes:
[0015] The second processor core stores the audio data to be received in the shared memory;
[0016] The shared memory can be accessed by each processor core in the multi-core heterogeneous chip.
[0017] In some alternative embodiments, the method further includes:
[0018] The second processor core sends control information to the first processor core regarding the audio data to be received;
[0019] The control information is used to characterize whether the audio data to be received can be transmitted.
[0020] In some optional embodiments, the first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information, including:
[0021] In response to the control information used to characterize that the audio data to be received can be transmitted, the first virtual sound card obtains the audio data to be received from the shared memory based on the storage address information.
[0022] In some optional embodiments, after the first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information, the method further includes:
[0023] The first virtual sound card processes the audio data to be received based on the parameters of the audio data to be received, and obtains the target audio data.
[0024] The target audio data is stored in the first recording application interface framework corresponding to the first processor core;
[0025] The first application running on the first processor core obtains the target audio data by calling the first recording application interface framework.
[0026] In some alternative embodiments, the first processor core determines parameters of the audio data to be received, including:
[0027] The first processor core determines the parameters of the audio data to be received based on the first application running on the first processor core.
[0028] Secondly, embodiments of this application provide a chip, the chip comprising:
[0029] A second processor core and at least two first processor cores, wherein the first processor core and the second processor core correspond to different hardware domains within a multi-core heterogeneous chip, and there is physical isolation between each of the hardware domains;
[0030] The first processor core is used to determine the parameters of the audio data to be received, and to determine the first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received;
[0031] The second processor core is used to determine the audio data to be received from the source audio data based on the playback information of the audio data to be received, and send the storage address information of the audio data to be received in the shared memory to the first processor core. The playback information is sent from the first processor core to the second processor core through inter-core communication. The playback information of the audio data to be received sent by any two first processor cores is different. The source audio data is collected by a physical sound card corresponding to the second processor core.
[0032] The first virtual sound card is used to obtain the audio data to be received based on the storage address information.
[0033] In some alternative embodiments, the playback information includes the purpose of the audio data to be received, and the second processor core is configured to determine the audio data in the source audio data that matches the purpose of the audio data to be received as the audio data to be received.
[0034] In some optional embodiments, the playback information includes the channel information of the audio data to be received, and the second processor core is used to determine the audio data in the source audio data that matches the channel information of the audio data to be received as the audio data to be received.
[0035] In some alternative embodiments, the second processor core is further configured to store the audio data to be received in the shared memory; wherein the shared memory can be accessed by each processor core in the multi-core heterogeneous chip.
[0036] In some alternative embodiments, the second processor core is further configured to send control information to the first processor core regarding the audio data to be received;
[0037] The control information is used to characterize whether the audio data to be received can be transmitted.
[0038] In some alternative embodiments, in response to the control information used to characterize that the audio data to be received can be transmitted, the first virtual sound card is used to obtain the audio data to be received from the shared memory based on the storage address information.
[0039] In some alternative embodiments, the first virtual sound card is further configured to perform data processing on the audio data to be received based on parameters of the audio data to be received, to obtain target audio data;
[0040] The target audio data is stored in the first recording application interface framework corresponding to the first processor core;
[0041] The first application running on the first processor core obtains the target audio data by calling the first recording application interface framework.
[0042] In some alternative embodiments, the first processor core is configured to determine parameters of the audio data to be received based on a first application running on the first processor core.
[0043] Thirdly, embodiments of this application provide a component on a transportation device, the component including a chip, the chip being capable of performing the aforementioned audio data transmission method.
[0044] Fourthly, embodiments of this application provide a transportation device, the transportation device including a chip, the chip being capable of executing the above-described audio data transmission method.
[0045] The audio data transmission method provided in this application is applied to a multi-core heterogeneous chip including a second processor core and at least two first processor cores. Each first processor core determines parameters of the audio data to be received and determines a first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received. The second processor core determines the audio data to be received from source audio data based on the playback information of the audio data to be received. The playback information of the audio data to be received sent by any two first processor cores is different. The source audio data is acquired by a physical sound card corresponding to the second processor core. The second processor core sends the storage address information of the audio data to be received in shared memory to the first processor core. The first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information. In this way, different first processor cores require different audio data formats and contents. Each first processor core determines the corresponding virtual sound card based on the audio data it needs to receive, and sends the playback information of the audio data to be received to the second processor core. This allows the second processor core to determine the audio data to be received for each first processor core from the source audio data collected by the physical sound card corresponding to the second processor core, based on the audio data requirements of each first processor core. This satisfies application scenarios where multiple processor cores need audio data of different formats and contents at the same time. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of an optional processing flow of the audio data transmission method provided in the embodiments of this application;
[0047] Figure 2 This is a schematic diagram of another optional processing flow of the audio data transmission method provided in the embodiments of this application;
[0048] Figure 3 This is a detailed processing flowchart of an audio data transmission method applied to processor core 1 provided in an embodiment of this application;
[0049] Figure 4 This is a detailed processing flowchart of an audio data transmission method applied to processor core 2 provided in an embodiment of this application;
[0050] Figure 5 This is a detailed processing flowchart of an audio data transmission method applied to processor core 3 provided in an embodiment of this application;
[0051] Figure 6 This is a schematic diagram of an optional component structure of the chip provided in an embodiment of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0053] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0054] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0056] It should be understood that in the various embodiments of this application, the sequence number of each implementation process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0057] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0058] 1) Multi-core heterogeneous chip refers to a chip that integrates two or more processor cores in a single chip. Each processor core can act as an independent processor and independently run the instructions stored in the memory corresponding to that processor core.
[0059] 2) A hardware domain is a set of hardware, which may include hardware resources such as processor cores, interrupt controllers, clock controllers, and memory; the number of processor cores in the hardware domain can be one or more; a hardware domain runs one operating system, and different hardware domains can run different operating systems.
[0060] The multi-core heterogeneous chip in this application embodiment can be applied to transportation equipment, including but not limited to balance bikes, cars, buses, subways, trains, and airplanes.
[0061] In a multi-core heterogeneous chip, multiple processor cores can run multiple applications (APPs). The audio data (also known as microphone data) required by each application may differ in format and content. For example, an application for voice recognition requires 16kHz, 8-channel audio data including the user's voice and ambient noise from inside the vehicle, while an application for Bluetooth communication requires 8Hz, single-channel audio data of the user's voice. However, multi-core heterogeneous chips typically only have one physical sound card, and a single physical sound card only supports one type of microphone data input. Therefore, multiple processor cores can only acquire microphone data of one format and content, which cannot meet the application scenarios where multiple processor cores in a multi-core heterogeneous chip require multiple audio data formats and contents.
[0062] Based on this, the embodiments of this application provide an audio data transmission method that can meet the application scenarios where multiple processor cores in a multi-core heterogeneous chip require audio data of various formats and contents.
[0063] The audio data transmission method provided in this application is applied to a multi-core heterogeneous chip. The multi-core heterogeneous chip may include a second processor core and at least two first processor cores. Each processor core and the hardware resources connected to the processor core constitute a hardware domain, and there is physical isolation between each hardware domain.
[0064] An optional processing flow of the audio data transmission method provided in this application embodiment is as follows: Figure 1 As shown, it includes at least the following steps:
[0065] In step S101, each first processor core determines the parameters of the audio data to be received, and determines the first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received.
[0066] In some embodiments, the parameters of the audio data to be received may include the frequency of the audio data, the number of channels of the audio data, the corresponding channel of the audio data, and the sampling rate of the audio data. The parameters of the audio data to be received are determined according to the application running on the first processor core.
[0067] As an example, if the application running on the first processor core is a dashcam, the parameters of the audio data to be received may include: the frequency of the audio data is 32KHz, the number of channels of the audio data is dual channels (user voice and ambient sound), and the channels corresponding to the audio data are left front car microphone data, right front car microphone data, left rear car microphone data and right rear car microphone data.
[0068] Because each first processor core in a multi-core heterogeneous chip may run different applications, the audio data required by each first processor core may also be different, and the parameters of the audio data to be received determined by each first processor core may also be different.
[0069] In some embodiments, the specific implementation process of the first processor core determining the parameters of the audio data to be received may include: the application running on the first processor core calling the recording application interface on the recording application interface framework to set the parameters of the audio data to be received. Each processor core corresponds to one recording application interface framework.
[0070] In some embodiments, the specific implementation process of determining the first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received may include: the virtual sound driver in the first processor core determines the first virtual sound card according to the parameters of the audio data to be received. The process of determining the first virtual sound card can also be referred to as generating or constructing the first virtual sound card. This first virtual sound card only supports audio data with parameters consistent with those required by the first processor core. Specifically, if multiple applications are running on the first processor core, each application corresponds to one virtual sound card.
[0071] In step S102, the second processor core determines the audio data to be received from the source audio data based on the playback information of the audio data to be received.
[0072] In some embodiments, the multi-core heterogeneous chip is configured with only one physical sound card, which belongs to the same hardware domain as the second processor core. Taking the application of the multi-core heterogeneous chip in a smart car as an example, the data collected by the physical sound card is source audio data, which may include: user voice, ambient sound, speaker signals from different locations in the smart car, and microphone signals from different locations inside the smart car, etc.
[0073] In some embodiments, the playback information of the audio data to be received may include parameters such as whether an equalizer (EQ) is set, the balance of the left and right channels, the algorithm for resampling the audio data, sound effects, and the number of channels of the audio data; the playback information of the audio data to be received can determine the content and playback effect of the audio data to be received.
[0074] In some embodiments, since different applications run on different first processor cores, and different applications require different formats and contents of audio data, the playback information of the audio data to be received required by different first processor cores is also different.
[0075] In some embodiments, a specific implementation process for the second processor core to determine the audio data to be received from the source audio data based on the playback information of the audio data to be received can be as follows: if the playback information includes the purpose of the audio data to be received, then the second processor core determines that the audio data in the source audio data that matches the purpose of the audio data to be received is the audio data to be received. Specifically, the memory corresponding to the second processor core stores the correspondence between the purpose of the audio data and the channel of the audio data; after receiving the purpose of the audio data to be received, the second processor core searches for the audio data of the corresponding channel according to the correspondence.
[0076] The memory corresponding to the second processor can be any memory within the hardware domain to which the second processor core belongs. As an example, the correspondence between the purpose of the audio data and the audio data channels can include: 1) The audio data is used for a dashcam, and the audio data channels are the left front car microphone data, right front car microphone data, left rear car microphone data, and right rear car microphone data; 2) The audio data is used for WeChat calls, and the audio data channels are the left front car microphone data and right front car microphone data; 3) The audio data is used for Bluetooth calls, and the audio data channel is the left front car microphone data.
[0077] In other embodiments, another specific implementation process for the second processor core to determine the audio data to be received from the source audio data based on the playback information of the audio data to be received can be as follows: if the playback information directly includes the channel information of the audio data to be received, then the second processor core determines that the audio data in the source audio data that matches the channel information of the audio data to be received is the audio data to be received. Specifically, if the playback information includes left front vehicle interior microphone data, then the second processor core searches for the left front vehicle interior microphone data in the source data, and the left front vehicle interior microphone data is the audio data to be received.
[0078] In practical implementation, the second processor core has a microphone data allocation program, which searches for the audio data to be received that matches the playback information from the source audio data.
[0079] In step S103, the second processor core sends the storage address information of the audio data to be received in the shared memory to the first processor core.
[0080] In some embodiments, the second processor core stores the source audio data captured by the physical sound card in shared memory. This shared memory can be located within a multi-core heterogeneous chip, or it can be a storage space independent of the multi-core heterogeneous chip. Each processor core within the multi-core heterogeneous chip can access the data in the shared memory.
[0081] In some embodiments, before the second processor core sends storage address information to the first processor core, the second processor core may also send control information for the audio data to be received to the first processor core. This control information for the audio data to be received is used to characterize whether the audio data to be received can be transmitted. As an example, the control information for the audio data to be received may include at least: whether the audio data to be received can be read, or whether the audio data to be received can be accessed.
[0082] In step S104, the first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information.
[0083] In some embodiments, if the first processor core receives control information sent by the second processor core, and the control information is used to characterize that the audio data to be received can be transmitted, then the first virtual sound card obtains the audio data to be received from the shared memory based on the storage address information.
[0084] In specific implementation, the process by which the first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information is as follows: After receiving the control information and storage address information sent by the second processor core, the virtual sound card driver in the first processor core notifies the first virtual sound card to obtain data from shared memory based on the storage address information. If M applications running on the first processor core all require audio data, and M is greater than 2, then each application corresponds to a first virtual sound card; each first virtual sound card obtains the audio data required by the application corresponding to it according to the storage address information.
[0085] It should be noted that, in this embodiment, the first processor core and the second processor core transmit data and information through inter-core communication. The audio data described in this embodiment can be audio data represented in the form of digital signals, or it can be an audio data stream that can be directly played.
[0086] In this embodiment, different first processor cores require audio data with different formats and contents. Each first processor core determines its corresponding virtual sound card based on the audio data it needs to receive, and sends the playback information of the audio data to be received to the second processor core. This allows the second processor core to determine the audio data to be received for each first processor core from the source audio data collected by a physical sound card corresponding to the second processor core, based on the audio data requirements of each first processor core. This satisfies application scenarios where multiple processor cores simultaneously require audio data with different formats and contents.
[0087] Another optional processing flow of the audio data transmission method provided in the embodiments of this application is as follows: Figure 2 As shown, it includes at least the following steps:
[0088] In step S201, each first processor core determines the parameters of the audio data to be received, and determines the first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received.
[0089] In step S202, the second processor core determines the audio data to be received from the source audio data based on the playback information of the audio data to be received.
[0090] In step S203, the second processor core sends the storage address information of the audio data to be received in the shared memory to the first processor core.
[0091] In step S204, the first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information.
[0092] In this embodiment of the application, the specific implementation process of steps S201 to S204 is the same as that of steps S101 to S104, and will not be repeated here.
[0093] In step S205, the first virtual sound card processes the audio data to be received based on the parameters of the audio data to be received, and obtains the target audio data.
[0094] In some embodiments, if the parameters of the audio data to be received include the resampling frequency, the first virtual sound card can resample the audio data to be received obtained in step S204 based on the resampling frequency to obtain the target audio data.
[0095] In other embodiments, if the parameters of the audio data to be received include the parameters corresponding to the mixing, the first virtual sound card can resample the audio data to be received obtained in step S204 based on the parameters corresponding to the mixing to obtain the target audio data.
[0096] Mixing is the process of integrating audio data from two or more sources into a single stereo or mono track. During mixing, the frequency, dynamics, timbre, positioning, reverberation, and soundstage of each audio data point are individually adjusted to optimize each track. Mixing can produce layered audio output or playback effects.
[0097] Step S206: Store the target audio data in the first recording application interface framework corresponding to the first processor core.
[0098] In step S207, the first application running on the first processor core obtains the target audio data by calling the first recording application interface framework.
[0099] Taking a multi-core heterogeneous chip where processor core 3 and the physical sound card reside in the same hardware domain, and applications running on processor cores 1 and 2 need to access audio data collected by the physical sound card as an example, the audio data transmission method provided in this application embodiment will be described. A detailed processing flow of the audio data transmission method applied to processor core 1 provided in this application embodiment is as follows: Figure 3 As shown:
[0100] Five applications run on processor core 1: a voice recognition application, a Bluetooth call application, a dashcam application, an active noise cancellation application, and a WeChat voice call application. Each application requires different audio data; therefore, a corresponding virtual sound card is determined or generated based on the audio data required by each application. Specifically, the WeChat voice call application corresponds to virtual sound card 1, the Bluetooth call application to virtual sound card 2, the dashcam application to virtual sound card 3, the active noise cancellation application to virtual sound card 4, and the voice recognition application to virtual sound card 5. The parameters for the audio data to be received for the voice recognition application are 16kHz and 8 channels; for the Bluetooth call application, the parameters are 8kHz or 16kHz and 8 channels; for the dashcam application, the parameters are 16kHz or 48kHz and 4 channels; for the active noise cancellation application, the parameters are 16kHz and 8 channels; and for the WeChat voice call application, the parameters are 16kHz or 32kHz and dual channels. The recording interface framework sends the parameters of the audio data to be received to the virtual sound card driver. The virtual sound card driver supports mixing and resampling of the audio data to be received. The virtual sound card driver sends the playback information of each audio data to be received from processor core 1 to processor core 3 through inter-core communication.
[0101] A detailed processing flow of an audio data transmission method applied to processor core 1 provided in this application embodiment is as follows: Figure 4 As shown:
[0102] A recording application runs on processor core 2, corresponding to virtual sound card 2 on processor core 2. The parameters of the audio data to be received by the recording application are 16kHz or 8kHz, single channel. The parameters of the audio data to be received are sent to the virtual sound card driver through the recording interface framework. The virtual sound card driver supports mixing and resampling of the audio data to be received. The virtual sound card driver sends the playback information of the audio data to be received to processor core 3 through inter-core communication.
[0103] Processor core 3 receives playback information from processor core 1 and processor core 2 via an inter-core communication program. Based on this information, it retrieves the required audio data from the source audio data. The source audio data is acquired by the physical sound card corresponding to processor core 3 and includes audio data from 12 channels corresponding to in-vehicle microphones 1, 2, 3, and 4; external microphones 1, 2, 3, and 4; the left front horn signal; the left rear horn signal; the right front horn signal; and the right rear horn signal. All 12 channels of audio data are 48kHz. The physical sound card sends the 12 channels of audio data to processor core 3 via its driver program; this 12 channels of audio data serve as the source audio data. Processor core 3 stores the source audio data in shared memory. Based on the playback information from processor core 1 and processor core 2, processor core 3 searches for the audio data required by processor core 1 and processor core 2 from the audio data of 12 channels, and sends the storage address information of the audio data required by processor core 1 and processor core 2 in shared memory to processor core 1 and processor core 2 respectively through inter-core communication.
[0104] Each virtual sound card in processor core 1 and processor core 2 retrieves corresponding audio data from shared memory based on its storage address information. Each virtual sound card then sends the retrieved audio data to its virtual sound card driver. The virtual sound card driver performs mixing and / or resampling on the audio data based on playback information to obtain the target audio data. The virtual sound card driver then sends the target audio data to various applications through the recording application interface framework.
[0105] A detailed processing flow of an audio data transmission method applied to processor core 3 provided in this application embodiment is as follows: Figure 5 As shown:
[0106] based on Figures 3 to 5It can be determined that different processor cores in a multi-core system chip run multiple different applications, and each application requires different audio data. In this embodiment, different virtual sound cards are determined according to different applications. The processor core belonging to the same hardware domain as the physical sound card can determine the different formats and contents of audio data required by different applications from the source audio data collected by the physical sound card. This allows the audio data collected by a physical sound card to be used by multiple different applications simultaneously. This achieves the sharing of source audio data collected by a physical sound card among multiple different applications at the same time, satisfying the needs of multiple different applications for audio data of different formats and contents at the same time. In this embodiment, only the parameters of the audio data required by each application need to be set to enable the physical sound card to capture the audio data required by the application, reducing the complexity and coupling of multi-core heterogeneous chip design, improving the stability of multi-core heterogeneous chip applications, and saving manpower and material costs.
[0107] This application also provides a chip, and a schematic diagram of an optional structural configuration of the chip is shown below. Figure 6 As shown, it includes:
[0108] A second processor core 301 and at least two first processor cores 302, wherein the first processor core 302 and the second processor core 302 correspond to different hardware domains within a multi-core heterogeneous chip, and there is physical isolation between each hardware domain.
[0109] The first processor core 302 is used to determine the parameters of the audio data to be received, and to determine the first virtual sound card corresponding to the first processor core 302 based on the parameters of the audio data to be received.
[0110] The second processor core 301 is used to determine the audio data to be received from the source audio data based on the playback information of the audio data to be received, and send the storage address information of the audio data to be received in the shared memory to the first processor core 302. The playback information is sent from the first processor core 302 to the second processor core 301 through inter-core communication. The playback information of the audio data to be received sent by any two first processor cores 302 is different. The source audio data is collected by a physical sound card corresponding to the second processor core.
[0111] The first virtual sound card is used to obtain the audio data to be received based on the storage address information.
[0112] In some alternative embodiments, the playback information includes the purpose of the audio data to be received, and the second processor core 301 is used to determine the audio data in the source audio data that matches the purpose of the audio data to be received as the audio data to be received.
[0113] In some optional embodiments, the playback information includes the channel information of the audio data to be received, and the second processor core 301 is used to determine the audio data in the source audio data that matches the channel information of the audio data to be received as the audio data to be received.
[0114] In some alternative embodiments, the second processor core 301 is further configured to store the audio data to be received in the shared memory; wherein the shared memory can be accessed by each processor core in the multi-core heterogeneous chip.
[0115] In some alternative embodiments, the second processor core 301 is further configured to send control information for the audio data to be received to the first processor core 302;
[0116] The control information is used to characterize whether the audio data to be received can be transmitted.
[0117] In some alternative embodiments, in response to the control information used to characterize that the audio data to be received can be transmitted, the first virtual sound card is used to obtain the audio data to be received from the shared memory based on the storage address information.
[0118] In some alternative embodiments, the first virtual sound card is further configured to perform data processing on the audio data to be received based on parameters of the audio data to be received, to obtain target audio data;
[0119] The target audio data is stored in the first recording application interface framework corresponding to the first processor core 302;
[0120] The first application running on the first processor core 302 obtains the target audio data by calling the first recording application interface framework.
[0121] In some alternative embodiments, the first processor core 302 is configured to determine parameters of the audio data to be received based on a first application running on the first processor core 302.
[0122] In this embodiment of the application, the number of first processor cores 302 is N, where N is greater than 1.
[0123] This application embodiment also provides a component on a transportation device, the component including, as shown in the example below. Figure 6 The chip shown is capable of achieving Figures 1 to 5 The aforementioned audio data transmission method.
[0124] In some alternative embodiments, the component may be a circuit board-level component, an automotive electrical system-level component, or an automotive assembly component. As an example, the component may be the vehicle's engine, chassis, body, and electrical and electronic equipment. The vehicle's electrical and electronic equipment may include headlights for illumination, engine control management devices, and central control devices for receiving broadcasts, navigation, music, entertainment, etc.
[0125] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. An audio data transmission method, characterized in that, The method is applied to a multi-core heterogeneous chip including a second processor core and at least two first processor cores. Each processor core of the multi-core heterogeneous chip and the hardware resources connected to that processor core constitute a hardware domain, and there is physical isolation between the hardware domains. The method includes: Each of the first processor cores determines the parameters of the audio data to be received, and determines the first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received; The second processor core determines the audio data to be received from the source audio data based on the playback information of the audio data to be received. The playback information is sent from the first processor core to the second processor core through inter-core communication. The playback information of the audio data to be received sent by any two first processor cores is different. The source audio data is collected by a physical sound card corresponding to the second processor core. The second processor core sends the storage address information of the audio data to be received in the shared memory to the first processor core; The first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information.
2. The method according to claim 1, characterized in that, The second processor core determines the audio data to be received from the source audio data based on the playback information of the audio data to be received, including: The playback information includes the purpose of the audio data to be received, and the second processor core determines that the audio data in the source audio data that matches the purpose of the audio data to be received is the audio data to be received.
3. The method according to claim 1, characterized in that, The second processor core determines the audio data to be received from the source audio data based on the playback information of the audio data to be received, including: The playback information includes the channel information of the audio data to be received. The second processor core determines that the audio data in the source audio data that matches the channel information of the audio data to be received is the audio data to be received.
4. The method according to claim 1, characterized in that, Before the second processor core sends the storage address information of the audio data to be received in shared memory to the first processor core, the method further includes: The second processor core stores the audio data to be received in the shared memory; The shared memory can be accessed by each processor core in the multi-core heterogeneous chip.
5. The method according to claim 1, characterized in that, The method further includes: The second processor core sends control information to the first processor core regarding the audio data to be received; The control information is used to characterize whether the audio data to be received can be transmitted.
6. The method according to claim 5, characterized in that, The first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information, including: In response to the control information used to characterize that the audio data to be received can be transmitted, the first virtual sound card obtains the audio data to be received from the shared memory based on the storage address information.
7. The method according to claim 1, characterized in that, After the first virtual sound card corresponding to the first processor core obtains the audio data to be received based on the storage address information, the method further includes: The first virtual sound card processes the audio data to be received based on the parameters of the audio data to be received, and obtains the target audio data. The target audio data is stored in the first recording application interface framework corresponding to the first processor core; The first application running on the first processor core obtains the target audio data by calling the first recording application interface framework.
8. The method according to claim 1, characterized in that, The first processor core determines the parameters of the audio data to be received, including: The first processor core determines the parameters of the audio data to be received based on the first application running on the first processor core.
9. A chip, characterized in that, The chip includes a second processor core and at least two first processor cores, wherein the first processor core and the second processor core correspond to different hardware domains within a multi-core heterogeneous chip, and there is physical isolation between each hardware domain. The first processor core is used to determine the parameters of the audio data to be received, and to determine the first virtual sound card corresponding to the first processor core based on the parameters of the audio data to be received; The second processor core is used to determine the audio data to be received from the source audio data based on the playback information of the audio data to be received, and send the storage address information of the audio data to be received in the shared memory to the first processor core. The playback information is sent from the first processor core to the second processor core through inter-core communication. The playback information of the audio data to be received sent by any two first processor cores is different. The source audio data is collected by a physical sound card corresponding to the second processor core. The first virtual sound card is used to obtain the audio data to be received based on the storage address information.
10. A component on a transportation device, characterized in that, The component includes a chip capable of performing the method according to any one of claims 1 to 8.
11. A transportation device, characterized in that, The transportation device includes a chip capable of performing the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for obtaining playing decision, decision system, related equipment and storage medium
CN115794725A
Audio processing method, related equipment and storage medium
CN115993948A