Audio data transmission method and device, chip, electronic equipment and storage medium

By encapsulating the original audio packets of a frame into target audio data packets and transmitting them directly to the audio output device, the problem of audio quality loss caused by encoding and decoding is solved, achieving lossless audio transmission and low-latency, high-efficiency transmission.

CN115132213BActive Publication Date: 2026-04-24伟光有限公司(CN)
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
伟光有限公司(CN)
Filing Date
2022-06-27
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

During audio data transmission, the encoding and decoding of the audio source data by the sending device results in audio quality loss and affects the playback effect.

Method used

The original audio packet of the frame is encapsulated into a target audio data packet, including the original audio packet of the frame and an instruction part of the communication protocol, and sent to the audio output device through a wireless communication channel. The audio output device performs unpacking processing to avoid audio quality loss during encoding and decoding.

Benefits of technology

It achieves zero-compression lossless transmission of audio data, improves audio playback quality, reduces transmission latency and power consumption, and enhances audio transmission capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115132213B_ABST
    Figure CN115132213B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an audio data transmission method and device, a chip, an electronic device and a storage medium. The method is applied to an electronic device, and the method comprises: encapsulating a frame original audio packet into a target audio data packet, the target audio data packet comprising the frame original audio packet and an indication part of a communication protocol; and sending the target audio data packet to an audio output device via a wireless communication channel; wherein the indication part of the communication protocol is used to indicate that the data format of the target audio data packet conforms to the communication protocol. The audio data transmission method, device, chip, electronic device and storage medium described above can realize lossless transmission of audio data, avoid the situation that the original audio data has audio quality loss, and improve the playing effect of the audio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of audio processing technology, specifically to an audio data transmission method, apparatus, chip, electronic device, and storage medium. Background Technology

[0002] Currently, when a sending device transmits audio data to a receiving device for playback, the sending device typically needs to perform a series of encoding and decoding processes on the audio source data before transmitting the processed audio data to the receiving device. This results in a loss of audio quality in the audio source data, affecting the audio playback effect. Summary of the Invention

[0003] This application discloses an audio data transmission method, apparatus, chip, electronic device, and storage medium, which can realize lossless transmission of audio data, avoid audio quality loss of the original audio data, and improve the audio playback effect.

[0004] This application discloses an audio data transmission method applied to an electronic device, the method comprising:

[0005] The original audio packet of the frame is encapsulated into a target audio data packet, the target audio data packet including the original audio packet of the frame and an indication part of the communication protocol;

[0006] The target audio data packet is sent to the audio output device via a wireless communication channel;

[0007] The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

[0008] This application discloses a chip, including a processor and a communication module.

[0009] The processor is configured to encapsulate a frame raw audio packet into a target audio data packet, the target audio data packet including the frame raw audio packet and an indication of a communication protocol;

[0010] The communication module is configured to send the target audio data packet to the audio output device via a wireless communication channel;

[0011] The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

[0012] This application discloses an audio data transmission method applied to an audio output device, the method comprising:

[0013] The target audio data packet is received via a wireless communication channel. The target audio data packet includes a frame of original audio packets and an indication of the communication protocol.

[0014] The target audio data packet is unpacked.

[0015] This application discloses a chip, including a processor and a communication module.

[0016] The communication module is configured to receive target audio data packets via a wireless communication channel, wherein the target audio data packets include a frame of original audio packets and an indication of the communication protocol.

[0017] The processor is configured to: unpack the target audio data packet;

[0018] The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

[0019] This application discloses an audio data transmission device applied to an electronic device, the device comprising:

[0020] The packetization module is used to encapsulate the original audio packet of the frame into a target audio data packet, wherein the target audio data packet includes the original audio packet of the frame and an instruction part of the communication protocol;

[0021] The transmitting module is used to transmit the target audio data packet to the audio output device via a wireless communication channel;

[0022] The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

[0023] This application discloses an audio data transmission device applied to an audio output device, the device comprising:

[0024] A receiving module is used to receive a target audio data packet via a wireless communication channel, wherein the target audio data packet includes a frame of original audio packets and an indication of the communication protocol;

[0025] The audio processing module is used to unpack the target audio data packet;

[0026] The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

[0027] This application discloses an electronic device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to implement any of the methods described above.

[0028] This application discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the methods described above.

[0029] The audio data transmission method, apparatus, chip, electronic device, and storage medium disclosed in this application embodiment encapsulate a frame of raw audio packets into a target audio data packet. The target audio data packet includes the frame of raw audio packets and a communication protocol indicator. The target audio data packet is then transmitted to an audio output device via a wireless communication channel. The communication protocol indicator indicates that the data format of the target audio data packet conforms to the communication protocol. In this application embodiment, the electronic device directly encapsulates the frame of raw audio packets to obtain a target audio data packet with a data format conforming to the communication protocol and transmits it to the audio output device. This eliminates the need for a series of encoding and decoding processes on the audio source data, avoiding loss of original audio data due to encoding and decoding. This achieves zero-compression lossless transmission of audio data, improving audio playback quality. Furthermore, since the electronic device does not need to perform a series of encoding and decoding processes on the original audio data, transmission latency is reduced, improving audio transmission capability. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1A This is a schematic diagram of audio data transmission in related technologies;

[0032] Figure 1B This is an application scenario diagram of an audio data transmission method in one embodiment;

[0033] Figure 2 This is a flowchart of an audio data transmission method in one embodiment;

[0034] Figure 3 This is a flowchart illustrating an audio transmission method in one embodiment;

[0035] Figure 4A This is a schematic diagram of the data packet format of the target audio data packet in one embodiment;

[0036] Figure 4B This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0037] Figure 4C This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0038] Figure 4D This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0039] Figure 4E This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0040] Figure 4F This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0041] Figure 4G This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0042] Figure 4H This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0043] Figure 4I This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0044] Figure 4J This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0045] Figure 4K This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0046] Figure 4L This is a schematic diagram of the data packet format of the target audio data packet in another embodiment;

[0047] Figure 5 A flowchart of an audio data transmission method in another embodiment;

[0048] Figure 6 This is a block diagram of an audio data transmission device in one embodiment;

[0049] Figure 7 This is a block diagram of an audio data transmission device in another embodiment;

[0050] Figure 8 This is a structural block diagram of an electronic device in one embodiment. Detailed Implementation

