Full wireless earbuds are two earbuds that connect to each other wirelessly. Typically such full wireless earbuds follow a relay format or a sniff format. In the relay format, one earbud serves a master role, and the other earbud serves a slave role. The master earbud receives audio from a host, e.g., a mobile phone or other audio playback device, then relays the audio to the slave earbud. In the sniff format, one earbud is a primary earbud, and the other earbud is a secondary earbud. The primary earbud receives and acknowledges audio packets from the host, while the secondary earbud only receives audio, or “sniffs,” but never acknowledges the packet. If the secondary earbud loses packets, it will ask the primary earbud to re-transmit the packets.
Role switch between two earbuds happens when the roles of earbuds change. For example, for relay format earbuds, the master becomes the slave, and the slave becomes the master. For sniff format earbuds, the primary earbud becomes secondary, and the secondary earbud becomes primary. Role switch can happen if, for example, the slave earbud has better received signal strength, if the master earbud is running on lower battery than the slave, if the master earbud is taken out of the user's ear or put in a case, etc.
Wireless earbuds in relay format typically have a first asynchronous connection-less (ACL) link between the host device and the master earbud, where the master earbud is a Bluetooth slave in this ACL link. A second ACL link exists between the master earbud and the slave earbud. In this second ACL, the master earbud is the Bluetooth master, and the slave earbud is the Bluetooth slave.
In this format, it is very difficult to achieve seamless role switch. For example, most, if not all, profiles in the ACL between the master earbud and the host device need to be transferred to the slave earbud silently, so that after role switch the new master earbud can continue receiving audio packets. Further, a Bluetooth role switch is also required as the old master earbud becomes the new slave earbud, while the old slave earbud becomes new master earbud, because the master earbud should also be the Bluetooth master to be efficient at Bluetooth transmission.
A solution is provided to make the role switch of fully wireless earbuds in relay format “seamless.” As such, no audio glitch is perceptible when the role switch occurs.
One aspect of the disclosure provides a method for performing role switch between a first device operating as a master and a second device operating as a slave. The method includes receiving, by the first device, packets from a host device, forwarding the received packets from the first device to the second device, increasing a central processing unit (CPU) clock rate in each of the first device and the second device, performing a first stage role switch and performing a second stage role switch. The first stage role switch includes establishing a communication link between the second device and the host device, and notifying the host device that the second device is operating as a new master. Between the first and second stage, the second device receives packets from the host device and forwards the received packets from the second device to the first device according to a preset schedule. When audio buffers of the first device and the second device reach a predetermined level, the second stage role switch is performed at the first and second devices. The second stage role switch includes passing, from the first device to the second device, control of timing for sending packets from the second device as the new master to the first device as the new slave. When the second stage is complete, the CPU clock rates in the first and second devices may be reduced.
Another aspect of the disclosure provides a system, including a first audio receiver device adapted to operate in a master role and a slave role, and a second audio receiver device adapted to operate in a master role and a slave role. Each of the first and second audio receiver devices include a wireless communication interface adapted to receive audio packets over a wireless connection, an audio buffer adapted to temporarily store the received audio packets, a speaker adapted to playback the audio packets temporarily stored in the audio buffer, and a processor in communication with the wireless communication interface. The processor may be configured to execute a two-stage role switch operation, including receiving, by the first device, packets from a host device, forwarding the received packets from the first device to the second device, increasing a central processing unit (CPU) clock rate in each of the first device and the second device, performing a first stage role switch at the first and second devices, the first stage role switch including establishing a communication link between the second device and the host device and notifying the host device that the second device is operating as a new master. The processor may be further configured to receive, by the second device, packets from the host device, forwarding the received packets from the second device to the first device according to a preset schedule, when audio buffers of the first device and the second device reach a predetermined level, perform a second stage role switch at the first and second devices, the second stage role switch comprising passing, from the first device to the second device, control of timing for sending packets from the second device as the new master to the first device as the new slave, and decrease the CPU clock rates in the first and second devices.
Yet another aspect of the disclosure provides a system, including a first audio receiver device and a second audio receiver device adapted to wirelessly pair with the first audio receiver device. The first audio receiver device and second audio receiver device are configured to perform a two stage role switch operation, including receiving, by the first device, packets from a host device, forwarding the received packets from the first device to the second device, increasing a central processing unit (CPU) clock rate in each of the first device and the second device, performing a first stage role switch at the first and second devices, the first stage role switch including establishing a communication link between the second device and the host device and notifying the host device that the second device is operating as a new master, receiving, by the second device, packets from the host device, forwarding the received packets from the second device to the first device according to a preset schedule, when audio buffers of the first device and the second device reach a predetermined level, performing a second stage role switch at the first and second devices, the second stage role switch comprising passing, from the first device to the second device, control of timing for sending packets from the second device as the new master to the first device as the new slave, and decreasing the CPU clock rates in the first and second devices.
The present disclosure provides for role switch with perceptible continuity of audio streaming during the role switch. The role switch occurs in two stages, with a first stage including a host link role switch and a second stage including a relay link role switch. For example, the host link role switch concerns the relationship of each audio receiver device to the host device, where the master device receives audio directly from the host for relay to the slave. The relay link role switch concerns a relationship between the audio receiver devices. For example, the communication master controls timing, such as when to send packets between the master and slave devices. Each stage of the two stage procedure may take approximately 100 ms, or more or less. Between each stage, the audio buffers of the master and slave devices have an opportunity to refill. While the procedure is primarily described herein with respect to earbuds, it should be understood that the procedure may also be applied to any other wirelessly paired devices having master and slave roles.
A first device in a master role receives audio from a host device, such as a mobile phone, over a communication link, such as an asynchronous communication less (ACL) link, between the first device and the host. The first device relays the audio to a second device in a slave role. The first and second devices may switch master/slave roles in certain instances, such as if the master is suffering from interference while the slave has good signal strength with the host. Before role switch, both the first and second devices increase their internal clock rates. For example, the first and second devices may set their central processing unit (CPU) clock rates to a maximum setting. Moreover, the devices may reduce a polling rate at which the first device in the master role tries to send packets to the second device in the slave role. For example, the devices may reduce this rate to approximately 2.5 ms.
The first device in the master role starts sending role switch information, such as Bluetooth profiles, to the second device. During this process, the first device continues receiving audio from the host device and relaying the audio to the second device. The second device continues its normal operation.
The first and second devices begin the host link role switch. The host link role switch may begin in a communication controller of the devices, such as a Bluetooth controller. The first device may poll the buffers from its controller, and relay the audio buffer to the second device in the slave role. The first device may stop receiving audio packets from the host, such as by turning off a flow bit, changing an access address at the controller, or performing any of a number of other tasks to achieve the result of packets not being received by the first device. The host link role switch is completed at the controller. For example, the second device may take over the communication link between the first device and the host, and may notify the host that the second device is the new master. In some examples, the first device may receive confirmation from the second device that it successfully established the communication link, and the first device may notify the host that it is the new slave. The first and second devices, as new slave and new master respectively, recreate their internal Bluetooth host profiles. For example, the devices can reconstruct memories of their internal Bluetooth profiles and states.
After the host link role switch, the second device serving as the new host link master is still a Bluetooth slave to the host device and to the first device. The host device sends audio packets to the second device in the new master role. Since the second device is still the relay link slave to the first device, special scheduling may be set at the Bluetooth controller and used to relay the received audio packets from the second device to the first device. For example, the special scheduling may provide an indication to the first device of when to expect to receive packets. Such relay of packets using the special scheduling may continue until the audio buffers of the first and second devices reach predetermined levels. For example, it may continue until the audio buffers reach a “normal” range of approximately 150 ms-250 ms or more.
Once the audio buffers reach the predetermined levels, the first and second devices trigger the relay link role switch. Accordingly, the second device serving in the new host link master role also becomes the new relay link master, and controls the timing of packet transmission between the first device and the second device. The first device serving as the new device slave also becomes the new relay link slave. The CPU clock rates and polling time may be returned to their previous values before they were altered for the two stage role switch procedure.
Performing the two stage role switch in this manner provides for seamless role switch for the relay solution. This helps to improve audio quality, such as in situations where the slave earbud has better connectivity than the master earbud. It also helps to improve battery life. For example, the master earbud may consume more power than the slave earbud. Accordingly, by switching roles, the devices can shift the burden to extend the usage time of both devices. In further examples, role switch can be performed when one bud becomes absent, such as if one earbud is taken out of the user's ear, or put in a case, etc. Because the role switch is seamless, these benefits can be achieved without a noticeable impact on audio quality, thereby providing an improved user experience.
The connection between the devices 105, 110, 120 may be, for example, short range wireless pairing, such as Bluetooth. For example, host device 105 may be coupled to master device 110 via a host communication link 152, such as first ACL link. The master device 110 may be coupled to slave device 120 via a relay communication link 154, such as second ACL link.
While the host device in this example is illustrated as a mobile phone, it should be understood that the host device may be any of various types of devices adapted to transmit audio signals. For example, the host device may be a tablet, smart watch, game system, music player, laptop, personal digital assistant device, or any other computing device. Similarly, the first and second accessories, while here shown as earbuds 210, 220, may in other examples be any combination of speakers or other audio devices, video output displays, etc. The first and second accessories may be paired during a time of manufacture, or may be sold separately and paired later by a user.
In some instances, it may be desirable for the first and second accessories to switch roles. For example, the earbud serving in the master role may have a lower quality signal strength connection with the host as compared to a possible connection between the host and the device in the slave role. An example of such conditions is illustrated in
Another example of when it may be desirable to switch master/slave roles relates to battery levels of the first and second devices. The device serving in the master role may consume more power than the device serving in the slave role. Accordingly, when a battery of the master device drains to a predetermined level, for example, it may be desirable to switch roles with the slave device.
In order to switch roles, a two-stage procedure may be used. For example, in a first stage, role switch with respect to the host device may occur, such that a new host link master establishes a communication link with the host. In the second stage, role switch with respect to the playback devices may occur, such that the new relay link master controls timing of transmission of packets over a relay link between the playback devices. In this two-stage procedure, any gaps in audio transmission and playback may be short enough that they are not perceived by the user. For example, each stage of the two-stage procedure may be completed within approximately 100 ms, such that any gaps are approximately 100 ms or less.
In
The first and second devices 110, 120 may also reduce a polling time 132, 142. For example, the devices may reduce a tPoll time at which the master device 110 sends packets to the slave device 120. By adjusting the polling time in this manner, Bluetooth packets will be sent faster from the second device to the first device. Any time a packet is sent from a Bluetooth slave to a Bluetooth master, there will be a random delay up to the value of tPoll, such as approximately 25 ms by default. Reducing the Won time can dramatically decrease an amount of time for the second stage of the role switch. For example, during the second stage role switch the first and second devices negotiate a switch time and should both agree on the switch time before that time passes. By changing tPoll, the switch time can be set to an earlier time.
In
During the process of sending role switch information, the first device 110 may continue receiving audio packets from the host device 105 and relaying the audio packets to the second device 120 as it would in normal operation. Accordingly, the first device 110 may temporarily store the received audio packets in audio buffer 114. The second device 120 may also store the audio packets that it receives in audio buffer 124.
In
The first and second devices 110, 120 may begin the first stage role switch in their respective communication controllers, such as their Bluetooth controllers. For example, the first device 110 in the master role may poll all buffers from its controller and relay its audio buffer 114 to the second device 120. For example, any audio packets recently received by the first device 110, and stored in the buffer 114, may be transmitted to the second device 120 and stored in the slave buffer 124. In this regard, the second device 120 has the same buffer contents, and can begin playback of audio without delay upon switching to the role of master. While only audio packets in an audio buffer are shown in this example, it should be understood that other types of buffers, such as video or image buffers, may also be synced.
The first device 110 may then stop receiving audio packets from the host device 105. This can be done in any number of ways. By way of example only, the first device 110 may turn off a flow bit, change an access address at its communication controller, etc.
The first and second devices 110, 120 may then finish the first stage role switch. The second device 120 may establish a new communication link 156 with the host device 105, and notify the host device 105 that it is the new master that should receive packets directly from the host 105. According to some examples, the first and second devices 110, 120 may finish the first stage role switch at the communication controller layer, such as the Bluetooth controller layer. For example, each device 110, 120 may send a command to its communication controller to begin the first stage role switch. The first device 110 may send its link manager protocol (LMP) state to the second device 120, which receive the LMP socket. The second device 120 may start a new ACL link and sync with the host device 105. Once the ACL link is successfully established, the second device 120 may send a success LMP packet to the first device 110 and notify the host device 105 that the second device 120 is the new master. The first device 110, upon receipt of the LMP success packet, may also notify the host 105 that it is the new slave.
The first and second devices 110, 120, in their new slave and master roles, respectively, recreate their internal Bluetooth host profiles. This may be done very quickly. The first and second devices 110, 120 may reconstruct memories of their internal Bluetooth profiles and states. For example, the second device 120 as the new master may receive a struct from the first device 110, which was the previous master. The second device 120 may use the struct to recreate its Bluetooth profiles on the application side. The first device 110, as the new slave, may similarly receive a struct from the second device 120 and use the struct to recreate its Bluetooth profiles. While this is one example, it should be understood that other ways of recreating the internal Bluetooth profiles may be used.
During the first stage role switch, playback of the audio continues. Accordingly, because the first and second devices are not receiving packets from the host, audio buffers of the first and second devices will be drained. To prevent a perceivable glitch in the playback, the first stage role switch should be completed within a time that is less than a size of the audio buffer.
Having completed the first stage role switch, the second device 120 has set up the communication link 156 with the host device 105 and is serving as a slave to the host device 105. The second device 120 receives audio packets from the host device 105, which is trying to catch up the transmission. For example, the host device will keep buffering and trying to send packets, because audio is not paused and the host is not necessarily informed that a role switch is about to take place. In this regard, the transmission will catch up for the time period during which the first stage role switch occurred.
The second device 120, though completing the device role switch to become the device master, is still a relay link slave to the first device 110. For example, while the second device 120 took over the link with the host device, the second device 120 is still a slave on the link 154 with the first device 110. In this example, the first device 110 may still be the Bluetooth master in control of timing of sending packets. As such, it may be less efficient for the second device 120 to relay packets to the first device. To account for such inefficiencies, a special scheduling may be used for the packet relay.
As shown in
The second device 120 may continue to relay packets from the host device 105 to the first device 110 according to the special timing schedules 116, 126 until the audio buffers 114, 124 at the first and second devices have caught up to a normal range. Prior to this point, the buffers were drained because audio playback was still occurring during the first stage role switch. For example, the audio buffers 114, 124 of the first and second devices may come into a range storing approximately 150 ms-250 ms, or more or less, of audio for playback. At this point, the first and second devices 110, 120 may trigger a second stage of the role switch.
In
The first device 110 may include one or more processors 416, one or more memories 412, as well as other components. For example, the computing device 110 may include one or more sensors 418, wireless pairing interface 419, and a battery 417.
The memory 412 may store information accessible by the one or more processors 416, including data 414 instructions 415 that may be executed or otherwise used by the one or more processors 416. For example, memory 412 may be of any type capable of storing information accessible by the processor(s), including a computing device-readable medium, or other medium that stores data that may be read with the aid of an electronic device, such as a volatile memory, non-volatile as well as other write-capable and read-only memories. By way of example only, memory 412 may be a static random-access memory (SRAM) configured to provide fast lookups. Systems and methods may include different combinations of the foregoing, whereby different portions of the instructions and data are stored on different types of media.
The data 414 may be retrieved, stored or modified by the one or more processors 416 in accordance with the instructions 415. For instance, data 414 may include short range wireless communication profiles, such as Bluetooth profiles. The data 414 may further include buffered packets, such as an audio buffer with packets received from a host device. Although the claimed subject matter is not limited by any particular data structure, the data may be stored in computing device registers, in a relational database as a table having a plurality of different fields and records, XML documents or flat files. The data may also be formatted in any computing device-readable format.
The instructions 415 may be any set of instructions to be executed directly (such as machine code) or indirectly (such as scripts) by the one or more processors 416. For example, the instructions may be stored as computing device code on the computing device-readable medium. In that regard, the terms “instructions” and “programs” may be used interchangeably herein. The instructions may be stored in object code format for direct processing by the processor, or in any other computing device language including scripts or collections of independent source code modules that are interpreted on demand or compiled in advance. Functions, methods and routines of the instructions are explained in more detail below.
The one or more processors 416 may be microprocessors, logic circuitry (e.g., logic gates, flip-flops, etc.) hard-wired into the device 110 itself, or may be a dedicated application specific integrated circuit (ASIC). It should be understood that the one or more processors 416 are not limited to hard-wired logic circuitry, but may also include any commercially available processing unit, or any hardware-based processors, such as a field programmable gate array (FPGA). In some examples, the one or more processors 416 may include a state machine. The processors 416 may be configured to execute the instruction 415 to, for example, perform a method such as described below in connection with
The processors 416 may include an internal clock, which controls a timing of operations of the first device 110. For example, the clock may control a timing of operations such as saving a profile state on the master device, or restoring profiles on the slave device.
The one or more sensors 418 may include any of a variety of mechanical or electromechanical sensors for detecting conditions relevant to a role switch. Such sensors may include, for example, an accelerometer, gyroscope, switch, light sensor, barometer, audio sensor (e.g., microphone), vibration sensor, heat sensor, radio frequency (RF) sensor, etc. In this regard, the device 110 may detect conditions indicating that the device should switch roles with its paired device. As one example, the sensors may detect received signal strength, and may compare the received signal strength to that of the paired device. The device 110 and its paired device may thus negotiate whether to switch roles. As another example, the sensors may detect other parameters, such as battery life, signal quality, movement, current buffer levels, etc.
The short range wireless pairing interface 419 may be used to form connections with other devices, such as paired second device 120 or a host device, such as a mobile phone providing the audio packets. The connection may be, for example, a Bluetooth connection or any other type of wireless pairing. By way of example only, each connection may include an ACL link.
Although
In this example, the second device 120 has an internal architecture similar to that of the device 110. For example, the second device 120 includes a memory 422 storing data 424 and instructions 425 which may be executed by one or more processors 426. The second device 120 further includes a battery 427, sensors 428, a communication interface 429, such as a Bluetooth interface, etc. While the second device 120 is shown as executing a different set of instructions 425 than the instructions 41 of the first device 110, it should be understood that both devices 110, 120 may be programmed to perform role switch from master to slave and from slave to master.
As mentioned above, the instructions 415 and 425 may be executed to perform a two-stage role switch operation between the first device 110 and the second device 120. Both devices increase their internal CPU clock rates. The first device 110 sends role switch information to the second device 120. For example, the first device 110 may send its wireless communication profiles and its buffer contents to the second device 120. The first device 110 stops receiving packets from the host and the second device 120 establishes a communication link with the host. The second device 120 notifies the host that it is the new master and begins receiving packets, which it transmits to the first device 110 according to a special timing schedule. Once a predetermined buffer level is reached, the devices may perform second stage role switch, where the first device 110 becomes the slave and the second device 120 becomes the master over a connection between the devices. The device then return their clock rates to the previous settings.
When role switch is to be performed, the first and second devices speed up their internal CPU clocks, and the first device sends role switch information to the second device. Such role switch information may include wireless communication profiles, buffer contents, etc. While sending such role switch information, the first device 110 may continue receiving packets from the host device 105 as it normally would.
After sending the role switch information, the devices may perform a first stage of the role switch. In this stage, the first device stops receiving packets. The communication link between the host 105 and the first device 110 is broken down and the second device 120 establishes a new communication link with the host 105. The second device 120 may use this new communication link to notify the host 105 that it is the new master.
The second device 120 may therefore begin receiving packets directly from the host 105. After the first stage role switch, the second device is a Bluetooth slave to both the host and the first device, in that it listens for packets from the host 105 and is still configured to listen for packets from the first device 110. To overcome this, the second device 120 relays the packets received from the host 105 to the first device 110 according to a special schedule. Such special schedule may be stored in a communication controller of each of the first and second devices 110, 120.
The first and second devices 110, 120 continue to buffer the received audio packets. Once the buffers reach a predetermined level, the second stage role switch may be performed. The predetermined level may be, for example, a quantity of data for playback, such as data for 100 ms of playback, 300 ms of playback, etc. In other examples, the quantity of data may be measured in bits or any other unit.
During the second stage role switch the second device becomes the Bluetooth master over the communication link between the first device and the second device. As such, the second device 110 takes over timing control from the first device 110. Once the second stage role switch is complete, the devices return their CPU clocks to their pre-role switch settings.
In block 605, the first accessory receives information from a host device over a first communication link. For example, the first accessory may receive audio packets from the host device over a first ACL link. The first accessory, serving as master, relays the received information to the second accessory of a second ACL link (block 610). Blocks 605 and 610 may be repeated until it is determined that a role switch is needed or beneficial in block 615.
When the role switch is to be performed, the first and second accessories speed up their internal CPU clocks in block 620. The accessories may further decrease their polling rates.
In block 625, the first accessory sends role switch information to the second accessory. Such role switch information may include Bluetooth profiles, buffer contents, or any other information the second accessory may need to serve as master and directly receive packets from the host device. The second accessory uses such information, for example, to reconstruct its Bluetooth profiles, update its buffer, etc.
In block 630 the first accessory stops receiving packets, and the second accessory establishes a link with the host. For example, the first accessory may relinquish the first ACL link, and the second accessory may establish a new ACL link with the host. The second accessory may then start receiving packets directly from the host and relaying such packets to the first accessory in block 635. Because at this point the second device has only completed a first stage of the role switch, the second device is still a Bluetooth slave to the first device over the second ACL link. For example, the first accessory is still in charge of timing for Bluetooth transmissions over the second ACL link, so the second device does not know when to send the relay packets. Accordingly, the first and second devices use a predetermined schedule for receiving/sending the relay packets.
The second device may continue receiving and relaying the packets to the first device according to the schedule until a buffer threshold is reached in block 640. For example, the threshold may be a predetermined amount of data for playback. Such amount may be set such that playback will not be perceivably delayed. Once the buffer reaches the threshold, the devices perform the second stage role switch, and the second accessory takes over timing control over the second ACL link (block 645). The first and second accessories, having completed the full role switch, may thus return to their previous clock speeds and polling rates.
The foregoing systems and methods are advantageous in that they provide for seamless role switch. For example, the role switch procedure may be performed without any audio glitches detected by the user. As such, role switching may be performed to maintain a high signal strength connection between the host and the master, or to prolong battery life of the devices, or for any other reason without sacrificing user experience.
Unless otherwise stated, the foregoing alternative examples are not mutually exclusive, but may be implemented in various combinations to achieve unique advantages. As these and other variations and combinations of the features discussed above can be utilized without departing from the subject matter defined by the claims, the foregoing description of the embodiments should be taken by way of illustration rather than by way of limitation of the subject matter defined by the claims. In addition, the provision of the examples described herein, as well as clauses phrased as “such as,” “including” and the like, should not be interpreted as limiting the subject matter of the claims to the specific examples; rather, the examples are intended to illustrate only one of many possible embodiments. Further, the same reference numbers in different drawings can identify the same or similar elements.
Number | Name | Date | Kind |
---|---|---|---|
9924010 | Watson et al. | Mar 2018 | B2 |
10085216 | Younis | Sep 2018 | B1 |
20130316642 | Newham | Nov 2013 | A1 |
20160219358 | Shaffer et al. | Jul 2016 | A1 |
20170094389 | Saulsbury et al. | Mar 2017 | A1 |
20170311105 | Hariharan et al. | Oct 2017 | A1 |
20180199282 | Newham | Jul 2018 | A1 |
20190230459 | Sridharan | Jul 2019 | A1 |
Entry |
---|
International Search Report and Written Opinion for International Application No. PCT/US2019/057613 dated Feb. 12, 2020. 13 pages. |