Audio playing method, failure detection method of screen sounding device and electronic equipment
By monitoring the current, voltage, impedance, or admittance parameters of the screen sound-emitting device in real time, it can determine if the device is faulty and switch to speaker output, thus solving the problem of no sound or noise caused by the failure of the screen sound-emitting device and improving the reliability of electronic devices and user experience.
Patent Information
- Application Number
- CN202111094726.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-07-23
- Filing Date
- 2021-09-17
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2041-09-17
AI Technical Summary
Screen sound devices may malfunction in electronic devices, resulting in no sound or noise, which affects the user experience.
By acquiring real-time load current, voltage, impedance, or admittance parameters of the screen sound-emitting device before or during audio playback, it can determine whether the device is malfunctioning and switch to speaker output when malfunctioning, thus avoiding noise or no sound problems.
It improves the reliability of electronic devices and the user experience, and ensures the stability of audio playback.
Smart Images

Figure CN115686425B_ABST
Abstract
Description
[0001] This application claims priority to the Chinese Patent Application No. 202110839831.8, filed on July 23, 2021, and entitled "Audio playing method and device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of electronics, and in particular to an audio playing method, a failure detection method of a screen sound production device, and an electronic device. BACKGROUND
[0003] At present, many electronic devices have voice communication functions, such as mobile phones, tablets, etc. In order to realize the voice communication function, a sound production device needs to be installed in the electronic device to enable the user to hear the voice of the other party. With the requirement of screen screen ratio of electronic devices, the opening of the front panel (i.e. screen) of the electronic device needs to be reduced, and therefore a screen sound production device (such as a piezoelectric ceramic capacitive device) is usually arranged in the electronic device as a loudspeaker (such as a receiver).
[0004] During the use of the electronic device, the piezoelectric ceramic capacitive device may fail (such as breaking, electrode falling off, etc.). After the piezoelectric ceramic capacitive device fails, the electronic device may emit sound or produce noise during voice communication, affecting the user experience. SUMMARY
[0005] The embodiments of the present application provide an audio playing method, a failure detection method of a screen sound production device, and an electronic device, which can solve the problem of no sound or noise after the screen sound production device fails, thereby improving the reliability and user experience of the electronic device.
[0006] To achieve the above object, the present application adopts the following technical solutions:
[0007] In a first aspect, the present application provides an audio playing method. The audio playing method is applied to an electronic device, and the electronic device includes a screen sound production device and a loudspeaker. The audio playing method includes: receiving an audio playing instruction. The audio playing instruction is used to instruct the electronic device to play a first audio. In response to receiving the audio playing instruction, playing a detection audio through the screen sound production device. In the process of playing the detection audio, obtaining a first parameter. According to the first parameter, determining whether the screen sound production device is failed. The first parameter is at least one of a real-time load current, a real-time load voltage, a real-time impedance, and a real-time admittance of the screen sound production device. In the case that the screen sound production device is failed, switching the sound production device to the loudspeaker to play the first audio. In the case that the screen sound production device is not failed, playing the first audio through the screen sound production device, or playing the first audio through the screen sound production device and the loudspeaker simultaneously.
[0008] Based on the above audio playing method, the detection audio is played by the screen sounding device before or during playing the audio. The first parameter is acquired during playing the detection audio, and based on the first parameter, it can be determined whether the screen sounding device is invalid (such as broken, electrode falling off, etc.). In the case of determining that the screen sounding device is invalid, the sounding device is switched, such as being switched to the loudspeaker sounding. In this way, the noise or silence problem caused by the invalid screen sounding device can be avoided, the reliability of the electronic device is improved, and the user experience is improved.
[0009] In a possible implementation, the detection audio is a second audio; the second audio is an audio signal different from the first audio. In response to receiving the audio playing instruction, the detection audio is played by the screen sounding device, including: in response to receiving the audio playing instruction, the second audio is played by the screen sounding device before playing the first audio.
[0010] That is, before playing the first audio indicated by the electronic device to play, the second audio inaudible to human ears or the audio signal audible to human ears and specially used for detecting whether the screen is invalid can be played first to detect whether the screen sounding device is invalid. In this way, the power consumption caused by the electronic device detecting whether the screen sounding device is invalid in real time can be reduced.
[0011] In a possible implementation, the detection audio is the first audio. The first parameter is acquired during playing the detection audio, including: the first parameter is acquired according to a preset period during playing the detection audio; the preset period is used to indicate the time interval of twice judging whether the screen sounding device is invalid. When the first audio is used as the detection audio, the electronic device can detect whether the screen sounding device is invalid in real time (such as every 1 second). In this way, the electronic device can detect the invalidity of the screen sounding device during playing the audio, thereby improving the reliability of the electronic device.
[0012] In a possible implementation, if the battery power of the electronic device is greater than a preset threshold, the detection audio is the first audio. The first parameter is acquired during playing the detection audio, including: the first parameter is acquired according to a preset period during playing the detection audio; the preset period is used to indicate the time interval of twice judging whether the screen sounding device is invalid. Or, if the battery power of the electronic device is less than or equal to a preset threshold, the detection audio is a second audio. The second audio is an audio signal different from the first audio. In response to receiving the audio playing instruction, the detection audio is played by the screen sounding device, including: in response to receiving the audio playing instruction, the second audio is played by the screen sounding device before playing the first audio.
[0013] In this way, the timing of detecting the screen sounding device can be selected according to the battery level of the electronic device. When the battery level is greater than the preset threshold, the first audio is used as the detection audio for detecting whether the screen sounding device is failed, and the screen sounding device is detected in real time to avoid failure of the screen sounding device in playing the audio, thereby improving the reliability of the electronic device. When the battery level is less than or equal to the preset threshold, the second audio that is inaudible to human ears is used as the detection audio for detecting whether the screen sounding device is failed, and the screen sounding device is detected before the first audio is played, thereby reducing the power consumption of the electronic device.
[0014] In a possible implementation, the second audio includes a single audio signal inaudible to human ears, or an audio signal audible to human ears different from the first audio.
[0015] In a possible implementation, the audio playing instruction includes a call instruction, a music playing instruction, or a video file playing instruction.
[0016] In a possible implementation, the first parameter includes a real-time load current of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed includes: if the real-time load current of the screen sounding device is greater than a maximum value of a current threshold range or the real-time load current of the screen sounding device is less than a minimum value of the current threshold range, it is determined that the screen sounding device is failed. The current threshold range is a current range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detection audio. Generally, when the screen sounding device is failed, the load current of the screen sounding device will change greatly. In this way, whether the screen sounding device is failed can be determined according to the real-time load current of the screen sounding device.
[0017] In a possible implementation, the first parameter includes a real-time load voltage of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed includes: if the real-time load voltage of the screen sounding device is greater than a maximum value of a voltage threshold range or the real-time load voltage of the screen sounding device is less than a minimum value of the voltage threshold range, it is determined that the screen sounding device is failed. The voltage threshold range is a voltage range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detection audio. Generally, when the screen sounding device is failed, the load voltage of the screen sounding device will also change greatly. In this way, whether the screen sounding device is failed can be determined according to the real-time load voltage of the screen sounding device.
[0018] In a possible implementation, the first parameter comprises a real-time impedance of the screen sounding device. The real-time impedance of the screen sounding device is determined by a real-time load voltage and a real-time load current of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed comprises: if the real-time impedance of the screen sounding device is greater than a maximum value of an impedance threshold range or the real-time impedance of the screen sounding device is less than a minimum value of the impedance threshold range, determining that the screen sounding device is failed. The impedance threshold range is an impedance range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detection audio. It should be understood that the feedback voltage (i.e., the real-time load voltage) and the feedback current (i.e., the real-time load current) of the screen sounding device can be obtained in the smart PA hardware circuit, and the real-time impedance of the screen sounding device can be determined by the feedback voltage and the feedback current. Generally, when the screen sounding device is failed, the impedance of the screen sounding device will change greatly. In this way, whether the screen sounding device is failed can be determined by the real-time impedance of the screen sounding device.
[0019] In a possible implementation, the first parameter comprises a real-time admittance of the screen sounding device. The real-time admittance of the screen sounding device is determined by a real-time load voltage and a real-time load current of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed comprises: if the real-time admittance of the screen sounding device is greater than a maximum value of an admittance threshold range or the real-time admittance of the screen sounding device is less than a minimum value of the admittance threshold range, determining that the screen sounding device is failed. The admittance threshold range is an admittance range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detection audio. It should be understood that the feedback voltage (i.e., the real-time load voltage) and the feedback current (i.e., the real-time load current) of the screen sounding device can be obtained in the smart PA hardware circuit, and the real-time admittance of the screen sounding device can also be determined by the feedback voltage and the feedback current. Since the admittance of the screen sounding device is the inverse of the impedance of the screen sounding device, when the impedance of the screen sounding device changes greatly, the admittance of the screen sounding device will also change greatly. Therefore, whether the screen sounding device is failed can also be determined by the real-time admittance of the screen sounding device.
[0020] In a possible implementation, the real-time load current of the screen sounding device is an average value of M feedback currents detected when the screen sounding device plays N frames of the detection audio. N and M are both positive integers greater than 1. For example, a feedback current value can be obtained when the screen sounding device plays one frame of the detection audio, and N and M can be equal in this case. In this scheme, the real-time load current of the screen sounding device is an average value of multiple feedback currents, and errors caused by noise existing in a detection channel can be reduced.
[0021] In a possible implementation, the real-time load voltage of the screen sounding device is an average of M feedback voltages detected when the screen sounding device plays N frames of detection audio. N and M are both positive integers greater than 1. Similarly, in this solution, the real-time load voltage of the screen sounding device is an average of multiple feedback voltages, which can reduce errors caused by noise on the detection path.
[0022] In a possible implementation, the real-time load voltage of the screen sounding device or the real-time load current of the screen sounding device is obtained by the intelligent power amplifier module.
[0023] In a possible implementation, the method further includes displaying a preset prompt box in the case where the screen sounding device is failed. The preset prompt box includes prompt information. The prompt information is used to indicate that the screen sounding device is failed. In this way, when the screen sounding device is failed, the user is timely prompted by the electronic device that the screen sounding device is failed, and user experience can be improved.
[0024] In a possible implementation, the method further includes turning off the screen sounding device in the case where the screen sounding device is failed. In this way, the power consumption of the electronic device can be reduced, and noise caused by the failure of the screen sounding device can be avoided.
[0025] In a second aspect, the present application provides a failure detection method of a screen sounding device. The method is applied to an electronic device, and the electronic device includes a screen sounding device. The failure detection method of the screen sounding device includes: playing detection audio by the screen sounding device in response to a preset operation or based on a preset time point. The preset operation or the preset time point is used to trigger the electronic device to detect whether the screen sounding device is failed. A first parameter is obtained in the process of playing the detection audio. Whether the screen sounding device is failed is determined according to the first parameter. The first parameter is at least one of a real-time load current, a real-time load voltage, a real-time impedance, and a real-time admittance of the screen sounding device.
[0026] Based on the above failure detection method of the screen sounding device, the electronic device can detect whether the screen sounding device is failed based on a preset operation or based on a preset time point, so as to periodically detect the screen sounding device, facilitate timely informing the user that the screen sounding device is failed, and prompting the user to maintain or modify the default configuration of the electronic device, so as to improve the reliability of the electronic device.
[0027] In a possible implementation, the first parameter comprises a real-time load current of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed comprises: if the real-time load current of the screen sounding device is greater than a maximum value of a current threshold range or the real-time load current of the screen sounding device is less than a minimum value of the current threshold range, determining that the screen sounding device is failed. The current threshold range is a current range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detected audio.
[0028] In a possible implementation, the first parameter comprises a real-time load voltage of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed comprises: if the real-time load voltage of the screen sounding device is greater than a maximum value of a voltage threshold range or the real-time load voltage of the screen sounding device is less than a minimum value of the voltage threshold range, determining that the screen sounding device is failed. The voltage threshold range is a voltage range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detected audio.
[0029] In a possible implementation, the first parameter comprises a real-time impedance of the screen sounding device. The real-time impedance of the screen sounding device is determined by a real-time load voltage and a real-time load current of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed comprises: if the real-time impedance of the screen sounding device is greater than a maximum value of an impedance threshold range or the real-time impedance of the screen sounding device is less than a minimum value of the impedance threshold range, determining that the screen sounding device is failed. The impedance threshold range is an impedance range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detected audio.
[0030] In a possible implementation, the first parameter comprises a real-time admittance of the screen sounding device. The real-time admittance of the screen sounding device is determined by a real-time load voltage and a real-time load current of the screen sounding device. According to the first parameter, determining whether the screen sounding device is failed comprises: if the real-time admittance of the screen sounding device is greater than a maximum value of an admittance threshold range or the real-time admittance of the screen sounding device is less than a minimum value of the admittance threshold range, determining that the screen sounding device is failed. The admittance threshold range is an admittance range corresponding to a first frequency when the screen sounding device is not failed. The first frequency is a frequency of a center frequency point of the detected audio.
[0031] In a possible implementation, the real-time load current of the screen sounding device is an average value of M feedback currents detected when the screen sounding device plays N frames of the detected audio. N and M are both positive integers greater than 1.
[0032] In a possible implementation, the real-time load voltage of the screen sounding device is an average of M feedback voltages detected when the screen sounding device plays N frames of detection audio, where N and M are positive integers greater than 1.
[0033] In a possible implementation, the real-time load voltage of the screen sounding device or the real-time load current of the screen sounding device is obtained by the intelligent power amplifier module.
[0034] It should be understood that the technical effects in the various possible implementations described above can refer to the technical effects of the related parts in the first aspect, which will not be described here again.
[0035] In a third aspect, an electronic device is provided. The electronic device includes a screen sounding device, a speaker, one or more processors, a memory, and a communication module. The screen sounding device and the speaker are configured to play a sound signal of the electronic device. The communication module is configured to communicate with an external device. The memory stores one or more computer programs including instructions that, when executed by the processor, cause the electronic device to perform the method in any of the possible implementations of the first aspect or the second aspect.
[0036] In a fourth aspect, a chip system is provided. The chip system includes one or more interface circuits and one or more processors. The interface circuits and the processors are interconnected by a circuit. The chip system can be applied to an electronic device including a communication module and a memory. The interface circuit can read instructions stored in the memory of the electronic device and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the method in any of the possible implementations of the first aspect or the second aspect.
[0037] In a fifth aspect, a computer readable storage medium is provided. The computer readable storage medium stores instructions. When the instructions are run on an electronic device, the electronic device performs the method in any of the possible implementations of the first aspect or the second aspect.
[0038] In a sixth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer performs the method in any of the possible implementations of the first aspect or the second aspect.
[0039] It can be understood that the electronic device of the third aspect, the chip system of the fourth aspect, the computer readable storage medium of the fifth aspect, and the computer program product of the sixth aspect have the beneficial effects as described above with reference to the corresponding methods of the first aspect or the second aspect, which will not be described here again. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1A A scene diagram of a user making voice communication through an electronic device is provided for an embodiment of the present application;
[0041] Figure 1B A structure diagram of an electronic device is provided for an embodiment of the present application;
[0042] Figure 2 A comparison diagram of a screen sound production device before and after failure is provided for an embodiment of the present application;
[0043] Figure 3 A structure diagram of another electronic device is provided for an embodiment of the present application;
[0044] Figure 4 A schematic diagram of a screen sound production device is provided for an embodiment of the present application;
[0045] Figure 5 A frequency resistance characteristic curve diagram of 4.2 microfarad piezoelectric ceramic is provided for an embodiment of the present application;
[0046] Figure 6 A comparison diagram of frequency resistance characteristics of normal and abnormal screen sound production devices is provided for an embodiment of the present application;
[0047] Figure 7 A smart PA hardware circuit diagram is provided for an embodiment of the present application;
[0048] Figure 8 A flowchart of a detection method for whether a screen sound production device is failed is provided for an embodiment of the present application;
[0049] Figure 9 A flowchart of a detection method for whether a screen sound production device is failed is provided for an embodiment of the present application; Figure 2 ;
[0050] Figure 10A A flowchart of a detection method for whether a screen sound production device is failed is provided for an embodiment of the present application; Figure 3 ;
[0051] Figure 10B A flowchart of a detection method for whether a screen sound production device is failed is provided for an embodiment of the present application; Figure 4 ;
[0052] Figure 11 A flowchart of a detection method for whether a screen sound production device is failed is provided for an embodiment of the present application; Figure 5 ;
[0053] Figure 12A software structure block diagram of an electronic device provided for an embodiment of the present application;
[0054] Figure 13A A flowchart of an audio playing method provided for an embodiment of the present application;
[0055] Figure 13B A scenario diagram of an audio playing method provided for an embodiment of the present application;
[0056] Figure 14 A flowchart of an audio playing method provided for an embodiment of the present application Figure 2 ;
[0057] Figure 15 A flowchart of an audio playing method provided for an embodiment of the present application Figure 3 ;
[0058] Figure 16 A flowchart of a failure detection method of a screen sound generating device provided for an embodiment of the present application;
[0059] Figure 17 A scenario diagram of a failure detection method of a screen sound generating device provided for an embodiment of the present application;
[0060] Figure 18 A scenario diagram of a failure detection method of a screen sound generating device provided for an embodiment of the present application Figure 2 ;
[0061] Figure 19 A structural schematic diagram of a chip system provided for an embodiment of the present application. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, “at least one” refers to one or more, and “multiple” refers to two or more than two. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same functions and roles are distinguished by using “first”, “second” and the like. Those skilled in the art can understand that “first”, “second” and the like do not limit the quantity and execution order, and “first”, “second” and the like also do not necessarily mean different.
[0063] At present, many electronic devices have voice communication function or audio playing function. In order to realize the voice communication function, a sound emitting device needs to be installed in the electronic device so that the user can hear the voice of the opposite party during voice communication. Similarly, in order to realize the audio playing function, a sound emitting device also needs to be installed in the electronic device. Taking the electronic device such as a mobile phone realizing the voice communication function as an example, a receiver (which can also be referred to as a loudspeaker) is arranged at the top of the mobile phone as a sound emitting device for voice communication, so as to realize the voice communication function. Usually, the receiver is arranged inside the mobile phone, and a hole is formed on the front panel of the mobile phone to form a sound outlet hole. When the receiver emits sound, the sound energy emitted by the receiver can be transmitted through the sound outlet hole, so that the user can hear the sound emitted by the receiver. However, with the continuous development of mobile phones, in order to provide a better screen viewing experience for users, the screen ratio of the mobile phone is getting higher and higher. Since the sound outlet hole arranged on the front panel occupies part of the area of the front panel of the mobile phone, it will increase the width of the frame of the mobile phone, and thus will affect the increase of the screen ratio of the mobile phone.
[0064] With the development of large screens and full-screen mobile phones, in order to improve the screen ratio of the mobile phone, it is necessary to reduce the area occupied by the sound outlet hole of the receiver on the front panel of the mobile phone. For example, the sound outlet hole of the receiver of the mobile phone is designed in the form of a long slit, and the sound outlet hole is located at the connection between the middle frame and the front panel of the mobile phone (which can also be referred to as the side slit of the mobile phone). In some cases, in order to ensure that the sound outlet hole of the receiver of the mobile phone has good sound outlet effect, a hole can also be formed on the top of the middle frame as a sound outlet hole. In this case, when the user uses the mobile phone for voice communication, the pinna of the user cannot completely cover the sound outlet hole, and the sound energy of the receiver of the mobile phone cannot be completely transmitted into the pinna of the user, thereby causing the sound leakage phenomenon.
[0065] Exemplarily, taking the mobile phone as an example, during the process in which the user holds the mobile phone and uses the receiver for voice communication, the receiver of the mobile phone is used to play the voice signal of the user on the opposite side during the voice communication (i.e., the receiver of the mobile phone is the loudspeaker used for sound emission during the conversation in the voice communication). Figure 1A As shown in the figure, the sound outlet hole 201 of the receiver of the mobile phone is close to the ear (or pinna) of the user. At this time, since the sound outlet hole 201 of the receiver of the mobile phone (such as the sound outlet hole located at the side slit of the mobile phone and the sound outlet hole on the top of the middle frame) cannot be completely covered by the ear of the user, the voice signal emitted by the sound outlet hole 201 can not only be heard by the user, but also can be heard by other users in a quiet environment, thereby causing the sound leakage phenomenon.
[0066] In order to avoid the sound leakage phenomenon when the receiver emits sound, some electronic devices use screen sound emission to replace the sound emission of the receiver, or use screen sound emission and receiver sound emission at the same time. For example, as shown in the figure, Figure 1BAs shown, it is a structural schematic diagram of an electronic device. The electronic device comprises a housing structure 100. The housing structure 100 is formed by a front panel (including a screen and a frame), a back panel for supporting internal circuits, and a middle frame. As shown in (a) of FIG. 1, Figure 1B As shown in (a) of FIG. 1, the housing structure 100 of the electronic device is provided with a receiver 101 and a screen sound generating device 104. The receiver 101 is a loudspeaker for sound generation in voice communication, also known as a receiver, and is usually arranged at the top of the housing structure. The screen sound generating device 104 can be a vibration source connected below the screen. As shown in (b) of FIG. 1, Figure 1B As shown in (b) of FIG. 1, corresponding to the receiver 101, the electronic device is provided with two sound outlets, namely sound outlet 102 and sound outlet 103. The sound outlet 102 is located at the connection between the front panel and the middle frame of the electronic device (i.e. the side seam). The sound outlet 103 is located on the middle frame of the electronic device at a position close to the receiver (i.e. the top position of the middle frame of the electronic device). In this way, the Figure 1B As shown in FIG. 1, the electronic device can generate sound through the receiver, or through the screen, or through the receiver and the screen simultaneously, to avoid the leakage phenomenon of the receiver sound alone.
[0067] It should be understood that the specific structure of the screen sound generating device in the electronic device is different for different screen sound generation schemes. For example, the screen sound generating device can be a vibration source (such as a piezoelectric ceramic, a motor vibrator, an exciter or other vibration units) connected to the back of the screen. The vibration source can vibrate under the control of the current signal to drive the screen to vibrate, thereby realizing screen sound generation. For another example, the screen sound generating device can also be a piezoelectric ceramic fixed on the middle frame of the electronic device through a cantilever beam structure. The piezoelectric ceramic can vibrate under the control of the current signal, and the vibration is transmitted to the screen through the middle frame of the mobile phone to drive the screen to vibrate, thereby realizing screen sound generation. For another example, the screen sound generating device can also be an exciter fixed on the middle frame of the electronic device. The exciter can vibrate under the control of the current signal, and the vibration is transmitted to the screen through the middle frame of the mobile phone to drive the screen to vibrate, thereby realizing screen sound generation. For another example, the screen sound generating device can also be a split type magnetic levitation vibrator. One of the two vibrators in the split type magnetic levitation vibrator is fixed on the middle frame of the electronic device, and the other is fixed on the screen. The vibrator fixed on the screen vibrates relative to the vibrator fixed on the middle frame of the electronic device under the control of the current signal, thereby pushing the screen to vibrate to realize screen sound generation.
[0068] However, as shown in FIG. 2, Figure 2As shown, the electronic device (such as a mobile phone) using the screen sound emitting device can emit normal sound signals under the normal condition of the screen sound emitting device. With the long-time use of the electronic device, the screen sound emitting device (such as a piezoelectric ceramic) can fail (such as cracking, depolarization, etc.), thereby causing the screen sound emitting device to be silent or to have noise, and making the electronic device unable to normally play sound signals (such as voice communication or playing music), and further affecting the user experience.
[0069] To solve the above problems, the present application provides an audio playing method. In the audio playing method, before playing the audio or in the process of playing the audio, it is detected whether the screen sound emitting device fails (such as cracking, electrode falling off, etc.), and the sound emitting device is switched to, such as a loudspeaker, in the case that the screen sound emitting device fails, thereby avoiding the noise or silence problem caused by the failure of the screen sound emitting device, and improving the user experience.
[0070] In the following, the audio playing method provided by the present application will be described in combination with the drawings.
[0071] For example, the electronic device in the present application can be a mobile phone, a tablet computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch, a smart bracelet), and the like, and the electronic device provided in the present application is not limited to a specific form.
[0072] For example, taking the electronic device as a mobile phone as an example, Figure 3 The structure of another electronic device provided by the present application is shown. That is, for example, Figure 3 The electronic device shown can be a mobile phone.
[0073] For example, Figure 3As shown, the mobile phone can include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver (i.e., an earpiece) 370B, a microphone 370C, a headset jack 370D, a sensor module 380, a key 390, a motor 391, an indicator 392, a camera 393, a display screen 394, a subscriber identification module (SIM) card interface 395, a screen sound production device 396, and the like.
[0074] The sensor module can include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0075] It can be understood that the structure shown in the embodiment does not constitute a specific limitation on the mobile phone. In other embodiments, the mobile phone can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0076] The processor 310 can include one or more processing units, for example: the processor 310 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), and the like. Different processing units can be independent devices, or can be integrated into one or more processors.
[0077] The controller can be the nerve center and command center of the mobile phone. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.
[0078] The DSP can include a smart PA hardware circuit, a smart PA algorithm module, and an audio algorithm module. The smart PA hardware circuit can be connected to the application processor and a screen sounding device (e.g., a piezoelectric ceramic) respectively, and used to control the screen sounding device to sound according to the instruction of the application processor. It should be understood that, in general, the smart PA hardware circuit can also be used to detect the feedback current and the feedback voltage of the screen sounding device during the process that the screen sounding device plays audio, and calculate the impedance or admittance of the screen sounding device according to the feedback current and the feedback voltage of the screen sounding device. The admittance is the inverse of the impedance. The calculated impedance or admittance of the screen sounding device can be used to control the physical parameters (e.g., temperature, amplitude) of the screen sounding device (e.g., piezoelectric ceramic).
[0079] In the embodiments of the present application, the smart PA algorithm module is used to determine whether the screen sounding device (e.g., piezoelectric ceramic) is invalid (abnormal) according to the feedback voltage, the feedback current, or the impedance or admittance of the screen sounding device (e.g., piezoelectric ceramic) calculated according to the feedback voltage and the feedback current. The smart PA algorithm module is also used to report the result when the screen sounding device (e.g., piezoelectric ceramic) is abnormal, and report to the audio algorithm module. The audio algorithm module is used to control the switching of the sounding device, such as switching the screen sounding device (e.g., piezoelectric ceramic, i.e., a capacitive device) to a loudspeaker to sound.
[0080] It should be understood that the smart PA hardware circuit can also be arranged outside the DSP chip, and the embodiments of the present application do not make special limitations.
[0081] The processor 310 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory can save instructions or data that have just been used or are repeatedly used by the processor 310. If the processor 310 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 310, thereby improving the efficiency of the system.
[0082] In some embodiments, the processor 310 can include one or more interfaces. The interfaces can 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.
[0083] It can be understood that the interface connection relationship between the modules shown in the embodiments is only illustrative and does not constitute a structural limitation of the mobile phone. In other embodiments, the mobile phone can also use different interface connection modes or combinations of multiple interface connection modes.
[0084] In the embodiments of the present application, the electronic device can determine the category of the current listening environment through the processor 310, and then adjust the frequency band of the earpiece sound and the frequency band of the screen sound according to the category, respectively, to control the earpiece and the screen to sound to play the sound in the corresponding frequency band in the sound signal respectively, so as to avoid the electronic device from missing sound when a person listens to sound in a quiet environment.
[0085] The charging management module 340 is configured to receive charging input from a charger (such as a wireless charger or a wired charger) to charge the battery 342. The power management module 341 is configured to connect the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340 to supply power to various devices of the electronic device.
[0086] The wireless communication function of the mobile phone can be realized through the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor, and the baseband processor, etc.
[0087] Antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the phone can be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, antenna 1 can be multiplexed as a diversity antenna for wireless local area networks. In some other embodiments, the antennas can be used in combination with tuning switches.
[0088] In some embodiments, antenna 1 of the phone is coupled with the mobile communication module 350, and antenna 2 is coupled with the wireless communication module 360, so that the phone can communicate with networks and other devices through wireless communication technologies. The mobile communication module 350 described above can provide solutions for wireless communication including 2G / 3G / 4G / 5G, etc. applied in the phone. The mobile communication module 350 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves from antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation.
[0089] The mobile communication module 350 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic wave radiation through antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 350 can be arranged in the processor 310. In some embodiments, at least part of the functional modules of the mobile communication module 350 and at least part of the modules of the processor 310 can be arranged in the same device.
[0090] The wireless communication module 360 can provide solutions for wireless communication including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied in the phone.
[0091] The wireless communication module 360 can be one or more devices integrated with at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and transmits the processed signals to the processor 310. The wireless communication module 360 can also receive signals to be transmitted from the processor 310, perform frequency modulation and amplification on the signals, and convert them into electromagnetic wave radiation through antenna 2.
[0092] Of course, the wireless communication module 360 described above can also support the phone to make voice communication. For example, the phone can access a Wi-Fi network through the wireless communication module 360, and then use any application that can provide voice communication services to interact with other devices to provide voice communication services for users. For example, the application that can provide voice communication services described above can be an instant messaging application.
[0093] The phone can realize display functions through a GPU, a display screen 394, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 can include one or more GPUs that execute program instructions to generate or change display information. The display screen 394 is used to display images, videos, etc.
[0094] The phone can realize the shooting function through an ISP, a camera 393, a video codec, a GPU, a display screen 394, and an application processor, etc. The ISP is used to process data fed back by the camera 393. In some embodiments, the ISP can be arranged in the camera 393. The camera 393 is used to capture still images or videos. In some embodiments, the phone can include one or N cameras 393, N being a positive integer greater than 1.
[0095] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to realize the expansion of the storage capacity of the phone. The internal memory 321 can be used to store computer executable program codes, including instructions. The processor 310 executes various functional applications of the phone and data processing by running the instructions stored in the internal memory 321. For example, in the embodiments of the present application, the processor 310 can execute the instructions stored in the internal memory 321 to realize the functions of the phone. The internal memory 321 can include a program storage area and a data storage area.
[0096] The phone can realize audio functions through an audio module 370, a speaker 370A, a receiver (i.e., earpiece) 370B, a microphone 370C, an earphone interface 370D, and an application processor, etc. For example, music playing, recording, etc.
[0097] The audio module 370 is configured to convert digital audio signals into analog audio signals and output the analog audio signals, and to convert analog audio input into digital audio signals. The audio module 370 can also be configured to encode and decode audio signals. In some embodiments, the audio module 370 can be disposed in the processor 310, or some of the functional modules of the audio module 370 can be disposed in the processor 310. The speaker 370A, also referred to as a "loudspeaker", is configured to convert audio electrical signals into sound signals. The receiver 370B, also referred to as a "earpiece", is configured to convert audio electrical signals into sound signals. The microphone 370C, also referred to as a "microphone", "microphone", is configured to convert sound signals into electrical signals. The earphone interface 370D is configured to connect a wired earphone. The earphone interface 370D can be a USB interface 330, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0098] The receiver 370B (i.e., "earpiece") can be Figure 1B The earpiece 101 shown.
[0099] For example, in an embodiment of the present application, the audio module 370 can convert audio electrical signals received by the mobile communication module 350 and the wireless communication module 360 into sound signals. The sound signals are played by the receiver 370B (i.e., "earpiece") of the audio module 370, while the screen sound generating device 396 drives the screen (i.e., display screen) to play the sound signals.
[0100] The keys 390 include a power key, a volume key, and the like. The motor 391 can generate a vibration prompt. The indicator 392 can be an indicator light, which can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, and the like. The SIM card interface 395 is configured to connect a SIM card. The mobile phone can support one or N SIM card interfaces, N being a positive integer greater than 1.
[0101] Of course, it can be understood that the above Figure 3 The electronic device is a mobile phone. If the electronic device is a tablet computer, a handheld computer, a PDA, a wearable device (such as a smart watch, a smart bracelet), or other device forms, the structure of the electronic device can include fewer structures than those shown in Figure 3 , or more structures than those shown in Figure 3 , which is not limited here.
[0102] The following takes the mobile phone as an example to describe the audio playing method provided by the embodiments of the present application in detail. As described above, the audio playing method provided by the embodiments of the present application needs to detect whether the screen sounding device is failed before or during the audio playing. Therefore, the following takes the piezoelectric ceramic as an example to describe how to detect whether the screen sounding device is failed.
[0103] As shown in Figure 4 is a schematic diagram of the screen sounding device. The screen sounding device includes a multilayer piezoelectric ceramic. The multilayer piezoelectric ceramic forms a vibrating diaphragm, which can be bent and deformed to push the vibrating diaphragm to sound under the piezoelectric effect after an alternating current driving signal is applied.
[0104] Generally, the impedance of the piezoelectric ceramic (i.e. the capacitive device) satisfies the following relationship: wherein z is the impedance of the piezoelectric ceramic, C is the capacitance, and f is the frequency of the alternating current signal. As can be seen, the equivalent impedance of the piezoelectric ceramic decreases with the increase of the frequency of the input alternating current signal. For example, as shown in Figure 5 is the frequency-resistance characteristic curve of the piezoelectric ceramic with a capacitance of 4.2 microfarad (uF), the equivalent impedance of the piezoelectric ceramic with a capacitance of 4.2 microfarad (uF) is about 160 Ohm (Ohm) when the frequency of the alternating current signal is 200 Hertz (Hz), and the equivalent impedance of the piezoelectric ceramic with a capacitance of 4.2 microfarad (uF) is about 3.7 Ohm (Ohm) when the frequency of the alternating current signal is 10 k Hertz (Hz).
[0105] It should be noted that actually, the screen sounding device formed by the multilayer piezoelectric ceramic does not only include the piezoelectric ceramic (i.e. the capacitive device), but also can include electrode leads, dielectric substances, and other components, etc. Therefore, the equivalent impedance of the screen sounding device formed by the multilayer piezoelectric ceramic is a nonlinear curve, which is related to temperature, frequency, and material, etc. In addition, the frequency-resistance characteristic curve of the screen sounding device tends to be consistent in the normal case of the screen sounding device. That is, the impedance of the screen sounding device decreases with the increase of the frequency of the alternating current signal.
[0106] However, during the use of the electronic device, the screen sounding device (such as the piezoelectric ceramic) can be broken, and the inner electrode can be detached, short-circuited, broken down, or depolarized, etc. When the screen sounding device (such as the piezoelectric ceramic) is failed, the physical characteristics of the screen sounding device will change, which is usually reflected in the changes of the capacitance, impedance, load current, load voltage, and acoustic frequency response. For example, when the screen sounding device is failed, the impedance of the screen sounding device deviates from the normal value, such as becoming extremely small or extremely large. As shown in Figure 6 is a comparison of the frequency-resistance characteristic curves of the normal screen sounding device and the abnormal screen sounding device, wherein, Figure 6 the abscissa is the frequency, and the unit is Hz.Figure 6 The ordinate is impedance, unit: ohm (Ω). From Figure 6 it can be seen that the impedance of the abnormal screen sound device (i.e. the failed screen sound device) is much larger than that of the normal screen sound device, and the frequency-impedance characteristic curve of the abnormal screen sound device has a large fluctuation. It should be understood that since admittance is the inverse of impedance, the admittance of the abnormal screen sound device also has a large difference from that of the normal screen sound device.
[0107] In summary, during the use of the electronic device, the load current and load voltage of the screen sound device can be detected, and the current impedance or admittance of the screen sound device can also be calculated through the load current and load voltage. Then the detected load current can be compared with the load current of the screen sound device under normal conditions, or the detected load voltage can be compared with the load voltage of the screen sound device under normal conditions, or the current impedance or admittance of the screen sound device can be compared with the impedance or admittance of the screen sound device under normal conditions, to determine whether the screen sound device is failed.
[0108] Generally, the manufacturer of the screen sound device will provide the corresponding data of the impedance-frequency of the screen sound device. For example, as shown in the following Table 1, the average impedance corresponding to different frequencies of a piezoelectric ceramic (i.e. a screen sound device) with a capacitance of about 2.5uF, and the impedance deviation.
[0109] Table 1
[0110]
[0111] Exemplarily, in the embodiments of the present application, the screen sound device (such as a piezoelectric ceramic) can also play audio signals of various frequencies under normal (not failed) conditions, such as playing single tone signals of various frequencies. When the screen sound device plays each frequency of the single tone signal, the load voltage and load current of the screen sound device are detected as the voltage threshold and current threshold of the screen sound device under normal (not failed) conditions.
[0112] It should be understood that in order to intelligently control the screen sound device, the screen sound device is usually connected with a smart PA hardware circuit.
[0113] Exemplarily, as shown in Figure 7 , it is a structural schematic diagram of a smart PA hardware circuit. Please refer to Figure 7, the screen sounding device (such as piezoelectric ceramic) is coupled to an application processor of the electronic device, and is used to detect feedback current (i.e. load current) and feedback voltage (i.e. load voltage) of the screen sounding device through the intelligent power amplifier module during playing audio by the screen sounding device, and calculate impedance of the screen sounding device according to the feedback current and the feedback voltage of the screen sounding device. The intelligent power amplifier module can control physical parameters (such as temperature, amplitude) of the screen sounding device (such as piezoelectric ceramic) according to the calculated impedance of the screen sounding device. In addition, in order to avoid burning the device due to too large current, a 4-ohm protection resistor R0 is connected in series on the current path of the screen sounding device in the hardware circuit.
[0114] The intelligent power amplifier module includes a feedback voltage / feedback current detection module, an ADC module and a digital audio module. The feedback voltage / feedback current detection module is used to detect load current and load voltage in real time, and the load current and the load voltage detected by the feedback voltage / feedback current detection module are converted into digital signals by the ADC module and transmitted to the digital audio module. The digital audio module can calculate load impedance according to the load current and the load voltage. According to the change relationship between the temperature and the impedance of the screen sounding device (such as piezoelectric ceramic), the current temperature of the screen sounding device (such as piezoelectric ceramic) can be determined. When the current temperature of the screen sounding device (such as piezoelectric ceramic) exceeds the preset temperature of the screen sounding device, the digital audio module can control the amplification adjuster to adjust the amplification multiple of the amplifier.
[0115] Similarly, after the digital audio module calculates the load impedance, the amplitude of the screen sounding device (such as piezoelectric ceramic) can be determined according to resistance, current and TS parameters of the screen sounding device (such as piezoelectric ceramic). When the amplitude of the screen sounding device is too large, such as exceeding 0.6, the digital audio module can control the amplification adjuster to adjust the amplification multiple of the amplifier to reduce the amplitude of the screen sounding device.
[0116] Thus, the intelligent power amplifier module as shown in Figure 7 can detect and obtain the load current and the load voltage of the screen sounding device. It should be understood that, since the protection resistor R0 is connected in series in the circuit, the load voltage detected by the intelligent power amplifier module is the sum of the voltage of the protection resistor R0 and the voltage of the screen sounding device (such as piezoelectric ceramic).
[0117] Exemplarily, in the embodiment of the present application, the screen sounding device can be connected to the above-mentioned Figure 7The smart PA hardware circuit shown in the figure controls the screen sounding device to play a plurality of frequency (such as 20Hz, 31.25Hz, 50Hz, 62.5Hz, 125Hz, 250Hz, 500Hz, 1000Hz, 2000Hz, 4000Hz, 19KHz, 20KHz, 22KHz, etc.) single tone signals respectively. When the screen sounding device plays a single tone signal of each frequency, the smart power amplifier module in the figure detects and obtains a plurality of sets of load voltage (i.e. feedback voltage) and load current (i.e. feedback current). For example, when the screen sounding device plays a single tone signal of 50Hz frequency, the detected load voltage and load current correspond to a frequency of 50Hz. Figure 7
[0118] It should be understood that, due to the presence of some random noise in the detection path of the load current and the load voltage, in order to reduce the error, usually a plurality of frames (such as 10 frames, 20 frames or 30 frames) of feedback voltage and feedback current of the audio signal are detected, and then the effective value of the load voltage is obtained by averaging the plurality of frames of feedback voltage, or the effective value of the load current is obtained by averaging the plurality of frames of feedback current.
[0119] Exemplarily, the effective value Z of the load voltage can be calculated by the following formula (one) rms The effective value I of the load current can be calculated by the following formula (two) rms
[0120]
[0121]
[0122] Wherein, U represents the feedback voltage, I represents the feedback current, U i represents the feedback voltage corresponding to the i-th frame of audio signal; I i represents the feedback current corresponding to the i-th frame of audio signal; n represents the sampling number of the feedback voltage U or the feedback current I.
[0123] It should be noted that, for a certain frequency, after the effective value of the load voltage and the effective value of the load current corresponding to the frequency are calculated, the load impedance Z corresponding to the frequency can be calculated by the following formula (three).
[0124]
[0125] It should be understood that, since there is a protection resistor R0 in series in the circuit, the load impedance Z calculated by formula (three) is the sum of the impedance of the protection resistor R0 and the impedance Z rms of the screen sounding device (such as piezoelectric ceramic). At this time, the impedance Z rms = Z - Ro. Taking the calculated load impedance Z = 4.194 Ω as an example, the impedance Z of the screen sound device is calculated as Z = 1.194 Ω. rms Since the admittance is the inverse of the impedance, after the impedance of the screen sound device is calculated, the inverse of the impedance is taken to obtain the admittance of the screen sound device, for example, Z = 1.194 Ω, then the admittance Y = 1 / 1.194 Ω = 0.837 Siemens (S). rms rms
[0126] In addition, the audio signal played by the screen sound device can not be a single frequency. At this time, after the feedback voltage or feedback current of the screen sound device is obtained, high-pass filtering or low-pass filtering is performed to obtain the feedback voltage or feedback current of the screen sound device at a specific frequency (such as 19 KHz or 32.5 KHz). Then, the load impedance of the screen sound device at the specific frequency is calculated according to the feedback voltage or feedback current of the screen sound device at the specific frequency.
[0127] In summary, in the production test stage of the electronic device, when the normal screen sound device plays a certain frequency of audio, the above multiple detections and calculations are performed, and the voltage range, current range, impedance range or admittance range of the screen sound device corresponding to a certain frequency when the screen sound device is normal (not failed) can be obtained. In the subsequent detection of whether the screen sound device is failed, the above voltage range, current range, impedance range or admittance range is taken as the voltage threshold range, current threshold range, impedance threshold range or admittance threshold range of the screen sound device corresponding to a certain frequency when the screen sound device is normal (not failed), which is used as the basis for judging whether the screen sound device is failed.
[0128] In the embodiments of the present application, whether the screen sound device is failed can be detected by detecting whether the real-time load current of the screen sound device exceeds the corresponding current threshold range, or by detecting whether the real-time load voltage of the screen sound device exceeds the corresponding voltage threshold range, or by detecting whether the real-time impedance of the screen sound device exceeds the corresponding impedance threshold range, or by detecting whether the real-time admittance of the screen sound device exceeds the corresponding admittance threshold range.
[0129] The failure detection method of the screen sound device is described in detail below.
[0130] In some embodiments, whether the screen sound device is failed is judged by the real-time load current of the screen sound device. As shown in FIG. 1, it is a flow chart of the detection method of whether the screen sound device is failed. Please refer to FIG. 2, the method comprises the following steps. Figure 8 Figure 8
[0131] S801, obtaining a real-time load current of the screen sounding device.
[0132] For example, during the use of the screen sounding device, such as when the electronic device plays an audio signal (i.e., a detection audio) through the screen sounding device, the real-time load current of the screen sounding device can be obtained by the smart power amplifier module as shown in Figure 7
[0133] It should be understood that the audio signal played by the electronic device through the screen sounding device can be an inaudible or difficult-to-hear single tone for human ears, such as an audio with a frequency of 20 Hz, 31.25 Hz, 50 Hz, 19 KHz, 20 KHz, 22 KHz, etc., or a normal audio signal audible to human ears, such as a voice in a call, a normally played music or an audio in a video file, or an audio specially used for detecting whether the screen sounding device is failed, etc. In addition, the audio signal played by the electronic device through the screen sounding device can also be a pilot signal (such as a signal with a frequency of 19 KHz) with a small amplitude superimposed in the normal audio signal.
[0134] To reduce errors, the feedback currents of multiple frames (such as 10 frames, 20 frames or 30 frames) of audio signals are usually detected, and then the effective value of the load current of the multiple frames of audio signals is calculated by the above formula (two) as the real-time load current I rms .
[0135] S802, determining whether the real-time load current of the screen sounding device is in a current threshold range.
[0136] It should be understood that the current threshold range is obtained in advance by analysis under the normal condition of the screen sounding device, which has been described above and will not be repeated here. In the embodiments of the present application, the current threshold range can be recorded as [Imin, Imax, F], where F represents the frequency corresponding to the current threshold range, Imin represents the lower limit of the current threshold range, and Imax represents the upper limit of the current threshold range.
[0137] Generally, if the load current of the screen sounding device is in the current threshold range, the screen sounding device is a normal device. Conversely, if the load current of the screen sounding device is not in the current threshold range, i.e., the load current of the screen sounding device exceeds the upper limit of the normal current threshold range, or the load current of the screen sounding device is lower than the lower limit of the normal current threshold range, the screen sounding device is an abnormal or failed device.
[0138] At this time, the real-time load current of the screen sounding device obtained in S801 can be compared with the current threshold range to determine whether the real-time load current of the screen sounding device is within the current threshold range. When the load current of the screen sounding device is not within the normal current threshold range, S803 can be executed to determine that the screen sounding device is invalid.
[0139] It should be understood that the current threshold range of the screen sounding device is different when the screen sounding device plays audio signals of different frequencies. In the determination process of S802, the frequency of the played audio signal needs to be determined first, and then the obtained real-time load current of the screen sounding device is compared with the current threshold range corresponding to the frequency of the audio signal.
[0140] For example, if the played audio signal is a single tone such as a 19KHz single tone when the real-time load current of the screen sounding device is obtained in S801, the real-time load current of the screen sounding device obtained in S801 can be compared with the current threshold range of the screen sounding device at a frequency of 19KHz.
[0141] For another example, if the played audio signal is a normal audio signal audible to human ears such as a voice signal in a call, normally played music or video, etc. when the real-time load current of the screen sounding device is obtained in S801, the frequency of the center frequency point of the frequency band where the main energy of the normal audio signal is located (denoted as frequency A) can be analyzed. The center frequency point of the frequency band where the main energy of the normal audio signal is located can be obtained by the intelligent power amplifier module first. The load current (i.e. feedback current) or load voltage (i.e. feedback voltage) corresponding to the continuous N frames of audio signals is obtained. Then, the load current or load voltage is converted into a frequency domain signal by fast Fourier transform (FFT), and it can be determined by analysis whether the frequency points where the main energy of the continuous N frames of audio signals is located are the same. If they are the same, the real-time load current of the screen sounding device can be calculated by the above formula (two), and the frequency corresponding to the real-time load current is frequency A. If they are different, the subsequent frame of audio signal corresponding to the load current (i.e. feedback current) is obtained, and the above steps of analyzing the center frequency point of the frequency band where the main energy of the normal audio signal is located are repeated. Finally, the real-time load current of the screen sounding device obtained in S801 can be compared with the current threshold range of the screen sounding device at frequency A.
[0142] For example, when S801 obtains the real-time load current of the screen sounding device, the played audio signal is an audio signal superimposed with a pilot signal (such as a 19 KHz signal). Since in a normal case, when the impedance of the screen sounding device sharply increases, the load current obtained by the intelligent power amplifier module will also sharply decrease compared with that of a normal device, therefore, the real-time load current obtained by S801 is compared with the current threshold range in the full frequency domain to determine whether the screen sounding device is broken. It should be understood that the current threshold range in the full frequency domain can be obtained when the screen sounding device is normal and the audio signal in the full frequency domain is played, and the obtaining method is similar to the obtaining method of the current threshold range of a single frequency described above, which will not be described here.
[0143] Of course, in this case, the real-time load current corresponding to the frequency (denoted as frequency B) of the pilot signal can also be obtained by high-pass filtering, and then the real-time load current is compared with the current threshold range of the screen sounding device at frequency B.
[0144] For example, the following code can be used to determine whether the screen sounding device is broken:
[0145] brokenFlag = false; / / by default, the screen sounding device is not broken;
[0146] if ((I rms > Imax) || (I rms < Imin)) / / the resistance exceeds the upper limit of the current threshold range or is less than the lower limit of the current threshold range;
[0147] brokenFlag = true; / / the screen sounding device is marked as broken;
[0148] S803, determine that the screen sounding device is broken.
[0149] For example, when brokenFlag = true in the above code, it can be determined that the screen sounding device is broken.
[0150] In some embodiments, the real-time load voltage is used to determine whether the screen sounding device is broken. As shown in FIG. 8, the flowchart of the method for determining whether the screen sounding device is broken is shown in FIG. 8. Please refer to FIG. 8, which comprises the following steps: Figure 9 Figure 2 Figure 9
[0151] S901, obtain the load voltage of the screen sounding device.
[0152] For example, during the use of the screen sounding device, such as when the electronic device plays an audio signal through the screen sounding device, the real-time load voltage of the screen sounding device can be obtained by using the following code: Figure 7 The illustrated intelligent power amplifier module acquires the real-time load voltage of the screen sounding device.
[0153] It should be understood that the audio signal played by the electronic device through the screen sounding device can be an inaudible or difficult-to-hear single audio for human ears, such as an audio with a frequency of 20 Hz, 31.25 Hz, 50 Hz, 19 KHz, 20 KHz, 22 KHz, etc., or a normal audio signal audible to human ears, such as a voice in a call, normally played music or audio in a video file, or an audio for detecting whether the screen sounding device is invalid, etc. In addition, the audio signal played by the electronic device through the screen sounding device can also be a pilot signal (such as a signal with a frequency of 19 KHz) with a small amplitude superimposed in the normal audio signal.
[0154] To reduce errors, the feedback voltages of multiple frames (such as 10 frames, 20 frames, or 30 frames) of audio signals are usually acquired, and then the effective value of the load voltage of the multiple frames of audio signals is calculated by the above formula (one) as the real-time load voltage U of the current screen sounding device. rms .
[0155] S902, determining whether the real-time load voltage of the screen sounding device is in the voltage threshold range.
[0156] It should be understood that the voltage threshold range is obtained in advance by analysis under the condition that the screen sounding device is normal, which has been described above and will not be described here. In the embodiment of the present application, the voltage threshold range can be recorded as [Umin, Umax, F], where F represents the frequency corresponding to the voltage threshold range, Umin represents the lower limit of the voltage threshold range, and Umax represents the upper limit of the voltage threshold range.
[0157] Generally, if the load voltage of the screen sounding device is in the voltage threshold range, the screen sounding device is a normal device. Conversely, if the load voltage of the screen sounding device is not in the voltage threshold range, that is, the load voltage of the screen sounding device exceeds the upper limit of the voltage threshold range, or the load voltage of the screen sounding device is lower than the lower limit of the voltage threshold range, then the screen sounding device is an abnormal or invalid device.
[0158] At this time, the real-time load voltage of the screen sounding device obtained according to S901 can be compared with the voltage threshold range to determine whether the real-time load voltage of the screen sounding device is in the voltage threshold range. When the real-time load voltage of the screen sounding device is not in the voltage threshold range, S903 described below can be executed to determine that the screen sounding device is invalid.
[0159] It should be understood that the voltage threshold range of the screen sounding device is different when the screen sounding device plays audio signals of different frequencies. In the judgment process of S902, the frequency of the played audio signal should be determined first, and then the acquired real-time load voltage of the screen sounding device is compared with the voltage threshold range corresponding to the frequency of the audio signal.
[0160] For example, if the audio signal played when acquiring the real-time load voltage of the screen sounding device in S901 is a single tone, such as a 19KHz single tone, the real-time load voltage of the screen sounding device acquired in S901 can be compared with the voltage threshold range of the screen sounding device at a frequency of 19KHz.
[0161] For another example, if the audio signal played when acquiring the real-time load voltage of the screen sounding device in S901 is a normal audio signal audible to the human ear, such as a voice signal in a call, normally played music or video, etc., the frequency of the center frequency point (denoted as frequency A) of the frequency band where the main energy of the above-mentioned normal audio signal is located can be analyzed (the analysis process can refer to the related description in S802 above), and then the real-time load voltage of the screen sounding device acquired in S901 can be compared with the voltage threshold range of the screen sounding device at frequency A.
[0162] For another example, if the audio signal played when acquiring the real-time load voltage of the screen sounding device in S901 is an audio signal superimposed with a pilot signal (such as a 19KHz signal). In this case, the real-time load voltage corresponding to the frequency (denoted as frequency B) of the pilot signal can be acquired by high-pass filtering, and then the real-time load voltage is compared with the voltage threshold range of the screen sounding device at frequency B.
[0163] Exemplarily, the following code can be used to determine whether the screen sounding device is broken:
[0164] brokenFlag = false; / / By default, the screen sounding device is not broken;
[0165] if ((U rms > Umax) || (U rms < Umin)) / / The resistance exceeds the upper limit of the voltage threshold range or is less than the lower limit of the voltage threshold range;
[0166] brokenFlag = true; / / The screen sounding device is marked as broken;
[0167] S903, determining that the screen sounding device is broken.
[0168] Exemplarily, when brokenFlag = true in the above code, it can be determined that the screen sounding device is broken.
[0169] In some embodiments, whether the screen sounding device is failed can be determined by the real-time impedance of the screen sounding device. As shown in Figure 10A , the flow of the method for determining whether the screen sounding device is failed Figure 3 . Please refer to Figure 10A , the method comprises:
[0170] S1001, obtaining the real-time load voltage and the real-time load current of the screen sounding device.
[0171] Exemplarily, when the electronic device plays an audio signal through the screen sounding device, the load current and the load voltage of the screen sounding device can be obtained through the smart power amplifier module as shown in Figure 7
[0172] It should be understood that the audio signal played by the electronic device through the screen sounding device can be an inaudible or difficult-to-hear single tone for human ears, such as an audio signal with a frequency of 20 Hz, 31.25 Hz, 50 Hz, 19 KHz, 20 KHz, 22 KHz, etc., or a normal audio signal audible to human ears, such as voice in a call, normally played music or audio in a video file, or an audio signal specially used for detecting whether the screen sounding device is failed, etc. In addition, the audio signal played by the electronic device through the screen sounding device can also be a pilot signal (such as a signal with a frequency of 19 KHz) with a small amplitude superimposed in the normal audio signal.
[0173] In order to reduce errors, the feedback voltage values and the feedback current values of multiple frames (such as 10 frames, 20 frames or 30 frames) of audio signals are usually obtained, and then the effective value of the load voltage of the multiple frames of audio signals is calculated by the above formula (one) as the load voltage of the current screen sounding device. The effective value of the load current of the multiple frames of audio signals is calculated by the above formula (two) as the real-time load current of the current screen sounding device.
[0174] S1002, calculating the real-time impedance value of the screen sounding device.
[0175] It should be understood that according to the real-time load voltage and the load current of the screen sounding device obtained by the above S1001, the load impedance Z can be calculated according to the above formula (three), and since Figure 7 , the smart PA hardware circuit as shown in rms is provided with a protection resistor R0, so the real-time impedance Z of the screen sounding device rms = Z - R0, that is, Z
[0176] S1003, determining whether the real-time impedance value of the screen sounding device is within the impedance threshold range.
[0177] It should be understood that the normal impedance range can be obtained from the factory parameters of the screen sound device, or can be obtained in advance by analysis under the normal condition of the screen sound device, which has been described above and will not be repeated here. In the embodiments of the present application, the impedance threshold range can be recorded as [Zmin, Zmax, F], where F represents the frequency corresponding to the impedance threshold range, Zmin represents the lower limit of the impedance threshold range, and Zmax represents the upper limit of the impedance threshold range.
[0178] Generally, if the real-time impedance of the screen sound device is within the impedance threshold range, the screen sound device is a normal device. Conversely, if the real-time impedance of the screen sound device is not within the impedance threshold range, that is, the real-time impedance of the screen sound device exceeds the upper limit of the impedance threshold range, or the real-time impedance of the screen sound device is lower than the lower limit of the impedance threshold range, then the screen sound device is an abnormal device or a failed device.
[0179] At this time, the real-time impedance of the screen sound device calculated according to S1002 can be compared with the impedance threshold range to determine whether the real-time impedance of the screen sound device is within the impedance threshold range. When the real-time impedance of the screen sound device is not within the impedance threshold range, S1004 can be executed to determine that the screen sound device is failed.
[0180] It should be understood that when the screen sound device plays audio signals of different frequencies, the impedance threshold range of the screen sound device is different. In the judgment process of S1003, the frequency of the played audio signal needs to be determined first, and then the real-time impedance of the screen sound device calculated in S1002 is compared with the impedance threshold range corresponding to the frequency of the audio signal.
[0181] For example, if the audio signal played when the load voltage and the load current of the screen sound device are obtained in S1001 is a single tone, such as a 19KHz single tone, the impedance of the screen sound device calculated in S1002 can be compared with the normal impedance range of the screen sound device at a frequency of 19KHz.
[0182] For another example, if the real-time load voltage and the real-time load current of the screen sound device are obtained in S1001, the audio signal played is a normal audio signal audible to human ears, such as a voice signal in a call, normally played music or video, etc. The frequency of the center frequency point (recorded as frequency A) of the frequency band where the main energy of the above-mentioned normal audio signal is located can be analyzed (the analysis process is described in S802 above), and then the real-time impedance of the screen sound device calculated in S1002 can be compared with the impedance threshold range of the screen sound device at frequency A.
[0183] For another example, when the S1001 obtains the real-time load voltage and real-time load current of the screen sound-emitting device, the played audio signal is an audio signal superimposed with a pilot signal (such as a 19KHz signal). In this case, after obtaining the real-time load voltage and real-time load current of the screen sound-emitting device through the intelligent power amplifier module in the above S1001, the real-time load voltage and real-time load current of the screen sound-emitting device at the frequency where the pilot signal is located (denoted as frequency B) can be obtained through high-pass filtering. Then, in S1002, the real-time load voltage and real-time load current corresponding to the frequency B are used to calculate the real-time impedance of the screen sound-emitting device through the above formula (III). Finally, the real-time impedance is compared with the impedance threshold range of the screen sound-emitting device at frequency B.
[0184] Exemplarily, the following code can be used to determine whether the screen sound-emitting device fails:
[0185] brokenFlag = false; / / By default, the screen sound-emitting device is not failed;
[0186] if ((Z rms > Zmax) || (Z rms < Zmin)); / / The impedance exceeds the upper limit of the impedance threshold range or is less than the lower limit of the impedance threshold range;
[0187] brokenFlag = true; / / The screen sound-emitting device is marked as failed;
[0188] S1004, determine that the screen sound-emitting device fails.
[0189] Exemplarily, when brokenFlag = true in the above code, it can be determined that the screen sound-emitting device fails.
[0190] In some embodiments, the real-time admittance of the screen sound-emitting device can be used to determine whether the screen sound-emitting device fails. As Figure 10B shown, it is the flowchart of the method for determining whether the screen sound-emitting device fails Figure 4 . Please refer to Figure 10B , the difference between this method and the method Figure 10B shown is that S1002 is replaced with the following S1002a, and S1003 is replaced with the following S1003a.
[0191] S1002a, calculate the real-time admittance value of the screen sound-emitting device.
[0192] After obtaining the real-time impedance Z of the screen sound-emitting device according to the above S1002 rms , the reciprocal of the real-time impedance Z of the screen sound-emitting device can be taken to obtain the real-time admittance Y of the screen sound-emitting device rms rms i.e. Y rms = 1 / Z-4.
[0193] S1003a, judging whether the real-time admittance value of the screen sounding device is in the admittance threshold range.
[0194] Similarly, in the embodiments of the present application, the admittance threshold range can be recorded as [Ymin, Ymax, F], where F represents the frequency corresponding to the admittance threshold range, Ymin represents the lower limit of the admittance threshold range, and Ymax represents the upper limit of the admittance threshold range.
[0195] Generally, if the real-time admittance of the screen sounding device is in the admittance threshold range, the screen sounding device is a normal device. Conversely, if the real-time admittance of the screen sounding device is not in the admittance threshold range, i.e. the real-time admittance of the screen sounding device exceeds the upper limit of the admittance threshold range, or the real-time admittance of the screen sounding device is lower than the lower limit of the admittance threshold range, the screen sounding device is an abnormal device or a failed device.
[0196] At this time, the real-time admittance of the screen sounding device calculated according to S1002a can be compared with the admittance threshold range to determine whether the real-time admittance of the screen sounding device is in the admittance threshold range. When the real-time admittance of the screen sounding device is not in the admittance threshold range, S1004 described above can be executed to determine that the screen sounding device is failed.
[0197] It should be understood that the admittance threshold range of the screen sounding device is different when the screen sounding device plays audio signals of different frequencies. In the judgment process of S1003a, the frequency of the played audio signal needs to be determined first, and then the real-time admittance of the screen sounding device calculated by S1002a is compared with the admittance threshold range corresponding to the frequency of the audio signal.
[0198] For example, if the played audio signal is a single tone audio, such as a 19KHz single tone audio, when the load voltage and the load current of the screen sounding device are acquired in S1001, the admittance of the screen sounding device calculated by S1002a can be compared with the admittance threshold range of the screen sounding device at the frequency of 19KHz.
[0199] For another example, if the played audio signal is a normal audio signal audible to human ears, such as a voice signal in a call, normally played music or video, etc., when the real-time load voltage and the real-time load current of the screen sounding device are acquired in S1001, the frequency of the center frequency point (recorded as frequency A) of the frequency band where the main energy of the normal audio signal is located can be analyzed (the analysis process is described above in S802), and then the real-time admittance of the screen sounding device calculated by S1002 can be compared with the admittance threshold range of the screen sounding device at the frequency A.
[0200] For example, if the real-time load voltage and the real-time load current of the screen sound device are acquired by S1001, and the played audio signal is an audio signal superimposed with a pilot signal (such as a 19 KHz signal), the relevant content described in S1003 above can be referred to, and will not be described here again.
[0201] For example, the following code can be used to determine whether the screen sound device is broken:
[0202] brokenFlag = false; / / By default, the screen sound device is not broken;
[0203] if ((Y rms > Ymax) || (Y rms < Ymin)); / / The admittance exceeds the upper limit of the admittance threshold range or is less than the lower limit of the admittance threshold range;
[0204] brokenFlag = true; / / The screen sound device is marked as broken;
[0205] It should be noted that in some device failure scenarios, such as electrode peeling, short circuit, breakdown, and the like, the impedance of the device will sharply increase at the same frequency. In this case, the load current of the broken screen sound device will sharply decrease compared with the load current of the normal screen sound device, and thus whether the screen sound device is broken (i.e., abnormal) can be determined by judging whether the load current is within the normal current range. In other device failure scenarios, such as device breakage, depolarization, and the like, the load current of the broken screen sound device can be close to the normal value (i.e., the current threshold range). In this case, whether the screen sound device is broken (i.e., abnormal) can be determined by calculating whether the impedance of the screen sound device at a certain frequency is within the impedance threshold range.
[0206] Therefore, in order to reduce the flow, save power consumption, and improve the accuracy of detection, in some embodiments, the load current and the impedance can be combined to determine whether the screen sound device is broken. As shown in FIG. 11, a flow of a method for detecting whether a screen sound device is broken Figure 11 Figure 5 . Please refer to Figure 11 , which includes the following steps.
[0207] S1101, acquiring the real-time load voltage and the real-time load current of the screen sound device.
[0208] Please refer to S1001 above, which will not be described here again.
[0209] S1102, judging whether the real-time load current of the screen sound device is within the current threshold range.
[0210] Please refer to S902 above, which will not be repeated here.
[0211] S1103, calculate the real-time impedance value or real-time admittance value of the screen sound generating device.
[0212] Please refer to S1002 or S1002a above, which will not be repeated here.
[0213] S1104, determine whether the real-time impedance value of the screen sound generating device is within the impedance threshold range, or whether the real-time admittance value of the screen sound generating device is within the admittance threshold range.
[0214] Please refer to S1004 or S1004a above, which will not be repeated here.
[0215] S1105, determine that the screen sound generating device is invalid.
[0216] The following takes a mobile phone as an example of an electronic device, and combines system architecture and flowcharts to describe in detail an audio playing method provided by the embodiments of the present application.
[0217] The software system of the electronic device (such as a mobile phone) can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to illustrate the software structure of a mobile phone. Of course, in other operating systems, as long as the functions implemented by each functional module are similar to those of the embodiments of the present application.
[0218] Figure 12 is a software structure block diagram of an electronic device according to an embodiment of the present application.
[0219] The layered architecture divides software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, which are the application layer, the application framework layer (framework), the Android runtime and system library (libraries), the HAL (hardware abstraction layer), and the kernel layer (kernel).
[0220] The application layer can include a series of application packages.
[0221] As shown in Figure 12 , the application layer can install applications such as calls, memos, browsers, contacts, cameras, galleries, calendars, maps, Bluetooth, music, videos, and short messages.
[0222] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.
[0223] As shown in Figure 12 The application framework layer is provided with an audio playing management service. The audio playing management service can be used to initialize an audio and video player, acquire a volume size of a current audio, adjust the volume size of the audio playing, increase an audio effect, etc.
[0224] In addition, the application framework layer can further include a window management service, a content providing service, a view system, a resource management service, a notification management service, etc., and the embodiments of the present application do not make any limitation in this regard.
[0225] For example, the window management service is used to manage a window program. The window management service can acquire a display screen size, judge whether there is a status bar, lock a screen, intercept a screen, etc. The content providing service is used to store and acquire data, and make the data accessible by the application program. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, a phone book, etc. The view system can be used to build a display interface of the application program. Each display interface can be composed of one or more controls. Generally, the controls can include interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. The resource management service provides various resources for the application program, such as localized strings, icons, pictures, layout files, video files, etc. The notification management service makes the application program display notification information in the status bar, which can be used to convey a notification type of message, can automatically disappear after a short stay, and does not need user interaction. For example, the notification management service is used to notify a download completion, a message reminder, etc. The notification manager can also be a notification in a form of a chart or a scrolling bar text appearing in a top status bar of the system, for example, a notification of an application program running in the background, and can also be a notification in a form of a dialog window appearing on the screen. For example, a text information is prompted in the status bar, a prompt sound is emitted, a vibration is generated, a light flashes, etc.
[0226] As shown in Figure 12 The HAL of the mobile phone is provided with HALs corresponding to different hardware modules of the mobile phone, for example, an Audio HAL, a Camera HAL, a Wi-Fi HAL, and a smart PA control HAL, etc.
[0227] The Audio HAL corresponds to the audio output device (e.g., a speaker, a screen sounding device) through the kernel layer audio driver. When the mobile phone is provided with multiple audio output devices (e.g., multiple speakers or screen sounding devices), the multiple audio output devices correspond to multiple audio drivers of the kernel layer respectively.
[0228] The smart PA control HAL corresponds to the smart PA hardware circuit through the smart PA algorithm in the DSP. For example, when the screen sounding device is disabled, the smart PA control HAL can control the smart PA algorithm to be closed and stopped running. When the screen sounding device is disabled, the smart PA control HAL can also control the smart PA hardware circuit (e.g., the hardware circuit of the screen sounding device (smart PA0)) to be closed through the I2C signal, so as to reduce the power consumption of the electronic device.
[0229] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0230] The core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
[0231] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the stack management, the thread management, the security and exception management, and the garbage collection and the like.
[0232] The system library can include multiple function modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL) and the like.
[0233] The surface manager is used to manage the display subsystem, and provides the fusion of 2D and 3D layers for multiple applications. The media library supports multiple commonly used audio, video format playback and recording, and static image files and the like. The media library can support multiple audio and video encoding formats, for example: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and the like. The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like. The 2D graphics engine is a drawing engine for 2D drawing.
[0234] The kernel layer is below the HAL and is a layer between hardware and software. In addition to the audio driver described above, the kernel layer can also include display drivers, camera drivers, sensor drivers, and the like, and the embodiments of the present application do not make any limitation thereto.
[0235] It should be noted that below the kernel layer is the hardware circuit. In the embodiments of the present application, a digital signal processing (DSP) chip is included, in which a smart PA algorithm module, an audio algorithm module, and the like are run. The smart PA algorithm module is used to determine whether the screen sound generating device (such as a piezoelectric ceramic) is invalid (abnormal) according to the load voltage, load current, and impedance or admittance of the screen sound generating device (such as a piezoelectric ceramic), and to report the result to the audio algorithm module when the screen sound generating device (such as a piezoelectric ceramic) is abnormal. The audio algorithm module controls the switching of the sound generating device, such as switching the screen sound generating device (such as a piezoelectric ceramic, i.e., a capacitive device) to a loudspeaker sound generating device.
[0236] The abnormal result detected by the smart PA algorithm module can also be reported to the HAL layer through the audio algorithm module to inform the user to replace the device or close the dual sound unit switching function. The smart PA control HAL in the HAL layer can control the impedance detection function in the smart PA algorithm to be closed, and control the smart PA hardware circuit (such as the hardware circuit of the screen sound generating device (smart PA0)) to be closed through an I2C signal, so as to reduce the power consumption of the electronic device.
[0237] The smart PA algorithm module includes a threshold writing module, a data grabbing module, an abnormality determining module, and a result reporting module.
[0238] The threshold writing module is used to write the voltage threshold range, the current threshold range, the impedance threshold range, and the admittance threshold range of the screen sound generating device (such as a piezoelectric ceramic) under normal conditions.
[0239] The data grabbing module is used to obtain the load voltage and load current of the screen sound generating device from the smart PA hardware circuit.
[0240] The abnormality judgment module can be configured to compare the load current obtained by the data grabbing module with the current threshold range in the threshold writing module, to determine whether the load current of the screen sounding device is within the current threshold range. The abnormality judgment module can also be configured to compare the load voltage obtained by the data grabbing module with the voltage threshold range in the threshold writing module, to determine whether the load voltage of the screen sounding device is within the voltage threshold range. The abnormality judgment module can also be configured to calculate the impedance or admittance of the screen sounding device according to the feedback voltage and the feedback current obtained by the data grabbing module (the specific calculation method can refer to the description of the impedance or admittance calculation above), and compare the calculated impedance with the impedance threshold range in the threshold writing module, to determine whether the impedance of the screen sounding device is within the impedance threshold range, or compare the calculated admittance with the admittance threshold range in the threshold writing module, to determine whether the admittance of the screen sounding device is within the admittance threshold range.
[0241] The result reporting module is configured to report the abnormal result of the screen sounding device to the audio algorithm module when the load current of the screen sounding device is not within the current threshold range, or when the load voltage of the screen sounding device is not within the voltage threshold range, or when the impedance of the screen sounding device is not within the impedance threshold range, or when the admittance of the screen sounding device is not within the admittance threshold range, so that the audio algorithm module switches the sounding device.
[0242] The following is a detailed description of the audio playing method provided by the embodiments of the present application.
[0243] In some embodiments, in order to save power consumption, only in the first period of time after the audio playing instruction is issued, a single audio (for example, an audio with a frequency of 20Hz, 31.25Hz, 50Hz, 19KHz, 20KHz, 22KHz, etc.) that is inaudible or difficult to hear by human ears is played to detect whether the screen sounding device is damaged, and when it is damaged, the sounding device is switched, such as being switched to a loudspeaker to sound, and then normal audio playing is started.
[0244] Exemplarily, as shown in Figure 13A The audio playing method includes the following steps.
[0245] S1301, an audio playing instruction is received. The audio playing instruction is used to instruct to play a first audio.
[0246] For example, the electronic device detects a user operation of making a call, and an upper-layer application (e.g., a call application) sends a call instruction to a processor of the electronic device. For another example, the electronic device detects a user operation of playing music, and an upper-layer application (e.g., a music application) sends a music playing instruction to the processor of the electronic device. For yet another example, the electronic device detects a user operation of playing a video file, and an upper-layer application (e.g., a video application) sends a video file playing instruction to the processor of the electronic device. The call instruction, the music playing instruction, and the video file playing instruction can all be regarded as an audio playing instruction. At this time, a DSP chip in the processor of the electronic device can control a sound emitting device (e.g., a loudspeaker or a screen sound emitting device) to obtain corresponding parameters and start, and prepare for audio playing.
[0247] S1302, in response to receiving the audio playing instruction, playing second audio through the screen sound emitting device.
[0248] Exemplarily, as shown in Figure 12 when the DSP chip receives the audio playing instruction, an audio algorithm of the DSP chip can configure the sound emitting device (e.g., a loudspeaker or a screen sound emitting device), and make the sound emitting device obtain corresponding parameters, and start the loudspeaker or the screen sound emitting device to emit sound.
[0249] At this time, in order to detect whether the screen sound emitting device is damaged, a segment of inaudible or hardly audible single audio (i.e., the second audio) can be played through the screen sound emitting device after the screen sound emitting device is started, for example, audio with an amplitude of -35 to -40 decibels (dB) and a frequency of 20 Hz, 31.25 Hz, 50 Hz, 19 KHz, 20 KHz, 22 KHz, etc.
[0250] In order to avoid that the playing time of the second audio is too long to affect the user experience, the playing time of the first audio is usually not more than 1 second.
[0251] S1303, detecting whether the screen sound emitting device is invalid.
[0252] Exemplarily, during the process of playing the second audio by the electronic device in S1302, the electronic device can perform the detection method shown in Figure 8 , Figure 9 , Figure 10A , Figure 10B or Figure 11 to determine whether the screen sound emitting device is invalid.
[0253] In the case where the screen sound emitting device is not invalid, S1304 is performed.
[0254] In the case where the screen sound emitting device is invalid, S1305 is performed.
[0255] S1304, playing the first audio.
[0256] The first audio is the audio indicated by the audio playing instruction. For example, if the audio playing instruction is issued after detecting the user's operation of making a call, the first audio can be the voice of the opposite party during the call. For another example, if the audio playing instruction is issued after detecting the user's operation of playing music, the first audio can be the music. For another example, if the audio playing instruction is issued after detecting the user's operation of playing a video file, the first audio can be the audio in the video file.
[0257] It should be understood that, in the case that the screen sounding device (such as piezoelectric ceramic) is normal, the screen sounding device can normally sound, in the case that the electronic device is provided with double-device sounding, the double-device sounding is maintained, and the first audio is played through the screen sounding device and the loudspeaker. For example, the screen sounding device plays the left channel audio of the first audio, and the loudspeaker plays the right channel audio of the first audio. Of course, the screen sounding device can also play the right channel audio of the first audio, and the loudspeaker can also play the left channel audio of the first audio. Which channel audio is played by the screen sounding device and the loudspeaker can be configured through an audio algorithm module, and the embodiments of the present application are not specially limited.
[0258] It should be understood that, in the case that the screen sounding device (such as piezoelectric ceramic) is normal, the electronic device can also play the first audio only through the screen sounding device.
[0259] S1305, switching the sounding device to the loudspeaker, and playing the first audio.
[0260] It should be understood that, in the case that the screen sounding device (such as piezoelectric ceramic) is normal, the screen sounding device can normally play audio data such as the first audio, and the screen sounding device can also have noise, affecting the user experience. In this case, after the audio algorithm module in the DSP chip receives the detection result reported by the smart PA algorithm module, the sounding device is reconfigured, and the sounding device is switched, for example, from the screen sounding device to the loudspeaker, or from the double-device sounding to the loudspeaker.
[0261] In this process, after the audio algorithm of the DSP chip receives the detection result reported by the smart PA algorithm module, the detection result of whether the screen sounding device is invalid is also reported to the application program layer to prompt the user that the screen sounding device is damaged and needs to be replaced and repaired in time. For example, if the audio playing instruction is issued after detecting the user's operation of video call, the electronic device can prompt the user that the screen sounding device is damaged and needs to be replaced and repaired in time, such as Figure 13BIn the video call interface shown in (a) of FIG. 13, the maintenance prompt box 1300 (i.e., a preset prompt box) is displayed, such as displaying the prompt information "Please note that the screen sound device has failed, and the speaker has been switched to sound, please go to the maintenance site for maintenance as soon as possible". Figure 13B In the video playing interface shown in (b) of FIG. 13, the maintenance prompt box 1300 is displayed. For another example, if the audio playing instruction is issued after detecting that the user watches the video file, the electronic device can display the maintenance prompt box 1300 in the call interface shown in (c) of FIG. 13. Figure 13B In the call interface shown in (c) of FIG. 13, the maintenance prompt box 1300 is displayed.
[0262] In addition, the electronic device can also prompt the user to change the user settings, turn off the dual sound unit switching function, etc., such as setting to sound only by the speaker.
[0263] In addition, after the audio algorithm module of the DSP chip receives the detection result reported by the smart PA algorithm module, it will also report the detection result of the failure of the screen sound device to the HAL layer. The HAL layer can also automatically turn off the dual device switching function (the dual device switching function is turned on by default) when it receives the detection result of the failure of the screen sound device. The smart PA control HAL in the HAL layer can control the impedance detection function in the smart PA algorithm to be turned off, and control the smart PA hardware circuit (such as the hardware circuit of the screen sound device (smart PA0)) to be turned off through the I2C signal, so as to reduce the power consumption of the electronic device.
[0264] It should be noted that in the audio playing method shown in Figure 13A In the audio playing method shown in
[0265] Therefore, in some other embodiments, the electronic device can detect whether the screen sound device fails in real time during the audio playing process. As shown in Figure 14 The audio playing method includes:
[0266] S1401, receiving an audio playing instruction. The audio playing instruction is used to instruct to play a first audio.
[0267] Please refer to S1301 described above, which will not be repeated here.
[0268] S1402, in response to receiving the audio playing instruction, playing the first audio through the screen sound device.
[0269] Exemplarily, as shown inFigure 12 As shown, when the DSP chip receives the audio playing instruction, in response to receiving the audio playing instruction, the audio algorithm of the DSP chip can configure the sound emitting device (such as a loudspeaker, a screen sound emitting device), and make the sound emitting device obtain the corresponding parameters, and start the loudspeaker sound emitting or the screen sound emitting device sound emitting.
[0270] At this time, the electronic device can directly play the first audio after receiving the audio playing instruction, and in the process of playing the first audio, every interval preset period performs the following S1403, detects whether the screen sound emitting device is invalid, so as to timely find the failure of the screen sound emitting device in the process of playing normal audio, reduce the possibility of appearing no sound or noise, and improve the user experience.
[0271] S1403, detecting whether the screen sound emitting device is invalid.
[0272] Exemplarily, in the process of the electronic device performing the above S1402, playing the first audio, the electronic device can perform the detection method shown in the above Figure 8 、 Figure 9 、 Figure 10A 、 Figure 10B or Figure 11 to determine whether the screen sound emitting device is invalid.
[0273] In the case where the screen sound emitting device is not invalid, S1403 is repeatedly performed every interval preset period (such as 1s, 2s).
[0274] In the case where the screen sound emitting device is invalid, the following S1404 is performed.
[0275] S1404, switching the sound emitting device to the loudspeaker, and continuing to play the first audio.
[0276] Please refer to the above S1305, which will not be repeated here.
[0277] It should be noted that in the audio playing method shown in Figure 14 , the real-time detection of whether the screen sound emitting device is invalid will be performed in the whole audio playing process, which will increase the power consumption of the electronic device.
[0278] In order to reduce the power consumption of the electronic device, the embodiment of the application further provides another audio playing method. As shown in Figure 15 , the audio playing method comprises:
[0279] S1501, receiving an audio playing instruction. The audio playing instruction is used to instruct to play a first audio.
[0280] Please refer to the above S1301, which will not be repeated here.
[0281] S1502, determining whether the battery level of the electronic device is greater than a preset threshold.
[0282] Exemplarily, the preset threshold can be 50%, 40%, 30% of the battery capacity, which can be set according to actual conditions.
[0283] When the audio playing instruction is received, if the battery level of the electronic device is greater than the preset threshold, the following S1503-S1506 are executed, and the first audio is played through the screen sounding device.
[0284] When the audio playing instruction is received, if the battery level of the electronic device is less than or equal to the preset threshold, the following S1507-S1510 are executed.
[0285] S1503, in response to receiving the audio playing instruction, starting the screen sounding device to play the first audio.
[0286] Please refer to the above S1402, which will not be repeated here.
[0287] S1504, detecting whether the screen sounding device is invalid.
[0288] Exemplarily, during the process that the electronic device executes the above S1503 to play the first audio, the electronic device can execute the detection method shown in the above Figure 8 、 Figure 9 、 Figure 10A 、 Figure 10B or Figure 11 to determine whether the screen sounding device is invalid.
[0289] In the case that the screen sounding device is not invalid, the following S1505 is executed to determine whether the battery level of the electronic device is greater than the preset threshold.
[0290] In the case that the screen sounding device is invalid, the following S1406 is executed.
[0291] S1505, determining whether the battery level of the electronic device is greater than a preset threshold.
[0292] Exemplarily, if the battery level of the electronic device is greater than the preset threshold, S1504 is repeatedly executed every preset period (such as 1s, 2s). If the battery level of the electronic device is less than or equal to the preset threshold, the above S1504 is no longer executed.
[0293] S1506, switching the sounding device to the loudspeaker and continuing to play the first audio.
[0294] Please refer to the above S1305, which will not be repeated here.
[0295] S1507, in response to receiving the audio playing instruction, playing the second audio through the screen sounding device.
[0296] Please refer to S1302 above, which will not be repeated here.
[0297] S1508, detecting whether the screen sound production device is invalid.
[0298] Please refer to S1303 above, which will not be repeated here.
[0299] S1509, playing the first audio.
[0300] Please refer to S1304 above, which will not be repeated here.
[0301] S1510, switching the sound production device to the loudspeaker and playing the first audio.
[0302] Please refer to S1305 above, which will not be repeated here.
[0303] In summary, in the audio playing method shown in Figure 15 In the audio playing method shown in Figure 14 When the battery power of the electronic device is lower than the preset threshold, the execution of S1504 is stopped, and the detection of whether the screen sound production device is invalid is stopped. When the battery power of the electronic device does not exceed the preset threshold, it means that the current power of the electronic device is small, and the audio playing method shown in Figure 13A In the audio playing method shown in
[0304] In this way, in the audio playing method provided in the embodiments of the present application, whether the screen sound production device is invalid (such as broken, electrode falling off, etc.) can be detected before or during playing the audio, and the sound production device can be switched, such as switched to the loudspeaker, when the screen sound production device is invalid, so as to avoid the noise or silence problem caused by the invalid screen sound production device, thereby improving the user experience.
[0305] The embodiments of the present application also provide a method for detecting the invalidity of a screen sound production device. As shown in Figure 16 The method for detecting the invalidity of the screen sound production device comprises:
[0306] S1601, playing a detection audio through the screen sound production device in response to a preset operation or based on a preset time point.
[0307] The preset operation or the preset time point is used to trigger the electronic device to detect whether the screen sound production device is invalid.
[0308] Exemplarily, the preset operation can be an operation of the user making a call, an operation of the user playing music, an operation of the user playing a video file, and the like. The preset operation can also be an operation of the user detecting whether the screen sound production device is invalid. For example, a start button for detecting whether the screen sound production device is invalid can be set, and the user can perform a click operation on the start button, so that the electronic device plays a detection audio through the screen sound production device to detect whether the screen sound production device is invalid. At this time, the preset operation can be the click operation of the user on the start button for detecting whether the screen sound production device is invalid. Therefore, the specific content of the user operation is not specially limited in the embodiments of the present application.
[0309] Exemplarily, as shown in (a) of FIG. 17, Figure 17 A detection option 1702 of “screen sound production device invalidity detection” is set in a setting interface 1702 in the electronic device, as shown in (a) of FIG. 17. In response to a click operation of the user on the detection option 1702, the electronic device can display a screen sound production device invalidity detection interface 1703 as shown in (b) of FIG. 17. In response to a click operation of the user on an on button 1704 in the screen sound production device invalidity detection interface 1703, the electronic device can display a detection interface 1801 as shown in (a) of FIG. 18. At this time, the electronic device can play a detection audio through the screen sound production device to perform invalidity detection on the screen sound production device. Figure 17 Figure 18
[0310] The preset time point can be a time point for the electronic device to perform invalidity detection on the screen sound production device, which can be a default setting of the electronic device before leaving the factory, or can be set by the user according to actual needs, and the embodiments of the present application are not specially limited.
[0311] The detection audio can be an audio specially used for detecting whether the screen sound production device is invalid, which can be a voiced (i.e., audible to human ears) audio, for example, an audio used for prompting the user that the screen sound production device invalidity detection is being performed, or can be a voiceless (i.e., inaudible to human ears) audio, for example, a single tone inaudible to human ears. Of course, the detection audio can also be a normal audio signal audible to human ears, such as a voice in a call, a normally played music, or an audio in a normally played video file.
[0312] S1602, a first parameter is obtained in the process of playing the detection audio. The first parameter is at least one of a real-time load current, a real-time load voltage, a real-time impedance, and a real-time admittance of the screen sound production device.
[0313] It should be understood that S1602 can correspond to the combination of S801, S901, S1001, and S1002, and the combination of S1001 and S1002a, which will not be described herein again.
[0314] S1603, determining whether the screen sounding device is failed according to the first parameter.
[0315] It should be understood that S1603 can correspond to the combination of S802 and S803, the combination of S902 and S903, the combination of S1003 and S1004, and the combination of S1003a and S1004, which will not be described here.
[0316] Of course, the electronic device can also display a detection completion prompt interface after the screen sounding device failure detection is completed. When it is determined that the screen sounding device is failed, for example, as shown in (b) of FIG. 18, the detection completion prompt interface 1802 can display the prompt information such as "Please repair the screen sounding device as soon as possible". Figure 18
[0317] Based on the above screen sounding device failure detection method, the electronic device can detect whether the screen sounding device is failed based on a preset operation or based on a preset time point, so as to periodically detect the screen sounding device, facilitate timely informing the user that the screen sounding device is failed, and prompting the user to repair or modify the default configuration of the electronic device, thereby improving the reliability of the electronic device.
[0318] An embodiment of the present application provides a chip system, as shown in FIG. 19, the chip system comprises at least one processor 1901 and at least one interface circuit 1902. The processor 1901 and the interface circuit 1902 can be interconnected through a line. For example, the interface circuit 1902 can be used to receive signals from other devices (for example, the memory of the electronic device). For another example, the interface circuit 1902 can be used to send signals to other devices (for example, the processor 1901). Figure 19 For example, the interface circuit 1902 can read the instructions stored in the memory of the electronic device and send the instructions to the processor 1901. When the instructions are executed by the processor 1901, the electronic device (for example, the electronic device shown in FIG. 19) can perform various functions or steps performed by the electronic device in the above embodiments.
[0319] Figure 3 For example, the interface circuit 1902 can read the instructions stored in the memory of the electronic device and send the instructions to the processor 1901. When the instructions are executed by the processor 1901, the electronic device (for example, the electronic device shown in FIG. 19) can perform various functions or steps performed by the electronic device in the above embodiments.
[0320] Of course, the chip system can also include other discrete devices, which are not limited in the embodiments of the present application.
[0321] Another embodiment of the present application provides a computer storage medium, which comprises computer instructions, when the computer instructions are run on an electronic device, the electronic device performs various functions or steps performed by the electronic device in the above method embodiments.
[0322] Another embodiment of the present application provides a computer program product, which, when executed on a computer, causes the computer to perform each function or step of the electronic device in the above-mentioned method embodiment.
[0323] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0324] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the above-described device embodiment is only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other form.
[0325] The unit described as a separate component can or can not be physically separated, and the component shown as a unit can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0326] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0327] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, such as a program. The software product is stored in a program product, such as a computer readable storage medium, and includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media that can store program codes.
[0328] For example, the embodiments of the present application can also provide a computer readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device implements the audio processing method as described in the foregoing method embodiments.
[0329] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An audio playing method, characterized in that, The application is applied to an electronic device, and the electronic device comprises a screen sounding device and a loudspeaker. The method comprises: receiving an audio playing instruction; the audio playing instruction is used to instruct the electronic device to play a first audio; in response to receiving the audio playing instruction, playing a detection audio through the screen sounding device; wherein, if the battery power of the electronic device is greater than a preset threshold, the detection audio is the first audio; if the battery power of the electronic device is less than or equal to the preset threshold, the detection audio is a second audio; the second audio comprises an inaudible single audio signal for human ears, or an audible audio signal for human ears different from the first audio, and the playing time length of the second audio is less than a preset time length; in the process of playing the detection audio, acquiring a first parameter; the first parameter is at least one of the real-time load current, real-time load voltage, real-time impedance and real-time admittance of the screen sounding device; determining whether the screen sounding device is invalid according to the first parameter; the detection audio is the second audio; in the case that the screen sounding device is invalid, switching the sounding device to the loudspeaker, and playing the first audio through the loudspeaker; in the case that the screen sounding device is not invalid, playing the first audio through the screen sounding device, or playing the first audio through the screen sounding device and the loudspeaker simultaneously; the detection audio is the first audio; in the case that the screen sounding device is invalid, switching the sounding device to the loudspeaker, and continuing to play the first audio through the loudspeaker; in the case that the screen sounding device is not invalid, continuing to play the first audio through the screen sounding device, or continuing to play the first audio through the screen sounding device and playing the first audio through the loudspeaker.
2. The method of claim 1, wherein: the acquiring the first parameter in the process of playing the detection audio comprises: acquiring the first parameter according to a preset period in the process of playing the detection audio.
3. The method of claim 1, wherein, The audio playing instruction comprises a call instruction, a music playing instruction or a video file playing instruction.
4. The method of claim 1, wherein, The first parameter comprises the real-time load current of the screen sounding device. determining whether the screen sounding device is invalid according to the first parameter comprises: if the real-time load current of the screen sounding device is greater than the maximum value of a current threshold range or less than the minimum value of the current threshold range, it is determined that the screen sounding device is invalid; the current threshold range is a current range corresponding to a first frequency when the screen sounding device is not invalid; the first frequency is the frequency of the center frequency point of the detection audio.
5. The method of claim 1, wherein, The first parameter comprises the real-time load voltage of the screen sounding device. determining whether the screen sounding device is invalid according to the first parameter comprises: If the real-time load voltage of the screen sound device is greater than the maximum value of the voltage threshold range or less than the minimum value of the voltage threshold range, it is determined that the screen sound device is failed; the voltage threshold range is a voltage range corresponding to a first frequency when the screen sound device is not failed; the first frequency is a frequency of a center frequency point of the detected audio.
6. The method of claim 1, wherein, The first parameter comprises a real-time impedance of the screen sound device; the real-time impedance of the screen sound device is determined by a real-time load voltage and a real-time load current of the screen sound device; According to the first parameter, it is determined whether the screen sound device is failed, comprising: If the real-time impedance of the screen sound device is greater than the maximum value of the impedance threshold range or less than the minimum value of the impedance threshold range, it is determined that the screen sound device is failed; the impedance threshold range is an impedance range corresponding to a first frequency when the screen sound device is not failed; the first frequency is a frequency of a center frequency point of the detected audio.
7. The method of claim 1, wherein, The first parameter comprises a real-time admittance of the screen sound device; the real-time admittance of the screen sound device is determined by a real-time load voltage and a real-time load current of the screen sound device; According to the first parameter, it is determined whether the screen sound device is failed, comprising: If the real-time admittance of the screen sound device is greater than the maximum value of the admittance threshold range or less than the minimum value of the admittance threshold range, it is determined that the screen sound device is failed; the admittance threshold range is an admittance range corresponding to a first frequency when the screen sound device is not failed; the first frequency is a frequency of a center frequency point of the detected audio.
8. The method according to claim 4 or 6 or 7, characterized in that, The real-time load current of the screen sound device is an average value of M feedback currents detected when the screen sound device plays N frames of the detected audio; wherein N and M are positive integers greater than 1.
9. The method according to any one of claims 5 to 7, characterized in that, The real-time load voltage of the screen sound device is an average value of M feedback voltages detected when the screen sound device plays N frames of the detected audio; wherein N and M are positive integers greater than 1.
10. The method according to any one of claims 4 to 7, characterized in that, The real-time load voltage of the screen sound device or the real-time load current of the screen sound device is obtained by an intelligent power amplifier module.
11. The method according to any one of claims 1 to 7, characterized in that, The method further comprises: In the case that the screen sound device is failed, a preset prompt box is displayed; the preset prompt box comprises prompt information; the prompt information is used to indicate that the screen sound device has been failed.
12. The method according to any one of claims 1 to 7, characterized in that, The method further comprises: In the case that the screen sound device is failed, the screen sound device is closed.
13. A failure detection method of a screen sounder device, characterized by, Applied to an electronic device, the electronic device comprising a screen sound device, the method comprising: In response to a preset operation or based on a preset time point, a detection audio is played by the screen sound emitting device; wherein, in a case that the preset operation or the preset time point corresponds to existence of a first audio and a battery level of the electronic device is greater than a preset threshold, the detection audio is the first audio; in a case that the preset operation or the preset time point corresponds to non-existence of the first audio or the battery level of the electronic device is less than or equal to the preset threshold, the detection audio is a second audio; the second audio comprises a single audio signal that is inaudible to human ears, or an audio signal that is audible to human ears and different from the first audio, and a playing time length of the second audio is less than a preset time length; In a process of playing the detection audio, a first parameter is acquired; the first parameter is at least one of a real-time load current, a real-time load voltage, a real-time impedance and a real-time admittance of the screen sound emitting device; According to the first parameter, it is determined whether the screen sound emitting device is failed.
14. The method of claim 13, wherein, The first parameter comprises a real-time load current of the screen sound emitting device; According to the first parameter, it is determined whether the screen sound emitting device is failed, comprising: If the real-time load current of the screen sound emitting device is greater than a maximum value of a current threshold range or less than a minimum value of the current threshold range, it is determined that the screen sound emitting device is failed; the current threshold range is a current range corresponding to a first frequency when the screen sound emitting device is not failed; the first frequency is a frequency of a center frequency point of the detection audio.
15. The method of claim 13, wherein, The first parameter comprises a real-time load voltage of the screen sound emitting device; According to the first parameter, it is determined whether the screen sound emitting device is failed, comprising: If the real-time load voltage of the screen sound emitting device is greater than a maximum value of a voltage threshold range or less than a minimum value of the voltage threshold range, it is determined that the screen sound emitting device is failed; the voltage threshold range is a voltage range corresponding to a first frequency when the screen sound emitting device is not failed; the first frequency is a frequency of a center frequency point of the detection audio.
16. The method of claim 13, wherein, The first parameter comprises a real-time impedance of the screen sound emitting device; the real-time impedance of the screen sound emitting device is determined by a real-time load voltage and a real-time load current of the screen sound emitting device; According to the first parameter, it is determined whether the screen sound emitting device is failed, comprising: If the real-time impedance of the screen sound emitting device is greater than a maximum value of an impedance threshold range or less than a minimum value of the impedance threshold range, it is determined that the screen sound emitting device is failed; the impedance threshold range is an impedance range corresponding to a first frequency when the screen sound emitting device is not failed; the first frequency is a frequency of a center frequency point of the detection audio.
17. The method of claim 13, wherein, The first parameter comprises a real-time admittance of the screen sound emitting device; the real-time admittance of the screen sound emitting device is determined by a real-time load voltage and a real-time load current of the screen sound emitting device; According to the first parameter, it is determined whether the screen sound emitting device is failed, comprising: If the real-time admittance of the screen sound emitting device is greater than a maximum value of an admittance threshold range or less than a minimum value of the admittance threshold range, it is determined that the screen sound emitting device is failed; the admittance threshold range is an admittance range corresponding to a first frequency when the screen sound emitting device is not failed; the first frequency is a frequency of a center frequency point of the detection audio. If the real-time admittance of the screen sound production device is greater than the maximum value of the admittance threshold range or the real-time admittance of the screen sound production device is less than the minimum value of the admittance threshold range, it is determined that the screen sound production device is invalid; the admittance threshold range is an admittance range corresponding to a first frequency when the screen sound production device is not invalid; the first frequency is the frequency of the center frequency point of the detected audio.
18. The method according to claim 14 or 15 or 17, characterized in that, The real-time load current of the screen sound production device is an average value of M feedback currents detected when the screen sound production device plays N frames of the detected audio; wherein N and M are positive integers greater than 1.
19. The method according to any one of claims 15 to 17, characterized in that, The real-time load voltage of the screen sound production device is an average value of M feedback voltages detected when the screen sound production device plays N frames of the detected audio; wherein N and M are positive integers greater than 1.
20. The method according to any one of claims 14 to 17, characterized in that, The real-time load voltage of the screen sound production device or the real-time load current of the screen sound production device is obtained by an intelligent power amplifier module.
21. An electronic device, comprising: The electronic device comprises: a screen sound production device; a loudspeaker; one or more processors; a memory; a communication module; The screen sound production device and the loudspeaker are both used to play sound signals of the electronic device; and the communication module is used to communicate with an external device. The memory stores one or more computer programs comprising instructions which, when executed by the processor, cause the electronic device to perform the method of any one of claims 1-20.
22. A computer-readable storage medium having stored therein instructions, the computer-readable storage medium comprising: The instructions, when executed on the electronic device, cause the electronic device to perform the method of any one of claims 1-20.
Citation Information
Patent Citations
Control method, control device and electronic device
CN106878908A
Voice control method and device, electronic device, and storage medium
CN109032556A