[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] It should be noted that the terms "comprising" and "having," and any variations thereof, in the embodiments and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0053] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, first simulation data may be referred to as second simulation data, and similarly, second simulation data may be referred to as first simulation data. Both first simulation data and second simulation data are simulation data, but they are not the same simulation data. The term "multiple" as used in this application refers to two or more. The term "and / or" as used in this application refers to one of the schemes, or any combination of multiple schemes.

[0054] In related technologies, when electronic devices transmit audio data to audio output devices for playback by receiving devices, the electronic devices typically need to perform a series of encoding and decoding processes on the audio source data first. For example, Figure 1A This is a schematic diagram of audio data transmission in related technologies. For example... Figure 1A As shown, taking the transmission of audio data from an electronic device to an audio output device via Bluetooth wireless communication as an example, the electronic device acquires the audio source data. First, it performs PCM (Pulse Code Modulation) decoding on the audio source data to obtain PCM data. Then, it performs Bluetooth audio encoding processing such as SBC (Subband Coding) and AAC (Advanced Audio Coding) on ​​the PCM data to obtain Bluetooth audio encoded data in SBC, AAC, or other encoding formats. The electronic device can then transmit the Bluetooth audio encoded data in SBC, AAC, or other encoding formats to the audio output device via Bluetooth wireless communication. The audio output device performs PCM decoding on the Bluetooth audio encoded data in SBC, AAC, or other encoding formats to obtain PCM data. Then, it uses a DAC (Digital to Analog converter) and an AMP (Amplifier for Power) to perform digital-to-analog conversion and power amplification to obtain analog data, which is then played back.

[0055] Because electronic devices first decode the audio source data into PCM data, and then perform encoding processing such as SBC and AAC, which are lossy audio encoding technologies, the audio quality of the audio source data will be lost, which will seriously affect the audio playback effect and prevent users from successfully experiencing the lossless playback effect of the audio source data.

[0056] This application provides an audio data transmission method, apparatus, chip, electronic device, and storage medium, which can achieve lossless transmission of audio data, avoid audio quality loss in the original audio data, and improve the audio playback effect.

[0057] Figure 1B This is a diagram illustrating an application scenario of an audio data transmission method in one embodiment. For example... Figure 1B As shown, electronic device 110 and audio output device 120 can establish a communication connection. Electronic device 110 may include, but is not limited to, mobile phones, smart wearable devices, in-vehicle terminals, tablets, PCs (Personal Computers), PDAs (Personal Digital Assistants), etc. Audio output device 120 may include, but is not limited to, headphones, speaker devices, in-vehicle terminals, etc., and further, the audio output device 120 may be TWS (True Wireless Stereo) headphones.

[0058] The electronic device 110 and the audio output device 120 can establish wireless communication connections such as Bluetooth and WiFi, or wired communication connections can be established through the USB (Universal Serial Bus) interface. This application embodiment does not specifically limit the communication connection method between the electronic device 110 and the audio output device 120.

[0059] During the transmission of audio data from electronic device 110 to audio output device 120 for audio playback, electronic device 110 can acquire the original audio packet of the frame to be transmitted from the audio source data and encapsulate the original audio packet into a target audio data packet. The target audio data packet includes the original audio packet and an instruction section for the communication protocol. Electronic device 110 can send the target audio data packet to audio output device 120. After receiving the target audio data packet sent by electronic device 110, audio output device 120 can unpack the target audio data packet and process the unpacked original audio packet to play the processed audio data. Electronic device 110 does not need to perform a series of encoding and decoding processes on the audio source data, which avoids the loss of original audio data caused by encoding and decoding processes, realizes zero compression and lossless transmission of audio data, and improves the audio playback effect.

[0060] In some embodiments of this application, "communication protocol" includes public communication protocols, which can be adopted by standards organizations or promoted in the industry, and "communication protocol" can also be a proprietary communication protocol, which can be used between devices and systems manufactured by the same manufacturer, and can also be used by other manufacturers with a license. In this application, the nature and use of "communication protocol" are not limited.

[0061] like Figure 2 As shown, in one embodiment, an audio data transmission method is provided, which can be applied to the above-described electronic device. The audio data transmission method may include the following steps:

[0062] Step 210: Encapsulate the original frame audio packet into a target audio data packet, wherein the target audio data packet includes the original frame audio packet and an instruction section of the communication protocol.

[0063] Electronic devices can play audio through audio output devices. They can obtain raw audio packets to be transmitted from audio source data, which can refer to audio data to be played or currently being played. Audio source data can be any type of audio data, such as music, video sound, background noise from applications running on the electronic device, call audio, or notification sounds, but is not limited to these.

