Apparatus for transmitting and receiving data and method therefor
The device synchronizes audio data playback timing across multiple speakers using TSF and PLL control, addressing clock drift issues to enhance sound quality and spatial awareness in wireless speaker systems.
Patent Information
- Application Number
- PCT/KR2025/006407
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2026-11-19
AI Technical Summary
In wireless speaker systems, clock drift between speakers leads to sound quality degradation, loss of spatial awareness, and user discomfort due to playback time discrepancies, which are challenging to synchronize effectively, especially when speakers from different manufacturers are mixed.
A device and method for synchronizing audio data playback timing using a controller that generates and transmits synchronization messages to slave devices, adjusting their playback times through Wi-Fi's time synchronization function (TSF) and Phase-Locked Loop (PLL) control, without altering the system's structure or protocol.
The solution limits playback timing errors between devices to a required range, ensuring synchronized audio output and an immersive experience by correcting clock discrepancies in wireless networks.
Smart Images

Figure KR2025006407_19112026_PF_FP_ABST
Abstract
Description
Data transmission and reception device and method for the same
[0001] The present invention relates to a device for transmitting and receiving data in a wireless network and a method for the same, and more specifically, to a device for aligning or synchronizing the output timing of audio data in a system composed of at least one master device and a plurality of slave devices and a method for the same.
[0002] With the recent advancements in Wi-Fi network technology and the improvement of wireless audio streaming capabilities, systems that allow users to enjoy high-quality audio through multiple wireless speakers in homes and offices are becoming widely adopted. These wireless speaker systems offer the advantages of excellent ease of use and flexible placement in various locations. In particular, technologies such as Dolby Atmos FlexConnect enable users to mix and match speakers from different manufacturers, providing an optimized audio experience tailored to the placement of each speaker.
[0003] In such wireless speaker systems, when multiple speakers play audio simultaneously, synchronization of playback times between speakers is crucial. If clock drift occurs between speakers, the following problems may arise.
[0004] Sound quality degradation: Overall sound quality is degraded due to overlapping or echoing sounds.
[0005]
[0006] Loss of spatial awareness: In a multi-channel audio system, if sound from each speaker does not arrive simultaneously, the three-dimensional sound effect is reduced, making it impossible to properly perceive spatial awareness.
[0007] User inconvenience: Users experience discomfort due to this time lag, and in severe cases, it may cause motion sickness or headaches.
[0008] Modern technologies such as Dolby Atmos FlexConnect aim to minimize playback time discrepancies between speakers to address these issues. For example, Dolby Atmos FlexConnect requires maintaining discrepancies between speakers within a few hundred microseconds (µs) to provide an optimal audio experience.
[0009] However, due to the characteristics of Wi-Fi network environments, such as network jitter, packet loss, and differences in speaker hardware performance, perfectly synchronizing the playback time of each speaker remains a challenging task. This issue can be particularly pronounced in environments where speakers from various manufacturers are mixed.
[0010] Therefore, the present invention aims to propose a new method to solve the problem of playback time error between speakers occurring in a Wi-Fi network-based wireless speaker system and to provide a more immersive and pleasant audio experience to the user.
[0011] The present invention proposes a device, system, or method for aligning or synchronizing the output timing of audio data in a wireless communication environment composed of at least one master and a plurality of slaves.
[0012] The problems to be solved by the present invention are not limited to the problems to be solved above, and other problems not mentioned will be clearly understood by those skilled in the art to which the present invention belongs from the description below.
[0013] According to one embodiment of the present invention, a device for wirelessly transmitting and receiving data is proposed, wherein the device comprises: an audio player configured to play audio data; a wireless transceiver configured to transmit audio data to at least one slave device or to transmit and receive data for synchronizing the playback time of the audio data with the slave device; and a controller for performing synchronization of the playback time of the audio data, wherein the controller may be configured to obtain the number of samples of audio data played up to a current time point (T1) and an estimated timer value of the current time point (T1), and to generate a synchronization message including the obtained number of samples and the estimated timer value, and to transmit the generated synchronization message to the at least one slave device, and the generation and transmission of the synchronization message may be performed periodically.
[0014] Additionally or alternatively, the controller may be configured to request the number of samples of audio data played up to the current time from the audio player, and, upon receiving an interrupt corresponding to the request from the audio player, to record a first system time and receive the requested number of samples from the audio player.
[0015] Additionally or alternatively, the controller may be configured to request a time synchronization function (TSF) timer value from the transceiver, record a second system time upon receiving an interrupt corresponding to the request from the transceiver, and receive the requested TSF timer value from the transceiver.
[0016] Additionally or alternatively, the controller may be configured to calculate an estimated TSF timer value at the current time based on the TSF timer value, the first system time, and the second system time.
[0017] Additionally or alternatively, the number of samples of audio data played up to the current time point (T1) may include the accumulated number of samples of audio data played up to the current time point.
[0018] Additionally or alternatively, the controller may be configured to receive information regarding the processing time of audio data from all of the at least one slave device, determine an initial audio data output time based on the received processing time of audio data and the current TSF timer value, and wait for the output of the audio data until the initial audio data output time.
[0019] Additionally or alternatively, the controller may be configured to transmit the determined initial audio data output time to the at least one slave device along with the first frame of the audio data.
[0020] According to another embodiment of the present invention, a device for wirelessly transmitting and receiving data is proposed, wherein the device comprises: an audio player configured to play audio data; a wireless transceiver configured to receive audio data from a master device or to transmit and receive data for synchronizing the playback time of the audio data with the master device; and a controller for synchronizing the playback time of the audio data, wherein the controller may be configured to receive a synchronization message from the master device comprising the number of samples of audio data played up to a specific time point (T1) at the master device and an estimated timer value of the specific time point (T1), and, based on the received synchronization message, to calculate an initial offset of the number of samples of the played audio data with the master device or an error in the number of samples of the played audio data with the master device, and wherein the synchronization message may be configured to be received periodically.
[0021] Additionally or alternatively, the controller may be configured to request the number of samples of audio data played up to the current time point (T3) in response to the reception of the synchronization message from the audio player, and to record a third system time and receive the requested number of samples from the audio player upon receiving an interrupt corresponding to the request from the audio player.
[0022] Additionally or alternatively, the controller may be configured to request a time synchronization function (TSF) timer value from the transceiver, record a fourth system time upon receiving an interrupt corresponding to the request from the transceiver, and obtain the requested TSF timer value from the transceiver.
[0023] Additionally or alternatively, the controller may be configured to calculate the estimated timer value at the current time based on the TSF timer value, the third system time, and the fourth system time.
[0024] Additionally or alternatively, the controller may be configured to calculate an initial offset of the number of samples of the audio data played with the master device or an error in the number of samples of the audio data played with the master device, based on the number of samples of the audio data played up to the specific time point (T1), the number of samples of the audio data played up to the current time point (T3), the estimated timer value of the specific time point (T1), and the estimated timer value of the current time point (T3).
[0025] Additionally or alternatively, the controller may be configured to control the clock of the audio player based on the sample number error of the played audio data.
[0026] Additionally or alternatively, the controller may be configured to control the clock of the audio player by additionally utilizing the audio playback frequency error with the master device.
[0027] Additionally or alternatively, the number of samples of audio data played up to the current time point (T3) may include the accumulated number of samples of audio data played up to the current time point.
[0028] Additionally or alternatively, the controller may be configured to receive an initial audio data output time determined based on information regarding the processing time of audio data of all devices configured to transmit and receive data with the master device and the current TSF timer value, and to wait for the output of the audio data until the initial audio data output time.
[0029] According to another embodiment of the present invention, a method for transmitting and receiving data in a wireless network is proposed, the method comprising: a step of obtaining the number of samples of audio data played up to a current time point (T1) and an estimated timer value of the current time point (T1); and a step of generating a synchronization message including the obtained number of samples and the estimated timer value and transmitting the generated synchronization message to at least one slave device, wherein the generation and transmission of the synchronization message may be performed periodically.
[0030] According to another embodiment of the present invention, a method for transmitting and receiving data in a wireless network is proposed, the method may include the step of receiving a synchronization message from a master device comprising the number of samples of audio data played up to a specific time point (T1) at the master device and an estimated timer value at the specific time point (T1); and the step of calculating, based on the received synchronization message, an initial offset of the number of samples of audio data played with the master device or an error in the number of samples of audio data played with the master device, and the synchronization message may be received periodically.
[0031] According to another embodiment of the present invention, a computer-readable medium is proposed that stores a computer program for performing the method for transmitting and receiving data wirelessly as described above.
[0032] The above-mentioned problem-solving methods are merely some of the embodiments of the present invention, and various embodiments reflecting the technical features of the present invention can be derived and understood by those skilled in the art based on the detailed description of the present invention to be described below.
[0033] The present invention has the following technical effects.
[0034] The present invention can limit the error in the output timing of audio data between wirelessly connected devices to within a required range.
[0035] In addition, the present invention can implement alignment or synchronization of audio data output timing between each device solely through the addition of a wireless transceiver module or a wireless transceiver.
[0036] The effects according to the present invention are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the following detailed description of the invention.
[0037] The accompanying drawings, which are included as part of the detailed description to aid in understanding the present invention, provide embodiments of the present invention and explain the technical concept of the present invention together with the detailed description.
[0038] FIG. 1 illustrates an example of a wireless network system to which the present invention can be applied.
[0039] FIG. 2 illustrates a block diagram of a wireless network system according to one embodiment of the present invention.
[0040] FIG. 3 illustrates a block diagram of a wireless network system according to another embodiment of the present invention.
[0041] FIG. 4 illustrates a wired connection system according to the prior art.
[0042] FIG. 5 illustrates a detailed block diagram of a wireless network system according to one embodiment of the present invention.
[0043] FIGS. 6 to 11 illustrate a flowchart of a method for synchronizing the playback timing of audio data according to the present invention.
[0044] FIG. 12 illustrates a flowchart of a method for synchronizing the playback timing of audio data according to the present invention.
[0045] FIG. 13 illustrates the frame structure of an audio data message according to the present invention.
[0046] FIG. 14 illustrates a flowchart of a method for synchronizing the playback timing of audio data according to the present invention.
[0047] FIG. 15 illustrates the frame structure of a synchronization message according to the present invention.
[0048] FIG. 16 illustrates a block diagram of a master device according to the present invention.
[0049] FIG. 17 illustrates a block diagram of a slave device according to the present invention.
[0050] Hereinafter, embodiments disclosed in this specification will be described in detail with reference to the attached drawings. Identical or similar components regardless of drawing symbols will be assigned the same reference number, and redundant descriptions thereof will be omitted. The suffixes "module" and "part" used for components in the following description are assigned or used interchangeably solely for the ease of drafting the specification and do not inherently possess distinct meanings or roles. Furthermore, in describing embodiments disclosed in this specification, if it is determined that a detailed description of related prior art could obscure the essence of the embodiments disclosed in this specification, such detailed description will be omitted. Additionally, the attached drawings are intended only to facilitate understanding of the embodiments disclosed in this specification; the technical concept disclosed in this specification is not limited by the attached drawings, and it should be understood that they include all modifications, equivalents, and substitutions that fall within the spirit and technical scope of the present invention.
[0051] Terms including ordinal numbers, such as first, second, etc., may be used to describe various components, but said components are not limited by said terms. These terms are used solely for the purpose of distinguishing one component from another.
[0052] When it is stated that one component is "connected" or "connected" to another component, it should be understood that while it may be directly connected or connected to that other component, there may also be other components in between. On the other hand, when it is stated that one component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.
[0053] Singular expressions include plural expressions unless the context clearly indicates otherwise.
[0054] In this application, terms such as “comprising” or “having” are intended to specify the existence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0055]
[0056] FIG. 1 illustrates an example of a wireless network system to which the present invention can be applied.
[0057] The wireless network system illustrated in Fig. 1 consists of one master device and multiple slave devices connected to each other.
[0058] The master device may store audio data or receive audio data from a connected audio source device (e.g., a Blu-ray player or an OTT receiver) and transmit the audio data to a slave device. The slave device is configured to output the audio data received from the master device. At this time, the master device may also output audio data through an output means such as a speaker.
[0059] The output timing of audio data between the master and slave devices must be aligned or synchronized. This can be a more sensitive issue not only when the master or slave device's speakers simply output audio data of the same channel (i.e., each speaker outputs the same sound), but also when the audio data consists of multiple channels and is designed to output different audio data from each speaker.
[0060] While it is possible to synchronize specific timings by utilizing Wi-Fi's TSF, clock drift issues arise due to frequency differences because the Wi-Fi chipset's clock differs from the clock oscillator of the audio system (or player) playing the audio data. Furthermore, for the master device, it is difficult to apply a method that synchronizes the audio clock with Wi-Fi's TSF information by synchronizing with an external audio source device.
[0061] It is difficult to satisfy requirements with NTP (Network Time Protocol), a general-purpose network synchronization technology, due to wireless retransmission errors. In addition, in order to utilize wireless transceivers (e.g., Wi-Fi chipsets) already installed in most devices, it is difficult to apply hardware-dependent technologies (e.g., HW slot alignment).
[0062] As another problem, even though the master device continuously compensates for frequency errors through Phase-Locked Loop (PLL) control, synchronization time errors continue to accumulate due to the difference between the occurrence and compensation timing.
[0063] Accordingly, the present invention proposes a new method for aligning or synchronizing the playback timing of audio data in a wireless network system.
[0064]
[0065] FIG. 2 illustrates a block diagram of a wireless network system according to one embodiment of the present invention.
[0066] The master device (100) is configured to transmit audio data wirelessly. The master device (100) may be configured to directly play some of the channels of the total audio data to be played, and to transmit the remaining audio data to a wirelessly connected slave device.
[0067] The master device (100) may receive or be provided with audio data from an external audio source (1000), and the audio source (1000) may be integrated into the master device (100). Referring to FIG. 3, a wireless network system in which the audio source (1000) is integrated into the master device (100) is illustrated.
[0068] The slave device (200) is configured to receive audio data wirelessly from the master device (100). The slave device (200) may be configured to play the received audio data while maintaining time synchronization with the master device (100).
[0069] The wireless network according to the present invention may be configured as a Wi-Fi P2P or Wi-Fi infrastructure network, but the present invention is not limited thereto.
[0070]
[0071] FIG. 4 illustrates a wired connection system according to the prior art.
[0072] Audio data played from an audio source (1001) is transmitted to a master device (10) via a wired connection such as HDMI. The master device (10) is configured to convert the audio data into analog and output it through each wired connected speaker.
[0073] The Media Player of the audio source (1001) is configured to play audio data in accordance with the clock (CK_SRS) of the audio source (1001). The master device (10) plays audio data in accordance with its own clock (CK_SYS) (i.e., converts from digital to analog), receives the clock (CK_SRS) of the audio source from the audio source (1001) connected via a wire, and is configured to perform PLL control so that CK_SYS becomes identical to CK_SRS.
[0074] Since the speakers wired to the master device (10) receive audio data converted to analog, no synchronization problem occurs.
[0075]
[0076] FIG. 5 illustrates a detailed block diagram of a wireless network system according to one embodiment of the present invention.
[0077] Although FIG. 5 shows an audio source (1000) existing outside the master device (100), as previously explained, the audio source (1000) can be integrated into the master device (100). Additionally, although only one slave device (200) is shown, the wireless network system of the present invention may include one or more slave devices.
[0078] The master device (100) may include a wireless transceiver (110), a controller (120), an audio system (or audio player) (130), a speaker (141, 142), and a PLL (150).
[0079] Additionally, the slave device (200) may include a wireless transceiver (210), a controller (220), an audio system (or audio player) (230), a speaker (240), and a PLL (250).
[0080] The wireless transceiver (110, 210), controller (120, 220), and audio system (130, 230) are configured to each have a clock. Additionally, the audio system (130, 230) can correct the clock through PLL control.
[0081] The audio system (130, 230) is configured to be connected to a speaker (141, 142, 240) configured to output an analog-converted signal from audio data.
[0082] Unlike the conventional technology illustrated in FIG. 4, the system of the present invention illustrated in FIG. 5 transmits and receives audio data (i.e., digital data) wirelessly between a master device (100) and a slave device (200), so each uses its own clock information when converting audio data from digital to analog. Since the clock information is different from each other, correction of the clock information is required. This specification proposes a method for the slave device to correct the clock information of the slave device through PLL control.
[0083] The connection between the audio source (1000) and the master device (100) and the transmission of audio data are the same as in FIG. 4.
[0084] The master device (100) or the audio player (130) of the master device (100) may be configured to transmit audio data received from an audio source to a controller (120). The controller (120) may be configured to transmit the channels of audio data to be played by the master device (100) back to the audio player (130), and to transmit the channels of audio data to be played by the slave device (200) to the slave device (200) via a wireless transceiver (110). The audio player (130) of the master device (100) and the audio player (230) of the slave device (200) may be configured to play audio data.
[0085] The Media Player of the audio source (1000) is configured to play audio data in accordance with the clock (CK_SRS) of the audio source (1000). The master device (100) is configured to play audio data in accordance with its own clock (CK_MAS). Additionally, the master device (100) receives the clock (CK_SRS) of the audio source (1000) from the wired audio source (1000) and is configured to perform PLL control so that CK_MAS becomes identical to CK_SRS. Additionally, the slave device (200) is configured to play audio data in accordance with its own clock (CK_SAS).
[0086] The master device (100) and the slave device (200) play audio data according to their respective clocks (CK_MAS, CK_SAS), so if their clocks do not match, they are configured to play and output audio data at different timings.
[0087] Accordingly, a method is required to control the clocks of the master device (100) and the slave device (200) to be synchronized, that is, to make CK_SAS equal to CK_SRS or to make CK_SAS converge to CK_SRS. In particular, a method is required that can be achieved through a controller (120, 220) without changing the structure or protocol of the existing system.
[0088] The wireless transceiver (110, 210) includes a Wi-Fi chipset, and the clocks (CK_MWF, CK_SWF), i.e., the time synchronization function (TSF) timer values, are synchronized according to the Wi-Fi protocol. In the present invention, a method is proposed to synchronize the clocks between a master device and a slave device using the TSF, and more specifically, to synchronize the playback timing of audio data through clock control.
[0089] Meanwhile, although the controller (120, 220) is shown as a separate configuration, the controller (120, 220) can be integrated into each of the audio systems (130, 230).
[0090]
[0091] FIGS. 6 to 11 illustrate a flowchart of a method for synchronizing the playback timing of audio data according to the present invention.
[0092]
[0093] FIG. 6 illustrates a flowchart of a method for synchronizing the playback timing of audio data according to the present invention. FIG. 6 illustrates one slave device (200), but as shown in FIG. 12 and FIG. 14, a larger number of slave devices (200) may participate in the method.
[0094] The master device (100) and the slave device (200) can be configured to establish a Wi-Fi wireless connection (S610). The master device (100) and the slave device (200) connect to a Wi-Fi P2P or Wi-Fi infrastructure network.
[0095] The Wi-Fi chipset of the master device (100), i.e., the wireless transceiver, transmits a beacon as a P2P_GO (or AP).
[0096] The Wi-Fi chipset of the slave device (200), i.e., the wireless transceiver, receives a beacon transmitted from the master device as a P2P_Client (or STA) and synchronizes the clock with the TSF.
[0097] The master device (100) and the slave device (200) are configured to synchronize the playback timing for the first audio frame to be played (S620). This will be described later with reference to FIG. 7.
[0098] Then, the master device (100) can continuously transmit subsequent audio frames to the slave device (200) (S630).
[0099] However, as explained above, it may be configured to perform a synchronization procedure to synchronize the clock of the master device and the clock of the slave device or to synchronize the playback timing of audio data (S640).
[0100] The master device (100) may be configured to generate a synchronization message (S641). The procedure for generating the synchronization message will be described later with reference to FIGS. 8 and 9.
[0101] The master device (100) can be configured to send a synchronization message to the slave device (200) (S642).
[0102] The slave device (200) may be configured to calculate the initial offset of the number of samples of the audio data played with the master device (100) or the error in the number of samples of the audio data played with the master device (100) using information included in the received synchronization message (S643).
[0103] Additionally, the slave device (200) may be configured to control its own PLL based on the error in the number of generated samples (S644).
[0104] Meanwhile, in FIG. 7, the transmission and reception of audio frames (S630, S650) are shown before and after the synchronization procedure (S640), but this does not limit the invention. The synchronization procedure (S640) may be configured to be performed periodically after the first audio frame is transmitted and received between the master device (100) and the slave device (200).
[0105]
[0106] FIG. 7 illustrates a flowchart of a method for synchronizing the playback timing of audio data according to the present invention. FIG. 7 illustrates one slave device (200), but as illustrated in FIG. 12 and FIG. 14, a larger number of slave devices (200) may participate in the method. FIG. 7 illustrates a method for synchronizing the playback timing of the first audio frame to be played between a master device (100) and a slave device (200).
[0107] The slave device (200) can be configured to transmit the time required for audio data processing to the master device (100) (S621).
[0108] The master device (100) can receive the time required for audio data processing of all slave devices connected to it.
[0109] The master device (100) can determine the initial audio output time based on the time required to process the audio data of the received slave device and the current TSF timer value.
[0110] The initial audio output time can be determined as the sum of the maximum value between the current TSF timer value and the time required for audio data processing by all slave devices. Additionally, the initial audio output time may additionally include the transmission delay time between the master device and the slave devices.
[0111] The master device (100) may be configured to transmit information about the determined initial audio output time to the slave device (200) along with the first audio frame of the audio data (S623).
[0112] The master device (100) and the slave device (200) may be configured to buffer and play when necessary, taking into account the time required for their own audio data processing, so that the first audio frame can be output from the speaker at the initial audio output time based on the TSF timer value.
[0113] Accordingly, the playback timing of the first audio frame of the audio data can be synchronized or aligned.
[0114]
[0115] FIGS. 8 and 9 illustrate a procedure for generating a synchronization message. FIGS. 10 and 11 also illustrate a procedure for obtaining an initial offset or a regenerated sample count error using a synchronization message.
[0116] FIGS. 8 and 9 illustrate a procedure for obtaining the number of samples of accumulated audio data confirmed at a first time point and the TSF timer value at the first time point in a master device. FIGS. 10 and 11 illustrate a procedure for obtaining the number of samples of accumulated audio data confirmed at a second time point and the TSF timer value at the second time point in a slave device, and for obtaining an error by comparing the amount of change in the TSF timer value with the difference in the number of samples of accumulated audio data.
[0117] FIGS. 8 and 9 are performed in a master device (100). Specifically, the wireless transceiver (110), controller (120), and audio system (or audio player) (130) of the master device (100) are shown to perform the procedures of FIGS. 8 and 9, but at least two of these may be implemented as one integrated unit.
[0118] Figures 8 and 9 are executed according to inter-process communication (IPC), and since errors may occur depending on the time required to process IPC messages, interrupts are utilized.
[0119]
[0120] FIG. 8 relates to a procedure in which a controller (120) of a master device (100) reads and stores the number of samples of audio data played up to the current time point (T1) and the system time.
[0121] The controller (120) may be configured to request the number of samples of audio data played up to time point (T1) from the audio system (130) (S6401).
[0122] The audio system (130) can check the number of samples of audio data played up to time point (T1) (S6402), and can be configured to send an interrupt to the controller (120) in response to receiving the request of S6401 (S6403).
[0123] The controller (120) may be configured to obtain a first system time by checking its clock (CK_MWTX) upon receiving an interrupt from the audio system (130) (S6404). Additionally, the controller may receive the number of samples of audio data played up to time T1 from the audio system (130) (S6405).
[0124] The controller (120) may be configured to store the number of samples of audio data played up to the first system time and time T1 (S6406).
[0125]
[0126] FIG. 9 relates to a procedure in which a controller (120) of a master device (100) reads and stores the TSF timer value and system time at the current time (T2). T2 may be different from T1.
[0127] The controller (120) can be configured to request the TSF timer value of the current time (T2) from the wireless transceiver (110) (S6407).
[0128] The transceiver (110) can check the TSF timer value at time point (T2) (S6408), and can be configured to send an interrupt to the controller (120) in response to receiving the request of S6407 (S6409).
[0129] The controller (120) may be configured to obtain a second system time by checking its clock (CK_MWTX) upon receiving an interrupt from the transceiver (110) (S6410). Additionally, the controller may receive the TSF timer value of time point (T2) from the transceiver (110) (S6411).
[0130] The controller (120) may be configured to store the TSF timer value of the second system time and time point (T2) (S6412).
[0131] The controller (120) may be configured to construct a synchronization message based on the number of samples of audio data played up to the first system time and time point (T1), and the TSF timer value of the second system time and time point (T2) (S6413). More specifically, the synchronization message may include the estimated TSF timer value of time point (T1) and the number of samples of audio data played up to time point (T1). However, the number of samples of audio data played up to time point T1 may be converted into the same unit as the TSF timer value (in microseconds) and included in the synchronization message. It may be expressed as follows.
[0132]
[0133]
[0134] SPL_FREQ is the sampling frequency of the audio data, and can be a preset value for each audio data, such as 44.1, 48, or 96 KHz.
[0135]
[0136] FIGS. 10 and 11 are performed in a slave device (200). More specifically, FIGS. 10 and 11 are performed when the slave device (200) receives a synchronization message from the master device (100).
[0137] Although the wireless transceiver (210), controller (220), and audio system (or audio player) (230) of the slave device (200) are shown to perform the procedure of FIGS. 10 to 11, at least two of these may be implemented as one integrated unit.
[0138] Figures 10 and 11 are performed according to IPC communication, and since errors may occur depending on the time required to process IPC messages, interrupts are utilized.
[0139]
[0140] FIG. 10 relates to a procedure in which a controller (220) of a slave device (200) reads and stores the number of samples of audio data played up to the current time point (T3) and the system time.
[0141] The controller (220) can be configured to request the number of samples of audio data played up to the current time (T3) from the audio system (230) (S6431).
[0142] The audio system (230) can check the number of samples of audio data played up to time point (T3) (S6432), and can be configured to send an interrupt to the controller (220) in response to receiving the request of S6431 (S6433).
[0143] The controller (220) may be configured to obtain a third system time by checking its clock (CK_SWTX) upon receiving an interrupt from the audio system (230) (S6434). Additionally, the controller may receive the number of samples of audio data played up to time point (T3) from the audio system (230) (S6435).
[0144] The controller (220) may be configured to store the number of samples of audio data played up to the third system time and time point (T3) (S6436).
[0145]
[0146] FIG. 11 relates to a procedure in which a controller (220) of a slave device (200) reads and stores the TSF timer value and system time at the current time (T4). T4 may be different from T3.
[0147] The controller (220) can be configured to request the TSF timer value of the current time (T4) from the wireless transceiver (210) (S6437).
[0148] The transceiver (210) can check the TSF timer value at time point (T4) (S6438), and can be configured to send an interrupt to the controller (220) in response to receiving the request of S6437 (S6439).
[0149] The controller (220) may be configured to obtain a fourth system time by checking its clock (CK_SWTX) upon receiving an interrupt from the transceiver (210) (S6440). Additionally, the controller may receive the TSF timer value of time point (T4) from the transceiver (210) (S6441).
[0150] The controller (220) can be configured to store the TSF timer value of the fourth system time and time point (T4) (S6442).
[0151] Additionally, the controller (220) stores the estimated TSF timer value at time point (T3) as follows, and the number of samples of audio data played up to time point T3 is converted into the same unit as the TSF timer value (in microseconds) and can be stored as follows.
[0152]
[0153]
[0154] Then, the controller (220) may be configured to calculate the initial offset of the number of samples of the played audio data with the master device or the error in the number of samples of the played audio data with the master device (S6443).
[0155] S6443 is configured to calculate an initial offset or a sample count error depending on whether the synchronization message received from the master device is the first synchronization message.
[0156] If the synchronization message received from the master device is the first synchronization message, the controller (220) can calculate the initial offset. The initial offset can be expressed as follows.
[0157]
[0158] If the synchronization message received from the master device is not the first synchronization message, the controller (220) can calculate the error in the number of samples of the played audio data. This represents the error in the number of played samples between the slave device and the master device. The error in the number of played samples can be expressed as follows.
[0159]
[0160] The error in the number of reproduced samples in mathematical formula 7 is in microseconds, so it can be converted back into the number of samples.
[0161] Again, referring to FIG. 6, the slave device (200) can be configured to control the PLL of the audio system (230) based on the error of the number of acquired playback samples (S644).
[0162] I will elaborate further on the PLL control of the slave device.
[0163] The slave device can be configured to determine the clock frequency based on the error in the number of playback samples with the master device. The clock frequency can be determined as follows.
[0164]
[0165] CLK_CTRL represents the control amount of the clock and can be defined as follows.
[0166]
[0167] CPN_PRD represents the algorithm operation period (in seconds) aimed at compensating SPL_ERR (playback sample count error) within the specified interval. For example, if SPN_PRD is 3 seconds, the algorithm operates with the goal of compensating SPL_ERR within 3 seconds. The transmission period of the synchronization message must be smaller than CPN_PRD.
[0168] In addition, the playback frequency error between the master device and the slave device can be expressed as follows.
[0169]
[0170] Alpha is a weight for the sample count error compensation rate of the played audio data; if it is too large, sound distortion due to abrupt changes may occur. Beta is a weight for playback frequency error compensation; ideally, it is "1," but abrupt fluctuations may occur due to measurement errors.
[0171] Since the present invention bases the clock correction of the audio system of a slave device on the error in the number of playback samples of audio data up to a specific point in time between the master device and the slave device, it has the advantage of not causing the accumulation of errors compared to correction that simply tracks the clock frequency.
[0172]
[0173] FIG. 12 illustrates a flowchart of a method for synchronizing the playback time of audio data according to the present invention. FIG. 12 shows two slave devices (201, 202), but a smaller number of slave devices or a larger number of slave devices may participate in the method.
[0174] As the main contents have been explained with reference to the preceding drawings, a detailed explanation will be omitted.
[0175] With reference to FIG. 12, it is intended to show that a plurality of slave devices (201, 202) perform the same operation with one master device (100). Since the plurality of slave devices (201, 202) acquire the time required for their respective audio data processing, the values may differ, but they are basically configured to perform the same operation.
[0176] For details not explained with reference to FIG. 12, refer to the details explained with reference to FIG. 5 to FIG. 11.
[0177]
[0178] FIG. 13 illustrates the frame structure of an audio data message according to the present invention.
[0179] FIG. 13(a) shows the structure of the first audio frame of audio data, and Playback Time represents the “initial audio output time” described above with reference to FIG. 7. Playback Time is information in microseconds and may be composed of 64 bits, but the present invention is not limited thereto.
[0180] Figure 13(b) shows the structure of a normal frame (i.e., a frame other than the first audio frame). Unlike the first audio frame, it can be seen that there is no Playback Time.
[0181] MSG Type indicates the message type, and in this case, it may indicate an “audio frame”. SN indicates the sequence number, LEN indicates the length, and Audio Frame Data indicates the audio data of the frame.
[0182]
[0183] FIG. 14 illustrates a flowchart of a method for synchronizing the playback timing of audio data according to the present invention. FIG. 14 shows two slave devices (201, 202), but a smaller number of slave devices or a larger number of slave devices may participate in the method.
[0184] As the main contents have been explained with reference to the preceding drawings, a detailed explanation will be omitted.
[0185] With reference to FIG. 14, it is intended to show that a plurality of slave devices (201, 202) perform the same operation with one master device (100). Each of the plurality of slave devices (201, 202) calculates the error in the number of samples of audio data played up to a specific point in time with the master device, and is configured to perform the same operation in principle, although this may differ from one another. Each slave device is configured to perform PLL control for the clock of its audio system (or audio player) based on the error in the number of samples of audio data played between itself and the master device.
[0186] For details not explained with reference to FIG. 14, refer to the details explained with reference to FIG. 5 to FIG. 11.
[0187]
[0188] FIG. 15 illustrates the frame structure of a synchronization message according to the present invention.
[0189] MSG Type indicates the message type, and in this case, it may indicate a “synchronization message”. TSF Time indicates the “estimated TSF timer value at time T1”, and Master Sampler Count indicates the “number of samples of audio data played up to time T1 after unit conversion”.
[0190]
[0191] FIG. 16 illustrates a block diagram of a master device according to the present invention.
[0192] FIG. 16 illustrates a master device (100). The master device (100) may include a wireless transceiver (110), a controller (120), and an audio player (130). Each of the wireless transceiver (110), the controller (120), and the audio player (130) includes a clock (or clock generator), thereby allowing each clock information to be checked or acquired. The audio player (130) includes a PLL for correcting the clock (or clock generator).
[0193] Additionally, the master device (100) may optionally include at least one of a speaker (140) or a memory (160).
[0194] The master device (100) may be configured to wirelessly transmit and receive data with one or more slave devices (200). Additionally, the master device (100) may be configured to perform an operation for synchronizing the playback timing of audio data with one or more slave devices.
[0195] A wireless transceiver (110) may be configured to transmit and receive data wirelessly. The wireless transceiver (110) may be implemented as a Wi-Fi chipset. More specifically, the wireless transceiver (110) may be configured to transmit audio data to at least one slave device or to transmit and receive data for synchronizing the playback time of the audio data with said slave device.
[0196] An audio player (or audio system) (130) may be configured to convert or process audio data. More specifically, the audio player (130) may be configured to convert digital audio data into analog audio data and to deliver the converted analog audio data to an output means such as a speaker.
[0197] The memory (160) may be configured to store code for operations for transmitting and receiving data with a slave device. In addition, the memory (160) may be configured to store code for operations related to the invention described above.
[0198] The controller (120) may be composed of one or more processors.
[0199] The controller (120) may be configured to perform operations for transmitting and receiving data with one or more slave devices by executing code stored in memory (160). Additionally, the controller (120) may be configured to perform operations for synchronizing the playback timing of audio data with one or more slave devices by executing code stored in memory (160).
[0200] The controller (120) may be configured to obtain the number of samples of audio data played up to the current time point (T1) and the estimated timer value of the current time point (T1). The number of samples of audio data played up to the current time point (T1) may include the accumulated number of samples of audio data played up to the current time point.
[0201] Additionally, the controller (120) may be configured to generate a synchronization message including the number of samples obtained and the estimated timer value, and to transmit the generated synchronization message to at least one slave device. The generation and transmission of the synchronization message may be performed periodically.
[0202] The controller (120) may be configured to request the number of samples of audio data played up to the current point in time from the audio player. Additionally, the controller (120) may be configured to record a first system time upon receiving an interrupt corresponding to the request from the audio player. Afterward, the controller (120) may be configured to receive the requested number of samples from the audio player.
[0203] The controller (120) may be configured to request a time synchronization function (TSF) timer value from the transceiver. Additionally, the controller (120) may be configured to record a second system time upon receiving an interrupt corresponding to the request from the transceiver. Afterward, the controller (120) may be configured to receive the requested TSF timer value from the transceiver.
[0204] The controller (120) may be configured to calculate an estimated TSF timer value at the current time based on the TSF timer value, the first system time, and the second system time.
[0205] The controller (120) may be configured to receive information regarding the processing time of audio data from all of the at least one slave device. The controller (120) may be configured to determine an initial audio data output time based on the received processing time of the audio data and the current TSF timer value. Additionally, the controller (120) may be configured to wait for the output of the audio data until the initial audio data output time.
[0206] The controller (120) may be configured to transmit the determined initial audio data output time to the at least one slave device along with the first frame of the audio data.
[0207] For descriptions of master devices not described with reference to FIG. 16, refer to the descriptions of master devices described with reference to FIG. 1 to FIG. 15 described above.
[0208]
[0209] FIG. 17 illustrates a block diagram of a slave device according to the present invention.
[0210] FIG. 17 illustrates a slave device (200). The slave device (200) may include a wireless transceiver (210), a controller (220), and an audio player (230). Each of the wireless transceiver (210), the controller (220), and the audio player (230) includes a clock (or clock generator), and accordingly, each clock information can be checked or acquired. The audio player (230) includes a PLL for correcting the clock (or clock generator).
[0211] Additionally, the slave device (200) may optionally include at least one of a speaker (240) or a memory (260).
[0212] The slave device (200) may be configured to wirelessly transmit and receive data with the master device (100). Additionally, the slave device (200) may be configured to perform an operation for synchronizing the playback timing of audio data with the master device.
[0213] The wireless transceiver (210) may be configured to wirelessly transmit and receive data with a master device. The wireless transceiver (210) may be implemented as a Wi-Fi chipset. More specifically, the wireless transceiver (210) may be configured to receive audio data from the master device or to transmit and receive data for synchronizing the playback time of the audio data with the master device.
[0214] An audio player (or audio system) (230) may be configured to convert or process audio data. More specifically, the audio player (20) may be configured to convert digital audio data into analog audio data and to transmit the converted analog audio data to an output means such as a speaker.
[0215] The memory (260) may be configured to store code for operations for transmitting and receiving data with a master device. In addition, the memory (260) may be configured to store code for operations related to the invention described above.
[0216] The controller (220) may be composed of one or more processors.
[0217] The controller (220) may be configured to perform operations for transmitting and receiving data with the master device by executing code stored in the memory (260). Additionally, the controller (220) may be configured to perform operations for synchronizing the playback timing of audio data with the master device by executing code stored in the memory (260).
[0218] The controller (220) may be configured to receive a synchronization message from the master device including the number of samples of audio data played up to a specific time point (T1) from the master device and the estimated timer value of the specific time point (T1). The synchronization message may be received periodically.
[0219] The controller (220) may be configured to calculate an initial offset with respect to the number of samples of the audio data being played by the master device or a sample count error with respect to the number of samples of the audio data being played by the master device, based on the received synchronization message.
[0220] The controller (220) may be configured to request the number of samples of audio data played up to the current time point (T3) in response to the reception of the synchronization message from the audio player. The number of samples of audio data played up to the current time point (T3) may include the accumulated number of samples of audio data played up to the current time point. Additionally, the controller (220) may be configured to record a third system time upon receiving an interrupt corresponding to the request from the audio player. Afterward, the controller (220) may be configured to receive the requested number of samples from the audio player.
[0221] The controller (220) may be configured to request a time synchronization function (TSF) timer value from the transceiver. Additionally, the controller (220) may be configured to record a fourth system time upon receiving an interrupt corresponding to the request from the transceiver. Afterward, the controller (220) may be configured to obtain the requested TSF timer value from the transceiver.
[0222] The controller (220) may be configured to calculate the estimated timer value of the current time based on the TSF timer value, the third system time, and the fourth system time.
[0223] The controller (220) may be configured to calculate an initial offset of the number of samples of the audio data played with the master device or an error in the number of samples of the audio data played with the master device, based on the number of samples of the audio data played up to the specific time point (T1), the number of samples of the audio data played up to the current time point (T3), the estimated timer value of the specific time point (T1), and the estimated timer value of the current time point (T3).
[0224] The controller (220) may be configured to control the clock of the audio player based on the sample count error of the played audio data. Additionally, the controller (220) may be configured to control the clock of the audio player by additionally utilizing the audio playback frequency error with the master device.
[0225] The controller (220) may be configured to receive an initial audio data output time determined based on information regarding the processing time of audio data of all devices configured to transmit and receive data with the master device and the current TSF timer value. The controller (220) may be configured to wait for the output of the audio data until the initial audio data output time.
[0226] For descriptions of slave devices not described with reference to FIG. 17, refer to the descriptions of slave devices described with reference to FIG. 1 to FIG. 15 described above.
[0227]
[0228] Meanwhile, although not explained, the master device and slave device described above may form a single system to implement the present invention. In this case, at least one slave device may be included in the system.
[0229]
[0230] In addition, as another aspect of the present invention, the operation of the above-described proposal or invention may be provided as code that can be implemented, practiced, or executed by a "computer" (a comprehensive concept including a system on chip (SoC) or (micro)processor, etc.), or as a computer-readable storage medium or computer program product that stores or contains said code, and the scope of the present invention may be extended to said code or as a computer-readable storage medium or computer program product that stores or contains said code.
[0231]
[0232] The detailed description of the preferred embodiments of the present invention disclosed above is provided to enable those skilled in the art to implement and practice the present invention. Although the present invention has been described with reference to preferred embodiments, those skilled in the art will understand that various modifications and changes can be made to the present invention as described in the following claims. Accordingly, the present invention is not intended to be limited to the embodiments shown herein, but to be given the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. As a device for transmitting and receiving data in a wireless network, An audio player configured to play audio data; A wireless transceiver configured to transmit audio data to at least one slave device or to transmit and receive data for synchronizing the playback time of the audio data with the slave device; and It includes a controller for performing playback timing synchronization of the above audio data, and the controller: The number of samples of audio data played up to the current time point (T1) and the estimated timer value of the current time point (T1) are obtained, and It is configured to generate a synchronization message including the number of samples and an estimated timer value obtained above, and to transmit the generated synchronization message to at least one slave device, A device in which the generation and transmission of the above synchronization message are performed periodically.
2. In paragraph 1, the controller is: Request the number of samples of audio data played up to the current point in time using the above audio player, and Upon receiving an interrupt corresponding to the request from the above audio player, the first system time is recorded, and A device configured to receive the requested number of samples from the above audio player.
3. In paragraph 2, the controller is: Request a TSF (time synchronization function) timer value from the above transmitter / receiver, and Upon receiving an interrupt corresponding to the request from the above transceiver, the second system time is recorded, and, A device configured to receive the requested TSF timer value from the above transceiver.
4. In paragraph 3, the controller is: A device configured to calculate an estimated TSF timer value at the current time based on the above TSF timer value, the above first system time, and the above second system time.
5. A device according to claim 1, wherein the number of samples of audio data played up to the current time point (T1) includes the accumulated number of samples of audio data played up to the current time point.
6. In paragraph 1, the controller is: Receive information regarding the processing time of audio data from all of the above at least one slave device, and Determine the initial audio data output time based on the processing time of the received audio data and the current TSF timer value, and A device configured to wait for the output of the audio data until the initial audio data output time.
7. In paragraph 6, the above controller is: A device configured to transmit the determined initial audio data output time together with the first frame of the audio data to at least one slave device.
8. As a device for transmitting and receiving data in a wireless network, An audio player configured to play audio data; A wireless transceiver configured to receive audio data from a master device or to transmit and receive data for synchronizing the playback time of the audio data with the master device; and It includes a controller for synchronizing the playback timing of the above audio data, and the controller: A synchronization message is received from the master device including the number of samples of audio data played up to a specific point in time (T1) at the master device and the estimated timer value at the specific point in time (T1), and Based on the received synchronization message, it is configured to calculate an initial offset of the number of samples of the audio data played with the master device or an error in the number of samples of the audio data played with the master device, and The above synchronization message is received periodically by a device.
9. In paragraph 8, the above controller is: In response to the reception of the synchronization message by the above audio player, the number of samples of audio data played up to the current time point (T3) is requested, and Upon receiving an interrupt corresponding to the request from the above audio player, the third system time is recorded, and A device configured to receive the requested number of samples from the above audio player.
10. In paragraph 9, the above controller is: Request a TSF (time synchronization function) timer value from the above transmitter / receiver, and Upon receiving an interrupt corresponding to the request from the above transceiver, the fourth system time is recorded, and, A device configured to obtain the requested TSF timer value from the above transceiver.
11. In Clause 10, the above controller is: A device configured to calculate an estimated timer value at the current time based on the above TSF timer value, the above third system time, and the above fourth system time.
12. In paragraph 11, the above controller is: A device configured to calculate an initial offset of the number of samples of the audio data played with the master device or an error in the number of samples of the audio data played with the master device, based on the number of samples of the audio data played up to the specific point in time (T1), the number of samples of the audio data played up to the current point in time (T3), the estimated timer value of the specific point in time (T1), and the estimated timer value of the current point in time (T3).
13. In Clause 12, the above controller is: A device configured to control the clock of the audio player based on the sample count error of the audio data played above.
14. In Paragraph 13, the above controller is: A device configured to control the clock of the audio player by additionally utilizing the audio playback frequency error with the master device.
15. A device according to claim 9, wherein the number of samples of audio data played up to the current time point (T3) includes the accumulated number of samples of audio data played up to the current time point.
16. In paragraph 8, the above controller is: Receives an initial audio data output time determined based on information regarding the processing time of audio data of all devices configured to transmit and receive data with the master device and the current TSF timer value, and A device configured to wait for the output of the audio data until the initial audio data output time.
17. A method for transmitting and receiving data in a wireless network, wherein the method comprises: A step of obtaining the number of samples of audio data played up to the current time point (T1) and the estimated timer value of the current time point (T1); and The method includes the step of generating a synchronization message including the number of samples obtained and the estimated timer value, and transmitting the generated synchronization message to at least one slave device. A method in which the generation and transmission of the above synchronization message are performed periodically.
18. A method for transmitting and receiving data in a wireless network, wherein the method comprises: A step of receiving a synchronization message from the master device including the number of samples of audio data played up to a specific point in time (T1) at the master device and an estimated timer value at the specific point in time (T1); and Based on the received synchronization message, the method includes the step of calculating an initial offset of the number of samples of the audio data played with the master device or an error in the number of samples of the audio data played with the master device. The above synchronization message is received periodically.
19. A computer-readable medium storing a computer program executed by a computer or processor for performing the method according to paragraph 17.
20. A computer-readable medium storing a computer program executed by a computer or processor for performing the method according to paragraph 18.
