CN114765761A - Audio data transmission method, electronic device and storage medium - Google Patents

Audio data transmission method, electronic device and storage medium Download PDF

Info

Publication number
CN114765761A
CN114765761A CN202110056494.5A CN202110056494A CN114765761A CN 114765761 A CN114765761 A CN 114765761A CN 202110056494 A CN202110056494 A CN 202110056494A CN 114765761 A CN114765761 A CN 114765761A
Authority
CN
China
Prior art keywords
audio data
bluetooth
protocol
data packet
controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110056494.5A
Other languages
Chinese (zh)
Inventor
任凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110056494.5A priority Critical patent/CN114765761A/en
Priority to PCT/CN2021/124426 priority patent/WO2022151778A1/en
Publication of CN114765761A publication Critical patent/CN114765761A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/167Audio streaming, i.e. formatting and decoding of an encoded audio signal representation into a data stream for transmission or storage purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/40Near-field transmission systems, e.g. inductive or capacitive transmission systems characterised by components specially adapted for near-field transmission
    • H04B5/48Transceivers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a transmission method of audio data, electronic equipment and a storage medium, wherein the transmission method is applied to the electronic equipment, the electronic equipment comprises a Bluetooth radio frequency module, a controller and a coder-decoder, the controller is respectively and directly connected with the Bluetooth radio frequency module and the coder-decoder, and the electronic equipment receives a first audio data packet based on a first Bluetooth protocol from first Bluetooth equipment through the Bluetooth radio frequency module; extracting, by a controller, initial audio data in a first audio data packet; converting the initial audio data into target audio data based on a second Bluetooth protocol through a coder-decoder; generating a second audio data packet carrying the target audio data by the controller; and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module.

Description

