Method for processing audio data and electronic device thereof

By increasing the traffic margin in the electronic device and retransmitting, the disconnection problem caused by data loss in audio data transmission is solved, the signal-to-noise ratio and anti-interference ability are improved, and the stable output of the audio signal is ensured.

CN113474836BActive Publication Date: 2025-03-07SAMSUNG ELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080015551.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-02-19
Filing Date
2020-02-18
Publication Date
2025-03-07
Estimated Expiration
2040-02-18

Smart Images

  • Figure CN113474836B_ABST
    Figure CN113474836B_ABST
Patent Text Reader

Abstract

An electronic device including a speaker, a communication circuit, a processor and a memory is disclosed. The processor is configured to receive first data including a first audio frame corresponding to a first interval and a second audio frame corresponding to a second interval after the first interval using the communication circuit, store the second audio frame in the memory in response to receiving the first data, output a first audio signal generated based on the first audio frame through the speaker, and when second data including the second audio frame and a third audio frame corresponding to a third interval after the second interval is received using the communication circuit, store the third audio frame in the memory and output a second audio signal generated based on the second audio frame of the second data through the speaker.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to a method for processing audio data and an electronic device thereof. Background Art

[0002] Various electronic devices can be connected to each other based on various communication specifications. For example, an electronic device can be connected to an external electronic device based on a communication specification such as Bluetooth or Bluetooth Low Energy (BLE). When connected, an electronic device (e.g., a car kit or an artificial intelligence (AI) speaker) can use a connected external electronic device (e.g., a mobile phone) to make a voice call. For the purpose of making a voice call, the electronic device can send the user's voice received through a microphone to the mobile phone, and can receive voice data received from a cellular network through the mobile phone. In this way, the electronic device can send encoded audio data to an external electronic device (e.g., a mobile phone) and receive encoded audio data from an external electronic device (e.g., a mobile phone) based on a specific communication specification.

[0003] When the electronic device sends audio data to an external electronic device, the electronic device may encode the audio data based on a specific specification for connecting to the external electronic device. For example, when the electronic device is connected to the external electronic device based on the Bluetooth or BLE specification, the electronic device may encode the audio data using one of the various voice codecs defined in the Bluetooth or BLE specification. And more specifically, the electronic device may encode the audio data using a modified sub-band coding (mSBC) codec widely used in the Bluetooth or BLE specification.

[0004] The above information is presented as background information only to assist in understanding the present disclosure. No determination has been made and no assertion has been made as to whether any of the above contents may be applicable as prior art with respect to the present disclosure. Summary of the invention

[0005] Technical issues

[0006] The electronic device may transmit audio data using packets defined based on Bluetooth or BLE specifications. For example, when using the mSBC codec, one such electronic device may generate a bitstream by encoding the audio data at a compression rate of 64 kbps. The electronic device may divide the bitstream into sizes corresponding to a specified time interval, and may transmit data packets of the divided bitstream at a specified time.

[0007] For example, the electronic device may divide the bit stream of the audio data into 7.5ms frames, and may send data packets including the divided frames after a specified time period (e.g., 7.5ms). These time periods may be referred to as cycles. The receiving electronic device may receive the data packets at the beginning or end of a specific cycle, and may decode and play the frames included in the received packets in real time. In this case, because the length of the frame of the audio data received in one cycle is equal to the length of the time period, the receiving electronic device may not be able to buffer the audio data separately. Therefore, when a data packet is lost in one cycle, the receiving electronic device may be disconnected. For example, due to interference in the communication channel used by the electronic device, the loss of data packets may occur.

[0008] Aspects of the present disclosure are to address at least the above-mentioned problems and / or disadvantages and to provide at least the advantages described below.

[0009] Solution to the problem

[0010] According to one aspect of the present disclosure, an electronic device may include a speaker, a communication circuit, a processor operably connected to the communication circuit, and a memory operably connected to the processor. The memory may store one or more instructions, wherein the one or more instructions, when executed, cause the processor to perform the following operations: using the communication circuit to receive first data including a first audio frame corresponding to a first interval and a second audio frame corresponding to a second interval after the first interval; in response to receiving the first data, storing the second audio frame in the memory; outputting a first audio signal generated based on the first audio frame through the speaker; when receiving second data including a second audio frame and a third audio frame corresponding to a third interval after the second interval using the communication circuit, storing the third audio frame in the memory and outputting a second audio signal generated based on the second audio frame of the second data through the speaker; and when at least part of the second data is not received using the communication circuit, outputting a second audio signal generated based on the second audio frame of the first data stored in the memory through the speaker.

[0011] According to another aspect of the present disclosure, an electronic device may include a communication circuit, a processor operably connected to the communication circuit, and a memory operably connected to the processor. The memory may store one or more instructions, wherein the one or more instructions, when executed, cause the processor to perform the following operations: obtain audio data; encode the audio data using a specified codec to generate a plurality of frames, wherein each frame has a size corresponding to a single connection interval; and send a first data packet including a first frame of the plurality of frames and a second frame after the first frame to an external electronic device in a first connection interval.

[0012] According to another aspect of the present disclosure, an electronic device may include a communication circuit, a processor operably connected to the communication circuit, and a memory operably connected to the processor. The memory may store one or more instructions, wherein the one or more instructions, when executed, cause the processor to perform the following operations: obtain audio data; encode the audio data using a specified codec to generate a plurality of frames, wherein each frame has a size corresponding to a single connection interval; and send a first data packet including two or more frames of the plurality of frames to an external electronic device in a first specified time interval using the communication circuit. The second data packet sent in the second specified time interval may include at least one frame, wherein the at least one frame is the same as one of the two or more frames included in the first data packet sent in the first specified time interval before the second specified time interval.

[0013] According to another aspect of the present disclosure, a data sending method of an electronic device may include: obtaining audio data; encoding the audio data using a specified codec to generate multiple frames, wherein each frame has a size corresponding to a single connection interval; sending a first data packet including a first frame of the multiple frames and a second frame after the first frame to an external electronic device in a first connection interval; and sending a second data packet including a second frame and a third frame after the second frame to the external electronic device in a second connection interval after the first connection interval.

[0014] Other aspects, advantages, and salient features of the present disclosure will become apparent to those skilled in the art from the following detailed description of various embodiments of the present disclosure disclosed in conjunction with the accompanying drawings.

[0015] Beneficial Effects of the Invention

[0016] According to certain embodiments disclosed herein, an electronic device may increase a signal-to-noise ratio (SNR) at a receiver by increasing a traffic margin.

[0017] In certain embodiments of the present specification, a method for transmitting and receiving audio data that is more robust against interference may be provided.

[0018] According to certain embodiments disclosed in the present specification, even if some packets are lost within a connection interval, the electronic device can prevent unwanted muting of an audio signal by performing retransmission within the same connection interval using a traffic margin.

[0019] According to certain embodiments disclosed in this specification, an electronic device may buffer audio data using at least a portion of a plurality of bitstream frames in a received data packet.

[0020] In addition, various features and advantages directly or indirectly understood through the present disclosure may be provided. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other aspects, features and advantages of certain embodiments of the present disclosure will become more apparent through the following description in conjunction with the accompanying drawings, in which:

[0022] Figure 1 is a block diagram illustrating electronic devices in a network according to various embodiments;

[0023] Figure 2 is a diagram showing a communication environment of an electronic device according to an embodiment;

[0024] Figure 3 is a block diagram showing the structure of a basic rate packet according to an embodiment;

[0025] Figure 4 is a block diagram illustrating the structure of an enhanced data rate packet according to an embodiment;

[0026] Figure 5 is a block diagram illustrating a header structure according to an embodiment;

[0027] Figure 6 is a diagram illustrating audio data transmission according to an embodiment;

[0028] Figure 7 is a diagram illustrating transmission of a data packet including a plurality of frames according to an embodiment;

[0029] Figure 8 is a diagram illustrating retransmission of data packets based on traffic margin according to an embodiment;

[0030] Fig. 9 is a flowchart of a method for sending audio data according to an embodiment;

[0031] Fig.10 is a flowchart of a method of sending a data packet including a plurality of frames according to an embodiment;

[0032] Fig.11 is a flowchart of a method of outputting audio data according to an embodiment; and

[0033] Fig.12 is a flowchart of a method of transmitting audio data according to an embodiment. DETAILED DESCRIPTION

[0034] Hereinafter, various embodiments of the present disclosure may be described with reference to the accompanying drawings. The embodiments and terms used with respect to the embodiments are not intended to limit the technology described herein to specific embodiments, and should be understood to include various modifications, equivalents and / or alternatives of the embodiments.