[0064] In some embodiments, the audio source data may be audio data using a lossless encoding format, and the original audio packet of the frame obtained from the audio source data may include original audio data using a lossless encoding format. Optionally, the lossless encoding format includes any one of the following formats: FLAC (Free Lossless Audio Codec), APE (obtained through Monkey's Audio compression), ALAC (Apple lossless audio codec, a lossless audio format developed by Apple Inc.). It should be understood that, with the development of encoding technology, the embodiments of this application can also be applied to other encoding formats that may emerge in the future.

[0065] Furthermore, the audio source data can be lossless encoded audio data with frame segmentation capability. The audio source data can be divided into multiple data frames according to a preset frame duration, i.e., the audio source data can be divided into multiple raw audio packets, each raw audio packet including a data segment of the audio source data. Each raw audio packet can contain all the information required for decoding, thus decoding does not depend on the previous or next raw audio packet. Each raw audio packet can include a header and a data portion. The header of each raw audio packet can include a vendor identifier and an encoder identifier. The vendor identifier identifies the audio data vendor, and the encoder identifier identifies the encoding format of the audio source data. Different encoding formats of audio source data can correspond to different encoder identifiers. Optionally, the header of each raw audio packet can also include one or more fields such as the audio source data version identifier, sampling rate, sampling depth, number of channels, frame length (such as the frame duration mentioned above), and data portion length, which are not limited here. The data portion of each original audio packet may include at least the original audio data in a lossless encoding format, and may also include other data content, which is not limited here.

[0066] Electronic devices can encode multiple frames of raw audio packets from a sound source data based on a communication protocol, and then sequentially send the resulting target audio data packets to an audio output device, enabling the audio output device to play lossless audio data. Optionally, each frame of raw audio packets may carry a corresponding frame number, which can be used to characterize the arrangement order of the raw audio packets in the sound source data. Raw audio packets can be obtained sequentially according to the ascending order of frame numbers, and then encoded to obtain the corresponding target audio data packets, which are then sent to the audio output device. In this embodiment, the electronic device can sequentially transmit target audio data packets to the audio output device frame by frame, achieving a simultaneous transmission and playback effect. This ensures real-time audio playback and can be applied to scenarios with high real-time audio playback requirements, such as notification tone playback, voice call playback, and background music playback during application use. It can meet users' needs for lossless audio playback quality in various scenarios.

[0067] In some embodiments, a communication protocol can be configured to achieve zero-compression lossless transmission of the original audio packet. The communication protocol can specify a data format for the target audio data. By encapsulating the original audio packet into target audio data that conforms to the data format, zero-compression lossless transmission of the original audio packet is achieved.

[0068] The target audio data packet may include a raw audio frame and one or more setting fields. Each setting field may be stored in a corresponding data segment within the target audio data packet, and the position of each data segment within the target audio data packet can be adjusted according to actual needs. In this embodiment, the target audio data packet may include a raw audio frame and a communication protocol indicator. The communication protocol indicator is used to indicate that the data format of the target audio data packet conforms to the communication protocol. For example, in the data format of the target audio data packet, the communication protocol indicator may be located before or after the raw audio frame, but is not limited to this.

[0069] Electronic devices can encapsulate raw audio packets based on the data packet format specified in a communication protocol to obtain a target audio data packet including the raw audio packets and an indicator of the communication protocol. The indicator of the communication protocol may include at least a vendor identifier and an encoder identifier. The encoder identifier can be used to identify the encoding format corresponding to the raw audio packets in the target audio data packet and to indicate that the target audio data packet carries audio data in a lossless encoding format. Furthermore, the indicator of the communication protocol may also include information such as a version number of the communication protocol, but is not limited thereto. The vendor identifier, encoder identifier, version number, etc., can all be composed of one or more of numbers, characters, and symbols, and are not limited here.

[0070] Optionally, the set fields included in the target audio data packet may include, but are not limited to, one or more of time series values ​​and check codes. The time series values ​​can be used to characterize the sending order of the target audio data packet, and the check codes can be used to verify the integrity of the target audio data packet.

[0071] In this embodiment, the electronic device directly encapsulates the original audio packets of the audio source data frame to obtain the target audio data packet whose data format conforms to the communication protocol, without needing to perform PCM decoding and SBC, AAC, or other encoding processing on the original audio packets. This avoids music quality loss during the encoding and decoding process of the original audio packets, saves processing time and power consumption, and simplifies the encapsulation process, saving the computing power and memory resources of the electronic device. It achieves lossless audio transmission with zero compression, low power consumption, and low latency.

[0072] Step 220: Send the target audio data packet to the audio output device via a wireless communication channel.

[0073] An electronic device can send a packaged target audio data packet to an audio output device. Upon receiving the target audio data packet, the audio output device can unpack it to obtain a raw audio frame packet, and then process the raw audio frame packet to play the processed audio data. In some embodiments, the audio output device can first extract a communication protocol indicator from the target audio data packet. Based on this indicator, the target audio data packet can be identified as conforming to the communication protocol. The audio output device can then extract the raw audio frame packet from the target audio data packet based on the communication protocol, and then process the extracted raw audio frame packet to play the processed audio data. Since the raw audio frame packet does not undergo lossy compression encoding during the entire transmission process, the audio output device can play lossless audio data, improving the audio playback effect.

[0074] In some embodiments, the audio output device may perform PCM decoding on the original audio packets of the frames extracted from the target audio data packet to obtain PCM decoded data, then perform digital-to-analog conversion on the PCM decoded data to obtain first analog data, and then amplify the power of the first analog data to obtain second analog data. The audio output device may output the second analog data.

[0075] The audio output device unpacks the target audio data packet to obtain the original audio frame in lossless encoding format. This original audio frame can then be PCM decoded to obtain PCM decoded data. The audio output device can convert the PCM decoded data from a digital signal to an analog signal using a digital-to-analog converter to obtain first analog data. This first analog data is then amplified by a power amplifier to obtain second analog data. The power amplifier transmits the second analog data to the playback unit, and the audio output device outputs the second analog data through the playback unit to achieve the effect of playing audio.

[0076] In some embodiments, the wireless communication channel may include a Bluetooth communication channel, which includes a broadcast channel and / or a data channel. Optionally, after receiving the target audio data packet, the electronic device may send the target audio data packet to the audio output device via the broadcast channel or the data channel. If the electronic device receives a retransmission request from the audio output device, it may retransmit the target audio data packet indicated by the retransmission request to the audio output device via the data channel.

[0077] A Bluetooth connection can be established between electronic devices and audio output devices. This Bluetooth connection can include classic Bluetooth connections, BLE (Bluetooth Low Energy) connections, etc. A classic Bluetooth connection is a Bluetooth communication connection based on the classic Bluetooth protocol, while a BLE connection is a Bluetooth communication connection based on the BLE protocol. Classic Bluetooth protocol generally refers to Bluetooth protocols below version 4.0, while BLE protocol generally refers to Bluetooth protocols above version 4.0. Furthermore, this Bluetooth connection can be a Bluetooth Audio connection based on a BLE connection, capable of supporting audio data transmission.

[0078] Electronic devices can send target audio data packets to audio output devices via the audio service transmission channel of a Bluetooth connection. If the Bluetooth connection is a classic Bluetooth connection, the audio service transmission channel can be a transmission channel established based on the A2DP (Advanced Audio Distribution Profile) protocol or the HFP (Hands-free Profile) protocol, etc. If the Bluetooth connection is an LE Audio Bluetooth connection, the audio service transmission channel can be a transmission channel such as CIS (Connected Isochronous Streams), but is not limited to these. It should be noted that the embodiments of this application do not limit the specific Bluetooth connection method and communication channel between the electronic device and the audio output device, and can change according to the development of Bluetooth standard protocols. Since the target audio data packet is generated based on communication protocol encapsulation, it can be guaranteed that the audio transmission is not limited to the data packet format specified by the communication standard protocol in related technologies. The audio transmission method provided in the embodiments of this application is applicable to various different Bluetooth wireless communication transmissions, has strong adaptability, can meet the needs of different transmission scenarios, and improves the audio transmission capability between electronic devices and audio output devices.

[0079] For example, Figure 3 This is a flowchart illustrating an audio transmission method in one embodiment. Figure 3 As shown, the electronic device can obtain raw audio packets from the audio source data, and encode the obtained raw audio packets according to the communication protocol to obtain the corresponding target audio data packets. Then, it sends the target audio data packets to the audio output device via Bluetooth wireless transmission. After receiving the target audio data packets, the audio output device can unpack the target audio data packets to obtain the raw audio packets. It can then perform PMC decoding on the raw audio packets to obtain PCM decoded data. This data is then processed by a DAC and an AMP for digital-to-analog conversion and power amplification, respectively, to obtain analog data. Finally, the analog data is output through the playback unit. Compared to... Figure 1AThe audio transmission method shown in this application eliminates the need for PCM decoding and Bluetooth audio encoding such as SBC and AAC in the electronic device, thus avoiding music quality loss in the played audio data. Furthermore, the overall processing time is shorter, reducing transmission latency (for example, with a 10-millisecond frame in Bluetooth transmission, reducing both PMC decoding and Bluetooth encoding processes can shorten latency by more than 20 milliseconds), improving real-time audio transmission, and reducing the power consumption and memory usage of the electronic device. It also does not rely on the Bluetooth audio encoding capabilities of the electronic device, enhancing the lossless audio transmission capability between the electronic device and the audio output device.

[0080] In this embodiment, the electronic device directly encodes the original audio packets to obtain target audio data packets with a data format conforming to the communication protocol and transmits them to the audio output device. This eliminates the need for a series of encoding and decoding processes on the audio source data, avoiding data loss due to encoding and decoding. This achieves zero-compression lossless transmission of audio data, improving playback quality. Furthermore, since the electronic device does not require a series of encoding and decoding processes on the audio source data, transmission latency is reduced, enhancing audio transmission capabilities.

[0081] The following describes several data packet formats for target audio data packets:

[0082] (1) The target audio data packet includes the original audio packet of the frame and the instruction part of the communication protocol.

[0083] The instruction section of the communication protocol may include at least a vendor identifier and an encoder identifier. The encoder identifier can be used to identify the encoding format corresponding to the original audio packet in the target audio data packet, and can be used to indicate that the target data packet is an audio data packet carrying lossless encoded audio data. Furthermore, the instruction section of the communication protocol may also include information such as the version number of the communication protocol, but is not limited thereto. The vendor identifier, encoder identifier, version number, etc., mentioned above can all be composed of one or more of numbers, characters, and symbols, and are not limited here.

[0084] In some embodiments, the original audio frame may include a header and a data portion, the data portion including original audio data. The target audio data packet may include the header of the original audio frame stored in a first data segment, the data portion of the original audio frame stored in a second data segment, and a communication protocol indication portion stored in a third data segment. After acquiring the original audio frame, the electronic device may store the header of the original audio frame in the first data segment of the target audio data packet, store the data portion of the original audio frame in the second data segment of the target audio data packet, and store the communication protocol indication portion in the third data segment of the target audio data packet.

[0085] Furthermore, the target audio data packet can be configured as follows:

[0086] This places the third data segment before the first and second data segments; or,

[0087] This places the third data segment between the first and second data segments; or,

[0088] This places the third data segment after the first and second data segments.

[0089] For example, Figure 4A This is a schematic diagram of the data packet format of the target audio data packet in one embodiment. For example... Figure 4A As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section, and the target audio data packet may include a communication protocol instruction section and the original FLAC audio packet. The communication protocol instruction section may be located before the header and the FLAC data section of the original FLAC audio packet.

[0090] For example, Figure 4B This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4B As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section, and the target audio data packet may include a communication protocol instruction section and the original FLAC audio packet. The communication protocol instruction section may be located between the FLAC header and the FLAC data section of the original FLAC audio packet.

[0091] For example, Figure 4C This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4C As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section, and the target audio data packet may include a communication protocol instruction section and the original FLAC audio packet. The communication protocol instruction section may be located after the FLAC header and FLAC data section of the original FLAC audio packet.

[0092] In one embodiment, after receiving a target audio data packet, the audio output device can unpack the target audio data packet and extract the communication protocol indication portion from the third data segment of the target audio data packet. Further, it extracts the header of the original audio packet from the first data segment of the target audio data packet and the data portion of the original audio packet from the second data segment of the target audio data packet. The audio output device can first determine that the target audio data packet supports the communication protocol based on the extracted communication protocol indication portion, then extract the header and data portion of the original audio packet from the first and second data segments of the target audio data packet respectively, and then process the original audio packet to play the processed audio data.

[0093] (2) The target audio data packet includes the original audio packet of the frame, the instruction part of the communication protocol and the time series value. The time series value is used to characterize the sending order of the target audio data packet.

[0094] The electronic device can sequentially generate time-series values ​​for each target audio data packet according to the transmission order of each generated target audio data packet. These time-series values ​​can also be used to characterize the frame order (i.e., the corresponding data frame order) of the original audio packets contained in the target audio data packet within the audio source data. Following the transmission order from first to last, the time-series values ​​corresponding to each target audio data packet can be accumulated sequentially. The time-series values ​​for target audio data packets can be generated according to a preset sequence generation method. The difference between the time-series value of a later-transmitted target audio data packet and the time-series value of a earlier-transmitted target audio data packet can be a fixed difference. For example, this fixed difference can be 1. If the time-series value of the previously generated target audio data packet (including the previous original audio packet) is 100, then the time-series value of the currently generated target audio data packet (including the original audio packet) can be 101, but it is not limited to this; the fixed difference can also be 2, 3, etc.

[0095] Optionally, a numerical range corresponding to the time series values ​​can be set. When the time series value corresponding to a certain target audio data packet reaches the maximum value of this range, the time series value corresponding to the next target audio data packet can start from the minimum value of this range and begin a new round of time series accumulation. For example, the numerical range corresponding to the time series values ​​is 0 to 2. 64 If the time series value corresponding to a certain target audio data packet reaches the 2 64 If the time series value of the next target audio data packet is 0, the problem of excessive computational resource consumption caused by the infinite accumulation of time series values ​​can be avoided.

[0096] In some embodiments, after an electronic device acquires a frame original audio packet, it can generate a time series value corresponding to the frame original audio packet based on the time series value corresponding to the previously generated target audio data packet, and store the time series value corresponding to the frame original audio packet into the fourth data segment of the target audio data packet to generate a target audio data packet containing an instruction part of the communication protocol, a frame original audio packet, and a corresponding time series value.

[0097] The position of the fourth data segment in the target audio data packet can be pre-configured. For example, the fourth data segment can be after the third data segment (i.e., the instruction section of the communication protocol), or between the first and second data segments (i.e., between the header of the original audio packet and the original audio data), or after the second data segment (i.e., the original audio data of the original audio packet), etc. There are no limitations here.

[0098] For example, Figure 4D This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4D As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol instruction section, the original FLAC audio packet, and a time series value. The time series value may be located after the communication protocol instruction section and before the FLAC header and FLAC data section of the original FLAC audio packet.

[0099] For example, Figure 4E This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4E As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol instruction section, the original FLAC audio packet, and a time series value. The time series value may be located after the communication protocol instruction section, and the communication protocol instruction section and the time series value may be located between the FLAC header and the FLAC data section of the original FLAC audio packet.

[0100] For example, Figure 4F This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4F As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol instruction section, the original FLAC audio packet, and a time series value. The time series value may be located between the FLAC header and the FLAC data section of the original FLAC audio packet, and the communication protocol instruction section may be located before the FLAC header of the original FLAC audio packet.

[0101] The audio output device can assemble the original audio packets contained in each target audio data packet according to the time sequence values ​​in each received target audio data packet, thereby enabling audio processing and playback according to the correct frame order. After receiving a target audio data packet sent by an electronic device, the audio output device can extract the time sequence value from the fourth data segment of the target audio data packet. Based on the time sequence value extracted from the target audio data packet, the transmission order corresponding to the target audio data packet is determined. The audio output device can then process the target audio data packet according to the transmission order corresponding to the target audio data packet to play the processed audio data.

[0102] In some embodiments, the audio output device may also determine whether there are any missed target audio data packets based on the time-series values ​​in each target audio data packet. If a missed time-series value is detected, a retransmission request may be sent to the electronic device, which may carry the missed time-series value. After receiving the retransmission request, the electronic device may retransmit the target audio data packet corresponding to the missed time-series value to the audio output device based on the missed time-series value carried in the retransmission request. Optionally, the electronic device may store target audio data packets within a fixed time range, for example, only storing the 20 most recently generated target audio data packets, which can ensure that retransmission can be performed according to the needs of the audio output device without occupying too much storage space.

[0103] In this embodiment of the application, by adding time series values ​​to the target audio data packet, the correct order of the original audio bitstream obtained by the audio output device can be guaranteed, thus ensuring the accuracy of playback.

[0104] (3) The target audio data packet includes the original audio packet of the frame, the instruction part of the communication protocol and the check code. The check code is used to verify the integrity of the target audio data packet.

[0105] After acquiring the original audio packet of the frame, the electronic device can calculate the original audio packet of the frame according to a preset calculation method to obtain a check code, and store the check code in the fifth data segment of the target audio data packet to generate a target audio data packet containing an instruction part of the communication protocol, the original audio packet of the frame, and the corresponding check code.

[0106] The position of the fifth data segment in the target audio data packet can be pre-configured. For example, the fifth data segment can be after the third data segment (i.e., the instruction section of the communication protocol), or between the first and second data segments (i.e., between the header of the original audio packet and the original audio data), or after the second data segment (i.e., the original audio data of the original audio packet), etc., without limitation.

[0107] For example, Figure 4G This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4G As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol instruction section, the original FLAC audio packet, and a checksum. The checksum may be located after the communication protocol instruction section and before the FLAC header and FLAC data section of the original FLAC audio packet.

[0108] For example, Figure 4H This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4H As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and FLAC data. The target audio data packet may include a communication protocol instruction, the original FLAC audio packet, and a checksum. The checksum may be located after the communication protocol instruction, and the communication protocol instruction and the checksum may be located between the FLAC header and the FLAC data of the original FLAC audio packet.

[0109] For example, Figure 4I This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4I As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol instruction section, the original FLAC audio packet, and a checksum. The checksum may be located between the header and the data section of the original FLAC audio packet, and the communication protocol instruction section may be located before the header of the original FLAC audio packet.

[0110] In one implementation, the original audio frame can be divided into multiple groups of bit data. Each group of bit data can contain N bit values, where N can be a positive integer, such as 1, 4, 8, etc., but is not limited to these. Starting from the first group of bit data in the original audio frame, the current group of bit data can be XORed with the next group of bit data until the next group of bit data is the last group of bit data, in order to obtain the checksum.

[0111] As another implementation, the instruction section of the communication protocol and the original audio packet of the frame can be divided into multiple groups of bit data. Starting from the first group of bit data, the current group of bit data is XORed with the next group of bit data until the next group of bit data is the last group of bit data, thus obtaining the checksum. It should be noted that other methods can also be used to calculate the checksum. For example, starting from the first bit value of the original audio packet of the frame, each bit value can be reversed to obtain the checksum, etc., but it is not limited to this. The specific checksum calculation method can be set according to actual needs.

[0112] After receiving a target audio data packet from an electronic device, the audio output device can extract a checksum from the fifth data segment of the target audio data packet. Based on the extracted checksum, the integrity of the target audio data packet is verified. The communication protocol instruction section, the original audio packet, and the checksum can be parsed from the target audio data packet according to the communication protocol. The original audio packet can be calculated according to a preset calculation method, and the calculation result is compared with the checksum to determine if they match. If they match, the verification passes, indicating that the target audio data packet is complete; if they do not match, the verification fails, indicating that the target audio data packet is incomplete. If the audio output device detects that the target audio data packet is incomplete, it can send a retransmission request to the electronic device, instructing the electronic device to retransmit the target audio data packet.

[0113] Optionally, the retransmission request may carry a packet identifier, and each target audio data packet may correspond to a different packet identifier, which may consist of one or more of numbers, characters, and symbols. After receiving the retransmission request, the electronic device may retransmit the target audio data packet corresponding to the packet identifier to the audio output device according to the packet identifier carried in the retransmission request.

[0114] In this embodiment of the application, by adding a checksum to the target audio data packet, the integrity of the target audio data packet can be guaranteed, thus ensuring the accuracy of audio transmission.

[0115] (4) The target audio data packet includes the original audio packet of the frame, the instruction part of the communication protocol, the time sequence value and the check code.

[0116] After acquiring the original audio packet, the electronic device can generate the corresponding time sequence value and the corresponding check code. The header and original audio data of the original audio packet are stored in the first and second data segments of the target audio data packet, respectively. The instruction part of the communication protocol is stored in the third data segment of the target audio data packet, the time sequence value is stored in the fourth data segment of the target audio data packet, and the fifth data segment of the target audio data packet is stored to obtain the target audio data packet.

[0117] For example, Figure 4JThis is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4J As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol indicator, the original FLAC audio packet, a time series value, and a checksum. The time series value may be located after the communication protocol indicator, the checksum may be located after the time series value, and the checksum may be located before the FLAC header and the FLAC data section of the original FLAC audio packet.

[0118] For example, Figure 4K This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4K As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol indicator, the original FLAC audio packet, a time sequence value, and a checksum. The time sequence value may be located after the communication protocol indicator, and the checksum may be located after the time sequence value. The communication protocol indicator, the time sequence value, and the checksum are located between the FLAC header and the FLAC data section of the original FLAC audio packet.

[0119] For example, Figure 4L This is a schematic diagram of the data packet format of the target audio data packet in another embodiment. For example... Figure 4L As shown, taking audio data in FLAC format as an example, the original FLAC audio packet may include a FLAC header and a FLAC data section. The target audio data packet may include a communication protocol indicator, the original FLAC audio packet, a time series value, and a checksum. The communication protocol indicator may be located before the FLAC header and FLAC data section of the original FLAC audio packet, and the time series value and checksum may be located after the FLAC data section of the original FLAC audio packet, with the checksum located after the time series value.

[0120] The method by which electronic devices generate time series values ​​and check codes can be referred to the relevant descriptions in the above embodiments, and will not be repeated here.

[0121] As another implementation, the electronic device can first generate a time-series value, and then generate a checksum based on the communication protocol's instruction, the original audio packet of the frame, and the time-series value. The communication protocol's instruction, the original audio packet of the frame, and the time-series value can be divided into multiple groups of bit data. Starting from the first group of bit data, the current group of bit data is XORed with the next group of bit data until the next group of bit data is the last group of bit data, thus obtaining the checksum. This checksum can not only help verify the integrity of the original audio packet in the target audio data packet, but also help verify the integrity of the communication protocol's instruction and time-series value, further ensuring the accuracy of the transmitted target audio data packet.

[0122] If the audio output device detects that the target audio data packet is incomplete based on the checksum in the target audio data packet, it can use the time series value in the target audio data packet as a packet identifier and send a retransmission request carrying that time series value to the electronic device. After receiving the retransmission request, the electronic device can retransmit the target audio data packet corresponding to the time series value carried in the retransmission request to the audio output device.

[0123] It should be noted that the data packet format of the target audio data packet is not limited to the above-mentioned data packet formats. The target audio data packet may also include other field information besides the communication protocol indication section, the original audio packet, the time sequence and the check code, and can be adjusted according to actual needs.

[0124] In this embodiment of the application, the electronic device can encode the original audio packet of the frame based on the data packet format specified by the communication protocol, obtain the target audio data packet, and transmit it to the audio output device. It does not require a series of encoding and decoding processes on the audio source data. The encode method is simple, does not depend on the encoding capability of the electronic device, reduces power consumption and resource consumption, and can reduce transmission latency. It realizes zero-compression lossless transmission of the original audio data and improves the audio playback effect.

[0125] In one embodiment, a chip is provided configured to perform the steps of the audio data transmission method for an electronic device as described in the above embodiments. The chip may include a processor and a communication module. The processor may be used to perform the step of encapsulating a raw audio packet into a target audio data packet, and the communication module may be used to perform the step of transmitting the target audio data packet to an audio output device via a wireless communication channel. The chip may be installed in an electronic device, such as a mobile phone, wearable device, in-vehicle terminal, tablet computer, etc.

[0126] like Figure 5 As shown, in one embodiment, another audio data transmission method is provided, which can be applied to the audio output device described above. This method may include the following steps:

[0127] Step 510: Receive target audio data packets via a wireless communication channel. The target audio data packets include the original audio packets of the frame and an instruction section for the communication protocol.

[0128] The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

[0129] Step 520: Unpack the target audio data packet.

[0130] In one embodiment, step 520 includes: extracting the communication protocol indication from the third data segment of the target audio data packet.

[0131] In one embodiment, step 520 further includes: extracting the header of the original audio packet from the first data segment of the target audio data packet; and extracting the data portion of the original audio packet from the second data segment of the target audio data packet.

[0132] In one embodiment, the target audio data packet further includes time-series values. After step 520, the method further includes: determining the transmission order corresponding to the target audio data packet based on the time-series values ​​extracted from the target audio data packet; and processing the original frame audio packets extracted from the target audio data packet according to the transmission order corresponding to the target audio data packet to play the processed audio data.

[0133] In one embodiment, the target audio data packet further includes a checksum. Following step 520, the method further includes: verifying the integrity of the target audio data packet based on the checksum extracted from it; if the target audio data packet is detected to be incomplete, sending a retransmission request to the electronic device, the retransmission request instructing the electronic device to retransmit the target audio data packet.

[0134] In one embodiment, after step 520, the following steps may be included: performing PCM decoding on the original audio packet of the frame extracted from the target audio data packet to obtain PCM decoded data; performing digital-to-analog conversion on the PCM decoded data to obtain first analog data, and performing power amplification on the first analog data to obtain second analog data; and outputting the second analog data.

[0135] It should be noted that the specific description of the audio data transmission method applied to the audio output device provided in the embodiments of this application can be referred to the description of the audio data transmission method applied to the electronic device provided in the above embodiments, and will not be repeated here.

[0136] In this embodiment, the electronic device directly encodes the original audio packets to obtain target audio data packets with a data format conforming to the communication protocol and transmits them to the audio output device. This eliminates the need for a series of encoding and decoding processes on the audio source data, avoiding loss of original audio data due to encoding and decoding. This achieves zero-compression lossless transmission of audio data, improving audio playback quality. Furthermore, since the electronic device does not need to perform a series of encoding and decoding processes on the original audio data, transmission latency is reduced, improving audio transmission capabilities.

[0137] In one embodiment, a chip is provided, configured to perform the steps of the audio data transmission method applied to an audio output device as described in the above embodiments. The chip may include a processor and a communication module. The communication module can be used to perform steps such as receiving target audio data packets, and the processor can be used to perform steps such as unpacking the target audio data packets. The chip can be installed in an audio output device, such as headphones, speakers, or car players.

[0138] like Figure 6 As shown, in one embodiment, an audio data transmission device 600 is provided, which can be applied to the above-mentioned electronic device. The audio data transmission device 600 may include a packetization module 610 and a transmission module 620.

[0139] Packetization module 610 is used to encapsulate the original audio frame packet into a target audio data packet. The target audio data packet includes the original audio frame packet and a communication protocol indicator. The communication protocol indicator indicates that the data format of the target audio data packet conforms to the communication protocol.

[0140] In one embodiment, the frame's raw audio packet includes raw audio data encoded in a lossless format.

[0141] In one embodiment, the lossless encoding format includes any one of FLAC, APE, and ALAC formats.

[0142] The transmitting module 620 is used to transmit the target audio data packet to the audio output device via a wireless communication channel.

[0143] In one embodiment, the wireless communication channel includes a Bluetooth communication channel, which includes a broadcast channel and / or a data channel.

[0144] In this embodiment, the electronic device directly encodes the original audio packets to obtain target audio data packets with a data format conforming to the communication protocol and transmits them to the audio output device. This eliminates the need for a series of encoding and decoding processes on the audio source data, avoiding loss of original audio data due to encoding and decoding. This achieves zero-compression lossless transmission of audio data, improving audio playback quality. Furthermore, since the electronic device does not need to perform a series of encoding and decoding processes on the original audio data, transmission latency is reduced, improving audio transmission capabilities.

[0145] In one embodiment, the original audio packet of the frame includes a header and a data portion, wherein the data portion includes original audio data; the target audio data packet includes a header of the original audio packet of the frame stored in a first data segment, a data portion of the original audio packet of the frame stored in a second data segment, and an instruction portion of the communication protocol stored in a third data segment.

[0146] In one embodiment, the instruction section of the communication protocol includes:

[0147] The vendor identifier of the communication protocol;

[0148] The encoder identifier of the communication protocol.

[0149] In one embodiment, the target audio data packet further includes a time series value, which is used to characterize the transmission order of the target audio data packet.

[0150] In one embodiment, the target audio data packet further includes a checksum used to verify the integrity of the target audio data packet.

[0151] In one embodiment, the audio data transmission device 600 further includes a configuration module. The configuration module is used to configure the target audio data packet such that the third data segment precedes the first and second data segments.

[0152] In this embodiment of the application, the electronic device can encode the original audio packets of the frame based on the data packet format specified by the communication protocol, obtain the target audio data packet, and transmit it to the audio output device. It does not require a series of encoding and decoding processes on the audio source data. The encode method is simple, does not depend on the encoding capability of the electronic device, reduces power consumption and resource consumption, and can reduce transmission latency. It realizes zero-compression lossless transmission of the original audio data and improves the audio playback effect.

[0153] like Figure 7 As shown, in one embodiment, an audio data transmission device 700 is provided, which is applied to the audio output device described above. The audio data transmission device 700 may include a receiving module 710 and an unpacking module 720.

[0154] The receiving module 710 is used to receive a target audio data packet via a wireless communication channel, wherein the target audio data packet includes a frame of original audio packets and an indication of the communication protocol.

[0155] The unpacking module 720 is used to unpack the target audio data packets.

[0156] In one embodiment, the unpacking module 720 is further configured to extract the communication protocol indication from the third data segment of the target audio data packet.

[0157] In one embodiment, the unpacking module 720 is further configured to extract the header of the original audio packet from the first data segment of the target audio data packet; and extract the data portion of the original audio packet from the second data segment of the target audio data packet.

[0158] In one embodiment, the target audio data packet further includes a time-series value. The audio data transmission apparatus 700 also includes an audio processing module, which is used to determine the transmission order corresponding to the target audio data packet based on the time-series value extracted from the target audio data packet; and to process the original frame audio packets extracted from the target audio data packet according to the transmission order corresponding to the target audio data packet, so as to play the processed audio data.

[0159] In one embodiment, the target audio data packet further includes a checksum. The audio data transmission device 700 also includes a verification module. The verification module is used to verify the integrity of the target audio data packet based on the checksum extracted from the target audio data packet; if the target audio data packet is detected to be incomplete, a retransmission request is sent to the electronic device, the retransmission request instructing the electronic device to retransmit the target audio data packet.

[0160] In one embodiment, the audio processing module is further configured to perform PCM decoding on the original audio packets of the frames extracted from the target audio data packet to obtain PCM decoded data; perform digital-to-analog conversion on the PCM decoded data to obtain first analog data; perform power amplification on the first analog data to obtain second analog data; and output the second analog data.

[0161] In this embodiment, the electronic device directly encodes the original audio packets to obtain target audio data packets conforming to the communication protocol and transmits them to the audio output device. This eliminates the need for a series of encoding and decoding processes on the audio source data, avoiding data loss due to encoding and decoding. This achieves zero-compression lossless transmission of audio data, improving playback quality. Furthermore, since the electronic device does not need to perform a series of encoding and decoding processes on the original audio data, transmission latency is reduced, improving audio transmission capabilities.

[0162] Figure 8This is a structural block diagram of an electronic device in one embodiment. For example... Figure 8 As shown, the electronic device 800 may include one or more of the following components: a processor 810 and a memory 820 coupled to the processor 810, wherein the memory 820 may store one or more computer programs, which may be configured to implement the audio data transmission method for the electronic device as described in the above embodiments when executed by one or more processors 810.

[0163] The processor 810 may include one or more processing cores. The processor 810 connects to various parts within the electronic device 800 using various interfaces and lines, and performs various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 820, and by calling data stored in the memory 820. Optionally, the processor 810 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 810 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 810 and may be implemented separately using a communication chip.

[0164] The memory 820 may include random access memory (RAM) or read-only memory (ROM). The memory 820 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 820 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described above. The data storage area may also store data created by the electronic device 800 during use.

[0165] Electronic device 800 may also include a Bluetooth module, which can be used to provide Bluetooth communication functionality, establish a Bluetooth connection with a second electronic device, and perform Bluetooth data transmission. The Bluetooth module may support one or more Bluetooth protocols (such as Classic Bluetooth, BLE, BLE Audio, etc.), but is not limited to these, and may change as the Bluetooth protocol evolves.

[0166] This application also provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor enables the processor to implement the audio data transmission method applied to an audio output device as described in the above embodiments.

[0167] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the audio data transmission method for electronic devices as described in the above embodiments.

[0168] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the audio data transmission method applied to an audio output device as described in the above embodiments.

[0169] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the audio data transmission method for electronic devices as described in the above embodiments.

[0170] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the audio data transmission method applied to an audio output device as described in the above embodiments.

[0171] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, ROM, etc.

[0172] Any references to memory, storage, databases, or other media used herein may include non-volatile and / or volatile memory. Suitable non-volatile memory may include ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache. By way of illustration and not limitation, RAM may take many forms, such as Static RAM (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus DRAM (RDRAM), and Direct Rambus DRAM (DRDRAM).

[0173] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application. It should be noted that "multiple" in this application includes "two or more".

[0174] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0175] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0176] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0178] The foregoing has provided a detailed description of an audio data transmission method, apparatus, chip, electronic device, and storage medium disclosed in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An audio data transmission method, characterized in that, Applied to electronic devices, the method includes: The original audio packet of the frame is encapsulated into a target audio data packet; the original audio packet of the frame includes a header and a data portion, the data portion including the original audio data using a lossless encoding format; the target audio data packet includes the header of the original audio packet of the frame stored in a first data segment, the data portion of the original audio packet of the frame stored in a second data segment, and an indication portion of the communication protocol stored in a third data segment; The target audio data packet is sent to the audio output device via a Bluetooth communication channel; The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

