Audio synchronization processing circuit and method

By adjusting the frequency of the captured clock signal in the audio synchronization processing circuit, the audio quality problem caused by the out-of-synchronization of the host-side and device-side clocks is solved, and more stable audio data transmission is achieved.

CN113132044BActive Publication Date: 2024-09-10NUVOTON
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011562484.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-12-30
Filing Date
2020-12-25
Publication Date
2024-09-10
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

During the audio data transmission process, the clocks on the host side and the device side are not synchronized, resulting in poor audio quality and problems such as noise, audio data corruption, and playback pauses.

Method used

The processing module in the audio synchronization processing circuit receives the input request signal, starts counting according to the basic clock signal, and outputs the output request signal to stop counting, and determines whether the counting value reaches synchronization. If synchronization is not reached, the acquisition is adjusted according to the counting value. The frequency of the clock signal to synchronize the host-side and device-side clocks.

Benefits of technology

It effectively improves audio quality, reduces noise and playback pauses, and improves the continuity and immediacy of audio data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113132044B_ABST
    Figure CN113132044B_ABST
Patent Text Reader

Abstract

The present invention provides an audio synchronization processing circuit and method thereof, comprising: receiving an input request signal; starting counting according to a basic clock signal when the input request signal is received; outputting an output request signal according to a captured clock signal; stopping counting to obtain a count value when the output request signal is output; determining whether synchronization is achieved according to the count value; and adjusting the frequency of the captured clock signal according to the count value when it is determined that synchronization is not achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to audio synchronization technology, in particular to an audio synchronization processing circuit and method thereof which can achieve synchronization with a host end by adjusting a clock unit, thereby improving audio quality. Background Art

[0002] With the rapid growth of the 3C industry, the transmission interface used to transmit data between devices is also constantly evolving. Currently, the technology of Universal Serial Bus (USB) is the most mature and popular. Therefore, the USB has become one of the main transmission interfaces in recent years.

[0003] The Universal Serial Bus specification includes four types of transfer types: control transfer type, interrupt transfer type, bulk transfer type, and isochronous transfer type. For audio data that needs to be delivered in real time and continuously, the isochronous transfer type is usually used to transfer the audio data from the host to the device.

[0004] However, during the audio data transmission process, problems such as poor audio quality, such as noise, audio data corruption, and playback pauses, often occur due to the asynchrony between the host clock and the device clock. Summary of the invention

[0005] An embodiment of the present invention discloses an audio synchronization processing method. The audio synchronization processing method includes: receiving an input request signal; when the input request signal is received, starting counting according to a basic clock signal; outputting an output request signal according to a captured clock signal; when the output request signal is output, stopping counting to obtain a count value; judging whether synchronization is achieved according to the count value; and when it is judged that synchronization is not achieved, adjusting the frequency of the captured clock signal according to the count value.

[0006] One embodiment of the present invention discloses an audio synchronization processing circuit. The audio synchronization processing circuit includes a first transmission interface, a second transmission interface, and a processing module. The processing module is used to receive an input request signal via the first transmission interface, and start counting according to a basic clock signal when the input request signal is received. The processing module is further used to output an output request signal via the second transmission interface according to the captured clock signal, and stop counting when the output request signal is output to obtain a count value. In addition, the processing module is further used to determine whether synchronization is achieved based on the count value. When it is determined that synchronization is not achieved, the processing module adjusts the frequency of the captured clock signal based on the count value. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 FIG. 4 is a block diagram of a system using an audio synchronization processing circuit according to an embodiment of the present invention.

[0008] Figure 2 The figure is a flowchart of an audio synchronization processing method according to an embodiment of the present invention.

[0009] Figure 3 FIG. 4 is a waveform diagram of related signals of a counting unit according to an embodiment of the present invention.

[0010] Explanation of symbols:

[0011] 100 Audio synchronization processing circuit

[0012] 110 First transmission interface

[0013] 120 Second transmission interface

[0014] 130 Processing Module

[0015] 131 counting unit

[0016] 132 clock units

[0017] 133 Processing Units

[0018] 134 Control Unit

[0019] 140 Buffer memory

[0020] 200 Host

[0021] 300 Audio Codec Unit

[0022] 400 Audio Output Unit

[0023] A1 Adjustment signal

[0024] C1 count value

[0025] CK1 captures the clock signal

[0026] CK2 basic clock signal