[0035] Figure 1 1 is a block diagram illustrating an electronic device 101 in a network environment 100 according to various embodiments. Figure 1 , the electronic device 101 in the network environment 100 may communicate with the electronic device 102 via the first network 198 (e.g., a short-range wireless communication network), or communicate with the electronic device 104 or the server 108 via the second network 199 (e.g., a long-range wireless communication network). According to an embodiment, the electronic device 101 may communicate with the electronic device 104 via the server 108. According to an embodiment, the electronic device 101 may include a processor 120, a memory 130, an input device 150, a sound output device 155, a display device 160, an audio module 170, a sensor module 176, an interface 177, a haptic module 179, a camera module 180, a power management module 188, a battery 189, a communication module 190, a user identification module (SIM) 196, or an antenna module 197. In some embodiments, at least one of the components (e.g., the display device 160 or the camera module 180) may be omitted from the electronic device 101, or one or more other components may be added to the electronic device 101. In some embodiments, some components may be implemented as a single integrated circuit. For example, the sensor module 176 (eg, a fingerprint sensor, an iris sensor, or an illumination sensor) may be implemented to be embedded in the display device 160 (eg, a display).

[0036] The processor 120 may execute, for example, software (e.g., program 140) to control at least one other component (e.g., hardware or software component) of the electronic device 101 in combination with the processor 120, and may perform various data processing or calculations. According to one embodiment, as at least part of the data processing or calculation, the processor 120 may load a command or data received from another component (e.g., sensor module 176 or communication module 190) into the volatile memory 132, process the command or data stored in the volatile memory 132, and store the resultant data in the non-volatile memory 134. According to an embodiment, the processor 120 may include a main processor 121 (e.g., a central processing unit (CPU) or an application processor (AP)) and an auxiliary processor 123 (e.g., a graphics processor (GPU), an image signal processor (ISP), a sensor hub processor, or a communication processor (CP)) that may operate independently of the main processor 121 or in combination with the main processor 121. Additionally or alternatively, the auxiliary processor 123 may be adapted to consume less power than the main processor 121, or be dedicated to a designated function. The auxiliary processor 123 may be implemented separately from the main processor 121 , or may be implemented as a part of the main processor 121 .

[0037] The auxiliary processor 123 may replace the main processor 121 when the main processor 121 is in an inactive (e.g., sleep) state, or control at least some functions or states related to at least one of the components of the electronic device 101 (e.g., the display device 160, the sensor module 176, or the communication module 190) together with the main processor 121 when the main processor 121 is in an active state (e.g., executing an application). According to an embodiment, the auxiliary processor 123 (e.g., an image signal processor or a communication processor) may be implemented as a part of another component (e.g., the camera module 180 or the communication module 190) that is functionally related to the auxiliary processor 123.

[0038] The memory 130 may store various data used by at least one component of the electronic device 101 (e.g., the processor 120 or the sensor module 176). The various data may include, for example, software (e.g., the program 140) and input data or output data for commands related thereto. The memory 130 may include a volatile memory 132 or a nonvolatile memory 134.

[0039] The program 140 may be stored as software in the memory 130 , and may include, for example, an operating system (OS) 142 , middleware 144 , or applications 146 .

[0040] The input device 150 may receive commands or data from outside the electronic device 101 (e.g., a user) to be used by other components of the electronic device 101 (e.g., the processor 120). The input device 150 may include, for example, a microphone, a mouse, a keyboard, or a digital pen (e.g., a stylus).

[0041] The sound output device 155 can output a sound signal to the outside of the electronic device 101. The sound output device 155 may include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as playing multimedia or playing a recording, and the receiver can be used for incoming calls. According to an embodiment, the receiver can be implemented as a part of the speaker or as a part of the speaker.

[0042] The display device 160 may visually provide information to the outside of the electronic device 101 (e.g., a user). The display device 160 may include, for example, a display, a holographic device, or a projector, and a control circuit for controlling a corresponding one of the display, the holographic device, and the projector. According to an embodiment, the display device 160 may include a touch circuit suitable for detecting a touch, or a sensor circuit (e.g., a pressure sensor) suitable for measuring the strength of a force caused by a touch.

[0043] The audio module 170 may convert sound into an electrical signal and vice versa. According to an embodiment, the audio module 170 may obtain sound via the input device 150, or output sound via the sound output device 155 or an earphone of an external electronic device (e.g., electronic device 102) directly (e.g., wired) or wirelessly coupled to the electronic device 101.

[0044] The sensor module 176 may detect an operating state (e.g., power or temperature) of the electronic device 101 or an environmental state (e.g., a user's state) outside the electronic device 101, and then generate an electrical signal or data value corresponding to the detected state. According to an embodiment, the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared (IR) sensor, a biosensor, a temperature sensor, a humidity sensor, or an illumination sensor.

[0045] The interface 177 may support one or more designated protocols for the electronic device 101 to directly (e.g., wiredly) or wirelessly combine with an external electronic device (e.g., the electronic device 102). According to an embodiment, the interface 177 may include, for example, a high-definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.

[0046] The connection terminal 178 may include a connector via which the electronic device 101 may be physically connected to an external electronic device (e.g., the electronic device 102). According to an embodiment, the connection terminal 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0047] The haptic module 179 may convert the electric signal into mechanical stimulation (eg, vibration or motion) or electric stimulation recognizable by the user via his sense of touch or kinesthetic sense. According to an embodiment, the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electric stimulator.

[0048] The camera module 180 may capture still images or moving images. According to an embodiment, the camera module 180 may include one or more lenses, an image sensor, an image signal processor, or a flash.

[0049] The power management module 188 may manage power supplied to the electronic device 101. According to one embodiment, the power management module 188 may be implemented as, for example, at least a portion of a power management integrated circuit (PMIC).