2. The method according to claim 1, characterized in that, The lossless encoding format includes any one of FLAC, APE, and ALAC formats.

3. The method according to claim 1, characterized in that, The instruction section of the communication protocol includes: The vendor identifier of the communication protocol; The encoder identifier of the communication protocol.

4. The method according to claim 1, characterized in that, The target audio data packet also includes a time series value, which is used to characterize the transmission order of the target audio data packet.

5. The method according to claim 1, characterized in that, The target audio data packet also includes a checksum, which is used to verify the integrity of the target audio data packet.

6. The method according to claim 1, characterized in that, The method further includes: configuring the target audio data packet as follows: This places the third data segment before the first and second data segments.

7. The method according to any one of claims 1 to 6, characterized in that, The Bluetooth communication channels include broadcast channels and / or data channels.

8. A chip, characterized in that, Includes processor and communication module, The processor is configured to: encapsulate a frame raw audio packet into a target audio data packet; the frame raw audio packet includes a header and a data portion, the data portion including raw audio data using a lossless encoding format; the target audio data packet includes a header of the frame raw audio packet stored in a first data segment, a data portion of the frame raw audio packet stored in a second data segment, and an indication portion of the communication protocol stored in a third data segment; The communication module is configured to send the target audio data packet to the audio output device via a Bluetooth communication channel; The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