[0027] D1 Input audio data

[0028] D2 buffers audio data

[0029] R1 Input request signal

[0030] R1' Input reply signal

[0031] R2 output request signal

[0032] R2' output reply signal

[0033] Steps S10 to S70 DETAILED DESCRIPTION

[0034] In order to make the above-mentioned objects, features and advantages of the embodiments of the present invention more obvious and understandable, a detailed description is given below with reference to the accompanying drawings.

[0035] It must be understood that the words "comprise", "include" and the like used in this specification are intended to indicate the existence of specific technical features, values, method steps, operation processing, elements and / or components, but do not exclude the addition of more technical features, values, method steps, operation processing, elements, components, or any combination of the above.

[0036] The terms "first", "second", etc. are used to modify components and are not used to indicate a priority order or a prior relationship between them. They are only used to distinguish components with the same name.

[0037] Figure 1 FIG. 1 is a block diagram of a system using an audio synchronization processing circuit according to an embodiment of the present invention. Figure 1 The audio synchronization processing circuit 100 is coupled between the host end 200 and the audio codec unit 300. In some embodiments, the audio synchronization processing circuit 100 can be connected to the host end 200 and the audio codec unit 300 through but not limited to a bus. In some embodiments, the bus can be, for example, but not limited to, an Advanced High performance Bus (AHB).

[0038] The host end 200 can sequentially send the input audio data D1 to the audio synchronization processing circuit 100 according to a sending frequency (for example, every fixed time of 1 millisecond, 125 microseconds, etc.), and the audio synchronization processing circuit 100 can sequentially output the buffered audio data D2 to the audio codec unit 300 according to the frequency of the captured clock signal CK1, so that the audio codec unit 300 can perform specific processing and then further play the corresponding audio through the subsequent audio output unit 400.

[0039] In some embodiments, the specific processing of the audio codec unit 300 may include converting the buffered audio data D2 from a digital electronic signal to an analog electronic signal, but the invention is not limited thereto. In some embodiments, the audio output unit 400 may be, but is not limited to, a speaker.

[0040] The audio synchronization processing circuit 100 may include at least two transmission interfaces (hereinafter referred to as the first transmission interface 110 and the second transmission interface 120, respectively) and a processing module 130. The processing module 130 is coupled to the first transmission interface 110 and the second transmission interface 120. In addition, the processing module 130 may adjust the frequency of the captured clock signal CK1 according to the audio synchronization processing method of any embodiment of the present invention, so that the output frequency of the audio synchronization processing circuit 100 (i.e., the frequency of the captured clock signal CK1) can be synchronized with the sending frequency of the host end 200, thereby improving the quality problems of the audio caused by asynchronization, such as reducing the occurrence of noise, damage, playback pauses, etc.

[0041] It is worth noting that, in order to clearly illustrate the present invention, Figure 1 It is a simplified block diagram, which only shows the components related to the present invention. Those skilled in the art should understand that the system may also include other components to provide specific functions.

[0042] Figure 2 FIG. 1 is a flow chart of an audio synchronization processing method according to an embodiment of the present invention. Figure 1 and Figure 2 In one embodiment of the audio synchronization processing method, the processing module 130 of the audio synchronization processing circuit 100 may receive the input request signal R1 transmitted by the host end 200 according to its transmission frequency via the first transmission interface 110 (step S10). When the input request signal R1 is received, the processing module 130 may start counting according to the basic clock signal CK2 (step S20). Next, the processing module 130 may output the output request signal R2 via the second transmission interface 120 according to the captured clock signal CK1 (step S30), and when the output request signal R2 is output, the processing module 130 may stop counting to obtain the count value C1 between the input request signal R1 and the output request signal R2 (step S40). Afterwards, the processing module 130 may determine whether the transmission frequency of the host end 200 is synchronized with the frequency of the captured clock signal CK1 based on the obtained count value C1 (step S50).

[0043] When the processing module 130 determines that synchronization is achieved in step S50, the processing module 130 may not adjust the frequency of the captured clock signal CK1 (step S60). In addition, after step S60, the processing module 130 may return to step S10 to restart the audio synchronization process.

[0044] When the processing module 130 determines that synchronization is not achieved in step S50, the processing module 130 can adjust the frequency of the captured clock signal CK1 according to the count value C1 (step S70). In addition, after step S70, the processing module 130 can return to step S10 to repeatedly execute the audio synchronization processing method so that the frequency of the captured clock signal CK1 can gradually become synchronized with the sending frequency of the host end 200, thereby improving the audio quality problem.

