CN117062034A - Bluetooth data transmission method, device, equipment and storage medium - Google Patents
- ️Tue Nov 14 2023
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
First, description is made of related nouns related to the present application:
first bluetooth chip: and a newly added Bluetooth chip on the terminal equipment is used for providing a Bluetooth high-speed transmission channel which cannot be achieved by the second Bluetooth chip of the original equipment, and the first Bluetooth chip supports a high-definition lossless Bluetooth audio coding format and synchronously performs audio data stream encoding and decoding with the Bluetooth audio equipment. The transmission capability of the first Bluetooth chip is larger than that of the second Bluetooth chip.
The second Bluetooth chip: the terminal equipment is provided with an integrated Chip (Soc) and can process related Bluetooth service, the Bluetooth function originally supported by the terminal equipment is supported, and the high-definition lossless coding format is not supported.
Audio data: refers to converting sound signals into digital form data for storage, transmission and processing in a digital device. It is a digitized representation of sound represented by sampling and quantization. The quality of audio data is typically related to the code rate (bit rate), which represents the number of data bits transmitted per unit time, i.e. the amount of data per second of the displayed image after compression.
Audio hardware abstraction layer (Audio Hardware Abstraction Layer, audio HAL): in the android system, the Audio HAL is used for processing Audio related protocols and Bluetooth protocol stacks to interactively send Audio data, and the Audio data comprises functions of Audio playing, recording, volume control and the like. It interacts with the underlying audio hardware driver and provides standard audio interfaces and functions to the upper layers.
Lossy coding format: an encoded format in which a portion of the information is lost during data compression. In this encoding format, the compressed data file size is relatively small, but some detail and quality may be lost compared to the original data. When decoding, the reconstructed data has a certain difference from the original data, but the misunderstanding of information expressed by the original data by people cannot be influenced. Common lossy coding formats are motion picture expert compression standard audio layer 3 (Moving Picture Experts Group Audio Layer III, MP 3), advanced audio coding (Advanced Audio Coding, AAC), etc.
Lossless coding format: an encoding format capable of realizing lossless compression of audio data, which is capable of not introducing any information loss in the process of transmitting the data. Unlike lossy coding, lossless coding can fully recover the original data, preserving the integrity and accuracy of the data. Common lossless coding formats are waveform audio file format (Waveform Audio File Format, WAV), lossless audio compression coding (Free Lossless Audio Codec), and the like.
Bluetooth low energy (Bluetooth Low Energy, BLE): the module supporting the Bluetooth protocol of 4.0 or above, also called as BLE module, has the biggest characteristic of reducing cost and power consumption, and can be applied to products with higher real-time requirements but lower data rate.
Advanced audio distribution protocol (Advanced Audio Distribution Profile, A2 DP): is a configuration file in bluetooth technology for supporting transmission and distribution of high quality audio. A2DP allows bluetooth devices (e.g. cell phones, music players) to transmit audio content over a bluetooth connection to A2DP enabled audio device (e.g. bluetooth headset, sound box) for playback.
Fig. 1 is a schematic diagram of a bluetooth playback system according to an exemplary embodiment of the present application. Referring to fig. 1, in this implementation environment, a terminal device 110 is included, and the terminal device 110 includes a processor 120, a first bluetooth chip 130, and a second bluetooth chip 140. The first bluetooth chip 130 and the second bluetooth chip 140 are used for transmitting audio data of the terminal device and processing other bluetooth traffic.
In some embodiments, the terminal device 110 may be a smart phone, a tablet computer, a notebook computer, a bluetooth speaker, a bluetooth headset, etc. The terminal device 110 has a processor 120 built into it, and the processor 120 may include one or more processing cores. The processor 120 performs various functions of the terminal device 110 and processes data using various interfaces and lines connecting various parts within the terminal device 110. Alternatively, the processor 120 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a Neural-network processor (Neural-network Processing Unit, NPU), etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of images; the NPU is used to implement artificial intelligence (Artificial Intelligence, AI) functionality. The processor 120 of the terminal device 110 is connected to the first bluetooth chip 130 and the second bluetooth chip 140, and is configured to instruct the first bluetooth chip 130 and the second bluetooth chip 140 to perform corresponding service processing.
In some embodiments, the first bluetooth chip 130 and the second bluetooth chip 140 are chips for bluetooth communication. The terminal device 110 in the embodiment of the present application has a first bluetooth chip 130 and a second bluetooth chip 140 built therein, where different bluetooth chips correspond to different bluetooth media access control (Media Access Control, MAC) addresses. Optionally, the first bluetooth chip 130 and the second bluetooth chip 140 follow the same bluetooth protocol, such as bluetooth 4.0 protocol, bluetooth 5.0 protocol, etc., which is not limited by the present application.
In one possible implementation, the second bluetooth chip 140 implements the main bluetooth functions of the terminal device 110, including bluetooth data transmission, bluetooth audio playing, bluetooth positioning, and so on, and the first bluetooth chip 130 provides additional bluetooth audio playing functions for providing a bluetooth high-speed transmission channel that cannot be achieved by the second chip, supporting high-definition lossless bluetooth audio encoding, and performing audio data stream encoding and decoding synchronously with the bluetooth audio device. Alternatively, the first bluetooth chip 130 and the second bluetooth chip 140 may operate separately or simultaneously.
In addition, the structure of the terminal device 110 shown in fig. 1 does not constitute a limitation of the terminal device 110, and the terminal device 110 may include more or less components than illustrated, or may combine some components, or may have a different arrangement of components. For example, when the terminal device 110 is a bluetooth speaker, the terminal device 110 further includes an audio circuit, a speaker, a power supply, etc., which are not described herein.
Fig. 2 is a schematic diagram of a bluetooth playback system according to another exemplary embodiment of the present application. The system includes a bluetooth service 201, a bluetooth protocol stack 202, a first bluetooth chip control layer 203, a first bluetooth chip 204, a second bluetooth chip control layer 205, a second bluetooth chip 206, an audio service 207, and an audio hardware abstraction layer 208.
In some embodiments, bluetooth service 201 is a functional unit that exchanges and communicates data between bluetooth devices. It is a software module or interface that provides specific functions for implementing specific bluetooth functions, such as data transmission, audio transmission, remote control, etc. The bluetooth service 201 defines the format, transmission and operation rules of the data so that different bluetooth devices can recognize and communicate with each other. The bluetooth protocol stack 202 is a software component that provides communication protocol and management functions, and includes a series of protocol layers, each layer being responsible for different functions, such as a physical layer, a link layer, a logical link control layer, a protocol adaptation layer, and the like. The Bluetooth protocol stack is used for managing communication flow among Bluetooth devices and ensuring correct transmission and processing of audio data.
In some embodiments, the bluetooth protocol stack implements state management, information interaction, and information synchronization thereof by sending a first control instruction and a second control instruction to the first bluetooth chip control layer 203 and the second bluetooth chip control layer 205, respectively. The first bluetooth chip control layer 203 is configured to control the first bluetooth chip 204 by receiving a first control instruction of the bluetooth protocol stack; the second bluetooth chip control layer 205 is configured to control the second bluetooth chip 206 by receiving a second control instruction of the bluetooth protocol stack. The second bluetooth chip 206 enables support of the system's primary bluetooth functions, while the newly added first bluetooth chip 204 provides at least support for supporting advanced audio distribution protocols.
In one possible implementation, the audio services 207 include types of legacy telephony services, bluetooth low energy services, broadcast services, high definition lossless coded transport services, etc., and the audio services 207 handle audio related services. The audio hardware abstraction layer 208 is a system audio driver layer for processing audio related protocols and sending audio data interactively with the bluetooth protocol stack. The audio hardware abstraction layer 208 selects an appropriate bluetooth chip to perform corresponding audio data transmission through the audio type transmitted by the audio service 207, and it should be noted that the audio hardware abstraction layer 208 sends an instruction to the bluetooth protocol stack 202 to select an appropriate bluetooth chip to perform audio data transmission.
Next, a method for transmitting bluetooth data provided in the embodiment of the present application will be described.
Fig. 3 is a schematic diagram illustrating a method for transmitting bluetooth data according to an exemplary embodiment of the present application. The method is implemented by a terminal device as an example, and comprises at least part of the following steps:
step 310: acquiring the attribute of the audio data;
wherein the attribute of the audio data refers to a plurality of different characteristics or parameters of the audio data.
Optionally, the attribute of the audio data includes at least one of the following attributes: audio format, audio frequency range, sampling rate, number of sample bits, audio quality, etc. The audio format refers to the coding mode of audio data, such as WAV, MP3, AAC, etc. The audio frequency range represents the frequency range contained in the audio signal, typically expressed in units of hertz (Hz), such as 20kHz. The sampling rate represents the number of samples acquired per second, which determines the frequency range of the audio. The sample bits refer to the number of bits per sample in the audio data. It represents the number of binary bits occupied by each sample, representing the amplitude of the audio signal. Common sample digits include 8 bits, 16 bits, 24 bits, and 32 bits. Audio quality represents the sharpness and fidelity of audio, typically in relation to the sampling rate. The embodiment of the application does not limit the attribute of the audio data.
In an alternative embodiment, when the music application in the terminal device plays the audio file, or when the audio service in the terminal device transmits the audio data, the terminal device determines what audio format is according to the file attribute or the streaming media attribute. The terminal device transmits the Audio data to the Audio HAL, and the Audio HAL selects to transmit the Audio data to the corresponding first chip or second chip according to the attribute of the Audio data.
Step 320: transmitting the audio data by using the first Bluetooth chip under the condition that the attribute of the audio data reaches the target transmission condition;
the target transmission condition refers to a condition that the audio data is transmitted in a lossless coding format when the terminal equipment transmits the audio data through Bluetooth.
The first Bluetooth chip refers to an externally hung Bluetooth chip on the terminal equipment and is used for providing a Bluetooth high-speed transmission channel and supporting high-definition lossless Bluetooth audio coding.
In some embodiments, the terminal device obtains the attribute of the audio data, and according to whether the attribute of the audio data reaches a target transmission condition, the target transmission condition means that the audio quality is not lost in the transmission process, and if the attribute of the audio data reaches the target transmission condition, the first bluetooth chip with better transmission capability is selected to be used so as to meet the transmission requirement of the high-quality audio data.
Step 330: transmitting the audio data by using a second Bluetooth chip under the condition that the attribute of the audio data does not reach the target transmission condition; the transmission capacity of the first Bluetooth chip is larger than that of the second Bluetooth chip.
The second bluetooth chip refers to a Soc chip in the terminal device, which provides a bluetooth function originally supported by the system, and the capability of transmitting audio data is weaker than that of the first bluetooth chip.
In some embodiments, if the attribute of the audio data does not meet the target transmission condition, the transmitted audio data needs to be appropriately converted or encoded to accommodate the lower transmission capability, and the audio data is transmitted using the second bluetooth chip.
In some embodiments, the playback device to which the terminal device is connected also has the first bluetooth chip and the second bluetooth chip built in. And under the condition that the attribute of the audio data does not reach the target transmission condition, the terminal equipment uses a Bluetooth transmission channel between the second Bluetooth chip and the second Bluetooth chip of the playing equipment to transmit the audio data, wherein the Bluetooth transmission channel is a default Bluetooth transmission channel. In case the properties of the audio data reach the target transmission conditions, the terminal device will use the bluetooth transmission channel between the first bluetooth chip and the first bluetooth chip of the playback device. The second bluetooth chip of the terminal device sends a first signaling to the playing device through a default bluetooth transmission channel, where the first signaling carries an MAC address of the first bluetooth chip of the terminal device, and is used to instruct to establish a bluetooth transmission channel between the first bluetooth chip of the playing device and the first bluetooth chip of the terminal device, and audio data is transmitted through the bluetooth transmission channel. When the audio data transmission is completed, the first Bluetooth chip or the second Bluetooth chip of the terminal equipment sends a second signaling to the playing equipment, wherein the second signaling is used for indicating that a Bluetooth transmission channel between the first Bluetooth chip of the terminal equipment and the first Bluetooth chip of the playing equipment is disconnected, and the transmission of the audio data is stopped.
In one possible implementation manner, when the bluetooth transmission channel of the first bluetooth chip and the bluetooth transmission channel of the second bluetooth chip of the terminal device and the playing device are simultaneously connected, the physical quantity of the audio data is larger under the condition that the attribute of the audio data reaches the target transmission condition, and at this time, the audio data can be simultaneously transmitted to the playing device through the bluetooth transmission channels of the first bluetooth chip and the second bluetooth chip, so that the transmission speed of the audio data can be increased, and the audio data can be transmitted according to different transmission bandwidths of the bluetooth chips.
In one possible implementation manner, when the terminal device uses the first bluetooth chip to perform audio data transmission on the playing device, the terminal device sends at least one bluetooth data packet to the playing device, the playing device feeds back a receiving result of the at least one bluetooth data packet to the terminal device after receiving the at least one bluetooth data packet, and in case of failure of transmission of some data packets, the data packets can be retransmitted to the playing device through the second bluetooth chip at this time.
In summary, the method provided in this embodiment may use the first bluetooth chip when the attribute of the audio data reaches the target transmission condition, so as to obtain a higher transmission rate and a higher audio quality, realize high-quality audio transmission, and provide a better audio experience for the user.
In an alternative embodiment based on fig. 3, fig. 4 shows a schematic diagram of a method for transmitting bluetooth data according to an exemplary embodiment of the present application. In this embodiment, steps 320 and 330 may alternatively be implemented as steps 321 and 331, respectively:
step 321: transmitting the audio data by using a first Bluetooth chip under the condition that the audio format of the audio data is a lossless coding format;
where the audio format is an attribute of the audio data.
The lossless coding format is a type of audio format, and lossless coding is a method for compressing data, and when the audio data is compressed, the lossless coding format can reduce the size of a music file and retain all information of the original audio data, the compressed audio data can be restored to the original audio data, no information is lost, and the original sound quality is retained.
In some embodiments, if the audio format of the audio data is a lossless encoding format, the audio data is transmitted using the first bluetooth chip, which may provide high quality lossless audio transmission. Lossless coding format means that audio data does not lose quality during compression, and original sound quality can be preserved.
Step 331: in the case where the audio format of the audio data is a lossy encoding format, the audio data is transmitted using the second Bluetooth chip.
The lossy encoding format is a type of audio format, and when audio data is compressed, lossy encoding may delete some audio data and use human perception characteristics, such as insensitive areas of hearing, to significantly reduce the size of an audio file, but at the same time may also cause a certain degree of loss of audio data, which cannot fully restore the original sound quality.
In some embodiments, if the audio format of the audio data is a lossy encoding format, the audio data is transmitted using the second bluetooth chip, and the lossy encoding format means that the audio data loses quality during the compression process, and the original sound quality cannot be preserved. The lossy encoding format generally requires less transmission resources, and thus the need for the lossy encoding format is met using a second bluetooth chip.
In summary, in the method provided in this embodiment, when the attribute of the audio data reaches the target transmission condition, the first bluetooth chip may be used for transmission. If the audio format of the audio data is a lossless encoding format, the first Bluetooth chip may provide it with a high quality lossless audio transmission. If the attribute of the audio data does not reach the target transmission condition, i.e. lossless audio transmission cannot be achieved, transmission using the second bluetooth chip may be considered. If the audio format of the audio data is a lossy encoding format, the second Bluetooth chip can transmit the audio data for the audio data. When the Bluetooth chip is selected to transmit audio data, a proper chip is selected according to the attribute and the requirement of the audio data so as to realize the optimal audio transmission effect.
In an alternative embodiment based on fig. 4, fig. 5 shows a schematic diagram of a method for transmitting bluetooth data according to an exemplary embodiment of the present application. In this embodiment, step 321 is alternatively implemented as step 321-1 and step 321-2:
step 321-1: transmitting the audio data by using a first Bluetooth chip under the condition that the audio format of the audio data is a first lossless coding format;
in some embodiments, the lossless encoding format includes a first lossless encoding format and a second lossless encoding format. Wherein the transmission bandwidth requirement of the first lossless encoding format is higher than the transmission bandwidth requirement of the second lossless encoding format.
In some embodiments, when the audio format of the audio data is the first lossless encoding format with high transmission bandwidth requirement, the audio data is transmitted using a first bluetooth chip, where the first bluetooth chip is used to provide a high-speed transmission channel and support the high-definition lossless bluetooth audio encoding format.
By way of example, professional audio production or music playing without sound quality loss, the audio data needs a larger transmission rate and a higher transmission bandwidth requirement in the transmission process, and the first Bluetooth chip can be selected for transmitting the audio data, so that the integrity of the audio data can be maintained, and no information loss exists.
Step 321-2: transmitting the audio data by using a second Bluetooth chip under the condition that the audio format of the audio data is a second lossless coding format; wherein the transmission bandwidth requirement of the first lossless encoding format is higher than the transmission bandwidth requirement of the second lossless encoding format.
In some embodiments, the second lossless encoding format has a lower transmission bandwidth requirement, and the second bluetooth chip may be used to meet the audio data transmission requirement without losing the audio data quality.
In summary, according to the method provided by the embodiment, different bluetooth chips are selected according to the audio format transmission bandwidth requirements of the audio data, the first bluetooth chip is selected to transmit the audio data under the condition of slightly higher tone quality requirements, and the second bluetooth chip is selected to transmit the audio data under the condition of slightly lower tone quality requirements, so that the transmission efficiency and the tone quality requirements are selected, and the utilization rate of transmission resources can be improved.
Fig. 6 is a schematic diagram illustrating a method for transmitting bluetooth data according to an exemplary embodiment of the present application. The method is implemented by a terminal device as an example, and comprises at least part of the following steps:
step 610: the terminal equipment acquires the attribute of the audio data;
In some embodiments, the terminal device first obtains the attribute of the audio data before transmitting the audio data, which can help determine the format and coding mode of the audio file, so as to facilitate the subsequent selection of a suitable bluetooth chip for transmitting the audio data.
Step 620: transmitting the audio data by using a first Bluetooth chip under the condition that the audio format of the audio data is a first lossless coding format;
in some embodiments, the first bluetooth chip supports high quality audio transmission, including supporting a first lossless encoding format. The transmission of audio data using the first bluetooth chip can realize high-quality transmission and playback.
Step 630: transmitting the audio data by using a second Bluetooth chip under the condition that the audio format of the audio data is a second lossless coding format;
the second Bluetooth chip is a system self-contained chip, and is a chip integrated with a plurality of functional modules, including a Bluetooth communication module, an audio processing module and the like. The second bluetooth chip is usually designed with low power consumption, which can achieve lower power consumption when transmitting audio data.
In some embodiments, the second bluetooth chip supports a second lossless encoding format, so that transmitting audio data using the second bluetooth chip can achieve high-quality transmission and playback, providing a good audio experience.
Step 640: in the case that the audio format of the audio data is a lossy encoding format, the audio data is transmitted using the second bluetooth chip.
In some embodiments, the lossy encoding format may generally compress the audio data to a smaller file size, thereby accommodating a bandwidth limited transmission environment, and the second Bluetooth chip may be able to efficiently process and transmit such compressed audio data, which may save transmission resources by adapting the lossy encoding format.
In summary, in the method provided in this embodiment, the terminal device first performs attribute judgment on the acquired audio data, and if the audio format of the audio data is the first lossless coding format, uses the first bluetooth chip to transmit the audio data; and if the audio format of the audio data is the second lossless coding format and the lossy coding format, transmitting the audio data by using a second Bluetooth chip. By selecting different Bluetooth chips to use under different scenes, transmission resources can be better utilized.
Fig. 7 is a schematic diagram illustrating a method for transmitting bluetooth data according to an exemplary embodiment of the present application. The method is implemented by a terminal device as an example, and comprises at least part of the following steps:
Step 710: transmitting at least one Bluetooth frame in the Bluetooth establishment phase by using a second Bluetooth chip in the Bluetooth establishment phase;
wherein, bluetooth frame includes: at least one of a frame related to bluetooth scanning, a frame related to bluetooth pairing, and a frame related to bluetooth connection.
Optionally, the bluetooth frame includes at least one of the following frames: frames related to bluetooth scanning, frames related to bluetooth pairing, frames related to bluetooth connection. Frames related to bluetooth scanning, such as broadcast data frames, contain broadcast information of the terminal device, such as the name of the terminal device, the type of the terminal device, etc., and by transmitting broadcast data, other devices connected to the terminal device can recognize and learn about surrounding devices. Frames associated with bluetooth pairing, such as connection request and connection response frames, through which a connection request and response may be made between devices during bluetooth pairing to establish a bluetooth transmission channel. A bluetooth connection-related frame, such as a connection acknowledgement frame, is sent after a bluetooth transmission channel is established between devices to confirm that a connection has been established and that both devices are in a connected state.
In some embodiments, the second bluetooth chip is a system self-contained chip, supports some traditional bluetooth functions, and some bluetooth frames require less transmission resources.
Step 720: the terminal equipment acquires the attribute of the audio data;
in some embodiments, the terminal device determines what type of audio data is to be transmitted by acquiring the attribute of the audio data, so as to select an adaptive bluetooth chip for transmission.
Step 730: transmitting the audio data by using a second Bluetooth chip under the condition that the audio service type corresponding to the audio data is conversation service;
wherein the audio service type is an attribute of the audio data.
The conversation type service belongs to traditional Bluetooth service, and the second Bluetooth chip supports traditional Bluetooth service and is enough to meet the requirements of Bluetooth conversation audio data.
Illustratively, the Hands-Free Profile (HFP) is a bluetooth telephony protocol that allows bluetooth headsets or other bluetooth devices to communicate with handsets to implement telephony functions. Common bluetooth headset designs and implementations mostly use a second bluetooth chip to handle audio data and bluetooth communications. The second Bluetooth chip integrates a Bluetooth function and an audio processing function, and can meet the processing requirement of Bluetooth call audio data.
Step 740: and under the condition that the audio service type corresponding to the audio data is the low-power consumption Bluetooth BLE service, transmitting the audio data by using the second Bluetooth chip.
The low-power consumption Bluetooth BLE service is a Bluetooth service which can remarkably reduce power consumption and cost while keeping the same communication range with the traditional Bluetooth service.
In some embodiments, the bluetooth low energy BLE technology is mainly used for applications with higher real-time requirements but lower data rates, and the second bluetooth chip meets the data transmission rate requirements of the bluetooth low energy BLE service for transmitting audio data. Meanwhile, the second Bluetooth chip has the characteristic of low power consumption, and the energy consumption can be effectively reduced and the service time can be prolonged by using the second Bluetooth chip.
For example, bluetooth low energy BLE can realize wireless connection smart home devices, such as intelligent light bulbs, intelligent sockets, intelligent door locks, etc. Through the low-power consumption Bluetooth BLE technology, a user can remotely control and manage household equipment through a mobile phone or other equipment, so that the intelligent degree of the household is improved. The low-power consumption Bluetooth BLE can be further used for connecting equipment such as an intelligent bracelet and an intelligent watch, so that health data monitoring of a user, such as heart rate monitoring and exercise monitoring, can be realized. And when the audio service type corresponding to the audio data is the low-power Bluetooth BLE service, transmitting the audio data by using the second Bluetooth chip.
In summary, according to the method provided in the embodiment, through the judgment of the audio service type, when the audio service type corresponding to the audio data is a call service or the audio service type corresponding to the audio data is a bluetooth BLE type service with low power consumption, or when the conventional bluetooth service initiates functions such as bluetooth scanning, pairing and connection, the second bluetooth chip is used to transmit the audio data, so that the transmission requirement can be met and the low power consumption can be achieved while the transmission quality is maintained.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 8 is a block diagram illustrating a bluetooth data transmission apparatus according to an embodiment of the application. The device has the function of realizing the Bluetooth data transmission method example, and the function can be realized by hardware or corresponding software executed by hardware. The device may be the server described above or may be provided in the server. As shown in fig. 8, the apparatus 800 may include: an acquisition module 810, a first bluetooth module 820, and a second bluetooth module 830;
An obtaining module 810, configured to obtain an attribute of the audio data;
a first bluetooth module 820 for transmitting the audio data using the first bluetooth chip in case the attribute of the audio data reaches a target transmission condition;
a second bluetooth module 830, configured to transmit the audio data using a second bluetooth chip if the attribute of the audio data does not reach the target transmission condition;
the transmission capacity of the first Bluetooth chip is larger than that of the second Bluetooth chip.
In an alternative embodiment, the first bluetooth module 820 is configured to transmit the audio data using the first bluetooth chip in the case that the audio format of the audio data is a lossless encoding format;
in an alternative embodiment, the second bluetooth module 830 is configured to transmit the audio data using the second bluetooth chip in case the audio format of the audio data is a lossy encoding format.
In an alternative embodiment, the first bluetooth module 820 is configured to transmit the audio data using the first bluetooth chip when the audio format of the audio data is the first lossless encoding format;
in an alternative embodiment, the second bluetooth module 830 is configured to transmit the audio data using the second bluetooth chip if the audio format of the audio data is the second lossless encoding format;
Wherein the transmission bandwidth requirement of the first lossless encoding format is higher than the transmission bandwidth requirement of the second lossless encoding format.
In an alternative embodiment, the second bluetooth module 830 is configured to use the second bluetooth chip to transmit the audio data when the audio service type corresponding to the audio data is a call service.
In an alternative embodiment, the second bluetooth module 830 is configured to use the second bluetooth chip to transmit the audio data in a case where the audio service type corresponding to the audio data is a bluetooth low energy type service.
In an alternative embodiment, the second bluetooth module 830 is configured to transmit, during a bluetooth establishment phase, at least one bluetooth frame in the bluetooth establishment phase using the second bluetooth chip;
wherein, bluetooth frame includes: at least one of a frame related to bluetooth scanning, a frame related to bluetooth pairing, and a frame related to bluetooth connection.
It should be noted that: in the device provided in the above embodiment, when implementing the functions thereof, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Referring to fig. 9, a block diagram of a terminal device according to an embodiment of the present application is shown. The terminal device may be used to implement the transmission method of bluetooth data provided in the above-described embodiments. Specifically, the present application relates to a method for manufacturing a semiconductor device.
The terminal apparatus 900 includes a central processing unit (Central Processing Unit, CPU) 901, a system Memory 904 including a random access Memory (Random Access Memory, RAM) 902 and a Read-Only Memory (ROM) 903, and a system bus 905 connecting the system Memory 904 and the central processing unit 901. The terminal device 900 also includes a basic Input/Output system (I/O) 906, which facilitates the transfer of information between the various devices within the computer device, and a mass storage device 907, for storing an operating system 913, application programs 914, and a bluetooth chip module 915.
The basic input/output system 906 includes a display 908 for displaying information and an input device 909, such as a mouse, keyboard, etc., for user input of information. Wherein the display 908 and the input device 909 are connected to the central processing unit 901 via an input output controller 910 connected to the system bus 905. The basic input/output system 906 can also include an input/output controller 910 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input-output controller 910 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable storage media provide non-volatile storage for terminal device 900. That is, the mass storage device 907 may include a computer readable storage medium (not shown) such as a hard disk or a compact disk-Only (CD-ROM) drive.
The computer-readable storage medium may include computer storage media and communication media without loss of generality. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable storage instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, erasable programmable read-Only register (Erasable Programmable Read Only Memory, EPROM), electrically erasable programmable read-Only Memory (EEPROM), flash Memory or other solid state Memory technology, CD-ROM, digital versatile disks (Digital Versatile Disc, DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the one described above. The system memory 904 and mass storage device 907 described above may be collectively referred to as memory.
The memory stores one or more programs configured to be executed by the one or more central processing units 901, the one or more programs containing instructions for implementing the above-described method embodiments, the central processing unit 901 executing the one or more programs to implement the methods provided by the respective method embodiments described above.
According to various embodiments of the application, the terminal device 900 may also operate via a network, such as the Internet, to a remote terminal device on the network. I.e., the terminal device 900 may be connected to the network 912 through a network interface unit 911 coupled to the system bus 905, or alternatively, the network interface unit 911 may be used to connect to other types of networks or remote terminal device systems (not shown).
The bluetooth chip module 915 is a chip for performing bluetooth communication. Two bluetooth chips are provided in the terminal device 900, wherein different bluetooth chips correspond to different bluetooth MAC addresses. The different bluetooth chips all follow the same bluetooth protocol, such as bluetooth 4.0 protocol, bluetooth 5.0 protocol, etc., as the application is not limited in this regard.
The memory further includes one or more programs stored in the memory, the one or more programs including steps for performing the method provided by the embodiment of the present application, which are executed by the terminal device.
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the above-described transmission method of bluetooth data.
In an exemplary embodiment, a computer program product is also provided, which, when being executed by a processor, is adapted to carry out the above-mentioned method of transmitting bluetooth data.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. In addition, the step numbers described herein are merely exemplary of one possible execution sequence among steps, and in some other embodiments, the steps may be executed out of the order of numbers, such as two differently numbered steps being executed simultaneously, or two differently numbered steps being executed in an order opposite to that shown, which is not limiting.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.