Audio data transmission method, electronic device and storage medium
Technical Field
The present invention relates to the field of bluetooth technologies, and in particular, to a method for transmitting audio data, an electronic device, and a storage medium.
Background
Bluetooth is a short-range wireless technology, also known as an incredible connection, supporting a variety of network topologies, including point-to-point, broadcast, and mesh networks. Bluetooth brings convenience for short-distance wireless connection and transmission among electronic devices, and stronger relevance is provided for devices such as mobile phones, tablets, notebook computers, cameras and other various digital products.
The Bluetooth module may be mainly divided into two types, namely, Classic Bluetooth (BT) and Bluetooth Low Energy (BLE), according to an application and a support protocol, and when audio data is transmitted between different types of single-mode Bluetooth devices, the audio data often needs to be forwarded through a dual-mode Bluetooth device. At present, the process of audio data transmission between different types of single-mode Bluetooth devices by the dual-mode Bluetooth device is complex and complicated, the problem of time delay often exists, and the transmission efficiency is low and the power consumption is large.
Disclosure of Invention
The embodiment of the application provides an audio data transmission method, electronic equipment and a storage medium, which can effectively simplify the data transmission flow, greatly improve the processing efficiency, and simultaneously, the host is not awakened in the audio data conversion process, so that the power consumption of the equipment can be reduced.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a method for transmitting audio data for an electronic device, where the electronic device includes a bluetooth radio frequency module, a controller, and a codec, and the controller is directly connected to the bluetooth radio frequency module and the codec, respectively, and the method includes:
receiving a first audio data packet based on a first Bluetooth protocol from a first Bluetooth device through the Bluetooth radio frequency module;
extracting, by the controller, initial audio data in the first audio data packet;
converting, by the codec, the initial audio data into target audio data based on a second bluetooth protocol;
generating, by the controller, a second audio data packet carrying the target audio data; and
and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module.
In a second aspect, an embodiment of the present application provides an electronic device, which includes a bluetooth radio frequency module, a controller, and a codec,
the Bluetooth radio frequency module is used for receiving a first audio data packet based on a first Bluetooth protocol from a first Bluetooth device;
the controller is directly connected with the Bluetooth radio frequency module and the coder and decoder respectively and is used for extracting initial audio data in the first audio data packet;
the coder and the decoder are used for converting the initial audio data into target audio data based on a second Bluetooth protocol;
the controller is further configured to generate a second audio data packet carrying the target audio data;
the Bluetooth radio frequency module is further configured to send the second audio data packet to the second Bluetooth device.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a bluetooth radio frequency module, a controller, and a codec, where the controller is directly connected to the bluetooth radio frequency module and the codec, respectively, and the electronic device further includes a processor and a memory storing executable instructions of the processor, where the instructions are executed by the processor, and implement the audio data transmission method as described above.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program is stored, where the program, when executed by a processor, implements the transmission method of audio data as described above.
The embodiment of the application provides an audio data transmission method, electronic equipment and a storage medium, wherein the transmission method is applied to the electronic equipment, the electronic equipment comprises a Bluetooth radio frequency module, a controller and a coder-decoder, the controller is respectively and directly connected with the Bluetooth radio frequency module and the coder-decoder, and the electronic equipment receives a first audio data packet based on a first Bluetooth protocol from first Bluetooth equipment through the Bluetooth radio frequency module; extracting, by a controller, initial audio data in a first audio data packet; converting the initial audio data into target audio data based on a second Bluetooth protocol through a coder-decoder; generating a second audio data packet carrying the target audio data by the controller; and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module. Therefore, in the embodiment of the application, after a data packet sent by a single-mode Bluetooth device is received, a controller in the electronic device can extract initial audio data and package target audio data, meanwhile, data can be directly transmitted with a coder-decoder, and the converted data packet is sent to another single-mode Bluetooth device.
Drawings
FIG. 1 is a schematic diagram of transmitting audio data;
FIG. 2 is a first schematic diagram of a component structure of an electronic device;
fig. 3 is a first flowchart illustrating an implementation of a transmission method of audio data;
fig. 4 is a schematic diagram illustrating a second implementation flow of the audio data transmission method;
fig. 5 is a schematic flow chart illustrating a third implementation of the audio data transmission method;
FIG. 6 is a first frame diagram of an implementation of transmitting audio data;
FIG. 7 is a block diagram of a second implementation of transmitting audio data;
FIG. 8 is a schematic diagram of a second exemplary embodiment of an electronic device;
fig. 9 is a third schematic structural diagram of the electronic device.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are illustrative of the relevant application and are not limiting of the application. It should be noted that, for the convenience of description, only the parts related to the related applications are shown in the drawings.
Bluetooth is a short-range wireless technology, also known as an incredible connection, supporting a variety of network topologies, including point-to-point, broadcast, and mesh networks. The convenience of short-distance wireless connection and transmission among electronic equipment is brought, the Bluetooth connection device has a huge use range of nearly 40 hundred million pieces of equipment, and stronger relevance is provided for the equipment such as mobile phones, tablets, notebook computers, cameras and other various digital products.
Bluetooth wireless technology is currently divided into two technology types, Basic Rate (BR)/Enhanced Data Rate (EDR) (also referred to as classic bluetooth) and Low power consumption (LE), wherein BR/EDR type is used for audio and streaming media applications, creating one-to-one device communication in a point-to-point network topology; the LE type is mostly used for sensor devices operating on batteries, and uses various network topologies such as point-to-point (one-to-one), broadcast (one-to-many), and mesh (many-to-many).
Existing bluetooth technologies, especially the classic bluetooth technology, mainly transmit Audio data through the bluetooth Audio transmission protocol (A2 DP protocol). For example, in a mobile phone, an Encoder (Encoder) in an Audio Codec (Audio Encoder and Decoder, Audio Codec) converts Pulse Code Modulation (PCM) encoded Audio data into a target format, a Host (Host) frames the encoded data according to an A2DP protocol, and then sends the framed A2DP protocol data frame to a Controller (Controller) through a Host Controller Interface (HCI) Interface, and the Controller sends the data to an opposite device, which is usually a bluetooth headset.
The single-mode Bluetooth module is a Bluetooth module only supporting classic Bluetooth (EDR/BDR) or only supporting Bluetooth Low Energy (BLE), and the dual-mode Bluetooth module is a module supporting both classic Bluetooth (EDR/BDR) and Bluetooth Low Energy (BLE).
Because classic bluetooth and bluetooth low energy all have very big difference in the aspect of connected mode, data communication etc, consequently can't directly carry out the transmission of data between single mode bluetooth low energy equipment and the single mode classic bluetooth equipment, if single mode bluetooth low energy equipment and single mode classic bluetooth equipment need transmit audio data, can only carry out the conversion of audio data with the help of bimodulus bluetooth equipment, this is because bimodulus bluetooth equipment both supported classic bluetooth, supported bluetooth low energy again, consequently can communicate with single mode bluetooth low energy equipment, single mode classic bluetooth equipment respectively.
For example, fig. 1 is a schematic diagram of transmitting Audio data, and as shown in fig. 1, if a single-mode bluetooth device supporting low power consumption is used as an Audio Source device (Audio Source), a classic single-mode bluetooth device is used as a target device (Audio Sink). Audio Source (Audio Source) devices supporting low power single mode bluetooth can only transmit Audio data over a low power bluetooth link, such as an ACL link or a bluetooth low energy (Isochronous Channel, ISOL) link. After a Bluetooth radio frequency module in a Bluetooth Dual Mode Device receives an Audio data packet of a low power consumption Bluetooth single Mode Audio Source Device, the data packet needs to be sent to a Bluetooth Controller for Link Layer (Link Layer) analysis. After the analysis is finished, the Controller sends the data packet into the Host of the Bluetooth through the HCI interface, and after the Host side of the Bluetooth unpacks the relevant protocol, the coded Audio data is transmitted to the Audio Codec module of the coder and decoder for decoding (Decode).
And after the Audio Codec finishes decoding, obtaining a decoded PCM data packet, and then coding (Encode) the PCM data packet again according to Codec configuration of the classic Bluetooth Audio Sink device and sending the PCM data packet to the Bluetooth Host. After the data packet encapsulation of an A2DP Protocol and a Logical Link Control and Adaptation Protocol (L2 CAP Protocol) is performed on the Bluetooth Host side, the Bluetooth Host transmits the data packet to a Bluetooth Controller through an HCI interface. And the Bluetooth Controller sends the related data packet to a Bluetooth radio frequency module responsible for transmission and reception, so that the Audio data is sent to the Audio Sink.
Therefore, when audio data are transmitted between the single-mode Bluetooth devices of different types, a more complex audio data conversion process is required, and the processing time is long. Meanwhile, when the audio data is converted, the host needs to be awakened, so that the power consumption of the equipment is increased.
In order to solve the above problem, in the embodiment of the present application, after receiving a data packet sent by a single-mode bluetooth device, a controller in an electronic device can complete extraction of initial audio data and encapsulation of target audio data, and meanwhile, can directly perform data transmission with a codec, and send the converted data packet to another single-mode bluetooth device, so that a data transmission flow can be effectively simplified, the processing efficiency is greatly improved, and meanwhile, a host is not woken up any more in the audio data conversion process, and the power consumption of the device can be reduced.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
An embodiment of the present application provides a method for transmitting audio data, where the method for transmitting audio data can be applied to an electronic device, where the electronic device is configured with a bluetooth radio frequency module, a controller, and a codec, and the controller is directly connected to the bluetooth radio frequency module and the codec, respectively.
It should be noted that, in the embodiment of the present application, the electronic device may be an electronic device supporting dual-mode bluetooth.
Fig. 2 is a schematic structural diagram of an electronic device, as shown in fig. 2, an electronic device 10 may include a bluetooth radio frequency module 11, a controller 12, a codec 13, and a host 14, where the controller 12 includes an parsing and packaging sub-module 121 for performing parsing and packaging, and specifically, the parsing and packaging sub-module 121 may support an A2DP protocol, an L2CAP protocol, an Isochronous Adaptation Layer (ISOAL) and other bluetooth audio transmission protocols, that is, the parsing and packaging sub-module 121 may perform parsing and packaging of audio data packets based on an A2DP protocol, an L2CAP protocol, an ISOAL and other bluetooth audio transmission protocols, respectively.
Further, in the embodiment of the present application, the controller 12 in the electronic device 10 may directly establish a connection with the bluetooth radio frequency module 11 and the codec 13, respectively, that is, the controller 12 may directly perform data receiving and transmitting with the bluetooth radio frequency module 11 and the codec 13, respectively.
Fig. 3 is a schematic flow chart of an implementation of a method for transmitting audio data, as shown in fig. 3, in an embodiment of the present application, the method for transmitting audio data by an electronic device may include the following steps:
step 101, receiving a first audio data packet based on a first bluetooth protocol from a first bluetooth device through a bluetooth radio frequency module.
Step 102, extracting initial audio data in the first audio data packet through the controller.
In an embodiment of the application, the electronic device may receive, through a configured bluetooth radio frequency module, a first audio data packet sent by a first bluetooth device, where the bluetooth radio frequency module may receive, based on a first bluetooth protocol, the first audio data packet sent by the first bluetooth device.
Further, in this application, the bluetooth radio frequency module in the electronic device may continue to extract the initial audio data in the first audio data packet through the configured controller after receiving the first audio data packet based on the first bluetooth protocol from the first bluetooth device.
It should be noted that, in the embodiment of the present application, the electronic device may be any dual-mode bluetooth device, that is, the electronic device may support both low-power bluetooth and classic bluetooth.
For example, in the embodiment of the present application, the electronic device may perform the encoding and decoding processing according to a configuration supported by bluetooth with low power consumption, and may also perform the encoding and decoding processing according to a configuration supported by classical bluetooth, including but not limited to: tablet computers, mobile phones, electronic readers, Personal Computers (PCs), notebook computers, in-vehicle devices, wearable devices, and the like.
It should be noted that, in the embodiment of the present application, the first bluetooth device may be any device that supports only bluetooth low energy or classic bluetooth. For example, the first bluetooth device is a bluetooth headset supporting only bluetooth low energy, or the first bluetooth device is a bluetooth headset supporting only classical bluetooth.
Accordingly, in an embodiment of the present application, the first bluetooth protocol is a bluetooth protocol supported by the first bluetooth device, and specifically, if the first bluetooth device is a classic bluetooth device, the first bluetooth protocol is a classic bluetooth protocol, and if the first bluetooth device is a bluetooth low energy device, the first bluetooth protocol is a bluetooth low energy protocol. Illustratively, the first bluetooth protocol may be an A2DP protocol or an L2CAP protocol.
For example, in the present application, the bluetooth Radio module may be a bluetooth Radio module, and is mainly responsible for transmitting and receiving data and voice. The bluetooth radio frequency specification specifies parameters such as a bluetooth radio frequency band, a modulation mode, a frequency modulation frequency, transmission power, reception sensitivity, and the like.
For example, in the present application, the Controller is a bluetooth Controller, where for a dual-mode bluetooth device, the bluetooth Controller may include a Radio Frequency (RF) Layer, a baseband Layer (baseband), a Link Management Protocol (LMP) Layer, a Physical Layer (PHY), a Link Layer (Link Layer), and the like.
It should be noted that, in the embodiment of the present application, since the device in the controller has the parsing and encapsulating sub-module supporting the A2DP protocol, the L2CAP protocol, the isaal and other bluetooth audio transmission protocols, the controller may perform the parsing process of the audio data based on different protocols in addition to the link layer parsing process.
It can be understood that, in the embodiment of the present application, after receiving a first audio data packet sent by a first bluetooth device, a bluetooth radio frequency module of an electronic device may send the first audio data packet to a controller, then the controller performs link layer analysis on the first audio data packet to obtain an analyzed data packet, then an analysis encapsulation sub-module configured by the controller is used to perform disassembly processing on the analyzed data packet, and finally, initial audio data in the first audio data packet may be obtained.
Specifically, the format of the initial audio data is a data format supported by the first bluetooth device.
Fig. 4 is a schematic view illustrating an implementation flow of a transmission method of audio data, as shown in fig. 4, in an embodiment of the present application, before the electronic device receives a first audio data packet based on a first bluetooth protocol from a first bluetooth device through the bluetooth radio frequency module, that is, before step 101, the method for the electronic device to transmit audio data may further include the following steps:
and 106, establishing communication connection with the first Bluetooth device.
In an embodiment of the application, the electronic device may first establish a communication connection with the first bluetooth device, so that the first audio data packet sent by the first bluetooth device may be received based on the first bluetooth protocol.
It should be noted that, in the embodiment of the present application, the first bluetooth device is of a different class, and the electronic device receives the first audio data packet using a different type of physical link. For example, if the first bluetooth device is a bluetooth low energy device, the first bluetooth device may perform transmission of the first audio data packet through a physical link of which the type is bluetooth low energy, for example, if the first bluetooth device is a bluetooth low energy single mode device, the electronic device may receive the first audio data packet sent by the first bluetooth device through an ISOL link; if the first Bluetooth device is a classic Bluetooth single mode device, the electronic device may receive a first audio packet sent by the first Bluetooth device over the ACL link.
Accordingly, in the embodiment of the present application, the electronic device may further establish a communication connection with the second bluetooth device, so that the audio data packet may be sent to the second bluetooth device based on the second bluetooth protocol.
It should be noted that, in the embodiment of the present application, the second bluetooth device has a different category, and the electronic device sends the second audio data packet to the second bluetooth device with a different type of physical link. For example, if the second bluetooth device is a bluetooth low energy device, the electronic device may transmit the second audio data packet to the second bluetooth device through the physical link of which the type is bluetooth low energy, for example, if the second bluetooth device is a bluetooth low energy single mode device, the electronic device may transmit the second audio data packet to the second bluetooth device through the ISOL link; and if the second Bluetooth device is a classic Bluetooth single mode device, the electronic device can send a second audio data packet to the second Bluetooth device through the ACL link.
Therefore, in the application, the parsing and packaging sub-module configured by the controller can realize the parsing and packaging of the data packet, so that the initial audio data can be directly extracted from the first audio data packet through the controller, and the host does not need to be awakened to perform the parsing and packaging of the data, thereby simplifying the processing flow and saving the power consumption.
And 103, converting the initial audio data into target audio data based on a second Bluetooth protocol through a coder-decoder.
In an embodiment of the application, after the electronic device extracts the initial audio data in the first audio data packet through the controller, the initial audio data may be converted into target audio data based on the second bluetooth protocol through the codec.
Further, in the embodiment of the application, after the parsing and encapsulating sub-module configured by the controller in the electronic device extracts the initial audio data in the first audio data packet, the controller may send the initial audio data to the codec, so that the codec may perform encoding and decoding processing on the initial audio data, thereby completing conversion of a data format, and obtaining target audio data based on the second bluetooth protocol.
Specifically, the format of the target audio data is a data format supported by the second bluetooth device, so that the electronic device may send a data packet carrying the target audio data to the second bluetooth device after completing the conversion from the initial audio data to the target audio data.
It is to be understood that, in the embodiment of the present application, the format of the initial audio data is different from the format of the target audio data, that is, the data formats supported by the first bluetooth device and the second bluetooth device are different, and accordingly, the compiling configuration parameters supported by the first bluetooth device and the second bluetooth device are different.
Further, in an embodiment of the present application, when the electronic device converts the initial audio data into target audio data based on a second bluetooth protocol through the codec, the electronic device may perform decoding processing on the initial audio data through the codec based on the coding configuration parameter corresponding to the first bluetooth device to obtain decoded data; and then based on the compiling configuration parameters corresponding to the second Bluetooth device, the decoded data is coded by the coder and the decoder to obtain the target audio data.
It is to be understood that in embodiments of the present application, the decoded data may be in the PCM raw audio data format.
Therefore, in the application, as the parsing and packaging sub-module configured by the controller can realize the disassembly processing of the data packet, the initial audio data can be directly extracted from the first audio data packet through the controller, and meanwhile, the codec connected with the controller can directly obtain the initial audio data after the disassembly processing from the controller, rather than obtaining the data after the disassembly processing from the host.
It should be noted that, in the embodiment of the present application, the second bluetooth device is a single-mode bluetooth device different from the first bluetooth device. Specifically, the second bluetooth device may be any device that supports only bluetooth low energy or classic bluetooth. For example, the second bluetooth device is a bluetooth headset supporting only bluetooth low energy, or the second bluetooth device is a bluetooth sound supporting only classical bluetooth.
For example, in the present application, if the first bluetooth device is a bluetooth low energy device, the second bluetooth device may be a classic bluetooth device; accordingly, if the first bluetooth device is a classic bluetooth device, the second bluetooth device may be a bluetooth low energy device. That is to say, the electronic device in the embodiment of the present application is configured to forward audio data between the first bluetooth device and the second bluetooth device.
It is understood that in the embodiments of the present application, the second bluetooth protocol is a bluetooth protocol supported by the second bluetooth device, and specifically, if the second bluetooth device is a classic bluetooth device, the second bluetooth protocol is a classic bluetooth protocol, and if the second bluetooth device is a bluetooth low energy device, the second bluetooth protocol is a bluetooth low energy protocol. Illustratively, the second bluetooth protocol may be an A2DP protocol or an L2CAP protocol.
That is, since the first bluetooth device and the second bluetooth device are devices supporting different bluetooth protocols, the first bluetooth protocol is different from the second bluetooth protocol.
It should be noted that, in the present application, since the target audio data is transmitted to the second bluetooth device, the codec may complete the encoding process on the decoded data according to the bluetooth protocol supported by the second bluetooth device, so as to generate the target audio data.
And step 104, generating a second audio data packet carrying the target audio data through the controller.
In an embodiment of the application, after the electronic device converts the initial audio data into the target audio data based on the second bluetooth protocol through the codec, the electronic device may continue to generate, through the controller, a second audio data packet carrying the target audio data.
Further, in the embodiment of the present application, since the controller is configured with the parsing and packaging sub-module supporting the A2DP protocol, the L2CAP protocol, the isaal and other bluetooth audio transmission protocols, the target audio data obtained by the conversion processing performed by the codec may be directly sent to the controller for further packaging processing.
It can be understood that, in the embodiment of the present application, since the target audio data is transmitted to the second bluetooth device, the parsing and encapsulating sub-module may complete the encapsulation process on the target audio data according to the bluetooth protocol supported by the second bluetooth device, and generate the second audio data packet. That is, the first audio data packet may be generated according to a bluetooth protocol package supported by the first bluetooth device, and the second audio data packet may be generated according to a bluetooth protocol package supported by the second bluetooth device.
For example, in this embodiment of the application, if the second bluetooth device is a classic bluetooth device, the electronic device may perform, by parsing the encapsulation submodule, encapsulation processing on the target audio data in the packets of the A2DP protocol and the L2CAP protocol, and may finally generate the second audio data packet for transmission to the classic bluetooth device.
Specifically, the L2CAP protocol is located above the baseband, converts data packets of the baseband into a data packet format convenient for higher-layer applications, and provides functions such as protocol multiplexing and quality of service switching. The L2CAP protocol only supports ACL data transmission and does not support SCO data.
That is to say, in the application, when the electronic device generates the second audio data packet carrying the target audio data through the controller, the electronic device may directly use the parsing and encapsulating sub-module to encapsulate the target audio data, so as to obtain the second audio data packet.
And 105, sending the second audio data packet to a second Bluetooth device through the Bluetooth radio frequency module.
In the embodiment of the application, after the electronic device generates the second audio data packet carrying the target audio data through the controller, the electronic device may send the second audio data packet to the second bluetooth device through the bluetooth radio frequency module.
Further, in the embodiment of the present application, the controller in the electronic device may send the generated second audio data packet to the bluetooth radio frequency module, and then the bluetooth radio frequency module sends the second audio data packet to the second bluetooth device.
It can be understood that, in the present application, since the encapsulation processing of the second audio data packet is directly completed by the parsing encapsulation submodule in the controller, after the generation of the second audio data packet is completed, the controller can directly send the second audio data packet to the bluetooth radio frequency module, compared with the present common technical means, the encapsulation processing of the data packet does not need to be performed by the host, and after the encapsulation processing is completed, the controller does not need to send the data packet to the bluetooth radio frequency module after receiving the data packet sent by the host through the HCI interface, thereby simplifying the processing flow of data packet transmission, both improving the transmission efficiency and reducing the power consumption.
Further, in an embodiment of the present application, the electronic device may send the second audio data packet through a physical link corresponding to the second bluetooth device. Wherein the type of the corresponding physical link is different for different second bluetooth devices. That is, the second bluetooth device is of a different class, and the electronic device is of a different type of physical link for transmitting the second audio packet. Specifically, if the second bluetooth device is a classic bluetooth device, the second bluetooth device may perform transmission of the second audio data packet through a physical link of which the type is supporting classic bluetooth, for example, if the second bluetooth device is a bluetooth low energy single mode device, the electronic device may transmit the second audio data packet to the second bluetooth device through an ISOL link; and if the second Bluetooth device is a classic Bluetooth single mode device, the electronic device can send a second audio data packet to the second Bluetooth device through the ACL link.
That is, in the embodiment of the present application, since the first bluetooth device and the second bluetooth device are different single-mode bluetooth devices, physical links used by the electronic device when receiving the audio data packet and when transmitting the audio data packet are different. Specifically, if the first bluetooth device is a bluetooth low energy device and the second bluetooth device is a classic bluetooth device, the electronic device may receive the first audio data packet through a first physical link; the second audio data packet is then transmitted over a second physical link. If the first Bluetooth device is a classic Bluetooth device and the second Bluetooth device is a low-power Bluetooth device, the electronic device may receive the first audio data packet through a second physical link; the second audio data packet is then transmitted over the first physical link.
The first physical link is a link supporting data transmission of the low-power Bluetooth, and the second physical link is a link supporting data transmission of the classic Bluetooth.
It can be understood that, in the embodiment of the present application, when audio data is transmitted, the controller in the electronic device can complete parsing processing and encapsulation processing of an audio data packet through configuration of the parsing and encapsulation sub-module, so that data conversion processing may not be performed through the host any more, and further, when the initial audio data is extracted and the target audio data is generated, the electronic device may not wake up the host, thereby reducing power consumption.
That is to say, in the embodiment of the present application, since the controller is configured with the parsing and encapsulating sub-module that supports the A2DP protocol, the L2CAP protocol, the isaal, and other bluetooth audio transmission protocols, the electronic device can directly parse and encapsulate the audio data packet according to different bluetooth protocols, that is, the controller can complete conversion of different bluetooth protocols, and it is no longer necessary to unpack and encapsulate the audio data packet on the host side, and therefore, it is not necessary to wake up the host.
For example, in the present application, if the parsing and encapsulating submodule supports the A2DP protocol and the L2CAP protocol, and the electronic device receives the first audio data packet based on the A2DP protocol, when the electronic device extracts the initial audio data in the first audio data packet through the controller, the electronic device may first perform link layer parsing on the first audio data packet based on the A2DP protocol to obtain a parsed data packet; then, the parsing encapsulation sub-module may be used to perform parsing processing on the parsed data packet according to an A2DP protocol, so as to obtain the initial audio data.
Correspondingly, in this application, if the electronic device sends the second audio data packet based on the L2CAP protocol, after the controller extracts the initial audio data in the first audio data packet, the electronic device may use the parsing and encapsulating sub-module to encapsulate the target audio data according to the L2CAP protocol, so as to obtain the second audio data packet based on the L2CAP protocol, and further send the second audio data packet to the second bluetooth device according to the L2CAP protocol.
For example, in the application, if the parsing encapsulation sub-module supports an A2DP protocol and an L2CAP protocol, and the electronic device receives a first audio data packet based on the L2CAP protocol, when the electronic device extracts initial audio data in the first audio data packet through the controller, the electronic device may first perform link layer parsing on the first audio data packet based on the L2CAP protocol to obtain a parsed data packet; then, the analysis and encapsulation sub-module can be used to disassemble the analyzed data packet according to the L2CAP protocol, so as to obtain the initial audio data.
Accordingly, in this application, if the electronic device sends the second audio data packet based on the A2DP protocol, after the controller extracts the initial audio data in the first audio data packet, the electronic device may use the parsing encapsulation submodule to encapsulate the target audio data according to the A2DP protocol, so as to obtain the second audio data packet based on the A2DP protocol, and then send the second audio data packet to the second bluetooth device according to the A2DP protocol.
In summary, in the embodiment of the present application, through the audio data transmission method provided in steps 101 to 105, the electronic device may utilize the controller configured with the parsing and encapsulating sub-module, so as to directly disassemble and encapsulate the audio data packet, and the controller may be directly connected to the codec, so that the extracted initial audio data may be directly sent to the codec for decoding, and the target audio data after re-encoding may also be directly sent to the controller, thereby greatly simplifying the processing flow of audio data transmission, solving the problem of delay, and improving the processing efficiency.
The embodiment of the application provides a transmission method of audio data for electronic equipment, wherein the electronic equipment comprises a Bluetooth radio frequency module, a controller and a coder-decoder, the controller is directly connected with the Bluetooth radio frequency module and the coder-decoder respectively, and the electronic equipment receives a first audio data packet based on a first Bluetooth protocol from first Bluetooth equipment through the Bluetooth radio frequency module; extracting, by a controller, initial audio data in a first audio data packet; converting the initial audio data into target audio data based on a second Bluetooth protocol through a coder-decoder; generating a second audio data packet carrying the target audio data by the controller; and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module. Therefore, in the embodiment of the application, after a data packet sent by a single-mode Bluetooth device is received, a controller in the electronic device can extract initial audio data and package target audio data, meanwhile, data can be directly transmitted with a coder-decoder, and the converted data packet is sent to another single-mode Bluetooth device.
Based on the foregoing embodiment, in yet another embodiment of the present application, fig. 5 is a schematic view of an implementation flow of a transmission method of audio data, and as shown in fig. 5, the method for transmitting audio data by an electronic device may further include the following steps:
step 201, a bluetooth radio frequency module establishes communication connection with a first bluetooth device.
In an embodiment of the application, the electronic device may first establish a communication connection with the first bluetooth device, so that the electronic device may receive the first audio data packet sent by the first bluetooth device.
In step 202, is the bluetooth radio module receiving the first audio data packet? If so, go to step 203, otherwise go to step 201.
In the embodiment of the application, after the electronic device establishes a connection with the first bluetooth device, the electronic device may wait for the first audio data packet sent by the first bluetooth device, further process the first audio data packet if the electronic device receives the first audio data packet, and continue to wait for the first audio data packet sent by the first bluetooth device if the electronic device does not receive the second audio data packet. The bluetooth radio frequency module may receive a first audio data packet sent by a first bluetooth device based on a first bluetooth protocol.
It should be noted that, in the embodiment of the present application, the first bluetooth protocol is a bluetooth protocol supported by the first bluetooth device. Illustratively, the first bluetooth protocol may be an A2DP protocol or an L2CAP protocol.
Step 203, the controller analyzes the first audio data packet and extracts the initial audio data.
In the embodiment of the application, after receiving a first audio data packet sent by a first bluetooth device, a bluetooth radio frequency module of an electronic device may send the first audio data packet to a controller, and then the controller performs link layer analysis on the first audio data packet to obtain an analyzed data packet, and then an analysis encapsulation submodule configured by the controller is used to disassemble the analyzed data packet, so that initial audio data in the first audio data packet can be finally obtained.
It can be understood that, in the embodiment of the present application, since the controller is configured with the parsing and encapsulating sub-module supporting the A2DP protocol, the L2CAP protocol, the isaal protocol, and other bluetooth audio transmission protocols, that is, the parsing and encapsulating sub-module configured by the controller can implement the parsing and encapsulating process on the data packet, the initial audio data can be directly extracted from the first audio data packet through the controller, and it is no longer necessary to wake up the host to perform the parsing and encapsulating process on the data packet
Step 204, the codec decodes the initial audio data to generate decoded data.
Step 205, the codec encodes the decoded data to generate target audio data.
In an embodiment of the application, when the electronic device converts the initial audio data into target audio data based on a second bluetooth protocol through the codec, the electronic device may perform decoding processing on the initial audio data through the codec based on a compiling configuration parameter corresponding to the first bluetooth device to obtain decoded data; and then based on the compiling configuration parameters corresponding to the second Bluetooth device, the decoded data is coded by the coder and the decoder to obtain the target audio data.
It is to be understood that in the embodiments of the present application, the second bluetooth protocol is a bluetooth protocol supported by the second bluetooth device. The second bluetooth protocol may be, for example, an A2DP protocol or an L2CAP protocol.
Step 206, the controller encapsulates the target audio data to generate a second audio data packet.
In the embodiment of the application, since the controller is configured with the parsing and packaging sub-module supporting the A2DP protocol, the L2CAP protocol, the isaol and other bluetooth audio transmission protocols, the target audio data obtained by the conversion processing performed by the codec may be directly sent to the controller for further packaging processing.
Specifically, the electronic device may directly use the parsing and encapsulating sub-module to encapsulate the target audio data, so as to obtain the second audio data packet.
And step 207, the bluetooth radio frequency module sends a second audio data packet to the second bluetooth device.
It can be understood that the audio data transmission method provided by the present application can be applied to a scenario in which audio data transmission is performed between two different types of single-mode bluetooth devices, for example, a bluetooth low energy single-mode device sends an audio data packet to a classic bluetooth single-mode device, or a classic bluetooth single-mode device sends an audio data packet to a bluetooth low energy single-mode device. Specifically, because data communication cannot be directly performed between the bluetooth low energy single mode device and the classic bluetooth single mode device, the electronic device needs to support bluetooth low energy and classic bluetooth simultaneously as an execution device for audio data conversion, and in the application, the host configured in the electronic device does not participate in the transmission flow of the audio data any more, and the parsing and encapsulation processing of the data packet in the common scheme is directly completed by the bluetooth processor configured with the parsing encapsulation sub-module, which not only reduces power consumption, but also improves efficiency.
For example, in an embodiment of the present application, fig. 6 is a first implementation framework for transmitting Audio data, and as shown in fig. 6, an electronic device is configured with a bluetooth Radio frequency module (Radio), a Codec (Audio Codec), a Host (Host), and a Controller (Controller), wherein the Controller is configured with parsing encapsulation submodules supporting an A2DP protocol, an L2CAP protocol, an isaol, and other bluetooth Audio transmission protocols, and the Controller is directly connected to the Audio Codec.
When the bluetooth low energy single mode device is used as a sound source device and the classic bluetooth single mode device is used as a target device, Radio in the electronic device may first receive a data packet 1 sent by the bluetooth low energy single mode device through a physical link of the bluetooth low energy based on a protocol 1, where the data packet 1 is a format supported by the bluetooth low energy single mode device; after the Radio sends the data packet 1 to the Controller, the Controller may first perform link layer parsing on the data packet 1 to obtain a parsed data packet, and then disassemble the parsed data packet according to the protocol 1 by using a parsing encapsulation sub-module configured by the Controller, so as to finally obtain the audio data 1 in the data packet 1. The protocol 1 may be an L2CAP protocol.
Further, since the Controller is directly connected to the Audio Codec, the Controller can send the packet 1 obtained by parsing to the Audio Codec for decoding, and at the same time, can control the Audio Codec to re-encode the decoded data again in a classical bluetooth supported encoding manner, generate the Audio data 2, and send the Audio data 2 back to the Controller.
It should be noted that the compiling configuration parameters supported by the bluetooth low energy single mode device and the classic bluetooth single mode device are different, so that the Audio Codec may decode the Audio data 1 based on the compiling configuration parameters corresponding to the bluetooth low energy single mode device to obtain decoded data; and then based on the compiling configuration parameters corresponding to the classic Bluetooth single mode device, the decoded data is coded through Audio Codec to obtain the Audio data 2, and then the Audio data 2 is transmitted to a Controller.
Further, after obtaining the audio data 2, the Controller may perform the encapsulation processing according to the protocol 2 by using an analysis encapsulation sub-module supporting an A2DP protocol, an L2CAP protocol, isaal, and other bluetooth audio transmission protocols, that is, the Controller may complete the encapsulation processing of the audio data 2 according to the bluetooth protocol supported by the classical bluetooth single-mode device, generate the data packet 2, and send the data packet 2 to the Radio.
Finally, Radio in the electronic device can send the data packet 2 to the classic bluetooth single-mode device through a physical link of classic bluetooth based on the protocol 2, and finally transmission and forwarding of audio data are completed. Protocol 2 may be, among others, the A2DP protocol.
For example, in an embodiment of the present application, fig. 7 is a second implementation framework diagram for transmitting Audio data, and as shown in fig. 7, an electronic device is configured with a bluetooth Radio frequency module (Radio), a Codec (Audio Codec), a Host (Host), and a Controller (Controller), where the Controller is configured with parsing encapsulation submodules supporting an A2DP protocol, an L2CAP protocol, an isaol, and other bluetooth Audio transmission protocols, and the Controller is directly connected to the Audio Codec.
When the classic bluetooth single-mode device serves as a sound source device and the low-power-consumption bluetooth single-mode device serves as a target device, Radio in the electronic device may first receive a data packet 3 sent by the classic bluetooth single-mode device through a physical link of classic bluetooth based on a protocol 3, where the data packet 3 is a format supported by the classic bluetooth single-mode device; after the Radio sends the data packet 3 to the Controller, the Controller may first perform link layer parsing on the data packet 3 to obtain a parsed data packet, and then disassemble the parsed data packet according to the protocol 3 by using a parsing encapsulation sub-module configured by the Controller, so as to finally obtain the audio data 3 in the data packet 3. Protocol 3 may be, among other things, the A2DP protocol.
Further, since the Controller is directly connected to the Audio Codec, the Controller may send the data packet 3 obtained by parsing to the Audio Codec for decoding, and at the same time, may control the Audio Codec to re-encode the decoded data again in a low power consumption bluetooth-supported encoding manner, to generate the Audio data 4, and send the Audio data 4 back to the Controller.
It should be noted that, the compiling configuration parameters supported by the classic bluetooth single-mode device and the low-power bluetooth single-mode device are different, so that the Audio Codec may decode the Audio data 3 based on the compiling configuration parameters corresponding to the classic bluetooth single-mode device, and obtain decoded data; and then based on the compiling configuration parameters corresponding to the low-power-consumption Bluetooth single-mode device, coding the decoded data through Audio Codec to obtain the Audio data 4, and then transmitting the Audio data 4 to a Controller.
Further, after obtaining the audio data 4, the Controller may perform encapsulation processing according to the protocol 4 by using an analysis encapsulation sub-module supporting an A2DP protocol, an L2CAP protocol, isaal, and other bluetooth audio transmission protocols, wherein the Controller may complete encapsulation processing of the audio data 4 according to a bluetooth protocol supported by the low power consumption bluetooth single-mode device, generate the data packet 4, and send the data packet 4 to the Radio.
Finally, the Radio in the electronic device can send the data packet 4 to the bluetooth low energy single-mode device through the bluetooth low energy physical link based on the protocol 4, and finally, the transmission and forwarding of the audio data are completed. The protocol 4 may be an L2CAP protocol.
That is to say, in the embodiment of the present application, since the controller is configured with the parsing and encapsulating sub-module that supports the A2DP protocol, the L2CAP protocol, the isaal, and other bluetooth audio transmission protocols, the electronic device can directly parse and encapsulate the audio data packet according to different bluetooth protocols, that is, the controller can complete conversion of different bluetooth protocols, and it is no longer necessary to unpack and encapsulate the audio data packet on the host side, and therefore, it is not necessary to wake up the host.
Therefore, when the audio data transmission method provided by the application is from the Bluetooth low energy audio source device to the classic Bluetooth audio sink device or from the classic Bluetooth audio source device to the Bluetooth low energy audio sink device, compared with the traditional scheme, a Controller in the electronic device supporting the dual-mode Bluetooth is configured with analysis encapsulation sub-modules supporting an A2DP protocol, an L2CAP protocol, an ISOAL protocol and other Bluetooth audio transmission protocols, so that a Host end in the electronic device does not need to participate in the forwarding process of the audio data any more, the processing flow is greatly simplified, the power consumption of the electronic device can be reduced, and meanwhile, the delay of audio data forwarding can be optimized. That is to say, in this application, to the forwarding process of the Audio data frame between bluetooth low energy single mode device and the classic bluetooth single mode device, because the Controller in the electronic device can realize the disassembly and encapsulation of the data packet, the electronic device can directly connect Audio Codec and Controller, and then can realize the low-latency and low-power consumption dual benefit.
The embodiment of the application provides a transmission method of audio data for electronic equipment, wherein the electronic equipment comprises a Bluetooth radio frequency module, a controller and a coder-decoder, the controller is directly connected with the Bluetooth radio frequency module and the coder-decoder respectively, and the electronic equipment receives a first audio data packet based on a first Bluetooth protocol from first Bluetooth equipment through the Bluetooth radio frequency module; extracting, by a controller, initial audio data in a first audio data packet; converting the initial audio data into target audio data based on a second Bluetooth protocol through a coder-decoder; generating a second audio data packet carrying the target audio data by the controller; and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module. Therefore, in the embodiment of the application, after a data packet sent by a single-mode bluetooth device is received, a controller in the electronic device can complete extraction of initial audio data and encapsulation of target audio data, and meanwhile, data can be directly transmitted with a codec, and the converted data packet is sent to another single-mode bluetooth device, so that the transmission flow of data can be effectively simplified, the processing efficiency is greatly improved, meanwhile, the host is not waken up any more in the audio data conversion process, and the power consumption of the device can be reduced.
Based on the foregoing embodiment, in another embodiment of the present application, fig. 8 is a schematic diagram of a second constituent structure of an electronic device, and as shown in fig. 8, an electronic device 10 provided in the embodiment of the present application may include: extracting unit 15, converting unit 16, generating unit 17, transmitting unit 18, receiving unit 19, and connecting unit 110.
The receiving unit 19 is configured to receive a first audio data packet based on a first bluetooth protocol from a first bluetooth device through the bluetooth radio frequency module;
the extracting unit 15 is configured to extract, by the controller, initial audio data in the first audio data packet;
the conversion unit 16 is configured to convert the initial audio data into target audio data based on a second bluetooth protocol through the codec;
the generating unit 17 is configured to generate, by the controller, a second audio data packet carrying the target audio data;
the sending unit 18 is configured to send the second audio data packet to the second bluetooth device through the bluetooth radio frequency module.
Further, in an embodiment of the present application, the controller includes a parsing and packaging submodule, where the parsing and packaging submodule supports an A2DP protocol and an L2CAP protocol.
Further, in an embodiment of the present application, the extracting unit 15 is specifically configured to perform link layer parsing on the first audio data packet based on an A2DP protocol, so as to obtain a parsed data packet; and utilizing the analysis and encapsulation submodule to disassemble the analyzed data packet according to an A2DP protocol to obtain the initial audio data.
Further, in an embodiment of the present application, the generating unit 17 is specifically configured to perform encapsulation processing on the target audio data according to an L2CAP protocol by using the parsing and encapsulating sub-module, so as to obtain the second audio data packet based on the L2CAP protocol.
Further, in an embodiment of the present application, the extracting unit 15 is further specifically configured to perform link layer parsing on the first audio data packet based on an L2CAP protocol to obtain a parsed data packet; and utilizing the analysis encapsulation submodule to disassemble the analyzed data packet according to an L2CAP protocol to obtain the initial audio data.
Further, in an embodiment of the present application, the generating unit 17 is further specifically configured to perform, by using the parsing and encapsulating submodule, encapsulation processing on the target audio data according to an A2DP protocol, so as to obtain the second audio data packet based on an A2DP protocol.
Further, in an embodiment of the present application, the converting unit 16 is specifically configured to perform decoding processing on the initial audio data through the codec based on the coding configuration parameter corresponding to the first bluetooth device, so as to obtain decoded data; and based on the compiling configuration parameters corresponding to the second Bluetooth equipment, the decoded data is coded through the coder and the decoder to obtain the target audio data.
Further, in an embodiment of the present application, the electronic device further includes a host, and the host is not woken up when the method for transmitting audio data is implemented.
Further, in an embodiment of the present application, the connection unit 110 is configured to establish a communication connection with a first bluetooth device before receiving a first audio data packet based on a first bluetooth protocol from the first bluetooth device through the bluetooth radio frequency module.
Further, in the embodiment of the present application, the connection unit 110 is further configured to establish a communication connection with the second bluetooth device.
It should be noted that, in the embodiment of the present application, based on the above fig. 2, the bluetooth radio frequency module 11 is configured to receive a first audio data packet based on a first bluetooth protocol from a first bluetooth device; the controller 12 is directly connected with the bluetooth radio frequency module and the codec, and is configured to extract initial audio data in the first audio data packet; the codec 13 is configured to convert the initial audio data into target audio data based on a second bluetooth protocol; the controller 12 is further configured to generate a second audio data packet carrying the target audio data; the bluetooth radio frequency module 11 is further configured to send the second audio data packet to the second bluetooth device.
Fig. 9 is a schematic structural diagram of a third electronic device, and as shown in fig. 9, the electronic device 10 according to the embodiment of the present disclosure may include a processor 111, a memory 112 storing instructions executable by the processor 111, and further, the terminal 20 may further include a communication interface 113, and a bus 114 for connecting the processor 111, the memory 112, and the communication interface 113.
In an embodiment of the present Application, the processor 111 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a ProgRAMmable Logic Device (PLD), a Field ProgRAMmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular. The electronic device 10 may further comprise a memory 112, which memory 112 may be connected to the processor 111, wherein the memory 112 is configured to store executable program code comprising computer operating instructions, and the memory 112 may comprise a high speed RAM memory and may further comprise a non-volatile memory, such as at least two disk memories.
In the embodiment of the present application, the bus 114 is used to connect the communication interface 113, the processor 111, and the memory 112 and the intercommunication among these devices.
In an embodiment of the present application, the memory 112 is used for storing instructions and data.
Further, in an embodiment of the present application, the processor 111 is configured to receive a first audio data packet based on a first bluetooth protocol from a first bluetooth device through the bluetooth radio frequency module; extracting, by the controller, initial audio data in the first audio data packet; converting, by the codec, the initial audio data into target audio data based on a second bluetooth protocol; generating, by the controller, a second audio data packet carrying the target audio data; and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module.
In practical applications, the Memory 112 may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor 111.
In addition, each functional module in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solutions of the present embodiment substantially or partially contribute to the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the application provides electronic equipment, which comprises a Bluetooth radio frequency module, a controller and a coder-decoder, wherein the controller is directly connected with the Bluetooth radio frequency module and the coder-decoder respectively; extracting, by a controller, initial audio data in a first audio data packet; converting the initial audio data into target audio data based on a second Bluetooth protocol through a coder-decoder; generating a second audio data packet carrying the target audio data by the controller; and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module. Therefore, in the embodiment of the application, after a data packet sent by a single-mode bluetooth device is received, a controller in the electronic device can complete extraction of initial audio data and encapsulation of target audio data, and meanwhile, data can be directly transmitted with a codec, and the converted data packet is sent to another single-mode bluetooth device, so that the transmission flow of data can be effectively simplified, the processing efficiency is greatly improved, meanwhile, the host is not waken up any more in the audio data conversion process, and the power consumption of the device can be reduced.
An embodiment of the present application provides a computer-readable storage medium on which a program is stored, which when executed by a processor implements the transmission method of audio data as described above.
Specifically, the program instructions corresponding to a transmission method of audio data in the present embodiment may be stored on a storage medium such as an optical disc, a hard disc, or a usb flash drive, and when the program instructions corresponding to a transmission method of audio data in the storage medium are read or executed by an electronic device, the method includes the steps of:
receiving a first audio data packet based on a first Bluetooth protocol from a first Bluetooth device through the Bluetooth radio frequency module;
extracting, by the controller, initial audio data in the first audio data packet;
converting, by the codec, the initial audio data into target audio data based on a second bluetooth protocol;
generating, by the controller, a second audio data packet carrying the target audio data; and
and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of implementations of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks in the flowchart and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (13)

