Audio playback method, controller and vehicle-mounted audio system
By acquiring sound effect mode commands from the in-vehicle audio system and switching and mapping audio channels, the problem of insufficient audio experience in existing technologies is solved, achieving better audio playback effects and an immersive experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2026-03-27
AI Technical Summary
Existing in-vehicle audio systems cannot provide a comprehensive audio experience and struggle to accurately reproduce complex audio and video scenarios; the audio playback quality needs further improvement.
By acquiring the sound effect mode command sent by the system chip, and sending it to the audio chip and external power amplifier respectively, the audio channel switching and mapping are realized. The microcontroller and audio chip process the audio data, and the external power amplifier completes the playback settings according to the sound effect mode command.
It improves the in-car audio playback effect, enhances the immersive audio experience, provides realistic audio content, and meets consumers' pursuit of high-quality music.
Smart Images

Figure CN118870259B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to audio playback, and in particular to an audio playback method, a controller and a vehicle-mounted audio system. BACKGROUND
[0002] With the increasing demand for vehicle-mounted music experience, vehicle-mounted audio technology has rapidly developed and become an important branch in the field of automotive technology. Automotive audio systems continue to pursue higher quality audio output and richer auditory enjoyment to meet the needs of different users.
[0003] Current vehicle-mounted audio systems mostly use stereo configuration, and after DSP processing, they use A2B audio bus to connect external power amplifiers for further audio processing. These systems can perform delay, equalization and other algorithm processing to improve the softness and delicacy of the sound quality.
[0004] However, the existing system cannot provide a full range of audio experience and is difficult to truly restore complex audio and video scenes, and the audio playback effect needs to be further improved. SUMMARY
[0005] The embodiments of the present application provide an audio playback method, a controller and a vehicle-mounted audio system to improve the vehicle-mounted audio playback effect and improve the immersive audio experience.
[0006] In a first aspect, the embodiments of the present application provide an audio playback method applied to a microcontroller, comprising:
[0007] obtaining an audio effect mode instruction sent by a system chip;
[0008] sending the audio effect mode instruction to an audio chip to make the audio chip complete switching and mapping of an audio channel according to the audio effect mode instruction;
[0009] sending the audio effect mode instruction to an external power amplifier corresponding to the audio effect mode instruction to make the external power amplifier complete playback setting according to the audio effect mode instruction.
[0010] Optionally, the audio effect mode instruction is determined by the system chip according to a user-selected audio effect mode.
[0011] Optionally, after obtaining the audio effect mode instruction sent by the system chip, the method further comprises:
[0012] sending confirmation information to the system chip to make the system chip stop sending the audio effect mode instruction to the microcontroller according to the confirmation information.
[0013] Optionally, after sending the audio effect mode instruction to the audio chip, the method further comprises:
[0014] periodically sending empty frame data to the audio chip, and obtaining an execution result returned by the audio chip;
[0015] stopping sending the empty frame data to the audio chip until the execution result indicates that the audio chip completes mapping of the audio channel.
[0016] Optionally, after sending the sound effect mode instruction to the external power amplifier corresponding to the audio configuration information, the method further comprises:
[0017] obtaining a check value returned by the external power amplifier for two consecutive times;
[0018] when the check values returned for two consecutive times are inconsistent, re-sending the sound effect mode instruction to the external power amplifier.
[0019] In a second aspect, an embodiment of the present application provides an audio playing method applied to an audio chip, comprising:
[0020] obtaining a sound effect mode instruction sent by a microcontroller;
[0021] determining a preset audio channel mapping relationship according to the sound effect mode instruction, and mapping the audio channel according to the audio channel mapping relationship;
[0022] obtaining first audio data obtained by a system chip according to sound source data analysis;
[0023] processing the first audio data through each audio channel to obtain second audio data, and sending the second audio data to an external power amplifier.
[0024] In a third aspect, an embodiment of the present application provides an audio playing device applied to a microcontroller, comprising:
[0025] an obtaining module, configured to obtain a sound effect mode instruction sent by a system chip;
[0026] a processing module, configured to send the sound effect mode instruction to an audio chip, so that the audio chip completes switching and mapping of an audio channel according to the sound effect mode instruction; and send the sound effect mode instruction to an external power amplifier corresponding to the sound effect mode instruction, so that the external power amplifier completes playing setting according to the sound effect mode instruction.
[0027] Optionally, the sound effect mode instruction is determined by the system chip according to a sound effect mode selected by a user.
[0028] Optionally, the processing module is further configured to:
[0029] sending confirmation information to the system chip, so that the system chip stops sending the sound effect mode instruction to the microcontroller according to the confirmation information.
[0030] Optionally, the processing module is further configured to:
[0031] Optionally, the processing module is further configured to:
[0032] Optionally, the processing module is further configured to:
[0033] Optionally, the processing module is further configured to:
[0034] Optionally, the processing module is further configured to:
[0035] Optionally, the processing module is further configured to:
[0036] In a fourth aspect, an embodiment of the present application provides an audio playing device applied to an audio chip, comprising:
[0037] a receiving module configured to receive a sound effect mode instruction sent by a microcontroller;
[0038] a processing module configured to determine a preset audio channel mapping relationship according to the sound effect mode instruction, and map the audio channel according to the audio channel mapping relationship;
[0039] the receiving module is further configured to receive first audio data obtained by a system chip according to sound source data;
[0040] the processing module is further configured to process the first audio data through each of the audio channels to obtain second audio data, and send the second audio data to an external power amplifier.
[0041] In a fifth aspect, an embodiment of the present application provides a microcontroller, comprising a memory and a processor.
[0042] the memory stores computer execution instructions;
[0043] the processor executes the computer execution instructions stored in the memory, so that the processor executes the first aspect and / or various possible implementation manners of the first aspect.
[0044] In a sixth aspect, an embodiment of the present application provides an audio chip, comprising a memory and a processor.
[0045] the memory stores computer execution instructions;
[0046] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the second aspect and / or various possible implementation manners of the second aspect.
[0047] In a seventh aspect, the embodiments of the present application provide a vehicle-mounted audio system, comprising: a system chip, an external power amplifier, a microcontroller according to the fifth aspect and / or various possible implementation manners of the fifth aspect, and an audio chip according to the sixth aspect and / or various possible implementation manners of the sixth aspect.
[0048] The system chip is connected with the microcontroller through a network port, and is configured to send the sound effect mode instruction to the microcontroller; and the system chip is connected with the audio chip through an audio data line, and is configured to send the first audio data to the audio chip.
[0049] The microcontroller is connected with the audio chip through a serial peripheral interface bus, and is connected with the external power amplifier through a controller area network bus, and is configured to send the sound effect mode instruction to the audio chip and the external power amplifier respectively.
[0050] The audio chip is connected with the external power amplifier through an automobile audio bus, and is configured to send second audio data obtained by processing the first audio data to the external power amplifier.
[0051] In an eighth aspect, the embodiments of the present application provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect, or the computer-executable instructions are executed by the processor to implement the second aspect and / or various possible implementation manners of the second aspect.
[0052] In a ninth aspect, the embodiments of the present application provide a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect, or the computer-executable instructions are executed by the processor to implement the second aspect and / or various possible implementation manners of the second aspect.
[0053] The audio playing method, the controller and the vehicle-mounted audio system provided by the embodiments of the present application can obtain the sound effect mode instruction sent by the system chip, and send the sound effect mode instruction to the audio chip and the external power amplifier respectively, so that the audio chip can complete the switching and mapping of the audio channel according to the sound effect mode instruction, thereby enabling the audio chip to complete the processing and transmission of the first audio data through the audio channel corresponding to the sound effect mode after obtaining the first audio data analyzed by the system chip according to the sound source data, and enabling the external power amplifier to obtain and play the second audio data after completing the playing setting according to the sound effect mode instruction, so as to improve the vehicle-mounted audio playing effect and improve the immersive audio experience effect. BRIEF DESCRIPTION OF DRAWINGS
[0054] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0055] Figure 1 The structure diagram of the vehicle-mounted audio system provided by the present application Figure One ;
[0056] Figure 2 The structure diagram of the vehicle-mounted audio system provided by the present application Figure Two ;
[0057] Figure 3 The flowchart of the audio playing method provided by the present application Figure One ;
[0058] Figure 4 The mapping diagram of the audio chip provided by the present application
[0059] Figure 5 The flowchart of the audio playing method provided by the present application Figure Two ;
[0060] Figure 6 The flowchart of the audio playing method provided by the present application Figure Three ;
[0061] Figure 7 The structure diagram of the audio playing device provided by the present application Figure One ;
[0062] Figure 8 The structure diagram of the audio playing device provided by the present application Figure Two ;
[0063] Figure 9 The structure diagram of the microcontroller provided by the present application
[0064] Figure 10 The structure diagram of the audio chip provided by the present application
[0065] The above-described embodiments have been shown by way of illustration, and will be described in more detail below. These drawings and the written description are not intended to restrict the scope of the application in any way. Rather, they are meant to provide examples of the concepts of the application to those skilled in the art. DETAILED DESCRIPTION
[0066] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The same reference numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments are not meant to represent all embodiments consistent with the application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the application.
[0067] With the continuous progress of technology, consumers' expectations for in-car music experience are also constantly improving, driving the overall and diversified development of in-car audio systems. In-car audio systems are generally divided into low, medium and high configurations according to different configurations. In high-end models, the host is often equipped with high-performance external power amplifiers, such as Doctor, Harmon, Mobis, etc., to provide better audio output. These external power amplifiers are connected to the host through the automotive audio bus (Automotive Audio Bus, A2B) to receive and process the stereo audio signals transmitted by the host through the digital signal processor (Digital Signal Processor, DSP).
[0068] However, most of the in-car audio systems on the market are limited to stereo function. Although the audio processed by the DSP is processed by algorithms such as delay and equalization to make the sound more soft and delicate, it still cannot truly restore complex audio and video scenes, limiting the user's immersive experience.
[0069] In order to break through this limitation, the present application has developed a car-mounted Dolby Atmos function, aiming to provide users with a comprehensive and realistic audio experience. The in-car audio system of the present application mainly includes a system chip (System on Chip, SOC), a microcontroller (Microcontroller Unit, MCU), an audio chip, an A2B audio bus and a controller area network bus (Controller Area Network, CAN). Among them, the audio chip can be a DSP audio chip.
[0070] The SOC can inform the MCU of a current sound source format through a network protocol. The sound source format can be included in the sound effect mode instruction. The SOC can transmit audio data decoded by the Dolby decoder to the DSP through a Time-Division Multiplexing (TDM) audio data line. The MCU can send the sound source format to the DSP. The DSP can map the audio channels according to the sound source format, thereby realizing processing of the audio data in different audio channels. The DSP can transmit the audio data to an external power amplifier through an A2B bus for processing. Meanwhile, the MCU can transmit the sound source format information to the external power amplifier through a CAN bus. Optionally, the external power amplifier can be an Audio Device (AUD). The external power amplifier can switch the Dolby mode according to the sound source format and play the Dolby sound effect audio data according to the audio data.
[0071] The implementation of the in-vehicle Dolby Atmos function not only improves the quality of the vehicle's internal audio system, but also greatly enriches the user's auditory experience. Whether it is music playing, voice navigation, or in-vehicle communication, passengers can enjoy more immersive and realistic audio content, as if they were there. Therefore, the in-vehicle audio playback method of the present application can better meet the pursuit of high-quality music experience by consumers, providing a more outstanding solution for entertainment and information transmission during driving.
[0072] Figure 1 A structure diagram of an in-vehicle audio system provided by the present application Figure One As shown in Figure 1 The in-vehicle audio system 10 of the present application can include a system chip 101, an external power amplifier 102, a microcontroller 103, and an audio chip 104.
[0073] The system chip 101 can be provided with a control interface. The user can select or set the Dolby sound effect mode to be played on the control interface. Optionally, the sound effect modes that the user can select usually include Dolby 5.1.2, Dolby 7.1, Dolby 7.1.4, and other sound effect modes that have been configured in the vehicle. Each sound effect mode can correspond to a sound source format. Optionally, when the user completes the selection of the sound effect mode, the system chip 101 can generate a sound effect mode instruction. Optionally, the system chip 101 can also analyze the sound source data to obtain first audio data according to the user-selected sound effect mode.
[0074] The system chip 101 is connected with the microcontroller 103 and the audio chip 104 respectively. Optionally, the microcontroller 103 can be the host of the in-vehicle entertainment system. Optionally, the system chip 101 is connected with the microcontroller 103 through a network port, because each host of the in-vehicle entertainment system has a unique IP address and physical address in the network. Specifically, the system chip 101 and the microcontroller 103 connected through the network port can communicate through the Transmission Control Protocol / Internet Protocol (TCP / IP). Optionally, the system chip 101 can send the sound effect mode instruction to the microcontroller 103 through the TCP / IP.
[0075] The system chip 101 is connected with the audio chip 104 through an audio data line. Optionally, the audio data line can be a TDM audio data line. Optionally, the TDM audio data line is a TDM bus. Optionally, the TDM bus is mainly used for transmitting audio data of two or more channels on the same data line. Optionally, the system chip 101 can send the first audio data to the audio chip 104 through the TDM audio data line. The audio chip 104 can be a DSP audio chip 104.
[0076] The microcontroller 103 can be connected with the audio chip 104 and the external power amplifier 102 respectively. The microcontroller 103 can forward the sound effect mode instruction to the audio chip 104 and the external power amplifier 102. Optionally, the microcontroller 103 is connected with the audio chip 104 through a full-duplex synchronous serial bus (Serial Peripheral Interface, SPI). The SPI bus is a synchronous serial port for communication between the microcontroller 103 and the peripheral device. The microcontroller 103 can set the register value of the DSP through the SPI protocol, so that the sound effect mode is transmitted to the audio chip 104, and the transmission of the sound effect mode instruction is realized.
[0077] After receiving these register values, the audio chip 104 can switch between the TDM channel connected to the system chip 101 and the TDM channel connected to the A2B bus, according to the sound effect mode indicated by the register value. Simultaneously, the audio chip 104 can also switch the mapping mode of each channel within the system chip 101 according to the sound effect mode. This switching of mapping modes allows the audio chip 104 to obtain the correct audio data and correctly send it to the A2B bus. Furthermore, after receiving the first audio data sent by the system chip 101, the audio chip 104 can process the first audio data according to the protocol of each channel to obtain the second audio data for each channel. The audio chip 104 can connect to the external power amplifier 102 via the A2B bus. The audio chip 104 can send the second audio data of each channel to the external power amplifier 102.
[0078] The microcontroller 103 is connected to the external amplifier 102 via a CAN bus. The CAN bus is a serial communication protocol that enables high-speed, reliable communication between different devices. The CAN bus employs a distributed communication structure, allowing multiple devices to simultaneously send and receive data. It uses a differential signal transmission method, effectively reducing the impact of interference and noise on communication. The microcontroller 103 can transmit the current Dolby audio mode to the external amplifier 102 via the CAN bus. Upon receiving the signal, the external amplifier 102 maps the received audio data from the A2B bus to the corresponding speakers.
[0079] In one implementation, such as Figure 2 As shown, the in-vehicle audio system may also include a transmission chip 105. Optionally, the transmission chip 105 can be an A2B chip. The microcontroller 103 can be connected via an Inter-Integrated Circuit Bus (IIC). The microcontroller 103 can initialize the transmission chip 105 by sending a sound effect mode command to the transmission chip 105. Optionally, the initialization may include configuring the current audio format, configuring the number of uplink and downlink channels, etc. The IIC bus is a simple, bidirectional two-wire synchronous serial bus used for transmitting information between devices connected to the bus.
[0080] Optionally, when the transmission chip 105 is present, the audio chip 104 can send second audio data to the transmission chip 105 via the TDM bus. The transmission chip 105 can then send the second audio data to the external power amplifier 102 via the A2B bus.
[0081] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the drawings.
[0082] Figure 3 Flowchart of the audio playing method provided by the present application Figure One As shown in the embodiments shown in Figure 3 , the method comprises: Figure 1 and Figure 2
[0083] S201, the microcontroller acquires the sound effect mode instruction sent by the system chip.
[0084] In this embodiment, the microcontroller and the system chip can be connected through a network port. The system chip can send the sound effect mode instruction to the microcontroller through the TCP / IP protocol. The sound effect mode instruction can include the sound effect mode, sound source format and other information.
[0085] In an example, the sound effect mode instruction is determined by the system chip according to the sound effect mode selected by the user. It can be understood that the system chip can include a control interface. The user can select the sound effect mode on the control interface. For example, the sound effect mode can include Dolby 5.1.2, Dolby 7.1, Dolby 7.1.4, etc. Different sound effect modes can correspond to different numbers of channels. For example, Dolby 7.1.4 can include 12 channels, respectively corresponding to left front, right front, middle front, bass, left surround, right surround, left rear surround, right rear surround, left front top, right front top, left rear top, and right rear top. The system chip can generate a corresponding sound effect mode instruction according to the sound effect mode selected by the user.
[0086] S202, the microcontroller sends the sound effect mode instruction to the audio chip, so that the audio chip completes the switching and mapping of the audio channels according to the sound effect mode instruction.
[0087] In this embodiment, the microcontroller can send the sound effect mode instruction to the audio chip after obtaining the sound effect mode instruction. Optionally, the microcontroller and the audio chip can be connected through an SPI bus. The microcontroller can write the sound effect mode corresponding to the sound effect mode instruction into the register of the audio chip by using the SPI protocol. The audio chip can obtain the sound effect mode by reading the information in the register. After obtaining the sound effect mode, the audio chip can determine and switch the TDM channel connected with the system chip. In addition, the audio chip can also determine and switch the TDM channel connected with the transmission chip according to the sound effect mode. In addition, the audio chip can also realize the mapping between the internal channels of the audio chip according to the sound effect mode. The switching and mapping of the channels of the system chip enable the audio data sent by the system chip to be transmitted to the external power amplifier according to the sound effect mode, thereby improving the implementation effect of Dolby sound effect.
[0088] S203, the audio chip obtains the sound effect mode instruction sent by the microcontroller.
[0089] In this embodiment, after the microcontroller writes the sound effect mode corresponding to the sound effect mode instruction into the register of the audio chip through the SPI protocol, the audio chip can read the sound effect mode from the register to obtain the sound effect mode instruction.
[0090] S204, the audio chip determines the preset audio channel mapping relationship according to the sound effect mode instruction, and maps the audio channel according to the audio channel mapping relationship.
[0091] In this embodiment, the audio chip can include a first side and a second side, and the first side and the second side each include a plurality of slots. Optionally, the number of slots on each side can be 16. Optionally, the first side of the audio chip can be connected with the system chip. The second side of the audio chip can be connected with the transmission chip. Optionally, the audio chip can be connected with the system chip and the transmission chip through a 16-pin line. Optionally, one slot on one side of the audio chip can correspond to one audio channel.
[0092] Optionally, the audio chip can be preset with the selection mode and mapping relationship of the audio channel corresponding to each sound effect mode.
[0093] The audio chip can determine the selection mode of the preset audio channel on the first side according to the sound effect mode. The audio chip can select a plurality of audio channels on the first side of the audio chip according to the selection mode of the preset audio channel on the first side. The audio chip can switch to the plurality of audio channels and communicate with the system chip through the plurality of audio channels, thereby realizing the acquisition of the first audio data of different sound effect modes.
[0094] The audio chip can determine a selection mode of the second side preset audio channel according to the sound effect mode. The audio chip can select a plurality of audio channels on the second side of the audio chip according to the selection mode of the second side preset audio channel. The audio chip can switch to the plurality of audio channels and communicate with the transmission chip through the plurality of audio channels, thereby realizing the output of the second audio data of different sound effect modes.
[0095] Optionally, for a sound effect mode, the selection of the audio channels of the first side and the second side can be different.
[0096] The audio chip can determine a preset mapping relationship between the first side selected audio channel and the second side selected audio channel according to the sound effect mode. The audio chip can realize the mapping between the first side selected audio channel and the second side selected audio channel according to the mapping relationship. The audio chip after completing the mapping can realize the effect of transmitting the audio data sent by the system chip to the external power amplifier.
[0097] Optionally, the mapping relationship between the system chip, the audio chip and the transmission chip can be as shown in Figure 4
[0098] S205, the audio chip obtains the first audio data obtained by the system chip according to the audio source data analysis.
[0099] In this embodiment, the system chip can decode the user selected audio source data to obtain the first audio data according to the sound effect mode after determining the sound effect mode. The system chip can determine the audio channel used when communicating with the audio chip according to the user selected sound effect mode. The audio channel determined by the system chip according to the sound effect mode is the same as the first side selected audio channel of the audio chip. The system chip and the first side audio channel of the audio chip are one-to-one corresponding. The system chip can transmit the first audio data to the audio chip through TDM. The audio chip can obtain the first audio data.
[0100] S206, the microcontroller sends the sound effect mode instruction to the external power amplifier corresponding to the sound effect mode instruction, so that the external power amplifier completes the playback setting according to the sound effect mode instruction.
[0101] In this embodiment, the microcontroller can also send the sound effect mode instruction to the external power amplifier after obtaining the sound effect mode instruction. Optionally, the microcontroller can be connected with the external power amplifier through a CAN bus. The external power amplifier can complete the playback setting of the external power amplifier according to the sound effect mode instruction after receiving the sound effect mode instruction. The playback setting can include setting the equalization, delay, and other information of the external power amplifier. The playback setting can also include the setting of the mapping relationship of the audio channels. The external power amplifier can map different audio channels to corresponding speakers according to the sound effect mode, so as to produce better Dolby sound effect during playback.
[0102] In S207, the audio chip processes the first audio data through each audio channel to obtain second audio data, and sends the second audio data to the external power amplifier.
[0103] In this embodiment, the audio chip can send the first audio data received by the first side to the audio channel mapped thereto on the second side according to the mapping relationship between the first side audio channel and the audio channel after obtaining the first audio data. The first audio data can be processed according to the protocol of the audio channel during the transmission of the first audio data in the audio channel to obtain second audio data.
[0104] The audio chip can transmit the second audio data to the external power amplifier through an A2B bus. When the second audio data is transmitted to the external power amplifier, the second audio data of each audio channel can be transmitted to the corresponding speaker according to the mapping relationship of each audio channel in the external power amplifier, so as to realize the playback of the second audio data.
[0105] In an example, the audio chip can determine the selected audio channel on the second side according to the sound effect mode selected by the user. The transmission chip can also obtain the sound effect mode instruction sent by the microcontroller. The transmission chip can determine the sound effect mode selected by the user according to the sound effect mode instruction, and determine the audio channel used in the transmission chip according to the sound effect mode. The audio channel on the second side of the audio chip corresponds to the selected audio channel on the transmission chip one by one. The audio chip can send the second audio to the transmission chip according to the corresponding relationship. The transmission chip can send the second audio data to the external power amplifier through an A2B bus.
[0106] The audio playing method provided in the embodiment of the application, after the microcontroller obtains the sound effect mode instruction sent by the system chip, the sound effect mode instruction is sent to the audio chip and the external power amplifier. The audio chip can complete switching and mapping of the audio channel according to the sound effect mode instruction, so that the audio chip can realize processing and transmission of the first audio data through the audio channel corresponding to the sound effect mode after obtaining the first audio data obtained by the system chip according to audio source data analysis. The second audio data obtained by processing can be sent to the external power amplifier according to the audio channel, so that the external power amplifier which completes the playing setting according to the sound effect mode instruction can realize playing of the second audio data. The application uses the microcontroller to realize conversion of the sound effect mode instruction, thereby improving the audio playing effect of the vehicle-mounted audio system and improving the immersive experience effect of the user during playing.
[0107] Figure 5 Flowchart of the audio playing method provided in the application Figure Two As shown in the Figure 5 embodiment, the embodiment takes the microcontroller as the execution subject on the basis of the embodiment shown in the Figures 1 to 4 The method comprises the following steps:
[0108] S301, obtaining the sound effect mode instruction sent by the system chip.
[0109] The implementation of step S301 is similar to that of step S201, which will not be described here.
[0110] S302, sending confirmation information to the system chip to make the system chip stop sending the sound effect mode instruction to the microcontroller according to the confirmation information.
[0111] In the embodiment, the microcontroller can send confirmation information (Acknowledgment, ACK) to the system chip after receiving the sound effect mode instruction sent by the system chip. When the system chip receives the confirmation information, the system chip will stop sending the sound effect mode instruction to the microcontroller. At the same time, the system chip will continue to perform subsequent operations. Otherwise, if the system chip sends the sound effect mode instruction to the microcontroller and does not receive the confirmation information returned by the microcontroller, the system chip will send the sound effect mode instruction to the microcontroller again.
[0112] Optionally, a first waiting time length can be set in the system chip. The system chip will wait for the first waiting time length and resend the sound effect mode instruction to the microcontroller if the confirmation information is not received.
[0113] Optionally, the system chip can be configured with a threshold number of times. When the number of times the system chip sends the sound effect mode instruction to the microcontroller reaches the threshold number of times, but no confirmation information returned by the microcontroller is received, the system chip can stop sending the sound effect mode instruction to the microcontroller. Optionally, the system chip can also generate a first abnormality prompt. The first abnormality prompt is used to indicate that the connection between the system chip and the microcontroller is abnormal.
[0114] S303, sending a sound effect mode instruction to an audio chip to make the audio chip complete switching and mapping of an audio channel according to the sound effect mode instruction.
[0115] The implementation of step S303 is similar to that of step S202, which will not be described here.
[0116] S304, periodically sending empty frame data to the audio chip and obtaining an execution result returned by the audio chip. The sending of the empty frame data to the audio chip is stopped until the execution result indicates that the audio chip completes the mapping of the audio channel.
[0117] In this embodiment, the microcontroller can send empty frame data to the audio chip after sending the sound effect mode instruction to the audio chip. The microcontroller can obtain an execution result returned by the audio chip after receiving the empty frame data. The microcontroller can send the empty frame data to the audio chip again when waiting for a second waiting duration and no returned execution result is received. The microcontroller can also determine that the audio chip completes the mapping of the audio channel when the execution result is received within the second waiting duration. At this time, the microcontroller can stop sending the empty frame data to the audio chip.
[0118] S305, sending a sound effect mode instruction to an external power amplifier corresponding to the sound effect mode instruction to make the external power amplifier complete playback setting according to the sound effect mode instruction.
[0119] The implementation of step S305 is similar to that of step S207, which will not be described here.
[0120] S306, obtaining a check value returned by the external power amplifier for two consecutive times; and when the check values returned for the two consecutive times are inconsistent, sending the sound effect mode instruction to the external power amplifier again.
[0121] In this embodiment, the microcontroller can obtain a check value returned by the external power amplifier after sending the sound effect mode instruction to the external power amplifier. The microcontroller can periodically send the sound effect mode instruction to the external power amplifier. The microcontroller can compare the check values returned for two consecutive times after obtaining the check values. If the check values returned for the two consecutive times are consistent, the microcontroller stops sending the sound effect mode instruction to the external power amplifier. Otherwise, if the check values returned for the two consecutive times are inconsistent, the microcontroller continues to send the sound effect mode instruction to the external power amplifier.
[0122] For example, when the microcontroller obtains that the first returned check value and the second returned check value are inconsistent, the microcontroller can obtain the third returned check value and compare the third returned check value with the second returned check value.
[0123] The microcontroller can determine whether the playback setting completed by the external power amplifier is the playback setting corresponding to the sound effect mode instruction by analyzing the check value. When it is determined after checking that the sound effect mode matches the playback setting, the microcontroller does not process. When it is determined after checking that the sound effect mode does not match the playback setting, the microcontroller can resend the sound effect mode instruction to the external power amplifier.
[0124] The audio playback method provided by the embodiment of the application can realize the receiving confirmation of the sound effect mode instruction by the microcontroller sending the confirmation information to the system chip. The microcontroller can also realize the confirmation of the completion of the channel mapping of the audio chip by sending the null frame to the audio chip. The microcontroller can also realize the confirmation of the playback setting of the external power amplifier by obtaining the check value of the external power amplifier. The confirmation steps of the microcontroller provided by the application improve the success rate of sending the sound effect mode instruction, reduce the possibility that the Dolby sound effect cannot be realized due to the unsuccessful sending of the sound effect mode instruction, improve the system fault tolerance, and improve the user experience.
[0125] Figure 6 The flowchart of the audio playback method provided by the application Figure Three As shown in Figure 6 The execution process of an implementation mode of the embodiment shown in Figures 1 to 5 may include:
[0126] S401, power on the vehicle-mounted host.
[0127] In the embodiment, the vehicle-mounted host at least includes a system chip and a microcontroller. The vehicle-mounted host can be connected to the vehicle environment through a connector. The vehicle can supply power to the vehicle-mounted host through a wire harness connector.
[0128] S402, initialize the vehicle-mounted audio system.
[0129] In the embodiment, the vehicle-mounted audio system can include a system chip and a microcontroller. After the power-on of the system chip and the microcontroller is realized through step S401, the microcontroller can initialize each interface.
[0130] Optionally, the step of initializing performed by the microcontroller can specifically include:
[0131] Step 11, the microcontroller initializes the network port connected with the system chip.
[0132] Step 12, the microcontroller initializes the SPI interface connected with the audio chip.
[0133] Step 13, the microcontroller initializes the IIC interface connected with the transmission chip.
[0134] Step 14, the microcontroller initializes the CAN bus interface connected with the external power amplifier.
[0135] The execution order of the above four steps does not need to be executed in numerical order. The four steps can be executed simultaneously, or executed one by one in other preset order.
[0136] Optionally, the initialization process of the vehicle audio system can further include:
[0137] Step 21, when the microcontroller completes the initialization of the network, the system chip can update the audio parameters of the vehicle audio system saved before the last power-off to the microcontroller side by calling the TCP interface.
[0138] Step 22, when the microcontroller completes the initialization of the SPI interface, the microcontroller can also initialize the input / output interface of the audio chip, initialize the sound source of the audio chip, and initialize the volume configuration of the main channel, navigation channel, and telephone channel of the audio chip by calling the driver component of the audio chip.
[0139] Step 23, when the microcontroller completes the initialization of the IIC interface, the microcontroller can also initialize the audio format and the number of channels of the transmission chip by calling the IIC driver component.
[0140] Step 24, when the microcontroller completes the initialization of the CAN bus interface, the microcontroller can also control the external power amplifier to start in sequence according to the power-on sequence provided by the external power amplifier. The microcontroller can also update the audio parameters sent by the system chip to the external power amplifier module through the CAN bus after the external power amplifier is successfully started.
[0141] S403, the system chip decodes the sound source data selected by the user according to the user operation, and sends the sound effect mode to the microcontroller.
[0142] In this embodiment, after the initialization of the vehicle audio system is completed, the user can realize music playing on the control interface corresponding to the system chip. When the user completes the operation of playing music on the control interface, the loudspeakers of the vehicle audio system can all emit sound.
[0143] Optionally, the user can also select a sound source data for playing according to the preference in the control interface. Optionally, the sound source data can be a Dolby audio of Dolby sound effect. When the sound source data is a Dolby audio, the vehicle audio system can provide the user with an option of at least one Dolby sound effect mode supported by the sound source data. Optionally, the user can also select one of the Dolby sound effect modes provided by the vehicle audio system. The system chip can generate a sound mark mode instruction according to the Dolby sound effect mode selected by the user.
[0144] The system chip can issue the sound effect mode instruction and the sound source data. Specifically, the system chip can issue the sound effect mode instruction to the microcontroller. The system chip can also issue the sound source data to the audio chip. Optionally, the system chip can also decode the sound source data according to the sound effect mode to obtain first audio data before issuing the sound source data. The system chip can issue the first audio data to the audio chip.
[0145] S404, the microcontroller receives the sound effect mode issued by the system chip.
[0146] In this embodiment, the microcontroller can receive the sound effect mode instruction issued by the system chip. Optionally, the sound effect mode instruction is used to indicate the Dolby Atmos sound effect mode selected by the user.
[0147] The microcontroller can send confirmation information to the system chip after receiving the sound effect mode instruction. If the system chip receives the confirmation information, the system chip can stop sending the sound effect mode instruction to the microcontroller. Otherwise, if the system chip does not receive the confirmation information within the first waiting time or receives abnormal confirmation information, the system chip can resend the sound effect mode instruction.
[0148] S405, the microcontroller sends the sound effect mode to the audio chip to set the audio channel; the microcontroller sends the sound effect mode to the external power amplifier to switch to the corresponding sound effect mode.
[0149] In this embodiment, the microcontroller can notify the audio chip of the sound effect mode contained in the notification sound effect mode instruction through the communication protocol agreed with the audio chip after receiving the sound effect mode instruction issued by the system chip.
[0150] The audio chip can switch and map the audio channel according to the preset audio channel mapping relationship. The audio chip after completing the mapping can map the decoded first audio data issued by the system chip from the TDM_IN in the audio chip to the corresponding TDM_OUT. Wherein, the TDM_IN is the audio channel on the first side of the audio chip. The TDM_OUT is the audio channel on the second side of the audio chip.
[0151] The audio data mapped to the TDM_OUT can be transmitted to the external power amplifier module through the A2B bus. Meanwhile, the audio chip can also perform corresponding gain on the bass channel to meet the output requirements of the loudspeaker of the external power amplifier.
[0152] The microcontroller can also update the sound effect mode instruction to the external power amplifier through the CAN bus after receiving the sound effect mode instruction issued by the system chip.
[0153] S406, the microcontroller reads the execution result returned by the audio chip and the verification value returned by the external power amplifier.
[0154] In this embodiment, the microcontroller can determine whether the execution result returned by the audio chip is read and whether the verification value returned by the external power amplifier is read. If the microcontroller reads both of the two information, the microcontroller can continue to execute S407. Otherwise, the microcontroller can return to step S405 to resend the sound effect mode instruction to the audio chip and the external power amplifier.
[0155] Optionally, the execution result returned by the audio chip can be a return value. Optionally, the microcontroller can read the execution result of the audio chip by periodically sending empty frame data to the audio chip. When the return result read by the microcontroller is complete, the microcontroller can stop sending empty frame data to the audio chip. At this time, the microcontroller can determine that the execution result returned by the audio chip is received.
[0156] Optionally, when the microcontroller sends the sound effect mode instruction to the external power amplifier, the external power amplifier can send the return verification value to the microcontroller. Optionally, the verification value can be a return value. The microcontroller can determine that the external power amplifier sends successfully when receiving two same verification values returned by the external power amplifier in succession, and stop sending the sound effect mode instruction to the external power amplifier.
[0157] S407, the external power amplifier sets the sound effect mode and performs corresponding sound effect processing, and maps the audio channel to the corresponding loudspeaker.
[0158] In this embodiment, the external power amplifier can complete the playback setting of the external power amplifier mode after receiving the sound effect mode instruction. Thereafter, the external power amplifier can perform equalization, delay, phase and other algorithm processing on the second audio data of each audio channel received from the A2B bus. The external power amplifier can deliver the processed second audio data to the corresponding loudspeaker.
[0159] For example, in the external power amplifier, the second audio data of the left front channel can be output to the speaker of the left front door. The second audio data of the right front channel can be output to the speaker of the right front door. Similarly, the second audio data of each audio channel can be one-to-one corresponding to the speaker of the external power amplifier in the real car, so as to achieve the effect of panorama sound, truly restore the audio scene, and make the user in the car obtain more realistic and immersive audio experience.
[0160] Figure 7 Structure diagram of the audio playing device provided in the application Figure One As shown in Figure 7 applied to the microcontroller, the audio playing device 50 provided in the embodiment includes:
[0161] The acquisition module 501 is configured to acquire the sound effect mode instruction sent by the system chip.
[0162] The processing module 502 is configured to send the sound effect mode instruction to the audio chip, so that the audio chip completes the switching and mapping of the audio channel according to the sound effect mode instruction; and send the sound effect mode instruction to the external power amplifier corresponding to the sound effect mode instruction, so that the external power amplifier completes the playing setting according to the sound effect mode instruction.
[0163] Optionally, the sound effect mode instruction is determined by the system chip according to the sound effect mode selected by the user.
[0164] Optionally, the processing module 502 is further configured to:
[0165] send the confirmation information to the system chip, so that the system chip stops sending the sound effect mode instruction to the microcontroller according to the confirmation information.
[0166] Optionally, the processing module 502 is further configured to:
[0167] periodically send the null frame data to the audio chip, and acquire the execution result returned by the audio chip;
[0168] stop sending the null frame data to the audio chip until the execution result indicates that the audio chip completes the mapping of the audio channel.
[0169] Optionally, the processing module 502 is further configured to:
[0170] acquire the check values returned by the external power amplifier for two consecutive times;
[0171] when the check values returned for two consecutive times are inconsistent, resend the sound effect mode instruction to the external power amplifier.
[0172] The audio playing device provided in the embodiment can execute the method provided in the above method embodiment, and the implementation principle and technical effects are similar, which will not be described here in detail.
[0173] Figure 8 Structure diagram of audio playing device provided by the present application Figure Two As shown in the figure, applied to an audio chip, the audio playing device 60 provided by the embodiment comprises: Figure 8 The acquisition module 601 is configured to acquire the sound effect mode instruction sent by the microcontroller.
[0174] The processing module 602 is configured to determine a preset audio channel mapping relationship according to the sound effect mode instruction, and map the audio channel according to the audio channel mapping relationship.
[0175] The acquisition module 601 is further configured to acquire the first audio data obtained by the system chip according to the sound source data analysis.
[0176] The processing module 602 is configured to process the first audio data through each audio channel to obtain second audio data, and send the second audio data to the external power amplifier.
[0177] The audio playing device provided by the embodiment can execute the method provided by the above-mentioned method embodiment, and has similar implementation principles and technical effects, which will not be described here.
[0178]
[0179] The structure diagram of the microcontroller provided by the present application is shown in the figure. Figure 9 As shown in the figure, the microcontroller 70 provided by the embodiment comprises at least one processor 701 and a memory 702. Optionally, the device 70 further comprises a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected through a bus 704. Figure 9 In the specific implementation process, the at least one processor 701 executes the computer execution instructions stored in the memory 702, so that the at least one processor 701 executes the above-mentioned method.
[0180] The specific implementation process of the processor 701 can refer to the above-mentioned method embodiment, which has similar implementation principles and technical effects, and will not be described here.
[0181]
[0182] The structure diagram of the audio chip provided by the present application is shown in the figure. Figure 10 As shown in the figure, the audio chip 80 provided by the embodiment comprises at least one processor 801 and a memory 802. Optionally, the device 80 further comprises a communication component 803. The processor 801, the memory 802 and the communication component 803 are connected through a bus 804. Figure 10 In the specific implementation process, the at least one processor 801 executes the computer execution instructions stored in the memory 802, so that the at least one processor 801 executes the above-mentioned method.
[0183] In the implementation process, the at least one processor 801 executes the computer execution instructions stored in the memory 802, so that the at least one processor 801 executes the above-mentioned method.
[0184] The specific implementation process of the processor 801 can refer to the method embodiments described above, which have similar implementation principles and technical effects, and details are not described here.
[0185] In the above embodiments, it should be understood that the processor can be a central processing unit (English: Central Processing Unit, CPU for short), and can also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, DSP for short), application specific integrated circuits (English: Application Specific Integrated Circuit, ASIC for short) and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The steps of the method disclosed in the application can be directly embodied as hardware processor execution or combined with hardware and software modules in the processor for execution.
[0186] The memory can include a random access memory (RAM), and can also include a non-volatile memory (NVM), such as at least one disk memory.
[0187] The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application does not limit only one bus or one type of bus.
[0188] The present application also provides a computer program product, comprising a computer program, which is executed by a processor to implement the above-mentioned method.
[0189] The present application also provides a computer readable storage medium, which stores computer execution instructions, and when the processor executes the computer execution instructions, the above-mentioned method is implemented.
[0190] The above-mentioned readable storage medium can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0191] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.
[0192] The division of units is only a logical functional division, and in actual implementation, there can be another division manner, for example, multiple 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 units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0193] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0194] In addition, the functional units in each embodiment 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.
[0195] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art 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.) to execute all or part of the steps of the embodiments of the method of the present application. The aforementioned 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.
[0196] It can be understood by those skilled in the art that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The aforementioned program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, and various media that can store program codes.
[0197] Finally, it should be noted that: those skilled in the art will easily think of other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application that follow the general principles of the present application and include common knowledge or conventional technical means in the art that are not disclosed in the present application, and is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present application is only limited by the appended claims.
Claims
1. An audio playback method, characterized by, A microcontroller applied to an audio playing system, comprising: obtaining an audio effect mode instruction sent by a system chip; sending the audio effect mode instruction to an audio chip to make the audio chip determine a preset audio channel mapping relationship according to the audio effect mode instruction, complete switching and mapping of an audio channel, obtain first audio data obtained by the system chip according to audio source data analysis, and send the first audio data received by a first side of the audio chip to an audio channel mapped with the first side of the audio chip according to the audio channel mapping relationship, process the first audio data through each audio channel to obtain second audio data, and send the second audio data to an external power amplifier; wherein the audio chip is preset with a selection mode and a mapping relationship of the audio channel corresponding to each audio effect mode, and the audio channel comprises an audio channel preset on the first side of the audio chip and an audio channel preset on the second side of the audio chip, the first side of the audio chip is connected with the system chip, and the second side of the audio chip is connected with a transmission chip; sending the audio effect mode instruction to an external power amplifier corresponding to the audio effect mode instruction to make the external power amplifier complete playing setting according to the audio effect mode instruction to realize playing of the second audio data.
2. The method of claim 1, wherein, The audio effect mode instruction is determined by the system chip according to a user-selected audio effect mode.
3. The method according to claim 1 or 2, characterized in that, After obtaining the audio effect mode instruction sent by the system chip, the method further comprises: sending confirmation information to the system chip to make the system chip stop sending the audio effect mode instruction to the microcontroller according to the confirmation information.
4. The method according to claim 1 or 2, characterized in that, After sending the audio effect mode instruction to the audio chip, the method further comprises: periodically sending empty frame data to the audio chip and obtaining an execution result returned by the audio chip; stopping sending the empty frame data to the audio chip until the execution result indicates that the audio chip completes mapping of the audio channel.
5. The method according to claim 1 or 2, characterized in that, After sending the audio effect mode instruction to the external power amplifier corresponding to the audio configuration information, the method further comprises: obtaining a verification value returned by the external power amplifier for two times in succession; when the verification values returned for two times in succession are inconsistent, re-sending the audio effect mode instruction to the external power amplifier.
6. An audio playing method, characterized in that, An audio chip applied to an audio playing system, comprising: obtaining an audio effect mode instruction sent by a microcontroller; determining a preset audio channel mapping relationship according to the audio effect mode instruction and mapping the audio channel according to the audio channel mapping relationship; wherein the audio chip is preset with a selection mode and a mapping relationship of the audio channel corresponding to each audio effect mode, and the audio channel comprises an audio channel preset on a first side of the audio chip and an audio channel preset on a second side of the audio chip, the first side of the audio chip is connected with a system chip, and the second side of the audio chip is connected with a transmission chip; The system chip sends the first audio data received by the first side to the audio channel mapped with the second side according to the audio channel mapping relationship based on the first audio data parsed from the sound source data; The second audio data is obtained by processing the first audio data through each audio channel, and the second audio data is sent to the external power amplifier to make the external power amplifier complete the playback setting according to the sound effect mode instruction sent by the microcontroller, and realize the playback of the second audio data.
7. A microcontroller, characterized by It comprises: a memory and a processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the processor executes the method of any one of claims 1-5.
8. An audio chip, characterized by It comprises: a memory and a processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the processor executes the method of claim 6.
9. An in-vehicle audio system, characterized by comprising: The system comprises a system chip, an external power amplifier, a microcontroller as claimed in claim 7 and an audio chip as claimed in claim 8; The system chip is connected with the microcontroller through a network port, and is used to send a sound effect mode instruction to the microcontroller; the system chip is connected with the audio chip through an audio data line, and is used to send first audio data to the audio chip; The microcontroller is connected with the audio chip through a serial peripheral interface bus, and is connected with the external power amplifier through a controller area network bus, and is used to send the sound effect mode instruction to the audio chip and the external power amplifier respectively; The audio chip is connected with the external power amplifier through an automotive audio bus, and is used to send second audio data obtained by processing the first audio data to the external power amplifier.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor in the microcontroller to implement the method of any one of claims 1-5, or the computer execution instructions are executed by the processor in the audio chip to implement the method of claim 6.
11. A computer program product comprising a computer program, the computer program being executed by a processor in a microcontroller to implement the method of any one of claims 1-5, or the computer program being executed by a processor in an audio chip to implement the method of claim 6.
Citation Information
Patent Citations
Audio playing control system and method based on vehicles
CN109195072A