In-vehicle audio data transmission method, device, chip and system
Through Ethernet interface and time division multiplexing technology, cascade transmission of on-board audio data is realized, solving the problems of high cost and low transmission rate of the A2B bus solution, and improving the efficiency and quality of audio data transmission.
Patent Information
- Application Number
- CN202311870237.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-12-29
AI Technical Summary
The existing A2B bus solution for on-board audio data transmission is not widely used due to cost limitations, and the transmission rate is not high, so it cannot meet the needs of high-quality audio.
The Ethernet interface is used for vehicle audio data transmission, through the cascade connection between the main node and the child node, the time division multiplexing technology and real-time streaming method are used to realize the step-by-step transmission of downlink and uplink data packets, and the time threshold is configured according to the transmission distance. , ensure the synchronous playback of audio frame data.
It improves the data transmission rate, reduces networking costs, meets the time-division solution of audio data, reduces data transmission delay, and achieves a high-quality audio experience.
Smart Images

Figure CN117792555B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle audio technology, and in particular to a vehicle audio data transmission method, device, chip and system. Background Art
[0002] At present, in order to meet the high-quality requirements of vehicle audio, the number of speakers is increasing. How to coordinate a large number of speakers to achieve high-quality experience, the physical layer data transmission is a crucial technology.
[0003] At present, the physical layer data transmission of car speakers is divided into analog transmission scheme and digital transmission scheme. With the trend of automobile intelligence, the digital transmission scheme will gradually replace the previous analog transmission scheme. At present, the digital transmission scheme adopts the A2B bus scheme of ADI (Analog Devices Inc.).
[0004] The A2B bus is used to connect audio devices in vehicles. It is a high-bandwidth, bidirectional, digital audio bus in vehicles. It adopts a daisy chain structure and is a single-host, multi-slave system. The bus has an embedded clock and power supply. The link latency of <50uS makes it possible for applications such as ANC (Active Noise Cancellation), real-time speech recognition, and high-fidelity sound processing. However, due to cost limitations, it is not widely used and the transmission rate is not very high. Summary of the invention
[0005] The purpose of this application is to provide a vehicle-mounted audio data transmission method, device, chip and system, which are used to solve the problem that the existing audio data transmission using the A2B bus solution is not widely used due to cost limitations and the transmission rate is not very high.
[0006] In a first aspect, an embodiment of the present application provides a method for transmitting in-vehicle audio data, the method being used for a network including a master node and at least one sub-node, wherein a first-level sub-node in the at least one sub-node is connected to the master node, the method comprising:
[0007] The master node receives audio frame data based on time division multiplexing from an audio source based on a first audio interface;
[0008] The master node sends a downlink Ethernet data packet to the first-level child node through an Ethernet interface, wherein the downlink Ethernet data packet encapsulates the audio frame data;
[0009] The first-level sub-node receives the downstream Ethernet data packet, and sends the audio frame data in the downstream Ethernet data packet to the second audio interface, wherein the time when the first-level sub-node sends the audio frame data in the downstream Ethernet data packet to the second audio interface is the time when the first-level sub-node receives the downstream Ethernet data packet plus a first time threshold.
[0010] In some possible embodiments, there are multiple sub-nodes, and the multiple sub-nodes are cascade-connected, and the method further includes:
[0011] The first-level child node sends the downlink Ethernet data packet to the next-level child node through the Ethernet interface;
[0012] Sub-nodes at all levels except the first-level sub-node receive the downlink Ethernet data packet sent by the upper-level sub-node through the Ethernet interface, send the downlink Ethernet data packet to the next-level sub-node if there is a next-level sub-node, and send the audio frame data in the received downlink Ethernet data packet to the second audio interface;
[0013] The time when the other sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold.
[0014] In some possible embodiments, the first time threshold is a waiting delay configured according to a transmission distance between each sub-node and the master node;
[0015] The longer the transmission distance is, the shorter the configured first time threshold is.
[0016] In some possible embodiments, the master node sends a downlink Ethernet data packet to the first-level child node through an Ethernet interface, including:
[0017] If the master node determines within an audio frame period that the conditions for continuously sending a downlink Ethernet data packet to the first-level child node are met or the reception of valid audio frame data of the destination child node is completed, the master node starts to encapsulate the received audio frame data into a downlink Ethernet data packet after caching part of the audio frame data within the audio frame period, and sends it to the first-level child node through the Ethernet interface.
[0018] In some possible embodiments, each subnode sends the audio frame data in the downlink Ethernet data packet to the second audio interface, including:
[0019] Each sub-node obtains audio frame data from the received downlink Ethernet data packet within an audio frame period;
[0020] If it is determined that the conditions for continuous sending of the audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the sending time is determined to be reached according to the first time threshold, and the audio frame data is started to be sent to the second audio interface.
[0021] In some possible embodiments, the downlink Ethernet data packet is initiated by the master node and transmitted downlink step by step in a real-time streaming manner;
[0022] When each sub-node receives the downlink Ethernet data packet transmitted in real-time streaming mode, it obtains audio frame data from its corresponding field in the downlink Ethernet data packet according to the configuration, and transmits the obtained audio frame data to the next-level sub-node.
[0023] In some possible embodiments, after each sub-node obtains the audio frame data from its corresponding field in the downlink Ethernet data packet according to the configuration, the process further includes:
[0024] Filling the new audio frame data into the corresponding field in the downlink Ethernet data packet;
[0025] Each sub-node obtains the new audio frame data filled by the other sub-nodes from the fields corresponding to the other sub-nodes in the downlink Ethernet data.
[0026] In some possible embodiments, in the downlink Ethernet data packet, the fields filled with the audio frame data corresponding to the sub-nodes with a longer transmission distance from the main node are arranged earlier in the field arrangement order in the downlink Ethernet data packet.
[0027] In some possible embodiments, the method further includes:
[0028] The first-level sub-node sends an uplink Ethernet data packet to the master node through the Ethernet interface, wherein the uplink Ethernet data packet encapsulates the audio frame data collected by each sub-node through the second audio interface;
[0029] The master node receives the uplink Ethernet data packet and processes the uplink Ethernet data packet.
[0030] In some possible embodiments, there are multiple sub-nodes, and the multiple sub-nodes are cascade-connected, and the method further includes:
[0031] The first-level sub-node receives an uplink Ethernet data packet sent by the next-level sub-node through an Ethernet interface;
[0032] For sub-nodes of all levels except the first-level sub-node, if they are the last-level sub-nodes, they initiate an uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface; otherwise, they receive the uplink Ethernet data packet sent by the next-level sub-node through the Ethernet interface, and send the uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface. The uplink Ethernet data packets sent by sub-nodes of all levels encapsulate the audio frame data collected from the last level to the sub-node of that level through the second audio interface.
[0033] In some possible embodiments, the method further includes:
[0034] After receiving an uplink Ethernet data packet sent by a next-level subnode through an Ethernet interface, at least one subnode sends the audio frame data in the uplink Ethernet data packet to a second audio interface;
[0035] The time when the at least one sub-node sends the audio frame data in the uplink Ethernet data packet to the second audio interface is the time when the at least one sub-node receives the uplink Ethernet data packet plus the second time threshold.
[0036] In some possible embodiments, the second time threshold is a waiting delay configured according to a transmission distance between each sub-node and the last-level sub-node;
[0037] The longer the transmission distance is, the shorter the configured second time threshold is.
[0038] In some possible embodiments, at least one subnode sends the audio frame data in the uplink Ethernet data packet to the second audio interface, including:
[0039] The at least one sub-node obtains audio frame data from the received uplink Ethernet data packet within an audio frame period;
[0040] If it is determined that the conditions for continuous sending of audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the sending time is determined to be reached according to the second time threshold, and the audio frame data is started to be sent to the second audio interface.
[0041] In some possible embodiments, the data continuous sending condition is to determine, based on the buffer amount of currently received data and the data receiving rate, that there will be no data interruption when sending at the data sending rate.
[0042] In some possible embodiments, the uplink Ethernet data packet is initiated by the last-level child node and is transmitted up level by level in a real-time streaming manner;
[0043] When each sub-node receives the real-time streaming uplink Ethernet data packet, it fills the new audio frame data into its own corresponding field in the uplink Ethernet data packet according to the configuration, and transmits the uplink Ethernet data packet to the upper-level sub-node or master node through the Ethernet interface.
[0044] In some possible embodiments, after each sub-node fills the new audio frame data into its own corresponding field in the uplink Ethernet data packet, the process further includes:
[0045] Each sub-node obtains the new audio frame data filled by the other sub-nodes from the fields corresponding to the other sub-nodes in the uplink Ethernet data.
[0046] In some possible embodiments, the master node processes the uplink Ethernet data packet, including:
[0047] The master node selects the nearest audio frame period in which the processing of the uplink Ethernet data packet is completed within an audio frame period for processing according to the time position of receiving the uplink Ethernet data packet in at least one audio frame period.
[0048] In some possible embodiments, the master node selects the most recent audio frame period in which the uplink Ethernet data packet processing is completed within an audio frame period for processing, including:
[0049] The master node determines, based on the time position of receiving the uplink Ethernet data packet in at least one audio frame period, the time position of starting processing and the data processing delay, that when the current audio frame period can complete the processing of the uplink Ethernet data packet, the current audio frame period is determined as the most recent audio frame period, otherwise the next audio frame period is determined as the most recent audio frame period.
[0050] In some possible embodiments, in the uplink Ethernet data packet, the fields filled with the audio frame data corresponding to the sub-nodes with a closer transmission distance to the main node are arranged earlier in the field arrangement order in the uplink Ethernet data packet.
[0051] In some possible embodiments, the uplink Ethernet data packet or the downlink Ethernet data packet is a standard Ethernet data packet or an Ethernet data packet in a custom format.
[0052] In some possible embodiments, the Ethernet data packet in the above-mentioned custom format includes a preamble field, a packet type field indicating the packet type, a padding field corresponding to each audio frame, and a whole packet check field, wherein the padding field corresponding to each audio frame includes a data field and a corresponding check bit field, and the data field is used to fill in the audio frame data.
[0053] In some possible embodiments, the method further includes:
[0054] The master node outputs a reference clock to the audio source, or the master node receives a reference clock output by the audio source, thereby completing the clock frequency synchronization between the master node and the audio source;
[0055] Each sub-node uses a clock data recovery (CDR) circuit based on the clock frequency of the previous master node or sub-node to recover the clock frequency of the previous master node or sub-node from the data from the previous master node or sub-node, so as to synchronize with the clock frequency of the master node;
[0056] After the clock frequency of each sub-node is synchronized with that of the main node, a reference clock is output to the peripheral device connected to the sub-node.
[0057] In a second aspect, an embodiment of the present application provides a vehicle-mounted audio data transmission device, the device comprising a main node and at least one sub-node, the main node and the at least one sub-node are cascaded to form a network, and a first-level sub-node in the at least one sub-node is connected to the main node, wherein:
[0058] The master node receives the audio frame data based on time division multiplexing from the audio source based on the first audio interface;
[0059] The master node sends a downlink Ethernet data packet to the first-level child node through an Ethernet interface, wherein the downlink Ethernet data packet encapsulates the audio frame data;
[0060] The first-level sub-node receives the downstream Ethernet data packet, and sends the audio frame data in the downstream Ethernet data packet to the second audio interface, wherein the time when the first-level sub-node sends the audio frame data in the downstream Ethernet data packet to the second audio interface is the time when the first-level sub-node receives the downstream Ethernet data packet plus the first time threshold.
[0061] In some possible embodiments, there are multiple sub-nodes, and the multiple sub-nodes are cascade-connected, wherein:
[0062] The first-level child node sends the downlink Ethernet data packet to the next-level child node through the Ethernet interface;
[0063] Sub-nodes at all levels except the first-level sub-node receive the downlink Ethernet data packet sent by the upper-level sub-node through the Ethernet interface, send the downlink Ethernet data packet to the next-level sub-node if there is a next-level sub-node, and send the audio frame data in the received downlink Ethernet data packet to the second audio interface;
[0064] The time when the other sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold.
[0065] In some possible embodiments, the first-level child node sends an uplink Ethernet data packet to the master node through the Ethernet interface, and the uplink Ethernet data packet encapsulates the audio frame data collected by each child node through the second audio interface;
[0066] The master node receives the uplink Ethernet data packet and processes the uplink Ethernet data packet.
[0067] In some possible embodiments, there are multiple sub-nodes, and the multiple sub-nodes are cascade-connected, wherein:
[0068] The first-level sub-node receives an uplink Ethernet data packet sent by the next-level sub-node through an Ethernet interface;
[0069] For sub-nodes of all levels except the first-level sub-node, if they are the last-level sub-nodes, they initiate an uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface; otherwise, they receive the uplink Ethernet data packet sent by the next-level sub-node through the Ethernet interface, and send the uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface. The uplink Ethernet data packets sent by sub-nodes of all levels encapsulate the audio frame data collected from the last level to the sub-node of that level through the second audio interface.
[0070] In some possible embodiments, after receiving an uplink Ethernet data packet sent by a next-level subnode through an Ethernet interface, at least one subnode sends the audio frame data in the uplink Ethernet data packet to a second audio interface;
[0071] The time when the at least one sub-node sends the audio frame data in the uplink Ethernet data packet to the second audio interface is the time when the at least one sub-node receives the uplink Ethernet data packet plus the second time threshold.
[0072] In a third aspect, an embodiment of the present application also provides an in-vehicle audio data transmission chip, the chip comprising a memory and a processor, wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor so that the at least one processor can execute the method steps of the main node in the method provided in the first aspect above, or execute the method steps of the sub-node in the method provided in the first aspect above.
[0073] In a fourth aspect, an embodiment of the present application provides a vehicle-mounted audio data transmission system, including:
[0074] The vehicle-mounted audio data transmission device provided by the first aspect above;
[0075] The host is connected to the vehicle-mounted audio data transmission device and performs audio data transmission with the vehicle-mounted audio data transmission device.
[0076] In an embodiment of the present application, each node in the vehicle-mounted audio data transmission equipment is networked based on the Ethernet interface. In view of the strict periodic frame alignment requirements for sending and receiving audio data, data is transmitted based on the Ethernet interface at the physical layer, and audio frame data is transmitted through the audio interface inside the node. In order to ensure that all nodes play audio frame data at the same time, when each child node receives a downlink Ethernet data packet, it determines the time to transmit the audio frame data on the audio interface according to the first time threshold. This can ensure that the use of Ethernet interface transmission increases the data transmission rate and reduces the networking cost, while meeting the time division plan of the audio data.
[0077] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0079] Figure 1 Schematic diagram of an analog transmission scheme for vehicle speakers;
[0080] Figure 2 It is a schematic diagram of the TDM frame structure of the TDM interface in the audio system;
[0081] Figure 3a A schematic diagram of the structure of a vehicle-mounted audio data transmission device with a single daisy chain network provided in an embodiment of the present application;
[0082] Figure 3b A schematic diagram of the structure of a vehicle-mounted audio data transmission device with dual daisy chain networking provided in an embodiment of the present application;
[0083] Figure 4 A schematic diagram of a clock frequency synchronization method for all nodes in an embodiment of the present application;
[0084] Figure 5 A schematic diagram of the functional division of each sub-node to achieve clock frequency synchronization in an embodiment of the present application;
[0085] Figure 6A schematic diagram of performing data transmission according to uplink and downlink audio frame configurations according to an example of an embodiment of the present application;
[0086] Figure 7 A schematic diagram of intra-frame data buffering for data not sent in advance according to an example of an embodiment of the present application;
[0087] Figure 8 A schematic diagram of intra-frame data buffering for sending data in advance according to an example of an embodiment of the present application;
[0088] Fig. 9 This is a schematic diagram of the corresponding field order of the audio frame data corresponding to the sub-nodes in the downlink Ethernet data packet according to an example of the embodiment of the present application;
[0089] Fig.10 A schematic diagram of a fixed format used for uplink and downlink Ethernet data in an embodiment of the present application;
[0090] Fig.11 A schematic diagram of a vehicle audio data transmission method flow chart provided in an embodiment of the present application;
[0091] Fig.12 A schematic diagram of the structure of a vehicle-mounted audio data transmission chip as a master node provided in an embodiment of the present application;
[0092] Fig.13 A schematic diagram of the structure of an in-vehicle audio data transmission chip as a subnode provided in an embodiment of the present application. DETAILED DESCRIPTION
[0093] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0094] At present, the role of vehicle audio is becoming more and more important, and passengers are more and more concerned about the enjoyment of driving. In the past, most vehicles had 4 speakers, but now many low-end vehicles generally have at least 6 speakers, and some high-end vehicles generally have 6-10 speakers or even more, and some vehicles have as many as 21 speakers. How to coordinate a large number of speakers to achieve high-quality experience, physical layer data transmission is a crucial technology.
[0095] Currently, the physical layer data transmission of car speakers is divided into analog transmission scheme and digital transmission scheme.
[0096] Current analog transmission schemes include Figure 1As shown in the figure, the power amplifier chip R184 is connected to the gateway J533, the host J794 and each speaker. The power amplifier chip includes DAC (digital-to-analog converter) / ADC (analog-to-digital converter). Compared with the digital transmission solution, the main difference is the line cost script. In the current trend of vehicle intelligence, the digital transmission solution will gradually replace the previous analog transmission solution. At present, the digital transmission solution adopts the A2B bus solution of ADI.
[0097] The A2B bus is used to connect audio devices in the vehicle, such as microphones, amplifiers (AMP, Amplifier), multimedia hosts (Head Unit) and T-BOX (Telematics BOX). Through a low-cost unshielded twisted pair (UTP, Unshielded Twisted Pair), audio data, control signals, clocks and power are transmitted across distances. The digital interface can eliminate the need for external DAC (Digital to Analog Converter, Digital to Analog Converter) / ADC (Analog-to-Digital Converter, Analog-to-Digital Converter) conversion, providing a simpler and more convenient solution for audio design while improving fuel efficiency.
[0098] The A2B bus is a high-bandwidth, 50Mbps, bidirectional, digital audio bus for vehicles. It adopts a daisy chain structure. It is a system that includes a single host Master, i.e. a single master node, and multiple slaves Slave, i.e. multiple sub-nodes. The master node and the sub-nodes are interconnected to form a daisy chain networking structure to support data transmission between the daisy chain networks.
[0099] The A2B bus supports cross-distance digital audio transmission, supports up to 32 data channels, and has a regular bit rate of 48kHz-44.1kHz (supports 96kHz and 192kHz high-fidelity audio). The bus has an embedded clock and power supply. The link latency is <50uS, which makes it possible for applications such as active noise cancellation (ANC), real-time speech recognition, and high-fidelity sound processing.
[0100] However, the A2B bus solution is not widely used due to cost constraints, and only supports half-duplex communication. It has disadvantages such as low data transmission rate and extended data transmission time.
[0101] The current T1S Ethernet uses the 10BASE-T1S interface of automotive Ethernet, which can support daisy chain-like networking, but the rate can only support up to 10M, which cannot meet application requirements.
[0102] The current 100Base-T1 interface can support full-duplex 100M, but it can only support point-to-point communication and cannot support daisy chain networking.
[0103] The Ethernet system is essentially a packet switching network, which does not have strict timing requirements. The audio system is essentially a time division system, and the time division system must meet strict periodic frame alignment, so the Ethernet packet switching network needs to be transformed into a punctual time division system. Common audio interfaces of audio systems include Inter-IC Sound (I2S) and Time Division Multiplexing (TDM). Audio data is transmitted in the audio interface in the form of audio frames, which are called audio frame data. Taking the TDM interface as an example, the audio frame is called a TDM frame. Figure 2 The figure shows the timing diagram of the TDM frame of the audio system, including the frame synchronization signal FS (A) , audio data clock signal CLK, multiple channel audio data AXR(n), including 6 time slots, one slot transmits the data of one channel, the audio frame period is determined according to the frame synchronization signal, each frame synchronization signal corresponds to an audio frame period, the audio frame period is the same as the sampling period, the audio frame data collected in a sampling period is sent in a TDM frame period corresponding to a frame synchronization signal.
[0104] The embodiment of the present application improves the relevant Ethernet technology and realizes a networking mode that can transmit audio data through an Ethernet interface, such as Figure 3a and Figure 3b As shown, the vehicle-mounted audio data transmission device provided by this embodiment includes a main node and at least one sub-node that use an Ethernet interface for networking data transmission; the main node is connected to a host, and the host can be a digital signal processor (DSP) in the vehicle equipment. The DSP is used as an audio source to collect audio data and transmit audio frame data to the main node through an audio interface, such as processing the audio data collected from a microphone into audio frame data and sending it to the main node, or the host can access the network through a gateway, and process the audio data received from the network into audio frame data and send it to the main node. The main node receives the audio frame data based on time division multiplexing from the audio source, and starts to transmit it step by step to the last-level sub-node. After the last-level sub-node receives the audio frame data, all nodes play it simultaneously. Figure 3a It is a single daisy chain structure. The master node is connected to a first-level child node. Each child node is cascaded to form a data link from the master node to the last-level child node, supporting downlink data transmission from the master node to the last-level child node and uplink data transmission from the last-level child node to the master node.
[0105] Figure 3b It is a double daisy chain structure, which consists of two daisy chain structures, namely a left daisy chain and a right daisy chain. The left daisy chain includes a first-level sub-node connected to the main node and physically located on the left side, and the right daisy chain includes a first-level sub-node connected to the main node and physically located on the right side. Any link of the left daisy chain and the right daisy chain includes at least one sub-node. When any link of the left daisy chain and the right daisy chain includes multiple sub-nodes, the multiple sub-nodes are cascaded to support downlink data transmission from the main node to the last-level sub-node and uplink data transmission from the last-level sub-node of the link to the main node on each link. In the double daisy chain structure, since different sub-nodes are distributed in two links, for the same number of nodes, the time from the main node to the last-level sub-node is shorter than that of the single daisy chain structure, and the collected audio frame data can be played earlier.
[0106] The present application does not impose any restrictions on the interface connecting the master node and the host. The master node and the host are connected, for example, through a first audio interface for transmitting audio frame data collected by an audio source. The first audio interface may be, for example, an I2S interface or a TDM interface. The master node and the host are connected, for example, through a serial peripheral interface (SPI) for transmitting control signals and other data. The master node and the host are connected, for example, through a media independent interface (MII) for transmitting non-audio data, such as video data.
[0107] like Figure 3a or Figure 3b As shown, for a single daisy chain structure or a double daisy chain structure, the main node and the first-level sub-nodes and each sub-node are connected via an Ethernet data cable such as a twisted pair cable, and an Ethernet interface is used for communication. The sub-node also includes an interface for connecting peripheral devices. The interface for connecting peripheral devices includes a second audio interface, such as an I2S / TDM interface, which is used to connect an audio acquisition device and / or an audio playback device. The audio acquisition device may be, for example, a microphone MIC, and the audio playback device may be, for example, a speaker. The interface for connecting peripheral devices may be, for example, an SPI interface, and communication with the peripheral devices is performed via the SPI interface. The peripheral devices may be, for example, EEPROM (Electrically Erasable Programmable Read-Only Memory) or various sensors.
[0108] The premise for the present application to implement the time division system for transmitting audio data based on Ethernet is that all nodes in the entire daisy chain need to have synchronized clock frequencies.
[0109] In the embodiment of the present application, all sub-nodes use a clock frequency synchronized with the master node. When the number of sub-nodes is one, the downlink data transmission process is as follows:
[0110] The master node receives audio frame data based on time division multiplexing from an audio source based on a first audio interface;
[0111] The master node sends a downlink Ethernet data packet to the first-level child node through an Ethernet interface, wherein the downlink Ethernet data packet encapsulates the audio frame data;
[0112] The first-level sub-node receives the downstream Ethernet data packet, and sends the audio frame data in the downstream Ethernet data packet to the second audio interface, wherein the time when the first-level sub-node sends the audio frame data in the downstream Ethernet data packet to the second audio interface is the time when the first-level sub-node receives the downstream Ethernet data packet plus the first time threshold.
[0113] The main node receives audio frame data from an audio source based on the first audio interface, encapsulates the audio frame data into a downlink Ethernet data packet, and sends it to the first-level child node through the Ethernet interface. After the first-level child node receives the downlink Ethernet data packet, it obtains the audio frame data from the downlink Ethernet data packet. In order to ensure the simultaneous playback effect of the audio frame data, the time of receiving the downlink Ethernet data packet plus the first time threshold determines the arrival time of sending. The audio frame data is obtained from the downlink Ethernet data packet and sent to the audio playback device for playback through the second audio interface. The above-mentioned first time threshold can be understood as the configured waiting delay. When the first-level child node is the last-level child node, the configured waiting delay can be as low as zero.
[0114] The number of the above sub-nodes can be multiple, that is, multiple sub-nodes are cascaded connected, where:
[0115] The first-level child node sends the downlink Ethernet data packet to the next-level child node through the Ethernet interface;
[0116] Sub-nodes at all levels except the first-level sub-node receive the downlink Ethernet data packet sent by the upper-level sub-node through the Ethernet interface, and if it is not the last-level sub-node, that is, if there is a next-level sub-node, send the downlink Ethernet data packet to the next-level sub-node, and send the audio frame data in the received downlink Ethernet data packet to the second audio interface; if it is the last-level sub-node, send the audio frame data in the received downlink Ethernet data packet to the second audio interface;
[0117] The time when the other sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold.
[0118] The first time threshold corresponding to the first-level sub-node and other sub-nodes at all levels is the configured waiting delay. It should be understood that in order to play the audio frame data at the same time, the first time thresholds corresponding to different sub-nodes are different.
[0119] The present application also includes: implementing a time-division scheme for audio interface based on Ethernet to realize audio data transmission; controllable uplink and downlink delay jitter, with small jitter; and minimizing the uplink and downlink transmission delay.
[0120] This application networks the nodes of the vehicle-mounted audio data transmission equipment based on the Ethernet interface on the basis of achieving clock frequency synchronization between all sub-nodes and the main node, so as to perform data transmission at the physical layer through the Ethernet interface. The main node obtains audio frame data from the audio source based on the first audio interface, and encapsulates the audio frame data into Ethernet data packets for transmission to the first-level sub-nodes. For the audio source, data of multiple channels are collected in one sampling period and transmitted to the main node through the first audio interface. There is only one first audio interface, so the transmission system is a time-division system. The audio frame data of one sampling period needs to be time-sliced. One time slice (time slot) transmits the data of one channel. The transmission of data of all channels is completed in one audio frame period. The audio frame period is determined according to the frame synchronization signal. Each frame synchronization signal generated corresponds to an audio frame period. The audio frame period is the same as the sampling period. For example, Figure 2 The figure shows a schematic diagram of a TDM frame corresponding to a TDM interface. A TDM frame includes six time slots, namely slot0, slot1, ..., corresponding to data of the first channel, data of the second channel, ..., respectively.
[0121] In the embodiment of the present application, the main node and multiple sub-nodes are networked using an Ethernet interface, and the audio frame data of each sub-node corresponds to the data of one or more channels. All sub-nodes wait for the first time threshold after receiving the corresponding downlink Ethernet data packet, wherein the first time thresholds corresponding to different sub-nodes are different, so that the audio frame data sending time determined by each sub-node according to the first time threshold is consistent, so that the user can feel the sounds from different directions at the same time and experience the surround feeling of the sound.
[0122] In the embodiment of the present application, the time when the sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold. In this way, it can be ensured that after the audio frame data in the same audio frame period reaches all nodes, the audio frame data transmitted by each node through the second audio interface are aligned in time, so that all nodes can play the audio frame data of the same audio frame period at the same time. Therefore, data transmission based on the Ethernet interface can increase the data transmission rate, reduce the networking cost, and at the same time meet the time division scheme of audio data and reduce the delay of data transmission.
[0123] In the embodiment of the present application, the main node outputs a reference clock to the audio source, or the main node receives the reference clock output by the audio source, thereby completing the clock frequency synchronization between the main node and the audio source; each child node, based on the clock frequency of the previous-level main node or child node, uses a clock data recovery CDR (Clock Data Recovery) circuit to recover the clock frequency of the previous-level main node or child node from the data from the previous-level main node or child node, so as to synchronize with the clock frequency of the main node; after the clock frequency of each child node is synchronized with the clock frequency of the main node, it outputs a reference clock to the peripheral device connected to the child node.
[0124] like Figure 4As shown, the DSP connected to the main node is the audio source of the main node. The main node generates a clock frequency based on the crystal oscillator signal and outputs a reference clock to the audio source, or the main node receives the reference clock output by the audio source to complete the clock frequency synchronization between the main node and the audio source. After the audio source and the main node complete the clock frequency synchronization, audio frame data transmission is performed on the first audio interface with the main node based on the clock frequency, and the main node transmits Ethernet data packets with the first-level sub-node based on the clock frequency. Each sub-node is connected to a peripheral device through an interface for connecting the peripheral device, for example, an audio playback device and / or an audio acquisition device is connected through a second audio interface, wherein sub-node 1 generates a clock frequency according to a crystal oscillator signal, and uses a clock data recovery CDR circuit to recover the clock frequency of the upper-level master node from an Ethernet data packet from an upper-level master node. After sub-node 1 completes clock frequency synchronization with the master node, it transmits an Ethernet data packet with sub-node 2 based on the clock frequency; sub-node 2 generates a clock frequency according to a crystal oscillator signal, and uses a clock data recovery CDR circuit to recover the clock frequency of sub-node 1 from an Ethernet data packet from sub-node 1. After sub-node 2 completes clock frequency synchronization with sub-node 1, it transmits an Ethernet data packet with sub-node 3 based on the clock frequency; sub-node 3 generates a clock frequency according to a crystal oscillator signal, and recovers the clock frequency of sub-node 2 from an Ethernet data packet from sub-node 2, thereby completing the clock frequency synchronization of each sub-node with the master node. After the clock frequency of each sub-node is synchronized with the master node, the reference clock is output to the peripheral device connected to the sub-node. Usually, the CDR circuit is a feedback loop with an oscillator, which tracks the embedded clock in the input data by adjusting the phase of the oscillation clock through the loop. The specific circuit structure and principle will not be described in detail here.
[0125] By adopting the above clock frequency synchronization method, it can be ensured that all sub-nodes use the same clock frequency as the master node, such as Figure 5 As shown, each sub-node includes two parts, namely a master physical layer module and a slave physical layer module. The slave physical layer module recovers the previous level clock from the data sent by the previous level node through the CDR principle in the Ethernet protocol, and then uses the recovered clock of the slave physical layer module as the clock of the master physical layer module to communicate with the next level slave physical layer module, so as to meet the requirements of clock frequency synchronization of all nodes on the daisy chain in turn.
[0126] As an optional implementation, the above-mentioned Ethernet interface is a 100Base-T1 interface. The A2B bus solution in the related technology adopts a half-duplex solution with uplink / downlink bandwidth time division, and the total uplink / downlink bandwidth is less than 49.152M. If the vehicle-mounted audio data transmission device based on the 100Base-T1 interface provided in the embodiment of the present application is adopted, a time-division data transmission solution similar to networking is realized, and it is a full-duplex solution, which can achieve a total uplink / downlink bandwidth of up to 49.152*4M. Since the rate is 4 times that of the A2B bus solution, shorter latency and higher precision audio data transmission can be achieved.
[0127] The audio frame configuration of the master node and the sub-node in the embodiment of the present application is as follows: Figure 2 As shown, including data clock signal CLK, frame synchronization signal FS (A) , multi-channel audio data AXR(n), the master node and the sub-node use the same audio frame, Slot0~Slot5 in the audio frame of the master node represent the channel data, such as the left channel data and the right channel data. The audio frame data is encapsulated in an Ethernet data packet, and the sub-node extracts the required audio frame data from the Ethernet data packet. The audio frame data can be the data of the same channel or different channels in multiple Slo in the audio frame.
[0128] There is a delay between nodes in data transmission between nodes, and there is a data transmission delay for the downlink Ethernet data packet within the transmission frame. Therefore, the Ethernet data packets of the same audio frame period arrive at the child node at different times. The downlink Ethernet data packet arrives at each child node, and each child node decapsulates the audio frame data from it. In order to ensure the synchronous playback of the same audio frame data, the time when the sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold.
[0129] like Figure 6The figure shows a schematic diagram of the main node and the sub-node transmitting audio frame data according to the audio frame configuration. When transmitting the downlink frame (the audio frame data within an audio frame period), the audio frame data within an audio frame period is encapsulated in a downlink Ethernet data packet and transmitted through the Ethernet interface to realize the transmission of the downlink frame. Taking 2 downlink frames as an example, the sub-nodes include sub-node 1, sub-node 2, sub-node 3, sub-node 4 and sub-node 5, and sub-nodes 2 to 4 are omitted in the figure. Among them, the main node, sub-node 1, sub-node 2, sub-node 3, sub-node 4 and sub-node 5 are cascaded in sequence, and the transmission distance between sub-node 5 and the main node is the farthest. There are node delays between the main node and child nodes, and between different child nodes due to factors such as connection distance. The node delay between adjacent nodes is a fixed value, for example, 1.1us. Therefore, when there are 5 child nodes, the total node delay is, for example, 1.1us*5us. For the current child node, the data transmission delay from the start of receiving the downlink Ethernet data packet to the completion of receiving the downlink Ethernet data packet is, for example, 5us. The data transmission delay is related to the size of the downlink Ethernet data packet. The main node sending delay from the time point when the main node receives the audio frame data from the audio source based on the first audio interface to the time point when the audio frame data is started to be sent is, for example, 16us. Therefore, the time point when the audio frame data in the downlink Ethernet data packet arrives at the child node 5, the total delay relative to the time point when the main node receives the audio frame data from the audio source is the sum of the main node sending delay, the total delay between nodes and the data transmission delay, that is, for example, 16us+5.5us+5us. The closer the transmission distance to the master node, the smaller the total delay. In order to ensure that the subnodes play the same downlink frame at the same time, the embodiment of the present application is configured to configure the corresponding first time threshold for different subnodes. The first time threshold is the waiting delay configured according to the transmission distance between each subnode and the master node; wherein, the longer the transmission distance, the shorter the corresponding first time threshold. Figure 6 In the example, for subnodes 1 to 5, the first time threshold for the configured subnodes to transmit audio frame data through the second audio interface becomes smaller and smaller, so that the same downlink frames of all subnodes can be aligned in time.
[0130] For the audio system, it is hoped that the downlink delay is as short as possible. In order to further reduce the delay, in the embodiment of the present application, if the master node determines that the data continuous sending conditions for sending a downlink Ethernet data packet to the first-level child node are met or the valid audio frame data reception of the destination child node is completed, after caching part of the audio frame data in the audio frame period, it starts to encapsulate the received audio frame data into a downlink Ethernet data packet and sends it to the first-level child node through the Ethernet interface, thereby directly reducing the sending delay of the master node.
[0131] The above-mentioned data continuous transmission condition is: based on the current buffer size of received data and the data receiving rate, determine that there will be no data interruption when sending at the data sending rate. For the master node, the data continuous transmission condition is based on the current buffer size of audio frame data received from the audio source and the audio frame data receiving rate, determine that there will be no data interruption when sending at the downlink Ethernet data packet sending rate. Therefore, it is possible to determine whether the continuous transmission condition is met by matching the audio frame data receiving rate and the Ethernet data packet sending rate of the master node. If so, the audio frame data can be encapsulated into the downlink Ethernet data packet in advance and sent. Figure 6 As shown, for the master node, the downlink frame 0 on the right side of the dotted arrow indicates that after caching a portion of the audio frame data, the downlink Ethernet data packet encapsulation and transmission begins. For example, the downlink Ethernet data packet transmission begins after caching 16us of audio frame data. Compared with receiving all the audio frame data and then starting to send the downlink Ethernet data packet, the above-mentioned advance sending method has a shorter delay.
[0132] In the embodiment of the present application, the master node receives audio frame data from an audio source within an audio frame period. When it is determined that the reception of valid audio frame data of the destination subnode is completed, after caching part of the audio frame data in the frame, it starts to encapsulate and transmit the downlink Ethernet data packet. The destination subnode can be all subnodes or part of the subnodes. The downlink Ethernet data packet is transmitted from the master node to the last-level subnode step by step. The downlink Ethernet data packet may only encapsulate the audio frame data that some subnodes need to obtain. In this case, the part of the subnodes is the destination subnode. For other subnodes, when receiving the downlink Ethernet data packet, it is not necessary to obtain the audio frame data therefrom. Therefore, when the master node completes the reception of valid audio frame data of the destination subnode, it starts to encapsulate and send the downlink Ethernet data packet. Figure 6 As shown, the downlink frame 0 on the left side of the dotted arrow indicates that the master node receives audio frame data from the audio source, and if it is determined that the reception of valid audio frame data of the destination sub-node is completed, the downlink Ethernet data packet is sent in advance. Since the data is sent in advance and the data is sent continuously, the delay of the data reaching the sub-node is further reduced.
[0133] For example, the subnodes include subnode 1, subnode 2, subnode 3, and subnode 4. Figure 7 The example is valid audio frame data received from the audio source within an audio frame period, including audio frame data corresponding to subnodes 1 to 4, and the downlink Ethernet data packet is sent in advance by determining whether the continuous sending condition is met. Figure 8The example is valid audio frame data received from the audio source within an audio frame period, including audio frame data corresponding to subnode 1 and subnode 2. It is determined whether the continuous sending condition is met or whether the reception of the audio frame data of subnode 1 and subnode 2 is completed. If any of the conditions is met, the downlink Ethernet data packet is sent in advance.
[0134] Furthermore, after each sub-node obtains audio frame data from the received downlink Ethernet data packet within an audio frame period, if it is determined that the data continuous transmission condition for sending audio frame data to the second audio interface is met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the arrival transmission time is determined according to the first time threshold, and the audio frame data is started to be sent to the second audio interface. In all sub-nodes, it is not necessary to wait for all audio frame data in the Ethernet data packet to be received. As long as the continuous transmission condition of the second audio interface can be ensured, the arrival transmission time can be determined according to the current moment plus the first time threshold, and the audio frame data can be sent through the second audio interface. The data continuous transmission condition is to determine that there will be no data interruption when sending according to the audio frame data transmission rate according to the buffer amount of the currently received downlink Ethernet data packet and the receiving rate of the downlink Ethernet data packet. Alternatively, in all sub-nodes, it is not necessary to wait for all audio frame data in the Ethernet data packet to be received. As long as it can be ensured that the audio frame data required by itself is received, it can be started to determine the arrival transmission time according to the moment when the data required by itself is received plus the first time threshold, and the audio frame data can be sent through the second audio interface. In implementation, the audio frame data may be sent in advance based on only one of the above conditions, or the above two conditions may be combined for judgment. When any one of the conditions is met, the audio frame data is started to be sent when the sending time is determined to arrive according to the first time threshold.
[0135] like Figure 6 As shown, for subnode 5, downlink frame 0 is at the vertical dotted line position (aligned with the starting position of subnode downlink frame 0), indicating that subnode 5 starts the audio frame data transmission of the second audio interface only after receiving all the audio frame data in the Ethernet data packet, and the first time threshold configured for subnode 5 can be 0. Downlink frame 0 is at the vertical solid line position, indicating that when the data continuous transmission condition of the second audio interface is met or the audio frame data required by itself is received, the audio frame data transmission is started when the transmission time is determined to be reached according to the first time threshold.
[0136] In this embodiment, the downlink Ethernet data packet is generated and sent by the master node, and the corresponding downlink Ethernet data packet is transmitted step by step in a real-time streaming manner. When each child node receives the downlink Ethernet data packet transmitted in real-time streaming, it obtains the audio frame data from its corresponding field in the downlink Ethernet data packet according to the configuration and transmits it to the next-level child node, until it is transmitted to the last-level child node, in which one field is filled with audio frame data as data of one channel. The downlink Ethernet data packet adopts the real-time streaming transmission mode, which is equivalent to realizing fast data transmission and reception by means of a through train (not stopping at each child node, and taking data by the downlink data stream), which is simple and reliable.
[0137] Further, after each sub-node obtains the audio frame data from the corresponding field in the downstream Ethernet data packet according to the configuration, it is also used to fill the new audio frame data into the corresponding field in the downstream Ethernet data packet. It should be understood that the new audio frame data can be collected by each sub-node through the second audio interface; when it is transmitted to other sub-nodes at the following levels, other sub-nodes can not only obtain the audio frame data of the corresponding field, but also obtain the audio frame data of each upper sub-node from the field corresponding to the upper sub-node, thereby realizing the downlink data communication between each upper sub-node and the lower sub-node. In addition, each sub-node is also used to obtain the audio frame data of other sub-nodes or the upper nodes of other sub-nodes from the fields corresponding to other upper sub-nodes, thereby realizing the downlink data communication between other upper sub-nodes and the sub-nodes of this level. Through the above-mentioned data sending method, fast data communication between nodes is realized, and richer scene applications are realized.
[0138] The audio frame data encapsulated in the downstream Ethernet data packet includes audio frame data corresponding to different sub-nodes. Different fields are assigned to the corresponding sub-nodes during encapsulation, and the audio frame data corresponding to the sub-nodes are filled into the corresponding fields in the downstream Ethernet data packet. In the embodiment of the present application, the positions of the fields of the audio frame data corresponding to different sub-nodes in the downstream Ethernet data packet may be arranged in the same field arrangement order as the cascade order, such as Fig. 9 In the upper part, the fields filled with the audio frame data corresponding to the subnodes are arranged in the order of the field arrangement in the downlink Ethernet data packet according to the cascade order of the subnodes, that is, arranged in the order of subnode 1, subnode 2, subnode 3 and subnode 4. Another possible implementation is that in the downlink Ethernet data packet, the fields filled with the audio frame data corresponding to the subnodes with a longer transmission distance from the main node are arranged in the front of the field arrangement order in the downlink Ethernet data packet. Fig. 9 The lower part is arranged in the order of subnode 4, subnode 3, subnode 2 and subnode 1. By arranging the fields of the audio frame data corresponding to different subnodes in an audio frame period in order, the farthest downstream subnode can obtain the audio frame data in the downstream Ethernet data packet faster.
[0139] Through the vehicle-mounted audio data transmission equipment provided by the above-mentioned embodiment of the present application, each node in the vehicle-mounted audio data transmission equipment is networked based on the Ethernet interface, and in view of the strict periodic transmission and reception frame alignment requirements of audio data, downlink data transmission is performed based on the Ethernet interface at the physical layer; audio frame data transmission is performed through the first audio interface inside the node. In order to ensure that all nodes play audio frame data at the same time, when each child node receives a downlink Ethernet data packet, it determines the time to transmit the audio frame data on the first audio interface according to the first time threshold, which can ensure that the use of Ethernet interface transmission increases the data transmission rate and reduces the networking cost, and at the same time can meet the time division plan of audio data; for the main node or child node When the requirement of sending the audio frame data in advance of the above-mentioned embodiment is met, the audio frame data can be sent in advance on the first audio interface, thereby reducing the data transmission delay; further, the order of the fields filled in the audio frame data corresponding to the sub-node in the downlink Ethernet data packet can be arranged, so that the farther nodes receive the audio frame data faster, thereby meeting the requirement of playing the audio frame data simultaneously more quickly, and reducing the delay of playing the audio frame data simultaneously; the downlink Ethernet data is transmitted in a streaming manner, supporting each sub-node to obtain data from the downlink Ethernet data packet, and supporting the use of new audio frame data to fill the corresponding fields in the downlink Ethernet data packet, thereby supporting audio frame data communication between sub-nodes.
[0140] In the embodiment of the present application, for each link of the above-mentioned single daisy chain structure or dual data chain structure, uplink data transmission from the last-level sub-node to the master node is also supported. When the sub-nodes on any link include one sub-node, the uplink transmission process is:
[0141] The first-level sub-node sends an uplink Ethernet data packet to the master node through the Ethernet interface, wherein the uplink Ethernet data packet encapsulates the audio frame data collected by each sub-node through the second audio interface;
[0142] The master node receives the uplink Ethernet data packet and processes the uplink Ethernet data packet.
[0143] The uplink Ethernet data packet is transmitted to the master node through the Ethernet interface on the link, and the master node processes the uplink Ethernet data packet, which may specifically include obtaining audio frame data from the uplink Ethernet data packet and performing data processing such as decapsulation, or further transmitting it to the upper-level host, which further processes the audio data such as active noise reduction and voice recognition, or processes it into a downlink Ethernet data packet and transmits it to the first-level child node, which then sends it to the peripheral device through the second audio interface.
[0144] There may be multiple sub-nodes on any of the above links, that is, multiple sub-nodes are cascaded connected, where:
[0145] The first-level sub-node receives an uplink Ethernet data packet sent by the next-level sub-node through an Ethernet interface;
[0146] For sub-nodes of all levels except the first-level sub-node, if they are the last-level sub-nodes, they initiate an uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface; otherwise, they receive the uplink Ethernet data packet sent by the next-level sub-node through the Ethernet interface, and send the uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface. The uplink Ethernet data packets sent by sub-nodes of all levels encapsulate the audio frame data collected from the last level to the sub-node of that level through the second audio interface.
[0147] Through the above transmission process, the last-level child node collects audio frame data through the second audio interface and initiates an uplink Ethernet data packet. The uplink Ethernet data packet is transmitted step by step through the Ethernet interface. When the child nodes at each level receive the uplink Ethernet data packet, they encapsulate the audio frame data collected by themselves through the second audio interface into the Ethernet data packet. Finally, the uplink Ethernet data packet summarized to the main node is encapsulated with the audio frame data collected by each child node.
[0148] During the transmission of the uplink Ethernet data packet, it may be that only the subnode aggregates the collected audio frame data to the main node, which is then processed by the main node. It is also possible that audio frame data communication between nodes is realized during the data aggregation process. For example, a subnode collects audio frame data through the MIC and sends it to a speaker connected to another subnode for playback. In the embodiment of the present application, after at least one subnode receives the uplink Ethernet data packet sent by the next-level subnode through the Ethernet interface, it sends the audio frame data of other subnodes in the uplink Ethernet data packet to the second audio interface;
[0149] The time when the at least one subnode sends the audio frame data of other subnodes in the uplink Ethernet data packet to the second audio interface is the time when the subnode receives the uplink Ethernet data packet plus the second time threshold.
[0150] The audio frame data collected by a certain sub-node may be transmitted to at least one upper-level sub-node for playback, or there may be multiple sub-nodes collecting audio frame data and transmitting it to the upper-level sub-node. When each sub-node receives an Ethernet data packet, if it is determined that it is necessary to obtain audio frame data from it and transmit it through the second audio interface, the time of receiving the uplink Ethernet data packet plus the second time threshold is added, and transmission on the second audio interface begins. In this way, it can be ensured that after the audio frame data within the same audio frame period reaches all sub-nodes, the audio frame data transmitted by each sub-node through the second audio interface are aligned in time, so that all nodes can play the audio frame data of the same audio frame period at the same time. Therefore, transmitting data based on the Ethernet interface can increase the data transmission rate and reduce the networking cost, while being able to meet the time division scheme of audio data and reduce the delay of data transmission.
[0151] The second time threshold is a waiting delay configured according to the transmission distance between each sub-node and the last-level sub-node; wherein, the longer the transmission distance, the shorter the configured second time threshold. In this way, the audio frame data of the same audio frame period of all sub-nodes can be aligned in time.
[0152] For the audio system, it is hoped that the uplink and downlink delays are as short as possible. In order to further reduce the delay, in an embodiment of the present application, after at least one sub-node obtains the audio frame data of other sub-nodes from the received uplink Ethernet data packet within one audio frame period, if it is determined that the data continuous sending conditions for sending the audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, it determines the arrival of the sending time according to the second time threshold, and starts sending the audio frame data to the second audio interface.
[0153] The above-mentioned data continuous transmission condition is to determine the acquisition of audio frame data of other sub-nodes from the buffer amount and data receiving rate of Ethernet data packets currently received from the Ethernet interface, and there will be no data interruption when sending at the audio frame data sending rate. Therefore, the condition of continuous transmission of the sub-node can be calculated by matching the uplink Ethernet data packet receiving rate and the audio frame data sending rate of the sub-node to determine whether the continuous transmission condition is met. If it is met, the received audio frame data of other sub-nodes can be transmitted in advance through the second audio interface.
[0154] In all sub-nodes, it is not necessary to wait for all the audio frame data in the uplink Ethernet data packet to be received. As long as the continuous sending conditions of the second audio interface can be ensured, the sending time can be determined based on the current time plus the second time threshold, and the sending of audio frame data can be started through the second audio interface. Alternatively, in all sub-nodes, it is not necessary to wait for all the audio frame data in the Ethernet data packet to be received. As long as it can be ensured that the audio frame data of other sub-nodes needed by itself are received, it can be started based on the time when the audio frame data of other sub-nodes needed by itself is received plus the second time threshold to determine the sending time, and the sending of audio frame data can be started through the second audio interface. In implementation, the audio frame data can be sent in advance based on only one of the above conditions, or it can be judged in combination with the above two conditions. When any one of the conditions is met, the sending of audio frame data can be started when the sending time is determined based on the second time threshold.
[0155] In this embodiment, the last-level child node initiates an uplink Ethernet data packet, and the corresponding uplink Ethernet data packet is transmitted uplink step by step in a real-time streaming manner; when each child node receives the uplink Ethernet data packet transmitted in real-time, it fills the new audio frame data into its own corresponding field in the uplink Ethernet data packet according to the configuration, and then transmits the uplink Ethernet data packet to the upper-level child node or the main node through the Ethernet interface. The uplink Ethernet data packet adopts a real-time streaming transmission mode, which is equivalent to a through train (not stopping at each child node, and the uplink data stream replaces the data) to achieve fast data transmission and reception, which is simple and reliable.
[0156] Furthermore, after each sub-node fills the new audio frame data into its own corresponding field in the uplink Ethernet data packet, it is also used to obtain the new audio frame data filled by the other sub-nodes from the fields corresponding to the other sub-nodes in the uplink Ethernet data packet. Thus, data communication between other lower-level sub-nodes and the sub-nodes of this level is realized. Through the above data transmission method, fast data communication between nodes is realized, and richer scene applications are realized.
[0157] In this embodiment, the master node selects the most recent audio frame period in which the processing of the uplink Ethernet data packet is completed within one audio frame period for processing, based on the time position of receiving the uplink Ethernet data packet in at least one audio frame period. The master node may complete the reception of the uplink Ethernet data packet in one audio frame period, or it may occupy two audio frame periods to complete the reception of the uplink Ethernet data packet. The master node determines that when the processing of the uplink Ethernet data packet can be completed in the current audio frame period, the current audio frame period is determined as the most recent audio frame period, based on the time position of receiving the uplink Ethernet data packet in at least one audio frame period, the time position of starting processing, and the data processing delay. Otherwise, the next audio frame period is determined as the most recent audio frame period. Figure 6As shown, when transmitting an uplink frame (audio frame data within an audio frame period), the audio frame data within an audio frame period is encapsulated in an uplink Ethernet data packet and transmitted through an Ethernet interface to realize the transmission of the uplink frame. When the uplink frame 0 is transmitted from the subnode 5 to the master node, the time position of receiving the uplink Ethernet data packet is between the audio frame periods of the master node TDM uplink frame 1 and the master node TDM uplink frame 2. Since the uplink Ethernet data packet transmission is completed at the start time position of the audio frame period of the TDM uplink frame 2, it is determined that the processing of the uplink Ethernet data packet can be completed in the audio frame period of the master node TDM uplink frame 2. The processing of the uplink Ethernet data packet includes obtaining the audio frame data from the uplink Ethernet data packet to perform data processing, or further transmitting it to the upper-level host or processing the downlink Ethernet data packet to send it to the first-level subnode. However, if the time position of receiving the uplink Ethernet data packet is located at the position pointed by the dotted arrow of the uplink frame 0, although the master node receives all the uplink Ethernet data within an audio frame period, the remaining time slice is insufficient to send out all the received uplink Ethernet data packets. Therefore, the processing of the uplink Ethernet data packet cannot be completed in the current audio frame period, and the audio frame period where the master node TDM downlink frame 3 is located is determined as the nearest audio frame period. By selecting the nearest audio frame period for data processing of the uplink Ethernet data packet, it is ensured that the master node can process all the received uplink Ethernet data packets in the audio frame period.
[0158] The audio frame data encapsulated in the uplink Ethernet data packet includes audio frame data of different sub-nodes. Different fields are assigned to the corresponding sub-nodes during encapsulation. The audio frame data of the sub-nodes are filled into the corresponding fields, and the audio frame data filled in one field is the data of one channel. In the embodiment of the present application, the field order of the fields filled with the audio frame data corresponding to different sub-nodes in the uplink Ethernet data packet may be arranged in the same order as the cascade order, such as Fig. 9 As shown, the field arrangement order of the fields filled by the audio frame data corresponding to the subnodes in the uplink Ethernet data packet is arranged according to the subnode cascade order, that is, in the uplink Ethernet data packet, the fields filled by the audio frame data corresponding to the subnodes with a closer transmission distance to the main node are arranged in the front of the field arrangement order in the uplink Ethernet data packet, that is, arranged in the order of subnode 1, subnode 2, subnode 3 and subnode 4. By arranging the order of the fields filled by the audio frame data corresponding to different subnodes in the audio frame period, the farthest uplink subnode can better send the audio frame data in advance.
[0159] Through the vehicle-mounted audio data transmission equipment provided by the above-mentioned embodiment of the present application, each node in the vehicle-mounted audio data transmission equipment is networked based on the Ethernet interface, and in view of the strict periodic transmission and reception frame alignment requirements of audio data, uplink data transmission is performed based on the Ethernet interface at the physical layer; support is provided for audio frame data transmission through the first audio interface inside the node, and in order to ensure that all nodes play audio frame data at the same time, when each child node receives an uplink Ethernet data packet, it determines the time to transmit the audio frame data on the second audio interface according to the second time threshold, which can ensure that the use of Ethernet interface transmission increases the data transmission rate and reduces the networking cost, and at the same time can meet the time division scheme of audio data; for the child node, When the requirement of sending audio frame data in advance of the above-mentioned embodiment is met, the audio frame data can be sent in advance through the second audio interface, thereby reducing the data transmission delay; further, the order of the fields filled in the audio frame data corresponding to the sub-node in the downlink Ethernet data packet can be arranged, so that the more distant nodes can receive the audio frame data faster, thereby meeting the requirement of playing the audio frame data simultaneously more quickly, and reducing the delay of playing the audio frame data simultaneously; the uplink Ethernet data is transmitted in a streaming manner, supporting each sub-node to obtain data from the uplink Ethernet data packet, and at the same time supporting the use of new audio frame data to fill the corresponding fields in the uplink Ethernet data packet, thereby supporting audio frame data communication between sub-nodes.
[0160] In the embodiment of the present application, the uplink Ethernet data packet or the downlink Ethernet data packet is a standard Ethernet data packet or an Ethernet data packet in a custom format.
[0161] Custom-format Ethernet packets are fixed-format packets, such as Fig.10 As shown, it includes a preamble field, a packet type field indicating the packet type, a padding field corresponding to each audio frame, and a whole packet check field. Optionally, the data packet may also include a data direction indication field, the data direction indication field is used to indicate that the transmission direction of the data packet is a left daisy chain or a right daisy chain, and the padding field corresponding to each audio frame includes a data field (slot data) and a corresponding check bit field (slot check). The preamble filled with the preamble field is used as the SSD (Solid State Drives) field specified by Ethernet, indicating the beginning of the data; the packet type is used to identify whether it is a data packet / configuration packet / other type; the check bit field can be a parity check or a CRC (Cyclic Redundancy Check) check, which is used for each node to quickly check data and use it, and the whole packet check is used to check the entire data packet. It can be selected whether it is used for data usage conditions or system debugging. The data field is used to fill the audio frame data.
[0162] Based on the same inventive concept, an embodiment of the present application provides a method for transmitting in-vehicle audio data, the method being used for a network including a master node and at least one sub-node, wherein a first-level sub-node in the at least one sub-node is connected to the master node, such as Fig.11 As shown, the method includes:
[0163] Step 111, the master node receives audio frame data based on time division multiplexing from an audio source based on a first audio interface;
[0164] Step 112, the master node sends a downlink Ethernet data packet to the first-level child node through the Ethernet interface, wherein the downlink Ethernet data packet encapsulates the audio frame data;
[0165] Step 113, the first-level subnode receives the downstream Ethernet data packet, and sends the audio frame data in the downstream Ethernet data packet to the second audio interface, wherein the time when the first-level subnode sends the audio frame data in the downstream Ethernet data packet to the second audio interface is the time when the first-level subnode receives the downstream Ethernet data packet plus a first time threshold.
[0166] In one or more possible embodiments, there are multiple sub-nodes, and the multiple sub-nodes are cascade-connected. The method further includes:
[0167] The first-level child node sends the downlink Ethernet data packet to the next-level child node through the Ethernet interface;
[0168] Sub-nodes at all levels except the first-level sub-node receive the downlink Ethernet data packet sent by the upper-level sub-node through the Ethernet interface, send the downlink Ethernet data packet to the next-level sub-node if there is a next-level sub-node, and send the audio frame data in the received downlink Ethernet data packet to the second audio interface;
[0169] The time when the other sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold.
[0170] In one or more possible embodiments, the first time threshold is a waiting delay configured according to a transmission distance between each sub-node and the master node;
[0171] The longer the transmission distance is, the shorter the configured first time threshold is.
[0172] The master node sends a downlink Ethernet data packet to the first-level child node through the Ethernet interface, including:
[0173] If the master node determines within an audio frame period that the conditions for continuously sending a downlink Ethernet data packet to the first-level child node are met or the reception of valid audio frame data of the destination child node is completed, the master node starts to encapsulate the received audio frame data into a downlink Ethernet data packet after caching part of the audio frame data within the audio frame period, and sends it to the first-level child node through the Ethernet interface.
[0174] In one or more possible embodiments, each subnode sends the audio frame data in the downlink Ethernet data packet to the second audio interface, including:
[0175] Each sub-node obtains audio frame data from the received downlink Ethernet data packet within an audio frame period;
[0176] If it is determined that the conditions for continuous sending of the audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the sending time is determined to be reached according to the first time threshold, and the audio frame data is started to be sent to the second audio interface.
[0177] In one or more possible embodiments, wherein:
[0178] The downlink Ethernet data packet is initiated by the master node and transmitted downlink step by step in a real-time streaming transmission mode;
[0179] When each sub-node receives the downlink Ethernet data packet transmitted in real-time streaming mode, it obtains audio frame data from its corresponding field in the downlink Ethernet data packet according to the configuration, and transmits the obtained audio frame data to the next-level sub-node.
[0180] In one or more possible embodiments, after each sub-node obtains the audio frame data from its corresponding field in the downlink Ethernet data packet according to the configuration, the process further includes:
[0181] Filling the new audio frame data into the corresponding field in the downlink Ethernet data packet;
[0182] Each sub-node obtains the new audio frame data filled by the other sub-nodes from the fields corresponding to the other sub-nodes in the downlink Ethernet data.
[0183] In one or more possible embodiments, in the downlink Ethernet data packet, the fields filled with the audio frame data corresponding to the sub-nodes with a longer transmission distance from the main node are arranged earlier in the field arrangement order in the downlink Ethernet data packet.
[0184] In one or more possible embodiments, the method further includes:
[0185] The first-level sub-node sends an uplink Ethernet data packet to the master node through the Ethernet interface, wherein the uplink Ethernet data packet encapsulates the audio frame data collected by each sub-node through the second audio interface;
[0186] The master node receives the uplink Ethernet data packet and processes the uplink Ethernet data packet.
[0187] In one or more possible embodiments, there are multiple sub-nodes, and the multiple sub-nodes are cascade-connected. The method further includes:
[0188] The first-level sub-node receives an uplink Ethernet data packet sent by the next-level sub-node through an Ethernet interface;
[0189] For sub-nodes of all levels except the first-level sub-node, if they are the last-level sub-nodes, they initiate an uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface; otherwise, they receive the uplink Ethernet data packet sent by the next-level sub-node through the Ethernet interface, and send the uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface. The uplink Ethernet data packets sent by sub-nodes of all levels encapsulate the audio frame data collected from the last level to the sub-node of that level through the second audio interface.
[0190] In one or more possible embodiments, the method further includes:
[0191] After receiving an uplink Ethernet data packet sent by a next-level subnode through an Ethernet interface, at least one subnode sends the audio frame data in the uplink Ethernet data packet to a second audio interface;
[0192] The time when the at least one sub-node sends the audio frame data in the uplink Ethernet data packet to the second audio interface is the time when the at least one sub-node receives the uplink Ethernet data packet plus the second time threshold.
[0193] The second time threshold is a waiting delay configured according to the transmission distance between each sub-node and the last-level sub-node;
[0194] The longer the transmission distance is, the shorter the configured second time threshold is.
[0195] In one or more possible embodiments, at least one subnode sends the audio frame data in the uplink Ethernet data packet to the second audio interface, including:
[0196] The at least one sub-node obtains audio frame data from the received uplink Ethernet data packet within an audio frame period;
[0197] If it is determined that the conditions for continuous sending of audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the sending time is determined to be reached according to the second time threshold, and the audio frame data is started to be sent to the second audio interface.
[0198] In one or more possible embodiments, the data continuous sending condition is to determine, based on the buffer amount of currently received data and the data receiving rate, that there will be no data interruption when sending at the data sending rate.
[0199] In one or more possible embodiments, wherein:
[0200] The uplink Ethernet data packet is initiated by the last-level child node and is transmitted uplink level by level in a real-time streaming manner;
[0201] When each sub-node receives the real-time streaming uplink Ethernet data packet, it fills the new audio frame data into its own corresponding field in the uplink Ethernet data packet according to the configuration, and transmits the uplink Ethernet data packet to the upper-level sub-node or master node through the Ethernet interface.
[0202] In one or more possible embodiments, after each sub-node fills the new audio frame data into its corresponding field in the uplink Ethernet data packet, the process further includes:
[0203] Each sub-node obtains the new audio frame data filled by the other sub-nodes from the fields corresponding to the other sub-nodes in the uplink Ethernet data.
[0204] In one or more possible embodiments, the master node processes the uplink Ethernet data packet, including:
[0205] The master node selects the nearest audio frame period in which the processing of the uplink Ethernet data packet is completed within an audio frame period for processing according to the time position of receiving the uplink Ethernet data packet in at least one audio frame period.
[0206] In one or more possible embodiments, the master node selects the most recent audio frame period in which the uplink Ethernet data packet processing is completed within an audio frame period for processing, including:
[0207] The master node determines, based on the time position of receiving the uplink Ethernet data packet in at least one audio frame period, the time position of starting processing and the data processing delay, that when the current audio frame period can complete the processing of the uplink Ethernet data packet, the current audio frame period is determined as the most recent audio frame period, otherwise the next audio frame period is determined as the most recent audio frame period.
[0208] In one or more possible embodiments, in the uplink Ethernet data packet, the fields filled with the audio frame data corresponding to the sub-nodes with a closer transmission distance to the main node are arranged earlier in the field arrangement order in the uplink Ethernet data packet.
[0209] In one or more possible embodiments, the uplink Ethernet data packet or the downlink Ethernet data packet is a standard Ethernet data packet or an Ethernet data packet in a custom format.
[0210] In one or more possible embodiments, the Ethernet data packet in the above-mentioned custom format includes a preamble field, a packet type field indicating the packet type, a padding field corresponding to each audio frame, and a whole packet check field, wherein the padding field corresponding to each audio frame includes a data field and a corresponding check bit field, and the data field is used to fill in the audio frame data.
[0211] In one or more possible embodiments, the method further includes:
[0212] The master node outputs a reference clock to the audio source, or the master node receives a reference clock output by the audio source, thereby completing the clock frequency synchronization between the master node and the audio source;
[0213] Each sub-node uses a clock data recovery (CDR) circuit based on the clock frequency of the previous master node or sub-node to recover the clock frequency of the previous master node or sub-node from the data from the previous master node or sub-node, so as to synchronize with the clock frequency of the master node;
[0214] After the clock frequency of each sub-node is synchronized with that of the main node, a reference clock is output to the peripheral device connected to the sub-node.
[0215] The above-mentioned vehicle-mounted audio data transmission method provided in the embodiment of the present application and the vehicle-mounted audio data transmission method provided in the above-mentioned embodiment of the present application belong to the same inventive concept. The various implementation methods of the vehicle-mounted audio data transmission device provided in the above-mentioned embodiment can be applied to the vehicle-mounted audio data transmission method in this embodiment for implementation, and will not be repeated here.
[0216] After introducing the in-vehicle audio data transmission method and device according to the exemplary embodiment of the present application, next, an in-vehicle audio data transmission system according to another exemplary embodiment of the present application is introduced, the system comprising:
[0217] The vehicle-mounted audio data transmission device provided in the above embodiment;
[0218] The host is connected to the vehicle-mounted audio data transmission device and performs audio data transmission with the vehicle-mounted audio data transmission device.
[0219] The various implementations of the vehicle-mounted audio data transmission device provided in the above embodiments can be applied to the vehicle-mounted audio data transmission device in the vehicle in this embodiment for implementation, and will not be repeated here.
[0220] After introducing the in-vehicle audio data transmission method and device according to the exemplary embodiment of the present application, next, an in-vehicle audio data transmission chip according to another exemplary embodiment of the present application is introduced.
[0221] In some possible implementations, the vehicle audio data transmission chip according to the present application may include at least a processor and a memory. The memory stores a program code, and when the program code is executed by the processor, the processor executes the method steps executed by the master node in the vehicle audio transmission method according to various exemplary embodiments of the present application described above in this specification, or executes the method steps executed by the subnode in the vehicle audio transmission method according to various exemplary embodiments of the present application described above in this specification.
[0222] If the above audio data transmission chip is used as the master node, refer to the following Fig.12 The in-vehicle audio data transmission chip 120 according to this embodiment of the present application is described. Fig.12 The vehicle-mounted audio data transmission chip 120 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0223] like Fig.12 As shown, the components of the vehicle audio data transmission chip 120 may include but are not limited to: the above-mentioned processor 121, the above-mentioned memory 122, the Ethernet interface 123, and the interface connected to the host. The interface connected to the host includes a first audio interface for transmitting audio frame data collected by the audio source, a serial peripheral interface SPI, and a media independent interface MII. The first audio interface may be, for example, an I2S interface, a TDM interface, a serial peripheral interface SPI, for transmitting control signals and other data, and a media independent interface MII for transmitting non-audio data, such as transmitting video data. It should be understood that the interface related to the chip can be integrated into the chip, or it can be connected to the chip independently of the chip.
[0224] The memory 122 may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0225] If the above audio data transmission chip is used as a child node, refer to the following Fig.13 The in-vehicle audio data transmission chip 130 according to this embodiment of the present application is described. Fig.13The vehicle-mounted audio data transmission chip 130 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0226] like Fig.13 As shown, the components of the vehicle audio data transmission chip 130 may include but are not limited to: the above-mentioned processor 131, the above-mentioned memory 132, the Ethernet interface 133, and the interface for connecting peripheral devices. If it is not the last-level sub-node, it includes a first Ethernet interface connected to the previous-level main node or sub-node, and a second Ethernet interface connected to the next-level sub-node. If it is the last-level sub-node, it only includes an Ethernet interface connected to the previous-level main node or sub-node. The interface for connecting peripheral devices includes a second audio interface, such as an I2S / TDM interface, which is used to connect an audio acquisition device and / or an audio playback device. The audio acquisition device may be, for example, a microphone MIC, and the audio playback device may be, for example, a speaker. The interface for connecting peripheral devices may be, for example, an SPI interface, which communicates with peripheral devices through the SPI interface. The peripheral devices may be, for example, EEPROMs or various sensors, etc. It should be understood that the interface related to the chip may be integrated into the chip, or may be connected to the chip independently of the chip.
[0227] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .
[0228] In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instruction in the processor. The above processor or processing device can be a general processor, a digital signal processor (Digital Signal Processor, DSP), a microcontroller (Microcontroller Unit, MCU), a central processing unit (Central Processing Unit), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0229] The above-mentioned memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0230] The technical solution provided by the present application is introduced in detail above. The principles and implementation methods of the present application are explained by using specific examples in the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0231] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A vehicle audio data transmission method, characterized in that: The method is used for a network including a master node and at least one sub-node, wherein a first-level sub-node in the at least one sub-node is connected to the master node, and the method includes: The master node receives audio frame data based on time division multiplexing from an audio source based on a first audio interface; The master node sends a downlink Ethernet data packet to the first-level child node through an Ethernet interface, wherein the downlink Ethernet data packet encapsulates the audio frame data; The first-level sub-node receives the downstream Ethernet data packet, and sends the audio frame data in the downstream Ethernet data packet to the second audio interface, wherein the time when the first-level sub-node sends the audio frame data in the downstream Ethernet data packet to the second audio interface is the time when the first-level sub-node receives the downstream Ethernet data packet plus a first time threshold; The first time threshold is a waiting delay configured according to a transmission distance between each sub-node and the master node.
2. The method according to claim 1, characterized in that: There are multiple sub-nodes, and the multiple sub-nodes are cascade-connected. The method further includes: The first-level child node sends the downlink Ethernet data packet to the next-level child node through the Ethernet interface; Sub-nodes at all levels except the first-level sub-node receive the downlink Ethernet data packet sent by the upper-level sub-node through the Ethernet interface, send the downlink Ethernet data packet to the next-level sub-node if there is a next-level sub-node, and send the audio frame data in the received downlink Ethernet data packet to the second audio interface; The time when the other sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold.
3. The method according to claim 1 or 2, characterized in that: The longer the transmission distance is, the shorter the configured first time threshold is.
4. The method according to claim 1, characterized in that: The master node sends a downlink Ethernet data packet to the first-level child node through the Ethernet interface, including: If the master node determines within an audio frame period that the conditions for continuously sending a downlink Ethernet data packet to the first-level child node are met or the reception of valid audio frame data of the destination child node is completed, the master node starts to encapsulate the received audio frame data into a downlink Ethernet data packet after caching part of the audio frame data within the audio frame period, and sends it to the first-level child node through the Ethernet interface.
5. The method according to claim 1, characterized in that Each subnode sends the audio frame data in the downlink Ethernet data packet to the second audio interface, including: Each sub-node obtains audio frame data from the received downlink Ethernet data packet within an audio frame period; If it is determined that the conditions for continuous sending of the audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the sending time is determined to be reached according to the first time threshold, and the audio frame data is started to be sent to the second audio interface.
6. The method according to claim 2, characterized in that Each subnode sends the audio frame data in the downlink Ethernet data packet to the second audio interface, including: Each sub-node obtains audio frame data from the received downlink Ethernet data packet within an audio frame period; If it is determined that the conditions for continuous sending of the audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the sending time is determined to be reached according to the first time threshold, and the audio frame data is started to be sent to the second audio interface.
7. The method according to claim 1 or 2, characterized in that: in: The downlink Ethernet data packet is initiated by the master node and transmitted downlink step by step in a real-time streaming transmission mode; When each sub-node receives the downlink Ethernet data packet transmitted in real-time streaming mode, it obtains audio frame data from its corresponding field in the downlink Ethernet data packet according to the configuration, and transmits the obtained audio frame data to the next-level sub-node.
8. The method according to claim 7, characterized in that After each sub-node obtains the audio frame data from its corresponding field in the downlink Ethernet data packet according to the configuration, it also includes: Filling the new audio frame data into the corresponding field in the downstream Ethernet data packet; Each sub-node obtains the new audio frame data filled by the other sub-nodes from the fields corresponding to the other sub-nodes in the downlink Ethernet data.
9. The method according to claim 1 or 2, characterized in that: In the downlink Ethernet data packet, the fields filled with the audio frame data corresponding to the sub-nodes with a longer transmission distance from the main node are arranged earlier in the field arrangement order in the downlink Ethernet data packet.
10. The method according to claim 1, characterized in that Also includes: The first-level sub-node sends an uplink Ethernet data packet to the master node through the Ethernet interface, wherein the uplink Ethernet data packet encapsulates the audio frame data collected by each sub-node through the second audio interface; The master node receives the uplink Ethernet data packet and processes the uplink Ethernet data packet.
11. The method according to claim 10, characterized in that There are multiple sub-nodes, and the multiple sub-nodes are cascade-connected. The method further includes: The first-level sub-node receives an uplink Ethernet data packet sent by the next-level sub-node through an Ethernet interface; For sub-nodes of all levels except the first-level sub-node, if they are the last-level sub-nodes, they initiate an uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface; otherwise, they receive the uplink Ethernet data packet sent by the next-level sub-node through the Ethernet interface, and send the uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface. The uplink Ethernet data packets sent by sub-nodes of all levels encapsulate the audio frame data collected from the last level to the sub-node of that level through the second audio interface.
12. The method according to claim 11, characterized in that Also includes: After receiving an uplink Ethernet data packet sent by a next-level subnode through an Ethernet interface, at least one subnode sends the audio frame data in the uplink Ethernet data packet to a second audio interface; The time when the at least one sub-node sends the audio frame data in the uplink Ethernet data packet to the second audio interface is the time when the at least one sub-node receives the uplink Ethernet data packet plus the second time threshold.
13. The method according to claim 12, characterized in that The second time threshold is a waiting delay configured according to the transmission distance between each sub-node and the last-level sub-node; The longer the transmission distance is, the shorter the configured second time threshold is.
14. The method according to claim 12, characterized in that At least one subnode sends the audio frame data in the uplink Ethernet data packet to the second audio interface, including: The at least one subnode obtains audio frame data from the received uplink Ethernet data packet within an audio frame period; If it is determined that the conditions for continuous sending of audio frame data to the second audio interface are met or the audio frame data required by itself is received, after caching part of the audio frame data within the audio frame period, the sending time is determined to be reached according to the second time threshold, and the audio frame data is started to be sent to the second audio interface.
15. The method according to claim 4 or 5 or 6 or 14, characterized in that: The data continuous sending condition is to determine, based on the buffer volume of currently received data and the data receiving rate, that there will be no data interruption when sending at the data sending rate.
16. The method according to claim 10 or 11, characterized in that in: The uplink Ethernet data packet is initiated by the last-level child node and is transmitted uplink level by level in a real-time streaming manner; When each sub-node receives the real-time streaming uplink Ethernet data packet, it fills the new audio frame data into its own corresponding field in the uplink Ethernet data packet according to the configuration, and transmits the uplink Ethernet data packet to the upper-level sub-node or master node through the Ethernet interface.
17. The method according to claim 16, characterized in that After each sub-node fills the new audio frame data into its corresponding field in the uplink Ethernet data packet, it also includes: Each sub-node obtains the new audio frame data filled by the other sub-nodes from the fields corresponding to the other sub-nodes in the uplink Ethernet data.
18. The method according to claim 10, characterized in that The master node processes the uplink Ethernet data packet, including: The master node selects the nearest audio frame period in which the processing of the uplink Ethernet data packet is completed within an audio frame period for processing according to the time position of receiving the uplink Ethernet data packet in at least one audio frame period.
19. The method according to claim 18, characterized in that The master node selects the most recent audio frame period in which the uplink Ethernet data packet processing is completed within an audio frame period for processing, including: The master node determines, based on the time position of receiving the uplink Ethernet data packet in at least one audio frame period, the time position of starting processing and the data processing delay, that when the current audio frame period can complete the processing of the uplink Ethernet data packet, the current audio frame period is determined as the most recent audio frame period, otherwise the next audio frame period is determined as the most recent audio frame period.
20. The method according to claim 10 or 11, characterized in that In the uplink Ethernet data packet, the fields filled with the audio frame data corresponding to the sub-nodes whose transmission distance to the main node is closer are arranged earlier in the field arrangement order in the uplink Ethernet data packet.
21. The method according to claim 1 or 2 or 10 or 11, characterized in that: The uplink Ethernet data packet or the downlink Ethernet data packet is a standard Ethernet data packet or an Ethernet data packet in a custom format.
22. The method according to claim 21, characterized in that The Ethernet data packet in the above-mentioned custom format includes a preamble field, a packet type field indicating the packet type, a padding field corresponding to each audio frame, and a whole packet check field. The padding field corresponding to each audio frame includes a data field and a corresponding check bit field. The data field is used to fill in the audio frame data.
23. The method according to claim 1, characterized in that Also includes: The master node outputs a reference clock to the audio source, or the master node receives a reference clock output by the audio source, thereby completing the clock frequency synchronization between the master node and the audio source; Each sub-node uses a clock data recovery (CDR) circuit based on the clock frequency of the previous master node or sub-node to recover the clock frequency of the previous master node or sub-node from the data from the previous master node or sub-node, so as to synchronize with the clock frequency of the master node; After the clock frequency of each sub-node is synchronized with that of the main node, a reference clock is output to the peripheral device connected to the sub-node.
24. A vehicle-mounted audio data transmission device, characterized in that: The device comprises a main node and at least one sub-node, the main node and the at least one sub-node are cascaded to form a network, a first-level sub-node in the at least one sub-node is connected to the main node, wherein: The master node receives the audio frame data based on time division multiplexing from the audio source based on the first audio interface; The master node sends a downlink Ethernet data packet to the first-level child node through an Ethernet interface, wherein the downlink Ethernet data packet encapsulates the audio frame data; The first-level sub-node receives the downstream Ethernet data packet, and sends the audio frame data in the downstream Ethernet data packet to the second audio interface, wherein the time when the first-level sub-node sends the audio frame data in the downstream Ethernet data packet to the second audio interface is the time when the first-level sub-node receives the downstream Ethernet data packet plus the first time threshold; The first time threshold is a waiting delay configured according to a transmission distance between each sub-node and the master node.
25. The device according to claim 24, characterized in that There are multiple sub-nodes, and the multiple sub-nodes are cascade-connected, wherein: The first-level child node sends the downlink Ethernet data packet to the next-level child node through the Ethernet interface; Sub-nodes at all levels except the first-level sub-node receive the downlink Ethernet data packet sent by the upper-level sub-node through the Ethernet interface, send the downlink Ethernet data packet to the next-level sub-node if there is a next-level sub-node, and send the audio frame data in the received downlink Ethernet data packet to the second audio interface; The time when the other sub-nodes at all levels send the audio frame data in the downlink Ethernet data packet to the second audio interface is the time when the sub-node receives the downlink Ethernet data packet plus the first time threshold.
26. The device according to claim 24, characterized in that The first-level sub-node sends an uplink Ethernet data packet to the master node through the Ethernet interface, wherein the uplink Ethernet data packet encapsulates the audio frame data collected by each sub-node through the second audio interface; The master node receives the uplink Ethernet data packet and processes the uplink Ethernet data packet.
27. The device according to claim 24, characterized in that There are multiple sub-nodes, and the multiple sub-nodes are cascade-connected, wherein: The first-level sub-node receives an uplink Ethernet data packet sent by the next-level sub-node through an Ethernet interface; For sub-nodes of all levels except the first-level sub-node, if they are the last-level sub-nodes, they initiate an uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface; otherwise, they receive the uplink Ethernet data packet sent by the next-level sub-node through the Ethernet interface, and send the uplink Ethernet data packet to the upper-level sub-node through the Ethernet interface. The uplink Ethernet data packets sent by sub-nodes of all levels encapsulate the audio frame data collected from the last level to the sub-node of that level through the second audio interface.
28. The device according to claim 27, characterized in that After receiving an uplink Ethernet data packet sent by a next-level subnode through an Ethernet interface, at least one subnode sends the audio frame data in the uplink Ethernet data packet to a second audio interface; The time when the at least one sub-node sends the audio frame data in the uplink Ethernet data packet to the second audio interface is the time when the at least one sub-node receives the uplink Ethernet data packet plus the second time threshold.
29. A vehicle-mounted audio data transmission chip, characterized in that: The chip includes a memory and a processor, wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the at least one processor to execute the method steps of the main node in the method as described in any one of claims 1-23, or to execute the method steps of the sub-node in the method as described in any one of claims 1-23.
30. A vehicle-mounted audio data transmission system, characterized in that: include: The vehicle-mounted audio data transmission device according to any one of claims 24 to 28; The host is connected to the vehicle-mounted audio data transmission device and performs audio data transmission with the vehicle-mounted audio data transmission device.