1. A transmission method of audio data for an electronic device, wherein the electronic device includes a bluetooth radio frequency module, a controller, and a codec, the controller being directly connected with the bluetooth radio frequency module and the codec, respectively, the method comprising:
receiving a first audio data packet based on a first Bluetooth protocol from a first Bluetooth device through the Bluetooth radio frequency module;
extracting, by the controller, initial audio data in the first audio data packet;
converting, by the codec, the initial audio data into target audio data based on a second bluetooth protocol;
generating, by the controller, a second audio data packet carrying the target audio data; and
and sending the second audio data packet to the second Bluetooth device through the Bluetooth radio frequency module.
2. The method of claim 1, wherein the controller comprises a parsing encapsulation submodule, and wherein the parsing encapsulation submodule supports an A2DP protocol and an L2CAP protocol.
3. The method of claim 2, wherein when the first bluetooth protocol is a classic bluetooth protocol and the second bluetooth protocol is a bluetooth low energy protocol, the extracting, by the controller, initial audio data in the first audio packet comprises:
performing link layer analysis processing on the first audio data packet based on the A2DP protocol to obtain an analyzed data packet;
and utilizing the analysis and encapsulation submodule to carry out disassembly processing on the analyzed data packet according to an A2DP protocol to obtain the initial audio data.
4. The method of claim 3, wherein generating, by the controller, a second audio data packet carrying the target audio data comprises:
and utilizing the analysis encapsulation submodule to encapsulate the target audio data according to an L2CAP protocol to obtain the second audio data packet based on the L2CAP protocol.
5. The method of claim 2, wherein when the first bluetooth protocol is a bluetooth low energy protocol and the second bluetooth protocol is a classic bluetooth protocol, the extracting, by the controller, the initial audio data in the first audio packet comprises:
performing link layer analysis processing on the first audio data packet based on the L2CAP protocol to obtain an analyzed data packet;
and utilizing the analysis encapsulation submodule to disassemble the analyzed data packet according to an L2CAP protocol to obtain the initial audio data.
6. The method of claim 5, wherein generating, by the controller, a second audio data packet carrying the target audio data comprises:
and utilizing the analysis encapsulation submodule to encapsulate the target audio data according to an A2DP protocol to obtain the second audio data packet based on the A2DP protocol.
7. The method of claim 1, wherein the converting, by the codec, the initial audio data into target audio data based on a second bluetooth protocol comprises:
decoding the initial audio data through the codec based on the compiling configuration parameters corresponding to the first Bluetooth device to obtain decoded data; and
and based on the compiling configuration parameters corresponding to the second Bluetooth equipment, the decoded data is coded through the coder and the decoder to obtain the target audio data.
8. The method of claim 1, wherein the electronic device further comprises a host, the method further comprising:
not waking up the host when implementing the method according to any one of claims 1 to 7.
9. The method of claim 1, wherein prior to receiving the first audio packet based on the first bluetooth protocol from the first bluetooth device via the bluetooth radio frequency module, the method further comprises:
and establishing communication connection with the first Bluetooth device.
10. The method of claim 1, further comprising:
and establishing communication connection with the second Bluetooth device.
11. An electronic device, comprising a Bluetooth radio frequency module, a controller and a codec,
the Bluetooth radio frequency module is used for receiving a first audio data packet based on a first Bluetooth protocol from a first Bluetooth device;
the controller is directly connected with the Bluetooth radio frequency module and the coder and decoder respectively and is used for extracting initial audio data in the first audio data packet;
the coder and the decoder are used for converting the initial audio data into target audio data based on a second Bluetooth protocol;
the controller is further configured to generate a second audio data packet carrying the target audio data;
the Bluetooth radio frequency module is further configured to send the second audio data packet to the second Bluetooth device.
12. An electronic device comprising a bluetooth radio frequency module, a controller and a codec, the controller being directly connected to the bluetooth radio frequency module and the codec, respectively, the electronic device further comprising a processor, a memory storing instructions executable by the processor, the instructions when executed by the processor implementing the method according to any one of claims 1-10.
13. A computer-readable storage medium, on which a program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202110056494.5A 2021-01-15 2021-01-15 Audio data transmission method, electronic device and storage medium Pending CN114765761A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110056494.5A CN114765761A (en) 2021-01-15 2021-01-15 Audio data transmission method, electronic device and storage medium
PCT/CN2021/124426 WO2022151778A1 (en) 2021-01-15 2021-10-18 Audio data transmission method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110056494.5A CN114765761A (en) 2021-01-15 2021-01-15 Audio data transmission method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114765761A true CN114765761A (en) 2022-07-19

