Digital volume control method, digital volume control circuit and integrated circuit

By shifting the input audio data, the amount of gain coefficient data of the multiplier during volume control is reduced, and the problem of degradation of the volume control accuracy in the prior art is solved, thereby achieving higher accuracy volume control.

CN119603603APending Publication Date: 2025-03-11SHENZHEN NENGXIN SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411547209.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

When implementing volume control over a larger range, the prior art requires precalculation and pre-storing of a large number of gain coefficients, resulting in an increase in memory capacity requirements and an increase in attenuation of the gain coefficient, resulting in a decrease in the accuracy of the volume control.

Method used

By performing the shift processing of the preset shift step on the input audio data, the total amount of data of the gain coefficient required by the multiplier in audio gain control and the number of data bits of a single piece of data are reduced, thereby improving the accuracy of volume gain control.

Benefits of technology

It realizes the accuracy of volume control without increasing memory capacity requirements, and optimizes the data storage space and circuit usage on the chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603603A_ABST
    Figure CN119603603A_ABST
Patent Text Reader

Abstract

The invention discloses a digital volume control method, a digital volume control circuit and an integrated circuit. The method comprises the following steps: performing shift processing on pre-acquired input audio data according to a preset shift step length, and determining shift audio data; and performing multiplication processing on the shifted audio data in a preset parameter range, and determining output audio data. According to the invention, on the basis that the multiplier is used to carry out audio gain control, the shifter is used to carry out shift processing on the input audio data in advance, so that the total data volume of gain coefficients required by the multiplier to carry out multiplication processing on the audio and the data bits of single data are reduced; therefore, the total amount of the data and the complexity of the data are reduced through a decentralized calculation mode, the accuracy degree of volume gain control is improved, and the storage space of the data and the occupation condition of a circuit on a chip are optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of audio control, and in particular to a digital volume control method, a digital volume control circuit and an integrated circuit. Background Art

[0002] In the current related technologies, regarding the control and adjustment of digital volume, a multiplier is generally used to select a gain coefficient from the pre-calculated and pre-saved gain coefficients according to different volume settings to multiply the input audio data, thereby achieving volume control. However, in order to achieve volume control in a wider range, it is necessary to increase the number of pre-calculations and pre-saved gain coefficients, which places high demands on the capacity size of data storage devices such as memory. At the same time, as the attenuation amplitude corresponding to the gain coefficient increases, the gain deviation between the gain multiple that can be stored in the memory and the theoretical gain multiple corresponding to the gain coefficient will also increase, which will lead to a decrease in the accuracy of volume control. Summary of the invention

[0003] The present application provides a digital volume control method, a digital volume control circuit and an integrated circuit.

[0004] The digital volume control method involved in the embodiment of the present application comprises the following steps:

[0005] Performing shift processing on the pre-acquired input audio data with a preset shift step length to determine shifted audio data;

[0006] The shifted audio data is multiplied within a preset parameter range to determine output audio data.

[0007] In this way, the present application can, on the basis of using a multiplier for audio gain control, pre-shift the input audio data using a shifter, thereby reducing the total data volume of the gain coefficient required when the multiplier performs audio multiplication processing and the number of data bits of a single data, thereby reducing the total amount of data and the complexity of the data through distributed computing, thereby improving the accuracy of volume gain control, optimizing data storage space and circuit occupancy on the chip.

[0008] In some embodiments, performing a shift process on the pre-acquired input audio data with a preset shift step length to determine the shifted audio data includes:

[0009] According to the input audio data, obtaining a planned volume gain of the input audio data;

[0010] Determining a shift amount of the input audio data according to the planned volume gain and the preset shift step, wherein the shift amount is an integer;

[0011] The input audio data is subjected to a shift process according to the shift amount and the preset shift step length to determine the shifted audio data.

[0012] In this way, the present application can calculate the shift amount based on the input audio data, and further perform shifting for the input audio data according to the above-mentioned shift amount.

[0013] In some implementations, determining the shift amount of the input audio data according to the planned volume gain and the preset shift step size includes:

[0014] Performing a division operation on the planned volume gain and the preset shift step size;