[0045] In some embodiments, Figure 1 As shown, the processing module 130 may include a counting unit 131, a clock unit 132, a processing unit 133, and a control unit 134. The counting unit 131 is coupled to the processing unit 133, the processing unit 133 is coupled to the clock unit 132, and the control unit 134 is coupled to the counting unit 131, the clock unit 132, the first transmission interface 110, and the second transmission interface 120.

[0046] The counting unit 131 is controlled by the control unit 134 . Here, the counting unit 131 may start counting according to the basic clock signal CK2 under the control of the control unit 134 , and may stop counting under the control of the control unit 134 to obtain and output the counting value C1 to the processing unit 133 .

[0047] The clock unit 132 is used to generate the captured clock signal CK1 and can be controlled by the processing unit 133 . Here, the clock unit 132 can adjust the frequency of the captured clock signal CK1 according to the control of the processing unit 133 .

[0048] The processing unit 133 is used to determine whether synchronization is achieved according to the count value C1 output by the counting unit 131. When synchronization is determined not to be achieved, the processing unit 133 can output an adjustment signal A1 to the clock unit 132, so that the clock unit 132 adjusts the frequency of the captured clock signal CK1 accordingly according to the adjustment signal A1.

[0049] The control unit 134 is used to receive the input request signal R1 via the first transmission interface 110, and enable the counting unit 131 to start counting when the input request signal R1 is received. In addition, the control unit 134 is further used to output the output request signal R2 via the second transmission interface 120 according to the captured clock signal CK1, and cause the counting unit 131 to stop counting when the output request signal R2 is output.

[0050] In some embodiments, the audio synchronization processing circuit 100 may further include a buffer memory 140, and the buffer memory 140 is coupled to the control unit 134. In some embodiments, the buffer memory 140 may be implemented using, but not limited to, a random access memory (RAM). In addition, the buffer memory 140 may be a temporary storage area (buffer) in the random access memory.

[0051] In one embodiment of step S10, after the control unit 134 of the processing module 130 receives the input request signal R1 via the first transmission interface 110, the control unit 134 may further transmit an input response signal R1' back to the host end 200 via the first transmission interface 110 to notify the host end 200 that the input audio data D1 can be output. In addition, after the control unit 134 receives the input audio data D1 transmitted by the host end 200 via the first transmission interface 110, the control unit 134 may store the input audio data D1 in the buffer memory 140 for buffering.

[0052] In some embodiments, the control unit 134 may include a first-in-first-out (FIFO) memory (not shown). Therefore, the input audio data D1 may pass through the first-in-first-out memory of the control unit 134 and then be stored in the buffer memory 140 .

[0053] In one embodiment of step S20, the control unit 134 may transfer the input request signal R1 to the counting end of the counting unit 131 upon receiving the input request signal R1, so that the counting unit 131 may start counting according to the basic clock signal CK2 inputted from its clock end.

[0054] In an embodiment of step S30, the control unit 134 may output an output request signal R2 to the audio codec unit 300 via the second transmission interface 120 according to the capture clock signal CK1, so as to request to output the buffered audio data D2 to the codec unit 300. In addition, when the codec unit 300 receives the output request signal R2, it may transmit a response signal R2' back to the control unit 134, so as to notify the control unit 134 that the buffered audio data D2 may be output. In some embodiments, after the control unit 134 outputs the output request signal R2 and receives the output response signal R2', the control unit 134 may retrieve the buffered audio data D2 from the buffer memory 140 and output it to the codec unit 300 via the second transmission interface 120. The buffered audio data D2 is the input audio data D1 previously output by the host end 200 and stored in the buffer memory 140. However, this is not a limitation, and the input audio data D1 just stored in the buffer memory 140 will be first retrieved by the control unit 134 as the buffered audio data D2. In some embodiments, the control unit 134 takes out the input audio data D1 that is currently stored the longest (ie, according to the input order of each input audio data D1 ) as the buffered audio data D2 each time.

[0055] In some embodiments, the buffered audio data D2 may be output to the codec unit 300 after passing through a first-in-first-out memory of the control unit 134 .