Family

ID=82362989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110056494.5A Pending CN114765761A (en) 2021-01-15 2021-01-15 Audio data transmission method, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN114765761A (en)
WO (1) WO2022151778A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499040A (en) * 2022-09-09 2022-12-20 安克创新科技股份有限公司 Bluetooth adapter and connection method thereof
WO2024016758A1 (en) * 2022-07-20 2024-01-25 哲库科技(上海)有限公司 Audio data transmission method and apparatus, chip, electronic device, and storage medium
CN117833963A (en) * 2024-03-04 2024-04-05 慧翰微电子股份有限公司 Classical Bluetooth audio data transmission method, system and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925350A (en) * 2005-08-30 2007-03-07 美国博通公司 Method and system for processing data
US20130331032A1 (en) * 2012-06-10 2013-12-12 Apple Inc. Configuring a codec for communicating audio data using a bluetooth network connection
WO2016209329A1 (en) * 2015-06-26 2016-12-29 Intel Corporation Method of fine grained wake-up modes for wi-fi/bt utilizing wake-up receiver
US20170318069A1 (en) * 2014-12-04 2017-11-02 Sennheiser Electronic Gmbh & Co. Kg Method for Wirelessly Transmitting Audio Signals on the Basis of the Bluetooth Standard and Wireless Microphone Unit
WO2017214137A1 (en) * 2016-06-07 2017-12-14 Cassia Networks Inc. Methods, devices and systems for supporting wireless communication
CN110267247A (en) * 2019-06-25 2019-09-20 深圳市舟海科技有限公司 A kind of bluetooth BLE audio transmission music wearing terminal
CN111436046A (en) * 2020-01-14 2020-07-21 珠海市杰理科技股份有限公司 Bluetooth-based audio data providing method and device, charging equipment and system
WO2020155090A1 (en) * 2019-01-29 2020-08-06 深圳傲智天下信息科技有限公司 Audio bluetooth transmission method, bluetooth transceiver and computer readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108966197A (en) * 2018-08-20 2018-12-07 南昌黑鲨科技有限公司 Audio frequency transmission method, system, audio-frequence player device and computer readable storage medium based on bluetooth
CN113039826A (en) * 2018-11-14 2021-06-25 索诺瓦公司 Communication device using two wireless protocols
CN110177363B (en) * 2019-05-28 2022-04-26 百度在线网络技术(北京)有限公司 Bluetooth data transmission method and device, Bluetooth chip and storage medium
CN110234045A (en) * 2019-06-11 2019-09-13 同响科技股份有限公司 To be wirelessly connected the bluetooth headset of ears
CN110944312B (en) * 2019-11-14 2023-08-25 合肥星空物联信息科技有限公司 Method for carrying out dual-mode Bluetooth pairing by utilizing audio data and Bluetooth device
CN112272375A (en) * 2020-10-29 2021-01-26 博流智能科技(南京)有限公司 Bluetooth communication system and method and Bluetooth communication conversion device
CN112689222B (en) * 2020-12-14 2023-07-04 无锡中感微电子股份有限公司 Wireless audio conversion device and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925350A (en) * 2005-08-30 2007-03-07 美国博通公司 Method and system for processing data
US20130331032A1 (en) * 2012-06-10 2013-12-12 Apple Inc. Configuring a codec for communicating audio data using a bluetooth network connection
US20170318069A1 (en) * 2014-12-04 2017-11-02 Sennheiser Electronic Gmbh & Co. Kg Method for Wirelessly Transmitting Audio Signals on the Basis of the Bluetooth Standard and Wireless Microphone Unit
WO2016209329A1 (en) * 2015-06-26 2016-12-29 Intel Corporation Method of fine grained wake-up modes for wi-fi/bt utilizing wake-up receiver
WO2017214137A1 (en) * 2016-06-07 2017-12-14 Cassia Networks Inc. Methods, devices and systems for supporting wireless communication
WO2020155090A1 (en) * 2019-01-29 2020-08-06 深圳傲智天下信息科技有限公司 Audio bluetooth transmission method, bluetooth transceiver and computer readable storage medium
CN110267247A (en) * 2019-06-25 2019-09-20 深圳市舟海科技有限公司 A kind of bluetooth BLE audio transmission music wearing terminal
CN111436046A (en) * 2020-01-14 2020-07-21 珠海市杰理科技股份有限公司 Bluetooth-based audio data providing method and device, charging equipment and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024016758A1 (en) * 2022-07-20 2024-01-25 哲库科技(上海)有限公司 Audio data transmission method and apparatus, chip, electronic device, and storage medium
CN115499040A (en) * 2022-09-09 2022-12-20 安克创新科技股份有限公司 Bluetooth adapter and connection method thereof
CN115499040B (en) * 2022-09-09 2024-05-07 安克创新科技股份有限公司 Bluetooth adapter and connection method thereof
CN117833963A (en) * 2024-03-04 2024-04-05 慧翰微电子股份有限公司 Classical Bluetooth audio data transmission method, system and electronic equipment