[0015] A quotient obtained from the division operation is determined as the shift amount.

[0016] In this way, the present application can determine the number of shifts required in the shifting process by taking the quotient through division based on the volume gain and the preset shifting step size.

[0017] In certain embodiments, the method comprises:

[0018] According to the input audio data, obtaining a planned volume gain of the input audio data;

[0019] A multiplication processing parameter for the shifted audio data is determined according to the planned volume gain and the preset shift step, wherein the multiplication processing parameter is included in the preset parameter range.

[0020] In this way, the present application can also filter the multiplication processing parameters that need to be adopted based on the input audio data, so as to perform the multiplication processing based on the multiplication processing parameters that have been selected and adopted after the shift processing is completed.

[0021] In some embodiments, determining a multiplication processing parameter for the shifted audio data according to the planned volume gain and the preset shift step size includes:

[0022] Performing a division operation on the planned volume gain and the preset shift step size;

[0023] A multiplication operation parameter corresponding to the remainder obtained by the division operation is determined as the multiplication processing parameter.

[0024] In this way, the present application can determine the corresponding multiplication processing parameter by taking the remainder in the above-mentioned division calculation based on the volume gain and the preset shift step.

[0025] In some implementations, performing multiplication processing on the shifted audio data within a preset parameter range to determine the output audio data includes:

[0026] A multiplication process is performed on the shifted audio data according to the multiplication process parameter to determine output audio data.

[0027] In this way, the present application can perform multiplication processing based on the multiplication processing parameters that have been selected and adopted after the shift processing is completed.

[0028] The digital volume control circuit in the implementation manner of the present application can implement the above-mentioned digital volume control method, and the circuit includes:

[0029] A shifter, used to perform shift processing on the pre-acquired input audio data with a preset shift step length to determine shifted audio data;

[0030] The multiplier is used to perform multiplication processing on the shifted audio data within a preset parameter range to determine output audio data.

[0031] In some embodiments, the circuit further comprises:

[0032] A controller, configured to determine a shift amount and a multiplication processing parameter of the input audio data according to a planned volume gain and the preset shift step size;

[0033] The memory is used to store preset parameter ranges.

[0034] In some embodiments, the data bit width of the memory is a first preset number, wherein a second preset number of data located at the first position represents a symbol, a third preset number of data located at the second position represents a numerical value, and the first preset number is the sum of the second preset number and the third preset number.

[0035] The integrated circuit in the implementation manner of the present application includes the above-mentioned digital volume control circuit, and can implement the above-mentioned digital volume control method.

[0036] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0038] Figure 1 This is a flow chart of a digital volume control method in an embodiment of the present application;

[0039] Figure 2 This is a flow chart of a digital volume control method in an embodiment of the present application;

[0040] Figure 3 This is a flow chart of a digital volume control method in an embodiment of the present application;

[0041] Figure 4 This is a flow chart of a digital volume control method in an embodiment of the present application;

[0042] Figure 5 This is a flow chart of a digital volume control method in an embodiment of the present application;

[0043] Figure 6 Schematic diagram of the modules and data flow of the digital volume control circuit in the implementation manner of the present application. DETAILED DESCRIPTION

[0044] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.

[0045] See also Figure 1 The digital volume control method in the embodiment of the present application comprises the following steps:

[0046] 01: Perform shift processing on the pre-acquired input audio data with a preset shift step length to determine the shifted audio data;

[0047] 02: Perform multiplication processing on the shifted audio data within a preset parameter range to determine the output audio data.

[0048] The digital volume control circuit in the implementation mode of the present application can implement the above-mentioned digital volume control method. Specifically, the digital volume control circuit includes a shifter and a multiplier, wherein the shifter is used to perform a shift process on the pre-acquired input audio data with a preset shift step length to determine the shifted audio data, and the multiplier is used to perform a multiplication process on the shifted audio data within a preset parameter range to determine the output audio data.

[0049] Specifically, currently typical digital volume control is generally implemented by a digital multiplier. According to different volume control purposes, a pre-calculated gain coefficient corresponding to the above volume control purpose is called from a memory, and then the input audio and the above gain coefficient are input together as input data of the multiplier. After the multiplication processing of the multiplier, the output audio after the volume control is completed is obtained.