[0050] The battery 189 may supply power to at least one component of the electronic device 101. According to an embodiment, the battery 189 may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0051] The communication module 190 may support establishing a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (e.g., electronic device 102, electronic device 104, or server 108), and perform communication via the established communication channel. The communication module 190 may include one or more communication processors that can operate independently of the processor 120 (e.g., an application processor (AP)) and support direct (e.g., wired) communication or wireless communication. According to an embodiment, the communication module 190 may include a wireless communication module 192 (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules may communicate via a first network 198 (e.g., a short-range communication network such as Bluetooth TM The wireless communication module 192 may communicate with an external electronic device using a wireless communication network (e.g., a wireless fidelity (Wi-Fi) direct connection, or an infrared data association (IrDA)) or a second network 199 (e.g., a remote communication network such as a cellular network, the Internet, or a computer network (e.g., a LAN or a wide area network (WAN))). These various types of communication modules may be implemented as a single component (e.g., a single chip), or may be implemented as multiple components separated from each other (e.g., multiple chips). The wireless communication module 192 may use user information (e.g., an international mobile subscriber identity (IMSI)) stored in the user identification module 196 to identify and authenticate the electronic device 101 in a communication network (e.g., a first network 198 or a second network 199).

[0052] The antenna module 197 may send a signal or power to the outside of the electronic device 101 (e.g., an external electronic device) or receive a signal or power from the outside of the electronic device 101 (e.g., an external electronic device). According to an embodiment, the antenna module 197 may include an antenna, wherein the antenna includes a radiation element formed of a conductive material or a conductive pattern formed in or on a substrate (e.g., a PCB). According to an embodiment, the antenna module 197 may include a plurality of antennas. In this case, at least one antenna suitable for a communication scheme used in a communication network (such as the first network 198 or the second network 199) may be selected from the plurality of antennas by, for example, the communication module 190 (e.g., the wireless communication module 192). Then, a signal or power may be sent or received between the communication module 190 and the external electronic device via the selected at least one antenna. According to an embodiment, another component (e.g., a radio frequency integrated circuit (RFIC)) other than the radiation element may be additionally formed as a part of the antenna module 197.

[0053] At least some of the above components may be coupled to each other via a peripheral communication scheme (e.g., a bus, general purpose input and output (GPIO), a serial peripheral interface (SPI), or a mobile industry processor interface (MIPI)) and communicate signals (e.g., commands or data) therebetween.

[0054] According to an embodiment, a command or data may be sent or received between the electronic device 101 and the external electronic device 104 via the server 108 combined with the second network 199. Each of the electronic device 102 and the electronic device 104 may be a device of the same type or a different type as the electronic device 101. According to an embodiment, all or some operations to be performed at the electronic device 101 may be performed at one or more of the external electronic device 102, the external electronic device 104, or the server 108. For example, if the electronic device 101 should automatically perform a function or service, or perform the function or service in response to a request from a user or another device, the electronic device 101 may request one or more external electronic devices to perform at least part of the function or service, instead of performing the function or service, or in addition to performing the function or service, may also request one or more external electronic devices to perform at least part of the function or service. The one or more external electronic devices receiving the request may perform at least part of the requested function or service, or perform another function or another service related to the request, and transmit the result of the execution to the electronic device 101. The electronic device 101 may provide the result with or without further processing as at least part of the reply to the request. To this end, for example, cloud computing, distributed computing or client-server computing techniques may be used.

[0055] According to various embodiments, the electronic device 101 may include Figure 1 At least part of the components of the electronic device 101 shown. According to an embodiment, the electronic device 101 may include a communication module 190, a processor 120 operatively connected to the communication module 190, and a memory 130 operatively connected to the processor 120. For example, the memory 130 may store instructions, wherein the instructions, when executed, cause the processor 120 to perform operations of the electronic device 101 to be described later. According to an embodiment, the electronic device 101 may also include Figure 1 For example, the electronic device 101 may further include a housing that accommodates at least part of the structure of the electronic device 101.

[0056] Figure 2 is a diagram illustrating a communication environment 200 of the electronic device 101 according to an embodiment.

[0057] According to an embodiment, the electronic device 101 may communicate with another electronic device (eg, Figure 1 According to an embodiment, the electronic device 101 may use at least one communication circuit (e.g., Figure 1 The communication module 190 of the electronic device 101 performs communication through the second network 199. For example, the electronic device 101 can perform long-range wireless communication through the second network 199 (for example, a long-range wireless communication network such as a cellular network, the Internet, or a computer network (for example, a LAN or WAN)).

[0058] According to an embodiment, the electronic device 101 may use short-range wireless communication (eg, the first network 198) to communicate with an external electronic device 202 (eg, Figure 1 According to an embodiment, the electronic device 101 may use at least one communication circuit (eg, Figure 1 The electronic device 101 may communicate with the external electronic device 202 using the communication module 190. For example, the electronic device 101 may communicate with the external electronic device 202 based on a specified communication specification (e.g., Wi-Fi, Bluetooth, BLE, Zigbee, or a proximity awareness network (NAN)) using at least one communication circuit.

[0059] According to an embodiment, the electronic device 101 may communicate with the external electronic device 202 based on the Bluetooth communication specification. For example, the electronic device 101 may be an electronic device paired with the external electronic device 202. For example, the electronic device 101 may be connected to the paired external electronic device 202, and may send or receive data through the connection with the external electronic device 202.

[0060] According to an embodiment, the electronic device 101 may transmit data obtained from the second network 199 to the external electronic device 202. The electronic device 101 may receive a data packet of a specific communication protocol associated with the second network 199, and may transmit at least a portion of the received data packet to the external electronic device 202. For example, the electronic device 101 may generate a data packet of a communication protocol associated with the first network 198 using at least a portion of the received data packet, and may transmit the generated data packet to the external electronic device 202.

[0061] According to an embodiment, the electronic device 101 may transmit data obtained by the electronic device 101 itself to the external electronic device 202. For example, the electronic device 101 may use a microphone (eg, Figure 1 The electronic device 101 may obtain audio data through the input device 150 of the external electronic device 202, and may generate data packets of the communication protocol associated with the first network 198 based on the obtained data. Then, the electronic device 101 may transmit the generated data packets to the external electronic device 202.

[0062] According to an embodiment, the electronic device 101 may receive data from the external electronic device 202. For example, the electronic device 101 may receive data from the external electronic device 202 via the first network 198. The electronic device 101 may transmit the received data through the second network 199. The electronic device 101 may obtain audio data from the received data, and may use a speaker (e.g., Figure 1 The sound output device 155) outputs an audio signal corresponding to the audio data.

[0063] According to an embodiment, the external electronic device 202 may be an electronic device similar to the electronic device 101. For example, the external electronic device 202 may be an AI speaker having a configuration similar to that of the electronic device 101. Figure 2 , the electronic device 101 is illustrated as a mobile phone; and the external electronic device 202 is illustrated as an AI speaker; however, embodiments of the present disclosure are not limited thereto.

[0064] In the following, it may be assumed that the electronic device 101 transmits a data packet including audio data to the external electronic device 202 and receives a data packet including audio data from the external electronic device 202 using Bluetooth communication. Bluetooth communication is exemplary, and the electronic device 101 may communicate with the external electronic device 202 using various short-range communications. For ease of description, in the described embodiment, the electronic device 101 transmits a data packet to the external electronic device 202, but the embodiments of the present disclosure are not limited thereto. In an alternative embodiment, the external electronic device 202 may transmit a data packet to the electronic device 101.

[0065] Figure 3 is a block diagram illustrating the structure of a basic rate packet 310 according to an embodiment.

[0066] When the electronic device 101 transmits a data packet to the external electronic device 202 based on the Bluetooth communication specification, the electronic device 101 may use a basic rate packet. Figure 3 The general format of such a packet 310 is shown.

[0067] According to an embodiment, the basic rate packet 310 may include an access code 311 , a header 313 , and a payload 315 . Figure 3 The structure of the basic rate packet 310 shown in is exemplary, and the packet structure of the present disclosure is not limited thereto. For example, in other alternative embodiments, the basic rate packet 310 may include only the access code 311 or only the access code 311 and the header 313.

[0068] According to an embodiment, the access code 311 may have a length of 72 bits or 68 bits. The access code 311 may be used for synchronization, direct current (DC) offset compensation and / or packet identification. The access code 311 may be used to identify all packets exchanged on the physical channel. For example, packets sent on the same physical channel may include the same access code 311.

[0069] According to an embodiment, the header 313 may have a length of 54 bits and may be a header of a packet. Figure 5 The header 313 may include a logical transmission address (LT_ADDR) 511, a type (TYPE) 512, a flow (FLOW) 513, an automatic retransmission request number (ARQN) 514, a sequence number (SEQN) 515 and a header error check (HEC) 516.

[0070] For example, LT_ADDR 511 may include a corresponding packet (e.g., Figure 3 LT_ADDR 511 may include the address of the logical transport channel of the destination or source, depending on the time slot in which the packet is sent.

[0071] For example, TYPE 512 may indicate the type of the corresponding packet. For example, TYPE 512 may indicate whether the packet is sent via a synchronous connection-oriented link (SCO) logical transport, an enhanced SCO (eSCO) logical transport, an asynchronous connectionless (ACL) logical transport, or a connectionless slave broadcast (CSB) logical transport. In one embodiment, TYPE 512 may indicate whether the packet is a SCO packet, an eSCO packet, or an ACL packet.

[0072] For example, FLOW 513 may be used for flow control of packets sent on the ACL logical transport. FLOW 513 may not be used on the eSCO logical transport.

[0073] For example, the ARQN 514 may indicate whether the payload data is successfully transmitted to the transmitting device. For example, when the previously received payload data is successfully received, the electronic device 101 may include information indicating confirmation in the ARQN 514. In another example, when the previously received payload data is not successfully received, the electronic device 101 may include information indicating negative confirmation (Neg-ACK) in the ARQN 514.

[0074] For example, SEQN 515 may include information indicating the sequence of a data packet flow.

[0075] For example, the HEC 516 may be used to identify one or more errors in the header 313. Therefore, the receiving device may identify the integrity of the header 313 using the HEC 516 of the header 313 of the received packet.

[0076] Back to Figure 3 , the payload 315 may include information to be sent by the transmitting device. For example, the payload 315 may include audio data, for example, audio data encoded as packets. The payload 315 may have a length of 0 bits to 2790 bits.

[0077] Figure 4 is a block diagram illustrating the structure of an enhanced data rate packet 420 according to an embodiment.

[0078] When the electronic device 101 sends a data packet to the external electronic device 202 based on the Bluetooth communication specification, the electronic device 101 may use Figure 4 An enhanced data rate packet format 420 is shown.

[0079] According to an embodiment, the enhanced data rate packet 420 may include an access code 311, a header 313, a protection 421, a synchronization 423, an enhanced data rate payload 425, and a trailer 427. For example, the access code 311 and the header 313 may be modulated based on Gaussian frequency shift keying (GFSK). The synchronization 423, the enhanced data rate payload 425, and the trailer 427 may be modulated based on differential phase shift keying (DPSK). For example, the protection 421 may be located between the end of the GFSK symbol of the header 313 and the beginning of the synchronization sequence (e.g., synchronization 423) of the header 313. The synchronization 423 may include synchronization sequence information for synchronization. The enhanced data rate payload 425 may include information to be sent by a transmitting device (e.g., electronic device 101). For example, the trailer 427 may include multiple 0 bits.

[0080] Back to Figure 2 According to an embodiment, the electronic device 101 may obtain audio data and may generate a bitstream by encoding the audio data using a specified codec. For example, the electronic device 101 may encode the audio data using an audio codec associated with the first network 198. According to an embodiment, the electronic device 101 may encode the audio data using an audio codec defined in the Bluetooth communication specification. For example, the electronic device 101 may generate a bitstream by encoding the audio data using a modified sub-band codec (mSBC).

[0081] According to an embodiment, the electronic device 101 may divide the bit stream into a plurality of frames having a size corresponding to a specified time interval. For example, the electronic device 101 may generate a frame such that the length of the audio data corresponding to the frame is the length of the connection interval of the Bluetooth communication specification. For example, the length of the connection interval may be approximately 7.5 milliseconds (ms).

[0082] According to an embodiment, the electronic device 101 may transmit a data packet including the plurality of frames to the external electronic device 202. For example, the electronic device 101 may transmit the data packet in each connection interval. The electronic device 101 may modulate at least one frame according to the type of the data packet, and may transmit the data packet including the modulated frame as a payload to the external electronic device 202. For example, the type of the data packet may be indicated by its header (e.g., Figure 3 Specifically, the type of the data packet may be indicated by TYPE 512 of the header.

[0083] In the following, reference will be made to Figures 6 to 8 The data transmission method of the electronic device 101 is described. Figures 6 to 8 In the present invention, for ease of description, the delay between the transmitter (eg, electronic device 101) and the receiver (eg, external electronic device 202) may be negligible and thus ignored. However, in real life scenarios, there may be a delay between the transmitter and the receiver.

[0084] Figure 6 is a diagram illustrating an audio data transmission 600 according to an embodiment.

[0085] Reference Figure 6 , the electronic device 101 may transmit a data packet to the external electronic device 202 in each of the first connection interval T1, the second connection interval T2, the third connection interval T3, the fourth connection interval T4, the fifth connection interval T5, and the sixth connection interval T6. For example, the first data packet 610 may include a first frame; the second data packet 620 may include a second frame; the third data packet 630 may include a third frame; the fourth data packet 640 may include a fourth frame; the fifth data packet 650 may include a fifth frame; and the sixth data packet 660 may include a sixth frame.

[0086] According to an embodiment, the electronic device 101 may generate a plurality of frames by encoding the audio data into frames using a specified codec. For example, the electronic device 101 may generate frames having a specified size from the audio data using a codec having a compression rate of 32 kbps. In another example, the electronic device 101 may generate frames having a size corresponding to the connection interval.

[0087] According to an embodiment, the size of the frame may be determined based on the length of the connection interval. For example, the length of the connection interval may be 7.5 ms. Then, when the electronic device 101 uses a codec with a compression rate of 32 kbps, the size of each frame may be 30 bytes.

[0088] According to an embodiment, the electronic device 101 may generate a data packet for each of the generated frames. For example, the electronic device 101 may generate a data packet including the generated frames in its payload. The electronic device 101 may generate a data packet by modulating the data including the frames according to a specified packet type.

[0089] According to an embodiment, the electronic device 101 can use a profile or a logical transmission to send and receive audio data, wherein the profile is set to send and receive audio data. For example, the electronic device 101 can use SCO logical transmission or eSCO logical transmission to send and receive audio data. SCO logical transmission can be a point-to-point transmission between a symmetrical master device and a specific slave device. eSCO logical transmission can be a point-to-point transmission between a master device and a specific slave device.

[0090] According to an embodiment, the electronic device 101 may transmit and receive audio data using a data packet of the type used in the eSCO logical transport. For example, the electronic device 101 may transmit and receive audio data using an Extended Voice 3 (EV3) packet capable of transmitting 30 bytes in a connection interval.

[0091] exist Figure 6 In an embodiment of the present invention, the electronic device 101 can encode the audio data using an audio codec with a compression rate of 32 kbps. In this case, the generated frame is smaller than the frame of the conventional mSBC codec with a compression rate of 64 kbps. When the electronic device 101 sends one frame in each connection interval, the communication capacity margin can be increased compared to using the mSBC codec. Due to the increase in the communication capacity margin, the electronic device 101 can perform communication with a more robust ability to resist external interference.

[0092] exist Figure 6 In an embodiment of the present invention, for example, the electronic device 101 may transmit and receive audio data using EV3 packets capable of transmitting 30 bytes per connection interval instead of 2-EV3 packets capable of transmitting 60 bytes per connection interval. The electronic device 101 may increase the signal-to-noise ratio (SNR) at the receiver of the data packets by transmitting and receiving audio data using EV3 packets instead of 2-EV3 packets.

[0093] According to an embodiment, due to the increased traffic margin, the electronic device 101 is able to resend the lost packets. For example, the data packets sent by the electronic device 101 may be lost due to various reasons such as external interference. In this example, when it is determined that the data packets sent in a specific connection interval are lost, the electronic device 101 may resend the data packets in the traffic margin in the same connection interval. For example, the fifth data packet 650 sent in the fifth connection interval may be lost. In this case, because there is enough traffic margin in the fifth connection interval, the electronic device 101 is able to resend the fifth data packet 650 in the fifth connection interval. For example, the electronic device 101 can resend the fifth data packet 650 to the external electronic device 202 using the traffic margin in the connection interval generated by using a codec with an increased compression rate (e.g., 32kbps). According to an embodiment, when a negative acknowledgment NACK for the data packet sent in the connection interval is received from the external electronic device 202 or an acknowledgment ACK is not received, the electronic device 101 can perform retransmission of the data packet in the same connection interval.

[0094] According to an embodiment, the external electronic device 202 may output an audio signal corresponding to the received data packet. For example, the external electronic device 202 may receive a first data packet 610 including a first frame in a first connection interval T1, and may output a signal corresponding to the first frame using audio data corresponding to the first frame included in the first data packet during a time period corresponding to the first connection interval T1. For example, the external electronic device 202 may demodulate the first data packet 610 to obtain encoded audio data (e.g., the first frame), and may decode the encoded audio data to output an audio signal. Figure 6 In the embodiment of the present invention, the external electronic device 202 may use real-time decoding to output the audio signal.

[0095] Figure 7 is a diagram illustrating transmission 700 of a data packet including a plurality of frames according to an embodiment.

[0096] Reference Figure 7, the electronic device 101 may send a first data packet 710 including a first frame and a second frame in a first connection interval T1; the electronic device 101 may send a second data packet 720 including a second frame and a third frame in a second connection interval T2; the electronic device 101 may send a third data packet 730 including a third frame and a fourth frame in a third connection interval T3; the electronic device 101 may send a fourth data packet 740 including a fourth frame and a fifth frame in a fourth connection interval T4; the electronic device 101 may send a fifth data packet 750 including a fifth frame and a sixth frame in a fifth connection interval T5; and the electronic device 101 may send a sixth data packet 760 including a sixth frame and a seventh frame in a sixth connection interval T6.

[0097] According to an embodiment, the electronic device 101 may generate a plurality of frames by encoding the audio data into frames using a specified codec. For example, the electronic device 101 may generate frames having a specified size from the audio data using a codec having a compression rate of 32 kbps. For example, the electronic device 101 may generate frames having a size corresponding to the connection interval. The length of the connection interval may be 7.5 ms.

[0098] According to an embodiment, the electronic device 101 may generate data packets each including the generated multiple frames. For example, the electronic device 101 may generate a data packet including multiple frames in its payload. For example, the electronic device 101 may use a 2-EV3 type packet used in an eSCO logical transmission to send multiple frames as one packet. In this way, the 2-EV3 packet may include two frames and will achieve a transmission of 60 bytes per connection interval.

[0099] According to an embodiment, the data packet transmitted by the electronic device 101 may include audio data corresponding to a plurality of connection intervals. Figure 7 As shown, the electronic device 101 may send a data packet including a previously sent frame and a frame after the previously sent frame. For example, in the second connection interval T2, the electronic device 101 may send a second data packet 720 including a second frame sent in the first connection interval T1 and a third frame after the second frame to the external electronic device 202.

[0100] For example, when the electronic device 101 uses an audio codec with a compression rate of 32 kbps, the electronic device may send a 2-EV3 type data packet including two frames in a single connection interval, wherein each frame has a size of 30 bytes. In addition, one of the two frames may be a frame sent in the previous connection interval. In this case, the electronic device 101 can effectively send most frames twice to the external electronic device 202.

[0101] According to an embodiment, the external electronic device 202 may obtain two frames from a single data packet continuously in time. For example, the external electronic device 202 may obtain two frames continuously in time by demodulating the received data packet. The external electronic device 202 may output an audio signal by decoding the first frame of the two frames, and may buffer the second frame. For example, the external electronic device 202 may output an audio signal in a time interval corresponding to the connection interval using the first frame of the plurality of frames of the data packet received in the connection interval. The external electronic device 202 may also buffer the second frame of the plurality of frames of the data packet received in the connection interval.

[0102] Reference Figure 7 For example, the external electronic device 202 may receive a fourth data packet 740 including a fourth frame and a fifth frame in a fourth connection interval T4. According to an embodiment, the external electronic device 202 may decode the fourth frame of the received fourth data packet 740 to output an audio signal corresponding to the fourth frame in a time interval corresponding to the fourth connection interval T4. The external electronic device 202 may buffer the fifth frame of the received fourth data packet 740. In the fifth connection interval T5, the fifth data packet 750 sent by the electronic device 101 may not be successfully received by the external electronic device 202 due to interference. For example, the fifth data packet 750 may be lost. In this case, the external electronic device 202 may output audio data in a time interval corresponding to the fifth connection interval T5 using the buffered fifth frame of the fourth data packet 740. Therefore, although the fifth data packet 750 is lost, the external electronic device 202 may output an audio signal seamlessly using the buffered fifth frame.

[0103] exist Figure 7 In the example shown, the data packet includes two frames, but the embodiments of the present disclosure are not limited thereto. In alternative embodiments, the data packet may include any number of frames. For example, a receiver (e.g., external electronic device 202) may decode and output one of the received multiple frames, and may buffer the remaining frames to prepare for packet loss. In this way, the external electronic device 202 may improve unwanted silence of the audio by buffering a portion of the multiple frames.

[0104] According to an embodiment, when there is no buffered frame, the external electronic device 202 may send a retransmission request to the electronic device 101. For example, when receiving the retransmission request, the electronic device 101 may retransmit the previously transmitted data packet. Therefore, since retransmission is required only when the buffered frame is exhausted, the electronic device 101 can reduce the consumption of wireless resources caused by retransmission.

[0105] Figure 8 is a diagram illustrating retransmission 800 of data packets based on traffic headroom according to an embodiment.

[0106] Reference Figure 8 According to an embodiment, the electronic device 101 may send a data packet including a plurality of frames in a time period corresponding to the plurality of frames. For example, the electronic device 101 may send a first data packet 810 including a first frame and a second frame in a first connection interval T1; the electronic device 101 may send a second data packet 820 including a third frame and a fourth frame in a third connection interval T3; the electronic device 101 may send a third data packet 830 including a fifth frame and a sixth frame in a fifth connection interval T5. Therefore, in this example, when the data packet includes two frames, the electronic device 101 may be configured to send the data packet for each even connection interval or odd connection interval.

[0107] According to an embodiment, the electronic device 101 may generate a plurality of frames by encoding the audio data into frames using a specified codec. For example, the electronic device 101 may generate frames of a specified size from the audio data using a codec having a compression rate of 32 kbps. For example, the electronic device 101 may generate frames of a size corresponding to the connection interval. For example, the length of the connection interval may be 7.5 ms. For example, the electronic device 101 may send a plurality of frames as a packet, wherein the packet is a 2-EV3 type used in an eSCO logical transport.

[0108] According to an embodiment, the data packet sent by the electronic device 101 may include audio data corresponding to multiple connection intervals. For example, the electronic device 101 may send a data packet including multiple frames that are continuous in time. For example, in the first connection interval T1, the electronic device 101 may send a first data packet 810 including a first frame and a second frame after the first frame to the external electronic device 202.

[0109] According to an embodiment, the state of the electronic device 101 may be converted to a first state (e.g., a wake-up state or an active state) in a connection interval in which a data packet is sent, and then the electronic device 101 may send the data packet; after sending the data packet, the state of the electronic device 101 may be converted to a second state (e.g., a sleep state or an inactive state) until the next data packet is sent. For example, the state of the electronic device 101 may be converted to a first state in a first connection interval T1, and then the electronic device 101 may send a first data packet 810; and then, the state of the electronic device 101 may be converted to a second state in a second connection interval T2. Because the electronic device 101 does not need to remain in the first state in each connection interval, the power consumption of the electronic device 101 can be reduced. In addition, because the electronic device 101 sends data in a time-division manner, that is, data is not sent in each connection interval, the electronic device 101 can use time-division communication to reduce interference with other wireless communications (e.g., Wi-Fi communication).

[0110] According to an embodiment, the external electronic device 202 may obtain two frames from a single data packet. For example, the external electronic device 202 may obtain two frames by demodulating the received data packet, wherein one frame is temporally continuous with the other frame.

[0111] According to an embodiment, the external electronic device 202 may decode the first frame of the two frames received in the previous connection interval to output an audio signal in the current connection interval, and may use the second frame of the two frames to output the audio signal in the next connection interval after buffering the second frame. For example, in the first connection interval T1, the external electronic device 202 may receive a first data packet 810 including a first frame and a second frame. The external electronic device 202 may decode the first frame in the second connection interval T2 after the first connection interval T1 to output an audio signal, and may buffer the second frame. The external electronic device 202 may use the buffered second frame to output an audio signal in the third connection interval T3 after the second connection interval T2.

[0112] According to an embodiment, the electronic device 101 may perform retransmission of lost packets in a connection interval in which data packets are not otherwise transmitted. For example, the third data packet 830 transmitted in the fifth connection interval T5 may be lost due to interference. In this case, the electronic device 101 may retransmit the third data packet 830 in the subsequent sixth connection interval T6. For example, when no confirmation for the third data packet 830 is received from the external electronic device 202, or when a negative confirmation for the third data packet 830 is received, the electronic device 101 may retransmit the third data packet 830.

[0113] According to an embodiment, the external electronic device 202 may decode the first frame in front of the plurality of frames of the data packet received in the first connection interval T1 to output the decoded first frame in the second connection interval T2; next, the external electronic device 202 may buffer the second frame, and then may output the buffered second frame in the third connection interval T3. In this case, the external electronic device 202 not only buffers one subsequent frame, but also delays the output by one frame. In addition, for example, even if the third data packet 830 transmitted in the fifth connection interval T5 is lost, the external electronic device 202 may perform seamless audio output by obtaining the retransmitted third data packet 830 in the sixth connection interval T6 during the delay. In this way, because timely retransmission is achieved, unwanted silence of the audio is reduced.

[0114] Fig. 9 is a flowchart 900 of a method of transmitting audio data according to an embodiment.

[0115] According to an embodiment, the electronic device 101 may be connected to an external electronic device (eg, Figure 2 For example, the electronic device 101 may be an electronic device configured to communicate with the external electronic device 202 in a specified time interval (e.g., a connection interval). According to an embodiment, the electronic device 101 may be configured to send a data packet including audio data to the external electronic device 202 in the specified time interval.

[0116] According to an embodiment, at operation 905, the electronic device 101 may obtain audio data. For example, the electronic device 101 may obtain audio data by using a communication circuit (eg, Figure 1 The communication module 190 of the electronic device 101 receives a wireless signal including audio data to obtain the audio data. In another example, the electronic device 101 may use an input device (eg, Figure 1 In another example, the electronic device 101 may obtain audio data stored in a memory (e.g., Figure 1 The above method of obtaining audio data is only an example, and the electronic device 101 can obtain audio data via various methods. For example, the audio data can be a digital signal of an audio signal. The digital signal can be obtained by converting an analog audio signal into a digital signal.

[0117] According to an embodiment, the electronic device 101 may generate a bitstream by encoding the audio data using a specified codec in operation 910. According to an embodiment, the electronic device 101 may generate a bitstream by encoding the audio data using an audio codec of a specific communication specification (e.g., a Bluetooth communication specification) for communicating with the external electronic device 202. For example, the electronic device 101 may generate a bitstream using a codec having a compression rate of 32 kbps.

[0118] According to an embodiment, in operation 915, the electronic device 101 may generate a plurality of frames having a size corresponding to a specified time interval (e.g., a connection interval) from a bit stream. For example, the electronic device 101 may generate a plurality of frames by dividing the bit stream by a specified size. For example, the size of each of the plurality of frames may correspond to a time period of a time slot in which the electronic device 101 sends data to the external electronic device 202. For example, the specified time interval may be 7.5 ms. The electronic device 101 may be configured to send data packets in the specified time interval.

[0119] According to an embodiment, operation 910 and operation 915 may be combined. For example, the electronic device 101 may generate a frame by encoding the audio data into a bit stream having a specified size using a specified codec. The electronic device 101 may generate a plurality of frames by sequentially encoding the audio data.

[0120] According to an embodiment, at operation 920, the electronic device 101 may transmit a data packet including one of the plurality of frames within a specified time interval. For example, the electronic device 101 may transmit the data packet to the external electronic device 202 within a specified time interval (eg, a connection interval). Figure 6 As described above, the electronic device 101 may transmit a data packet including one frame to the external electronic device 202 in a designated time interval.

[0121] According to an embodiment, the electronic device 101 may generate a data packet using a data packet format according to a communication specification (e.g., Bluetooth) for communicating with the external electronic device 202. For example, the electronic device 101 may generate an EV3 type data packet including one frame. The type of the data packet may be indicated by a field in the header of the packet (e.g., Figure 5 The electronic device 101 may use the communication circuit to send the data packets to the external electronic device 202. The electronic device 101 may sequentially send the data packets to the external electronic device 202 in a specified time interval.

[0122] According to an embodiment, the size of the data packet may be such that the size of the traffic margin is at least about 50% or more of the specified time interval. For example, the electronic device 101 may select an audio codec having such a compression rate: the compression rate makes the generated data packet have at least about 50% or more of the traffic margin relative to the specified time interval.

[0123] According to an embodiment, when the electronic device 101 fails to send a data packet to the external electronic device 202, the electronic device 101 may resend the data packet. For example, the electronic device 101 may resend the data packet when no confirmation is received from the external electronic device 202 or when a negative confirmation is received from the external electronic device 202. According to an embodiment, the electronic device 101 may resend the data packet within the same time interval as the time interval for sending the data packet (i.e., within the communication capacity margin).

[0124] Fig.10 is a flow chart 1000 of a method of transmitting a data packet including a plurality of frames according to an embodiment.

[0125] According to an embodiment, the electronic device 101 may be connected to an external electronic device (eg, Figure 2 For example, the electronic device 101 may be an electronic device configured to communicate with the external electronic device 202 in a specified time interval (e.g., a connection interval). According to an embodiment, the electronic device 101 may be configured to send a data packet including audio data to the external electronic device 202 in the specified time interval.

[0126] According to an embodiment, in operation 1005, the electronic device 101 may obtain audio data. Operation 1005 may be similar to Fig. 9 Operation 905.

[0127] According to an embodiment, in operation 1010, the electronic device 101 may generate a bit stream by encoding the audio data using a specified codec. Operation 1010 may be similar to Fig. 9 Operation 910.

[0128] According to an embodiment, in operation 1015, the electronic device 101 may generate a plurality of frames having a size corresponding to a specified time interval (eg, a connection interval) from a bit stream. Operation 1015 may be similar to Fig. 9 Operation 915.

[0129] According to an embodiment, in operation 1020, the electronic device 101 may send a data packet including a first frame and a second frame of the plurality of frames within a specified time interval. For example, the electronic device 101 may send the data packet to the external electronic device 202 at the beginning or end of a specified time interval (e.g., a connection interval).

[0130] According to an embodiment, the electronic device 101 may generate a data packet using a data packet format according to a communication specification (e.g., Bluetooth) for communicating with the external electronic device 202. For example, the electronic device 101 may generate a 2-EV3 type data packet including a plurality of frames. The type of the data packet may be indicated by a field of a header of the packet (e.g., Figure 5 For example, a plurality of frames may correspond to a plurality of continuous audio data. The electronic device 101 may transmit the data packet generated using the communication circuit to the external electronic device 202.

[0131] According to an embodiment, in the next designated time interval, the electronic device 101 may send a data packet including the second frame and the third frame after the second frame to the external electronic device 202. For example, the electronic device 101 may send a data packet including at least one frame among the plurality of frames included in the previous data packet in the next designated time interval. For example, the plurality of frames included in the data packet may correspond to a plurality of continuous segments of voice data in sequence. For example, as described above with reference to Figure 7 As described above, the electronic device 101 may send a data packet including a plurality of frames in each connection interval.

[0132] According to an embodiment, the electronic device 101 may transmit a data packet including a plurality of frames to the external electronic device 202 in every even or odd time interval. Figure 8As described, the electronic device 101 may send a data packet including a plurality of frames in each odd connection interval. The data packet may include a plurality of frames after the plurality of frames of the data packet sent in the previous time interval. For example, when the electronic device 101 sends a data packet including a first frame and a second frame in the previous even time interval, the electronic device 101 may send a data packet including a third frame and a fourth frame after the second frame in the next even time interval. When the electronic device 101 is configured to send a data packet in each even time interval, the state of the electronic device 101 may be converted from a second state (e.g., an idle state or an inactive state) to a first state (e.g., a wake-up state or an active state) in the even time interval, and then the electronic device 101 may send a data packet; next, the state of the electronic device 101 may be converted to the second state until the next even time interval after sending the data packet. In another example, when the electronic device 101 is configured to send a data packet for each odd-numbered time interval, the state of the electronic device 101 may be converted from a second state (e.g., an idle state or an inactive state) to a first state (e.g., a wake-up state or an active state) in the odd-numbered time interval, and then the electronic device 101 may send the data packet; next, the state of the electronic device 101 may be converted to the second state until the next odd-numbered time interval after the data packet is sent.

[0133] According to an embodiment, Figure 8 As shown, in the case where the electronic device 101 sends a data packet, when the electronic device 101 fails to send the data packet to the external electronic device 202, the electronic device 101 may resend the data packet. For example, when no confirmation is received from the external electronic device 202 or when a negative confirmation is received from the external electronic device 202, the electronic device 101 may resend the data packet. According to an embodiment, the electronic device 101 may perform retransmission of the data packet within a time interval after the time interval in which the previous data packet was sent. For example, in the case where the electronic device 101 is configured to send a data packet for each even time interval, when the data packet sent in the even time interval is lost, the electronic device 101 may perform retransmission of the data in a subsequent odd time interval. In another example, in the case where the electronic device 101 is configured to send a data packet for each odd time interval, when the data packet sent in the odd time interval is lost, the electronic device 101 may perform retransmission of the data in a subsequent even time interval.

[0134] Fig.11 is a flowchart 1100 of a method of outputting audio data according to an embodiment.

[0135] According to an embodiment, the electronic device 101 may be connected to an external electronic device (eg, Figure 2For example, the electronic device 101 may be an electronic device configured to communicate with the external electronic device 202 in a specified time interval (e.g., a connection interval). According to an embodiment, the electronic device 101 may be configured to receive a data packet including audio data from the external electronic device 202 in the specified time interval.

[0136] According to an embodiment, in operation 1105, the electronic device 101 may receive a first data packet including a first frame and a second frame from the external electronic device 202 in a first connection interval. For example, one frame may include audio data of a length corresponding to a single connection interval. The second frame may include audio data after the first frame in time. Each frame may include encoded audio data.

[0137] According to an embodiment, in operation 1110, the electronic device 101 may output an audio signal corresponding to the first frame using the first frame in a time interval corresponding to the first connection interval. For example, the electronic device 101 may obtain the audio signal by decoding the first frame. According to an embodiment, in operation 1110, the electronic device 101 may buffer the second frame received in the first connection interval.

[0138] According to an embodiment, in operation 1115, the electronic device 101 may determine whether the second data packet is received in the second connection interval. For example, the electronic device 101 may determine whether the second data packet including the second frame and the third frame after the second frame is received in the second connection interval after the first connection interval. According to an embodiment, the electronic device 101 may use a cyclic redundancy check (CRC) for the second data packet to determine whether the second data packet is successfully received. For example, when the CRC of the electronic device 101 for the second data packet fails, the electronic device 101 may determine that the second data packet is not received.

[0139] According to an embodiment, in operation 1120, when the second data packet is received, the electronic device 101 may use the second frame included in the second data packet to output an audio signal corresponding to the second frame in a time interval corresponding to the second connection interval. According to an embodiment, in operation 1120, the electronic device 101 may buffer the third frame included in the second data packet. For example, the electronic device 101 may flush the previously buffered second frame from the buffer.

[0140] According to an embodiment, in operation 1125, when the second data packet is not received, the electronic device 101 may output an audio signal corresponding to the second frame using the second frame of the first data packet in a time interval corresponding to the second connection interval. For example, the electronic device 101 may output an audio signal using the second frame buffered in operation 1110.

[0141] exist Fig.11 In the embodiment of FIG. 1 , it may be assumed that the external electronic device 202 is configured to send a data packet including a plurality of frames in each connection interval.

[0142] For example, the electronic device 101 may receive a data packet generated using a data packet format according to a communication specification (e.g., Bluetooth), wherein the communication specification is used to communicate with the external electronic device 202. For example, the electronic device 101 may receive a 2-EV3 type data packet. The type of data packet may be indicated by a field in the header of the packet (e.g., Figure 5 TYPE512).

[0143] Fig.12 is a flow chart 1200 of a method of transmitting audio data according to an embodiment.

[0144] According to an embodiment, the electronic device 101 may be connected to an external electronic device (eg, Figure 2 For example, the electronic device 101 may be an electronic device configured to communicate with the external electronic device 202 in a specified time interval (e.g., a connection interval). According to an embodiment, the electronic device 101 may be configured to send a data packet including audio data to the external electronic device 202 in the specified time interval.

[0145] According to an embodiment, in operation 1205, the electronic device 101 may obtain audio data. Operation 1205 may be similar to Fig. 9 Operation 905.

[0146] According to an embodiment, in operation 1210, the electronic device 101 may generate a bit stream by encoding the audio data using a specified codec. Operation 1210 may be similar to Fig. 9 Operation 910.

[0147] According to an embodiment, in operation 1215, the electronic device 101 may generate a plurality of frames having a size corresponding to a specified time interval (eg, a connection interval) from a bit stream. Operation 1215 may be similar to Fig. 9 Operation 915.

[0148] According to an embodiment, at operation 1220, the state of the electronic device 101 may be converted to the first state, and then the electronic device 101 may send a first data packet including a first frame and a second frame of a plurality of frames within a first connection interval. For example, the electronic device 101 may send the first data packet in a first state (e.g., an active state or a wake-up state). In another example, at operation 1220, when the electronic device 101 is already operating in the first state, the electronic device 101 may send the first data packet while remaining in the first state.

[0149] According to an embodiment, in operation 1225, the electronic device 101 may determine whether an acknowledgment ACK for the first data packet is received. For example, when "ACK" is not received from the external electronic device 202 within a specified time after the first data packet is sent, the electronic device 101 may determine that "ACK" for the first data packet is not received. In another example, when "NACK" for the first data packet is received from the external electronic device 202, the electronic device 101 may determine that "ACK" is not received.

[0150] According to an embodiment, at operation 1230, when an "ACK" for the first data packet is received, the state of the electronic device 101 may be converted from a first state (e.g., an active state or a wake-up state) to a second state (e.g., an inactive state or an idle state) in a second connection interval after the first connection interval. For example, the electronic device 101 may control a communication circuit (e.g., Figure 1 At least part of the communication module 190) is in the second state.

[0151] According to an embodiment, when "ACK" for the first data packet is not received, the electronic device 101 may resend the first data packet in a second connection interval after the first connection interval at operation 1235. In doing so, the electronic device 101 may operate in the first state in the second connection interval.

[0152] According to an embodiment, in operation 1240, the state of the electronic device 101 may be converted to the first state, and then, the electronic device 101 may send a second data packet including a third frame and a fourth frame in a third connection interval after the second connection interval. For example, when ACK is received, the state of the electronic device 101 may be converted to the second state; then, when a specified time interval (i.e., the period of the second connection interval) passes, the state of the electronic device 101 may be converted from the second state to the first state to send the second data packet, and then the electronic device 101 may send the second data packet. In another example, when "ACK" is not received, the electronic device 101 may send the second data packet while maintaining the first state. In this case, in operation 1240, the conversion to the first state may be omitted.

[0153] According to an embodiment, the electronic device 101 may generate a data packet using a data packet format according to a communication specification (e.g., Bluetooth) for communicating with the external electronic device 202. For example, the electronic device 101 may generate a 2-EV3 type data packet including a plurality of frames. The data packet may be generated by a field of a header of the packet (e.g., Figure 5TYPE 512 of the electronic device 101 may indicate the type of the data packet. For example, a plurality of frames may correspond to a plurality of segments of continuous audio data. The electronic device 101 may transmit the data packet generated using the communication circuit to the external electronic device 202.

[0154] According to an embodiment, the electronic device 101 may transmit a data packet including a plurality of frames to the external electronic device 202 in every even or odd time interval. Figure 8 As described, the electronic device 101 may send a data packet including a plurality of frames in each odd connection interval. For example, the data packet may include a plurality of frames after a plurality of frames of the data packet sent in the previous time interval. When the electronic device 101 sends a data packet including a first frame and a second frame in the previous even time interval, the electronic device 101 may send a data packet including a third frame and a fourth frame after the second frame in the next even time interval. When the electronic device 101 is configured to send a data packet in each even time interval, the state of the electronic device 101 may be converted from a second state (e.g., an idle state or an inactive state) to a first state (e.g., a wake-up state or an active state) in the even time interval, and then the electronic device 101 may send a data packet; next, the state of the electronic device 101 may be converted to the second state until the next even time interval after sending the data packet. In another example, when the electronic device 101 is configured to send a data packet for each odd time interval, the state of the electronic device 101 may be converted from a second state (e.g., an idle state or an inactive state) to a first state (e.g., a wake-up state or an active state) in the odd time interval, and then the electronic device 101 may send the data packet; next, the state of the electronic device 101 may be converted to the second state until the next odd time interval after the data packet is sent.

[0155] According to an embodiment, the electronic device 101 may include a communication circuit (eg, Figure 1 A communication module 190 operatively connected to the communication circuit (eg, Figure 1 120), and a memory operably connected to the processor (e.g., Figure 1Memory 130). According to an embodiment, the memory may store instructions, wherein the instructions, when executed, cause the processor to perform the actions of the electronic device 101 to be described. The processor may include a microprocessor or any suitable type of processing circuit, such as one or more general-purpose processors (e.g., ARM-based processors), digital signal processors (DSPs), programmable logic devices (PLDs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), graphics processing units (GPUs), video card controllers, etc. In addition, it can be recognized that when a general-purpose computer accesses the code for implementing the processing shown in the text, the execution of the code converts the general-purpose computer into a special-purpose computer for performing the processing shown in the text. Certain functions and steps provided in the accompanying drawings may be implemented in hardware, software, or a combination of hardware and software, and may be executed in whole or in part within the programming instructions of the computer. In addition, the technician understands and recognizes that a "processor" or "microprocessor" may be hardware in the disclosure claimed for protection.

[0156] According to an embodiment, the electronic device 101 may obtain audio data, may encode the audio data using a specified codec to generate multiple frames, wherein each frame has a size corresponding to a single connection interval, and may send a first data packet including a first frame of the multiple frames and a second frame subsequent to the first frame to the external electronic device 202 in a first connection interval.

[0157] According to an embodiment, the electronic device 101 may be configured to communicate with the external electronic device 202 according to the Bluetooth communication specification using a communication circuit. For example, the designated codec may be a codec having a compression rate of 32 kilobits per second (kbps).

[0158] According to an embodiment, the instructions, when executed, may cause the processor to use the communication circuit to send a data packet to the external electronic device 202 during a period corresponding to the connection interval. For example, the data packet may be a 2-Extended Voice 3 (2-EV3) type packet.

[0159] According to an embodiment, when executed, the instructions may cause the processor to send a second data packet including a second frame of the plurality of frames and a third frame after the second frame to the external device in a second connection interval after the first connection interval.

[0160] According to an embodiment, the instructions, when executed, may cause the processor to use the communication circuit to send data packets to the external electronic device 202 in a period twice the connection interval. According to an embodiment, the instructions, when executed, may cause the processor to control the communication circuit to be in a first state during the connection interval in which the data packet is sent, and to be in a second state during the connection interval in which the data packet is not sent. For example, the power consumption of the first state (e.g., active or awake state) may be higher than the power consumption of the second state (e.g., inactive or idle state).

[0161] According to an embodiment, when the instruction is executed, it may cause the processor of the electronic device 101 to perform the following operations: obtain audio data, encode the audio data using a specified codec to generate a plurality of frames, wherein each frame has a size corresponding to a single connection interval, and send a first data packet including two or more frames of the plurality of frames to an external electronic device in a first specified time interval using a communication circuit. For example, the second data packet sent in the second specified time interval includes at least one frame, wherein the at least one frame is the same as one of the two or more frames included in the first data packet sent in the first specified time interval before the second specified time interval.

[0162] According to an embodiment, the electronic device 101 may be configured to use a communication circuit (eg, Figure 1 The communication module 190 of the present invention communicates with the external electronic device 202 according to the Bluetooth communication specification. For example, the specified codec can be a codec with a compression rate of 32 kilobits per second (kbps). For example, the data packet can be a 2-Extended Voice 3 (2-EV3) type packet. For example, the length of the connection interval can be 7.5 ms. For example, the second data packet can include a first frame and a second frame after the first frame.

[0163] According to an embodiment, the instructions, when executed, may cause the processor to obtain the audio data by receiving a wireless signal including the audio data using the communication circuit.

[0164] According to an embodiment, the data sending method of the electronic device 101 may include: obtaining audio data, encoding the audio data using a specified codec to generate multiple frames, wherein each frame has a size corresponding to a single connection interval, sending a first data packet including a first frame of the multiple frames and a second frame after the first frame to an external electronic device in a first connection interval, and sending a second data packet including the second frame and a third frame after the second frame to the external electronic device in a second connection interval after the first connection interval.

[0165] According to an embodiment, an electronic device (e.g., Figure 2 The external electronic device 202 may include a speaker (eg, Figure 1 sound output device 155), a communication circuit (e.g., Figure 1 A communication module 190 operatively connected to the communication circuit (eg, Figure 1 processor 120), and / or a memory operably connected to the communication circuit and the processor (e.g., Figure 1 For example, the memory may store one or more instructions that, when executed, cause the processor to perform the operations to be described.

[0166] According to an embodiment, the processor may use the communication circuit to receive a signal including a signal related to the first interval (eg, Figure 7 The first audio frame corresponding to T1) and the second interval after the first interval (for example, Figure 7 T2) corresponding to the first data of the second audio frame (for example, Figure 7 710) (e.g., Fig.11 The processor may store the second audio frame in the memory in response to receiving the first data. The processor may output the first audio signal (e.g., Fig.11 When the communication circuit receives second data including the second audio frame and the third audio frame corresponding to the third interval after the second interval (for example, Figure 7 720) (e.g., Fig.11 The processor may store the third audio frame in the memory and output the second audio signal (eg, Fig.11 When at least part of the second data is not received using the communication circuit (e.g., Fig.11 The processor may output, through a speaker, a second audio signal (eg, Fig.11 Operation 1125).

[0167] According to an embodiment, after not receiving at least a portion of the second data, the processor may use the communication circuit to receive third data including a third audio frame and a fourth audio frame corresponding to a fourth interval after the third interval. For example, when not receiving at least a portion of the second data, the processor may receive the third data without requesting retransmission of the second data or without receiving the second data.

[0168] For example, the length of the first audio signal may correspond to the length of the first interval, and the length of the second audio signal may correspond to the length of the second interval.

[0169] For example, each of the first data and the second data may correspond to a single data packet according to the Bluetooth communication specification. For example, the type of the data packet may be 2-Extended Voice 3 (2-EV3).

[0170] According to an embodiment, the processor may receive the data packet in a period corresponding to the first interval using the communication circuit.

[0171] The electronic device according to various embodiments may be one of various types of electronic devices. The electronic device may include, for example, a portable communication device (e.g., a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a household appliance. According to the disclosed embodiments, the electronic device is not limited to those devices described above.

[0172] It should be understood that the various embodiments of the present disclosure and the terms used therein are not intended to limit the technical features set forth herein to specific embodiments, but include various changes, equivalents or replacements of the corresponding embodiments. Regarding the description of the accompanying drawings, similar reference numerals may be used to refer to similar or related elements. It should be understood that, unless the relevant context clearly indicates otherwise, the singular form of the noun corresponding to the item may include one or more things. As used herein, each of the phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C" and "at least one of A, B or C" may include any one or all possible combinations of the items listed together in a corresponding phrase in the phrase. As used herein, terms such as "1st" and "2nd" or "first" and "second" may be used to simply distinguish the corresponding component from another component, and do not limit the component in other aspects (e.g., importance or order). It should be understood that if an element (e.g., a first element) is referred to as being "coupled with" another element (e.g., a second element), "coupled to" another element (e.g., the second element), "connected with" another element (e.g., the second element), or "connected to" another element (e.g., the second element), with or without the term "operably" or "communicatively", it means that the element can be coupled to the other element directly (e.g., wired), wirelessly, or via a third element.

[0173] As used herein, the term "module" may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with other terms, such as "logic," "logic block," "portion," or "circuit." A module may be a single integrated component or its smallest unit or portion adapted to perform one or more functions. For example, according to an embodiment, a module may be implemented in the form of an application specific integrated circuit (ASIC).

[0174] The various embodiments described herein may be implemented as software (e.g., program 140) including one or more instructions stored in a storage medium (e.g., internal memory 136 or external memory 138) that can be read by a machine (e.g., electronic device 101). For example, a processor (e.g., processor 120) of a machine (e.g., electronic device 101) may call at least one of the one or more instructions stored in the storage medium and execute it with or without one or more other components under the control of the processor. This allows the operating machine to perform at least one function according to the at least one instruction called. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Among them, the term "non-transitory storage medium" means a tangible device and does not include signals (e.g., electromagnetic waves), but the term does not distinguish between data being semi-permanently stored in a storage medium and data being temporarily stored in a storage medium. For example, a "non-transitory storage medium" may include a buffer that temporarily stores data.

[0175] According to an embodiment, the method according to various disclosed embodiments may be included and provided in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product (e.g., a downloadable application) may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read-only memory (CD-ROM)) or via an application store (e.g., PlayStore). TM ) online distribution (e.g., downloading or uploading), or directly between two user devices (e.g., smartphones). If distributed online, at least part of the computer program product may be temporarily generated or at least temporarily stored in a machine-readable storage medium (e.g., a memory of a manufacturer's server, a server of an application store, or a relay server).

[0176] According to various embodiments, each of the above-mentioned components (e.g., a module or a program) may include a single entity or multiple entities. According to various embodiments, one or more of the above-mentioned components may be omitted, or one or more other components may be added. Alternatively or additionally, multiple components (e.g., modules or programs) may be integrated into a single component. In this case, according to various embodiments, the integrated component may still perform one or more functions of each of the multiple components in the same or similar manner as the manner in which one or more functions were performed by a corresponding one of the multiple components before integration. According to various embodiments, the operations performed by a module, a program or another component may be performed sequentially, in parallel, repeatedly or heuristically, or one or more operations may be performed in a different order, or one or more operations may be omitted, or one or more other operations may be added.

[0177] According to certain embodiments disclosed in the specification, an electronic device may increase a signal-to-noise ratio (SNR) at a receiver by increasing a traffic margin.

[0178] In some embodiments of the present specification, a method for sending and receiving audio data with a stronger anti-interference capability may be provided.

[0179] According to certain embodiments disclosed in the specification, even if some packets are lost within a connection interval, the electronic device can prevent unwanted muting of an audio signal by performing retransmission within the same connection interval using a traffic margin.

[0180] According to certain embodiments disclosed in the specification, the electronic device may buffer audio data using at least a portion of a plurality of bitstream frames in a received data packet.

[0181] In addition, various features and advantages understood directly or indirectly through the disclosure may be provided.

[0182] Some of the above-described embodiments of the present disclosure may be implemented in hardware, firmware, or by executing software or computer code that may be stored in a recording medium (such as a CD ROM, a digital versatile disk (DVD), a tape, a RAM, a floppy disk, a hard disk, or a magneto-optical disk), or by executing computer code that was originally stored on a remote recording medium or a non-transitory machine-readable medium downloaded via a network and will be stored on a local recording medium, so that the methods described herein may be presented via such software stored on a recording medium or stored in programmable or dedicated hardware (such as an ASIC or FPGA) using a general-purpose computer or a dedicated processor. As will be understood in the art, a computer, processor, microprocessor controller, or programmable hardware includes a memory component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, wherein the software or computer code, when accessed and executed by the computer, processor, or hardware, implements the processing methods described herein.

[0183] While the present disclosure has been shown and described with reference to various disclosed embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents.

Claims

1. An electronic device, comprising: speaker; Communication circuits; a processor operably connected to the speaker and the communication circuit; as well as A memory operatively connected to the processor, wherein the memory stores one or more instructions, wherein the one or more instructions, when executed, cause the processor to perform the following operations: receiving, using the communication circuit, a first data packet including a first audio frame and a second audio frame from an external electronic device at a first connection interval, wherein the first audio frame includes first audio data having a length corresponding to the first connection interval, and the second audio frame includes second audio data having a length corresponding to a second connection interval after the first connection interval; storing a second audio frame in the memory in response to receiving the first data packet; outputting, through the speaker, a first audio signal generated based on the first audio frame; if a second data packet including a second audio frame and a third audio frame corresponding to a third connection interval after the second connection interval is received using the communication circuit in a second connection interval, the third audio frame is stored in the memory and a second audio signal generated based on the second audio frame of the second data packet is output through the speaker, and the second audio frame of the first data packet is removed from the memory; and outputting, through the speaker, a second audio signal generated based on a second audio frame of the first data packet stored in the memory if at least a portion of the second data packet is not received in the second connection interval using the communication circuit, Wherein, the electronic device is configured to communicate with the external electronic device according to a connection interval according to a Bluetooth communication protocol.

2. The electronic device according to claim 1, wherein: The one or more instructions, when executed, further cause the processor to: If the at least a portion of the second data packet is not received, a third data packet is received using the communication circuit, wherein the third data packet includes a third audio frame and a fourth audio frame corresponding to a fourth connection interval after the third connection interval.

3. The electronic device as claimed in claim 2, wherein: The one or more instructions, when executed, further cause the processor to: If the at least part of the second data packet is not received, the third data packet is received without requesting to resend the second data packet or without receiving the second data packet.

4. The electronic device according to claim 1, wherein: The length of the first audio signal corresponds to the length of the first connection interval, and The length of the second audio signal corresponds to the length of the second connection interval.

5. The electronic device as claimed in claim 1, wherein: Each of the first data packet and the second data packet corresponds to a single data packet of the Bluetooth communication specification.

6. The electronic device as claimed in claim 5, wherein: Each of the first data packet and the second data packet is of type 2-Extended Voice 3 (2-EV3).

7. The electronic device as claimed in claim 5, wherein: The one or more instructions, when executed, further cause the processor to perform the following operations: The single data packet is received using the communication circuit during a period corresponding to a first connection interval.

8. An electronic device comprising: Communication circuits; a processor operably connected to the communication circuit; as well as A memory operatively connected to the processor, wherein the memory stores one or more instructions, wherein the one or more instructions, when executed, cause the processor to perform the following operations: Get audio data; encoding the audio data using a specified codec to generate a plurality of frames, wherein each frame has a size corresponding to a single connection interval; transmitting a first data packet including two or more frames of the plurality of frames to an external electronic device at a first connection interval using the communication circuit; and transmitting a second data packet including two or more frames of the plurality of frames to the external electronic device in a second connection interval following the first connection interval, The second data packet to be transmitted includes at least one frame, wherein the at least one frame is the same as one of the two or more frames included in the first data packet, Wherein, the electronic device is configured to communicate with the external electronic device according to a connection interval according to a Bluetooth communication protocol.

9. The electronic device as claimed in claim 8, wherein: The compression rate of the specified codec is 32 kilobits per second (kbps).

10. The electronic device according to claim 8, wherein: Each of the first data packet and the second data packet is of type 2-Extended Voice 3 (2-EV3).

11. The electronic device according to claim 8, wherein: The length of the single connection interval is 7.5 milliseconds (ms).

12. The electronic device according to claim 8, wherein: The second data packet includes a first frame and a second frame following the first frame, and The first frame is included in the first data packet.

13. The electronic device according to claim 8, wherein: The one or more instructions, when executed, further cause the processor to: The audio data is obtained by receiving a wireless signal including the audio data using the communication circuit.

14. The electronic device as claimed in claim 8, wherein: The length of each of the first connection interval and the second connection interval corresponds to the length of the single connection interval.

Citation Information

Patent Citations

  • System and method of jitter buffer management

    US20170187635A1