A gateway-based wireless audio transmission method, system, device and medium
By establishing a bidirectional communication link on the gateway device and using time-division multiplexing and clock synchronization, the problem that CBT or BLE audio devices cannot support multi-source wireless audio transmission at the same time is solved, achieving efficient dual-source audio data transmission, improving user experience and reducing device power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUXI ZGMICRO ELECTRONICS CO LTD
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-30
AI Technical Summary
Existing CBT Audio or BLE Audio terminal devices cannot support simultaneous transmission and reception of wireless audio from two audio source devices, resulting in a less than ideal user experience. They also suffer from limitations such as insufficient bandwidth, clock asynchrony, and constraints related to low power consumption and low cost.
A two-way communication link is established between the gateway device and the first audio source device and the audio device respectively. Time slot resources are shared through time division multiplexing to ensure link clock synchronization. Audio streams are configured to carry audio data from different audio sources to achieve dual-source wireless audio transmission.
It enables bidirectional wireless audio transmission between the audio device and two audio source devices without needing to maintain two wireless connections simultaneously, providing a good user experience and reducing the power consumption and cost of wireless audio devices.
Smart Images

Figure CN122317865A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio transmission technology, and more specifically to a gateway-based wireless audio transmission method, system, device, and medium. Background Technology
[0002] The rapid development of wireless communication technology has made wireless audio and wireless communication an important part of people's lives. For example, CBT (Classic Bluetooth) wireless audio terminal devices, such as CBT Audio headphones and CBT Audio speakers, which use smartphones as audio sources, have gained widespread popularity. BLE (Bluetooth Low Energy) audio, which offers lower latency, lower power consumption, and higher performance wireless audio services, will also receive more attention.
[0003] In related technologies, CBT Audio or BLE Audio terminal devices can only transmit and receive wireless audio through one CBT audio source device or one BLE audio source device. Simultaneous transmission and reception of wireless audio through two CBT or BLE audio source devices is not supported. For example, existing CBT Audio or BLE Audio headsets cannot be used to play online games on one smartphone while simultaneously answering phone calls on another. In other words, these technologies do not support dual-source wireless audio (TSWA) or multi-source wireless audio (MSWA). Therefore, users cannot obtain a better user experience. Summary of the Invention
[0004] In view of this, the present invention provides a gateway-based wireless audio transmission method to at least solve the problem that current audio devices cannot support simultaneous wireless audio transmission from dual sources.
[0005] In a first aspect, the present invention provides a gateway-based wireless audio transmission method for a gateway device. The method includes: the gateway device and a first audio source device performing bidirectional audio transmission based on a first communication link to send a first audio stream to the first audio source device and receive a second audio stream from the first audio source device; the gateway device and an audio device performing bidirectional audio transmission based on a second communication link to send a third audio stream to the audio device and receive a fourth audio stream from the audio device; when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist: configuring the first audio stream to carry audio data from the fourth audio stream; configuring the third audio stream to carry audio data from the second audio stream; the link clock of the first communication link being the same as or synchronized with the link clock of the second communication link; and the first communication link and the second communication link time-division multiplexing at least sharing a portion of time slot resources.
[0006] In this embodiment, the gateway device and the first audio source device conduct bidirectional audio transmission based on a first communication link, and the gateway device and the audio device conduct bidirectional audio transmission based on a second communication link. When bidirectional audio transmission occurs simultaneously on both communication links, the link clocks of the two communication links are the same or synchronized, and a time-division multiplexing method with shared time slots is used, effectively solving the bandwidth shortage problem in dual-source wireless audio transmission. Furthermore, as the direct audio source provider for the audio device, the gateway device, by configuring a first audio stream and a third audio stream, enables the audio device to achieve bidirectional wireless audio transmission with two audio source devices (the gateway device and the first audio source device) without needing to maintain two wireless connections simultaneously. This not only provides a better user experience but also reduces the power consumption and cost of the wireless audio device.
[0007] In an optional implementation, the method further includes: a gateway device serving as a peripheral device of a first communication link, a central device of the first communication link serving as a first audio source device, and a first link clock of the first communication link being the same as or synchronized with the local clock of the first audio source device; and a gateway device serving as a central device of a second communication link, a peripheral device of the second communication link serving as an audio device, and a second link clock of the second communication link being the same as or synchronized with the local clock of the gateway device.
[0008] In this embodiment, by configuring the clock synchronization relationship between the first audio source device, the gateway device, the audio device, the first communication link, and the second communication link, the time slot utilization of the system can be improved, and it can help the devices in the multi-audio source system to achieve synchronous audio acquisition and synchronous playback.
[0009] In an optional implementation, the method further includes: when bidirectional audio transmission with a first audio source device and bidirectional audio transmission with an audio device coexist, the gateway device adjusts its local clock based on a first link clock so that the adjusted local clock of the gateway device is the same as or synchronized with the first link clock; the gateway device configures a second link clock based on its adjusted local clock.
[0010] In one alternative implementation, the first communication link includes a CBT link; the link protocol of the first link is CBT, and the link protocol of the second communication link is different from that of the first communication link.
[0011] In this embodiment, the CBT link with good compatibility is used as the first communication link. On this basis, a second communication link with a different communication protocol is adopted to ensure that other audio services can be provided while supporting CBT voice calls.
[0012] In one optional implementation, the first communication link includes an asynchronous connection link and an extended synchronous connection link; the second communication link includes an asynchronous connection link and a connection isochronous group link consisting of at least one connection isochronous stream link; when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the first communication link and the second communication link are time-division multiplexed and at least share some time slot resources, including: the connection isochronous group link in the second communication link shares time slots with the extended synchronous connection link in the first communication link and the asynchronous connection link in the first communication link, respectively; the asynchronous connection link in the first communication link shares time slots with the asynchronous connection link in the second communication link.
[0013] In this embodiment, by configuring the isochronous connection group links in the second communication link to share time slots with the extended synchronous connection links and asynchronous connection links in the first communication link, and the asynchronous connection links of the two communication links to share time slots, the available communication time can be utilized more effectively, the waste of time slots can be reduced, the overall bandwidth utilization can be improved, and the reliability and audio quality of dual-source wireless audio transmission can be guaranteed.
[0014] In one optional implementation, the duration of the isochronous interval of the extended synchronous connection link of the first communication link is the same as the duration of the isochronous interval of the connection isochronous group link of the second communication link; the sub-interval of the connection isochronous group link of the second communication link is M times the sub-interval of the first communication link, where M is a positive integer; the duration of one sub-interval of the first communication link is at least sufficient for the gateway device to receive a data packet of the second audio stream once and send a data packet of the first audio stream once based on the extended synchronous connection link of the first communication link.
[0015] In this embodiment, by limiting the duration of the equal time interval and the duration of the sub-interval between the first and second communication links, the time slots of the two links can be aligned on the basis of clock synchronization, thereby improving the time slot utilization of the two communication links.
[0016] In one optional implementation, the time interval between the starting point of the isochronous group link in the second communication link and the starting point of the extended synchronous connection link in the first communication link is N times the sub-interval of the second communication link, where N is a positive integer.
[0017] In some optional implementations, the communication duration of the asynchronous connection link of the second communication link is S times the sub-interval of the second communication link, where S is a positive integer.
[0018] In the above embodiments, by limiting the time interval between the starting point of the isochronous group link in the second communication link and the starting point of the extended synchronous connection link in the first communication link, as well as the communication duration of the asynchronous connection link in the second communication link, the time slot alignment effect of the two links can be further improved, so as to fully share the time slot and improve the link efficiency.
[0019] In one alternative implementation, M, N, and S are equal.
[0020] In this embodiment, by limiting the multiple relationship between the sub-intervals of the isochronous group links of the second communication link and the sub-intervals of the first communication link, the multiple relationship between the time interval between the starting point of the isochronous group links in the second communication link and the starting point of the extended synchronous connection links in the first communication link and the sub-intervals of the second communication link, and the multiple relationship between the communication duration of the asynchronous connection links of the second communication link and the sub-intervals of the second communication link, the time slot utilization of the first and second communication links can be improved.
[0021] In one optional implementation, the asynchronous connection link in the second communication link shares a time slot with the connected isochronous group link in the second communication link; the inter-packet interval used by the second communication link is less than the inter-packet interval specified by the BLE link protocol, and / or, the minimum time slot interval used by the second communication link is less than the minimum time slot interval specified by the BLE link protocol.
[0022] In this embodiment, by setting the asynchronous connection links in the second communication link and the isochronous connection group links in the second communication link to share time slots, and by limiting the inter-packet interval and / or minimum time slot interval of the second communication link, the transmission efficiency of the communication link can be improved and the transmission delay can be reduced.
[0023] In one optional implementation, when the audio service between the gateway device and the first audio source device is prioritized, at the same time, the link priority of the extended synchronous connection link of the first communication link, the link priority of the connection isochronous group link in the second communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease in sequence.
[0024] In one optional implementation, when configured to prioritize audio services between the gateway device and the audio device, at the same time, the link priority of the isochronous group link in the second communication link, the link priority of the extended synchronous connection link in the first communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease sequentially.
[0025] Given that time slot resources are limited, prioritizing different links and data transmission services can optimize time slot resource configuration. Specifically, priority can be given to audio services between the gateway device and the first audio source device, or to audio services between the gateway device and the audio device. In this scenario, the time slots required by the priority services can be guaranteed first, while other services can utilize the remaining time slot resources as much as possible. This time-division multiplexing approach helps to improve the system's resource utilization and bandwidth efficiency, and ensures high reliability of wireless audio transmission.
[0026] In an alternative implementation, the method further includes configuring a third audio stream to carry audio data from the second audio stream and local audio data from the gateway device while bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist.
[0027] In this embodiment, by configuring a third audio stream through the gateway device, audio data from two different audio source devices (the gateway device and the first audio source device) can be transmitted to the audio device simultaneously, thereby enabling the audio device to support TSWA.
[0028] In an optional implementation, the method further includes a gateway device connecting to a second audio source device for unidirectional audio transmission to receive a sixth audio stream from the second audio source device, wherein, while unidirectional audio transmission with the second audio source device, bidirectional audio transmission with the audio device, and bidirectional audio transmission with the first audio source device coexist, a third audio stream is configured to carry one or more of audio data from the second audio stream, audio data from the sixth audio stream, and local audio data of the gateway device.
[0029] In this embodiment, by using the gateway device and the second audio source for unidirectional audio transmission, and by configuring the third audio stream, it is possible to transmit audio streams from two or three audio source devices (i.e., two or three of the first audio source device, the third audio source device, and the gateway device) to the audio device, thereby enabling the audio device to support TSWA or MSWA.
[0030] In an optional implementation, the method further includes: a gateway device connecting to a second audio source device for bidirectional audio transmission to send a fifth audio stream to the second audio source device and receive a sixth audio stream from the second audio source device; wherein, when bidirectional audio transmission with the second audio source device and bidirectional audio transmission with the audio device coexist, a third audio stream is configured to carry audio data from the sixth audio stream and / or local audio data of the gateway device; the fifth audio stream is configured to carry audio data from a fourth audio stream; when bidirectional audio transmission with the second audio source device, bidirectional audio transmission with the audio device, and bidirectional audio transmission with the first audio source device coexist, a first audio stream is configured to carry audio data from the fourth audio stream; the third audio stream is configured to carry one or more of audio data from the second audio stream, audio data from the sixth audio stream, and local audio data of the gateway device; and the fifth audio stream is configured to carry audio data from the fourth audio stream.
[0031] In this embodiment, by using the gateway device and the second audio source for bidirectional audio transmission, and by configuring the third audio stream, the fifth audio stream, and the first audio stream, the audio device can be assisted in achieving bidirectional audio transmission with two or three different audio source devices (i.e., two or three of the first audio source device, the third audio source device, and the gateway device), thereby enabling the audio device to support TSWA or MSWA.
[0032] In one alternative implementation, while bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device is also used to forward control commands between the audio device and the first audio source device.
[0033] In this embodiment, when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device forwards control commands between the audio device and the first audio source device to assist in realizing communication negotiation and control between the audio device and the first audio source device.
[0034] Secondly, the present invention provides a gateway-based wireless audio transmission system, the system comprising a first audio source device, an audio device, and a gateway device; the gateway device is configured to perform bidirectional audio transmission with the first audio source device via a first communication link to send a first audio stream to the first audio source device and receive a second audio stream from the first audio source device; the gateway device is further configured to perform bidirectional audio transmission with the audio device via a second communication link to send a third audio stream to the audio device and receive a fourth audio stream from the audio device; when bidirectional audio transmission between the gateway device and the first audio source device and bidirectional audio transmission with the audio device coexist: the gateway device is further configured to configure the first audio stream to carry audio data from the fourth audio stream; the gateway device is further configured to configure the third audio stream to carry audio data from the second audio stream; the link clock of the first communication link is the same as or synchronized with the link clock of the second communication link; the first communication link and the second communication link are time-division multiplexed and at least share some time slot resources.
[0035] Thirdly, the present invention provides an electronic device comprising: a memory and a processor, the memory and the processor being coupled to each other, the memory storing instructions, and the processor executing the instructions to perform the gateway-based wireless audio transmission method described in the first aspect or any corresponding embodiment thereof.
[0036] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the gateway-based wireless audio transmission method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0037] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0038] Figure 1 This is a schematic flowchart of a gateway-based wireless audio transmission method according to an embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of the system structure of a gateway-based wireless audio transmission system according to an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of the time coexistence relationship of a communication link according to an embodiment of the present invention;
[0041] Figure 4This is a schematic diagram of the system architecture of another gateway-based wireless audio transmission system according to an embodiment of the present invention;
[0042] Figure 5 This is a schematic diagram of the system architecture of another gateway-based wireless audio transmission system according to an embodiment of the present invention;
[0043] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] The rapid development of wireless connectivity technologies such as CBT, BLE, and WIFI (Wireless Fidelity) has made wireless audio and wireless communication an important part of people's lives. However, CBT Audio or BLE Audio terminal devices in these technologies can only transmit and receive wireless audio through one CBT or one BLE audio source device, and do not support simultaneous transmission and reception of wireless audio through two CBT or BLE audio source devices. For example, existing CBT Audio or BLE Audio headsets cannot be used to play online games on one smartphone while answering phone calls on another smartphone.
[0046] Analysis revealed three main reasons why CBT or BLE wireless audio terminal devices do not support TSWA or MSWA. First, the bandwidth for simultaneous transmission and reception of wireless audio between the CBT or BLE wireless audio terminal device and multiple CBT or BLE audio source devices is insufficient, making it difficult to guarantee the reliability or quality of wireless audio transmission. Second, clock asynchrony between the CBT or BLE wireless audio terminal device and multiple CBT or BLE audio source devices prevents synchronized acquisition and playback of MSWA. Third, wireless audio terminal devices are constrained by low power consumption and low cost.
[0047] This invention provides a gateway-based wireless audio transmission method. The gateway device and a first audio source device perform bidirectional audio transmission via a first communication link, and the gateway device and the audio device perform bidirectional audio transmission via a second communication link. When bidirectional audio transmission occurs simultaneously on both communication links, the link clocks of the two communication links are the same or synchronized, and a time-division multiplexing method with shared time slots is used, effectively solving the bandwidth shortage problem in dual-source wireless audio transmission. Furthermore, as the direct audio source provider for the audio device, the gateway device, by configuring a first audio stream and a third audio stream, enables the audio device to achieve bidirectional wireless audio transmission with two audio source devices (the gateway device and the first audio source device) without needing to maintain two wireless connections simultaneously. This not only provides a better user experience but also reduces the power consumption and cost of wireless audio devices.
[0048] According to an embodiment of the present invention, a gateway-based wireless audio transmission method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0049] This embodiment provides a gateway-based wireless audio transmission method for use in gateway devices. Figure 1 This is a flowchart of a gateway-based wireless audio transmission method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0050] In step S101, the gateway device and the first audio source device conduct bidirectional audio transmission based on the first communication link to send a first audio stream to the first audio source device and receive a second audio stream from the first audio source device.
[0051] In some optional implementations, the gateway device can search for a first audio source device within the target network range using a wireless communication protocol. After discovering the device, it sends a connection request to the first audio source device. Upon receiving the connection request, the first audio source device responds to the connection request to establish a first communication link. The communication protocol followed by the first communication link can be set according to the actual situation.
[0052] After establishing a first communication link with the first audio source device, the gateway device sends a first audio stream to the first audio source device and receives a second audio stream from the first audio source device, thus achieving bidirectional audio transmission between the gateway device and the first audio source device. It can be understood that the first audio stream can be stored locally on the gateway device or received from an external device. The second audio stream can also be stored locally on the first audio source device or received from an external device. Examples include locally stored audio data, call voice data streams received via mobile cellular networks, and voice / audio data received via the internet.
[0053] In practical applications, the gateway device can be any device suitable for this embodiment, such as a smartphone or a custom audio source device. The first audio source device can be any device suitable for this embodiment, such as a smartphone or a tablet.
[0054] The audio transmitted bidirectionally between the gateway device and the first audio source device can include various types of sound signals, including but not limited to voice, music, ambient sounds, etc.
[0055] In step S102, the gateway device and the audio device perform bidirectional audio transmission based on the second communication link to send a third audio stream to the audio device and receive a fourth audio stream from the audio device.
[0056] The gateway device and the audio device can establish a second communication link through their built-in wireless communication modules, following a specific communication protocol. In some optional implementations, the gateway device activates its wireless communication module and sends a request signal to the surrounding space according to the target communication protocol. Upon receiving the request signal, the audio device can verify it. If the verification is successful, the audio device sends an acknowledgment signal to the gateway device to establish the second communication link. The target communication protocol can be set according to the actual situation.
[0057] In practical applications, audio devices can be wireless headphones with microphones, wireless speakers with microphones, or other wireless audio output devices with audio input capabilities.
[0058] After establishing a second communication link with the audio device, the gateway device sends a third audio stream to the audio device and receives a fourth audio stream from the audio device, thus achieving bidirectional audio transmission between the gateway device and the audio device. It is understood that the third audio stream can be locally stored on the gateway device or received from an external device, such as locally stored audio data, call voice data streams received via mobile cellular networks, voice / audio data received via the internet, etc. The fourth audio stream can be locally stored or captured by the audio device, such as locally captured ambient sounds, call voice, or locally stored special effects audio, voice prompts, etc.
[0059] It is understandable that the timing relationship between steps S101 and S102 can be flexible and is not limited to... Figure 1 The order shown.
[0060] In some application scenarios, the bidirectional audio transmission between the gateway device and the first audio source device, and the bidirectional audio transmission between the gateway device and the audio device, can be performed independently. For example, even when the gateway device has not established a connection with the audio device, it can still perform bidirectional audio transmission with the first audio source device independently based on the first communication link, sending a first audio stream to the first audio source device and receiving a second audio stream from the first audio source device. The reverse is also true.
[0061] However, in application scenarios where bidirectional audio transmission between the gateway device and the first audio source device and bidirectional audio transmission with the audio device are required, enabling the audio device to support simultaneous wireless audio transmission from two audio sources, step S103 is executed.
[0062] Step S103, when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist: configure the first audio stream to carry audio data from the fourth audio stream.
[0063] When bidirectional audio transmission between the gateway device and the first audio source device and bidirectional audio transmission between the gateway device and the audio device coexist, the gateway device will receive a fourth audio stream sent by the audio device during bidirectional audio transmission with the audio device. After receiving the fourth audio stream, the gateway device can decode the fourth audio stream to obtain the audio data of the fourth audio stream.
[0064] The gateway device can load audio data from the fourth audio stream into the first audio stream it sends to the first audio source device. This allows the first audio source device to receive audio data from the audio device through the gateway device.
[0065] In one specific embodiment, when bidirectional audio transmission coexists on two communication links, the gateway device is configured with a first audio source stream that carries only the audio data from the fourth audio stream of the audio device, without carrying other audio data stored locally by the gateway device or obtained from other devices besides the audio device. This serves only to assist the audio device in audio transmission with the first audio source device. Of course, in other specific embodiments, the gateway device can also be configured with a first audio stream that carries both the audio data from the fourth audio stream and the gateway device's local audio data or other audio data; this application does not impose any limitations on this.
[0066] Step S104: Configure the third audio stream to carry audio data from the second audio stream.
[0067] During bidirectional audio transmission between the first audio source device and the gateway device, the gateway device receives a second audio stream from the first audio source device. Upon receiving the second audio stream, the gateway device can decode it to obtain the audio data of the second audio stream.
[0068] After the gateway device establishes a second communication link with the audio device, the gateway device, as the audio source provider of the audio device, can provide the audio device with one audio data stream through a third audio stream, that is, audio data stored locally by the gateway device or obtained from other devices besides the first audio source device.
[0069] In the scenario of two-way bidirectional audio transmissions coexisting, the gateway device can also configure a third audio stream, adding the audio data from the second audio stream to the third audio stream. This allows the audio data from both the second and third audio streams to be sent together to the audio device. Therefore, the audio device can receive audio data from different audio source devices through a single communication link, and simultaneously achieve bidirectional audio transmission with the first audio source device that has not yet established a connection with it. This satisfies the low power consumption and low cost requirements of the audio device, avoiding the need for the audio device to maintain two wireless connections simultaneously to transmit audio data from two audio sources.
[0070] In step S105, the link clock of the first communication link is the same as or synchronized with the link clock of the second communication link.
[0071] In related technologies, the clocks of CBT or BLE wireless audio terminal devices are out of sync with those of multiple CBT or BLE audio source devices, resulting in the inability to synchronously acquire and play MSWA (Multi-Screen Audio Response). This can be understood as the inconsistency of the link clocks of two communication links causing audio transmission to be out of sync. When transmitting audio based on the link clock of one communication link, if the link clock of the other communication link is faster than the reference link clock, the audio stream transmission buffer will become empty; if the link clock of the other communication link is slower than the reference link clock, the audio stream transmission buffer will overflow. Furthermore, the asynchrony or relative drift of the link clocks of the two communication links can also lead to time slot overlap. This embodiment overcomes these problems by controlling the link clocks of the two communication links to be the same or synchronized.
[0072] In some specific implementations, the clock of one communication link can be used as the reference link, and the clock of the other communication link can be adjusted based on the clock of the reference link to make the clocks of the two links the same or synchronized.
[0073] In practical implementation, the gateway device establishes a first communication link with the first audio source device and a second communication link with the audio device in a two-link topology. The gateway device can adjust the digitally controlled oscillator (NCO) of its local clock based on the link clock of the first communication link to ensure that its local clock is the same as or synchronized with the link clock of the first communication link. Then, the second communication link is established and maintained using the adjusted local clock, thereby guaranteeing that the link clocks of the first and second communication links are the same or synchronized.
[0074] In some alternative implementations, if the gateway device fails to establish the first communication link, a second communication link is established or maintained using the gateway device's original local clock.
[0075] Step S106: The first communication link and the second communication link are time-division multiplexed and at least share some time slot resources.
[0076] When the gateway device simultaneously transmits and receives wireless audio with the primary audio source device and the audio device, there will be insufficient bandwidth, which will affect the reliability of wireless audio transmission and make it difficult to achieve high-quality audio transmission.
[0077] A shared time slot between two links can be understood as a partial overlap in communication time between one link and another in the time domain. For example, if two links share a time slot for a certain communication period, then that communication period corresponds to the time slot for sending and receiving data packets on one link and also to the time slot for sending and receiving data packets on the other link.
[0078] Therefore, the first and second communication links each have pre-allocated time slot structures in the time domain, and by sharing time slots, their time slot structures at least partially overlap, thus minimizing the low data transmission efficiency and wasted time slot resources inherent in traditional time-division multiplexing communication. This time-division multiplexing method using shared time slots can improve time slot utilization and address the issue of insufficient bandwidth in gateway devices.
[0079] It is understandable that the timing relationships in steps S103, S104, S105, and S106 can be flexible and are not limited to specific steps. Figure 1 The order shown.
[0080] In some alternative implementations, when configuring an audio stream to be sent, if the sampling rate of the audio data carried therein is different from the sampling rate specified by the communication link protocol used for transmission, the gateway device can add a sampling rate conversion step during the configuration process to adapt to the link protocol specification.
[0081] In some alternative implementations, when configuring an audio stream to be sent, if the audio data to be sent comes from different audio sources, the gateway device can encapsulate them in one audio data packet or encapsulate them in different audio data packets. This application does not impose any specific restrictions on this.
[0082] The gateway-based wireless audio transmission method provided in this embodiment allows the gateway device to transmit audio bidirectionally to the first audio source device via a first communication link, and to the audio device via a second communication link. When bidirectional audio transmission occurs simultaneously on both communication links, the link clocks of the two links are identical or synchronized, and a time-division multiplexing method with shared time slots is used, effectively solving the bandwidth shortage problem in dual-source wireless audio transmission. Furthermore, the gateway device, as the direct audio source provider for the audio device, can configure a first audio stream and a third audio stream, enabling the audio device to achieve bidirectional wireless audio transmission with two audio source devices (the gateway device and the first audio source device) without needing to maintain two wireless connections simultaneously. This not only provides a better user experience but also reduces the power consumption and cost of the wireless audio device.
[0083] This embodiment provides a gateway-based wireless audio transmission method for a gateway device, the method comprising the following steps:
[0084] In step S201, the gateway device and the first audio source device perform bidirectional audio transmission based on the first communication link to send a first audio stream to the first audio source device and receive a second audio stream from the first audio source device.
[0085] Please see details Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0086] In step S202, the gateway device and the audio device perform bidirectional audio transmission based on the second communication link to send a third audio stream to the audio device and receive a fourth audio stream from the audio device.
[0087] Please see details Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0088] Step S203, when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist: configure the first audio stream to carry audio data from the fourth audio stream.
[0089] Please see details Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0090] Step S204: Configure the third audio stream to carry audio data from the second audio stream.
[0091] Please see details Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0092] In step S205, the link clock of the first communication link is the same as or synchronized with the link clock of the second communication link.
[0093] Specifically, the gateway device serves as a peripheral device for the first communication link, the central device of the first communication link is the first audio source device, and the first link clock of the first communication link is the same as or synchronized with the local clock of the first audio source device. The gateway device also serves as the central device for the second communication link, the peripheral device of the second communication link is an audio device, and the second link clock of the second communication link is the same as or synchronized with the local clock of the gateway device.
[0094] The link clock of the first communication link is the same or synchronized with the link clock of the second communication link. This can be achieved by first adjusting the local clock through the gateway device, and then configuring the link clock of the second communication link according to the adjusted local clock.
[0095] This can be understood as follows: when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device adjusts its local clock based on the first link clock so that the adjusted local clock of the gateway device is the same as or synchronized with the first link clock; the gateway device configures the second link clock based on its adjusted local clock.
[0096] Step S206: The first communication link and the second communication link are time-division multiplexed and at least share some time slot resources.
[0097] Please see details Figure 1 Step S106 of the illustrated embodiment will not be described again here.
[0098] In some optional implementations, the first communication link includes a CBT link; the second communication link uses a different link protocol than the first communication link. The second communication link may employ a BLE link protocol or other link protocols suitable for this embodiment. These link protocols may be general standard protocols or custom proprietary protocols. For example, in some specific embodiments, the second communication link may also be an improved BLE link, which is obtained by improving upon the existing BLE link protocol based on the core ideas of this application.
[0099] In a practical application, such as Figure 2As shown, the first communication link established between the gateway device and the first audio source device is a CBT link, with the first audio source device being the central device of the CBT link and the gateway device being a peripheral device of the CBT link. The second communication link established between the gateway device and the audio device is a BLE link, with the gateway device being the central device of the BLE link and the audio device being a peripheral device of the BLE link.
[0100] The first communication link includes an asynchronous connection-oriented (ACL) link and an extended synchronous connection-oriented (eSCO) link;
[0101] The second communication link includes asynchronous connection ACL links and connected isochronous group (CIG) links consisting of at least one connected isochronous streaming (CIS) link.
[0102] In practice, the connection between the gateway device and the first audio source device and the audio device includes three types: connecting only to the first audio source device; connecting only to the audio device; and connecting both the first audio source device and the audio device simultaneously.
[0103] To facilitate understanding, let's illustrate a typical application scenario using a smartphone as the primary audio source, a wireless gaming headset with a microphone as the audio device, and a USB dongle (Universal Serial Bus dongle) connecting to another smartphone as the gateway device. In this scenario, the wireless gaming headset connects to the USB dongle via a BLE link or a modified BLE link for gaming, and the USB dongle connects to the smartphone via a CBT link for answering phone calls. Game audio requires low latency and high reliability, meaning a sufficient number of retransmissions is needed without excessive latency.
[0104] When the gateway device is only connected to the first audio source device, a CBT asynchronous connection link can be established first. When a call is needed, a CBT extended synchronous connection link can be established. Then, an upper-layer hands-free protocol (HFP) application can be established to realize the voice call function.
[0105] In this system, the first audio source device serves as the central device of the first communication link, while the gateway device serves as a peripheral device of the first communication link. The first audio source device uses its local clock to configure the link clock of the first communication link. The gateway device can adjust the NCO of its local clock based on the difference between its local clock and the link clock of the first communication link, thereby making the local clock of the gateway device the same as or synchronized with the link clock of the first communication link.
[0106] When the gateway device is only connected to the audio device, a BLE asynchronous connection ACL link can be established first. When playing games, an isochronous connection link can be established. Then, the upper-layer Telephony and Media Audio Profile (TMAP) application can be established.
[0107] In this system, the gateway device acts as the central device for the second communication link, while the audio device acts as a peripheral device. The gateway device uses its local clock to configure the link clock of the second communication link. The audio device adjusts the NCO of its local clock based on the difference between its local clock and the link clock of the second communication link, thereby ensuring that the local clock of the audio device is the same as or synchronized with the link clock of the second communication link.
[0108] When the gateway device is connected to both the first audio source device and the audio device, the link clocks of the first and second communication links can be adjusted according to the connection order.
[0109] In some optional implementations, when the gateway device connects to the first audio source device first and then to the audio device, the clock relationship when connecting to the first audio source device is the same as when connecting to the first audio source device alone. When connecting to the audio device, the gateway device establishes a BLE link using a local clock adjusted according to the CBT link, and the clock of the BLE link is the same as or synchronized with the local clock of the gateway device adjusted according to the CBT link. The audio device adjusts the NCO of its local clock according to the difference between its local clock and the clock of the BLE link, so that the local clock of the audio device is the same as or synchronized with the clock of the BLE link, thereby keeping the local clock of the audio device the same as or synchronized with the clock of the CBT link.
[0110] In some optional implementations, when the gateway device connects to the audio device first and then to the first audio source device, the clock relationship when connecting to the audio device is the same as when connecting the audio device alone. When connecting to the first audio source device, the gateway device adjusts its local clock according to the CBT link, and the clock of the BLE link remains the same as or synchronized with the local clock adjusted by the gateway device according to the CBT link. The audio device adjusts its local clock's NCO based on the difference between its local clock and the BLE link clock to ensure that its local clock is the same as or synchronized with the BLE link clock, thereby ensuring that its local clock is the same as or synchronized with the CBT link clock.
[0111] In practical applications, when a gateway device disconnects the first audio source device and the audio device that are connected simultaneously, there are two scenarios: disconnecting the first audio source device first and then disconnecting the audio device, or disconnecting the audio device first and then disconnecting the first audio source device.
[0112] Specifically, if the audio device is disconnected first and then the first audio source device is disconnected, the clock relationship between the gateway device and the first audio source device after disconnecting the BLE link is the same as when the first audio source device is connected alone. If the first audio source device is disconnected first and then the audio device is disconnected, the gateway device stops adjusting its local clock according to the CBT link after disconnecting the CBT link. The clock relationship between the gateway device and the audio device is similar to when the audio device is connected alone, but it no longer needs to adjust its local clock according to the CBT link.
[0113] In some optional implementations, when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the first communication link and the second communication link are time-division multiplexed and at least share some time slot resources, including: the isochronous connection links in the second communication link share time slots with the extended synchronous connection links and the asynchronous connection links in the first communication link, respectively; the asynchronous connection links in the first communication link share time slots with the asynchronous connection links in the second communication link. This allows for more efficient use of available communication time, reduces wasted time slots, improves overall bandwidth utilization, and ensures the reliability and audio quality of dual-source wireless audio transmission.
[0114] Based on clock synchronization, this application embodiment also employs a time slot alignment method to avoid the problem of time slots not being fully utilized.
[0115] In some optional implementations, the duration of the extended synchronous connection link of the first communication link with equal time interval is the same as the duration of the equal time interval of the connection isochronous group link of the second communication link; the subinterval of the connection isochronous group link of the second communication link is M times the subinterval of the first communication link, where M is a positive integer; the duration of one subinterval of the first communication link is at least enough for the gateway device to receive a data packet of the second audio stream once and send a data packet of the first audio stream once based on the extended synchronous connection link of the first communication link.
[0116] Taking the first communication link as a CBT link as an example, the duration of the sub-interval of the first communication link is at least equal to the sum of the first time when the CBT central device sends a data packet to the CBT peripheral device (correspondingly, the CBT peripheral device receives the data packet at the first time) and the second time when the CBT peripheral device sends a data packet (correspondingly, the central device receives the data packet at the second time).
[0117] It is understandable that the central device and peripheral devices of the second communication link can each send and receive data packets once within a Subinterval of a connection isochronous group link.
[0118] Among them, limiting the duration of the extended synchronous connection link with the equal time interval of the first communication link to be the same as the duration of the equal time interval of the connection isochronous group link of the second communication link can facilitate time slot alignment on the basis of clock synchronization and improve the time slot utilization of the two communication links.
[0119] In some optional implementations, the time interval between the starting point of the isochronous group link in the second communication link and the starting point of the extended synchronous connection link in the first communication link is N times the sub-interval of the second communication link, where N is a positive integer.
[0120] The starting point refers to the initial time. The starting point of the second communication link connecting to the isochronous group link can be understood as the starting time of each isochronous interval on the second communication link connecting to the isochronous group link. The starting point of the extended synchronization connection link in the first communication link can be understood as the starting time of each isochronous interval on the extended synchronization connection link in the communication link. The time interval between the starting point of the second communication link connecting to the isochronous group link and the starting point of the extended synchronization connection link in the first communication link can be understood as the time interval between the starting point of a second communication link connecting to the isochronous group link and the starting point of the extended synchronization connection link of the first communication link whose time domain location is closest to it.
[0121] It is understandable that when the link clocks of two links are the same or synchronized, the starting time of each subsequent equal time interval can satisfy the difference in the starting interval mentioned above.
[0122] By configuring the offset between the equal time intervals of the two communication links and the duration relationship of the sub-intervals of the second communication link, the time slot alignment relationship can be further optimized and the time slot utilization rate can be improved.
[0123] In some optional implementations, the communication duration of the asynchronous connection link of the second communication link is S times the sub-interval of the second communication link, where S is a positive integer.
[0124] It is understandable that the communication duration of the asynchronous connection link of the second communication link can be used at least for the central device and peripheral devices of the second communication link to each send and receive asynchronous link data packets once based on the asynchronous connection link.
[0125] The above configuration can further optimize the time slot alignment relationship and improve time slot utilization by constraining the communication duration of the ACL link and the duration of the sub-interval of the second communication link.
[0126] In the above optional implementations, the values of M, N, and S can be configured according to specific application scenarios, and this application does not impose specific limitations on this. In a specific application scenario, M, N, and S can be configured to be equal.
[0127] In some alternative implementations, the existing BLE link protocol can be further improved. For example, the asynchronous connection link in the second communication link shares a time slot with the connection isochronous group link in the second communication link. In this embodiment, the second communication link can further improve the time slot utilization by configuring the connection isochronous group link and the asynchronous connection link to share a time slot, so as to solve the problem of insufficient bandwidth.
[0128] In some alternative implementations, the existing BLE link protocol can be further improved, such as by using a smaller packet interval for the second communication link than the packet interval specified in the BLE link protocol, and / or by using a smaller time slot interval for the second communication link than the smaller time slot interval specified in the BLE link protocol.
[0129] The BLE link protocol specifies that both the packet interval and the minimum time slot interval are 150µs.
[0130] By using a smaller packet interval and minimum time slot interval than specified by the BLE link protocol, this link can not only further support time slot alignment, but also help the second communication link to transmit more data or achieve a higher coding rate per unit time, for example, by using a higher microphone sampling rate.
[0131] The above configuration allows multiple links to share time slots, thus enabling the configuration of link priorities to further optimize time slot resource allocation. It is understood that various link priority configuration methods can be adopted depending on the specific application scenario, and this application does not impose any specific restrictions on this.
[0132] In some alternative embodiments, link priorities can be configured based on the principle of prioritizing audio transmission, thereby prioritizing audio performance, that is, ensuring that the links that get time slot resources first have better audio performance.
[0133] For example, in the aforementioned embodiments, when the isochronous connection group links in the second communication link share time slots with the extended synchronous connection links and the asynchronous connection links in the first communication link, respectively, the link priority of the asynchronous connection links in the first communication link can be further configured to be lower than the link priority of the isochronous connection group links in the second communication link. Then, when both audio transmission services on the isochronous connection group links of the second communication link and asynchronous link data transmission services on the asynchronous connection links of the first communication link exist within a shared time slot, the audio transmission services on the isochronous connection group links are processed, while the asynchronous link data transmission services are not processed.
[0134] For example, in the aforementioned embodiments, when asynchronous links in the first communication link and asynchronous links in the second communication link share a time slot, the link priority of the asynchronous links in the first communication link can be further configured to be lower than the link priority of the isochronous connection group links in the second communication link. Then, if both a first asynchronous link data transmission service on the asynchronous link in the first communication link and a second asynchronous link data transmission service on the asynchronous link in the second communication link exist within a shared time slot, the second asynchronous link data transmission service is processed, while the first asynchronous link data transmission service is not processed.
[0135] For example, in the aforementioned embodiments, when the asynchronous connection link in the second communication link shares a time slot with the connected isochronous group link in the second communication link, the link priority of the connected isochronous group link in the second communication link can be further configured to be higher than the link priority of the asynchronous connection link in the second communication link. Then, if both asynchronous link data transmission services on the asynchronous connection link in the second communication link and audio transmission services on the connected isochronous group link in the second communication link exist within a shared time slot, the audio transmission service is processed, while the asynchronous link data transmission service is not processed.
[0136] In some optional implementations, when configured to prioritize audio services between the gateway device and the first audio source device, at the same time, the link priority of the extended synchronous connection link of the first communication link, the link priority of the connection isochronous group link in the second communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease sequentially.
[0137] Therefore, by configuring link priorities, time-division multiplexing with shared time slots is used between the first and second communication links to support bidirectional audio transmission between the gateway device and the first audio source device, as well as bidirectional audio transmission between the gateway device and the audio device. Within an equal time interval, the gateway device will first complete the sending and receiving of audio data packets on the first communication link (i.e., sending audio data packets in the first audio stream and receiving audio data packets in the second audio stream). Then, if there are remaining time slots within the equal time interval, the gateway device will complete the sending and receiving of audio data packets on the second communication link (i.e., sending audio data packets in the third audio stream and receiving audio data packets in the fourth audio stream). If there are remaining time slots within the equal time interval, the remaining time slot resources will be used to process transmission services on asynchronous connection links.
[0138] In some alternative implementations, when configured to prioritize audio services between the gateway device and the audio device, at the same time, the link priority of the isochronous group link in the second communication link, the link priority of the extended synchronous connection link in the first communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease sequentially.
[0139] Therefore, by configuring link priorities, time-division multiplexing with shared time slots is used between the first and second communication links to support bidirectional audio transmission between the gateway device and the first audio source device, as well as bidirectional audio transmission between the gateway device and the audio device. In a time interval, the gateway device will first complete the sending and receiving of audio data packets on the second communication link. Then, if there are remaining time slots in the time interval, the gateway device will complete the sending and receiving of audio data packets on the first communication link. If there are still remaining time slots in the time interval, the remaining time slot resources will be used to process transmission services on asynchronous connection links.
[0140] In some alternative implementations, while bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device is also used to forward control commands between the audio device and the first audio source device.
[0141] To make it easier to understand, we can still use the typical application scenario described above, in which a smartphone is used as the primary audio source device, a wireless gaming headset with a microphone is used as the audio device, and a USB dongle connected to another smartphone is used as the gateway device.
[0142] In this typical application scenario, the link parameters of the isochronous group link of the second communication link can be configured to meet the time slot requirements. It is understood that these link parameter configurations, combined with this typical application scenario, are merely illustrative and do not constitute a limitation on the scope of protection of this application.
[0143] Typically, smartphones' HFP function uses 2EV3 packets when establishing Extended Synchronous Connection-Oriented (eSCO) links. Each slot on a CBT link is 625µs. The central device and peripheral devices on the CBT link each send and receive 2EV3 packets at least once, each occupying one slot, totaling 1.25ms. Within each eSCO interval, there are generally two retransmissions, so the maximum time occupied within each eSCO interval may be 3.75ms. In addition, the CBT ACL link for maintaining the connection between the USB dongle and the smartphone randomly occupies some slots for link maintenance or transmitting link management commands. Therefore, within each eSCO interval, very few slots are left for the BLE link to transmit audio data and maintain the connection with the wireless gaming headset. To enable simultaneous transmission of two audio streams and ensure high reliability of game audio transmission, it is necessary to improve the slot utilization of both links to increase their effective bandwidth.
[0144] Based on the aforementioned core ideas of this invention, the Connected Isochronous Group (CIG) link of the second communication link in the above application scenario can be configured. The isochronous interval of the CIG link of the second communication link is set to be the same as the extended synchronous connection interval of the extended synchronous connection link in the first communication link, i.e., 7.5ms. Secondly, the CIG link of the second communication link is set to use Low Complexity Communication Codec (LC3), with a frame length of 7.5ms. The peripheral device of the CIG link of the second communication link, i.e., the mono microphone of the wireless gaming headset, has a sampling rate of 16kHz and an encoding rate of 32kbps. The central device of the CIG link of the second communication link, i.e., the USB dongle, has a stereo sampling rate of 48kHz and an encoding rate of 96kbps per channel. The size of the mono Service Data Unit (SDU) sent by the peripheral device is 30 bytes, and the size of the stereo SDU sent by the central device is 180 bytes. The CIG link includes a Connected Isochronous Streaming (CIS) link, employing a BLE 2Mbps physical layer (PHY). The CIS PDU (Protocol Data Unit) transmitted by the central device occupies 780µs of airtime, while the CIS PDU transmitted by peripheral devices occupies 180µs of airtime. The CIS link's Sub-Interval is 1.25ms, with the Inter-Frame Space (T_IFS) being 140µs and the Minimum Slot Space (T_MSS) being 150µs. Within the 7.5ms isochronous interval, there are a maximum of 6 sub-events, i.e., the Number of Sub-Events (NSE) equals 6. For low-latency game audio, the CIS link's Flush Timeout parameter is 1. The asynchronous connection interval of the second communication link is 45ms, and the transmission and reception within each connection interval takes up to 1.25ms. The offset of the CIS link relative to the ACL link of the second communication link is 2.5ms.Therefore, the transmit / receive time of the ACL link in the second communication link overlaps with the fifth CIS sub-event in one of the six equal-time intervals of the CIS link. That is, if the CISPDU within that equal-time interval requires a fourth retransmission, it will occupy the transmit / receive time of the ACL link in the second communication link. To ensure audio performance on the second communication link, when the transmit / receive time of the ACL in the second communication link overlaps with the CIG retransmission time, the CIG link takes priority.
[0145] The time coexistence relationship between BLE links in TMAP applications and CBT links in HFP applications, such as... Figure 3 As shown. The eSCO interval of the CBT link is 7.5ms, and the ISO interval of the CIG link of the BLE link is also 7.5ms. The offset of the start of each ISO interval of the CIG link of the BLE link relative to the start of each eSCO interval of the CBT link is 1.25ms. HFP represents the timeline of the CBT link, where C1 represents the air time for the CBT central device to send 2EV3 packets (corresponding to the time for the CBT peripheral device to receive 2EV3 packets), P1 represents the air time for the CBT peripheral device to send 2EV3 packets (corresponding to the time for the CBT central device to receive 2EV3 packets), c1 represents the air time for the CBT central device to send 1 slot ACL packet, and p1 represents the air time for the CBT peripheral device to send 1 slot ACL packet. Figure 3 In the diagram, TMAP represents the timeline of the BLE link, C2 represents the air time for the BLE central device to send a CIS PDU (corresponding to the time for the BLE peripheral device to receive a CIS PDU), and P2 represents the air time for the BLE peripheral device to send a CIS PDU (corresponding to the time for the BLE central device to receive a CIS PDU). Solid lines represent the first transmit / receive time slot of each eSCO Interval for the eSCO link or each ISO Interval for the CIG link, while dashed lines represent retransmission time slots or time slots that may not be transmitted or received. The maximum number of retransmissions within an eSCO Interval is 2 for the eSCO link and 5 for the BLE CIG link within an ISO Interval.
[0146] Depend on Figure 3Therefore, when the BLE and CBT links of a USB dongle are time-division multiplexed, as long as the clocks of the BLE and CBT links remain the same or synchronized, the BLE and CBT links can share the maximum transmit and receive time, thus avoiding time slot waste caused by clock asynchrony or misalignment. Furthermore, the transmit and receive time slots of the CBT link's eSCO link within each eSCO interval can be shared with the CIG link of the BLE link. The time slots of the CBT link's ACL link and the BLE link's ACL link can also be shared by the BLE link's CIG link.
[0147] Furthermore, the airtime occupied by audio data packets is adjusted by modifying the sampling rate and coding rate, and the sub-interval duration is adjusted by modifying parameters such as T_IFS and T_MSS to ensure that the sub-interval is a multiple of 1.25ms. By adjusting the offset between the CIG and eSCO link start points to a multiple of 1.25ms, the BLE and CBT links of the USBDongle are able to fully share time-division multiplexed time slots, improving the link efficiency of the CBT and BLE links. This allows HFP calls and wireless game audio to coexist or be transmitted and received simultaneously, while ensuring the communication performance or reliability of wireless game audio.
[0148] like Figure 3 As shown, voice calls on the CBT link's eSCO link can receive up to 2 retransmissions, while game audio on the BLE link's CIG link can receive up to 5 retransmissions. Since the ISO Interval duration of the CIG link is also configured as an integer multiple of its sub-interval, all time slots within an ISO Interval of the CIG link can be used for game audio transmission when needed, effectively ensuring the communication performance and reliability of wireless game audio. The BLE link's CIG link can further improve the communication performance and reliability of game audio by setting a larger refresh timeout parameter (FT) greater than 1, thereby increasing the appropriate latency. Additionally, if the smartphone allows, voice calls on the CBT link's eSCO link can also receive more retransmissions.
[0149] In specific embodiments, when packet loss occurs on the CIG link and eSCO link, the application layer can use the Packet Loss Concealment (PLC) algorithm to compensate for better call and wireless game audio quality.
[0150] In a specific embodiment, the USB Dongle acts as a CBT gateway, which, in addition to forwarding audio data, can also forward various control commands of the HFP protocol between the wireless gaming headset and the smartphone.
[0151] In some optional implementations, audio services can be prioritized based on actual conditions to determine link priorities for time slot allocation. In the above application environment, when HFP call functionality takes priority (i.e., when audio services between the gateway device and the first audio source device are prioritized), within each eSCO Interval, 2EV3 packets of the CBT link's eSCO link are transmitted and received first. After both the CBT central device and CBT peripheral devices correctly receive the 2EV3 packets, retransmission stops, and time slot priority is transferred to the BLE link's CIG link. Within the CIG ISO Interval, after both the BLE central device and BLE peripheral devices correctly receive the CIS PDU, retransmission stops, and time slot priority is then transferred to the CBT link's ACL link. When the transmit / receive time slots of the CBT link's ACL link conflict with those of the BLE link's ACL link, the BLE link's ACL link takes priority.
[0152] When TMAP game audio functionality takes priority (i.e., when audio services between the gateway device and the audio device are prioritized), within each ISO Interval, CIS PDUs are transmitted and received first. Once both the BLE central device and BLE peripheral devices have correctly received the CIS PDU packet, retransmission stops, and time slot priority is given to the eSCO link of the CBT link. Within the eSCO Interval, once both the CBT central device and CBT peripheral devices have correctly received the 2EV3 packet, retransmission stops, and time slot priority is then given to the ACL link of the CBT link and the ACL link of the BLE link. When the transmit / receive time slots of the ACL link of the CBT link conflict with those of the ACL link of the BLE link, the ACL link of the BLE link takes priority.
[0153] In some specific implementations, when a USB dongle is connected to a first audio source device via a CBT link, and another smartphone transmits USB (Universal Serial Bus) audio via the USB dongle, the external input clock of the USB audio may be inconsistent with the local clock of the USB dongle. Therefore, the USB audio needs to undergo sampling rate conversion before it can be transmitted and received via the BLE link. In other words, the USB audio needs to be converted using an asynchronous sampling rate converter (ASRC) based on the estimated deviation between the local clock and the external input clock of the USB dongle before it can be transmitted and received via the BLE link.
[0154] Additionally, if the sampling rate of the audio received by the USB Dongle from the first audio source device via the CBT link differs from the sampling rate converted USB Audio, it needs to be converted first, then mixed with the USB Audio, then encoded, and sent to the wireless gaming headset via the BLE link. Similarly, if the sampling rate of the audio received by the USB Dongle from the wireless gaming headset via the BLE link differs from the sampling rate of the audio sent to the first audio source device via the CBT link, it needs to be converted first, then encoded, and then sent to the first audio source device via the CBT link. If the sampling rate of the voice received by the USB Dongle from the wireless gaming headset via the BLE link differs from the clock or sampling rate of the USB Audio, it also needs to be converted before being sent to another smartphone via USB.
[0155] Based on the above configuration, the embodiments of this application can be applied to a variety of specific application scenarios to meet the different application needs of users and provide better wireless audio services.
[0156] In some alternative implementations, while bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, a third audio stream is configured to carry audio data from the second audio stream and local audio data from the gateway device. The first audio stream can also be configured to carry audio data from a fourth audio stream.
[0157] In one application scenario, the gateway device can be a tablet computer, the primary audio source device can be a smartphone, and the audio device can be a wireless headset connected to the gateway device. In this scenario, a user can use the wireless headset to watch movies or TV shows on the tablet computer while simultaneously making and receiving phone calls on the smartphone (the primary audio source device) via the tablet computer.
[0158] In some alternative implementations, the gateway device can also connect to a second audio source device for unidirectional audio transmission to receive a sixth audio stream from the second audio source device, wherein...
[0159] When unidirectional audio transmission with a second audio source device, bidirectional audio transmission with an audio device, and bidirectional audio transmission with a first audio source device coexist, a third audio stream is configured to carry one or more of the following: audio data from the second audio stream, audio data from the sixth audio stream, and local audio data from the gateway device; the first audio stream can also be configured to carry audio data from the fourth audio stream.
[0160] In some optional implementations, the gateway device can also connect to a second audio source device for bidirectional audio transmission, to send a fifth audio stream to the second audio source device and receive a sixth audio stream from the second audio source device, wherein...
[0161] When bidirectional audio transmission with a second audio source device and bidirectional audio transmission with an audio device coexist, a third audio stream is configured to carry audio data from a sixth audio stream and / or local audio data from a gateway device; a fifth audio stream is configured to carry audio data from a fourth audio stream; and a first audio stream can also be configured to carry audio data from a fourth audio stream.
[0162] In some optional implementations, the gateway device can also connect to a second audio source device for bidirectional audio transmission, to send a fifth audio stream to the second audio source device and receive a sixth audio stream from the second audio source device, wherein...
[0163] When bidirectional audio transmission with a second audio source device, bidirectional audio transmission with an audio device, and bidirectional audio transmission with a first audio source device coexist, a first audio stream is configured to carry audio data from a fourth audio stream; a third audio stream is configured to carry one or more of audio data from a second audio stream, audio data from a sixth audio stream, and local audio data from a gateway device; and a fifth audio stream is configured to carry audio data from the fourth audio stream. Alternatively, the first audio stream can be configured to carry audio data from the fourth audio stream.
[0164] In the above embodiments, the second audio source device and the gateway device can be connected by a wire. The second audio source device can be various devices suitable for this embodiment, such as smartphones and tablets. The second audio source device can be the same as or different from the first audio source device.
[0165] In a specific application scenario, the first audio source device is a smartphone, the second audio source device is another personal computer, the audio device is a wireless headset, and the gateway device is a USB adapter dongle that plugs into the personal computer via a USB interface. The user can wear the wireless headset and connect to the USB dongle via a second communication link to play single-player games on the computer at the second audio source device, while simultaneously using the USB dongle as a gateway device to connect to the smartphone at the first audio source device to answer phone calls.
[0166] In another specific application scenario, the gateway device is a smartphone, the audio device is a wireless headset, the first audio source device is another smartphone, and the second audio source device is a computer. The gateway device's smartphone mixes local music, game music from the computer, and voice messages from the other end of the call from the other smartphone and sends them to the wireless headset. It also sends the user's voice information collected by the wireless headset to the other smartphone, allowing the user to listen to music, play a single-player game on the computer, and make and receive phone calls simultaneously.
[0167] When the gateway device connects to the second audio source device for bidirectional audio transmission, sending a fifth audio stream to the second audio source device and receiving a sixth audio stream from the second audio source device, the system structure diagram of the gateway device, the first audio source device, the second audio source device, and the audio devices is as follows: Figure 4 As shown. When bidirectional audio transmission with the second audio source device, bidirectional audio transmission with the audio device, and bidirectional audio transmission with the first audio source device coexist, the gateway device will receive the second audio stream from the first audio source device and the sixth audio stream from the second audio source device. By decoding them, the audio data of the corresponding audio stream can be obtained. Then, according to the actual situation, the audio data can be selected and added to the corresponding audio stream.
[0168] In another specific application scenario, the gateway device is a USB adapter, the audio device is a wireless headset, the first audio source device is a smartphone, and the second audio source device is another smartphone connected to the USB adapter via a wired connection. The USBDongle mixes the call audio from the smartphone at the first audio source device with the game audio from the smartphone at the second audio source device and sends it to the wireless headset. It also forwards the user's voice collected by the wireless headset to both smartphones, allowing the user to make and receive calls, listen to game music, and communicate with teammates in the game simultaneously.
[0169] In another specific application scenario, the gateway device is a smartphone, the audio device is a wireless headset, the first audio source device is another smartphone, and the second audio source device is a computer. The wireless headset user listens to music on the smartphone connected to the gateway device while simultaneously playing a game on the computer. The smartphone forwards the game's voice chat to the computer. At the same time, the wireless headset user makes and receives phone calls to the other smartphone using their smartphone.
[0170] It is understood that, in addition to the specific application scenarios listed above, the gateway-based wireless audio transmission method provided in this embodiment can also support more dual-source wireless audio or multi-source wireless audio application scenarios, which will not be listed one by one in this article.
[0171] This embodiment provides a gateway-based wireless audio transmission system. Figure 5 This is a schematic diagram of the system architecture of a gateway-based wireless audio transmission system. The system includes a first audio source device, an audio device, and a gateway device.
[0172] A gateway device is used to perform bidirectional audio transmission with a first audio source device based on a first communication link, so as to send a first audio stream to the first audio source device and receive a second audio stream from the first audio source device;
[0173] The gateway device is also used to conduct bidirectional audio transmission with the audio device via a second communication link, in order to send a third audio stream to the audio device and receive a fourth audio stream from the audio device.
[0174] When bidirectional audio transmission between the gateway device and the first audio source device, and bidirectional audio transmission with the audio device coexist:
[0175] The gateway device is also used to configure the first audio stream to carry audio data from the fourth audio stream;
[0176] The gateway device is also used to configure a third audio stream to carry audio data from a second audio stream;
[0177] The link clock of the first communication link is the same as or synchronized with the link clock of the second communication link;
[0178] The first communication link and the second communication link are time-division multiplexed and at least share some time slot resources.
[0179] In some optional implementations, the gateway device is used as a peripheral device of the first communication link, the central device of the first communication link is the first audio source device, and the first link clock of the first communication link is the same as or synchronized with the local clock of the first audio source device; the gateway device is used as the central device of the second communication link, the peripheral device of the second communication link is an audio device, and the second link clock of the second communication link is the same as or synchronized with the local clock of the gateway device.
[0180] In some alternative implementations, when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device adjusts its local clock based on the first link clock so that the adjusted local clock of the gateway device is the same as or synchronized with the first link clock; the gateway device configures a second link clock based on its adjusted local clock.
[0181] In some alternative implementations, the first communication link includes a CBT link; the second communication link has a different link protocol than the first communication link.
[0182] In some optional implementations, the first communication link includes an asynchronous connection link and an extended synchronous connection link; the second communication link includes an asynchronous connection link and a connection isochronous group link consisting of at least one connection isochronous stream link; when bidirectional audio transmission between the gateway device and the first audio source device and bidirectional audio transmission with the audio device coexist, the first communication link and the second communication link are time-division multiplexed and at least share some time slot resources, including: the connection isochronous group link in the second communication link shares time slots with the extended synchronous connection link in the first communication link and the asynchronous connection link in the first communication link, respectively; the asynchronous connection link in the first communication link shares time slots with the asynchronous connection link in the second communication link.
[0183] In some optional implementations, the duration of the isochronous interval of the extended synchronous connection link of the first communication link is the same as the duration of the isochronous interval of the connection isochronous group link of the second communication link; the sub-interval of the connection isochronous group link of the second communication link is M times the sub-interval of the first communication link, where M is a positive integer; the duration of one sub-interval of the first communication link is at least sufficient for the gateway device to receive a data packet of the second audio stream once and send a data packet of the first audio stream once based on the extended synchronous connection link of the first communication link.
[0184] In some optional implementations, the time interval between the starting point of the isochronous group link in the second communication link and the starting point of the extended synchronous connection link in the first communication link is N times the sub-interval of the second communication link, where N is a positive integer; the communication duration of the asynchronous connection link of the second communication link is S times the sub-interval of the second communication link, where S is a positive integer.
[0185] In some alternative implementations, M, N, and S are equal.
[0186] In some optional implementations, the asynchronous connection links in the second communication link share time slots with the connected isochronous group links in the second communication link; the inter-packet interval used by the second communication link is less than the inter-packet interval specified by the BLE link protocol, and / or, the minimum time slot interval used by the second communication link is less than the minimum time slot interval specified by the BLE link protocol.
[0187] In some optional implementations, when configured to prioritize audio services between the gateway device and the first audio source device, at the same time, the link priority of the extended synchronous connection link of the first communication link, the link priority of the connection isochronous group link in the second communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease sequentially.
[0188] In some optional implementations, when configured to prioritize audio services between the gateway device and the audio device, at the same time, the link priority of the isochronous group link in the second communication link, the link priority of the extended synchronous connection link in the first communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease sequentially.
[0189] In some alternative implementations, when bidirectional audio transmission between the gateway device and the first audio source device and bidirectional audio transmission between the gateway device and the audio device coexist, a third audio stream is configured to carry audio data from the second audio stream and local audio data from the gateway device.
[0190] In some alternative implementations, the gateway-based wireless audio transmission system may further include a second audio source device.
[0191] In some alternative implementations, the gateway device connects to the second audio source device for unidirectional audio transmission to receive a sixth audio stream from the second audio source device. A third audio stream is configured to carry one or more of the following: audio data from the second audio source device, audio data from the sixth audio stream, and local audio data from the gateway device, while unidirectional audio transmission with the second audio source device, bidirectional audio transmission with the audio device, and bidirectional audio transmission with the first audio source device coexist.
[0192] In some optional implementations, the gateway device connects to the second audio source device for bidirectional audio transmission, sending a fifth audio stream to the second audio source device and receiving a sixth audio stream from the second audio source device, wherein...
[0193] When bidirectional audio transmission with the second audio source device and bidirectional audio transmission with the audio device coexist, configure the third audio stream to carry audio data from the sixth audio stream and / or local audio data from the gateway device; configure the fifth audio stream to carry audio data from the fourth audio stream.
[0194] When bidirectional audio transmission with a second audio source device, bidirectional audio transmission with an audio device, and bidirectional audio transmission with a first audio source device coexist, configure a first audio stream to carry audio data from a fourth audio stream; configure a third audio stream to carry one or more of audio data from a second audio stream, audio data from a sixth audio stream, and local audio data from a gateway device; and configure a fifth audio stream to carry audio data from a fourth audio stream.
[0195] In some alternative implementations, while bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device is also used to forward control commands between the audio device and the first audio source device.
[0196] This invention also provides an electronic device, please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 6As shown, the electronic device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are coupled to each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0197] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0198] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0199] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0200] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0201] The electronic device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0202] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touch screen.
[0203] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0204] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0205] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A gateway-based wireless audio transmission method for a gateway device, characterized in that, The method includes: The gateway device and the first audio source device perform bidirectional audio transmission based on the first communication link to send a first audio stream to the first audio source device and receive a second audio stream from the first audio source device. The gateway device and the audio device perform bidirectional audio transmission based on the second communication link to send a third audio stream to the audio device and receive a fourth audio stream from the audio device; When bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist: Configure the first audio stream to carry audio data from the fourth audio stream; Configure the third audio stream to carry audio data from the second audio stream; The link clock of the first communication link is the same as or synchronized with the link clock of the second communication link; The first communication link and the second communication link are time-division multiplexed and at least share some time slot resources.
2. The method according to claim 1, characterized in that, The method further includes: The gateway device is used as a peripheral device for the first communication link, the central device of the first communication link is the first audio source device, and the first link clock of the first communication link is the same as or synchronized with the local clock of the first audio source device. The gateway device serves as the central device for the second communication link, the peripheral device for the second communication link is the audio device, and the second link clock of the second communication link is the same as or synchronized with the local clock of the gateway device.
3. The method according to claim 2, characterized in that, The method further includes: when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device adjusts its local clock based on the first link clock so that the adjusted local clock of the gateway device is the same as or synchronized with the first link clock. The gateway device configures the second link clock based on its adjusted local clock.
4. The method according to claim 1, characterized in that, The first communication link includes a CBT link; the second communication link has a different link protocol than the first communication link.
5. The method according to claim 4, characterized in that, The first communication link includes an asynchronous connection link and an extended synchronous connection link; The second communication link includes an asynchronous connection link and a connection isochronous group link consisting of at least one connection isochronous stream link; When bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the first communication link and the second communication link are time-division multiplexed and at least share some time slot resources, including: The isochronous connection links in the second communication link share time slots with the extended synchronous connection links and the asynchronous connection links in the first communication link, respectively. The asynchronous connection link in the first communication link shares a time slot with the asynchronous connection link in the second communication link.
6. The method according to claim 5, characterized in that, The duration of the isochronous interval of the extended synchronous connection link of the first communication link is the same as the duration of the isochronous interval of the connection isochronous group link of the second communication link. The sub-interval of the second communication link isochronous group link is M times the sub-interval of the first communication link, where M is a positive integer; The duration of a sub-interval of the first communication link is at least sufficient for the gateway device to receive a data packet of the second audio stream and send a data packet of the first audio stream once, based on the extended synchronous connection link of the first communication link.
7. The method according to claim 6, characterized in that, The time interval between the starting point of the isochronous group link in the second communication link and the starting point of the extended synchronous connection link in the first communication link is N times the sub-interval of the second communication link, where N is a positive integer; The communication duration of the asynchronous connection link of the second communication link is S times the sub-interval of the second communication link, where S is a positive integer.
8. The method according to claim 7, characterized in that, The values of M, N, and S are equal.
9. The method according to any one of claims 5 to 8, characterized in that, The asynchronous connection links in the second communication link share time slots with the isochronous connection links in the second communication link; The second communication link uses a packet interval smaller than the packet interval specified in the BLE link protocol, and / or the second communication link uses a minimum time slot interval smaller than the minimum time slot interval specified in the BLE link protocol.
10. The method according to claim 9, characterized in that, When configured to prioritize audio services between the gateway device and the first audio source device, at the same time, the link priority of the extended synchronous connection link of the first communication link, the link priority of the isochronous connection link in the second communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease in sequence.
11. The method according to claim 9, characterized in that, When configured to prioritize audio services between the gateway device and the audio device, at the same time, the link priority of the isochronous connection link in the second communication link, the link priority of the extended synchronous connection link in the first communication link, the link priority of the asynchronous connection link in the second communication link, and the link priority of the asynchronous connection link in the first communication link decrease sequentially.
12. The method according to claim 1, characterized in that, The method further includes configuring the third audio stream to carry audio data from the second audio stream and local audio data from the gateway device when bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist.
13. The method according to claim 1, characterized in that, The method further includes the gateway device connecting to the second audio source device for unidirectional audio transmission to receive a sixth audio stream from the second audio source device, wherein... When one-way audio transmission with the second audio source device, two-way audio transmission with the audio device, and two-way audio transmission with the first audio source device coexist, the third audio stream is configured to carry one or more of the following: audio data from the second audio stream, audio data from the sixth audio stream, and local audio data from the gateway device. or, The method further includes the gateway device connecting to the second audio source device for bidirectional audio transmission, to send a fifth audio stream to the second audio source device and receive a sixth audio stream from the second audio source device, wherein... When bidirectional audio transmission with the second audio source device and bidirectional audio transmission with the audio device coexist, the third audio stream is configured to carry audio data from the sixth audio stream and / or local audio data from the gateway device; the fifth audio stream is configured to carry audio data from the fourth audio stream. When bidirectional audio transmission with the second audio source device, bidirectional audio transmission with the audio device, and bidirectional audio transmission with the first audio source device coexist, the first audio stream is configured to carry audio data from the fourth audio stream; the third audio stream is configured to carry one or more of audio data from the second audio stream, audio data from the sixth audio stream, and local audio data from the gateway device; and the fifth audio stream is configured to carry audio data from the fourth audio stream.
14. The method according to claim 1, characterized in that, When bidirectional audio transmission with the first audio source device and bidirectional audio transmission with the audio device coexist, the gateway device is also used to forward control commands between the audio device and the first audio source device.
15. A gateway-based wireless audio transmission system, characterized in that, The system includes a first audio source device, an audio device, and a gateway device as described in any one of claims 1 to 14; The gateway device is used to perform bidirectional audio transmission with the first audio source device based on a first communication link, so as to send a first audio stream to the first audio source device and receive a second audio stream from the first audio source device; The gateway device is also used to perform bidirectional audio transmission with the audio device based on a second communication link, so as to send a third audio stream to the audio device and receive a fourth audio stream from the audio device; When bidirectional audio transmission between the gateway device and the first audio source device, and bidirectional audio transmission with the audio device coexist: The gateway device is also configured to configure the first audio stream to carry audio data from the fourth audio stream; The gateway device is also configured to configure the third audio stream to carry audio data from the second audio stream; The link clock of the first communication link is the same as or synchronized with the link clock of the second communication link; The first communication link and the second communication link are time-division multiplexed and at least share some time slot resources.
16. An electronic device, characterized in that, include: A memory and a processor, the memory and the processor being coupled to each other, the memory storing instructions, the processor executing the instructions to perform the gateway-based wireless audio transmission method according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the gateway-based wireless audio transmission method as described in any one of claims 1 to 14.