[0050] Generally, the audio gain control process of the above control process can generally cover a control range of up to +15dB and down to -80dB, and the minimum adjustment range can generally be set to 0.5dB or 1dB. Then according to the above control process, if 1dB is the minimum adjustment range, then 96 pre-calculated and pre-saved gain coefficients need to be set, that is, each value in the control range of up to +15dB and down to -80dB corresponds to 1 gain coefficient. Similarly, if 0.5dB is the minimum adjustment range, then 192 pre-calculated and pre-saved gain coefficients need to be set. It can be seen that the more refined the adjustment, the more pre-calculated and pre-saved gain coefficients are required, and the more storage space of the memory is occupied.

[0051] In the actual calculation process, the gain coefficient in dB needs to be converted into an actual gain multiple for calculation. The above-mentioned gain multiple is generally represented by a fixed-point number with a fixed number of bits. When the gain coefficient in dB changes within the above-mentioned control range, the lower the number of bits of the fixed-point number, the greater the error between the gain multiple represented and the target multiple originally corresponding to the above-mentioned gain coefficient. At the same time, the greater the change amplitude corresponding to the gain coefficient, the greater the error between the gain multiple represented and the target multiple originally corresponding to the above-mentioned gain coefficient. Therefore, when the above-mentioned method is used for multiplication processing, in order to improve the accuracy, the number of data bits and the total amount of data stored in the memory will be abnormally large, and in order to cooperate with the above-mentioned data volume, the data size of the multiplier also needs to be increased accordingly. This has a significant negative impact on the design and operation process of the integrated circuit.

[0052] Therefore, in order to solve the above situation, the digital volume control method proposed in the embodiment of the present application first performs a shift process and then a multiplication process on the input audio data, uses the shift process to achieve a coarse adjustment of the volume, and then uses the multiplication process to achieve a fine adjustment of the volume, and adjusts the volume of the input audio data within a larger control range through the coarse and fine adjustments.

[0053] For example, for a binary digital audio signal, shifting the data to the left by 1 bit is equivalent to multiplying the input audio data by 2, and shifting the data to the right by 1 bit is equivalent to dividing the input audio data by 2. At the same time, multiplying by 2 is equivalent to performing a +6dB gain on the audio volume, and dividing by 2 is equivalent to performing a -6dB gain on the audio volume. Therefore, the shifter can be used to shift the input audio data, with 6dB as the preset displacement step, to perform a rough adjustment of the volume control of the input audio data.

[0054] Furthermore, since the step size of the above-mentioned coarse adjustment is 6dB, then on the basis of the above-mentioned example, when the audio data that has been shifted is multiplied by a multiplier to achieve fine adjustment of the volume control, the corresponding gain data only needs to be set within a control range of 0dB to -5dB, and the amount of gain data within the control range can be controlled by adjusting the minimum adjustment range according to actual conditions, and the minimum adjustment range can be 1dB, 0.5dB or a smaller value. In this way, since the change amplitude of the gain coefficient is maintained within a smaller range, the error of the corresponding gain multiple is also smaller, thereby improving the volume control accuracy. Generally speaking, each gain coefficient within the above-mentioned control range corresponds to a multiplication processing parameter, and the multiplication processing parameter is the actual gain multiple for performing multiplication processing on the audio data.

[0055] From the above examples, it can be seen that the digital volume control method in the embodiment of the present application utilizes the cooperation of the shifter and the multiplier. Through the cooperation of coarse and fine adjustment, the number of gain coefficients in the multiplication process is reduced on the one hand, and the overall accuracy of the volume control process is improved on the other hand.

[0056] In this way, the present application can, on the basis of using a multiplier for audio gain control, pre-shift the input audio data using a shifter, thereby reducing the total data volume of the gain coefficient required when the multiplier performs audio multiplication processing and the number of data bits of a single data, thereby reducing the total amount of data and the complexity of the data through distributed computing, thereby improving the accuracy of volume gain control, optimizing data storage space and circuit occupancy on the chip.

[0057] See also Figure 2 In some embodiments, step 01 includes:

[0058] 011: According to the input audio data, obtain the planned volume gain of the input audio data;

[0059] 012: Determine the shift amount of the input audio data according to the planned volume gain and the preset shift step size.

[0060] where the shift amount is an integer;

[0061] 013: Perform shift processing on the input audio data according to the shift amount and the preset shift step size to determine the shifted audio data.

[0062] In some embodiments, the digital volume control circuit also includes a controller, which is used to obtain a planned volume gain of the input audio data based on the input audio data, and to determine the shift amount of the input audio data based on the planned volume gain and a preset shift step; the shifter is also used to perform shift processing on the input audio data according to the shift amount and with a preset shift step to determine the shifted audio data.

[0063] Specifically, the overall process of volume control is exemplarily described below.

[0064] In some examples, the volume control adjustment range of the input audio data is up to +15dB and down to -80dB. After the input audio data is input into the digital volume control circuit, the controller in the digital volume control circuit first receives the corresponding audio control instruction based on the above-mentioned input audio data, and analyzes based on the instruction to obtain the planned volume gain corresponding to the input audio data. Generally, the above-mentioned planned volume gain is in dB, and when the data is positive, it represents an increase in volume, and when the data is negative, it represents a decrease in volume. At the same time, the minimum adjustment range of the planned volume gain generally needs to be the same as the minimum adjustment range of the corresponding gain data of the multiplier. For example, if the minimum adjustment range of the corresponding gain data of the multiplier is 1dB, the minimum adjustment range of the planned volume gain should also be 1dB.

[0065] Next, the controller calculates the shifting step size corresponding to the shifter based on the obtained planned volume gain, so as to obtain the number of bits that the input audio data needs to be shifted when the shifter performs the shifting process.

[0066] It should be noted that, first, the direction of the shift corresponds to the positive or negative of the planned volume gain. For example, based on the above implementation, when the planned volume gain is positive, the input audio data is shifted to the left, indicating that the volume is increased, and when the planned volume gain is negative, the input audio data is shifted to the right, indicating that the volume is decreased.

[0067] Secondly, the shift processing is only a coarse adjustment of the volume control. In order to cooperate with the subsequent multiplier to perform multiplication processing to achieve fine adjustment and ensure the correctness of the coarse adjustment, the obtained shift amount needs to be guaranteed to be an integer. When the shifter performs shift processing according to the above shift amount, it controls the input audio data to shift according to the sign and value of the shift amount.

[0068] In this way, the present application can calculate the shift amount based on the input audio data, and further perform shifting for the input audio data according to the above-mentioned shift amount.

[0069] See also Figure 3 In some embodiments, step 012 includes:

[0070] 0121: Perform division operation on the planned volume gain and the preset shift step size;

[0071] 0122: The quotient obtained from the division operation is determined as the shift amount.

[0072] In some embodiments, the controller is configured to perform a division operation on the planned volume gain and the volume gain step corresponding to the preset shift step, and to determine a quotient obtained by the division operation as the shift amount.

[0073] Specifically, based on the above implementation, for the calculation method of the shift amount, illustratively, for the calculation between the planned volume gain and the preset shift step, a division operation is generally used. For example, in the following example, the planned volume gain is -47dB, and according to the above implementation, the preset shift step is 6dB. Then when calculating the shift amount, the planned volume gain is divided by the preset shift step, that is, (-47) / 6, and the calculated quotient is -7.

[0074] Then, the above quotient is directly used as the shift amount, and the shifter directly performs the shift processing according to the above shift amount. For example, based on the above example, the shift amount is -7, so the shifter shifts the input audio data to the right by 7 bits to obtain the shifted audio data, which is equivalent to applying a -42dB gain to the volume of the input audio data.

[0075] It should be noted that there is a slight difference from the above example. When the planned volume gain is a positive value, the shift amount should be the quotient obtained by the above division plus one. For example, when the planned volume gain is +10dB and the preset shift step is 6dB, the quotient obtained by the above division calculation is 1, and the shift amount should be plus one on the basis of the above quotient. Therefore, the corresponding shift amount in the above case is 2. The purpose of this setting is to match the preset parameter range of the multiplication process.

