Loudspeaker signal processing method and loudspeaker circuit
By designing signal processing methods and circuits in the speaker, the connected data packets are sorted, the data packet sequence error issues sent by the TV are solved, and high -quality sound playback of the speaker is achieved.
Patent Information
- Application Number
- CN202111489399.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-11-30
- Filing Date
- 2021-12-08
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-12-08
AI Technical Summary
Because the packets sent by the TV may be incorrectly ordered, the speakers cannot form audio frames correctly, affecting the playback of high-quality sounds.
Design signal processing methods and circuits in the speaker, receive multiple data packets from TV, and sort the data packet by processing the circuit to generate a re -sorted data packet to re -generate the correct audio frame.
By sorting the receiving data packets, you can not discard many packets with discontinuous serial numbers to ensure that the speaker can play high -quality sounds without intermittently.
Smart Images

Figure CN114630066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a speaker, and more particularly, to a speaker-related technology capable of providing high-quality sound signals. Background Art
[0002] Recently, televisions (TVs) can wirelessly transmit high-quality audio signals to speakers to play high-quality music. In order to provide high-quality audio signals, the audio signals may not be compressed, so each audio frame may need to be divided into multiple packets for wireless transmission. For example, an audio frame corresponding to a pulse-code modulation (PCM) mode may be divided into two packets, and an audio frame corresponding to a Dolby mode may be divided into three packets. Regarding the transmission of audio frames, the packets must be transmitted in sequence, that is, if the audio frame is divided into three packets with sequence numbers '1' to '3', the TV first sends a packet with sequence number '1', then sends a packet with sequence number '2', and finally sends a packet with sequence number '3'. Then, the speaker receives the packets with sequence numbers '1' to '3' in sequence to reassemble the audio frame for playback.
[0003] However, for some reason, the packets sent by the TV may be in the wrong order, causing the speakers to not compose the audio frames correctly. Summary of the invention
[0004] In view of this, one of the objectives of the present invention is to provide a signal processing method for a speaker and a speaker circuit to reorder data packets received from a television to solve the above-mentioned problem.
[0005] According to one embodiment of the present invention, a signal processing method for a speaker is provided, comprising the following steps: receiving a plurality of data packets, wherein the plurality of data packets correspond to at least two audio frames, each audio frame has at least two data packets, and each data packet has a sequence number indicating the order of the data packet in the plurality of data packets; sorting the plurality of data packets to generate reordered data packets; and outputting the reordered data packets to regenerate the at least two audio frames.
[0006] According to another embodiment of the present invention, a speaker circuit is provided, comprising a wireless communication interface and a processing circuit. The wireless communication interface is used to receive a plurality of data packets, wherein the plurality of data packets correspond to at least two audio frames, each audio frame has at least two data packets, and each data packet has a sequence number indicating the order of the data packet in the plurality of data packets. The processing circuit is used to sort the plurality of data packets to generate a reordered data packet; and the processing circuit outputs the reordered data packet to regenerate the at least two audio frames.
[0007] By sequencing received data packets to generate resequenced data packets, the present invention does not need to discard many data packets with discontinuous sequence numbers, and can play high-quality sound without interruption.
[0008] These and other objects of the present invention will no doubt become apparent to those of ordinary skill in the art after reading the following detailed description of the preferred embodiments illustrated in the various drawings and figures. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a schematic diagram showing a TV and a speaker according to an embodiment of the present invention.
[0010] Figure 2 The abnormal, duplicate and normal situations of receiving data packets are shown.
[0011] Figure 3 An abnormal situation of receiving data packets is shown, where the data packets in consecutive audio frames are out of order.
[0012] Figure 4 A signal processing method according to an embodiment of the present invention.
[0013] Figure 5 It shows that the received data packets according to an embodiment of the present invention have repeated data packets.
[0014] Figure 6 It shows that received data packets are sorted according to one embodiment of the present invention.
[0015] Figure 7 A first sorting situation according to an embodiment of the present invention is shown.
[0016] Figure 8 A second sorting situation according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0017] Certain words are used in the specification and claims to refer to specific components. It should be understood by those skilled in the art that electronic equipment manufacturers may use different terms to refer to the same component. This specification and claims do not use differences in names as a way to distinguish components, but rather use differences in the functions of components as a basis for distinction. The term "including" mentioned throughout the specification and subsequent claims is an open-ended term and should be interpreted as "including but not limited to". In addition, the term "coupled" is used herein to include any direct and indirect electrical connection means. Therefore, if the text describes a first device as being electrically connected to a second device, it means that the first device can be directly connected to the second device, or indirectly connected to the second device through other devices or connection means.
[0018] Figure 1 1 is a schematic diagram showing a TV 110 and a speaker (in this embodiment, a sound bar 120 is used as a speaker) according to an embodiment of the present invention. Figure 1 As shown, TV 110 is configured to display an image and further send an audio frame to the sound bar 120 so that the sound bar 120 plays sound. In this embodiment, in order to provide a high-quality audio signal, the audio signal may not be compressed, so each audio frame may need to be divided into several data packets for wireless transmission. For example, an audio frame corresponding to the PCM mode may be divided into two data packets, and an audio frame corresponding to the Dolby mode may be divided into three data packets. After the sound bar 120 receives the data packet, the sound bar 120 regenerates the audio frame. In this embodiment, the wireless transmission between TV 110 and the sound bar 120 complies with the typical WIFI Speaker Connection (WSC) specification.
[0019] As described in the background art, ideally, data packets must be transmitted in sequence. However, due to some reasons, the data packets sent by the TV 110 may be in a wrong sequence. Figure 2 The abnormal, repeated, and normal conditions of receiving data packets are shown. Figure 2, assume that the TV 110 transmits three audio frames to the sound bar 120, wherein the first audio frame is divided into three packets having sequence numbers "1" to "3", respectively, the second audio frame is divided into three packets having sequence numbers (SN) "4" to "6", respectively, and the third audio frame is divided into three packets having sequence numbers "7" to "9", respectively. Ideally, the packets having sequence numbers "1"-"9" are sequentially transmitted to the sound bar 120. However, in an abnormal case, the packets received by the sound bar 120 may have sequence numbers "3", "1", and "2" in sequence. In addition, in the case of duplication, some packets may be repeatedly transmitted, for example, the sound bar 120 may receive five packets having sequence numbers "4", "5", "4", "6", "6" corresponding to the second audio frame. In addition, for the transmission of data packets, data packets corresponding to the same audio frame can be sent within 5 milliseconds (ms), and the transmission time of data packets corresponding to the same audio frame can be 32ms (that is, the time interval between two audio frames can be 32ms), and then the 5ms and 32ms are merely examples, and other transmission times and time intervals may also be possible.
[0020] Apart from Figure 2 Besides the anomaly shown, data packets may also be out of order in consecutive audio frames, ie, a data packet of one audio frame may be transmitted together with a data packet of another audio frame. Figure 3 shows an abnormal situation of receiving data packets, where the data packets in consecutive audio frames are out of order. Figure 3 , assuming that the TV 110 transmits three audio frames to the sound bar 120, wherein the first audio frame F1 is divided into three data packets (F1, P0) to (F1, P2) having sequence numbers "1" to "3", the second audio frame F2 is divided into three data packets (F2, P0) to (F2, P2) having sequence numbers "4" to "6", and the third audio frame F3 is divided into three data packets (F3, P0) to (F3, P2) having sequence numbers "7" to "9". Figure 3 In the abnormal case shown, the initial three data packets received by the sound bar 120 within 5ms are (F1, P0), (F1, P2) and (F2, P0), then the three data packets received by the sound bar 120 within 5ms are (F2, P1), (F2, P2) and (F1, P1), and the last three data packets received by the sound bar 120 within 5ms are (F3, P0), (F3, P1) and (F3, P2).
[0021] In order to solve the Figure 2 and Figure 3In the abnormal situation shown, the sound bar 120 is designed to filter and sort the received data packets so that the sound bar 120 can successfully regenerate the audio frame. Figure 1 As shown, the sound bar 120 includes a wireless communication interface 122, a processing circuit 124, and a memory 126 for storing program codes, wherein the processing circuit 124 may include one or more processors, and the memory 126 may include one or more types of memory devices. The processing circuit 124 may read the program code from the memory 126 and execute the program code to perform the following operations: Figure 4 The signal processing method shown in FIG. Figure 4 As shown, at step 400, the process starts, and the TV 110 establishes a link with the sound bar 120. At step 402, the processing circuit 124 receives a data packet from the TV 110 via the wireless communication interface 122. At step 404, the wireless communication interface 122 determines whether the current data packet is a duplicate data packet. If so, the process proceeds to step 406 to discard the current data packet; if not, the process proceeds to step 408.
[0022] Regarding the determination of duplicate data packets, the current data packet may be compared with the previous data packet to determine whether the current data packet is a duplicate data packet. Figure 5 FIG. 1 shows that the data packets received according to an embodiment of the present invention have repeated data packets. Figure 5 , if the processing circuit 124 has received data packets (F1, P0), (F1, P2) and (F1, P1) with sequence numbers '0x100', '0x102' and '0x101' respectively, and currently receives a data packet (F1, P1) with sequence number '0x101', the payload of the current data packet (F1, P1) can be compared with the payload of each of the received data packets (F1, P0), (F1, P2) and (F1, P1). In this embodiment, since the payload of the current data packet (F1, P1) is the same as the payload of the previously received data packet (F1, P1), the current data packet (F1, P1) can be determined as a duplicate data packet. Similarly, if data packets (F2, P0), (F2, P1) and (F2, P2) with sequence numbers '0x103', '0x104' and '0x105' have been received, respectively, and a data packet (F2, P1) with sequence number '0x104' is currently received, the payload of the current data packet (F2, P1) can be compared with the payload of each of the received data packets (F2, P0), (F2, P1) and (F2, P2). In this embodiment, since the payload of the current data packet (F2, P1) is the same as the payload of the previously received data packet (F2, P1), the current data packet (F2, P1) can be determined as a duplicate data packet.
[0023] In this embodiment, steps 404 and 406 may be performed by the firmware of the Wi-Fi chip (for example, by Figure 1 408 , the data packet is presented to a driver (Wi-Fi driver) executed by a central processing unit (CPU) of the processing circuit 124 .
[0024] In step 410, the processing circuit 124 stores the received data packets into a buffer to form a queue, wherein the queue depth is greater than three data packets. For example, the queue may be allowed to store five data packets.
[0025] In step 412 , the processing circuit 124 sorts the received data packets to generate re-ordered data packets. Figure 6 FIG. 1 shows how to sort received data packets according to an embodiment of the present invention. Figure 6 For example, assume that the TV 110 transmits three audio frames to the sound bar 120, wherein the first audio frame F1 is divided into three data packets (F1, P0) to (F1, P2) having sequence numbers '0x100'-'0x102', respectively, the second audio frame F2 is divided into three data packets (F2, P0) to (F2, P2) having sequence numbers '0x103'-'0x105', respectively, and the third audio frame F3 is divided into three data packets (F3, P0) to (F3, P2) having sequence numbers '0x106'-'0x108', respectively. Figure 6In the illustrated embodiment, data packets (F1, P0), (F1, P2), and (F1, P1) are sequentially stored in a queue, and the processing circuit 124 sorts the data packets (F1, P0), (F1, P2), and (F1, P1) by using any appropriate sorting algorithm (e.g., bubble sort) to obtain reordered data packets (F1, P0), (F1, P1), and (F1, P2). Then, for example, in step 414, the reordered data packets (F1, P0), (F1, P1), and (F1, P2) are output (e.g., presented to a middleware) to regenerate the first audio frame. Then, the data packets (F2, P0), (F2, P1) and (F2, P2) are sequentially stored in the queue, and since the received data packets are in the correct order, the reordered data packets are the same as the received data packets, and then the reordered data packets (F2, P0), (F2, P1) and (F2, P2) are presented to the middleware to regenerate the second audio frame. Finally, the data packets (F3, P2), (F3, P1) and (F3, P0) are sequentially stored in the queue, and the processing circuit 124 sorts the data packets (F3, P2), (F3, P1) and (F3, P0) to obtain the reordered data packets (F3, P0), (F3, P1) and (F3, P2), and then the reordered data packets (F3, P0), (F3, P1) and (F3, P2) are used to generate the third audio frame.
[0026] Figure 6 The embodiment shown is intended to solve Figure 2 The abnormal situation shown. Figure 3 For the abnormal situation shown, this embodiment provides two sorting situations. Figure 7 FIG. 2 shows a first sorting situation according to an embodiment of the present invention. Figure 7 As shown, assume that data packets (F1, P2), (F2, P0), (F2, P1), (F2, P2) and (F3, P0) are stored in the queue in sequence, and the queue does not contain all the data packets corresponding to the first audio frame (there is only one data packet (F1, P2) for the first audio frame in the queue). At this time, because the queue is full of data packets, the data packet (F1, P2) is directly presented to the middleware without waiting for the other data packets (F1, P0) and (F1, P1) of the first audio frame. After the data packet (F1, P2) is presented to the middleware, the data packets (F2, P0), (F2, P1) and (F2, P2) corresponding to the second audio frame can be immediately presented to the middleware, and the subsequent data packets are added to the queue in sequence. Figure 7 In the illustrated embodiment, if the earliest data packet in the queue has not formed a complete audio frame with other data packets when the queue is full, the earliest data packet in the queue will be directly output (eg, presented to the middleware).
[0027] Figure 8 FIG. 2 shows a second sorting situation according to an embodiment of the present invention. Figure 8 As shown, assuming that the packets in the queue have been sorted, the reordered packets are (F1, P0), (F1, P1), (F1, P2), (F2, P0), and (F2, P1). At this time, since the queue already contains all packets (F1, P0), (F1, P1), and (F1, P2) corresponding to the first audio frame, the packets (F1, P0), (F1, P1), and (F1, P2) are immediately output (for example, presented to the middleware) so that the next packet can be immediately added to the queue.
[0028] In summary, by sorting the received data packets using the above-mentioned sorting algorithm to generate re-sequenced data packets, there is no need to discard many data packets with discontinuous sequence numbers, and the sound bar 120 can play high-quality sound without interruption.
[0029] Those skilled in the art will readily recognize that various modifications and changes can be made to the apparatus and methods while retaining the teachings of the present invention. Therefore, the above disclosure should be interpreted as being limited only by the scope and metes and bounds of the appended claims.
Claims
1. A signal processing method for a loudspeaker, comprising: receiving a plurality of data packets, each data packet having a sequence number indicating an order of the data packet in the plurality of data packets; ordering the plurality of data packets to generate a reordered data packet; as well as Output the reordered data packet; The steps of sorting the plurality of data packets to generate reordered data packets and outputting the reordered data packets include: Using a buffer to sequentially store the plurality of data packets to form a queue, wherein the queue depth is greater than three data packets; sorting the plurality of data packets in the buffer; and If the earliest data packet among the reordered data packets in the buffer does not form a single audio frame with other data packets in the buffer, the earliest data packet in the buffer is directly output; wherein the single audio frame has at least two data packets.
2. The signal processing method according to claim 1, further comprising: Prior to the step of ordering the plurality of packets to generate reordered packets, determining whether the plurality of packets include duplicate packets; as well as If the plurality of data packets include duplicate data packets, the duplicate data packets are discarded from the plurality of data packets, and the step of sorting the plurality of data packets includes sorting the plurality of data packets after discarding the duplicate data packets.
3. The signal processing method as claimed in claim 1, wherein the step of sorting the plurality of data packets to generate a reordered data packet and outputting the reordered data packet further comprises: If the earliest data packet among the reordered data packets in the buffer does not form a single audio frame with other data packets in the buffer, and the data packets after the earliest data packet in the reordered data packets can form a single audio frame, the data packets of the single audio frame are output immediately. 4 . The signal processing method of claim 1 , wherein each audio frame has three packets and the queue depth is five packets.
5. The signal processing method as claimed in claim 1, wherein the step of sorting the plurality of data packets to generate a reordered data packet and outputting the reordered data packet further comprises: If the earliest data packet among the reordered data packets in the buffer and other data packets in the buffer can form a single audio frame, the data packets of the single audio frame are output immediately. 6 . The signal processing method of claim 5 , wherein each audio frame has three packets and the queue depth is five packets.
7. A speaker circuit, the speaker circuit comprising: a wireless communication interface for receiving a plurality of data packets, wherein each data packet has a sequence number indicating an order of the data packet in the plurality of data packets; processing circuitry to order the plurality of packets to generate a reordered packet; and The processing circuit outputs the reordered data packet; The process of the processing circuit sorting the multiple data packets to generate reordered data packets and outputting the reordered data packets includes: Using a buffer to sequentially store the plurality of data packets to form a queue, wherein the queue depth is greater than three data packets; sorting the plurality of data packets in the buffer; and If the earliest data packet among the reordered data packets in the buffer does not form a single audio frame with other data packets in the buffer, the earliest data packet in the buffer is directly output; wherein the single audio frame has at least two data packets.
8. The speaker circuit of claim 7, wherein Before the processing circuitry orders the plurality of data packets to generate a reordered data packet, the wireless communication interface determines whether the plurality of data packets include a duplicate data packet; and If the plurality of data packets include a duplicate data packet, the wireless communication interface discards the duplicate data packet from the plurality of data packets, and the processing circuit sorts the plurality of data packets after discarding the duplicate data packet.
9. The speaker circuit as claimed in claim 7, wherein the process of the processing circuit sorting the plurality of data packets to generate reordered data packets and outputting the reordered data packets further comprises: If the earliest data packet among the reordered data packets in the buffer does not form a single audio frame with other data packets in the buffer, and the data packets after the earliest data packet in the reordered data packets can form a single audio frame, the data packets of the single audio frame are output immediately.
10. The speaker circuit of claim 7, wherein each audio frame has three packets and the queue depth is five packets.
11. The speaker circuit as claimed in claim 7, wherein the process of the processing circuit sorting the plurality of data packets to generate re-ordered data packets and outputting the re-ordered data packets further comprises: If the earliest data packet among the reordered data packets in the buffer and other data packets in the buffer can form a single audio frame, the data packets of the single audio frame are output immediately.
12. The speaker circuit of claim 11, wherein each audio frame has three packets and the queue depth is five packets.
Citation Information
Patent Citations
Systems and methods of communicating redundant frame information
CN105594148A
Apparatus and method for de-jitter buffer delay adjustment
US20180295050A1