9. An audio data transmission method, characterized in that, Applied to an audio output device, the method includes: The target audio data packet is received via a Bluetooth communication channel; the target audio data packet includes a header of the original audio packet of the frame stored in a first data segment, a data portion of the original audio packet of the frame stored in a second data segment, and an indication portion of the communication protocol stored in a third data segment; the data portion includes original audio data using a lossless encoding format; Unpack the target audio data packet; The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

10. The method according to claim 9, characterized in that, The unpacking of the target audio data packet includes: The instruction portion of the communication protocol is extracted from the third data segment of the target audio data packet.

11. The method according to claim 10, characterized in that, The unpacking of the target audio data packet also includes: Extract the header of the original audio packet of the frame from the first data segment of the target audio data packet; Extract the data portion of the original audio packet of the frame from the second data segment of the target audio data packet.

12. The method according to claim 10, characterized in that, The target audio data packet also includes time-series values; The method further includes: The transmission order of the target audio data packet is determined based on the time series value extracted from the target audio data packet; According to the sending order corresponding to the target audio data packet, the original audio packets of the frames extracted from the target audio data packet are processed to play the processed audio data.

13. The method according to claim 10, characterized in that, The target audio data packet also includes a checksum, and the method further includes: The integrity of the target audio data packet is verified based on the checksum extracted from the target audio data packet.