[0056] In an embodiment of step S40, the control unit 134 may output the output request signal R2 to the stop terminal of the counting unit 131 when outputting the output request signal R2 via the second transmission interface 120, so that the counting unit 131 stops counting, and the control unit 134 may obtain the count value C1 currently calculated by the counting unit 131. Figure 3 Taking the waveform diagram shown as an example, the count value C1 counted by the counting unit 131 between the input request signal R1 and the output request signal R2 is 5.

[0057] In an embodiment of step S50 , when the count value C1 is not zero, the processing unit 133 may determine that synchronization is not achieved and proceed to step S70 .

[0058] In one embodiment of step S70, the processing unit 133 may compare the count value C1 with a plurality of preset intervals to determine within which preset interval the count value C1 falls, and the processing unit 133 may generate a corresponding adjustment signal A1 to the clock unit 132 according to the preset interval into which the count value C1 falls, so that the clock unit 132 may adjust the frequency of the captured clock signal CK1 accordingly according to the adjustment signal A1.

[0059] For example, assume that there are three preset intervals. Here, the first preset interval is when the count value C1 is less than the first value, the second preset interval is when the count value C1 is greater than the first value but less than the second value, and the third preset interval is when the count value C1 is greater than the second value. When the processing unit 133 determines that the count value C1 falls into the first preset interval, the adjustment signal A1 generated by the processing unit 133 can cause the clock unit 132 to adjust the frequency of the captured clock signal CK1 faster by a first percentage, that is, the basic frequency of the captured clock signal CK1 plus the product value of its basic frequency and the first percentage. When the processing unit 133 determines that the count value C1 falls into the second preset interval, the adjustment signal A1 generated by the processing unit 133 can cause the clock unit 132 to adjust the frequency of the captured clock signal CK1 faster by a second percentage, that is, the basic frequency of the captured clock signal CK1 plus the product value of its basic frequency and the second percentage. Furthermore, when the processing unit 133 determines that the count value C1 falls into the third preset interval, the adjustment signal A1 generated by the processing unit 133 can cause the clock unit 132 to adjust the frequency of the captured clock signal CK1 faster by a third percentage, that is, the basic frequency of the captured clock signal CK1 plus the product of its basic frequency and the third percentage. The third percentage is greater than the second percentage, and the second percentage is greater than the first percentage.

[0060] In some embodiments, the first value may be, but not limited to, 5, and the second value may be, but not limited to, 10. The base frequency of the captured clock signal CK1 may be, but not limited to, 20 kHz. The first percentage may be, but not limited to, 1%. The second percentage may be, but not limited to, 2%. In addition, the third percentage may be, but not limited to, 3%.

[0061] In some embodiments, the basic frequency of the captured clock signal CK1, multiple preset intervals, and the adjustment signal corresponding to each preset interval can be set by the user. For example, these can be written in a setting file so that the audio synchronization processing circuit 100 can perform relevant settings according to the setting file when initialized.

[0062] In some embodiments, the counting unit 131 may be reset to zero before starting counting each time, that is, the count value obtained last time is cleared. In some embodiments, the counting unit 131 may be implemented using a synchronous counter, an asynchronous counter, etc. In addition, the counting unit 131 may be made by digital circuit synthesis through a hardware description language, but the present invention is not limited thereto.

[0063] In some embodiments, the first transmission interface 110 and the second transmission interface 120 can be implemented by a Universal Serial Bus (USB), a Serial Peripheral Interface (SPI), a Universal Asynchronous Receiver / Transmitter (UART) transmission interface, a wireless network transmission interface, an Integrated Interchip Sound (I2S) transmission interface, a Pulse Code Modulation (PCM) transmission interface, a Pulse Density Modulation (PDM) transmission interface, etc. In addition, the transmission standard adopted by the first transmission interface 110 can be the same as or different from the transmission standard adopted by the second transmission interface 120.

[0064] In some embodiments, the audio synchronization processing circuit 100 may be an internal circuit included in a direct memory access (DMA) controller. The control unit 134 may be a peripheral interface controller in the direct memory access controller, and the input request signal R1 and the output request signal R2 are a direct memory access request (DMA request) signal, but the present invention is not limited thereto.

[0065] In particular, the present invention can reduce the cost by directly adding the frequency adjustment function of the captured clock signal CK1 to the direct memory access controller. In addition, the direct memory access request signal (i.e., the input request signal R1 and the output request signal R2) is used to determine the timing, which can further minimize the adjustment error.

