Two-stage role switching

CN116233680BActive Publication Date: 2026-08-11GOOGLE LLC
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-23
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0009]在该模式中,要实现无缝的角色切换非常困难

Benefits of technology

[0013] Another aspect of this 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 and second audio receiver devices are configured to perform a two-stage role switching operation, including the first device receiving packets from a host device, forwarding the received packets from the first device to the second device, increasing the central processing unit (CPU) clock rate in each of the first and second devices, performing a first-stage role switching at the first and second devices, the first-stage role switching 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 the new master, the second device receiving packets from the host device, forwarding the received packets from the second device to the first device according to a preset schedule, and performing a second-stage role switching at the first and second devices when the audio buffers of the first and second devices reach a predetermined level, the second-stage role switching including transferring control of the timing of sending packets from the second device (as the new master) to the first device (as the new slave) from the first device to the second device, and decreasing the CPU clock rate in the first and second devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233680B_ABST
    Figure CN116233680B_ABST
Patent Text Reader

Abstract

A two-phase role switching is disclosed. This disclosure provides role switching with perceptible audio streaming continuity during role switching. The role switching occurs in two phases, where the first phase includes host link role switching and the second phase includes relay link role switching. For example, host link role switching involves the relationship between each audio receiver device and the host device, where the master device receives audio directly from the host to relay to the slave. Relay link role switching involves the relationship between audio receiver devices. For example, the communication master controls timing, such as when packets are sent between the master and slave devices. Each phase in the two-phase process may take approximately 100 ms or less. Between each phase, the audio buffers of the master and slave devices have an opportunity to be refilled.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Case Analysis

[0002] This application is a divisional application of Chinese Invention Patent Application No. 201980051950.8, filed on October 23, 2019.

[0003] Cross-reference to related applications

[0004] This application is a continuation-to-file of U.S. Patent Application No. 16 / 168,474, filed on October 23, 2018, the disclosure of which is incorporated herein by reference. Technical Field

[0005] This application involves a two-stage role switch. Background Technology

[0006] A truly wireless earbud is two earbuds that connect wirelessly to each other. Typically, such earbuds follow either a repeater mode or a sniff mode. In repeater mode, one earbud acts as the master, and the other as the slave. The master earbud receives audio from a host device, such as a mobile phone or other audio playback device, and then relays that audio to the slave earbud. In sniff mode, one earbud is the primary earbud, and the other is the secondary earbud. The primary earbud receives and responds to audio packets from the host, while the secondary earbud only receives audio or "sniffs," but never responds to packets. If the secondary earbud loses a packet, it will request the primary earbud to retransmit it.

[0007] A role switch occurs between two earbuds when their function changes. For example, in repeater mode, the master earbud becomes the slave, and the slave becomes the master. In breathing mode, the primary earbud becomes the secondary earbud, and the secondary earbud becomes the primary earbud. This role switch can occur for various reasons, such as if the secondary earbud has better signal strength, the master earbud is operating with a lower battery level than the secondary earbud, or the master earbud is removed from the user's ear or placed in its case.

