Audio system and terminal device
The audio system improves audio quality and battery life in terminal devices by incorporating a high-power audio amplifier and dynamic stream adjustment, addressing poor audio quality issues in existing systems.
Patent Information
- Application Number
- EP2024858112
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-04
- Filing Date
- 2024-07-16
- Publication Date
- 2026-02-11
AI Technical Summary
Terminal devices deliver relatively poor audio quality due to limitations in existing audio systems powered by 4.2 V batteries.
An audio system with a high-power audio power amplifier and a second loudspeaker, dynamically adjusting treble and bass audio streams based on battery status and volume level to improve audio quality and battery life, utilizing a boost module and switch switching module to optimize power consumption.
Enhances audio quality while extending battery life by dynamically adjusting audio streams and power consumption based on battery status and volume level.
Smart Images

Figure IMGAF001_ABST
Abstract
Description
[0001] This application claims priorities to Chinese Patent Application No. 202311103334.7, filed with the China National Intellectual Property Administration on August 29, 2023 and entitled "AUDIO SYSTEM AND TERMINAL DEVICE", and to Chinese Patent Application No. 202311138519.1, filed with the China National Intellectual Property Administration on September 4, 2023 and entitled "AUDIO SYSTEM AND TERMINAL DEVICE", both of which are incorporated herein by reference in their entireties.TECHNICAL FIELD
[0002] This application relates to the field of audio technologies, and in particular, to an audio system and a terminal device.BACKGROUND
[0003] A terminal device may output audio through an audio system, to meet a requirement of a user. Currently, in an audio system of a terminal device, an audio power amplifier may be powered by a 4.2 V battery. After receiving an electrical signal, the audio power amplifier may amplify the electrical signal to drive a loudspeaker to emit a sound.
[0004] However, it is found during use that, the terminal device delivers relatively poor audio quality when outputting audio based on the audio system.SUMMARY
[0005] This application provides an audio system and a terminal device, to resolve a conventional-technology problem that a terminal device delivers relatively poor audio quality.
[0006] According to a first aspect, this application provides an audio system. The audio system includes an audio processor, a first audio power amplifier, a second audio power amplifier, a first loudspeaker, a second loudspeaker, and a buck module, a first output end of the audio processor is connected to a first input end of the first audio power amplifier, a second output end of the audio processor is connected to a first input end of the second audio power amplifier, an output end of the first audio power amplifier is connected to an input end of the first loudspeaker, an output end of the second audio power amplifier is connected to an input end of the second loudspeaker, the audio system is powered by a battery, an input end of the buck module is configured to connect to the battery, an output end of the buck module is connected to a second input end of the first audio power amplifier, and power consumption of the second audio power amplifier is greater than power consumption of the first audio power amplifier.
[0007] The audio processor is configured to: obtain audio information of a to-be-played audio stream, where the audio information includes a volume level of the to-be-played audio stream; obtain status information of the battery, where the status information includes a remaining battery level of the battery and / or a temperature of the battery; determine a treble audio stream and a bass audio stream in the to-be-played audio stream based on the audio information and the status information; output the treble audio stream to the first input end of the first audio power amplifier; and output the bass audio stream to the first input end of the second audio power amplifier.
[0008] In the system, an output power of the second audio power amplifier is greater than an output power of the first audio power amplifier, so that a driving capability of the second loudspeaker can be improved through the second audio power amplifier, thereby improving audio quality of the second loudspeaker.
[0009] In addition, the treble audio stream and the bass audio stream may be dynamically adjusted based on the volume level, the battery level, and the battery temperature. In this way, a battery life of the terminal device can be improved while improving audio quality of the terminal device.
[0010] In some possible designs, when the audio processor determines the treble audio stream and the bass audio stream in the to-be-played audio stream based on the audio information and the status information, the audio processor is specifically configured to: determine a first crossover frequency based on the audio information and the status information, where a lower remaining battery level of the battery indicates a higher first crossover frequency, a higher temperature of the battery indicates a higher first crossover frequency, and a lower volume level of the to-be-played audio stream indicates a higher first crossover frequency; determine an audio stream whose frequency is greater than the first crossover frequency in the to-be-played audio stream as the treble audio stream; determine a second crossover frequency based on the audio information and the status information, where a lower remaining battery level of the battery indicates a lower second crossover frequency, a higher temperature of the battery indicates a lower second crossover frequency, and a lower volume level of the to-be-played audio stream indicates a lower second crossover frequency; and determine an audio stream whose frequency is less than the second crossover frequency in the to-be-played audio stream as the bass audio stream.
[0011] In the system, a higher first crossover frequency indicates fewer audio streams whose frequencies are greater than the first crossover frequency in the to-be-played audio stream, namely, fewer treble audio streams input to the first audio power amplifier, and lower power consumption of the first audio power amplifier, thereby helping reduce power consumption of the battery and improve a battery life of the battery.
[0012] A lower second crossover frequency indicates fewer audio streams whose frequencies are less than the second crossover frequency in the to-be-played audio stream, namely, fewer bass audio streams input to the second audio power amplifier, and lower power consumption of the second audio power amplifier, thereby helping reduce power consumption of the battery and improve a battery life of the battery.
[0013] In some possible designs, the system further includes a boost module, a first input end of the boost module is configured to connect to the battery, and an output end of the boost module is connected to a second input end of the second audio power amplifier.
[0014] In the system, an input voltage of the second audio power amplifier may be increased through the boost module, so that the output power of the second audio power amplifier is increased, which helps further improve the audio quality of the second loudspeaker.
[0015] In some possible designs, the system further includes a switch switching module, a first input end of the switch switching module is configured to connect to the battery, a second input end of the switch switching module is connected to the output end of the boost module, an output end of the switch switching module is connected to the second input end of the second audio power amplifier, and a third input end of the switch switching module is connected to a third output end of the audio processor.
[0016] The audio processor is further configured to: control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the first input end of the switch switching module, or control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the second input end of the switch switching module.
[0017] In the system, the input voltage of the second audio power amplifier may be switched through the switch switching module, so that the input voltage of the second audio power amplifier is dynamically adjusted, which helps improve the battery life of the terminal device.
[0018] In some possible designs, when the audio processor controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module, or controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module, the audio processor is specifically configured to: when the volume level of the to-be-played audio stream is less than a preset volume level, or the remaining battery level of the battery is less than a preset battery level threshold, or the temperature of the battery is greater than a preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module; or when the volume level of the to-be-played audio stream is greater than or equal to the preset volume level, the remaining battery level of the battery is greater than or equal to the preset battery level threshold, and the temperature of the battery is less than or equal to the preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module.
[0019] In the system, the voltage of the electrical signal input by the first input end of the switch switching module may be equal to a battery voltage, the voltage of the electrical signal input by the second input end of the switch switching module may be a voltage obtained after the battery voltage is boosted, and the voltage of the electrical signal input by the first input end of the switch switching module is less than the voltage of the electrical signal input by the second input end of the switch switching module. When the volume level of the to-be-played audio stream is relatively low, or the remaining battery level of the battery is relatively small, or the temperature of the battery is relatively high, the battery voltage may be transmitted to the second audio power amplifier through the switch switching module, so that the power consumption of the second audio power amplifier is reduced. When the volume level of the to-be-played audio stream is relatively high, the remaining battery level of the battery is relatively large, and the temperature of the battery is relatively low, the boosted voltage may be transmitted to the second audio power amplifier through the switch switching module, so that the output power of the second audio power amplifier can be further improved, that is, the driving capability of the second loudspeaker can be further improved, while the battery life of the terminal device is ensured.
[0020] In some possible designs, the system further includes a pulse width modulation PWM control module, an input end of the PWM control module is connected to a fourth output end of the audio processor, and an output end of the PWM control module is connected to a second input end of the boost module.
[0021] The audio processor is further configured to: obtain PWM information, where the PWM information includes a correspondence between a plurality of volume levels and a plurality of PWM duty cycles; determine, based on the PWM information and the volume level of the to-be-played audio stream, a target PWM duty cycle corresponding to the volume level of the to-be-played audio; and control the PWM control module to update a PWM duty cycle to the target PWM duty cycle.
[0022] In the system, a PWM duty cycle may be adjusted through the PWM control module. When the second audio power amplifier is powered based on the boost module, an output voltage of the boost module may be dynamically adjusted, that is, the input voltage of the second audio power amplifier may be dynamically adjusted, which helps improve the battery life of the terminal device.
[0023] According to a second aspect, this application provides a terminal device. The terminal device includes a battery and an audio system, the audio system includes an audio processor, a first audio power amplifier, a second audio power amplifier, a first loudspeaker, a second loudspeaker, and a buck module, a first output end of the audio processor is connected to a first input end of the first audio power amplifier, a second output end of the audio processor is connected to a first input end of the second audio power amplifier, an output end of the first audio power amplifier is connected to an input end of the first loudspeaker, an output end of the second audio power amplifier is connected to an input end of the second loudspeaker, the audio system is powered by the battery, an input end of the buck module is configured to connect to the battery, an output end of the buck module is connected to a second input end of the first audio power amplifier, and power consumption of the second audio power amplifier is greater than power consumption of the first audio power amplifier.
[0024] The audio processor is configured to: obtain audio information of a to-be-played audio stream, where the audio information includes a volume level of the to-be-played audio stream; obtain status information of the battery, where the status information includes a remaining battery level of the battery and / or a temperature of the battery; determine a treble audio stream and a bass audio stream in the to-be-played audio stream based on the audio information and the status information; output the treble audio stream to the input end of the first audio power amplifier; and output the bass audio stream to the input end of the second audio power amplifier.
[0025] In some possible designs, when the audio processor determines the treble audio stream and the bass audio stream in the to-be-played audio stream based on the audio information and the status information, the audio processor is specifically configured to: determine a first crossover frequency based on the audio information and the status information, where a lower remaining battery level of the battery indicates a higher first crossover frequency, a higher temperature of the battery indicates a higher first crossover frequency, and a lower volume level of the to-be-played audio stream indicates a higher first crossover frequency; determine an audio stream whose frequency is greater than the first crossover frequency in the to-be-played audio stream as the treble audio stream; determine a second crossover frequency based on the audio information and the status information, where a lower remaining battery level of the battery indicates a lower second crossover frequency, a higher temperature of the battery indicates a lower second crossover frequency, and a lower volume level of the to-be-played audio stream indicates a lower second crossover frequency; and determine an audio stream whose frequency is less than the second crossover frequency in the to-be-played audio stream as the bass audio stream.
[0026] In some possible designs, the system further includes a boost module, a first input end of the boost module is configured to connect to the battery, and an output end of the boost module is connected to a second input end of the second audio power amplifier.
[0027] In some possible designs, the system further includes a switch switching module, a first input end of the switch switching module is configured to connect to the battery, a second input end of the switch switching module is connected to the output end of the boost module, an output end of the switch switching module is connected to the second input end of the second audio power amplifier, and a third input end of the switch switching module is connected to a third output end of the audio processor.
[0028] The audio processor is further configured to: control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the first input end of the switch switching module, or control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the second input end of the switch switching module.
[0029] In some possible designs, when the audio processor controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module, or controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module, the audio processor is specifically configured to: when the volume level of the to-be-played audio stream is less than a preset volume level, or the remaining battery level of the battery is less than a preset battery level threshold, or the temperature of the battery is greater than a preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module; or when the volume level of the to-be-played audio stream is greater than or equal to the preset volume level, the remaining battery level of the battery is greater than or equal to the preset battery level threshold, and the temperature of the battery is less than or equal to the preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module.
[0030] In some possible designs, the system further includes a pulse width modulation PWM control module, an input end of the PWM control module is connected to a fourth output end of the audio processor, and an output end of the PWM control module is connected to a second input end of the boost module.
[0031] The audio processor is further configured to: obtain PWM information, where the PWM information includes a correspondence between a plurality of volume levels and a plurality of PWM duty cycles; determine, based on the PWM information and the volume level of the to-be-played audio stream, a target PWM duty cycle corresponding to the volume level of the to-be-played audio; and control the PWM control module to update a PWM duty cycle to the target PWM duty cycle.
[0032] It may be understood that, for effects that can be obtained in the second aspect, refer to the descriptions in the first aspect. Details are not described herein.BRIEF DESCRIPTION OF DRAWINGS
[0033] FIG. 1 is a diagram of a structure of a terminal device according to an embodiment of this application; FIG. 2 is a block diagram of a software structure of a terminal device to which an embodiment of this application is applicable; FIG. 3 is a diagram of an audio system of an existing terminal device; FIG. 4 is a diagram of an audio system 400 according to an embodiment of this application; FIG. 5 is a diagram of an audio stream according to an embodiment of this application; FIG. 6 is a diagram of an audio system 400 according to another embodiment of this application; FIG. 7 is a diagram of an audio system 400 according to still another embodiment of this application; FIG. 8 is a diagram of an audio system 400 according to still another embodiment of this application; and FIG. 9 is a diagram of a terminal device according to this application. DESCRIPTION OF EMBODIMENTS
[0034] The following describes technical solutions in embodiments of this application with reference to accompanying drawings in embodiments of this application.
[0035] To clearly describe the technical solutions in embodiments of this application, terms such as "first" and "second" are used in embodiments of this application to distinguish between same items or similar items that provide basically same functions or purposes. For example, first information and second information are merely used to distinguish between different information, and do not limit a sequence of the first information and the second information. A person skilled in the art may understand that the terms such as "first" and "second" do not limit a quantity or an execution sequence, and the terms such as "first" and "second" do not indicate a definite difference.
[0036] In embodiments of this application, "at least one" means one or more, and "a plurality of" means two or more. The term "and / or" describes an association relationship between associated objects, and represents that three relationships may exist. For example, A and / or B may represent the following cases: Only A exists, both A and B exist, and only B exists, where A and B may be singular or plural. The character " / " usually indicates an "or" relationship between the associated objects. "At least one of the following items (pieces)" or a similar expression thereof indicates any combination of these items, including a single item (piece) or any combination of a plurality of items (pieces). For example, at least one item (piece) of a, b, or c may indicate a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c may be singular or plural.
[0037] A terminal device in embodiments of this application may be a wearable terminal device, for example, a mobile phone, a tablet computer, a personal computer (personal computer, PC), a smart screen, an in-vehicle infotainment device, and a smartwatch; or may be a teaching auxiliary tool (for example, a learning machine or an early education machine), a smart toy, a portable robot, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) device, a virtual reality (virtual reality, VR) device, or the like; or may be a device having a mobile office function, a device having a smart home function, a device having an audio and video entertainment function, a device supporting intelligent travel, or the like. It should be understood that a specific technology for and a specific device form of the terminal device are not limited in embodiments of this application.
[0038] To better understand embodiments of this application, the following describes a hardware structure of a terminal device in embodiments of this application. For example, FIG. 1 is a diagram of a structure of a terminal device according to an embodiment of this application.
[0039] The terminal device may include a processor 110, an interface 120 for external memory, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like.
[0040] Optionally, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, and the like.
[0041] It can be understood that, a structure illustrated in embodiments of this application does not constitute a specific limitation on the terminal device. In some other embodiments of this application, the terminal device may include more or fewer components than those shown in the figure, or a combination of some components, or splits from some components, or a different component layout. The components shown in the figure may be implemented by hardware, software, or a combination of software and hardware.
[0042] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), and a baseband processor. Different processing units may be independent components, or may be integrated into one or more processors. A memory may be further disposed in the processor 110, and is configured to store instructions and data.
[0043] The USB interface 130 is an interface that conforms to a USB standard specification, and may be specifically a mini USB interface, a micro USB interface, a USB type-C interface, or the like. The USB interface 130 may be configured to connect to a charger to charge the terminal device; or may be configured to transmit data between the terminal device and a peripheral device; or may be configured to connect to a headset for playing audio through the headset. The interface may be further configured to connect to another terminal device, for example, an AR device.
[0044] The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. The charging management module 140 may further supply power to the terminal device through the power management module 141 while charging the battery 142.
[0045] The power management module 141 is configured to connect to the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives an input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, an external memory, the camera 193, the display 194, the audio module 170, the wireless communication module 160, and the like. In some embodiments, the power management module 141 may alternatively be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may alternatively be disposed in a same component.
[0046] Optionally, in some embodiments, the power management module 141 may also be referred to as a battery management unit (power management unit, PMU), and the PWU may be configured to obtain status information of the battery 142, for example, a remaining battery level and a temperature of the battery 142.
[0047] A wireless communication function of the terminal device may be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
[0048] The antenna 1 and the antenna 2 are configured to transmit and receive an electromagnetic wave signal. An antenna in the terminal device may be configured to cover one or more communication frequency bands. Different antennas may be further reused, to improve antenna utilization.
[0049] The mobile communication module 150 may provide a wireless communication solution that is applied to the terminal device and that includes 2G, 3G, 4G, 5G, and the like. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (low noise amplifier, LNA), and the like. The mobile communication module 150 may receive an electromagnetic wave through the antenna 1, perform processing such as filtering or amplification on the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may further amplify a signal modulated by the modem processor, and convert the signal into an electromagnetic wave for radiation through the antenna 1.
[0050] The wireless communication module 160 may provide a wireless communication solution that is applied to the terminal device and that includes a wireless local area network (wireless local area network, WLAN) (for example, a wireless fidelity (wireless fidelity, Wi-Fi) network), Bluetooth (Bluetooth, BT), a global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), and the like. The wireless communication module 160 may be one or more components integrating at least one communication processor module. The wireless communication module 160 receives an electromagnetic wave through the antenna 2, performs frequency modulation and filtering processing on an electromagnetic wave signal, and sends a processed signal to the processor 110. The wireless communication module 160 may further receive a to-be-sent signal from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into an electromagnetic wave for radiation through the antenna 2.
[0051] In some embodiments, in the terminal device, the antenna 1 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the mobile phone can communicate with a network and another device by using a wireless communication technology.
[0052] The camera 193 is configured to capture a static image or a video. In some embodiments, the terminal device may include one or N cameras 193, where N is a positive integer greater than 1.
[0053] The display 194 is configured to display an image, a video, and the like. The display 194 includes a display panel. In some embodiments, the terminal device may include one or N displays 194, where N is a positive integer greater than 1.
[0054] In this embodiment of this application, the display 194 may display an interface of a preset application, an interface of a volume bar, and the like. The interface of the preset application may include a video frame, video duration, and the like. When the video frame is displayed on the display 194, the volume bar displayed on the display 194 may indicate a current volume value.
[0055] In some embodiments of this application, the preset application may include, but is not limited to, applications that can play audio, such as a video playing application, an audio playing application, a game application, a shopping application, and a social application. An audio stream of the preset application may include, but is not limited to, a relatively complete audio segment, namely, an audio segment that is currently buffered, or may be audio of several minutes or audio of more than 10 minutes, for example, audio of a song or a video.
[0056] The terminal device may implement a display function through the graphics processing unit (graphics processing unit, GPU), the display 194, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is configured to: perform mathematical and geometric computation, and render an image. The GPU may also be referred to as a display core, a visual processor, a display chip, or the like.
[0057] The terminal device may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
[0058] The video codec is configured to compress or decompress a digital video. The terminal device may support one or more video codecs. In this way, the terminal device may play or record videos in a plurality of encoding formats, such as moving picture experts group (moving picture experts group, MPEG)-1, MPEG-2, MPEG-3, and MPEG-4. In addition, the terminal device may encapsulate and play audio and video data and screen recording data.
[0059] The interface 120 for external memory may be configured to connect to an external memory card, for example, a micro SD card, to extend a storage capability of the terminal device. The external memory card communicates with the processor 110 through the interface 120 for external memory, to implement a data storage function. For example, files such as music and videos are stored in the external memory card.
[0060] The internal memory 121 may be configured to store computer-executable program code, and the executable program code includes instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an application required by at least one function (for example, a sound playing function or an image playing function) and the like in an operating system. The data storage area may store data (for example, audio data or a phone book) created during use of the terminal device.
[0061] The terminal device may implement an audio function, for example, music playing and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headset jack 170D, the application processor, and the like.
[0062] The audio module 170 is configured to convert digital audio information into an analog audio signal for output, and is configured to convert an analog audio input into a digital audio signal. The speaker 170A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The terminal device may be used to listen to music or answer a call in a hands-free mode over the speaker 170A. The receiver 170B, also referred to as an "earpiece", is configured to convert an audio electrical signal into a sound signal. When a call is answered or a voice message is listened to by using the terminal device, the receiver 170B may be put close to a human ear to listen to a voice. The microphone 170C, also referred to as a "mike" or a "mic", is configured to convert a sound signal into an electrical signal. The headset jack 170D is configured to connect to a wired headset.
[0063] The pressure sensor 180A is configured to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display 194. When a touch operation is performed on the display 194, the terminal device may detect intensity of the touch operation through the pressure sensor 180A. The terminal device may further calculate a touch position based on a detection signal of the pressure sensor 180A. The touch sensor 180B may be disposed on the display 194, and the touch sensor 180B and the display 194 form a touchscreen, which is also referred to as a "touch screen". The touch sensor 180B is configured to detect a touch operation performed on or near the touch sensor 180B. The touch sensor 180B may transfer the detected touch operation to the application processor, to determine a type of a touch event. A visual output related to the touch operation may be provided through the display 194. In some other embodiments, the touch sensor 180B may be alternatively disposed on a surface of the mobile phone and is at a location different from that of the display 194.
[0064] The button 190 includes a power button, a volume button, and the like. The button 190 may be a mechanical button, or may be a touch button. The terminal device may receive a button input, and generate a button signal input related to a user setting and function control of the terminal device. The motor 391 may generate a vibration prompt. The indicator 192 may be an indicator light, and may be configured to indicate a charging status and a battery level change, or may be configured to indicate a message, a missed call, a notification, and the like. A timer 196 may be configured to record time information. For example, when recording a video, the terminal device may record a start time point and an end time point of the video, and record duration of the recorded video.
[0065] In this embodiment of this application, for example, a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture may be used for a software system of the terminal device. In the layered architecture, an Android (Android) system, an Apple (iOS) system, or another operating system may be used. This is not limited in this embodiment of this application. The following uses an Android system with a layered architecture as an example to describe the software structure of the terminal device.
[0066] FIG. 2 is a block diagram of a software structure of a terminal device to which an embodiment of this application is applicable. In a layered architecture, a software system of the terminal device is divided into several layers, and each layer has a clear role and task. The layers communicate with each other through a software interface. In some embodiments, the system may include an application layer (applications), an application framework layer (application framework), Android runtime (Android runtime) and system libraries, a hardware abstraction layer (hardware abstraction layer, HAL), and a kernel layer (kernel).
[0067] The application layer may include a series of application packages, and the application layer runs an application by invoking an application programming interface (application programming interface, API) provided by the application framework layer.
[0068] For example, the application package may include applications such as Camera, Gallery, Calendar, Phone, Maps, Navigation, Wireless Local Area Network (wireless local area network, WLAN), Bluetooth, Music, Video, Messaging, and a lock screen application. Certainly, the application layer may further include a third-party application package, for example, a social application, a third-party music application, a third-party video application, a payment application, a shopping application, a bank application, a chat application, or a wealth management application. This is not limited in this application.
[0069] The social application may have a function of playing a video and audio. In response to an operation of playing a video by a user, the terminal device may play a video frame and audio corresponding to the video frame. In a possible design of this application, the social application may invoke, in response to the operation of playing the video by the user, a media playing interface to start (one or more) players of the system.
[0070] In some embodiments of this application, in a process in which the terminal device plays audio, the terminal device may set a volume level of the audio in response to a user operation. When the terminal device automatically plays a video, the terminal device may play, based on a set volume level, audio corresponding to the video.
[0071] The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for an application at the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include an activity manager, a window manager, a content provider, a view system, a resource manager, and an audio service. This is not limited in this embodiment of this application.
[0072] The audio service may be started in a startup phase of the terminal device, and the audio service may be used to transfer and store related audio data information of the audio module.
[0073] The Android system runtime includes a core library, a virtual machine, and a virtual machine monitor. The Android system runtime is responsible for scheduling and management of the Android system. The core library includes two parts: a function that needs to be called in Java language and a core library of Android. The application layer and the application framework layer run on the virtual machine. The virtual machine executes Java files of the application layer and the application framework layer as binary files. The virtual machine is configured to implement functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0074] The system libraries may include a plurality of functional modules, such as a surface manager, a media library, a three-dimensional graphics processing library, and a recognition algorithm module.
[0075] The surface manager is configured to: manage a display subsystem and provide fusion of two-dimensional graphics layers and three-dimensional graphics layers for a plurality of applications. The media library supports playback and recording in a plurality of commonly used audio and video formats, and static image files. The media library may support a plurality of audio and video encoding formats, such as JPG and PNG. The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, composition, layer processing, and the like. The recognition algorithm module may be used for sign language recognition, speech recognition, and text semantic recognition. The sign language recognition means recognizing a voice or a text as a sign language, the speech recognition means recognizing a sign language or a text as a voice, and the text semantic recognition means recognizing a sign language or a voice as a text.
[0076] The HAL encapsulates a Linux kernel driver, provides an interface for an upper layer, and shields an implementation detail of lower-layer hardware.
[0077] The HAL may include a Wi-Fi HAL, an audio (audio) HAL, a camera HAL, and the like.
[0078] In this embodiment of this application, the audio HAL is a core software framework of the audio module. The audio HAL may include an audio stream control module, an allowlist identification module, a volume value monitoring module, an audio data stream monitoring module, a virtual write operation module, and the like. The audio stream control module may perform a management operation on an actual audio stream, for example, may perform operations such as enabling an audio stream and disabling an audio stream.
[0079] The kernel layer is a layer between hardware and software. The kernel layer is used to drive the hardware, so that the hardware works. The kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, and the like. The audio driver is a driver layer of an audio-related component (for example, a speaker), and is mainly responsible for interaction with the hardware.
[0080] In this embodiment of this application, the audio driver may include a driver corresponding to the speaker, a driver corresponding to the receiver, and a driver corresponding to the microphone.
[0081] A hardware layer includes the display, the camera, the speaker, the receiver, the microphone, and the like.
[0082] It may be understood that the software structure of the terminal device in the embodiment shown in FIG. 2 is merely a simple example, and does not limit the scope of this application.
[0083] A terminal device may output audio through an audio system, to meet a requirement of a user. FIG. 3 is a diagram of an audio system of an existing terminal device. As shown in FIG. 3, the audio system includes an audio power amplifier and a loudspeaker. The audio power amplifier may be powered by a 4.2 V battery. After receiving an electrical signal, the audio power amplifier may amplify the electrical signal to drive the loudspeaker to emit a sound.
[0084] However, it is found during use that, the terminal device delivers relatively poor audio quality when outputting audio based on the audio system.
[0085] In view of this, this application may provide an audio system. The audio system may be used in a terminal device, to resolve a problem that a terminal device delivers poor audio quality.
[0086] In the audio system of this application, a high-power audio power amplifier is added on the basis of an original audio power amplifier. The original audio power amplifier may be referred to as a first audio power amplifier, and the first audio power amplifier may be connected to a first loudspeaker. The high-power audio power amplifier may be referred to as a second audio power amplifier, and the second audio power amplifier may be connected to a second loudspeaker. The audio system may be powered by a battery.
[0087] In the system, an output power of the second audio power amplifier is greater than an output power of the first audio power amplifier, and a driving capability of the second loudspeaker can be improved through the second audio power amplifier.
[0088] In the system, the first audio power amplifier and the second audio power amplifier may be respectively configured to receive a treble audio stream and a bass audio stream.
[0089] In this application, an audio stream whose frequency is greater than a first crossover frequency in an audio stream may be determined as the treble audio stream, and an audio stream whose frequency is less than a second crossover frequency in the audio stream may be determined as the bass audio stream.
[0090] The first crossover frequency may be dynamically adjusted based on a volume level, a battery level, and a battery temperature. For example, a lower remaining battery level of the battery indicates a higher first crossover frequency, a higher temperature of the battery indicates a higher first crossover frequency, and a lower volume level of a to-be-played audio stream indicates a higher first crossover frequency.
[0091] The second crossover frequency may also be dynamically adjusted based on the volume level, the battery level, and the battery temperature. For example, a lower remaining battery level of the battery indicates a lower second crossover frequency, a higher temperature of the battery indicates a lower second crossover frequency, and a lower volume level of the to-be-played audio stream indicates a lower second crossover frequency.
[0092] In other words, the treble audio stream and the bass audio stream may be dynamically adjusted based on the volume level, the battery level, and the battery temperature. In this way, a battery life of the terminal device can be improved while improving the audio quality of the terminal device.
[0093] Further, the audio system may further include a boost module. A battery voltage may be boosted through the boost module, so that an input voltage of the second audio power amplifier is increased, which helps increase an output power of the second audio power amplifier, and may further improve audio quality of the second loudspeaker.
[0094] Further, the audio system may further include a switch switching module. The input voltage of the second audio power amplifier may be switched through the switch switching module to a voltage output by the battery or a voltage obtained after the battery voltage is boosted.
[0095] For example, when the volume level of the audio stream is less than a preset volume level, or the remaining battery level of the battery is less than a preset battery level threshold, or the temperature of the battery is greater than a preset temperature threshold, the input voltage of the second audio power amplifier may be switched through the switch switching module to the voltage output by the battery.
[0096] For another example, when the volume level of the audio stream is greater than or equal to a preset volume level, the remaining battery level of the battery is greater than or equal to a preset battery level threshold, and the temperature of the battery is less than or equal to a preset temperature threshold, the input voltage of the second audio power amplifier may be switched through the switch switching module to the voltage obtained after the battery voltage is boosted.
[0097] The input voltage of the second audio power amplifier may be dynamically adjusted through the switch switching module, which helps improve the battery life of the terminal device.
[0098] Further, the audio system may further include a pulse width modulation (pulse width modulation, PWM) control module. A PWM duty cycle may be adjusted through the PWM control module. When the second audio power amplifier is powered based on the boost module, an output voltage of the boost module may be dynamically adjusted, that is, the input voltage of the second audio power amplifier may be dynamically adjusted, which helps improve the battery life of the terminal device.
[0099] Next, the solutions of this application are described in detail with reference to FIG. 4 to FIG. 9 in this application.
[0100] FIG. 4 is a diagram of an audio system 400 according to an embodiment of this application. As shown in FIG. 4, the audio system 400 may include an audio processor 401, a first audio power amplifier 402, a second audio power amplifier 403, a first loudspeaker 404, and a second loudspeaker 405. The audio system 400 may be used in a terminal device.
[0101] A first output end 401-1 of the audio processor 401 may be connected to a first input end 402-1 of the first audio power amplifier 402, and a second output end 401-2 of the audio processor 401 may be connected to a first input end 403-1 of the second audio power amplifier 403.
[0102] An output end 402-2 of the first audio power amplifier 402 may be connected to an input end 404-1 of the first loudspeaker 404, and an output end 403-2 of the second audio power amplifier 403 may be connected to an input end 405-1 of the second loudspeaker 405.
[0103] The audio system 400 may be powered by a battery, and the battery may be configured to supply power to the first audio power amplifier 402 and the second audio power amplifier 403.
[0104] In the system, an output voltage of the battery may be 8.4 V. In some embodiments, the battery may be formed by connecting two 4.2 V batteries in series.
[0105] In the system, power consumption of the first loudspeaker 404 may be greater than power consumption of the second loudspeaker 405. For example, the power consumption of the first loudspeaker 404 may be 4 W, and the power consumption of the second loudspeaker may be 9 W.
[0106] Optionally, there may be at least one first audio power amplifier 402. There may also be at least one first loudspeaker 404 connected to each first audio power amplifier 402.
[0107] Optionally, there may also be at least one second audio power amplifier 403. There may also be at least one second loudspeaker 405 connected to each second audio power amplifier 403.
[0108] In the system, an output power of the second audio power amplifier 403 may be greater than an output power of the first audio power amplifier 402, so that a driving capability of the second loudspeaker 405 can be improved through the second audio power amplifier 403, thereby improving audio quality of the second loudspeaker 405.
[0109] Optionally, the system may further include a buck module 406.
[0110] An input end 406-1 of the buck module 406 may be configured to connect to the battery, and an output end 406-2 of the buck module 406 may be connected to a second input end 402-3 of the first audio power amplifier 402.
[0111] The buck module 406 may be configured to: receive a first electrical signal from the battery, perform voltage bucking processing on the first electrical signal to obtain a second electrical signal, and output the second electrical signal to the first audio power amplifier 402. A voltage of the first electrical signal may be 8.4 V, and a voltage of the second electrical signal is less than the voltage of the first electrical signal. For example, the voltage of the second electrical signal may be 4.2 V.
[0112] In the system, power consumption of the first audio power amplifier 402 is less than power consumption of the second audio power amplifier 403. For example, the first audio power amplifier 402 may be an audio power amplifier in an existing audio system, and the second audio power amplifier 403 may be a high-power audio power amplifier.
[0113] In the system, the audio processor 401 may be configured to: obtain audio information of a to-be-played audio stream, where the audio information includes a volume level of the to-be-played audio stream; obtain status information of the battery, where the status information includes a remaining battery level of the battery and / or a temperature of the battery; determine a treble audio stream and a bass audio stream in the to-be-played audio stream based on the audio information and the status information; output the treble audio stream to the first input end 402-1 of the first audio power amplifier 402; and output the bass audio stream to the first input end 403-1 of the second audio power amplifier 403.
[0114] In some possible implementations, the audio processor 401 may obtain the audio information of the to-be-played audio stream through an operating system of the terminal device.
[0115] For example, the terminal device may determine the audio information of the to-be-played audio stream based on an application framework layer, and deliver the audio information to a hardware abstraction layer. After receiving the audio information, the hardware abstraction layer may send the audio information to the audio processor 401. Correspondingly, the audio processor 401 receives the audio information.
[0116] Optionally, the audio information may further include an audio type of the to-be-played audio stream.
[0117] In this application, the audio system may include a plurality of audio streams, and the to-be-played audio stream may be any one of the plurality of audio streams.
[0118] As shown in FIG. 5, it is assumed that 11 audio streams are included, and each of the 11 audio streams has a corresponding audio type, audio value, and audio name. Each audio stream has a corresponding volume level, and different audio streams may correspond to a same quantity of volume levels. In some embodiments, each audio stream may correspond to 16 volume levels.
[0119] Optionally, after a user enters a volume operation instruction on the terminal device, the terminal device may further obtain the volume operation instruction of the user by using the application framework layer, and determine a current volume level based on the volume operation instruction of the user. For example, the volume operation instruction may include increasing volume or decreasing volume.
[0120] Optionally, each audio stream has a corresponding mode (mode) or input source (input source). When delivering the audio type of the to-be-played audio stream to the hardware abstraction layer, the application framework layer may first convert the audio type of the to-be-played audio stream into a mode or an input source of the to-be-played audio stream, and then deliver the mode or the input source of the to-be-played audio stream to the hardware abstraction layer. In this way, the hardware abstraction layer may determine, based on the mode or the input source, the audio type corresponding to the mode or the input source.
[0121] In some possible implementations, the audio processor 401 may obtain the status information of the battery through the operating system of the terminal device.
[0122] For example, a kernel layer of the terminal device may obtain the status information of the battery from a PMU, and send the status information of the battery to the hardware abstraction layer. Correspondingly, after receiving the status information of the battery, the hardware abstraction layer may send the status information of the battery to the audio processor 401. Correspondingly, the audio processor 401 receives the status information of the battery.
[0123] Optionally, when determining the treble audio stream and the bass audio stream in the to-be-played audio stream based on the audio information and the status information, the audio processor 401 may be specifically configured to: determine a first crossover frequency based on the audio information and the status information of the battery, and determine an audio stream whose frequency is greater than the first crossover frequency in the to-be-played audio stream as the treble audio stream; and determine a second crossover frequency based on the audio information and the status information, and determine an audio stream whose frequency is less than the second crossover frequency in the to-be-played audio stream as the bass audio stream.
[0124] The first crossover frequency may be dynamically adjusted based on the audio information and the status information of the battery. For example, a lower remaining battery level of the battery indicates a higher first crossover frequency, a higher temperature of the battery indicates a higher first crossover frequency, and a lower volume level of a to-be-played audio stream indicates a higher first crossover frequency.
[0125] The second crossover frequency may also be dynamically adjusted based on the audio information and the status information of the battery. For example, a lower remaining battery level of the battery indicates a lower second crossover frequency, a higher temperature of the battery indicates a lower second crossover frequency, and a lower volume level of the to-be-played audio stream indicates a lower second crossover frequency.
[0126] A higher first crossover frequency indicates fewer audio streams whose frequencies are greater than the first crossover frequency in the to-be-played audio stream, namely, fewer treble audio streams input to the first audio power amplifier, and lower power consumption of the first audio power amplifier, thereby helping reduce power consumption of the battery and improve a battery life of the battery.
[0127] A lower second crossover frequency indicates fewer audio streams whose frequencies are less than the second crossover frequency in the to-be-played audio stream, namely, fewer bass audio streams input to the second audio power amplifier, and lower power consumption of the second audio power amplifier, thereby helping reduce power consumption of the battery and improve a battery life of the battery.
[0128] Further, the audio system 400 may further include a boost module 407. As shown in FIG. 6, a first input end 407-1 of the boost module 407 may be configured to connect to the battery, and an output end 407-2 of the boost module 407 may be connected to a second input end 403-3 of the second audio power amplifier 403.
[0129] The boost module 407 may be configured to: receive the first electrical signal from the battery, perform voltage boosting processing on the first electrical signal to obtain a third electrical signal, and output the third electrical signal to the second audio power amplifier 403. The voltage of the first electrical signal may be 8.4 V, and a voltage of the third electrical signal is greater than the voltage of the first electrical signal. For example, the voltage of the third electrical signal may range from 10 V to 12 V.
[0130] In the system, an input voltage of the second audio power amplifier 403 may be increased through the boost module 407, so that the output power of the second audio power amplifier 403 is increased, which helps further improve the audio quality of the second loudspeaker 405.
[0131] Further, the audio system 400 may further include a switch switching module 408. As shown in FIG. 7, a first input end 408-1 of the switch switching module 408 is configured to connect to the battery, a second input end 408-2 of the switch switching module 408 is connected to the output end 407-2 of the boost module 407, an output end 408-3 of the switch switching module 408 is connected to the second input end 403-3 of the second audio power amplifier 403, and a third input end 408-4 of the switch switching module 408 is connected to a third output end 401-3 of the audio processor 401.
[0132] The switch switching module 408 may be configured to: receive the first electrical signal from the battery or the third electrical signal from the boost module 407, and transmit the first electrical signal or the third electrical signal to the second audio power amplifier 403.
[0133] In the system, the audio processor 401 may be further configured to: control, based on the audio information and the status information of the battery, the switch switching module 408 to output a voltage of an electrical signal input by the first input end 408-1 of the switch switching module 408, or control, based on the audio information and the status information of the battery, the switch switching module 408 to output a voltage of an electrical signal input by the second input end 408-2 of the switch switching module 408.
[0134] The electrical signal input by the first input end 408-1 of the switch switching module 408 may be the first electrical signal, and the electrical signal input by the second input end 408-2 of the switch switching module 408 may be the third electrical signal.
[0135] In some possible implementations, the audio processor 401 may control, through the operating system of the terminal device, the switch switching module 408 to output the voltage of the electrical signal input by the first input end 408-1 of the switch switching module 408, or control, through the operating system of the terminal device, the switch switching module 408 to output the voltage of the electrical signal input by the second input end 408-2 of the switch switching module 408.
[0136] In the system, the input voltage of the second audio power amplifier 403 may be switched through the switch switching module 408, so that the input voltage of the second audio power amplifier 403 is dynamically adjusted, which helps improve the battery life of the terminal device.
[0137] In some possible implementations, when controlling, based on the audio information and the status information of the battery, the switch switching module 408 to output the voltage of the electrical signal input by the first input end 408-1 of the switch switching module 408, or controlling, based on the audio information and the status information of the battery, the switch switching module 408 to output the voltage of the electrical signal input by the second input end 408-2 of the switch switching module 408, the audio processor 401 may be specifically configured to: when the volume level of the to-be-played audio stream is less than a preset volume level, or the remaining battery level of the battery is less than a preset battery level threshold, or the temperature of the battery is greater than a preset temperature threshold, control the switch switching module 408 to output the voltage of the electrical signal input by the first input end 408-1 of the switch switching module 408; or when the volume level of the to-be-played audio stream is greater than or equal to a preset volume level, the remaining battery level of the battery is greater than or equal to a preset battery level threshold, and the temperature of the battery is less than or equal to a preset temperature threshold, control the switch switching module 408 to output the voltage of the electrical signal input by the second input end 408-2 of the switch switching module 408.
[0138] The preset volume level may be a volume level that is set in advance. For example, the preset volume level may be 13.
[0139] The preset battery level threshold may be a battery level threshold that is set in advance. For example, the preset battery level threshold may be 70%.
[0140] The preset temperature threshold may be a temperature threshold that is set in advance. For example, the preset temperature threshold may be 40°C.
[0141] In some possible implementations, the audio processor 401 may control, through the operating system of the terminal device, the switch switching module 408 to output the voltage of the electrical signal input by the first input end 408-1 of the switch switching module 408, or control, through the operating system of the terminal device, the switch switching module 408 to output the voltage of the electrical signal input by the second input end 408-2 of the switch switching module 408.
[0142] For example, when the volume level of the to-be-played audio stream is less than the preset volume level, or the remaining battery level of the battery is less than the preset battery level threshold, or the temperature of the battery is greater than the preset temperature threshold, the audio processor 401 may send first indication information to an HAL of the terminal device, where the first indication information indicates to control the switch switching module 408 to output the voltage of the electrical signal input by the first input end 408-1 of the switch switching module 408. Correspondingly, after receiving the first indication information, the HAL of the terminal device may deliver the first indication information to the kernel layer of the terminal device. After receiving the first indication information, the kernel layer of the terminal device drives the switch switching module 408 to output the voltage of the electrical signal input by the first input end 408-1 of the switch switching module 408.
[0143] For another example, when the volume level of the to-be-played audio stream is greater than or equal to the preset volume level, the remaining battery level of the battery is greater than or equal to the preset battery level threshold, and the temperature of the battery is less than or equal to the preset temperature threshold, the audio processor 401 may send second indication information to an HAL of the terminal device, where the second indication information indicates to control the switch switching module 408 to output the voltage of the electrical signal input by the second input end 408-2 of the switch switching module 408. Correspondingly, after receiving the second indication information, the HAL of the terminal device may deliver the second indication information to the kernel layer of the terminal device. After receiving the second indication information, the kernel layer of the terminal device drives the switch switching module 408 to output the voltage of the electrical signal input by the second input end 408-2 of the switch switching module 408.
[0144] In the system, the electrical signal input by the first input end 408-1 of the switch switching module 408 may be the first electrical signal, the electrical signal input by the second input end 408-2 of the switch switching module 408 may be the third electrical signal, and the voltage of the first electrical signal is less than the voltage of the third electrical signal. When the volume level of the to-be-played audio stream is relatively low, or the remaining battery level of the battery is relatively small, or the temperature of the battery is relatively high, the voltage of the first electrical signal may be transmitted to the second audio power amplifier 403 through the switch switching module 408, so that the power consumption of the second audio power amplifier 403 is reduced. When the volume level of the to-be-played audio stream is relatively high, the remaining battery level of the battery is relatively large, and the temperature of the battery is relatively low, the voltage of the third electrical signal may be transmitted to the second audio power amplifier 403 through the switch switching module 408, so that the output power of the second audio power amplifier 403 can be further improved, that is, the driving capability of the second loudspeaker 405 can be further improved, while the battery life of the terminal device is ensured.
[0145] Further, the audio system 400 may further include a PWM control module 409. As shown in FIG. 8, an input end 409-1 of the PWM control module 409 is connected to a fourth output end 401-4 of the audio processor 401, and an output end 409-2 of the PWM control module 409 is connected to a second input end 407-3 of the boost module 407.
[0146] The PWM control module 409 may be configured to adjust a PWM duty cycle, so that an output voltage of the boost module 407 can be dynamically adjusted, which helps improve the battery life of the terminal device.
[0147] In the system, the audio processor 401 may be further configured to: obtain PWM information, where the PWM information includes a correspondence between a plurality of volume levels and a plurality of PWM duty cycles; determine, based on the PWM information and the volume level of the to-be-played audio stream, a target PWM duty cycle corresponding to the volume level of the to-be-played audio; and control the PWM control module 409 to update a PWM duty cycle to the target PWM duty cycle.
[0148] In some possible implementations, the audio processor 401 may obtain PWM information through the operating system of the terminal device.
[0149] For example, the PWM information may be configured at the hardware abstraction layer of the terminal device in advance. The hardware abstraction layer of the terminal device may send the PWM information to the audio processor 401. Correspondingly, the audio processor 401 receives the PWM information.
[0150] In some possible implementations, the audio processor 401 may control, through the operating system of the terminal device, the PWM control module 409 to update the PWM duty cycle to the target PWM duty cycle.
[0151] For example, after determining, based on the PWM information and the volume level of the to-be-played audio stream, the target PWM duty cycle corresponding to the volume level of the to-be-played audio, the audio processor 401 may send third indication information to the HAL of the terminal device, where the third indication information indicates to control the PWM control module 409 to update the PWM duty cycle to the target PWM duty cycle. Correspondingly, after receiving the third indication information, the HAL of the terminal device may deliver the third indication information to the kernel layer of the terminal device. After receiving the third indication information, the kernel layer of the terminal device drives the PWM control module 409 to update the PWM duty cycle to the target PWM duty cycle.
[0152] Optionally, the target duty cycle may alternatively be determined by the HAL of the terminal device.
[0153] For example, the audio processor 401 may send the second indication information to the HAL of the terminal device. After receiving the second indication information, the HAL of the terminal device may determine, based on the second indication information, that the switch switching module 408 needs to be controlled to output the voltage of the electrical signal input by the second input end 408-2 of the switch switching module 408. Then, the HAL of the terminal device may determine, based on the PWM information, the target PWM duty cycle corresponding to the volume level of the to-be-played audio, and deliver third indication information to the kernel layer of the terminal device, where the third indication information indicates to control the PWM control module 409 to update a PWM duty cycle to the target PWM duty cycle. Correspondingly, after receiving the third indication information, the kernel layer of the terminal device drives the PWM control module 409 to update the PWM duty cycle to the target PWM duty cycle.
[0154] FIG. 9 is a diagram of a terminal device according to this application. The terminal device may include a battery and an audio system. The audio system includes an audio processor, a first audio power amplifier, a second audio power amplifier, a first loudspeaker, a second loudspeaker, and a buck module, a first output end of the audio processor is connected to a first input end of the first audio power amplifier, a second output end of the audio processor is connected to a first input end of the second audio power amplifier, an output end of the first audio power amplifier is connected to an input end of the first loudspeaker, an output end of the second audio power amplifier is connected to an input end of the second loudspeaker, the audio system is powered by a battery, an input end of the buck module is configured to connect to the battery, an output end of the buck module is connected to a second input end of the first audio power amplifier, and power consumption of the second audio power amplifier is greater than power consumption of the first audio power amplifier.
[0155] The audio processor may be configured to: obtain audio information of a to-be-played audio stream, where the audio information of the to-be-played audio stream includes a volume level of the to-be-played audio stream; obtain status information of the battery, where the status information of the battery includes a remaining battery level of the battery and / or a temperature of the battery; determine a treble audio stream and a bass audio stream in the to-be-played audio stream based on the audio information and the status information; output the treble audio stream to the input end of the first audio power amplifier; and output the bass audio stream to the input end of the second audio power amplifier.
[0156] For a structure and a function of the audio system in the terminal device, refer to the audio system 400 in the foregoing embodiment. Details are not described herein again.
[0157] All or a part of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, all or a part of the embodiments may be implemented in a form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on a computer, procedures or functions in embodiments of this application are all or partially executed. The computer may be a general-purpose computer, a dedicated computer, a computer network, a network device, user equipment, or another programmable apparatus. The computer program or instructions may be stored in a computer-readable storage medium, or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The computer-readable storage medium may be any usable medium that can be accessed by the computer, or a data storage device, for example, a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium, for example, a floppy disk, a hard disk, or a magnetic tape; or may be an optical medium, for example, a digital video disc; or may be a semiconductor medium, for example, a solid-state drive.
[0158] In embodiments of this application, unless otherwise stated or if there is a logic conflict, terms and / or descriptions in different embodiments are consistent and may be mutually referenced, and technical features in different embodiments may be combined into a new embodiment based on an internal logical relationship thereof.
[0159] It may be understood that various numbers in embodiments of this application are merely used for differentiation for ease of description, and are not used to limit the scope of embodiments of this application. Sequence numbers of the foregoing processes do not mean an execution sequence, and the execution sequence of the processes should be determined based on functions and internal logic of the processes.
Claims
1. An audio system, wherein the audio system comprises an audio processor, a first audio power amplifier, a second audio power amplifier, a first loudspeaker, a second loudspeaker, and a buck module, a first output end of the audio processor is connected to a first input end of the first audio power amplifier, a second output end of the audio processor is connected to a first input end of the second audio power amplifier, an output end of the first audio power amplifier is connected to an input end of the first loudspeaker, an output end of the second audio power amplifier is connected to an input end of the second loudspeaker, the audio system is powered by a battery, an input end of the buck module is configured to connect to the battery, an output end of the buck module is connected to a second input end of the first audio power amplifier, and power consumption of the second audio power amplifier is greater than power consumption of the first audio power amplifier; and the audio processor is configured to: obtain audio information of a to-be-played audio stream, wherein the audio information comprises a volume level of the to-be-played audio stream; obtain status information of the battery, wherein the status information comprises a remaining battery level of the battery and / or a temperature of the battery; determine a treble audio stream and a bass audio stream in the to-be-played audio stream based on the audio information and the status information; output the treble audio stream to the first input end of the first audio power amplifier; and output the bass audio stream to the first input end of the second audio power amplifier.
2. The system according to claim 1, wherein when the audio processor determines the treble audio stream and the bass audio stream in the to-be-played audio stream based on the audio information and the status information, the audio processor is specifically configured to: determine a first crossover frequency based on the audio information and the status information, wherein a lower remaining battery level of the battery indicates a higher first crossover frequency, a higher temperature of the battery indicates a higher first crossover frequency, and a lower volume level of the to-be-played audio stream indicates a higher first crossover frequency; determine an audio stream whose frequency is greater than the first crossover frequency in the to-be-played audio stream as the treble audio stream; determine a second crossover frequency based on the audio information and the status information, wherein a lower remaining battery level of the battery indicates a lower second crossover frequency, a higher temperature of the battery indicates a lower second crossover frequency, and a lower volume level of the to-be-played audio stream indicates a lower second crossover frequency; and determine an audio stream whose frequency is less than the second crossover frequency in the to-be-played audio stream as the bass audio stream.
3. The system according to claim 2, wherein the system further comprises a boost module, a first input end of the boost module is configured to connect to the battery, and an output end of the boost module is connected to a second input end of the second audio power amplifier.
4. The system according to claim 3, wherein the system further comprises a switch switching module, a first input end of the switch switching module is configured to connect to the battery, a second input end of the switch switching module is connected to the output end of the boost module, an output end of the switch switching module is connected to the second input end of the second audio power amplifier, and a third input end of the switch switching module is connected to a third output end of the audio processor; and the audio processor is further configured to: control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the first input end of the switch switching module, or control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the second input end of the switch switching module.
5. The system according to claim 4, wherein when the audio processor controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module, or controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module, the audio processor is specifically configured to: when the volume level of the to-be-played audio stream is less than a preset volume level, or the remaining battery level of the battery is less than a preset battery level threshold, or the temperature of the battery is greater than a preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module; or when the volume level of the to-be-played audio stream is greater than or equal to the preset volume level, the remaining battery level of the battery is greater than or equal to the preset battery level threshold, and the temperature of the battery is less than or equal to the preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module.
6. The system according to claim 5, wherein the system further comprises a pulse width modulation PWM control module, an input end of the PWM control module is connected to a fourth output end of the audio processor, and an output end of the PWM control module is connected to a second input end of the boost module; and the audio processor is further configured to: obtain PWM information, wherein the PWM information comprises a correspondence between a plurality of volume levels and a plurality of PWM duty cycles; determine, based on the PWM information and the volume level of the to-be-played audio stream, a target PWM duty cycle corresponding to the volume level of the to-be-played audio; and control the PWM control module to update a PWM duty cycle to the target PWM duty cycle.
7. A terminal device, wherein the terminal device comprises a battery and an audio system, the audio system comprises an audio processor, a first audio power amplifier, a second audio power amplifier, a first loudspeaker, a second loudspeaker, and a buck module, a first output end of the audio processor is connected to a first input end of the first audio power amplifier, a second output end of the audio processor is connected to a first input end of the second audio power amplifier, an output end of the first audio power amplifier is connected to an input end of the first loudspeaker, an output end of the second audio power amplifier is connected to an input end of the second loudspeaker, the audio system is powered by the battery, an input end of the buck module is configured to connect to the battery, an output end of the buck module is connected to a second input end of the first audio power amplifier, and power consumption of the second audio power amplifier is greater than power consumption of the first audio power amplifier; and the audio processor is configured to: obtain audio information of a to-be-played audio stream, wherein the audio information comprises a volume level of the to-be-played audio stream; obtain status information of the battery, wherein the status information comprises a remaining battery level of the battery and / or a temperature of the battery; determine a treble audio stream and a bass audio stream in the to-be-played audio stream based on the audio information and the status information; output the treble audio stream to the input end of the first audio power amplifier; and output the bass audio stream to the input end of the second audio power amplifier.
8. The terminal device according to claim 7, wherein when the audio processor determines the treble audio stream and the bass audio stream in the to-be-played audio stream based on the audio information and the status information, the audio processor is specifically configured to: determine a first crossover frequency based on the audio information and the status information, wherein a lower remaining battery level of the battery indicates a higher first crossover frequency, a higher temperature of the battery indicates a higher first crossover frequency, and a lower volume level of the to-be-played audio stream indicates a higher first crossover frequency; determine an audio stream whose frequency is greater than the first crossover frequency in the to-be-played audio stream as the treble audio stream; determine a second crossover frequency based on the audio information and the status information, wherein a lower remaining battery level of the battery indicates a lower second crossover frequency, a higher temperature of the battery indicates a lower second crossover frequency, and a lower volume level of the to-be-played audio stream indicates a lower second crossover frequency; and determine an audio stream whose frequency is less than the second crossover frequency in the to-be-played audio stream as the bass audio stream.
9. The terminal device according to claim 8, wherein the system further comprises a boost module, a first input end of the boost module is configured to connect to the battery, and an output end of the boost module is connected to a second input end of the second audio power amplifier.
10. The terminal device according to claim 9, wherein the system further comprises a switch switching module, a first input end of the switch switching module is configured to connect to the battery, a second input end of the switch switching module is connected to the output end of the boost module, an output end of the switch switching module is connected to the second input end of the second audio power amplifier, and a third input end of the switch switching module is connected to a third output end of the audio processor; and the audio processor is further configured to: control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the first input end of the switch switching module, or control, based on the audio information and the status information, the switch switching module to output a voltage of an electrical signal input by the second input end of the switch switching module.
11. The terminal device according to claim 10, wherein when the audio processor controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module, or controls, based on the audio information and the status information, the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module, the audio processor is specifically configured to: when the volume level of the to-be-played audio stream is less than a preset volume level, or the remaining battery level of the battery is less than a preset battery level threshold, or the temperature of the battery is greater than a preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the first input end of the switch switching module; or when the volume level of the to-be-played audio stream is greater than or equal to the preset volume level, the remaining battery level of the battery is greater than or equal to the preset battery level threshold, and the temperature of the battery is less than or equal to the preset temperature threshold, control the switch switching module to output the voltage of the electrical signal input by the second input end of the switch switching module.
12. The terminal device according to claim 11, wherein the system further comprises a pulse width modulation PWM control module, an input end of the PWM control module is connected to a fourth output end of the audio processor, and an output end of the PWM control module is connected to a second input end of the boost module; and the audio processor is further configured to: obtain PWM information, wherein the PWM information comprises a correspondence between a plurality of volume levels and a plurality of PWM duty cycles; determine, based on the PWM information and the volume level of the to-be-played audio stream, a target PWM duty cycle corresponding to the volume level of the to-be-played audio; and control the PWM control module to update a PWM duty cycle to the target PWM duty cycle.
Citation Information
Patent Citations
CN202311103334