[0066] In summary, an embodiment of the present invention provides an audio synchronization processing circuit and method thereof, which determines whether synchronization is achieved through the count value obtained between the input request signal and the output request signal, and adjusts the frequency of the captured clock signal accordingly according to the size of the count value when it is determined that synchronization is not achieved, so that the host end and the device end can be synchronized, thereby improving the problem of poor audio quality. In addition, an embodiment of the audio synchronization processing circuit and method thereof of the present invention can be implemented based on a direct memory access controller and then add a function to adjust the frequency of the captured clock signal, thereby reducing the required cost. Furthermore, an embodiment of the audio synchronization processing circuit and method thereof of the present invention uses a direct memory access request signal to determine the timing, and can minimize the adjustment error.

[0067] The embodiments of the present invention are disclosed as above, but they are not used to limit the scope of the present invention. Any person with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, the scope of protection of the present invention shall be determined by the definition of the aforementioned claims.

Claims

1. An audio synchronization processing method, characterized in that: Include: Receiving an input request signal via a first transmission interface; A clock unit generates a captured clock signal; Receiving a basic clock signal via a clock terminal of a counting unit; When the input request signal is received, the counting unit starts counting according to the basic clock signal; Outputting an output request signal via a second transmission interface according to the captured clock signal, and inputting the output request signal to a stop terminal of the counting unit; The counting unit stops counting according to the output request signal to obtain a counting value; Determining whether synchronization is achieved according to the count value; and When it is determined that synchronization is not reached, the frequency of the captured clock signal is adjusted according to the count value.

2. The audio synchronization processing method according to claim 1, characterized in that: After receiving the input request signal, the method further comprises: An input audio data is received via the first transmission interface, and the input audio data is stored in a buffer memory.

3. The audio synchronization processing method according to claim 2, characterized in that: After the step of outputting the output request signal, the method further comprises: A buffered audio data is taken out from the buffer memory and the buffered audio data is output.

4. The audio synchronization processing method according to claim 1, characterized in that: The step of adjusting the frequency of the captured clock signal according to the count value comprises: Determine which of a plurality of preset intervals the count value falls within; and The frequency of the captured clock signal is adjusted accordingly according to the preset interval that the count value falls into.

5. An audio synchronization processing circuit, characterized in that: Include: a first transmission interface; a second transmission interface; and A processing module, comprising: A clock unit for generating a captured clock signal; and a counting unit having a clock terminal and a stop terminal, receiving a basic clock signal via the clock terminal, receiving an input request signal via the first transmission interface, and starting counting according to the basic clock signal when receiving the input request signal; wherein the processing module is further configured to output an output request signal via the second transmission interface according to the captured clock signal and input the output request signal to a stop terminal of the counting unit, and the counting unit stops counting according to the output request signal to obtain a count value, and The processing module is further used to determine whether synchronization is achieved according to the count value, and when it is determined that synchronization is not achieved, the processing module adjusts the frequency of the captured clock signal according to the count value.

6. The audio synchronization processing circuit according to claim 5, characterized in that: The processing module comprises: a processing unit, configured to determine whether synchronization is achieved according to the count value, wherein when it is determined that synchronization is not achieved, the processing unit causes the clock unit to adjust the frequency of the captured clock signal according to the count value; and A control unit is used to receive the input request signal and cause the counting unit to start counting when the input request signal is received. The control unit is further used to output the output request signal according to the captured clock signal and cause the counting unit to stop counting to obtain the count value when the output request signal is output.

7. The audio synchronization processing circuit according to claim 5, characterized in that: Also includes: A buffer memory, wherein the processing module further receives an input audio data via the first transmission interface after receiving the input request signal, and the processing module stores the input audio data in the buffer memory.

8. The audio synchronization processing circuit according to claim 7, characterized in that: After outputting the output request signal, the processing module further retrieves a buffered audio data from the buffer memory and outputs the buffered audio data via the second transmission interface.

9. The audio synchronization processing circuit according to claim 5, characterized in that: When determining that synchronization is achieved, the processing module does not adjust the frequency of the captured clock signal.

10. The audio synchronization processing circuit according to claim 6, characterized in that: The processing module determines which of a plurality of preset intervals the count value falls into, and adjusts the frequency of the captured clock signal accordingly according to the preset interval the count value falls into.