Frequency band adjustment method, device, storage medium and apparatus

By adjusting the scale value label at the kernel level and using a single interface to obtain the target frequency band and scale value, the high CPU consumption problem caused by multi-interface adjustment is solved, and efficient frequency band adjustment is achieved.

CN115657994BActive Publication Date: 2026-05-08武汉凡鱼科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
武汉凡鱼科技有限公司
Filing Date
2022-09-21
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

When passing parameters through multiple interfaces, the frequency band adjustment of the custom equalizer leads to excessive CPU performance consumption.

Method used

By transmitting the scale value label from the application layer to the kernel layer, the target frequency band label and scale value label can be adjusted using a single interface to obtain the frequency band value and scale value for frequency band adjustment, thus reducing the number of interfaces.

Benefits of technology

It effectively reduces CPU performance consumption and improves the efficiency and accuracy of frequency band adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115657994B_ABST
    Figure CN115657994B_ABST
Patent Text Reader

Abstract

The application discloses a frequency band adjusting method and device, a storage medium and an apparatus, and the method comprises the following steps: adjusting a scale value label to obtain a target frequency band label and a target scale value label, obtaining a frequency band value from a frequency band array according to the target frequency band label, determining a to-be-adjusted frequency band according to the frequency band value, obtaining a scale value from a scale bar array according to the target scale value label, and adjusting the to-be-adjusted frequency band according to the scale value. The application transmits the scale value label from an application layer to a kernel layer through an interface, adjusts the scale value label in the kernel layer to obtain the target frequency band label and the target scale value label, obtains the frequency band value according to the target frequency band label to determine the to-be-adjusted frequency band, obtains the scale value according to the target scale value label to adjust the to-be-adjusted frequency band, and transmits a single parameter through the interface to realize the adjustment of the frequency band of the self-defined equalizer, so that the consumption of CPU performance is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a frequency band adjustment method, device, storage medium and apparatus. Background Technology

[0002] With the development of technology, in-vehicle multimedia entertainment control systems are becoming increasingly intelligent, and most of them support custom equalizer functions in terms of audio. In order to compensate for the deficiencies in the sound frequency of the speakers, car audio systems usually provide equalizers (EQ) for users to adjust. Common equalizers include 5-band, 7-band, 10-band, 13-band, 15-band, and even higher band types.

[0003] Typically, Android audio settings use AudioManager's `setParameters` method to set parameters from the application to the HAL layer. The HAL layer then uses the `sndkcontrol` interface to transmit parameters to the kernel layer. This is the method used to set parameters for custom equalizers. For custom equalizer control, each frequency band slider usually corresponds to one interface control. To ensure the accuracy of the tick marks on all frequency bands relative to the current custom equalizer configuration, when a frequency band slider changes, the tick marks on that band need to be adjusted and parameters set according to the interfaces of other frequency bands. However, when adjusting too many frequency bands, each band requires its corresponding interface to adjust the tick marks, leading to excessive CPU consumption.

[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this invention is to provide a frequency band adjustment method, device, storage medium, and apparatus, aiming to solve the technical problem of excessive CPU consumption caused by transmitting parameters through multiple interfaces.

[0006] To achieve the above objectives, the present invention provides a frequency band adjustment method, the frequency band adjustment method comprising the following steps:

[0007] Adjust the scale value labels to obtain the target frequency band label and the target scale value label;

[0008] The frequency band value is obtained from the frequency band array according to the target frequency band number, and the frequency band to be adjusted is determined according to the frequency band value;

[0009] The scale value is obtained from the scale bar array according to the target scale value label, and the frequency band to be adjusted is adjusted according to the scale value.

[0010] Optionally, the step of adjusting the scale value labels to obtain the target frequency band label and the target scale value label includes:

[0011] The scale value label on the frequency band is obtained according to the adjusted frequency band;

[0012] The target frequency band number and the target scale value number are obtained based on the total number of scale points and the scale value number.

[0013] Optionally, the step of obtaining the target frequency band label and the target scale value label based on the total number of scale points and the scale value label includes:

[0014] Obtain the total number of frequency bands, and determine the adjustable total range based on the total number of frequency bands and the total number of scale points;

[0015] When the scale value label is within the range of the adjustable total number, the target frequency band label and the target scale value label are obtained based on the total number of scale points and the scale value label.

[0016] Optionally, the step of obtaining the target frequency band number and the target scale value number based on the total number of scale points and the scale value number further includes:

[0017] The target frequency band number is obtained by rounding down the total number of scale points according to the scale value labels.

[0018] The target scale value is obtained by taking the remainder of the total number of scale points based on the scale value number.

[0019] Optionally, the step of obtaining a frequency band value from the frequency band array based on the target frequency band number and determining the frequency band to be adjusted based on the frequency band value includes:

[0020] Generate a frequency band array based on the total number of frequency bands;

[0021] The frequency band value is obtained from the frequency band array according to the target frequency band number, and the frequency band to be adjusted is determined according to the frequency band value.

[0022] Optionally, the step of obtaining a scale value from the scale bar array according to the target scale value label, and adjusting the frequency band to be adjusted according to the scale value, includes:

[0023] Generate a scale bar array based on the total number of scale points;

[0024] The scale value is obtained from the scale bar array according to the target scale value label, and the frequency band to be adjusted is adjusted according to the scale value.

[0025] Optionally, before the step of adjusting the scale value labels to obtain the target frequency band label and the target scale value label, the following steps are included:

[0026] Upon receiving adjustment instructions from the equalizer interface, the target function is called according to the audio control class to set parameters and obtain the scale value label;

[0027] The scale value label is transmitted from the HAL layer to the kernel layer via the target node.

[0028] Furthermore, to achieve the above objectives, the present invention also proposes a frequency band adjustment device, the frequency band adjustment device including a memory, a processor, and a frequency band adjustment program stored in the memory and capable of running on the processor, the frequency band adjustment program being configured to implement the frequency band adjustment method as described above.

[0029] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a frequency band adjustment program, which, when executed by a processor, implements the frequency band adjustment method as described above.

[0030] In addition, to achieve the above objectives, the present invention also proposes a frequency band adjustment device, which includes: a data acquisition module, a frequency band determination module, and a frequency band adjustment module;

[0031] The data acquisition module is used to adjust the scale value labels to obtain the target frequency band label and the target scale value label;

[0032] The frequency band determination module is used to obtain frequency band values ​​from the frequency band array according to the target frequency band number, and determine the frequency band to be adjusted according to the frequency band values;

[0033] The frequency band adjustment module is used to obtain the scale value from the scale bar array according to the target scale value label, and adjust the frequency band to be adjusted according to the scale value.

[0034] This invention discloses a frequency band adjustment method, device, storage medium, and apparatus. The method includes: adjusting a scale value label to obtain a target frequency band label and a target scale value label; obtaining a frequency band value from a frequency band array based on the target frequency band label; determining the frequency band to be adjusted based on the frequency band value; obtaining a scale value from a scale bar array based on the target scale value label; and adjusting the frequency band to be adjusted based on the scale value. This invention transmits the scale value label from the application layer to the kernel layer through an interface. At the kernel layer, the scale value label is adjusted to obtain the target frequency band label and the target scale value label. Then, the frequency band to be adjusted is determined based on the target frequency band label, and the scale value is obtained based on the target scale value label to adjust the frequency band to be adjusted. By transmitting a single parameter through an interface, the frequency band of a custom equalizer can be adjusted, thereby reducing CPU performance consumption. Attached Figure Description

[0035] Figure 1This is a schematic diagram of the structure of the frequency band adjustment device in the hardware operating environment involved in the embodiments of the present invention;

[0036] Figure 2 This is a flowchart illustrating the first embodiment of the frequency band adjustment method of the present invention;

[0037] Figure 3 This is a flowchart illustrating the second embodiment of the frequency band adjustment method of the present invention;

[0038] Figure 4 This is a flowchart illustrating the third embodiment of the frequency band adjustment method of the present invention;

[0039] Figure 5 This is a structural block diagram of the first embodiment of the frequency band adjustment device of the present invention.

[0040] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0041] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0042] Reference Figure 1 , Figure 1 This is a schematic diagram of the frequency band adjustment device structure of the hardware operating environment involved in the embodiments of the present invention.

[0043] like Figure 1 As shown, the frequency band adjustment device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, and optionally, it may also include a standard wired interface or a wireless interface. In this invention, the wired interface of the user interface 1003 may be a USB interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0044] Those skilled in the art will understand that Figure 1The structure shown does not constitute a limitation on the frequency band adjustment device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0045] like Figure 1 As shown, the memory 1005, which is identified as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a frequency band adjustment program.

[0046] exist Figure 1 In the frequency band adjustment device shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the user equipment; the frequency band adjustment device calls the frequency band adjustment program stored in the memory 1005 through the processor 1001 and executes the frequency band adjustment method provided in the embodiment of the present invention.

[0047] Based on the above hardware structure, an embodiment of the frequency band adjustment method of the present invention is proposed.

[0048] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the frequency band adjustment method of the present invention, which presents the first embodiment of the frequency band adjustment method of the present invention.

[0049] Step S10: Adjust the scale value labels to obtain the target frequency band label and the target scale value label.

[0050] It should be noted that the execution subject of this embodiment may be a computer software device with data processing, network communication and program running functions, such as a frequency band adjustment device, or other electronic devices that can achieve the same or similar functions. This embodiment does not limit this.

[0051] It should be understood that a custom equalizer typically has one frequency band slider corresponding to one interface control. To ensure the accuracy of the dwell points of all frequency band scale bars with the current custom equalizer configuration, when one frequency band slider is changed, the scale values ​​on all frequency bands need to be reconfirmed and the parameter configuration needs to be set. That is, when the parameters of one frequency band are adjusted through the interface, the corresponding frequency band parameters of other interfaces also need to be adjusted. Passing parameters through multiple interfaces leads to excessive CPU performance consumption.

[0052] To overcome the above-mentioned defects, this embodiment transmits the scale value label from the application layer to the kernel layer through a single interface. The scale value label is adjusted in the kernel layer to obtain the target frequency band label and the target scale value label. The frequency band value is obtained from the frequency band array according to the target frequency band label, and the frequency band to be adjusted is determined according to the frequency band value. The scale value is obtained from the scale bar array according to the target scale value label, and the frequency band to be adjusted is adjusted according to the scale value.

[0053] It should be noted that the frequency band that needs to be adjusted can be determined by the target frequency band number. There is no need to use the corresponding interface to adjust the frequency band. That is, a single interface can be used to determine the frequency band that needs to be adjusted each time. Then, the scale value can be obtained based on the target scale value to adjust the frequency band, instead of adjusting the frequency band through the interface of the frequency band that needs to be adjusted each time.

[0054] It should be noted that when a user adjusts any frequency band, the value corresponding to the adjusted frequency band is transmitted from the application layer to the kernel layer, where the value is processed. Here, the value is a scale label.

[0055] Understandably, a custom equalizer has a UI interface where users adjust the frequency band sliders, and the Android system makes corresponding adjustments based on the data adjusted by the user in the custom equalizer interface.

[0056] It should be noted that each frequency band slider is assigned a number. The number corresponding to the frequency band slider that the user adjusts is the target frequency band number. The scale value on each frequency band slider is also assigned a number. The point on the target frequency band number that the user adjusts is the target scale value number. For example, if the project requires a 10-band custom equalizer, the frequency bands are numbered from 0 to 9, and the scale bar is numbered from +12dB to 0dB and from 0dB to -12dB, corresponding to 0 to 24. When the user adjusts the second frequency band slider, the target frequency band number is 1. When the user slides the scale bar on the frequency band to -12dB, the target scale value number is 24.

[0057] Furthermore, in order to obtain the scale value label, the following steps may be included before step S10 in this embodiment:

[0058] Upon receiving adjustment instructions from the equalizer interface, the target function is called according to the audio control class to set parameters and obtain the scale value label;

[0059] The scale value label is transmitted from the HAL layer to the kernel layer via the target node.

[0060] It is understandable that the audio control class can be AudioManager, the target function can be the setParameters function, and the target node can be the snd_kcontrol node.

[0061] Step S20: Obtain the frequency band value from the frequency band array according to the target frequency band number, and determine the frequency band to be adjusted according to the frequency band value.

[0062] It should be noted that determining the total number of frequency bands on the custom equalizer and initializing the total number of frequency bands yields a frequency band array.

[0063] Furthermore, in order to reduce code redundancy, step S20 of this embodiment may include:

[0064] Generate a frequency band array based on the total number of frequency bands;

[0065] The frequency band value is obtained from the frequency band array according to the target frequency band number, and the frequency band to be adjusted is determined according to the frequency band value.

[0066] It should be noted that the frequency bands in the frequency band array are numbered from 1 to 10 in order, corresponding to the frequency band sliders on the custom equalizer interface. The values ​​in the frequency band array are the frequency band values. For example, if the target frequency band is numbered 0, the corresponding frequency band value in the frequency band array is 1, meaning that the frequency band to be adjusted is the first frequency band on the custom equalizer interface.

[0067] Step S30: Obtain the scale value from the scale bar array according to the target scale value label, and adjust the frequency band to be adjusted according to the scale value.

[0068] It should be noted that the total number of tick marks on the scale bar of each frequency band on the custom equalizer is determined, and the total number of tick marks is initialized to obtain the scale bar array.

[0069] Furthermore, in order to reduce CPU performance consumption, step S30 of this embodiment may include:

[0070] Generate a scale bar array based on the total number of scale points;

[0071] The scale value is obtained from the scale bar array according to the target scale value label, and the frequency band to be adjusted is adjusted according to the scale value.

[0072] It should be noted that the total number of adjustable values ​​on all adjustment scales of the custom equalizer needs to be determined. Based on this total number of adjustable values ​​and the corresponding band register address of the EQ control on the codec chip, the frequency band to be adjusted is then determined. The total number of adjustable values ​​is the product of the total number of frequency bands and the total number of scale points on each band's scale. For example, if the total number of frequency bands is 10 and the total number of scale points on each band's scale is 25, then the total number of adjustable values ​​is 250.

[0073] It should be understood that the target scale value can only be between 0 and 249, and the frequency band to be adjusted cannot be outside this range.

[0074] It should be noted that the scale bar array is arranged sequentially from +12dB to -12dB to correspond to the custom equalizer. For example, if the target scale value is labeled 2, the scale value in the scale bar array is +10dB, then the frequency band to be adjusted will be adjusted to +10dB.

[0075] This embodiment obtains the target frequency band label and the target scale value label. Based on the target frequency band label, it retrieves the frequency band value from the frequency band array and determines the frequency band to be adjusted based on the frequency band value. Based on the target scale value label, it retrieves the scale value from the scale bar array and adjusts the frequency band to be adjusted based on the scale value. This embodiment transmits the scale value label from the application layer to the kernel layer through an interface. At the kernel layer, the scale value label is adjusted to obtain the target frequency band label and the target scale value label. Then, based on the target frequency band label, the frequency band value is obtained to determine the frequency band to be adjusted. Based on the target scale value label, the scale value is obtained to adjust the frequency band to be adjusted. By transmitting a single parameter through an interface, the frequency band of the custom equalizer can be adjusted, thereby reducing CPU performance consumption.

[0076] Reference Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the frequency band adjustment method of the present invention, based on the above. Figure 2 The first embodiment shown presents a second embodiment of the frequency band adjustment method of the present invention.

[0077] In the second embodiment, step S10 includes:

[0078] Step S101: Obtain the scale value label on the frequency band according to the adjusted frequency band.

[0079] It should be noted that when users slide the frequency band scale bar in the custom equalizer interface, the framework layer calls the HAL layer interface via AudioManager and then via audio_hw_device_t->set_parameters(). In the HAL layer, parameters are set via audio_hw->adev_set_parameters(), which sets the scale value labels.

[0080] Understandably, users can adjust multiple frequency bands simultaneously to obtain the scale values ​​for multiple frequency bands.

[0081] Step S102: Obtain the target frequency band label and the target scale value label based on the total number of scale points and the scale value label.

[0082] It should be noted that the target frequency band number can be obtained by rounding down the total number of scale points according to the scale value number, and the target scale value number can be obtained by taking the remainder of the total number of scale points according to the scale value number.

[0083] It is understandable that the total number of scale points represents the total number of scale points on the scale bar for each frequency band.

[0084] In a specific implementation, for example, the scale value is labeled 24, the total number of scale points is 25, the total number of scale points is rounded down to 0, that is, the target frequency band label is 0, and the remainder of the total number of scale points is 21, that is, the target scale value is labeled 24.

[0085] Furthermore, in order to accurately adjust the corresponding frequency band, step S102 of this embodiment may include:

[0086] Obtain the total number of frequency bands, and determine the adjustable total range based on the total number of frequency bands and the total number of scale points;

[0087] When the scale value label is within the range of the adjustable total number, the target frequency band label and the target scale value label are obtained based on the total number of scale points and the scale value label.

[0088] It is understandable that the total number of adjustable frequency bands is the product of the total number of frequency bands and the total number of scale points.

[0089] It should be noted that when a user only adjusts a portion of the frequency bands, the total number of adjustable bands is limited to the range the user wants to adjust. Therefore, the target frequency band label and target scale value label can only be obtained within this range; otherwise, they cannot be obtained.

[0090] This embodiment obtains the scale value label on the frequency band according to the adjusted frequency band, and obtains the target frequency band label and the target scale value label according to the total number of scale points and the scale value label. This embodiment obtains the target frequency band label and the target scale value label through the scale value label, and can adjust multiple frequency bands through the target frequency band label and the target scale value label, thereby eliminating the need for multiple interfaces to adjust multiple frequency bands and reducing code redundancy.

[0091] Reference Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the frequency band adjustment method of the present invention, based on the above. Figure 3 The second embodiment shown presents a third embodiment of the frequency band adjustment method of the present invention.

[0092] In the third embodiment, step S102 includes:

[0093] Step S1021: Round the total number of scale points according to the scale value label to obtain the target frequency band label.

[0094] It is understandable that by rounding down the total number of each pair of scale points once, the target frequency band number can be obtained, and the frequency band to be adjusted can be determined based on the target frequency band number.

[0095] In the specific implementation, the scale value is labeled 35, the total number of scale points is 25, and the total number of scale points is rounded to obtain the target frequency band label as 1, which means that the second frequency band on the custom equalizer needs to be adjusted.

[0096] Step S1022: Obtain the target scale value label by taking the remainder of the total number of scale points according to the scale value label.

[0097] It is understandable that by taking the remainder of the total number of each pair of scale points once, the target scale value label can be obtained, and the frequency band to be adjusted can be adjusted according to the target scale value label.

[0098] In the specific implementation, the scale value is labeled 35, the total number of scale points is 25, and the remainder of the total number of scale points is 25. Therefore, the target scale value is labeled 24, which means that the scale bar of the second frequency band on the custom equalizer needs to be slid to -12dB.

[0099] It should be noted that the target scale value is numbered from 0 to 24, corresponding to +12dB to -12dB. When the remainder value is 25, the target scale value is numbered 24, and -12dB in the frequency band to be adjusted is also numbered 24.

[0100] In this embodiment, the target frequency band label is obtained by rounding down the total number of scale points based on the scale value label, and the target scale value label is obtained by taking the remainder of the total number of scale points based on the scale value label. This embodiment obtains the target frequency band label by rounding down the scale value label and the target scale value label by taking the remainder of the scale value label. Each time the frequency band is adjusted, only the target frequency band label and the target scale value label need to be obtained according to this embodiment. The frequency band to be adjusted is then adjusted according to the target frequency band label and the target scale value label, thereby reducing code redundancy and improving code portability.

[0101] Furthermore, this embodiment of the invention also proposes a storage medium storing a frequency band adjustment program, which, when executed by a processor, implements the frequency band adjustment method as described above.

[0102] In addition, refer to Figure 5 The present invention also proposes a frequency band adjustment device, which includes: a data acquisition module 10, a frequency band determination module 20, and a frequency band adjustment module 30;

[0103] The data acquisition module 10 is used to adjust the scale value label to obtain the target frequency band label and the target scale value label;

[0104] The frequency band determination module 20 is used to obtain frequency band values ​​from the frequency band array according to the target frequency band number, and determine the frequency band to be adjusted according to the frequency band values;

[0105] The frequency band adjustment module 30 is used to obtain a scale value from the scale bar array according to the target scale value label, and adjust the frequency band to be adjusted according to the scale value.

[0106] This embodiment obtains the target frequency band label and the target scale value label. Based on the target frequency band label, it retrieves the frequency band value from the frequency band array and determines the frequency band to be adjusted based on the frequency band value. Based on the target scale value label, it retrieves the scale value from the scale bar array and adjusts the frequency band to be adjusted based on the scale value. This embodiment transmits the scale value label from the application layer to the kernel layer through an interface. At the kernel layer, the scale value label is adjusted to obtain the target frequency band label and the target scale value label. Then, based on the target frequency band label, the frequency band value is obtained to determine the frequency band to be adjusted. Based on the target scale value label, the scale value is obtained to adjust the frequency band to be adjusted. By transmitting a single parameter through an interface, the frequency band of the custom equalizer can be adjusted, thereby reducing CPU performance consumption.

[0107] Based on the first embodiment of the frequency band adjustment device of the present invention, a second embodiment of the frequency band adjustment device of the present invention is proposed.

[0108] In this embodiment, the data acquisition module 10 is used to obtain the scale value label on the frequency band according to the adjusted frequency band.

[0109] Furthermore, the data acquisition module 10 is also used to obtain the target frequency band label and the target scale value label based on the total number of scale points and the scale value label.

[0110] Furthermore, the data acquisition module 10 is also used to acquire the total number of frequency bands and determine the adjustable total range based on the total number of frequency bands and the total number of scale points.

[0111] Furthermore, the data acquisition module 10 is also used to obtain the target frequency band label and the target scale value label based on the total number of scale points and the scale value label when the scale value label is within the range of the adjustable total number.

[0112] Furthermore, the data acquisition module 10 is also used to round the total number of scale points according to the scale value label to obtain the target frequency band label.

[0113] Furthermore, the data acquisition module 10 is also used to obtain the target scale value label by taking the remainder of the total number of scale points based on the scale value label.

[0114] Furthermore, the frequency band determination module 20 is also used to generate a frequency band array based on the total number of frequency bands.

[0115] Furthermore, the frequency band determination module 20 is also used to obtain frequency band values ​​from the frequency band array according to the target frequency band label, and determine the frequency band to be adjusted according to the frequency band values.

[0116] Furthermore, the frequency band adjustment module 30 is also used to generate a scale bar array based on the total number of scale points.

[0117] Furthermore, the frequency band adjustment module 30 is also used to obtain a scale value from the scale bar array according to the target scale value label, and adjust the frequency band to be adjusted according to the scale value.

[0118] Furthermore, before the data acquisition module 10, it is also used to set parameters by calling the target function according to the audio control class to obtain the scale value label when receiving the adjustment command from the equalizer interface.

[0119] Furthermore, before the data acquisition module 10, it is also used to transmit the scale value label from the HAL layer to the kernel layer through the target node.

[0120] Other embodiments or specific implementations of the frequency band adjustment device described in this invention can be found in the above-described method embodiments, and will not be repeated here.

[0121] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0122] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0124] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A frequency band adjustment method, characterized in that, The frequency band adjustment method includes the following steps: Adjust the scale value labels to obtain the target frequency band label and the target scale value label; The frequency band value is obtained from the frequency band array according to the target frequency band number, and the frequency band to be adjusted is determined according to the frequency band value; The scale value is obtained from the scale bar array according to the target scale value number, and the frequency band to be adjusted is adjusted according to the scale value; The step of adjusting the scale value labels to obtain the target frequency band label and the target scale value label includes: The scale value label on the frequency band is obtained according to the adjusted frequency band; Obtain the total number of frequency bands, and determine the adjustable total range based on the total number of frequency bands and the total number of scale points; When the scale value label is within the range of the adjustable total number, the target frequency band label and the target scale value label are obtained based on the total number of scale points and the scale value label; Alternatively, the target frequency band label can be obtained by rounding down the total number of scale points based on the scale value label; The target scale value label is obtained by taking the remainder of the total number of scale points based on the scale value label; Before the step of adjusting the scale value labels to obtain the target frequency band label and the target scale value label, the method further includes: Upon receiving adjustment instructions from the equalizer interface, the target function is called according to the audio control class to set parameters and obtain the scale value label; The scale value label is transmitted from the HAL layer to the kernel layer via the target node.

2. The frequency band adjustment method as described in claim 1, characterized in that, The step of obtaining the frequency band value from the frequency band array according to the target frequency band number, and determining the frequency band to be adjusted according to the frequency band value, includes: Generate a frequency band array based on the total number of frequency bands; The frequency band value is obtained from the frequency band array according to the target frequency band number, and the frequency band to be adjusted is determined according to the frequency band value.

3. The frequency band adjustment method as described in claim 1, characterized in that, The step of obtaining the scale value from the scale bar array according to the target scale value label, and adjusting the frequency band to be adjusted according to the scale value, includes: Generate a scale bar array based on the total number of scale points; The scale value is obtained from the scale bar array according to the target scale value label, and the frequency band to be adjusted is adjusted according to the scale value.

4. A frequency band adjustment device, characterized in that, The frequency band adjustment device includes: a memory, a processor, and a frequency band adjustment program stored in the memory and executable on the processor, wherein the frequency band adjustment program, when executed by the processor, implements the steps of the frequency band adjustment method as described in any one of claims 1 to 3.

5. A storage medium, characterized in that, The storage medium stores a frequency band adjustment program, which, when executed by a processor, implements the steps of the frequency band adjustment method as described in any one of claims 1 to 3.

6. A frequency band adjustment device, characterized in that, The frequency band adjustment device includes: a data acquisition module, a frequency band determination module, and a frequency band adjustment module; The data acquisition module is used to adjust the scale value labels to obtain the target frequency band label and the target scale value label; The frequency band determination module is used to obtain frequency band values ​​from the frequency band array according to the target frequency band number, and determine the frequency band to be adjusted according to the frequency band values; The frequency band adjustment module is used to obtain a scale value from the scale bar array according to the target scale value label, and adjust the frequency band to be adjusted according to the scale value; The data acquisition module is also used to obtain the scale value label on the frequency band according to the adjusted frequency band; The data acquisition module is also used to acquire the total number of frequency bands, determine the adjustable total range based on the total number of frequency bands and the total number of scale points, and when the scale value label belongs to the adjustable total range, obtain the target frequency band label and the target scale value label based on the total number of scale points and the scale value label. The data acquisition module is further configured to: or, round down the total number of scale points according to the scale value label to obtain the target frequency band label; or take the remainder of the total number of scale points according to the scale value label to obtain the target scale value label; The data acquisition module is also used to, when receiving the adjustment command from the equalizer interface, call the target function according to the audio control class to set parameters and obtain the scale value label; and transmit the scale value label from the HAL layer to the kernel layer through the target node.

Citation Information

Patent Citations

  • Graphic equalizer with automatic setting function

    JP2007304305A