[0008] Wireless earbuds in repeater mode typically have a first asynchronous connectionless (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 and slave earbuds. In this second ACL, the master earbud is the Bluetooth master, and the slave earbud is the Bluetooth slave.

[0009] In this mode, achieving seamless role switching is very difficult. For example, in most, but not all, cases, the profile in the ACL between the master earbud and the host device needs to be silently transmitted to the slave earbud so that the new master earbud can continue receiving audio packets after the role switch. Furthermore, a Bluetooth role switch is also required when the original master earbud becomes the new slave earbud and vice versa, because the master earbud should also be a Bluetooth master to be valid in Bluetooth transmission. Summary of the Invention

[0010] A solution is provided that enables seamless role switching between the first and second devices operating as master and slave. This solution is particularly applicable to seamless role switching in fully wireless earbuds in repeater mode. Thus, no audio glitch is perceived during role switching. The provided solution can also be used in fully wireless earbuds in breathing mode, and is therefore relevant to role switching between primary (and thus "master") and secondary (and thus "slave") devices.

[0011] One aspect of this disclosure provides a method for performing a role switch between a first device operating as a master and a second device operating as a slave. The method includes the first device receiving packets from a host device, forwarding the received packets from the first device to the second device, increasing the central processing unit (CPU) clock rate in each of the first and second devices, 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 the new master. Between the first and second stages, 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 the audio buffers of the first and second devices reach a predetermined level, a second-stage role switch is performed at the first and second devices. The second-stage role switch includes transferring control over the timing of sending packets from the second device (the new master) to the first device (the new slave) from the first device to the second device. When the second stage is complete, the CPU clock rate of the first and second devices can be reduced.

[0012] Another aspect of this disclosure provides a system including a first audio receiver device adapted to operate in both master and slave roles, and a second audio receiver device adapted to operate in both master and slave roles. Each of the first and second audio receiver devices includes a wireless communication interface adapted to receive audio packets via a wireless connection, an audio buffer adapted to temporarily store the received audio packets, a speaker adapted to play back the audio packets temporarily stored in the audio buffer, and a processor communicating with the wireless communication interface. The processor can be configured to perform a two-stage role switching operation, including receiving packets from a master device by the first device, forwarding the received packets from the first device to the second device, increasing the clock rate of the central processing unit (CPU) in each of the first and second devices, performing a first-stage role switching at the first and second devices, the first-stage role switching including establishing a communication link between the second device and the master device, and notifying the master device that the second device is operating as the new master. The processor can be further configured to receive packets from the host device by the second device and forward the received packets from the second device to the first device according to a preset schedule. When the audio buffers of the first device and the second device reach a predetermined level, a second-stage role switch is performed at the first and second devices. The second-stage role switch includes transferring control of the timing of sending packets from the second device, which is the new master, to the first device, which is the new slave, from the first device to the second device, and reducing the CPU clock rate in the first and second devices.

[0013] Another aspect of this 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 and second audio receiver devices are configured to perform a two-stage role switching operation, including the first device receiving packets from a host device, forwarding the received packets from the first device to the second device, increasing the central processing unit (CPU) clock rate in each of the first and second devices, performing a first-stage role switching at the first and second devices, the first-stage role switching 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 the new master, the second device receiving packets from the host device, forwarding the received packets from the second device to the first device according to a preset schedule, and performing a second-stage role switching at the first and second devices when the audio buffers of the first and second devices reach a predetermined level, the second-stage role switching including transferring control of the timing of sending packets from the second device (as the new master) to the first device (as the new slave) from the first device to the second device, and decreasing the CPU clock rate in the first and second devices. Attached Figure Description

[0014] Figure 1 This is a block diagram illustrating an example system according to aspects of this disclosure.

[0015] Figure 2 yes Figure 1 An example intuitive diagram of the system.

[0016] Figure 3A -F is a block diagram illustrating the role switching according to aspects of this disclosure.

[0017] Figure 4 This is a functional block diagram illustrating an example system according to aspects of this disclosure.

[0018] Figure 5 This is a timing diagram illustrating an example aspect of an aspect of this disclosure.

[0019] Figure 6 This is a flowchart illustrating an example aspect of an aspect according to this disclosure. Detailed Implementation

[0020] This disclosure provides a role switching process with perceptible audio streaming continuity during role switching. The role switching is performed in two phases, with the first phase involving a master link role switch and the second phase involving a relay link role switch. For example, the master link role switch involves the relationship between each audio receiver device and the master device, where the master device receives audio directly from the master to relay to the slave. The relay link role switch involves the relationship between the audio receiver devices. For example, the communication master controls timing, such as when packets are sent between the master and slave devices. Each phase of this two-phase process may take approximately 100 ms or more or less. Between each phase, the audio buffers of the master and slave devices have a chance to be reloaded. While this document primarily describes the process in relation to in-ear headphones, it should be understood that this process can also be applied to any other wirelessly paired device with master and slave roles.

[0021] A first device in a master role receives audio from a host device, such as a mobile phone, via a communication link between the first device and the host, such as an asynchronous communication-free (ACL) link. The first device relays the audio to a second device in a slave role. The first and second devices can switch master / slave roles in certain situations, such as when the master is affected by interference while the slave has good signal strength with the host. Before switching roles, both the first and second devices increase their internal clock rates. For example, the first and second devices can set their central processing unit (CPU) clock rates to a maximum setting. Furthermore, the devices can reduce the polling rate at which the first device in a master role attempts to send packets to the second device in a slave role. For example, the device can reduce this rate to approximately 2.5 ms.

[0022] The first device, acting as the master, begins sending role switching information, such as a Bluetooth profile, to the second device. During this process, the first device continues to receive audio from the master device and relays that audio to the second device. The second device then continues its normal operation.

[0023] The first and second devices initiate a master link role switch. This switch can be initiated in the device's communication controller, such as a Bluetooth controller. The first device can poll its buffer from its controller and relay the audio buffer to the second device, which is now in a slave role. The first device can stop receiving audio packets from the master, such as by turning off stream bits, changing the access address at the controller, or performing any of several other tasks to achieve this. The master link role switch is completed at the controller. For example, the second device can take over the communication link between the first device and the master and can notify the master that the second device is the new master. In some examples, the first device can receive confirmation from the second device that it has successfully established a communication link, and the first device can notify the master that it is the new slave. The first and second devices, acting as the new slave and the new master respectively, recreate their internal Bluetooth master profiles. For example, the devices can rebuild their internal Bluetooth profiles and state memory.

[0024] After the master link role switch, the second device, acting as the new master link master, remains a Bluetooth slave to both the master and first devices. The master device sends audio packets to the second device, now in the master role. Since the second device remains a relay link slave to the first device, a special scheduler can be configured at the Bluetooth controller to relay received audio packets from the second device to the first device. For example, the special scheduler can provide the first device with an indication of when packets are expected to be received. This packet relay using the special scheduler can continue until the audio buffers of both the first and second devices reach a predetermined level. For example, it can continue until the audio buffers reach a “normal” range of approximately 150ms-250ms or more.

[0025] Once the audio buffer reaches a predetermined level, the first and second devices trigger a trunk link role switch. Therefore, the second device, acting as the new host link master, can also become the new trunk link master and control the timing of packet transmissions between the first and second devices. The first device, acting as a slave to the new device, can also become a slave to the new trunk link. The CPU clock rate and polling time can be reset to their previous values ​​before they were changed for the two-phase role switch process.

[0026] Performing two-stage role switching in this manner provides seamless role switching for repeater solutions. This helps improve audio quality, such as in situations where the slave earbud has better connectivity than the master earbud. It also helps improve battery life. For example, the master earbud may consume more power than the slave earbud. Therefore, by switching roles, the devices can distribute the load, thereby extending the usage time of both devices. In another example, role switching can be performed when one earbud is missing, such as when one earbud is removed from the user's ear or placed in the case, etc. Because the role switching is seamless, these benefits can be achieved without significantly impacting audio quality, thus providing an improved user experience.

[0027] Figure 1 An example system 100 is illustrated, which includes a host device 105 communicatively coupled to a master accessory device 110. The master accessory device 110 may be one of a pair of accessory devices, such as earphones, a wireless speaker, etc. Thus, the master device 110 is further communicatively coupled to a slave accessory device 120. Although... Figure 1 Only one slave device 120 is shown, but it should be understood that multiple slave devices can be communicatively coupled to the master device 110.

[0028] For example, the connection between devices 105, 110, and 120 can be short-range wireless pairing such as Bluetooth. For example, host device 105 can be coupled to master device 110 via host communication link 152 such as a first ACL link. Master device 110 can be coupled to slave device 120 via relay communication link 154 such as a second ACL link.

[0029] Figure 2 The diagram shows... Figure 1 In one example of a system, the host device is a mobile phone 205, the master accessory is a first earphone 210, and the slave accessory is a second earphone 220. A host communication link 252 exists between the phone 205 and the first earphone 210, while a relay communication link 254 exists between the first earphone 210 and the second earphone 220.

[0030] Although the host device is illustrated as a mobile phone in this example, it should be understood that the host device can be any of various types of devices adapted to transmit audio signals. For example, the host device can be a tablet, smartwatch, gaming system, music player, laptop, personal digital assistant device, or any other computing device. Similarly, although shown herein as earbuds 210 and 220, the first and second accessories can be any combination of speakers or other audio devices, video output displays, etc., in other examples. The first and second accessories can be paired during manufacturing or can be sold separately and subsequently paired by the user.

[0031] In some instances, it may be desirable for the first and second accessories to switch roles. For example, an earphone acting as the master may have a connection with the master with a lower quality signal strength compared to a possible connection between the master and a device in a slave role. Figure 2 The diagram illustrates an example of this situation. Because the host device 105 is fixed to the opposite side of the user's body, the first earbud 210 experiences cross-body interference with respect to the host device 105. In contrast, the second earbud 220 is located on the same side of the user's body as the host device 105. Therefore, the second earbud 220 experiences less cross-body interference than the first earbud 210.

[0032] Another example of when a master / slave role might be expected is related to the battery levels of the first and second devices. The device acting as the master may consume more power than the device acting as the slave. Therefore, for example, when the master device's battery is depleted to a predetermined level, a role switch with the slave device might be desired.

[0033] To switch roles, a two-stage process can be used. For example, in the first stage, a role switch can occur regarding the host device, allowing the new host link master to establish a communication link with the host. In the second stage, a role switch can occur regarding the playback device, allowing the new relay link master to control the timing of packet transmissions on the relay links between playback devices. During this two-stage process, any gaps in audio transmission and playback can be short enough that they are imperceptible to the user. For example, each stage of the two-stage process can be completed within approximately 100ms, ensuring that any gaps are approximately 100ms or less.

[0034] Figures 3A-3F The illustration shows an example of a two-stage character switching process. Although the illustration shows several operations in the character switching process, it should be understood that additional operations can be performed.

[0035] exist Figure 3A In this configuration, the first and second devices 110 and 120 respectively increase the rate of their internal CPU clocks 131 and 141. For example, the first and second devices 110 and 120 can increase the clock rate to the maximum possible rate. The clock rate may vary depending on the supported chipset. By increasing the CPU clock rate, operations limited by CPU speed can be accelerated proportionally with the increase in CPU clock rate. For example, operations such as saving a profile state on the master device or restoring a profile on a slave device can be performed faster at the increased CPU clock rate compared to an unadjusted CPU clock rate.

[0036] The first and second devices 110 and 120 can also reduce their polling times 132 and 142. For example, the devices can reduce the tPoll time at which the master device 110 sends packets to the slave device 120. By adjusting the polling time in this way, Bluetooth packets will be sent from the second device to the first device more quickly. At any point when a packet is sent from the Bluetooth slave to the Bluetooth master, there will be a random delay up to the tPoll value, such as approximately 25ms by default. Reducing the tPoll time can significantly reduce the amount of time used for the second phase of role switching. For example, during the second phase of role switching, the first and second devices negotiate the switching time and should both agree on the switching time before that time has elapsed. By changing tPoll, the switching time can be set to an earlier time.

[0037] exist Figure 3BIn this process, the first device 110 begins sending role switching information to the second device 120. Such information may include, for example, a wireless communication protocol profile 112, such as a Bluetooth profile. Examples of such profiles include Audio / Video Remote Control Profile (AVRCP), Hands-free Profile (HFP), Advanced Audio Distribution Profile (A2DP), Attribute Profile (ATT), Device ID Profile (DIP), Proximity Profile (PXP), Synchronization Profile (SYNCH), Radio Frequency Communication (RFCOMM), Bluetooth Low Energy (BLE), and so on. Profile 112 can specify how the master device 110 operates. For example, the profile may contain information about dependencies on other modes, suggested user interface modes, the protocol stack portion used by the profile, and so on. In some examples, the profile may determine how the master device 110 communicates with the host device 105. By way of example only, one or more of the profiles may use a communication link 152, such as an Asynchronous No Communication (ACL) link. In other examples, the profile may define how audio is streamed from host device 105 to master device 110 and / or from master device 110 to slave device 120. Slave device 120 stores received role-switching information, such as wireless profile 122. Other examples of role-switching information may include ACL connection information, such as frequency hopping sequences, generic connection parameters, and device identifiers. Further examples include connection-independent device states, such as logs and runtime.

[0038] During the processing of sending role switching information, the first device 110 can continue to receive audio packets from the host device 105 and relay the audio packets to the second device 120 as in normal operation. Therefore, the first device 110 can temporarily store the received audio packets in the audio buffer 114. The second device 120 can also store its received audio packets in the audio buffer 124.

[0039] exist Figure 3C In this process, the first and second devices 110 and 120 perform the first phase of role switching. In this first phase, the second device 120 establishes a link to the host device 105 and becomes the host link master. Therefore, the second device 120 will receive packets from the host 105 for relaying to the first device 110. However, if combined with... Figure 3D Further discussion reveals that the second device 120 remains a relay link slave to the first device 110.

[0040] The first and second devices 110 and 120 can initiate a first-phase role switch in their respective communication controllers, such as Bluetooth controllers. For example, the first device 110, in a master role, can 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 buffer 114 can be transmitted to the second device 120 and stored in slave buffer 124. In this respect, the second device 120 can have the same buffer contents and can start audio playback without delay when switching to the master role. Although only audio packets in the audio buffer are shown in this example, it should be understood that other types of buffers, such as video or image buffers, can also be synchronized.

[0041] The first device 110 can then stop receiving audio packets from the host device 105. This can be done in any number of ways. As an example only, the first device 110 can turn off the stream bit, change the access address at its communication controller, etc.

[0042] The first and second devices 110 and 120 can then complete the first-phase role switch. The second device 120 can 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 device 105. According to some examples, the first and second devices 110 and 120 can complete the first-phase role switch at a communication controller layer, such as the Bluetooth controller layer. For example, each device 110 and 120 can send a command to its communication controller to initiate the first-phase role switch. The first device 110 can send its Link Manager Protocol (LMP) status to the second device 120, which receives the LMP socket. The second device 120 can start a new ACL link and synchronize with the host device 105. Once the ACL link is successfully established, the second device 120 can 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 can also notify the host 105 that it is the new slave upon receiving the LMP success packet.

[0043] The first and second devices 110 and 120, respectively, which are now in their new subordinate and master roles, recreate their internal Bluetooth master profiles. This can be done very quickly. The first and second devices 110 and 120 can rebuild their internal Bluetooth profiles and state memory. For example, the second device 120, as the new master, can receive a struct from the first device 110, which was the previous master. The second device 120 can use the struct to recreate its Bluetooth profile on the application side. The first device 110, as the new subordinate, can similarly receive a struct from the second device 120 and use the struct to recreate its Bluetooth profile. While this is an example, it should be understood that other methods can be used to recreate internal Bluetooth profiles.

[0044] During the first-phase role switch, audio playback continues. Therefore, since neither the first nor second device is receiving packets from the host, their audio buffers will be exhausted. To prevent perceptible glitches in playback, the first-phase role switch should be completed within a timeframe smaller than the audio buffer size.

[0045] Having completed the first phase of role switching, the second device 120 can establish a communication link 156 with the host device 105 and act as a slave to the host device 105. The second device 120 receives audio packets from the host device 105, which is attempting to catch up on transmissions. For example, the host device will maintain a buffer and attempt to send packets because the audio is not paused and the host is not necessarily notified that a role switch is about to occur. In this respect, transmissions will catch up on the period during which the first phase of role switching occurred.

[0046] Although the second device 120 has completed the device role switch and become the master device, it remains a slave to the relay link with the first device 110. For example, although the second device 120 has taken over the link with the master device, it remains a slave on link 154 with the first device 110. In this example, the first device 110 can still be the Bluetooth master controlling the timing of packet transmission. This may be inefficient for the second device 120 to relay packets to the first device. To address this inefficiency, special scheduling can be used for packet relay.

[0047] like Figure 3DAs shown, each of the first device 110 and the second device 120 stores specific timing schedules 116 and 126 for transmitting or receiving packets when the first-stage role switch has been completed but the second-stage role switch has not yet been completed. These timing schedules 116 and 126 can, for example, be programmed into the Bluetooth controller of each device 110 and 120. The timing schedules 116 and 126 can be preset at manufacturing time, and / or they can be updated via software or firmware updates provided by the host device 105. The timing schedules 116 and 126 provide cohesion between the first and second devices 110 and 120 by instructing when the second device 120 should transmit packets and when the first device 110 is expected to receive them. As an example, the timing schedules 116 and 126 can instruct the second device 120, in the new master role, to transmit packets every 2 ms, and the first device 110, in the new slave role, to listen for packets every 2 ms. It should be understood that this is only an example, and any timing scheme is possible.

[0048] The second device 120 can continue to relay packets from the host device 105 to the first device 110 according to special timing schedules 116 and 126 until the audio buffers 114 and 124 at both devices have caught up to normal range. Prior to this, the buffers may be exhausted because audio playback is still occurring during the first-stage role switching. For example, the audio buffers 114 and 124 at the first and second devices may be able to store approximately 150ms-250ms or more or less audio for playback. At this point, the first and second devices 110 and 120 can trigger the second stage of role switching.

[0049] Figure 3E The illustration depicts the second phase of the role switching, where the second device 120 becomes the master on the communication link 154 between the first device 110 and the second device 120. For example, the second device 120 sends a clock offset to the first device 110, the switching time is scheduled, and the switching occurs. During this phase, the second device 120 gains control over the timing 128 of the transmissions between the first device 110 and the second device 120. Since the audio buffer is within its normal range, no audio glitches should be audible during the second phase of the role switching.

[0050] exist Figure 3FIn this process, the first and second devices 110 and 120 revert their internal timings to their previous settings. For example, the previously increased CPU clock rates 131 and 141 are now returned to their pre-adjustment levels. Furthermore, the previously reduced polling rates 132 and 142 are now returned to their pre-adjustment levels. In some examples, the pre-adjustment levels may be the default levels or the normal operating levels when the devices have not undergone a role switch.

[0051] Figure 4 Examples of the internal components of the first device 110 and the second device 120 are illustrated. While multiple internal components are shown, it should be understood that additional or fewer components may be included. By way of example only, the device may include components typically found in playback devices, such as speakers, microphones, etc. These devices may be, for example, wireless accessories, such as earbuds, speakers, displays, etc. The following description of the device primarily pertains to the first device 110. While the second device 120 may be similar to or identical to the first device in some examples, in other examples, the second device 120 may be a different type of device. Additionally or optionally, the second device 120 may have different internal components.

[0052] The first device 110 may include one or more processors 416, one or more memories 412, and other components. For example, the computing device 110 may include one or more sensors 418, a wireless pairing interface 419, and a battery 417.

[0053] Memory 412 may store information accessible by one or more processors 416, including data 414 and instructions 415 that can be executed or otherwise used by one or more processors 416. For example, memory 412 may be any type capable of storing information accessible by a processor, including computing device readable media, or other media that store data readable by means of an electronic device, such as volatile memory, non-volatile memory, and other writable and read-only memories. By way of example only, memory 412 may be static random access memory (SRAM) configured to provide fast lookup. Systems and methods may include different combinations of the above, whereby different portions of instructions and data are stored on different types of media.

[0054] Data 414 can be retrieved, stored, or modified by one or more processors 416 according to instructions 415. For example, data 414 may include a short-range wireless communication profile, such as a Bluetooth profile. Data 414 may further include buffered packets, such as an audio buffer with packets received from a host device. While the subject matter for which protection is sought is not limited to any particular data structure, data can be stored in a computing device register, stored as a table with multiple different fields and records in a relational database, stored in an XML document, or a flat file. Data can also be schematized in any computing device-readable format.

[0055] Instruction 415 can be any set of instructions, such as machine code, to be executed directly by one or more processors 416, or any set of instructions, such as a script, to be executed indirectly by one or more processors 416. For example, instructions can be stored as computing device code on a computing device readable medium. In this regard, the terms "instruction" and "program" can be used interchangeably herein. Instructions can be stored in the form of object code for direct processing by a processor, or stored in any other computing device language, including scripts or collections of independent source code modules that are interpreted on demand or compiled beforehand. The function, methods, and routines of instructions are explained in more detail below.

[0056] One or more processors 416 may be microprocessors, logic circuits (e.g., logic gates, trigger circuits, etc.) hardwired into the device 110 itself, or may be specified application-specific integrated circuits (ASICs). It should be understood that one or more processors 416 are not limited to hardwired logic circuits, but may also include any commercially available processing unit, or any hardware-based processor, such as a field-programmable gate array (FPGA). In some examples, one or more processors 416 may include a state machine. Processor 416 may be configured to execute instructions 415 to, for example, perform actions such as those described below. Figure 5-6 The method described.

[0057] The processor 416 may include an internal clock that controls the timing of the operations of the first device 110. For example, the clock may control the timing of operations such as saving a profile state on the master device or restoring a profile on the slave device.

[0058] One or more sensors 418 may include any of a variety of mechanical or electromagnetic sensors for detecting conditions related to role switching. Such sensors may include, for example, accelerometers, gyroscopes, switches, light sensors, barometers, audio sensors (e.g., microphones), vibration sensors, thermal sensors, radio frequency (RF) sensors, and so on. In this regard, device 110 can detect conditions that indicate the device should switch roles with its paired device. As an example, the sensor may detect the strength of a received signal and compare the strength of the received signal with the strength of the signal received by the paired device. Device 110 and its paired device can thus negotiate whether to switch roles. As another example, the sensor may detect other parameters such as battery life, signal quality, movement, current buffer level, and so on.

[0059] The short-range wireless pairing interface 419 can be used to form connections with other devices, such as a paired second device 120, or a host device, such as a mobile phone providing audio packet switching. For example, the connection can be a Bluetooth connection or any other type of wireless pairing. By way of example only, each connection can include an ACL link.

[0060] Although Figure 4 Functionally, the processor, memory, and other components of device 110 are illustrated within the same box; however, those skilled in the art will understand that the processor and memory may actually include multiple processors and memories that may or may not be stored within the same physical housing. For example, memory 412 may be volatile memory or other types of memory located in a different housing than that of computing device 110. Furthermore, the various components described above may be part of one or more electronic devices.

[0061] In this example, the second device 120 has an internal architecture similar to that of device 110. For example, the second device 120 includes a memory 422 for storing data 424 and instructions 425 that can be executed by one or more processors 426. The second device 120 further includes a battery 427, a sensor 428, a communication interface 429 such as a Bluetooth interface, and so on. Although the second device 120 is shown as executing a set of instructions 425 that are different from the instructions 41 of the first device 110, it should be understood that both devices 110 and 120 can be programmed to perform role switching from master to slave and from slave to master.

[0062] As mentioned above, instructions 415 and 425 can 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 profile 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 specific timing schedule. Once a predetermined buffer level is reached, the devices can perform a second-stage role switch, in which the first device 110 becomes slave and the second device 120 becomes master in the connection between the devices. The devices then return their clock rates to their previous settings.

[0063] Figure 5 An example timing diagram is provided illustrating communication between devices before, during, and after a two-phase role switch. The host device transmits packets to the first device 110, which initially assumes the master role, via a first short-range wireless connection. The first and second devices wirelessly pair, and the first device 110 relays the received packets via a second short-range wireless connection between the first device 110 and the second device 120. This may be normal or default operation for the devices. It should be understood that the timing diagram is only an example, and in other examples, operations may overlap or occur in a different order.

[0064] When a role switch is to be performed, the first and second devices accelerate their internal CPU clocks, and the first device sends role switch information to the second device. This role switch information may include a wireless communication profile, buffer contents, etc. While sending this role switch information, the first device 110 can receive packets from the host device 105 as it normally would.

[0065] After sending the role switch information, the device can perform the first phase of the role switch. In this phase, the first device stops receiving packets. The communication link between the host 105 and the first device 110 is removed, and the second device 120 establishes a new communication link with the host 105. The second device 120 can use this new communication link to notify the host 105 that it is the new master.

[0066] The second device 120 can therefore begin receiving packets directly from the host 105. After the first-phase role switch, the second device is a Bluetooth slave to both the host and the first device, whereby the second device 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 packets received from the host 105 to the first device 110 according to a special schedule. Such a special schedule can be stored in the communication controller of each of the first and second devices 110 and 120.

[0067] The first and second devices 110 and 120 continue to buffer the received audio packets. Once the buffer reaches a predetermined level, a second-stage role switch can be performed. For example, the predetermined level could be, for instance, the amount of data used for playback, such as data for 100ms playback, 300ms playback, etc. In other examples, the amount of data can be measured in bits or any other unit.

[0068] During the second-phase role switch, the second device becomes the Bluetooth master on the communication link between the first and second devices. In this way, the second device 110 takes over timing control from the first device 110. Once the second-phase role switch is complete, the devices will reset their CPU clocks to their pre-switch settings.

[0069] Figure 6 This is a flowchart illustrating an example method 600 for a two-stage role switching between a first wireless accessory and a second wireless accessory. Although the operations are illustrated and described in a specific order, it should be understood that the order can be modified and operations can be added or omitted.

[0070] In box 605, the first accessory receives information from the host via a first communication link. For example, the first accessory may receive audio packets from the host device via a first ACL link. The first accessory, acting as the master, relays the received information to a second accessory via a second ACL link (box 610). Boxes 605 and 610 may be repeated until it is determined in box 615 that a role switch is necessary or beneficial.

[0071] When a role switch is to be performed, the first and second accessories accelerate their internal CPU clocks in box 620. The accessories can further reduce their polling rate.

[0072] In box 625, the first accessory sends role switching information to the second accessory. This role switching information may include a Bluetooth profile, buffer contents, or any other information that the second accessory might need to use to act as the master and receive packets directly from the host device. The second accessory may use this information, for example, to rebuild its Bluetooth profile, update its buffer, etc.

[0073] In box 630, the first accessory stops receiving packets, and the second accessory establishes a link with the host. For example, the first accessory may abandon the first ACL link, and the second accessory may establish a new ACL link with the host. In box 635, the second accessory can then begin receiving packets directly from the host and relaying such packets to the first accessory. Since the second device has only completed the first phase of the role switch at this point, the second device remains a Bluetooth slave to the first device on the second ACL link. For example, the first accessory is still responsible for the timing of Bluetooth transmissions on the second ACL link, so the second device does not know when to send relayed packets. Therefore, the first and second devices use a predetermined schedule to receive / send relayed packets.

[0074] The second device can continue to receive and relay packets to the first device according to the schedule until a buffer threshold is reached in box 640. For example, the threshold could be a predetermined amount of data for playback. Such an amount can be set so that playback will not be perceptibly delayed. Once the buffer threshold is reached, the device performs a second-stage role switch, and the second accessory takes over timing control on the second ACL link (box 645). The full role switch has been completed, and the first and second accessories can then return to their previous clock speeds and polling rates.

[0075] The advantage of the systems and methods described above lies in their ability to provide seamless role switching. For example, the role switching process can be performed without the user detecting any audio glitches. This allows role switching to be performed to maintain a high signal strength connection between the host and controller, extend device battery life, or for any other reason without sacrificing the user experience.

[0076] Unless otherwise mentioned, the above alternative examples are not mutually exclusive, but can be implemented in various combinations to achieve unique advantages. Since 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 above description of the embodiments should be understood in an illustrative rather than restrictive manner. Furthermore, the examples described herein and the provision of clauses expressed as "such as," "comprising," etc., should not be construed as limiting the subject matter of the claims to the specific examples; rather, the examples are merely intended to illustrate one of many possible embodiments. Further, the same reference numerals in different figures may identify the same or similar elements.

Claims

1. A method for communicating between a first device and a second device, the method comprising: The first device receives packets from the host device; Forward the received packets from the first device to the second device; Increase the CPU clock rate of the central processing unit in each of the first device and the second device; The second device receives packets from the host device; Forward the received packets from the second device to the first device; and When the audio buffers of the first device and the second device reach a predetermined level, control over the timing of the transmitted packets is passed from the first device to the second device; and Reduce the CPU clock rate in the first device and the second device.

2. The method according to claim 1, further comprising: Before forwarding the received packets from the second device to the first device, reduce the polling time of the first device to send packets to the second device; After transmitting control over the timing of packet transmission, the polling time for the second device to send packets to the first device is increased.

3. The method according to claim 1, further comprising: While continuing to receive packets from the host device, the first device sends role switching information to the second device.

4. The method according to claim 1, wherein, Forwarding the received packets from the second device to the first device includes: forwarding according to a preset schedule.

5. The method according to claim 4, wherein, The preset schedule is programmed into the controllers of the first device and the second device.

6. The method according to claim 1, wherein, Increasing the CPU clock rate includes setting the CPU clock to its maximum rate setting.

7. The method according to claim 1, wherein, The predetermined level of the audio buffer is 100-250ms.

8. An audio receiver system, comprising: First audio receiver device; and Second audio receiver device; Each of the first audio receiver device and the second audio receiver device includes: A wireless communication interface adapted to receive audio packets via a wireless connection; An audio buffer, which is adapted to temporarily store received audio packets; A speaker, adapted to play back the audio packets temporarily stored in the audio buffer; and A processor communicating with the wireless communication interface, the processor being configured to perform communication between the first audio receiver device and the second audio receiver device, includes: The first audio receiver device receives packets from the host device; The received packets are forwarded from the first audio receiver device to the second audio receiver device; Increase the CPU clock rate of the central processing unit in each of the first audio receiver device and the second audio receiver device; The second audio receiver device receives packets from the host device; Forward the received packets from the second audio receiver device to the first audio receiver device; and When the audio buffers of the first audio receiver device and the second audio receiver device reach a predetermined level, control over the timing of transmitted packets is passed from the first audio receiver device to the second audio receiver device; and Reduce the CPU clock rate in the first audio receiver device and the second audio receiver device.

9. The system according to claim 8, wherein, The first audio receiver device and the second audio receiver device are in-ear headphones.

10. The system according to claim 8, wherein, The first audio receiver device and the second audio receiver device are further configured to: Before forwarding the received packets from the second audio receiver device to the first audio receiver device, reduce the polling time of the first audio receiver device to send packets to the second audio receiver device; After transmitting control over the timing of packet transmission, the polling time for the second audio receiver device to send packets to the first audio receiver device is increased.

11. The system according to claim 8, wherein, The first audio receiver device is also configured to send role switching information to the second audio receiver device while continuing to receive packets from the host device.

12. The system according to claim 8, wherein, The first audio receiver device and the second audio receiver device each further include a memory, the memory storing a preset schedule for forwarding received packets from the second audio receiver device to the first audio receiver device.

13. The system according to claim 8, wherein, The first audio receiver device and the second audio receiver device are further configured to: increase the CPU clock rate, including: setting the CPU clock to a maximum rate setting.

14. The system according to claim 8, wherein, The predetermined level of the audio buffer is 100-250ms.

15. A non-transitory computer-readable storage medium storing instructions executable by one or more processors to perform a method of communicating between a first device and a second device, the method comprising: When a packet is received from the host device at the first device, the received packet is forwarded from the first device to the second device; Increase the CPU clock rate of the central processing unit in each of the first device and the second device; The second device receives packets from the host device; Forward the received packets from the second device to the first device; and When the audio buffers of the first device and the second device reach a predetermined level, control over the timing of the transmitted packets is passed from the first device to the second device; and Reduce the CPU clock rate in the first device and the second device.

16. The non-transitory computer-readable storage medium according to claim 15, wherein, The first device and the second device are further configured to: Before forwarding the received packets from the second device to the first device, reduce the polling time of the first device to send packets to the second device; as well as After transmitting control over the timing of packet transmission, the polling time for the second device to send packets to the first device is increased.

17. The non-transitory computer-readable storage medium according to claim 15, wherein, The first device and the second device are further configured to: While continuing to receive packets from the host device, the first device sends role switching information to the second device.

18. The non-transitory computer-readable storage medium according to claim 15, wherein, Forwarding the received packets from the second device to the first device includes: forwarding according to a preset schedule, wherein the preset schedule is programmed into the controllers of the first device and the second device.

19. The non-transitory computer-readable storage medium according to claim 15, wherein, Increasing the CPU clock rate includes setting the CPU clock to its maximum rate setting.

20. The non-transitory computer-readable storage medium according to claim 15, wherein, The predetermined level of the audio buffer is 100-250ms.

Citation Information

Patent Citations

  • Wireless Communication Apparatus

    US20110002308A1

  • Wireless earbuds with reciprocating leader and follower configuration

    US20160219358A1