Control method and control device of audio equipment

By gradually adjusting the gain value of the audio device, the problem of sudden changes in PCM value when operating the audio and video device is solved, and the volume change is smoothed and the user experience is improved.

CN119521084APending Publication Date: 2025-02-25SHENZHEN HUIDU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411656595.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When operating audio and video equipment, digital audio is easily disturbed, resulting in a sudden change in PCM value, introducing noise, and having a poor user experience.

Method used

By gradually adjusting the gain value of the input audio, adjust the current volume of the audio to the target volume or mute it, ensuring smooth volume changes and avoiding sudden changes in PCM values.

Benefits of technology

Effectively suppress noise generation, improve user experience, ensure smooth volume changes during operation of audio equipment, and avoid sudden changes in PCM values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119521084A_ABST
    Figure CN119521084A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and a control device for audio equipment. The control method comprises the following steps: according to a first type operation instruction, adjusting the current volume of an input audio to a target volume corresponding to the first type operation instruction by gradually adjusting a gain value of the input audio; the first type operation instruction at least comprises one of an audio opening instruction, an audio closing instruction and a volume adjusting instruction; or, according to the audio switching instruction, adjusting the current volume of the input audio to the first set value by gradually adjusting the gain value of the input audio; controlling the audio equipment to carry out audio switching; the first set value is zero. The gradual change of the volume is realized by gradually adjusting the gain value of the audio, so that the smooth change of the PCM value of the audio is realized, the sudden change of the PCM value is avoided, and the generation of noise is inhibited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio adjustment, and in particular to a control method and a control device for audio equipment. Background Art

[0002] Audio equipment is widely used in modern life. Human ears are more sensitive to sound than to images. Even a little noise or current sound can be heard. After passing through high-power amplifier audio equipment, these noise or current sounds will become thunderous and harsh roars. When performing certain operations on audio equipment, such as switching audio and video signal sources, digital audio is easily interfered, and the audio pulse code modulation value (Pulse Code Modulation, PCM) may change suddenly, thereby introducing noise and poor user experience. Summary of the invention

[0003] The present invention provides a control method and a control device for audio equipment, so as to solve the problem of noise introduced when a user operates audio and video equipment.

[0004] According to one aspect of the present invention, there is provided a method for controlling an audio device, comprising:

[0005] According to the first type of operation instruction, the current volume of the input audio is adjusted to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio; the first type of operation instruction includes at least one of an audio turn-on instruction, an audio turn-off instruction, and a volume adjustment instruction;

[0006] or,

[0007] According to the audio switching instruction, the current volume of the input audio is adjusted to a first set value by gradually adjusting the gain value of the input audio;

[0008] Controlling the audio device to switch the audio; the first setting value is zero.

[0009] Optionally, according to the first type operation instruction, adjusting the current volume of the input audio to a target volume corresponding to the first type operation instruction by gradually adjusting the gain value of the input audio includes:

[0010] Determine a target gain value corresponding to the target volume according to the target volume corresponding to the first type of operation instruction and a preset corresponding relationship; the preset corresponding relationship includes a plurality of volumes and a gain value corresponding to each of the plurality of volumes;

[0011] Stepwise adjusting a current gain value corresponding to a current volume of the input audio to the target gain value, so as to adjust the current volume of the input audio to the target volume;

[0012] According to the audio switching instruction, adjusting the current volume of the input audio to a first set value by gradually adjusting the gain value of the input audio includes:

[0013] Determining a target gain value corresponding to the first setting value according to the first setting value and the preset corresponding relationship;

[0014] The current gain value corresponding to the current volume of the input audio is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the first set value.

[0015] Optionally, the first type of operation instruction includes the volume adjustment instruction;

[0016] The determining, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume comprises:

[0017] Determining a target gain value corresponding to the target volume according to the target volume corresponding to the volume adjustment instruction and the preset corresponding relationship;

[0018] The step of gradually adjusting the current gain value corresponding to the current volume of the input audio to the target gain value so as to adjust the current volume of the input audio to the target volume includes:

[0019] Determining a gain value adjustment direction according to the target gain value corresponding to the volume adjustment instruction and the current gain value corresponding to the current volume of the input audio;

[0020] According to the gain value adjustment direction, the current gain value is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the target volume.

[0021] Optionally, the first type of operation instruction includes an audio opening instruction;

[0022] The determining, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume comprises:

[0023] Using the volume cached when the audio device was last turned off as the target volume corresponding to the audio turn-on instruction;

[0024] Determining a target gain value corresponding to the target volume according to the target volume and the preset corresponding relationship;

[0025] The step of gradually adjusting the current gain value corresponding to the current volume of the input audio to the target gain value so as to adjust the current volume of the input audio to the target volume includes:

[0026] The gain value corresponding to the first setting value is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the target volume.

[0027] Optionally, the first type of operation instruction includes an audio shut down instruction;

[0028] The determining, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume comprises:

[0029] Using the first setting value as the target volume corresponding to the audio shut-off instruction;

[0030] Determining a target gain value corresponding to the target volume according to the target volume and the preset corresponding relationship;

[0031] The step of gradually adjusting a current gain value corresponding to a current volume of the input audio to the target gain value so as to adjust the current volume of the input audio to the target volume includes:

[0032] The current gain value corresponding to the current volume of the input audio is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the first set value.

[0033] Optionally, before determining the target gain value corresponding to the target volume according to the target volume corresponding to the first type of operation instruction and the preset correspondence, or before determining the target gain value corresponding to the first setting value according to the first setting value and the preset correspondence, the method further includes:

[0034] Select m volumes from multiple volumes as binding point volumes;

[0035] Calculate the audio gain value corresponding to the volume of each binding point according to the mathematical relationship between the audio gain value and the volume;

[0036] The m binding point volumes and the gain value of the audio corresponding to each of the binding point volumes constitute the preset corresponding relationship; m is an integer greater than or equal to 2.

[0037] Optionally, determining a target gain value corresponding to the target volume according to the target volume corresponding to the first type of operation instruction and a preset corresponding relationship includes:

[0038] When the target volume corresponding to the first type of operation instruction is equal to one of the m binding point volumes, the gain value corresponding to the binding point volume is used as the target gain value;

[0039] When the target volume corresponding to the first type of operation instruction is not equal to any one of the m binding point volumes, determining the target gain value by interpolation;

[0040] Alternatively, according to the first setting value and the preset corresponding relationship, determining the target gain value corresponding to the first setting value includes:

[0041] When the first setting value is equal to one of the m binding point volumes, the gain value corresponding to the binding point volume is used as the target gain value;

[0042] When the first setting value is not equal to any one of the m binding point volumes, the target gain value is determined by interpolation.

[0043] Optionally, before adjusting the current volume of the input audio to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio according to the first type of operation instruction, or before adjusting the current volume of the input audio to the first set value by gradually adjusting the gain value of the input audio according to the audio switching instruction, the method further includes:

[0044] The audio sampling rate of the original audio is converted to a preset audio sampling rate to obtain the input audio.

[0045] Optionally, after completing the audio switching by gradually adjusting the gain value of the input audio according to the audio switching instruction to adjust the current volume of the input audio to a first set value, the method further includes:

[0046] The volume of the switched audio is adjusted from the first setting value to a second setting value by gradually adjusting the gain value of the switched audio, and the second setting value is greater than the first setting value.

[0047] According to another aspect of the present invention, there is provided a control device for an audio device, comprising:

[0048] A first adjustment module, configured to adjust the current volume of the input audio to a target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio according to a first type of operation instruction; the first type of operation instruction includes at least one of an audio on instruction, an audio off instruction, and a volume adjustment instruction;

[0049] or,

[0050] The second adjustment module is used to complete the audio switching by gradually adjusting the gain value of the input audio according to the audio switching instruction to adjust the current volume of the input audio to a first set value; the first set value is zero.

[0051] The technical solution of the embodiment of the present invention, for any of the operations of turning on the audio, turning off the audio, and adjusting the volume, is to gradually adjust the audio gain value to adjust the audio from the current volume to the target volume corresponding to the operation instruction, and the volume corresponds to the PCM value one-to-one, and the gradual change of the volume ensures that the PCM value changes smoothly, and no sudden changes in the PCM value occur, thereby suppressing the generation of noise. For the audio switching instruction, the audio is adjusted from the current volume to mute by gradually adjusting the audio gain value, and then the audio switching is completed. When the volume is zero, the PCM value is close to 0, and no sudden changes in the PCM value occur. The gradual change of the volume is achieved by gradually adjusting the audio gain value, and then the smooth change of the audio PCM value is achieved, avoiding sudden changes in the PCM value, and suppressing the generation of noise.

[0052] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 A flowchart of a method for controlling an audio device provided by an embodiment of the present invention;

[0055] Figure 2 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention;

[0056] Figure 3 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention;

[0057] Figure 4 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention;

[0058] Figure 5 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention;

[0059] Figure 6 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0061] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0062] Figure 1 This is a flow chart of a control method for an audio device provided by an embodiment of the present invention. This embodiment can be applied to prevent noise from being generated during the operation of audio and video equipment. The method can be executed by a control device of the audio device, and the control device of the audio device can be implemented in the form of hardware and / or software. The control methods of various audio devices described in this embodiment can be implemented by a field programmable gate array (FPGA) chip.

[0063] like Figure 1 As shown, the method includes:

[0064] S110: According to the first type of operation instruction, the current volume of the input audio is adjusted to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio. The first type of operation instruction includes at least one of an audio on instruction, an audio off instruction, and a volume adjustment instruction.

[0065] The audio opening instruction is an instruction to control the audio device to turn on and play the audio, the audio closing instruction is an instruction to control the audio device to turn off, and the volume adjustment instruction is an instruction to control the audio device to adjust the current volume to the volume required by the user. The user sends the required first type of operation instruction according to the demand. After the FPGA chip receives the first type of operation instruction, if it responds to the operation immediately, it is likely to cause a sudden change in the PCM value of the audio, introducing harsh noise. In this embodiment, a request-response method is adopted. After receiving the first type of operation instruction, according to the first type of operation instruction, the current volume of the input audio is gradually adjusted to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio, that is, the method of adjusting the gain value of the audio by fading in and out, after a long period of stress testing, effectively solves the problem of noise introduced when the user operates the audio and video equipment, and improves the user experience. The current volume of the audio is the volume of the audio at the moment when the first type of operation instruction is received.

[0066] Among them, the gain value of the audio corresponds to the volume of the audio. The volume can be adjusted by adjusting the gain value of the audio. The volume of the audio also corresponds to the PCM value of the audio. Since the audio has positive and negative signs and is represented by binary complement, the change of the PCM value of the audio produces sound. The change amplitude of the PCM value of adjacent audio is always changing, and the maximum change amplitude of the PCM value of different audio is different. How to judge that the PCM value of the audio will mutate will be very difficult without very professional audio theoretical knowledge. This embodiment adopts a method of fading out to adjust the gain value of the audio, combined with the response mode of request and response, to accurately judge the moment when any user operation of the audio and video equipment will cause the PCM value of the audio to mutate, and make effective countermeasures, that is, the function of adjusting the volume of the audio device can be realized, while suppressing the sudden change of the audio PCM value, preventing the introduction of noise, and improving the user's auditory experience.

[0067] Optionally, S110 specifically includes:

[0068] According to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume is determined; and the current gain value corresponding to the current volume of the input audio is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the target volume. The preset corresponding relationship includes multiple volumes and a gain value corresponding to each of the multiple volumes.

[0069] The preset correspondence may include a preset correspondence table, and the preset correspondence table may include multiple data groups, each data group includes a volume and a gain value corresponding to the volume, wherein the volume in different data groups is different. The preset correspondence is stored in advance in the FPGA chip. After receiving the first type of operation instruction, the target volume corresponding to the first type of operation instruction can be determined. After the target volume is determined, the gain value corresponding to the target volume can be determined by looking up a table or interpolating, wherein the target gain value is the gain value corresponding to the target volume. The gain value corresponding to the current volume of the input audio is the current gain value, which is also determined by looking up a table or interpolating. After receiving the first type of operation instruction, the current gain value corresponding to the current volume of the input audio is gradually adjusted to the target gain value, so as to gradually adjust the current volume of the input audio to the target volume, so as to achieve a smooth change in volume, that is, to ensure a smooth change in the PCM value and effectively suppress noise.

[0070] Optionally, before determining the target gain value corresponding to the target volume according to the target volume corresponding to the first type operation instruction and the preset corresponding relationship, the method further includes:

[0071] m volumes are selected from multiple volumes as binding point volumes; the gain value of the audio corresponding to each binding point volume is calculated according to the mathematical relationship between the gain value of the audio and the volume; the m binding point volumes and the gain value of the audio corresponding to each binding point volume constitute a preset corresponding relationship; m is an integer greater than or equal to 2.

[0072] For example, a volume is selected at every 1db interval from 0 to 100db as the binding point volume, that is, 0db, 1db, 2db, 3db, 4db, ..., 100db as the binding point volume. The mathematical relationship between the audio gain value and the volume satisfies: A = 10 (B-J) / 20, where A is the gain value corresponding to the current volume J, and B is the maximum volume. According to the above data relationship, the gain value corresponding to each binding point volume is calculated, and then the m binding point volumes and the gain value of the audio corresponding to each binding point volume constitute a preset corresponding relationship. The preset corresponding relationship is saved as an initialization file of the ROM, and the gain value of the audio corresponding to the target volume is read by a lookup table method or an interpolation method. Specifically, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, determining the target gain value corresponding to the target volume includes: when the target volume corresponding to the first type of operation instruction is equal to one of the m binding point volumes, the gain value corresponding to the binding point volume is used as the target gain value; when the target volume corresponding to the first type of operation instruction is not equal to any one of the m binding point volumes, the target gain value is determined by interpolation. Exemplarily, when the target volume is 4db, the target volume is equal to one of the binding point volumes, and the gain value corresponding to the binding point volume, i.e., 4db, is used as the target gain value. If the target volume is 4.5db, the data groups belonging to the two binding point volumes adjacent to the target volume, namely, the binding point volume 4db and its corresponding gain value, and the binding point volume 5db and its corresponding gain value are selected, and the target gain value corresponding to the target volume 4.5db is determined by interpolation.

[0073] Figure 2 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention, referring to Figure 2 , the method comprising:

[0074] S111: According to the audio switching instruction, the current volume of the input audio is adjusted to a first set value by gradually adjusting the gain value of the input audio; the first set value is zero.

[0075] S121: Control the audio device to switch the audio.

[0076] The audio switching instruction is an instruction for controlling the audio device to switch from one audio to another. Optionally, in addition to the information of switching to the target audio, the audio switching instruction also includes the volume of the audio after switching, that is, the target volume. If the audio switching is performed immediately after receiving the audio switching instruction, it is likely to cause the PCM value to suddenly change and introduce noise. In this embodiment, when the audio switching instruction is received, the audio switching will not be responded to immediately, but the gain value corresponding to the current volume of the audio device will be gradually adjusted to the gain value corresponding to the volume when the volume is zero, so as to achieve a smooth change in the volume of the audio. When the current audio volume is silent, the PCM value of the audio is close to zero. At this time, the request of the audio switching instruction is responded to, and the current audio is switched to the target audio to complete the audio switching. Before responding to the audio switching instruction, the audio volume is gradually adjusted to silent before switching the audio, and the PCM value of the audio is zero when silent. Even if there is external interference, the value after the external interference is multiplied by the PCM value is still close to zero, and the PCM value will not suddenly change, effectively suppressing the generation of noise.

[0077] Optionally, S111 specifically includes:

[0078] According to the first setting value and the preset corresponding relationship, a target gain value corresponding to the first setting value is determined; and the current gain value corresponding to the current volume of the input audio is gradually adjusted to the target gain value to adjust the current volume of the input audio to the first setting value.

[0079] The first set value is zero, and the gain value corresponding to the volume being zero is determined by table lookup or interpolation. The gain value corresponding to the current volume of the input audio is the current gain value, which is also determined by table lookup or interpolation. After receiving the audio switching instruction, the current gain value corresponding to the current volume of the input audio is gradually adjusted to the gain value corresponding to the volume being zero, so as to gradually adjust the current volume of the input audio to zero before switching the audio. When the audio volume is zero, the audio device is muted, the PCM value is still close to 0, and no PCM value mutation occurs, effectively suppressing noise.

[0080] S131: adjusting the volume of the switched audio from a first set value to a second set value by gradually adjusting the gain value of the switched audio, where the second set value is greater than the first set value.

[0081] When it is determined that the user operation is a request to switch audio, the audio switch will not be responded to immediately, but the volume will be gradually adjusted to mute according to the gain value of the currently playing audio set by the user, and the audio PCM value is close to 0. At this time, the request is responded to, the audio is switched, and the previously cached audio is cleared. After the audio is switched, the audio is still silent at this moment, and the PCM value is still close to 0, and there will be no PCM value mutation. Then the audio gain value is gradually increased to the volume set by the user, that is, the second set value, to achieve fade-in and fade-out adjustment of the volume switching audio, effectively suppressing noise.

[0082] Optionally, before determining the target gain value corresponding to the first setting value according to the first setting value and the preset corresponding relationship, the method further includes:

[0083] m volumes are selected from multiple volumes as binding point volumes; the gain value of the audio corresponding to each binding point volume is calculated according to the mathematical relationship between the gain value of the audio and the volume; the m binding point volumes and the gain value of the audio corresponding to each binding point volume constitute a preset corresponding relationship; m is an integer greater than or equal to 2. The specific process is the same as the above record and will not be repeated here.

[0084] Optionally, determining the target gain value corresponding to the first setting value according to the first setting value and the preset corresponding relationship includes: when the first setting value is equal to one of the m binding point volumes, taking the gain value corresponding to the binding point volume as the target gain value; when the first setting value is not equal to any one of the m binding point volumes, determining the target gain value by interpolation.

[0085] The technical solution of the embodiment of the present invention, for any of the operations of turning on the audio, turning off the audio, and adjusting the volume, is to gradually adjust the audio gain value to adjust the audio from the current volume to the target volume corresponding to the operation instruction, and the volume corresponds to the PCM value one-to-one, and the gradual change of the volume ensures that the PCM value changes smoothly, and no sudden changes in the PCM value occur, thereby suppressing the generation of noise. For the audio switching instruction, the audio is adjusted from the current volume to mute by gradually adjusting the audio gain value, and then the audio switching is completed. When the volume is zero, the PCM value is close to 0, and no sudden changes in the PCM value occur. The gradual change of the volume is achieved by gradually adjusting the audio gain value, and then the smooth change of the audio PCM value is achieved, avoiding sudden changes in the PCM value, and suppressing the generation of noise.

[0086] Optionally, the method for controlling the audio device further includes:

[0087] According to the relationship between the gain value of the audio, the value after the audio is decoded and the pulse code modulation value of the audio, the pulse code modulation value of the audio after executing the corresponding instruction is determined.

[0088] Optionally, the relationship between the audio gain value, the audio decoded value, and the audio pulse code modulation value satisfies the following formula:

[0089] A=20*log(audio_in / audio_out), where A is the audio gain value, audio_in is the value after input audio decoding, and audio_out is the impulse code modulation value of the audio. The impulse code modulation value of the audio can be calculated according to the above formula.

[0090] The FPGA chip only needs a multiplier to perform multiplication operations. The PCM value has a signed bit, but the audio gain value has no signed bit. When a signed number is multiplied by an unsigned number, the sign bit remains unchanged. The algorithm is simple, and there is no need to consider setting the appropriate PCM value change amplitude and judging the sign bit of the operation result in the existing interpolation operation.

[0091] Figure 3 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention, referring to Figure 3 The first type of operation instruction includes an instruction to adjust the volume. Optionally, the method includes:

[0092] S112: Determine a target gain value corresponding to the target volume according to the target volume corresponding to the volume adjustment instruction and a preset corresponding relationship.

[0093] The volume adjustment command includes the volume to which the input audio needs to be adjusted, that is, after receiving the volume adjustment command, the volume of the input audio needs to be adjusted to the target volume corresponding to the command. The target gain value corresponding to the target volume corresponding to the volume adjustment command is determined by table lookup or interpolation.

[0094] S122: Determine a gain value adjustment direction according to a target gain value corresponding to the volume adjustment instruction and a current gain value corresponding to the current volume of the input audio.

[0095] The current gain value corresponding to the current volume of the input audio is determined by table lookup or interpolation. If the target gain value is greater than the current gain value, the gain value is adjusted in an increasing direction. If the target gain value is less than the current gain value, the gain value is adjusted in a decreasing direction.

[0096] S132: According to the gain value adjustment direction, the current gain value is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the target volume corresponding to the volume adjustment instruction.

[0097] When it is determined that the user operation is a volume adjustment request, the request will not be responded to immediately. Instead, the target gain value corresponding to the new volume set by the user, that is, the target volume, is compared with the gain value of the currently playing audio to determine whether to reduce or increase the volume, and then the audio gain value is gradually adjusted to the target volume. At this time, the response completes the request, the change of the audio PCM value is smooth, and no PCM value mutation occurs, thereby suppressing noise generation.

[0098] Figure 4 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention, referring to Figure 4 The first type of operation instruction includes an audio opening instruction. Optionally, the method includes:

[0099] S113: Using the volume cached when the audio device was last turned off as the target volume corresponding to the audio turn-on instruction.

[0100] In this embodiment, the volume cached in the buffer when the audio device was last turned off is used as the target volume, or in other embodiments, the audio turning on instruction may include both information on turning on the audio device and information on adjusting the audio device to the target volume after turning on, that is, the volume of the audio played by the audio device after turning on the audio device can be set according to user needs.

[0101] S123: Determine a target gain value corresponding to the target volume corresponding to the audio-turning instruction according to the target volume corresponding to the audio-turning instruction and a preset corresponding relationship.

[0102] The target gain value corresponding to the target volume corresponding to the audio-on instruction is determined by table lookup or interpolation.

[0103] S133: gradually adjusting the gain value corresponding to the first setting value to the target gain value, so as to adjust the current volume of the input audio to the target volume.

[0104] Before receiving the audio-on instruction, the current volume of the audio device is a first setting value, that is, zero, and the gain value corresponding to the volume of zero is determined by looking up a table or interpolating. The gain value corresponding to the volume of zero is gradually adjusted to the target gain value to complete the audio device turning on operation.

[0105] When it is determined that the user operation is a request to turn on the audio, the request will not be responded to immediately, but the audio gain value will be gradually increased to the volume set by the user. At this time, the request is completed, the change of the audio PCM value is smooth, and no PCM value mutation occurs, thereby suppressing noise generation.

[0106] Figure 5 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention, referring to Figure 5, the first type of operation instruction includes an audio shut down instruction, optionally, the method includes:

[0107] S114: Using the first setting value as the target volume corresponding to the audio-off instruction.

[0108] The audio off instruction is an instruction for controlling the audio device to be turned off, and the target volume corresponding to the audio off instruction is the first set value, that is, zero.

[0109] S124: Determine a target gain value corresponding to the target volume according to the target volume and the preset corresponding relationship.

[0110] The gain value corresponding to zero volume is determined by table lookup or interpolation, and is used as the target gain value.

[0111] S134: gradually adjusting the current gain value corresponding to the current volume of the input audio to the target gain value, so as to adjust the current volume of the input audio to the first set value.

[0112] When receiving the audio off command, the volume of the input audio played by the audio device is used as the current volume. The gain value corresponding to the current volume is determined by table lookup or interpolation, that is, the current gain value. The current gain value is gradually adjusted to the target gain value to gradually adjust the volume of the input audio to zero, completing the audio off operation.

[0113] When it is determined that the user operation is a request to turn off the audio, the request will not be responded to immediately. Instead, the volume is gradually adjusted to mute according to the gain value of the currently playing audio set by the user. At this time, the response completes the request, the change of the PCM value of the audio is smooth, and no PCM value mutation occurs, thereby suppressing noise generation.

[0114] Optionally, before adjusting the current volume of the input audio to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio according to the first type of operation instruction, or before adjusting the current volume of the input audio to the first set value by gradually adjusting the gain value of the input audio according to the audio switching instruction, the method further includes:

[0115] The audio sampling rate of the original audio is converted to a preset audio sampling rate to obtain the input audio.

[0116] Different audio sources output different frequencies of initial audio, and some initial audio may have an audio sampling rate of 32Khz, 44.1Khz, or 96Khz. Different audio sampling rates require matching clocks to transmit data. To support audio with different audio sampling rates, the prior art needs to generate master clocks with different audio sampling rates, which is bound to increase costs. In this embodiment, the audio sampling rate of the initial audio is converted to a preset audio sampling rate such as 48Khz, and all audio is uniformly converted to 48Khz audio. The corresponding audio master sampling clock frequency is fixed, which saves costs and simplifies the FPGA clock network.

[0117] Figure 6 A flowchart of another method for controlling an audio device provided by an embodiment of the present invention, referring to Figure 6 , optionally, the method includes:

[0118] S115: Decode the initial audio.

[0119] Before S115, the method further includes selecting one of the multiple initial audios to be input, decoding the input initial audio, and the decoding supports IIS and SPDIF formats, and the audio sampling rate of the input audio is not limited.

[0120] S125: Convert the initial audio to an audio sampling rate to obtain input audio.

[0121] S135: Buffer the input audio.

[0122] S145: Determine the user operation and determine that the request sent by the user is an audio switching instruction.

[0123] S155: responding to the request to switch the audio, adjusting the gain value of the audio by fading in and out, and completing the audio switching.

[0124] S165: Determine the user operation and determine whether the request sent by the user is to turn on the audio, turn off the audio, or adjust the volume.

[0125] S175: In response to one of the request to turn on the audio, the request to turn off the audio, or the request to adjust the volume, fade in and fade out the gain value of the audio to complete the switching of the audio.

[0126] S185: According to the preset corresponding relationship, determine the audio gain value corresponding to the target volume after the response request by table lookup or interpolation, and calculate the new PCM value after the response request according to the relationship between the audio gain value and the PCM value.

[0127] S195: Encode the input audio and output it. The audio encoding supports IIS and SPDIF formats, and the output audio sampling rate is 48Khz.

[0128] The embodiment of the present invention further provides a control device for an audio device, which is integrated in an FPGA chip. The control device for the audio device includes:

[0129] A first adjustment module, configured to adjust the current volume of the input audio to a target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio according to the first type of operation instruction; the first type of operation instruction includes at least one of an audio on instruction, an audio off instruction, and a volume adjustment instruction;

[0130] or,

[0131] The second adjustment module is used to complete the audio switching by gradually adjusting the gain value of the input audio according to the audio switching instruction to adjust the current volume of the input audio to a first set value; the first set value is zero.

[0132] The beneficial effects of the control device of the audio device are the same as the beneficial effects of the control method of the audio device, which will not be repeated here.

[0133] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0134] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for controlling an audio device, characterized in that: include: According to the first type of operation instruction, the current volume of the input audio is adjusted to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio; the first type of operation instruction includes at least one of an audio turn-on instruction, an audio turn-off instruction, and a volume adjustment instruction; or, According to the audio switching instruction, the current volume of the input audio is adjusted to a first set value by gradually adjusting the gain value of the input audio; Control the audio device to switch the audio; the first setting value is zero.

2. The method for controlling an audio device according to claim 1, characterized in that: According to the first type of operation instruction, adjusting the current volume of the input audio to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio includes: Determine a target gain value corresponding to the target volume according to the target volume corresponding to the first type of operation instruction and a preset corresponding relationship; the preset corresponding relationship includes a plurality of volumes and a gain value corresponding to each of the plurality of volumes; Stepwise adjusting a current gain value corresponding to a current volume of the input audio to the target gain value, so as to adjust the current volume of the input audio to the target volume; According to the audio switching instruction, adjusting the current volume of the input audio to a first set value by gradually adjusting the gain value of the input audio includes: Determining a target gain value corresponding to the first setting value according to the first setting value and the preset corresponding relationship; The current gain value corresponding to the current volume of the input audio is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the first set value.

3. The method for controlling an audio device according to claim 2, characterized in that: The first type of operation instruction includes the volume adjustment instruction; The determining, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume comprises: Determining a target gain value corresponding to the target volume according to the target volume corresponding to the volume adjustment instruction and the preset corresponding relationship; The step of gradually adjusting the current gain value corresponding to the current volume of the input audio to the target gain value so as to adjust the current volume of the input audio to the target volume includes: Determining a gain value adjustment direction according to the target gain value corresponding to the volume adjustment instruction and the current gain value corresponding to the current volume of the input audio; According to the gain value adjustment direction, the current gain value is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the target volume.

4. The method for controlling an audio device according to claim 2, characterized in that: The first type of operation instruction includes an audio opening instruction; The determining, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume comprises: Using the volume cached when the audio device was last turned off as the target volume corresponding to the audio turn-on instruction; Determining a target gain value corresponding to the target volume according to the target volume and the preset corresponding relationship; The step of gradually adjusting the current gain value corresponding to the current volume of the input audio to the target gain value so as to adjust the current volume of the input audio to the target volume includes: The gain value corresponding to the first setting value is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the target volume.

5. The method for controlling an audio device according to claim 2, characterized in that: The first type of operation instruction includes an audio shut down instruction; The determining, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume comprises: Using the first setting value as the target volume corresponding to the audio shut-off instruction; Determining a target gain value corresponding to the target volume according to the target volume and the preset corresponding relationship; The step of gradually adjusting a current gain value corresponding to a current volume of the input audio to the target gain value so as to adjust the current volume of the input audio to the target volume includes: The current gain value corresponding to the current volume of the input audio is gradually adjusted to the target gain value, so as to adjust the current volume of the input audio to the first set value.

6. The method for controlling an audio device according to any one of claims 2 to 5, characterized in that: Before determining the target gain value corresponding to the target volume according to the target volume corresponding to the first type of operation instruction and the preset correspondence, or before determining the target gain value corresponding to the first setting value according to the first setting value and the preset correspondence, the method further includes: Select m volumes from multiple volumes as binding point volumes; Calculate the audio gain value corresponding to the volume of each binding point according to the mathematical relationship between the audio gain value and the volume; The m binding point volumes and the gain value of the audio corresponding to each binding point volume constitute the preset corresponding relationship; m is an integer greater than or equal to 2.

7. The method for controlling an audio device according to claim 6, characterized in that: The determining, according to the target volume corresponding to the first type of operation instruction and the preset corresponding relationship, a target gain value corresponding to the target volume comprises: When the target volume corresponding to the first type of operation instruction is equal to one of the m binding point volumes, the gain value corresponding to the binding point volume is used as the target gain value; When the target volume corresponding to the first type of operation instruction is not equal to any one of the m binding point volumes, determining the target gain value by interpolation; Alternatively, according to the first setting value and the preset corresponding relationship, determining the target gain value corresponding to the first setting value includes: When the first setting value is equal to one of the m binding point volumes, the gain value corresponding to the binding point volume is used as the target gain value; When the first setting value is not equal to any one of the m binding point volumes, the target gain value is determined by interpolation.

8. The method for controlling an audio device according to any one of claims 2 to 5, characterized in that: Before adjusting the current volume of the input audio to the target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio according to the first type of operation instruction, or before adjusting the current volume of the input audio to the first set value by gradually adjusting the gain value of the input audio according to the audio switching instruction, the method further includes: The audio sampling rate of the original audio is converted to a preset audio sampling rate to obtain the input audio.

9. The method for controlling an audio device according to claim 1, characterized in that: After the audio switching is completed by gradually adjusting the gain value of the input audio according to the audio switching instruction to adjust the current volume of the input audio to the first set value, the method further includes: The volume of the switched audio is adjusted from the first setting value to a second setting value by gradually adjusting the gain value of the switched audio, and the second setting value is greater than the first setting value.

10. A control device for an audio device, characterized in that: include: A first adjustment module, configured to adjust the current volume of the input audio to a target volume corresponding to the first type of operation instruction by gradually adjusting the gain value of the input audio according to a first type of operation instruction; the first type of operation instruction includes at least one of an audio on instruction, an audio off instruction, and a volume adjustment instruction; or, The second adjustment module is used to complete the audio switching by gradually adjusting the gain value of the input audio according to the audio switching instruction to adjust the current volume of the input audio to a first set value; the first set value is zero.