14. The method according to claim 9, characterized in that, The method further includes: The original audio packet of the frame extracted from the target audio data packet is PCM decoded to obtain PCM decoded data; The PCM decoded data is converted from digital to analog to obtain the first analog data; The first simulation data is amplified to obtain the second simulation data.

15. The method according to any one of claims 9 to 14, characterized in that, The Bluetooth communication channels include broadcast channels and / or data channels.

16. A chip, characterized in that, Includes processor and communication module, The communication module is configured to receive target audio data packets via a Bluetooth communication channel; the target audio data packets include a header of the original audio packet of the frame stored in a first data segment, a data portion of the original audio packet of the frame stored in a second data segment, and an indication portion of the communication protocol stored in a third data segment; the data portion includes original audio data using a lossless encoding format; The processor is configured to: unpack the target audio data packet; The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

17. An audio data transmission device, characterized in that, Applied to electronic devices, the device includes: A packetization module is used to encapsulate raw audio packets into target audio data packets; the raw audio packets include a header and a data portion, the data portion including raw audio data using a lossless encoding format; the target audio data packet includes a header of the raw audio packets stored in a first data segment, a data portion of the raw audio packets stored in a second data segment, and an instruction portion of the communication protocol stored in a third data segment; The sending module is used to send the target audio data packet to the audio output device via a Bluetooth communication channel; The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

18. An audio data transmission device, characterized in that, Applied to an audio output device, the device includes: A receiving module is configured to receive a target audio data packet via a Bluetooth communication channel; the target audio data packet includes a header of the original audio packet of the frame stored in a first data segment, a data portion of the original audio packet of the frame stored in a second data segment, and an indication portion of the communication protocol stored in a third data segment; the data portion includes original audio data using a lossless encoding format; The unpacking module is used to unpack the target audio data packet; The communication protocol instruction section is used to indicate that the data format of the target audio data packet conforms to the communication protocol.

19. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the method as described in any one of claims 1 to 7 or 9 to 15.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7 or 9 to 15.

Citation Information

Patent Citations

  • Audio data sending and receiving method and device

    CN112887305A