[0076] In this way, the present application can determine the number of shifts required in the shifting process by taking the quotient through division based on the volume gain and the preset shifting step size.

[0077] See also Figure 4 In some embodiments, the digital volume control method further comprises:

[0078] 001: According to the input audio data, obtain the planned volume gain of the input audio data;

[0079] 002: Determine the multiplication processing parameters for the shifted audio data according to the planned volume gain and the preset shift step size,

[0080] The multiplication processing parameters are included in the preset parameter range.

[0081] In some embodiments, the controller is further configured to obtain a planned volume gain of the input audio data based on the input audio data, and to determine a multiplication processing parameter for the shifted audio data based on the planned volume gain and a preset shift step.

[0082] Specifically, on the basis of the above-mentioned implementation mode, after the input audio data is input into the digital volume control circuit, the controller in the digital volume control circuit first receives the corresponding audio control instruction based on the above-mentioned input audio data, and analyzes based on the instruction to obtain the planned volume gain corresponding to the input audio data. Generally, the above-mentioned planned volume gain is in dB, and when the data is positive, it represents an increase in volume, and when the data is negative, it represents a decrease in volume. At the same time, the minimum adjustment range of the planned volume gain generally needs to be the same as the minimum adjustment range of the gain data corresponding to the multiplier. For example, if the minimum adjustment range of the gain data corresponding to the multiplier is 1dB, the minimum adjustment range of the planned volume gain should also be 1dB.

[0083] Next, while the controller calculates based on the planned volume gain and the shifting step corresponding to the shifter, it can also obtain the gain coefficient that needs to be applied to the shifted audio data when the multiplier performs multiplication processing on the shifted audio data after the shifting processing. After obtaining the above gain, the corresponding gain multiple can be screened out within the preset parameter range, that is, the multiplication processing parameters used in the multiplication process.

[0084] In this way, the present application can also filter the multiplication processing parameters that need to be adopted based on the input audio data, so as to perform the multiplication processing based on the multiplication processing parameters that have been selected and adopted after the shift processing is completed.

[0085] See also Figure 5 In some embodiments, step 002 includes:

[0086] 0021: Perform division operation on the planned volume gain and the preset shift step size;

[0087] 0022: Determine the multiplication operation parameter corresponding to the remainder obtained from the division operation as the multiplication processing parameter.

[0088] In some implementations, the controller is further configured to perform a division operation on the planned volume gain and the preset shift step, and to determine a multiplication operation parameter corresponding to a remainder obtained from the division operation as a multiplication processing parameter.

[0089] Specifically, on the basis of the above-mentioned implementation, the method for determining the multiplication processing parameters can also be determined based on the division operation of the planned volume gain and the preset shift step in the above-mentioned implementation. For example, as in the above-mentioned example, the planned volume gain is -47dB, and the preset shift step is 6dB. Then when calculating the number of shifts, the planned volume gain is divided by the preset shift step, that is, (-47) / 6, and the calculated quotient is -7, and the remainder is -5. The above-mentioned quotient is the number of movements, and the remainder -5 corresponds to the gain coefficient of the multiplication processing -5dB. Then, the controller selects the corresponding gain multiple (corresponding to the multiplication operation parameter) within the preset parameter range according to the above-mentioned gain coefficient, and uses it as the multiplication processing parameter of the multiplication processing process.

[0090] For another example, if the planned volume gain is +10dB and the preset shift step is 6dB, then when calculating the shift amount, the planned volume gain is divided by the preset shift step, that is, 10 / 6, and the calculated quotient is 1. According to the setting of the shift amount in the above implementation, the shift amount should be set to the above quotient plus one, that is, the shift amount is +2, then when the shifter shifts the input audio data to the left by 2 bits, the volume of the input audio data increases by 12dB, which has exceeded the planned volume gain. Therefore, on this basis, when the volume gain is corrected by multiplication processing, the corresponding gain coefficient is selected as -2dB.

[0091] In this way, the present application can determine the corresponding multiplication processing parameter by taking the remainder in the above-mentioned division calculation based on the volume gain and the preset shift step.

[0092] In some embodiments, step 02 includes:

[0093] A multiplication process is performed on the shifted audio data according to the multiplication process parameter to determine output audio data.

[0094] In some embodiments, the multiplier is further configured to perform a multiplication process on the shifted audio data according to a multiplication process parameter to determine output audio data.

[0095] Specifically, based on the above implementation, when the gain coefficient used in the multiplication process is obtained, the controller uses the gain coefficient as an index to call the gain multiple (corresponding to the multiplication process parameter) corresponding to the gain coefficient from the memory, and uses the called gain multiple and the shifted audio data obtained by the shift process as the input data of the multiplier to perform the multiplication process. In this case, the output result is the output audio data obtained after completing the volume control.

[0096] For example, based on the above example, the theoretical gain multiple corresponding to the gain coefficient -5dB is 0.562341325. Then, when the multiplier performs multiplication processing on the shifted audio data, the controller can first call the above theoretical gain multiple and use it as the input data of the multiplier for multiplication processing. It should be noted that since the attenuation amplitude corresponding to the gain coefficient in the above example is not large, the data bit width of the memory does not need to be very large, so the gain multiple stored in the memory is generally stored in a fixed-point format with a finite number of bits. For example, illustratively, based on the above example, the data bit width used by the memory is 10 bits. Due to the limitation of the data bit width, there is a certain error between the gain multiple stored in the memory and the theoretical gain multiple, but since the attenuation amplitude corresponding to the gain coefficient is not large, when only using a fixed-point format with a data bit width of 10 bits to store the gain multiple, the absolute value of the ratio of the error between the stored gain multiple and the theoretical gain multiple can be controlled within 0.13%, and such an error range is acceptable.

[0097] In this way, the present application can perform multiplication processing based on the multiplication processing parameters that have been selected and adopted after the shift processing is completed.

[0098] See also Figure 6 The digital volume control circuit in the implementation manner of the present application can implement the above-mentioned digital volume control method, which specifically includes:

[0099] A shifter, used to perform shift processing on the pre-acquired input audio data with a preset shift step length to determine shifted audio data;

[0100] The multiplier is used to perform multiplication processing on the shifted audio data within a preset parameter range to determine the output audio data.

[0101] Furthermore, the digital volume control circuit further comprises:

[0102] A controller, configured to determine a shift amount and a multiplication processing parameter of input audio data according to a planned volume gain and a preset shift step size;

[0103] The memory is used to store preset parameter ranges.

[0104] Further, in some embodiments, the data bit width of the memory is a first preset number, wherein a second preset number of data located at the first position represents a symbol, a third preset number of data located at the second position represents a value, and the first preset number is the sum of the second preset number and the third preset number.

[0105] Specifically, see Figure 6 , Figure 6The schematic diagram shows the data transmission relationship between the modules in the digital volume control circuit. The input audio data is used as the first input of the shifter. The controller obtains the corresponding planned volume gain according to the input audio data. After the controller calculates the shift amount and the gain coefficient, the shift amount is used as the second input of the shifter. The shifter performs a shift process, outputs the shifted audio data with the same number of bits as the input audio data and has been shifted, and uses the shifted audio data as the first input of the multiplier. Then, the controller uses the calculated gain coefficient as an index to call the gain multiple data corresponding to the gain coefficient stored in the memory, and uses the called data as the second input of the multiplier. The multiplier performs a multiplication process, thereby outputting the output audio data that has completed the volume control.

[0106] According to the digital volume control method in the above embodiment, with 1dB as the minimum adjustment range, the volume control range is from +15dB to -80dB, then the volume control function that can be achieved by the above digital volume control circuit can be described by the following Table 1:

[0107] Table 1 Comparison table of execution data of planned gains

[0108] Planned volume gain / dB Shift quantity Shift equivalent gain / dB Multiplier gain factor / dB +15 +3 +18 -3 +14 +3 +18 -4 +13 +3 +18 -5 +12 +2 +12 0 +11 +2 +12 -1 +10 +2 +12 -2 … … … … -76 -12 -72 -4 -77 -12 -72 -5 -78 -13 -78 0 -79 -13 -78 -1 -80 -13 -78 -2

[0109] In addition, for the gain coefficient and the corresponding gain multiple stored in the memory, as mentioned in the above-mentioned embodiment, since the attenuation amplitude represented by the gain coefficient is not large, the data width of the gain multiple does not need to be too large. Therefore, in some embodiments, the data width of the memory storing the gain multiple can adopt 10 bits (corresponding to the first preset number), wherein the first bit in the gain multiple data (corresponding to the data of the second preset number located at the first position) represents its symbol, and the last nine bits of data (corresponding to the data of the third preset number located at the second position) are used to represent the numerical value of the gain multiple data. After decimal conversion, the comparison of the gain coefficient and the gain multiple, and the error rate between the gain multiple stored in the memory and the theoretical gain multiple, can be specifically referred to Table 2:

[0110] Table 2 Comparison table of gain coefficient and gain multiple in memory

[0111]

[0112]

[0113] According to the data in Table 2, within the above-mentioned preset parameter range, the absolute value of the error rate between the gain multiple stored in the memory with a data width of 10 bits and the corresponding theoretical gain multiple does not exceed 0.13%, and its accuracy can meet the requirements for normal volume adjustment.

[0114] The integrated circuit in the implementation manner of the present application includes the above-mentioned digital volume control circuit, and can implement the above-mentioned digital volume control method.

[0115] In the description of this specification, the descriptions with reference to the terms "certain embodiments", "in an example", "exemplarily", etc., mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0116] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0117] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A digital volume control method, characterized in that: The method comprises: Performing shift processing on the pre-acquired input audio data with a preset shift step length to determine shifted audio data; The shifted audio data is multiplied within a preset parameter range to determine output audio data.

2. The method according to claim 1, characterized in that The performing shift processing on the pre-acquired input audio data with a preset shift step length to determine the shifted audio data includes: According to the input audio data, obtaining a planned volume gain of the input audio data; Determining a shift amount of the input audio data according to the planned volume gain and the preset shift step, wherein the shift amount is an integer; The input audio data is subjected to a shift process according to the shift amount and the preset shift step length to determine the shifted audio data.

3. The method according to claim 2, characterized in that The step of determining the shift amount of the input audio data according to the planned volume gain and the preset shift step size comprises: Performing a division operation on the planned volume gain and the preset shift step size; A quotient obtained from the division operation is determined as the shift amount.

4. The method according to claim 1, characterized in that: The method comprises: According to the input audio data, obtaining a planned volume gain of the input audio data; A multiplication processing parameter for the shifted audio data is determined according to the planned volume gain and the preset shift step, wherein the multiplication processing parameter is included in the preset parameter range.

5. The method according to claim 4, characterized in that The determining of a multiplication processing parameter for the shifted audio data according to the planned volume gain and the preset shift step size comprises: Performing a division operation on the planned volume gain and the preset shift step size; A multiplication operation parameter corresponding to the remainder obtained by the division operation is determined as the multiplication processing parameter.

6. The method according to claim 5, characterized in that The performing multiplication processing on the shifted audio data within a preset parameter range to determine the output audio data comprises: A multiplication process is performed on the shifted audio data according to the multiplication process parameter to determine output audio data.

7. A digital volume control circuit, characterized in that: The circuit can implement the digital volume control method according to any one of claims 1 to 6, and the circuit comprises: A shifter, used to perform shift processing on the pre-acquired input audio data with a preset shift step length to determine shifted audio data; The multiplier is used to perform multiplication processing on the shifted audio data within a preset parameter range to determine output audio data.

8. The circuit according to claim 7, characterized in that The circuit further comprises: A controller, configured to determine a shift amount and a multiplication processing parameter of the input audio data according to a planned volume gain and the preset shift step size; The memory is used to store preset parameter ranges.

9. The circuit according to claim 8, characterized in that The data bit width of the memory is a first preset number, wherein a second preset number of data at the first position represents a symbol, a third preset number of data at the second position represents a value, and the first preset number is the sum of the second preset number and the third preset number.

10. An integrated circuit, characterized in that: The integrated circuit includes the digital volume control circuit as described in any one of claims 7 to 9, and can implement the digital volume control method as described in any one of claims 1 to 6.