Also Published As

Publication number Publication date
WO2022151778A1 (en) 2022-07-21

Similar Documents

Publication Publication Date Title
CN114765761A (en) Audio data transmission method, electronic device and storage medium
KR101543193B1 (en) Audio transfer using the bluetooth low energy standard
JP7137635B2 (en) Headphone wireless communication method, main headphone, slave headphone and headphone system
EP3629561A1 (en) Data transmission method and system, and bluetooth headphone
US8335577B2 (en) Method of generating advanced audio distribution profile (A2DP) source code and chipset using the same
KR102569374B1 (en) How to operate a Bluetooth device
CN1805324A (en) Method and system for controlling accessing device of individual lan
US20120059496A1 (en) Method and device for transmitting audio data over universal serial bus by a wireless data terminal
CN111313984B (en) Testing device and method for various audio codes of Bluetooth headset
WO2024016758A1 (en) Audio data transmission method and apparatus, chip, electronic device, and storage medium
CN103312425A (en) Wireless broadcasting system
WO2016078271A1 (en) Signal sending and receiving method, device and system
CN201323575Y (en) Bluetooth headset
CN104954078A (en) Sound wave communication based control and response method and sound wave communication based control and response device
WO2017140095A1 (en) Wireless communication method and device
WO2024001398A1 (en) Audio data transmission method and apparatus, and chip, electronic device and storage medium
CN103428175A (en) Real-time voice intercom system based on heterogeneous mobile IP networks
WO2024001447A1 (en) Audio processing method, chip, apparatus, device, and computer-readable storage medium
WO2013182079A1 (en) Short message transcoding method and device
CN113316129B (en) Method for acquiring coding and decoding capabilities in Bluetooth device and electronic device
CN201674493U (en) Wireless communication module
CN103220410B (en) Frequency modulation (FM) broadcasting sharing method on mobile intelligent devices utilizing Bluetooth
CN105188157A (en) Audio playing method and audio terminal
CN109461451B (en) Voice transmission method, device and system based on OPUS
KR101418880B1 (en) Wireless interphone system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination