Audio playing method and electronic equipment
By detecting the volume of the audio playback device in real time, matching the audio suppression parameters of the volume range, and dynamically adjusting the audio intensity, the problem of high power consumption affecting the listening experience is solved, achieving both power reduction and sound quality preservation.
Patent Information
- Application Number
- CN202411150534.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies, while ensuring audio playback quality, struggle to effectively reduce the power consumption of electronic devices, thus impacting the user's auditory experience.
By detecting the volume of the audio playback device in real time, matching the audio suppression parameters of the corresponding volume range, suppressing the audio intensity, and dynamically adjusting the audio playback power consumption, the audio processing module is prevented from being shut down.
While ensuring audio playback quality, it reduces power consumption, extends device lifespan, reduces vibration generated by external audio playback, and enhances the user's auditory experience.
Smart Images

Figure CN121603833A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and more specifically, to an audio playback method and an electronic device. Background Technology
[0002] Currently, with the widespread use and diversified functions of electronic devices (such as smartphones and tablets), users not only listen to music and watch videos online through audio playback devices, but also have higher requirements for audio playback quality. This demand has driven continuous innovation in audio processing technologies and algorithms, aiming to provide a high-quality audio listening experience. However, improvements in audio processing technologies and algorithms are often accompanied by increased power consumption.
[0003] In related technologies, electronic devices can detect the volume output of the device and shut down the audio processing module when a preset threshold is reached, thereby reducing the power consumption of the audio device. Although this method reduces power consumption, it affects the sound quality of audio playback, severely impacting the user's listening experience. How to reduce power consumption during audio playback while ensuring optimal playback quality has become one of the urgent challenges for electronic devices. Summary of the Invention
[0004] This application provides an audio playback method and electronic device. By real-time detection of the volume output by the audio playback device, and using audio suppression parameters matching the current audio volume range, the method suppresses audio intensity to reduce playback power consumption without shutting down the audio processing module, thus ensuring a good user listening experience. Furthermore, by pre-setting multiple sets of different audio suppression parameters for different volume ranges, the method achieves refined and dynamic processing of audio playback power consumption, maximizing the reduction of audio playback power consumption.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0006] Firstly, an audio playback method is provided. This method includes: an electronic device playing audio aloud, detecting that the playback volume of the audio is a first volume value. Then, the electronic device determines a first set of audio suppression parameters corresponding to a first volume range based on the first audio value. Different volume ranges correspond to different sets of audio suppression parameters, and each set of audio suppression parameters represents the correspondence between the degree of suppression of each frequency and audio intensity within the audio frequency band. Next, the electronic device performs audio suppression processing based on the first set of audio suppression parameters and plays the suppressed audio aloud, thereby achieving the purpose of audio playback.
[0007] In the aforementioned audio playback method, the electronic device can detect the volume of the audio playback in real time. By using audio suppression parameters corresponding to the volume range, it suppresses the audio intensity, thereby reducing audio playback power consumption. Furthermore, it maintains the normal operation of the audio processing module without shutting it down, ensuring a superior user listening experience. Simultaneously, by pre-setting multiple sets of audio suppression parameters corresponding to different volume ranges, it achieves refined and dynamic processing of audio playback power consumption, avoiding over- or under-suppression and maximizing power reduction. In addition, while reducing power consumption, it also minimizes vibrations caused by external audio playback, thus extending the lifespan of the audio playback device.
[0008] In one feasible approach, the electronic device detects that the audio playback volume has switched to a second volume value and determines that the second volume value corresponds to a second volume range. This second volume range is outside the first audio range. The electronic device then determines a second set of audio suppression parameters corresponding to the second volume range. This second set of audio suppression parameters differs from the first set of audio suppression parameters. Based on the second set of audio suppression parameters, the electronic device performs audio suppression processing and plays the suppressed audio.
[0009] In the above audio playback method, the electronic device ensures that the audio suppression processing matches the current volume by responding to the user's volume adjustment operation. In this way, the mobile phone can minimize power consumption while maintaining sound quality.
[0010] In one feasible approach, during the audio suppression process based on a second set of audio suppression parameters, the loudness of the audio content to be played can be determined first. Then, the electronic device identifies a first audio segment within the content whose loudness is less than a first preset threshold. At this point, the second set of audio suppression parameters is used to suppress the first audio segment and subsequent audio. This implementation chooses to switch audio suppression parameters at low loudness because low-loudness audio segments are less sensitive to volume changes. Adjusting the parameters at this point reduces auditory abruptness, making the transition more natural and avoiding popping sounds caused by sudden volume changes.
[0011] In one feasible approach, the audio frequency bands include a first band, a second band, and a third band, where frequencies in the second band are higher than those in the first band, and frequencies in the third band are higher than those in the second band. Within the same set of audio suppression parameters, the suppression level of audio intensity corresponding to frequencies in the first and third bands is greater than that corresponding to frequencies in the second band. This implementation achieves refined audio signal suppression by dividing the audio frequency range into multiple bands and setting different audio suppression parameters for each band. By effectively controlling the audio intensity of different bands, the accuracy of audio suppression processing is improved, thereby reducing audio power consumption without affecting the user's listening experience. Based on differences in human auditory sensitivity, the human ear has higher sensitivity in the mid-frequency range (second band) and lower sensitivity in the low-frequency range (first band) or ultra-high-frequency range (third band). Lower sensitivity allows for greater suppression, while higher sensitivity allows for less suppression. By suppressing the low-frequency (first band) and high-frequency (third band) audio intensity to a greater extent compared to the mid-frequency (second band), unnecessary frequency energy consumption is reduced, thus lowering the power consumption of the audio amplifier.
[0012] In one feasible implementation, the mid-frequency suppression level of the second frequency band is 0 or less than a second preset threshold. This implementation ensures that the mid-frequency audio signal remains relatively stable, thus guaranteeing that the overall sound effect is not affected and maximizing the user's listening experience.
[0013] In one implementation, the volume of the second volume range is lower than that of the first volume range, and the degree of suppression of audio intensity in the second set of audio suppression parameters is greater than that in the first set of audio suppression parameters. In this implementation, based on the differences in human auditory sensitivity, compared to high volume (first volume range), a greater degree of suppression is applied to low volume (second volume range) audio, reducing energy consumption at low volumes. Audio suppression parameters are dynamically matched at different volumes to maximize power reduction.
[0014] In one feasible approach, when the first volume value is less than a third preset threshold, audio suppression is performed; when the first volume value is greater than or equal to the third preset threshold, the corresponding suppression level is small, with almost no suppression of audio intensity, or no audio suppression at all, in order to maintain the original sound quality and ensure the user's listening experience.
[0015] In one feasible approach, the degree of suppression of each frequency and audio intensity in the audio suppression parameters corresponding to different volume ranges is related to the auditory sensitivity of each frequency within the corresponding volume range. Specifically, higher auditory sensitivity corresponds to a lower degree of suppression, and lower auditory sensitivity corresponds to a greater degree of suppression. This approach considers the differences in auditory sensitivity among the human ear, suppressing the less sensitive portions to a greater extent while maintaining higher fidelity for the more sensitive portions, thereby reducing audio power consumption while preserving sound quality.
[0016] In one feasible approach, each set of suppression parameters includes the correspondence between frequencies within the audio frequency band and suppression coefficients. The suppression coefficient is greater than or equal to 0 and less than or equal to 1, with a smaller suppression coefficient indicating a stronger suppression of the audio intensity. During the audio suppression processing based on the first set of audio suppression parameters, the electronic device uses the product of the intensity parameter of the frequency corresponding to the audio content to be played and the suppression coefficient, according to the correspondence between frequencies within the audio frequency band and the suppression coefficient in the first set of suppression parameters, as the intensity parameter of the suppressed audio. In this implementation, the product of the intensity parameter corresponding to the audio content to be played and the suppression coefficient is used as the intensity parameter of the suppressed audio, thereby suppressing the audio and reducing the power consumption of the external audio amplifier.
[0017] In one implementation, the degree of audio intensity suppression is used to represent the extent of suppression of audio intensity parameters, including one or more of the following: amplitude, energy, or loudness. In this implementation, by suppressing audio intensity parameters (amplitude, energy, loudness), audio playback power consumption is reduced, thereby improving the user's auditory experience.
[0018] In a second aspect, an electronic device is provided, comprising: a memory and one or more processors; the memory and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the audio playback method described in any of the first aspects.
[0019] Thirdly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform the audio playback method described in any of the first aspects above.
[0020] Fourthly, a computer program product is provided that, when run on a computer, causes the computer to execute the audio playback method described in any of the first aspects above.
[0021] Fifthly, a chip system is provided, which is applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the audio playback method described in any of the first aspects above.
[0022] Understandably, the beneficial effects that can be achieved by the second to fifth aspects provided above can be referenced to the beneficial effects of the first aspect and any of its possible design methods, which will not be repeated here. Attached Figure Description
[0023] Figure 1 This is a schematic diagram illustrating an audio playback scenario according to an embodiment of this application;
[0024] Figure 2 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application;
[0025] Figure 3 This is a schematic diagram of the software structure of an electronic device according to an embodiment of this application;
[0026] Figure 4 This is a flowchart illustrating an audio playback method according to an embodiment of this application;
[0027] Figure 5 This is a schematic diagram illustrating an audio playback process according to an embodiment of this application;
[0028] Figure 6 This is a schematic diagram illustrating the relationship between different volume ranges and the degree of suppression, as shown in an embodiment of this application.
[0029] Figure 7 This is a schematic diagram of an inhibition curve shown in an embodiment of this application;
[0030] Figure 8 This is a schematic diagram illustrating the relationship between different frequencies and the degree of suppression in embodiments of this application;
[0031] Figure 9 This is a schematic diagram illustrating the correspondence between volume, frequency, and loudness in an embodiment of this application;
[0032] Figure 10 This is a schematic diagram illustrating an audio playback process according to an embodiment of this application;
[0033] Figure 11 This is a flowchart illustrating an audio playback method according to an embodiment of this application;
[0034] Figure 12 This is a schematic diagram of the structure of another electronic device shown in an embodiment of this application. Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0036] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.
[0037] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0038] In electronic devices, external audio playback is a common use case, where the device emits sound through built-in or external speakers. This process requires significant power to drive the speaker system's diaphragm to vibrate dramatically, thereby generating sound waves. For example, see... Figure 1 The image shows an audio speaker scenario. In this scenario, electronic device 01 (hereinafter referred to as device 01) consumes a relatively large amount of power.
[0039] Conventional audio power consumption optimization solutions typically employ a volume threshold detection method. This method detects changes in the device's playback volume and shuts down the audio processing module once the volume reaches a preset threshold. This audio processing module is primarily responsible for processing audio signals, including but not limited to amplification, noise reduction, equalization, and sound enhancement functions to improve audio quality and user experience. While shutting down the audio processing module effectively reduces power consumption, the complete loss of sound processing capabilities significantly impacts the user's listening experience.
[0040] To better reduce audio playback power consumption while ensuring sound quality, this application provides an audio playback method. In this method, an electronic device (e.g., device 01 described above) plays audio aloud. Upon detecting that the audio playback volume is a first volume value, a first set of audio suppression parameters is determined based on the first volume range where the first audio value is located. Then, based on the first set of audio suppression parameters, the audio intensity is suppressed. Finally, the electronic device plays the suppressed audio aloud.
[0041] The different volume ranges mentioned above correspond to different sets of audio suppression parameters. Each set of audio suppression parameters represents the correspondence between the degree of suppression of each frequency and the audio intensity within an audio frequency band. The degree of suppression of audio intensity represents the degree of suppression applied to the audio intensity parameter. For example, audio intensity parameters include one or more of the following: amplitude, energy, or loudness. In other words, audio suppression parameters can be used to suppress the audio intensity of a frequency based on the degree of suppression corresponding to that frequency within the audio frequency band, thereby saving audio playback power consumption.
[0042] In this embodiment, the electronic device can detect the volume of audio playback in real time and suppress audio intensity using audio suppression parameters corresponding to the volume range, thereby reducing audio playback power consumption. Furthermore, it maintains the normal operation of the audio processing module without shutting it down, ensuring a good user listening experience. Simultaneously, by pre-setting multiple sets of audio suppression parameters corresponding to different volume ranges, it achieves refined and dynamic processing of audio playback power consumption, maximizing the reduction of audio playback power consumption. In addition, while reducing power consumption, it can also reduce vibrations caused by external audio playback, thereby extending the lifespan of the audio playback device.
[0043] In the audio playback method provided in this application, the electronic device can be any device with audio playback functionality. For example, the electronic device can be a mobile phone, computer (e.g., laptop, desktop computer), tablet computer (handheld tablet, in-vehicle tablet), speaker, wearable device (e.g., watch, smart glasses), smart home system, audio equipment, augmented reality (AR) or virtual reality (VR) device, etc. This application does not impose any special limitations on the specific type and form of the electronic device.
[0044] Figure 2 A schematic diagram of the hardware structure of electronic device 100 is shown. For example, Figure 2 The electronic device 100 shown may be an electronic device that supports audio playback.
[0045] like Figure 2As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a user identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.; the audio module 170 may include a speaker, receiver, microphone, headphone jack, etc.
[0046] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0047] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0048] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0049] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0050] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0051] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0052] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in conjunction with a tuning switch. Electronic device 100 can implement communication functions and resource acquisition functions through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, etc.
[0053] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0054] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0055] The electronic device 100 can implement shooting functions through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor. The ISP is used to process the data fed back by the camera 193, and the camera 193 is used to capture still images or videos. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0056] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0057] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121.
[0058] For example, processor 110 can determine a matching set of audio suppression parameters based on the current audio volume by executing instructions stored in internal memory 121. Then, the digital signal processor in processor 110 performs suppression processing on the audio signal to be played based on this set of audio suppression parameters.
[0059] The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a given function (such as sound playback, image playback, etc.). The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0060] Electronic device 100 can implement audio functions, such as music playback and recording, through the speaker, receiver, microphone, headphone jack, and application processor in audio module 170.
[0061] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules of audio module 170 may be located in processor 110. A speaker, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 100 can play audio through the speaker, for example, to listen to music, play audio from a video, or listen to hands-free calls. A receiver, also called a "handpiece," is used to convert audio electrical signals into sound signals. When electronic device 100 answers a phone call or voice message, the receiver can be brought close to the user's ear to hear the voice. A microphone, also called a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can bring their mouth close to the microphone to input sound signals. Electronic device 100 may be equipped with at least one microphone. A headphone jack is used to connect wired headphones.
[0062] For example, electronic device 100 plays audio through audio module 170, or detects the currently playing audio signal and obtains audio data, including but not limited to: the volume of the audio, audio intensity parameters (amplitude, energy or loudness, etc.).
[0063] based on Figure 2 When the electronic device 100 shown implements the audio playback method in this embodiment, the electronic device 100 can play audio through the speaker in the audio module 170. Next, the processor 110 executes instructions stored in the internal memory 121 to detect the volume of the currently playing audio through the audio module 170. The audio module 170 can determine a matching set of suppression parameters based on the volume range of the currently playing audio. Then, the processor 110 transmits the set of audio suppression parameters to the digital signal processor (DSP) via inter-core communication. The DSP performs suppression processing on the audio signal to be played based on the received audio suppression parameters. The processed audio signal is sent back to the audio module 170, and the suppressed audio is then played through the audio module 170, allowing the user to hear the suppressed audio.
[0064] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0065] Figure 3 This is a schematic diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.
[0066] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0067] The application layer can include a series of application packages.
[0068] like Figure 3 As shown, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS. Among them, applications that can play audio, such as music and video, can also be called audio playback applications.
[0069] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.
[0070] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0071] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0072] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0073] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0074] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0075] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, audio files, video files, and so on.
[0076] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0077] The application framework layer may also include an audio interface. This audio interface provides an API to audio playback applications, allowing them to interact with the system library's audio module by calling this API.
[0078] The Android Runtime includes the core libraries and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.
[0079] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0080] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0081] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), audio module, etc.
[0082] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0083] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0084] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0085] A 2D graphics engine is a graphics engine for 2D drawing.
[0086] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0087] based on Figure 3 When the electronic device 100 shown implements the audio playback method in this application embodiment, in response to the audio playback operation, the audio playback application in the application layer triggers an audio playback command and plays audio through the speaker. The audio module in the system library detects the audio signal in real time and obtains the audio playback volume. The audio module in the system library determines the audio suppression parameter corresponding to the current playback volume based on multiple preset sets of audio suppression parameters corresponding to different volume ranges. The audio module transmits the audio suppression parameter to the digital signal processor in the hardware layer through the audio driver. After receiving the audio suppression parameter, the digital signal processor performs audio suppression processing and plays the suppressed audio through the speaker.
[0088] The following will use a mobile phone as an example to illustrate the audio playback method provided in the embodiments of this application. See also Figure 4 The method may include the following steps S401-S404:
[0089] S401, Use the phone's external speaker to obtain audio data.
[0090] After receiving a user's command to play audio, the phone plays the audio aloud. For example, in an audio playback scenario, the phone can play a specified audio file or game sounds. When the phone plays audio aloud, the sound is amplified to the outside world through the speaker. The human ear can perceive the audio being played aloud.
[0091] The audio file can be a locally stored audio file directly on the phone, or it can be local audio stored in an audio playback application (APP) or audio obtained from the network. This application embodiment does not limit the source of the audio file played on the phone. That is, users can choose to play locally stored audio files directly on the phone, locally stored audio in the APP, or audio obtained from the network from the APP. The audio file can be music, audio / video, or recording files, etc.
[0092] For example, the phone responds to a user's click such as Figure 5 The operation of the music application icon 500 shown in (a) can be as follows: Figure 5 (b) shows the music playback interface with external audio output.
[0093] When a mobile phone plays audio aloud, it can detect the audio signal in real time and obtain the volume of the audio during playback.
[0094] S402. The mobile phone determines the audio suppression parameter corresponding to the current volume based on multiple preset sets of audio suppression parameters corresponding to different volume ranges.
[0095] In this context, volume range can be understood as a series of perceptible levels or ranges of different sizes into which the volume of audio is divided when it is played aloud. Different volume ranges can be subject to different degrees of audio suppression processing.
[0096] Audio suppression parameters are a set of settings used to reduce or adjust audio intensity during audio playback to save power. Each volume range corresponds to a set of audio suppression parameters, representing the relationship between the degree of suppression of each frequency within the audio band and the audio intensity. For example, the audio frequency range can include 20Hz-20kHz. Audio intensity characterizes the strength of the audio signal. The higher the audio intensity, the greater the audio playback power consumption; the lower the audio intensity, the lower the audio playback power consumption. By suppressing the magnitude of audio intensity, the power consumption of the phone's audio speaker can be saved. For example, audio intensity can be characterized by amplitude, energy, or loudness, and audio suppression parameters can be used to suppress one or more of these parameters.
[0097] In one possible implementation, the audio suppression parameters can be determined based on acoustic principles and the characteristics of human hearing. The audio suppression parameters corresponding to different volume ranges can be set according to the differences in human ear sensitivity to audio signals of different volumes.
[0098] In this embodiment, if the mobile phone detects that the current audio playback volume is a first volume value, the mobile phone compares the first volume value with a preset volume range to determine the first volume range in which the current volume is located. Based on the first volume range and the preset correspondence between different volume ranges and different sets of audio suppression parameters, the mobile phone determines the first set of audio suppression parameters that match the first volume value.
[0099] Then, in response to the user's volume adjustment, the phone determines the adjusted volume as the second volume value. Based on this second volume value, the phone determines the second set of audio suppression parameters matching the corresponding second volume range. If the second volume range to which the adjusted volume value belongs is the same as the first volume range before adjustment, then the adjusted audio suppression parameters remain the same as the first set of audio suppression parameters. If the second volume range to which the adjusted volume value belongs is outside the first volume range, then the second audio suppression parameters differ from the first audio suppression parameters. By determining the corresponding second set of audio suppression parameters based on the second volume value, the phone ensures that audio suppression processing flexibly adapts to different volume levels. By matching different volume values with corresponding audio suppression parameters, it avoids over-suppression or under-suppression of audio. Simultaneously, by responding to the user's volume adjustment operation, it ensures that the audio suppression processing matches the current volume. In this way, the phone can minimize power consumption while maintaining sound quality.
[0100] In some embodiments, the degree of audio suppression varies for different volume ranges, while the degree of audio suppression is the same for the same volume range.
[0101] The human ear has varying sensitivities to audio signals at different volumes. Lower volumes result in lower auditory sensitivity, while higher volumes result in higher sensitivity. Consequently, the degree of audio intensity suppression varies across different volume ranges. In one possible implementation, lower volumes lead to greater audio intensity suppression, and higher volumes lead to lesser suppression. This dynamically matches audio suppression parameters at different volume levels, minimizing power consumption.
[0102] When the playback volume is detected to have switched to the second volume value, and the volume of the second volume range is lower than that of the first volume range, then the suppression level of the audio intensity in the second set of audio suppression parameters corresponding to the second volume range is greater than the suppression level of the audio intensity in the first set of audio suppression parameters corresponding to the first volume range. Therefore, in the second volume range, a greater degree of suppression can be applied to the audio signal.
[0103] For example, the maximum volume of a mobile phone's speaker is 15 levels. The volume is divided into three volume zones based on levels 5 and 10 (the number of volume zones can be increased or decreased depending on actual needs): the first volume zone (volume greater than level 0 and less than or equal to level 5), the second volume zone (volume greater than level 5 and less than or equal to level 10), and the third volume zone (volume greater than level 10). Different volume zones correspond to different levels of suppression.
[0104] For example, see Figure 6The audio suppression parameter corresponding to the first volume range is greater than the audio suppression parameter corresponding to the second volume range; the audio suppression parameter corresponding to the second volume range is greater than the audio suppression parameter corresponding to the third volume range.
[0105] For example, the phone detects the user's volume adjustment, determines the current volume level to be 8, and compares it with a preset volume range. Since level 8 falls within the volume range of 5 to 10, the phone determines the audio suppression parameter corresponding to the volume range of 5 to 10, which is the audio suppression parameter corresponding to the current volume value.
[0106] In one possible implementation, the same volume range corresponds to the same set of audio suppression parameters.
[0107] In another possible implementation, different volume values correspond to different sets of audio suppression parameters.
[0108] In other embodiments, the degree of audio suppression is related to the audio frequency, with different audio frequencies corresponding to different degrees of audio suppression. For example, the audio frequency range may include 20Hz-20kHz.
[0109] The sensitivity of human hearing is related to audio frequency, and the perceived loudness of audio sounds can be measured by loudness. For the same volume, signals of different frequencies require different volumes to be perceived as having the same loudness. It's understandable that the human ear is more sensitive to high-frequency sounds; at the same sound pressure level, high-frequency sounds have a higher loudness level than low-frequency sounds. At the same loudness, the loudness threshold for mid-frequency sounds is lower, while the loudness threshold for low-frequency or ultra-high-frequency sounds is higher. Therefore, in one possible implementation, for the same volume range, or for the same volume value, such as... Figure 7 The suppression curves shown indicate that the degree of audio suppression varies at different frequencies; the audio suppression parameters also differ at different frequencies.
[0110] For example, see Figure 8 In (a) of the diagram, different frequencies within the same volume range correspond to different levels of audio suppression and audio suppression parameters. Within the same volume range, the audio suppression levels for high and low frequencies can be greater than those for mid-frequency frequencies. Different volume ranges correspond to different suppression curves, and different volume ranges correspond to different levels of audio suppression and audio suppression parameters.
[0111] In another possible implementation, the audio frequency range can be divided into multiple frequency bands. Within the frequency range corresponding to different frequency bands, the degree of audio intensity suppression varies, thus allowing for the setting of different audio suppression parameters. These multiple frequency bands can be pre-defined as fixed bands, or they can be divided based on the playing audio or the range of human hearing. For example, the audio frequency bands can be divided into a first band, a second band, and a third band (and can be adjusted to more bands as needed). Specifically, within the same set of audio suppression processing, audio suppression parameters are included for the first, second, and third bands respectively, ensuring that the audio signal receives better suppression across different frequency bands.
[0112] For example, the first frequency band corresponds to the low frequency band 20Hz-160Hz, the second frequency band corresponds to the mid frequency band 161Hz-2500Hz, and the third frequency band corresponds to the high frequency band 2501Hz-20kHz.
[0113] In one possible design, the frequencies in the second frequency band are higher than those in the first frequency band, and the frequencies in the third frequency band are higher than those in the second frequency band. The suppression level of each frequency and audio intensity in the first and third frequency bands is greater than that in the second frequency band. Here, the first frequency band can be understood as the low-frequency band, the second as the mid-frequency band, and the third as the high-frequency band. In other words, the audio suppression level in the low-frequency and high-frequency bands is higher than that in the mid-frequency band. By dividing the audio frequency range into multiple bands and setting different audio suppression parameters for each band, refined audio signal suppression processing is achieved. By effectively controlling the audio intensity of different frequency bands, the accuracy of audio suppression processing is improved, thereby reducing audio speaker power consumption without affecting the user's listening experience.
[0114] For example, see Figure 8 As shown in (a) of the figure, within the same volume range, the degree of audio suppression corresponding to the high-frequency and low-frequency bands is greater than that corresponding to the mid-frequency band.
[0115] For another example, see Figure 8 In (b) of this example, taking an audio frequency range that includes high, mid, and low frequencies, the audio suppression levels corresponding to frequencies in the high and low frequencies are higher than those corresponding to frequencies in the mid frequency range. Furthermore, the audio suppression levels are the same within the same frequency band.
[0116] In one possible implementation, the audio signal in the mid-frequency band remains relatively stable to ensure that the overall sound effect is not affected, thus maximizing the user's listening experience. For example, the suppression level corresponding to the mid-frequency band in the second frequency band is 0 or less than a preset threshold of 1 (the second preset threshold). The second preset threshold is relatively small. That is, the audio signal in the mid-frequency band is not suppressed or the suppression level is very small.
[0117] In other embodiments, the degree of audio suppression is related to the audio frequency and volume.
[0118] The sensitivity of the human ear to audio signals is related to frequency and volume. The degree of suppression of each frequency and audio intensity in the audio suppression parameters corresponding to different volume ranges is related to the auditory sensitivity of each frequency in the corresponding volume range; the higher the auditory sensitivity, the smaller the corresponding degree of suppression, and the lower the auditory sensitivity, the greater the corresponding degree of suppression.
[0119] For example, the loudness of an audio sound perceived by the human ear can be measured by its intensity. See also Figure 9 For the same volume, the loudness threshold is lower in the mid-frequency range and higher in the low-frequency or ultra-high-frequency range; for the same frequency, the loudness threshold is higher at lower volumes and lower at higher volumes. The lower the loudness threshold, the more sensitive the human ear is to it. In other words, the human ear is more sensitive in the mid-frequency range and less sensitive in the low-frequency or ultra-high-frequency range. Lower sensitivity allows for greater suppression, while higher sensitivity allows for less suppression.
[0120] In one possible implementation, different volume ranges correspond to different suppression curves; the smaller the volume range, the greater the corresponding audio suppression level. Within the same volume range, different frequencies correspond to different audio suppression levels and parameters. Within the same volume range, the audio suppression level corresponding to high and low frequencies can be greater than that corresponding to mid frequencies. For example, the correspondence between volume, frequency, and suppression level can be found in [reference needed]. Figure 8 (a) in the middle.
[0121] In one possible design, when the first volume value is less than a third preset threshold, a higher level of suppression is applied to the low-frequency and high-frequency bands; when the first volume value is greater than the third preset threshold, the suppression level for the low-frequency and high-frequency bands is lower than when the first volume value is less than the third preset threshold. In other words, at lower volumes, the audio suppression level for low-frequency and high-frequency bands is higher; at higher volumes, the audio suppression level for low-frequency and high-frequency bands is lower.
[0122] In one possible implementation, the mid-frequency audio signal is not suppressed or is suppressed to a minimal degree to ensure the user's listening experience and reduce audio power consumption. By comprehensively considering the effects of frequency and volume, the audio suppression parameters are adjusted to preserve the clarity of the mid-frequency audio while effectively reducing the power consumption of the low- and high-frequency audio amplifiers, thus maximizing the reduction of audio power consumption while ensuring sound quality.
[0123] In other embodiments, since users' auditory sensitivity is lower when the volume is low, the phone can perform audio suppression only when the volume is low, so as to reduce power consumption while ensuring the user's auditory experience; and not perform audio suppression processing when the volume is high.
[0124] For example, if a phone detects that the current audio volume is a first volume value, and this first volume value is less than a preset threshold 2 (a third preset threshold), the audio is suppressed. When the first volume value is greater than or equal to the preset threshold 2, the suppression level is lower, with almost no suppression of audio intensity, to maintain the original sound quality and ensure the user's auditory experience. The preset threshold 2 (third preset threshold) may represent a specific volume value or a threshold range that dynamically adjusts based on volume changes. It's understandable that users have different sensitivities to volume and different needs for auditory experience. Therefore, the setting of the preset threshold 2 (third preset threshold) must also take user needs into account. Alternatively, in certain scenarios (such as driving or cycling), excessively high volumes may pose a threat to user safety. Therefore, in these scenarios, the preset threshold 2 may be set lower.
[0125] For example, since users are less sensitive to low and high frequencies when the volume is low, low and high frequency audio is suppressed when the first volume value is less than the preset threshold 2, while mid-frequency audio is not suppressed; when the first volume value is greater than or equal to the preset threshold 2, no audio suppression is performed on the entire audio frequency band.
[0126] In other embodiments, the audio suppression parameters are further fine-tuned and optimized by combining subjective listening tests with objective sound quality assessments to ensure that sound quality loss is minimized while reducing power consumption.
[0127] In this way, the phone can determine the appropriate audio suppression parameters for the corresponding volume range based on the actual audio playback volume. By adjusting the audio suppression parameters in real time according to the current playback volume, power consumption during audio playback can be reduced more precisely, ensuring a better listening experience and improving the user's overall experience.
[0128] S403: The mobile phone performs audio suppression processing based on a set of matched audio suppression parameters.
[0129] It is understandable that the intensity parameter of an audio signal is distributed differently across different frequencies. Adjusting the intensity parameter affects the auditory perception of specific frequency components within the frequency domain. The intensity parameter represents the magnitude of the currently played audio signal. The larger the intensity parameter, the greater the power consumption of the external amplifier; the smaller the intensity parameter, the smaller the power consumption of the external amplifier. For example, the intensity parameter can include amplitude, energy, or loudness; the specific type of intensity parameter is not limited.
[0130] In some embodiments, each set of audio suppression parameters includes the correspondence between each frequency within the audio band and the suppression coefficient. The suppression coefficient is greater than or equal to 0 and less than or equal to 1. The smaller the suppression coefficient, the greater the suppression strength of the represented audio intensity. The audio suppression parameter matched to the audio interval where the volume value of the audio to be played is the product of the intensity parameter of the frequency corresponding to the audio content to be played and the suppression coefficient, which is used as the intensity parameter of the suppressed audio, thereby suppressing the audio and reducing the power consumption of the audio amplifier.
[0131] After the mobile phone determines the current group of audio suppression parameters (such as the first group of audio suppression parameters or the second group of audio suppression parameters) based on the current volume, it can determine whether to switch the audio suppression parameters and when to switch them based on whether the current group of audio suppression parameters is the same as the previously determined audio suppression parameters.
[0132] Taking the current set of audio suppression parameters as the second set of audio suppression parameters as an example, in some embodiments, the mobile phone determines the second set of audio suppression parameters that match the second volume range where the second volume value is located based on the volume. If the second set of audio suppression parameters is the same as the first set of audio suppression parameters, then the first set of audio suppression parameters will continue to be used to suppress the audio.
[0133] In other embodiments, the mobile phone determines the second set of audio suppression parameters that match the second volume range where the second volume value is located based on the volume. The second set of audio suppression parameters is different from the first set of audio suppression parameters, and the phone directly switches to using the second set of audio suppression parameters to suppress the audio.
[0134] In other embodiments, the mobile phone receives a second set of audio suppression parameters matching the new volume level after the user adjusts the volume. This second set of audio suppression parameters differs from the first set, but the switch from the first set to the second set is not immediate. Instead, it detects changes in the loudness of the audio signal to be played in real time. When a first audio segment with a loudness below a first preset threshold is detected, the audio suppression parameters are adjusted during playback of that segment, i.e., the phone switches to the second set of audio suppression parameters matched according to the second volume range. Switching to audio suppression parameters at low loudness is chosen because low-loudness audio segments are less sensitive to volume changes; adjusting the parameters at this time reduces auditory abruptness, making the transition more natural and avoiding popping sounds caused by sudden volume changes.
[0135] For example, Figure 10 A schematic diagram of the audio processing flow is shown. When the second set of audio suppression parameters differs from the first set of audio suppression parameters, the mobile phone detects the loudness of the audio to be played in real time (i.e., initiates audio intensity detection). When a first audio segment with an audio loudness lower than a first preset threshold is detected (i.e., a low loudness interval is detected), the mobile phone switches to using the second set of audio suppression parameters to suppress the first audio segment and subsequent audio when it starts playing the first audio segment.
[0136] In some embodiments, the audio interface of the mobile phone's application framework layer passes the volume level to the system library. The audio module in the system library determines the audio suppression parameter corresponding to the current playback volume based on multiple preset sets of audio suppression parameters corresponding to different volume ranges. The audio module then passes the audio suppression parameter to the digital signal processor in the hardware layer through the audio driver. After receiving the audio suppression parameter, the digital signal processor performs audio suppression processing.
[0137] In some embodiments, after receiving audio suppression parameters, the digital signal processor processes the input audio signal according to these parameters, specifically including the following steps:
[0138] Frequency domain analysis: When a first audio segment with a loudness below a first preset threshold is detected, the operating system enters the audio suppression processing flow, converting the time-domain audio signal from the time domain to a frequency domain representation (e.g., through Fast Fourier Transform, FFT). Through frequency domain analysis, different frequency ranges of the audio signal can be separated and extracted, allowing for different degrees of suppression processing on each frequency component.
[0139] Suppression processing: The digital signal processor applies the suppression degree of each frequency and audio intensity of the audio frequency band specified in the audio suppression parameters to the corresponding audio frequency band.
[0140] For example, based on the audio suppression parameters, the audio intensity of the first and third frequency bands is reduced while maintaining the relative stability of the second frequency band. To ensure that the sound effect of the second frequency band is not affected, the audio intensity of the second frequency band is kept constant or only slightly adjusted. Specifically, the audio suppression parameters of the first, second, and third frequency bands are dynamically adjusted according to the volume and frequency distribution of the audio to be played. For example, taking the low-frequency, mid-frequency, and high-frequency bands as examples, when the volume of the audio to be played decreases, the suppression level of the low-frequency and high-frequency bands can be increased; while when the volume increases, the suppression level can be appropriately decreased to ensure the user's listening experience.
[0141] Temporal reconstruction: The processed first, second, and third frequency bands are subjected to inverse Fourier transform (IFFT) and other processing to reconstruct the complete audio signal.
[0142] In some embodiments, to ensure that the optimized sound quality still meets user needs, the system may also introduce a sound quality evaluation mechanism. By comparing the changes in sound quality of the audio signals before and after optimization, the system can automatically adjust the audio suppression parameters to achieve the best balance between energy saving and sound quality.
[0143] S404, Audio after suppression processing of mobile phone speaker.
[0144] The audio signal from the phone's external speaker has undergone audio suppression processing. At this point, the audio playback has been suppressed according to the current playback volume.
[0145] After audio suppression processing, the processed audio signal is converted from the frequency domain back to the time domain for external playback.
[0146] For example, when the audio frequency band includes a low-frequency first band, a mid-frequency second band, and a high-frequency third band, the audio signal is effectively suppressed in the first and third bands, thereby reducing power consumption without affecting the user's actual listening experience. At the same time, since the second band is relatively stable, the sound effect can still be maintained at a high level.
[0147] In the solution described in this application embodiment, the mobile phone plays audio aloud and monitors the volume in real time. Based on the audio suppression parameters matched to the volume range corresponding to the real-time volume, audio suppression processing is performed, effectively reducing power consumption during audio playback. The audio processing module is not shut down, ensuring its normal operation and guaranteeing a good user listening experience. Furthermore, by setting different audio suppression parameters for multiple volume ranges, refined and dynamic processing of audio playback power consumption is achieved, maximizing the reduction of audio power consumption.
[0148] Furthermore, the phone detects audio loudness in real time and switches audio suppression parameters when the audio loudness is low, avoiding sudden volume changes and pop sound issues. The entire switching process is imperceptible to the user, providing a better audio playback experience.
[0149] The following will combine Figure 11 The audio playback method provided in the embodiments of this application will be further described below. Figure 11 As shown, this audio playback method includes the following steps:
[0150] 1101. The phone detected a change in volume.
[0151] The specific implementation process and principle of step 1101 above can be found in the detailed description of the above embodiments, and will not be repeated here.
[0152] 1102. The phone checks whether the current audio playback scenario is external. If so, proceed to step 1103; otherwise, proceed to step 1109.
[0153] Regarding the audio playback scenario, please refer to the detailed description of the above embodiments, which will not be repeated here.
[0154] 1103. The mobile phone obtains the volume range before and after the volume change.
[0155] The phone detects and determines the specific volume range before and after the change. For example, volume is usually measured in decibels (dB) to represent the loudness of sound. For instance, the volume might be 100dB before the change and 30dB after. Assuming a preset multi-level volume range, the first range is greater than 80dB, and the second range is less than 80dB, then the volume range can be determined based on the volume levels before and after the change.
[0156] 1104. Has the volume range changed? If so, proceed to step 1105; otherwise, the audio suppression parameters remain unchanged.
[0157] For example, if the volume was 100dB before the change and 30dB after, the volume before the change was in the first volume range, and the volume after the change was in the second volume range. Alternatively, if the volume was 50dB before the change and 30dB after, the volume range before and after the change was the same.
[0158] 1105. The mobile phone obtains the audio suppression parameters corresponding to the volume to be played.
[0159] The specific implementation process and principle of step 1105 above can be found in the detailed description of step S402 in the above embodiment, and will not be repeated here.
[0160] 1106. Update audio suppression parameters on your phone.
[0161] Specifically, the audio module obtains the audio suppression parameters matched by the changed volume and passes them to the digital signal processor (such as a DSP or Hi-Fi processor) at the hardware layer through the audio driver.
[0162] 1107. The mobile phone detects the loudness of the audio to be played.
[0163] The specific implementation process and principle of step 1107 above can be found in the detailed description of the above embodiments, and will not be repeated here.
[0164] 1108. The mobile phone suppresses the audio using the audio suppression parameters that match the volume of the audio to be played, and then executes 1110.
[0165] In some embodiments, a second set of audio suppression parameters is matched according to the second volume range corresponding to the second volume value determined by the volume switching. This second set of audio suppression parameters is different from the first set of audio suppression parameters, and the audio is directly switched to be suppressed using the second set of audio suppression parameters.
[0166] In other embodiments, the mobile phone receives a second set of audio suppression parameters matching the new volume level after the user adjusts the volume. This second set of audio suppression parameters differs from the first set, but the switch from the first set to the second set is not immediate. Instead, it detects changes in the loudness of the audio signal to be played in real time. When a first audio segment with a loudness below a first preset threshold is detected, the audio suppression parameters are adjusted during playback of that segment, i.e., the phone switches to the second set of audio suppression parameters matched according to the second volume range. Switching to audio suppression parameters at low loudness is chosen because low-loudness audio segments are less sensitive to volume changes; adjusting the parameters at this time reduces auditory abruptness, making the transition more natural and avoiding popping sounds caused by sudden volume changes.
[0167] 1109. The mobile phone obtains the non-low power audio algorithm parameters and then executes 1110.
[0168] In some embodiments, if the mobile phone detects that the current scenario is not audio playback, it will not perform the audio suppression processing described in this application embodiment; instead, it will obtain the non-low-power audio algorithm parameters for normal audio playback. The non-low-power audio algorithm parameters represent the audio processing operations or parameter settings used by the mobile phone when it is not in an audio playback scenario. These parameters differ from the audio suppression parameters of this solution.
[0169] 1110. Audio played from the phone's external speaker.
[0170] If the phone detects an audio playback scenario, it will play the suppressed audio through the external speaker. Otherwise, it will play the audio without the audio suppression processing described in this embodiment of the application.
[0171] In the scheme described in the above embodiments, the mobile phone detects a change in volume (1101). First, it determines whether it is an audio playback scenario (1102). If so, the mobile phone detects the volume before and after the switch, obtains the volume range before and after the volume change (1103), and determines whether the volume range before and after the change has changed (1104). If so, it obtains the audio suppression parameters matched by the changed audio to be played (1105). Subsequently, the mobile phone updates the audio suppression parameters (1106), passing the audio suppression parameters from the audio module in the system library to the digital signal processor in the hardware layer through the audio driver in the kernel layer. At the same time, the mobile phone detects the loudness of the audio to be played (1107) to ensure that when the loudness of the audio to be played is less than a first preset threshold, it switches the audio suppression parameters to suppress the audio (1108). If it is not an audio playback scenario, the non-low-power audio algorithm parameter acquisition process is executed (1109). Then, the mobile phone plays the audio (1110).
[0172] In the scheme described in this application embodiment, the volume value output by the audio playback device is detected, and the intensity of the audio signal is adjusted by selecting a matching audio suppression parameter based on the volume range of the current volume value. Suppressing the audio intensity effectively reduces power consumption during playback, thereby reducing audio power consumption while maintaining continuous operation of the audio processing module and ensuring the user's listening experience. Furthermore, by pre-setting multiple sets of audio suppression parameters for different volume ranges, dynamic processing of audio playback power consumption is achieved, maximizing power reduction while ensuring sound quality.
[0173] It is understood that, in order to achieve the above functions, the electronic device includes hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0174] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0175] This application also provides an electronic device, such as... Figure 12 As shown, the electronic device may include one or more processors 1201, memory 1202 and communication interface 1203.
[0176] The memory 1202, communication interface 1103, and processor 1201 are coupled together. For example, the memory 1202, communication interface 1203, and processor 1201 can be coupled together via bus 1204.
[0177] The communication interface 1203 is used for data transmission with other devices. The memory 1202 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1201, cause the electronic device to perform the audio playback method described in this embodiment.
[0178] The processor 1201 may be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0179] The bus 1204 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1204 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0180] This application also provides a computer-readable storage medium storing computer program code. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiments.
[0181] This application also provides a computer program product that, when run on a computer, causes the computer to execute the relevant method steps described in the above method embodiments.
[0182] The electronic devices, computer storage media, or computer program products provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0183] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0184] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0185] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0186] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0187] If the functions corresponding to the integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the contributing parts, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0188] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An audio playback method, characterized in that, include: External audio playback; The detected audio playback volume is the first volume value; Based on the first audio value corresponding to the first volume range, a first set of audio suppression parameters corresponding to the first volume range is determined. Different volume ranges correspond to different sets of audio suppression parameters. One set of audio suppression parameters is used to represent the correspondence between the degree of suppression of each frequency and the audio intensity within the audio frequency band. Based on the first set of audio suppression parameters, the audio is suppressed. The suppressed audio is played aloud.
2. The method according to claim 1, characterized in that, The method further includes: The audio playback volume is detected to have switched to a second volume value, which corresponds to a second volume range, and this second volume range is outside the first audio range. Determine a second set of audio suppression parameters corresponding to the second volume range, wherein the second set of audio suppression parameters is different from the first set of audio suppression parameters; Based on the second set of audio suppression parameters, the audio is suppressed. Play the suppressed audio.
3. The method according to claim 2, characterized in that, The suppression processing of the audio based on the second set of audio suppression parameters includes: Determine the loudness of the audio content to be played; Identify the first audio segment in the content to be played whose loudness is less than a first preset threshold; Switch to using the second set of audio suppression parameters to suppress the first audio segment and subsequent audio.
4. The method according to any one of claims 1-3, characterized in that, The audio frequency bands include a first frequency band, a second frequency band, and a third frequency band. The frequencies in the second frequency band are higher than the frequencies in the first frequency band, and the frequencies in the third frequency band are higher than the frequencies in the second frequency band. In the same set of audio suppression parameters, the degree of suppression of the audio intensity corresponding to the frequencies in the first frequency band and the third frequency band is greater than the degree of suppression of the audio intensity corresponding to the frequencies in the second frequency band.
5. The method according to claim 4, characterized in that, The frequency band suppression level in the second frequency band is 0 or less than the second preset threshold.
6. The method according to claim 4 or 5, characterized in that, The volume of the second volume range is less than the volume of the first volume range, and the degree of suppression of audio intensity in the second set of audio suppression parameters is greater than the degree of suppression of audio intensity in the first set of audio suppression parameters.
7. The method according to any one of claims 4-6, characterized in that, The first volume value is less than the third preset threshold.
8. The method according to any one of claims 1-7, characterized in that, The degree of suppression of each frequency and audio intensity in the audio suppression parameters corresponding to different volume ranges is related to the auditory sensitivity of each frequency audio within the corresponding volume range; the higher the auditory sensitivity, the smaller the corresponding degree of suppression, and the lower the auditory sensitivity, the greater the corresponding degree of suppression.
9. The method according to any one of claims 1-8, characterized in that, Each set of suppression parameters includes the correspondence between each frequency in the audio band and the suppression coefficient. The suppression coefficient is greater than or equal to 0 and less than or equal to 1. The smaller the suppression coefficient, the greater the suppression strength of the audio intensity it represents. The step of suppressing the audio based on the first set of audio suppression parameters includes: Based on the correspondence between each frequency and the suppression coefficient in the first set of suppression parameters, the product of the intensity parameter of the frequency corresponding to the audio content to be played and the suppression coefficient is used as the intensity parameter of the audio after suppression processing.
10. The method according to any one of claims 1-9, characterized in that, The degree of suppression of audio intensity is used to indicate the degree of suppression of audio intensity parameters, which include one or more of the following: amplitude, energy, or loudness.
11. An electronic device, characterized in that, include: A memory, one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the audio playback method as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the audio playback method as described in any one of claims 1-10.
13. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the audio playback method as described in any one of claims 1-10.
14. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the audio playback method as described in any one of claims 1-10.
Citation Information
Patent Citations
Audio processing method and device, and audio device
CN109195068A
Sound mixing method and device and terminal equipment
CN110600062A
Method for operating hearing aid and hearing aid
CN114071341A