Loudspeaker control method and electronic equipment
Patent Information
- Application Number
- CN202380071544.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-12-20
- Filing Date
- 2023-09-08
- Publication Date
- 2025-05-13
AI Technical Summary
The sound outlet of the speaker in the electronic device may be blocked, affecting the audio output quality and user experience. It is difficult to effectively solve this problem with existing technology.
By adjusting the way the speakers play audio, including changing the sound wave phase and vibration amplitude, or controlling other speakers to play audio, you can compensate for the impact of occlusion and ensure audio output quality.
It effectively improves the audio output quality when the speaker is blocked, improves the user experience, ensures the accuracy of the volume and sound source position, and avoids the impact on the service life.
Smart Images

Figure CN119999233A_ABST
Abstract
Description
Speaker control method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 20, 2022, with application number 202211644169.1 and invention name “A Speaker Control Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of smart terminals, and in particular to a speaker control method and electronic device. Background Art
[0003] With the iterative updates of device hardware, various electronic devices can provide users with more high-quality services. For example, as the number of speakers connected to electronic devices increases, the sound field of the electronic devices also expands, thus providing users with higher-quality audio output services.
[0004] In some scenarios, the speaker's sound outlet in an electronic device may be blocked, for example, by a user's hand or by a foreign object. This obstruction can directly impact the quality of the electronic device's audio output service, affecting, for example, the actual volume heard by the user and the perceived location of the sound source, thus affecting the user's experience using the electronic device.
[0005] Summary of the Invention
[0006] The present application provides a speaker control method and an electronic device for improving the sound effect of audio played by the electronic device when the sound outlet of the speaker is blocked.
[0007] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0008] In a first aspect, an embodiment of the present application provides a speaker control method, which is applied to an electronic device, wherein the electronic device includes a first speaker and a second speaker. The method includes: when it is determined that the first audio and the second audio are to be played, controlling the first speaker to play the first audio and controlling the second speaker to play the second audio; when the sound outlet of the first speaker is blocked, controlling the first speaker to play the adjusted first audio; or controlling the second speaker to play the first audio.
[0009] In the above embodiment, by changing the way the first audio is played by the first speaker, or by controlling the way the second speaker plays the first audio, even if the first speaker is blocked, the playback effect of the first audio will not be affected, thereby ensuring the quality of the audio output of the electronic device and improving the user experience.
[0010] In some embodiments, before controlling the first speaker to play the adjusted first audio, the method includes: adjusting the sound wave phase and vibration amplitude corresponding to the first audio.
[0011] In the above embodiment, by adjusting the sound wave phase and vibration amplitude of the first audio to be played by the first speaker, the phase shift and vibration amplitude attenuation of the sound wave signal actually broadcast after the first speaker is blocked are compensated. In this way, the user cannot hear any difference after the first speaker is blocked.
[0012] In some embodiments, before adjusting the sound wave phase and vibration amplitude corresponding to the first audio, the method further includes: determining a first occlusion ratio corresponding to the sound outlet of the first speaker; and determining that the first occlusion ratio is less than a first threshold.
[0013] In the above embodiment, by adjusting the sound wave phase and vibration amplitude corresponding to the first audio when the first occlusion ratio is less than the first threshold, the impact of the speaker being blocked is improved, and at the same time, the overhead of switching the speaker to play the first audio is reduced.
[0014] In some embodiments, before adjusting the sound wave phase and vibration amplitude corresponding to the first audio, the method further includes: determining that a preset priority of the second audio is higher than that of the first audio.
[0015] In the above embodiment, when the preset priority of the second audio is higher than that of the first audio, the sound wave phase and vibration amplitude corresponding to the first audio are adjusted to improve the impact of the speaker being blocked, while avoiding affecting the playback of the second audio.
[0016] In some embodiments, before controlling the second speaker to play the first audio, the method includes: controlling the first speaker to stop playing the first audio.
[0017] In the above embodiment, if the second speaker is used to play the first audio, the first speaker can also be controlled to stop playing the first audio. In this way, the normal playback of the first audio can be ensured while also avoiding affecting the service life of the first speaker.
[0018] In some embodiments, when controlling the second speaker to play the first audio, the method further includes: controlling the second speaker to stop playing the second audio; and controlling the first speaker to play the second audio.
[0019] In the above embodiment, the first audio is prevented from being affected by swapping the speakers playing the first and second audio. In other possible embodiments, when the first audio has a higher preset priority than the second audio, swapping the speakers ensures that the more important first audio is not affected.
[0020] In some embodiments, before controlling the first speaker to stop playing the first audio, the method further includes: determining a first occlusion ratio corresponding to the sound outlet of the first speaker; and determining that the first occlusion ratio is not less than a first threshold.
[0021] In some embodiments, when the second speaker is controlled to play the first audio, the second speaker continues to play the second audio.
[0022] In the above embodiment, it is possible to ensure that the playing of the first audio and the second audio are not affected at the same time.
[0023] In some embodiments, the sound outlets of the first speaker and the second speaker are oriented in the same direction.
[0024] In some embodiments, the electronic device includes a third speaker and a fourth speaker, and the method includes: when the third speaker and the fourth speaker are both playing a third audio, detecting that the sound outlet of the third speaker is blocked; controlling the third speaker to stop playing the third audio; and controlling the fourth speaker to play a fourth audio, wherein the fourth audio is the third audio after adjusting the sound wave phase and vibration amplitude.
[0025] In some embodiments, the sound outlets of the third speaker and the fourth speaker face the same direction.
[0026] In some embodiments, the electronic device includes a third speaker and a fourth speaker, and the method includes: when the third speaker and the fourth speaker both play the fifth audio and the sixth audio, detecting that the sound outlet of the third speaker is blocked; when the fifth audio is marked as the first type of audio and the sixth audio is not the first type of audio, controlling the third speaker to only play the sixth audio; controlling the fourth speaker to play the seventh audio and the sixth audio, wherein the seventh audio is the fifth audio after the sound wave phase and vibration amplitude are adjusted.
[0027] In some embodiments, the electronic device includes a first set, the first set includes multiple audio type identifiers, and the audio matching the audio type identifier in the first set is the first type of audio.
[0028] In a second aspect, an embodiment of the present application provides an electronic device, which includes one or more processors and a memory; the memory is coupled to the processor, and the memory is used to store computer program code, and the computer program code includes computer instructions. When the one or more processors execute the computer instructions, the one or more processors are used to: when it is determined that the first audio and the second audio are to be played, control the first speaker to play the first audio, and control the second speaker to play the second audio; when the sound outlet of the first speaker is blocked, control the first speaker to play the adjusted first audio; or control the second speaker to play the first audio.
[0029] In some embodiments, before controlling the first speaker to play the adjusted first audio, the one or more processors are further configured to adjust the sound wave phase and vibration amplitude corresponding to the first audio.
[0030] In some embodiments, before adjusting the sound wave phase and vibration amplitude corresponding to the first audio, the one or more processors are further used to: determine a first occlusion ratio corresponding to the sound outlet of the first speaker; and determine that the first occlusion ratio is less than a first threshold.
[0031] In some embodiments, before adjusting the sound wave phase and vibration amplitude corresponding to the first audio, the one or more processors are further configured to: determine that a preset priority of the second audio is higher than that of the first audio.
[0032] In some embodiments, before controlling the second speaker to play the first audio, the one or more processors are further configured to: control the first speaker to stop playing the first audio.
[0033] In some embodiments, when controlling the second speaker to play the first audio, the one or more processors are further used to: control the second speaker to stop playing the second audio; and control the first speaker to play the second audio.
[0034] In some embodiments, before controlling the first speaker to stop playing the first audio, the one or more processors are further used to: determine a first occlusion ratio corresponding to the sound outlet of the first speaker; and determine that the first occlusion ratio is not less than a first threshold.
[0035] In some embodiments, when the second speaker is controlled to play the first audio, the second speaker continues to play the second audio.
[0036] In some embodiments, the sound outlets of the first speaker and the second speaker are oriented in the same direction.
[0037] In some embodiments, the electronic device includes a third speaker and a fourth speaker, and the one or more processors are further used to: when the third speaker and the fourth speaker are both playing the third audio, detect that the sound outlet of the third speaker is blocked; control the third speaker to stop playing the third audio; and control the fourth speaker to play the fourth audio, where the fourth audio is the third audio after the sound wave phase and vibration amplitude are adjusted.
[0038] In some embodiments, the sound holes of the third speaker and the fourth speaker are oriented in the same direction.
[0039] In some embodiments, the electronic device includes a third speaker and a fourth speaker, and the one or more processors are further used to: when the third speaker and the fourth speaker both play the fifth audio and the sixth audio, detect that the sound outlet of the third speaker is blocked; when the fifth audio is marked as the first type of audio and the sixth audio is not the first type of audio, control the third speaker to only play the sixth audio; control the fourth speaker to play the seventh audio and the sixth audio, and the seventh audio is the fifth audio after the sound wave phase and vibration amplitude are adjusted.
[0040] In some embodiments, the electronic device includes a first set, the first set includes multiple audio type identifiers, and the audio that matches the audio type identifier in the first set is the first type of audio.
[0041] In a third aspect, an embodiment of the present application provides a computer storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method in the above-mentioned first aspect and its possible embodiments.
[0042] In a fourth aspect, the present application provides a computer program product. When the computer program product is run on the above-mentioned electronic device, the electronic device executes the method in the above-mentioned first aspect and its possible embodiments.
[0043] It can be understood that the electronic devices, computer storage media and computer program products provided in the above aspects are all applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] FIG1 is a schematic diagram of a tablet computer provided in an embodiment of the present application;
[0045] FIG2 is a second schematic diagram of a tablet computer provided in an embodiment of the present application;
[0046] FIG3 is a schematic diagram of a mobile phone provided in an embodiment of the present application;
[0047] FIG4 is one of example diagrams of a scenario in which a user uses an electronic device according to an embodiment of the present application;
[0048] FIG5 is a second example diagram of a scenario in which a user uses an electronic device according to an embodiment of the present application;
[0049] FIG6 is a third example diagram of a scenario in which a user uses an electronic device according to an embodiment of the present application;
[0050] FIG7 is one of the structural example diagrams of an electronic device provided in an embodiment of the present application;
[0051] FIG8 is a second structural diagram of an electronic device provided in an embodiment of the present application;
[0052] FIG9 is one of the example diagrams of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0053] FIG10 is a second example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0054] FIG11 is an example diagram of an acoustic signal obtained by superimposing an acoustic signal with other acoustic waves before and after phase shifting according to an embodiment of the present application;
[0055] FIG12 is a third example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0056] FIG13 is a fourth example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0057] FIG14 is a fifth example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0058] FIG15 is a sixth example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0059] FIG16 is a seventh example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0060] FIG17 is an eighth example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0061] FIG18 is a ninth example diagram of an electronic device controlling a speaker channel to play audio according to an embodiment of the present application;
[0062] FIG19 is a flowchart of the steps of the speaker control method provided in an embodiment of the present application;
[0063] Figure 20 is an example diagram of the chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0065] With the development of technology, the hardware resources configured in various electronic devices (such as storage resources, computing resources, input and output resources, etc.) are constantly iterating and upgrading, aiming to provide users with higher quality services.
[0066] Taking the audio output module (eg, speaker) of an electronic device as an example, as the audio output module is continuously iterated and upgraded, the quality of the audio output service provided by the electronic device is also improved.
[0067] Exemplarily, upgrading the audio output module in an electronic device may include adding speaker types, for example, configuring a high-frequency speaker and a low-profile speaker, so that different speakers can play audio of different frequencies, thereby improving the audio playback quality.
[0068] As another example, upgrading the audio output module in an electronic device may include increasing the number of speakers, for example, iteratively upgrading from two speakers to four speakers, or upgrading to eight speakers. In this way, more speakers can effectively expand the sound field of the electronic device and increase the stereoscopic sense of the electronic device's sound effects. For example, when a user uses an electronic device to play a game, the electronic device can simulate more stereoscopic game sound effects through multiple speakers, allowing the user to immerse themselves in the virtual game world.
[0069] In some embodiments, each speaker of the electronic device corresponds to a sound outlet, and the sound outlets corresponding to different speakers are located at different positions on the housing of the electronic device.
[0070] In addition, the arrangement of the speaker holes of different types of electronic devices may be different or similar.
[0071] In some embodiments, the electronic devices may be mobile phones, tablet computers, handheld computers, PCs, cellular phones, personal digital assistants (PDAs), wearable devices (such as smart watches), smart screens, game consoles, and intelligent electronic devices such as augmented reality (AR) and virtual reality (VR) devices.
[0072] Taking a tablet computer as an example, the speaker holes may be located on the left and right sides of the tablet computer.
[0073] For example, if a tablet computer is equipped with eight speakers, four speaker holes can be set on the left edge of the tablet computer housing, and four speaker holes can be set on the right edge of the tablet computer housing. Each sound hole corresponds to a speaker. It can be understood that the sound wave signal generated by the speaker when playing audio must be emitted outward from the corresponding sound hole. Therefore, the location of the sound hole on the housing can also be referred to as the configuration location of the speaker.
[0074] That is, if the sound outlet corresponding to the speaker is located on the left edge of the electronic device, then the speaker can be said to be deployed on the left edge of the electronic device. Similarly, if the sound outlet corresponding to the speaker is located on the right edge of the electronic device, then the speaker can be said to be deployed on the right edge of the electronic device.
[0075] In addition, in the above example, by symmetrically opening sound holes on the left and right sides of the electronic device housing, speakers can be symmetrically deployed on the left and right sides of the electronic device to form left and right channels and expand the sound field of the electronic device.
[0076] For example, among the four sound holes opened on the left edge of the electronic device, two sound holes are opened on the upper side of the left edge, and two sound holes are opened on the lower side of the left edge.
[0077] As shown in FIG1 , there are two speaker holes on the upper left side of the tablet computer, and there are also two speaker holes on the lower left side of the tablet computer.
[0078] Similarly, of the four sound holes on the right edge, two are located on the upper side of the right edge, and two are located on the lower side of the right edge. As shown in Figure 1, there are two speaker holes on the upper right edge of the tablet computer, and two speaker holes on the lower right edge of the tablet computer.
[0079] In addition, the sound holes located on the upper side of the left edge are symmetrical with the sound holes located on the upper side of the right edge, and the sound holes located on the lower side of the left edge are symmetrical with the sound holes located on the lower side of the right edge.
[0080] It should be noted that the above-mentioned directions of up, down, left, and right may be determined with reference to the tablet computer housing. For example, if the tablet computer is rectangular, the two relatively short edges of the tablet computer housing are the left edge and the right edge, and the two relatively long edges are the top edge and the bottom edge.
[0081] The portion of the left edge close to the upper edge can be called the upper side of the left edge, and the portion close to the lower edge can be called the lower side of the left edge. Similarly, the portion of the right edge close to the upper edge can be called the upper side of the right edge, and the portion close to the lower edge can be called the lower side of the right edge.
[0082] For another example, the four sound holes on the left edge of an electronic device are all located on the lower side (or upper side) of the left edge, and the four sound holes are arranged adjacent to each other. Similarly, the four sound holes on the right edge of an electronic device are all located on the lower side (or upper side) of the right edge, and the four sound holes are arranged adjacent to each other. For example, as shown in Figure 2, a tablet computer has four speaker sound holes on the lower side of its left edge, and four speaker sound holes on the lower side of its right edge.
[0083] Taking a mobile phone as an example, the speaker holes can be deployed on the upper and lower sides of the mobile phone.
[0084] For example, if a mobile phone is equipped with eight speakers, four sound holes can be opened on the upper edge of the phone casing, and four sound holes can be opened on the lower edge. In this way, four speakers can be deployed on the upper edge of the phone, and four speakers can be deployed on the lower edge of the phone. Speakers deployed symmetrically on the upper and lower edges can also form left and right channels, expanding the sound field of the electronic device. The speaker deployed on the left side of the upper edge is symmetrical with the speaker deployed on the left side of the lower edge. The speaker deployed on the right side of the upper edge is also symmetrical with the speaker deployed on the right side of the lower edge.
[0085] For example, of the four speakers deployed on the upper edge, two are deployed on the left side of the upper edge and two are deployed on the right side of the upper edge. Similarly, of the four speakers deployed on the lower edge, two are deployed on the left side of the lower edge and two are deployed on the right side of the lower edge.
[0086] As shown in Figure 3, there are two speaker holes on the left side of the upper edge of the phone, and two speaker holes on the right side of the upper edge. There are also two speaker holes on the left side of the lower edge of the phone, and two speaker holes on the right side of the lower edge.
[0087] It should be noted that the above-mentioned up, down, left, and right can be directions determined with the mobile phone housing as a reference. For example, the two relatively short edges of the mobile phone housing are the upper edge and the lower edge, and the two relatively long edges are the left edge and the right edge.
[0088] On the housing of a mobile phone, the portion of the upper edge close to the left edge can be called the left side of the upper edge, and the portion close to the right edge can be called the right side of the upper edge. Similarly, the portion of the lower edge close to the left edge can be called the left side of the lower edge, and the portion close to the right edge can be called the right side of the lower edge.
[0089] In other possible embodiments, the speakers of the tablet computer may also be deployed on the upper edge and the lower edge. Similarly, the speakers of the mobile phone may also be deployed on the left edge and the right edge, which is not specifically limited in this embodiment of the present application.
[0090] In some embodiments, speaker holes are positioned on the side edges (e.g., top, bottom, left, and right) of an electronic device's housing to amplify the electronic device's sound field and enhance the stereoscopic quality of the broadcasted audio. However, when using an electronic device, users often hold the side edges of the device, which often obstructs the speaker holes.
[0091] It is understandable that if the sound outlet of the speaker is blocked during audio playback, the audio actually emitted by the speaker will be affected, for example, the volume will become smaller, the sound wave phase corresponding to the audio (which can be simply referred to as audio phase) will change, etc.
[0092] Taking a tablet computer as an example, as shown in FIG4 , when a user uses the tablet computer, they hold the lower left edge of the tablet computer with their left hand and the lower right edge of the tablet computer with their right hand. This not only fixes the tablet computer's position in space but also makes it easier for the user to operate the tablet computer.
[0093] In the scenario where the tablet speakers are positioned as shown in Figure 1, the user's hands will inevitably block the speakers located on the lower left and right edges. When the speakers on the lower left and right edges are blocked, the tablet's audio playback quality is affected.
[0094] For example, as shown in FIG5 , when the tablet computer plays the same audio, if the speakers on the lower left and right edges of the tablet computer are blocked, the user will hear a decrease in the playback volume corresponding to the speakers on the lower left and right edges.
[0095] As another example, when a tablet computer is playing audio, if the speakers on the lower left and right edges of the tablet computer are blocked, the phase of the audio broadcast by the blocked speakers will change. In this way, after being superimposed with the audio played by other speakers in the tablet computer, the overall audio phase will also change due to the cancellation of the audio in some frequency bands.
[0096] In this way, as shown in FIG6 , before and after the speaker is blocked, as the overall audio phase changes, the user intuitively feels that the position of the sound source changes.
[0097] For example, when a user is playing a shooting game on a tablet, the tablet plays footsteps coming from the left side of the game world. If the user's hand is not blocking the speaker, the footsteps will be heard from the left side of the user. If the user's hand is blocking the speaker, the footsteps will be offset to the left and in front of the user. Obviously, the tablet cannot accurately display the game sound effects in this case, affecting the user experience.
[0098] In addition, in addition to the user's hands blocking the speaker sound holes when using electronic devices, the audio actually emitted by the speaker may also be affected if foreign objects are blocked in the speaker sound holes or if the electronic device is equipped with an inappropriate protective case that blocks the sound holes.
[0099] In order to improve the above-mentioned problem, an embodiment of the present application provides a speaker control method. Among them, the speaker control method is applied to an electronic device equipped with multiple speakers. In this way, the electronic device can adjust the audio played by at least one speaker in the electronic device according to the obstruction of the speaker sound outlet (such as, whether it is obstructed or not, whether it is blocked or not, the degree of obstruction, and the blockage situation), such as adjusting the audio content played by the speaker, and for example, adjusting the audio phase and audio energy played by the speaker. Among them, after adjusting the audio phase, the phase of the sound wave signal corresponding to the audio will change. After adjusting the audio energy, the vibration amplitude of the sound wave corresponding to the audio will also change.
[0100] It is understood that electronic devices can compensate for the impact of speaker obstruction on audio playback by adjusting the audio played by the speakers. The compensation principle can be referred to in the description of subsequent embodiments and will not be detailed here. This not only improves the intelligence level of electronic devices in audio playback, but also improves the user experience.
[0101] Please refer to FIG. 7 , which is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
[0102] As shown in Figure 7, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0103] The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and other sensors.
[0104] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0105] The processor 110 may include one or more processing units. For example, the processor 110 may 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). The different processing units may be independent devices or integrated into one or more processors.
[0106] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0107] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0108] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0109] It is understood that the interface connection relationship between the modules illustrated in this embodiment is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0110] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0111] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0112] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0113] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED).
[0114] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0115] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0116] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include N cameras 193, where N is a positive integer greater than 1.
[0117] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0118] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0119] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0120] In some embodiments, a large number of core components in electronic devices, such as processors (CPUs, graphics processors, etc.), memory, and various host controllers, can be integrated into a main chip. The high integration density of the main chip helps reduce the physical space of electronic devices and meet current user demands for lightweight and portable electronic devices.
[0121] In some embodiments, the main chip is integrated with a host controller for managing the speakers, referred to as the speaker controller. In addition, the main chip can also correspond to multiple audio digital interfaces, such as time division multiplexing (TDM) digital interfaces. Each audio digital interface corresponds to a speaker. In other words, the speakers configured in the electronic device can be connected to the speaker controller through the audio digital interface and receive control instructions sent by the speaker controller. In this way, the speaker controller can control the audio played by each speaker.
[0122] For example, the electronic device shown in Figure 8 is equipped with eight speakers. The main chip of the electronic device can provide at least eight audio digital interfaces, such as audio digital interface 1, audio digital interface 2, audio digital interface 3, audio digital interface 4, audio digital interface 5, audio digital interface 6, audio digital interface 7, and audio digital interface 8. Each of the eight audio digital interfaces is connected to a speaker. Each audio digital interface and the speaker connected to it can form a speaker channel.
[0123] In some embodiments, the electronic device may group the speaker channels corresponding to the multiple speakers, for example, grouping the speaker channels corresponding to at least two speakers into one group, so that the speakers in the same group are used to play the same audio data.
[0124] For example, as shown in FIG8 , when the eight speakers of the electronic device include four tweeters and four woofers, the speaker channels corresponding to one tweeter and one woofer can be grouped together.
[0125] For example, if Audio Digital Interface 1 and a woofer form a speaker channel, and Audio Digital Interface 2 and a tweeter form a speaker channel, the speaker channels corresponding to Audio Data Interface 1 and Audio Digital Interface 2 can be grouped together. Similarly, the speaker channels corresponding to Audio Digital Interface 3 and Audio Digital Interface 4 can be grouped together, the speaker channels corresponding to Audio Digital Interface 5 and Audio Digital Interface 6 can be grouped together, and the speaker channels corresponding to Audio Digital Interface 7 and Audio Digital Interface 8 can be grouped together.
[0126] In this way, when the audio data includes high-frequency and low-frequency components, the high-frequency components of the audio data are played (reproduced) by the tweeters in the same group, and the low-frequency components of the audio data are played by the woofers in the same group.
[0127] In some embodiments, the grouping of speaker channels can be pre-configured, and the speaker sound holes corresponding to the same group of speaker channels are arranged adjacent to each other on the electronic device.
[0128] For example, when the electronic device is a tablet computer as shown in Figure 1, the speakers on the lower left side of the tablet computer can be grouped into a group, the speakers on the upper left side of the tablet computer can be grouped into a group, the speakers on the lower right side of the tablet computer can be grouped into a group, and the speakers on the upper right side of the tablet computer can be grouped into a group.
[0129] In some embodiments, the electronic device can control the audio to be played by each group of speaker channels through the main chip, and can also control the energy, phase, etc. of the audio to be played by each speaker.
[0130] It is understood that when a specific service requirement is detected, the electronic device can play the corresponding audio data according to the service requirement, wherein the specific service requirement can be a service requirement for instructing to play audio.
[0131] For example, the above-mentioned specific business demand may be a business demand generated by a user operation or triggered by an application business logic during the running of an application program on the electronic device.
[0132] For example, a video application is an application that can play video data a, which includes audio data a. Thus, while the video application is running, if a user instructs the user to play video data a, the electronic device can determine that there is a business demand to play audio data a, and this business demand can instruct the electronic device to play audio data a.
[0133] For another example, after starting a game application with game sound effects, the electronic device may determine that there is currently a business demand for playing game audio data, and the business demand may instruct the electronic device to play the corresponding game audio data.
[0134] For another example, the business logic of a social application includes ringing a reminder for social information. Thus, when the social application is running and a social information is received, the electronic device can determine that there is a business demand for playing a ringing audio, and the business demand can instruct the electronic device to play the ringing audio.
[0135] In some scenarios, the audio data that the electronic device needs to play may be a single audio, such as a ringing audio.
[0136] If the audio data played by the electronic device is a single audio, the electronic device can use the main chip to control all speaker channels to play the audio, that is, all speaker channels play the same audio content. In addition, the electronic device can also use the main chip to control the audio phase and audio energy of the audio data broadcast by each speaker, so that the electronic device can achieve the ideal sound effect when playing the audio data. The specific implementation method can be referred to the relevant technology and will not be repeated here.
[0137] In other scenarios, the audio data required to be played by the electronic device may also be a combination of multiple audio types, and the audio content corresponding to different audio types may be different. For example, game audio data may be composed of one or more of background sound, footstep sound effects, and gunshot sound effects. Another example is audio data a composed of one or more of background sound and dialogue sound effects.
[0138] When the audio data played by the electronic device is a combination of multiple audio types, the electronic device can determine the audio to be played by each group of speaker channels from the audio data, and control each group of speaker channels to play the corresponding audio through the main chip. Among these groups of speaker channels, multiple groups of speaker channels may have the same audio, or different groups of speaker channels may have different audio.
[0139] In some embodiments, speaker channels configured on the same side edge of the electronic device play the same audio, and speaker channels configured on different side edges of the electronic device play different audio.
[0140] Taking the electronic device as a tablet computer as an example, as shown in FIG9 , the audio data played by the tablet computer includes a normal sound effect, a specific sound effect 1, and a specific sound effect 2.
[0141] Among them, the above-mentioned specific sound effect 1 and specific sound effect 2 are both specific sound effects. The specific sound effect can be a pre-selected type of sound effect. It is understandable that the specific sound effect is a relatively important audio in the audio data, or it can be an audio that the user does not want the playback effect to be affected.
[0142] For example, consider the audio data for a shooting game, which includes background sounds, footstep sounds, and gunshot sounds. If the pre-selected sound effect types include footsteps and gunshots, then the footsteps and gunshots in the game audio data can be determined to be specific sound effects. Specifically, the footsteps and gunshots from the left side of the game world are designated as specific sound effect 1. The footsteps and gunshots from the right side of the game world are designated as specific sound effect 2.
[0143] In addition, the above-mentioned regular sound effects may refer to other audios other than specific sound effects. Continuing with the above example, the regular sound effects in the game audio data may be background sounds.
[0144] In some examples, the electronic device may be configured with a first set consisting of multiple audio types, such as footstep sound effects, gunshot sound effects, and conversation sound effects.
[0145] For example, the first set can be a configuration file in an application for recording specific sound effects, which includes the type identifier of at least one type of sound effect. Thus, when parsing the application's configuration file, the first set corresponding to that application can be obtained. For example, in a shooting game's configuration file, the parsed first set might include footsteps and gunshots. Another example is a video application's configuration file, where the parsed first set might include dialogue sound effects.
[0146] As another example, the first set may also be a configuration file in a system file for recording specific sound effects.
[0147] In some embodiments, a sound effect that matches a type identifier in the first set is also a specific sound effect. The electronic device defaults to assigning a higher priority to audio that belongs to a specific sound effect than to audio that does not belong to a specific sound effect. Of course, in other possible embodiments, a list may be preconfigured within the electronic device, containing multiple types of audio and their corresponding priorities. In this way, the priority corresponding to each type of audio can be determined by looking up the table.
[0148] The priority corresponding to the above audio has a high reference value when determining whether to swap the speakers corresponding to the audio, and to a certain extent, guarantees the playback effect corresponding to the audio with higher priority.
[0149] In the above example, the speaker channel on the left edge of the tablet computer can be used to play regular sound effects and specific sound effect 1. For example, when a regular sound effect needs to be played, the main chip controls the speaker channel on the left edge to play the regular sound effect. At this time, the sound wave signal actually broadcast by the speaker channel is the sound wave signal corresponding to the regular audio. Similarly, when the specific sound effect 1 needs to be played, the main chip controls the speaker channel on the left edge to play the specific sound effect 1. At this time, the sound wave signal actually broadcast by the speaker channel is the sound wave signal corresponding to the specific sound effect 1. When the regular sound effect and the specific sound effect 1 need to be played at the same time, the main chip can mix the regular sound effect and the specific sound effect 1, and then control the speaker channel on the left edge to play. At this time, the sound wave signal actually broadcast by the speaker channel is the sound wave signal corresponding to the above-mentioned mixing.
[0150] In addition, the speaker channel on the right edge of the tablet can be used to play regular sound effects and specific sound effect 2. For example, when a regular sound effect needs to be played, the main chip controls the speaker channel on the right edge to play the regular sound effect. At this time, the sound wave signal actually broadcast by the speaker channel is the sound wave signal corresponding to the regular audio. Similarly, when a specific sound effect 1 needs to be played, the main chip controls the speaker channel on the right edge to play the specific sound effect 1. At this time, the sound wave signal actually broadcast by the speaker channel is the sound wave signal corresponding to the specific sound effect 1. When regular sound effects and specific sound effect 1 need to be played at the same time, the main chip can mix the regular sound effects and specific sound effect 1, and then control the speaker channel on the right edge to play them. At this time, the sound wave signal actually broadcast by the speaker channel is the sound wave signal corresponding to the above-mentioned mixing.
[0151] As shown in FIG9 , the speaker channels in the tablet computer have been grouped. The “normal sound effect + specific sound effect 1” or “normal sound effect + specific sound effect 2” displayed relative to each group of speaker channels in FIG9 indicates the audio that needs to be played collaboratively by the group of speaker channels.
[0152] In addition, in specific scenarios, the audio played by the speaker channel on the left edge and the speaker channel on the right edge can be interchanged. For example, a specific scenario may be that the tablet is rotated so that the speaker on the original left edge faces the user's right, and the speaker on the original right edge faces the user's left. For example, in the tablet shown in Figure 9, when it is detected that the tablet has been rotated 180 degrees, that is, the speaker on the original left edge faces the user's right, and the speaker on the original right edge faces the user's left, the normal sound effects and special sound effect 2 are played by the speaker channel on the original left edge, and the normal sound effects and special sound effect 1 are played by the speaker channel on the original right edge.
[0153] In other embodiments, the audio played by the speaker channels arranged on the same side edge of the electronic device may also be different.
[0154] Continuing with the example of a tablet computer, as shown in FIG10 , if the audio data played by the tablet computer includes background sound, specific sound effect 1, and specific sound effect 2, specific sound effect 1 can be played by the speaker channel on the lower left edge of the tablet computer, while the background sound can be played by the speaker channel on the upper left edge of the tablet computer. Furthermore, specific sound effect 2 can be played by the speaker channel on the lower right edge of the tablet computer, while the background sound can be played by the speaker channel on the upper right edge of the tablet computer.
[0155] In summary, in an embodiment of the present application, when an electronic device needs to play audio data, it can identify various types of specific sound effects from the audio data. Then, a specific speaker channel is controlled to play the specific sound effect. In some examples, a single specific speaker channel can be used to play at least one type of specific sound effect. Of course, the speaker channel can also be used to play regular sound effects. That is, similar to what is shown in Figure 9, the speaker channel can play not only specific sound effects, but also regular sound effects. In other examples, a single specific speaker channel is only used to play specific sound effects, and other speaker channels play regular sound effects. That is, similar to what is shown in Figure 10, a specific speaker channel is only used to play specific sound effects, and other speaker channels are used to play regular sound effects.
[0156] In addition, the above-mentioned specific speaker channel may be a speaker channel in the electronic device that meets a preset rule. For example, the speaker channel that meets the preset rule may be any of the following:
[0157] (1) Among the speaker channels on the same side edge, the speaker is located in the speaker channel on the lower side of the same side edge.
[0158] (2) Among the speaker channels on the same side edge, the speaker is located in the speaker channel on the upper side of the same side edge.
[0159] (3) All speaker channels in an electronic device.
[0160] (4) The speaker channel to which the audio digital interface marked with a specific identifier belongs. The specific identifier of the audio digital interface can be pre-configured. For example, it can be configured by the developer of the electronic device, or by the user of the electronic device. This embodiment of the application does not specifically limit this.
[0161] In addition, the above-mentioned specific identifier may also include multiple types of specific identifiers, such as a left channel specific identifier and a right channel specific identifier.
[0162] As an implementation method, a mapping table between an audio digital interface and a specific identifier is configured in the electronic device. The electronic device can play specific sound effects through a specific speaker channel and play regular sound effects through other speaker channels according to the pre-configured mapping table. For example, the mapping relationship is shown in Table 1:
[0163] Table 1
[0164] As shown in Table 1, the mapping relationship table includes all audio data interfaces in the electronic device, such as audio data interface 1 to audio data interface 8. In addition, the mapping relationship table also includes audio data interfaces marked with specific identifiers, such as audio data interface 1, audio data interface 2, audio data interface 7, and audio data interface 8. The above mapping relationship table also includes the specific identifier type corresponding to each audio data interface. For example, audio data interface 1 and audio data interface 2 correspond to a specific identifier for the left channel, and audio data interface 7 and audio data interface 8 correspond to a specific identifier for the right channel.
[0165] In the above implementation, the electronic device may also respond to the operation of the developer or user to adjust the correspondence between the audio data interface and various specific identifiers in the mapping table to configure the specific identifier corresponding to the audio data interface.
[0166] In addition, when the specific identifier includes multiple types, the electronic device can also determine the speaker channel used to play each type of specific sound effect based on the category of the specific identifier. For example, when the electronic device is playing game audio data, it determines to use the speaker channel with the specific identifier for the left channel to play specific sound effects from the left side of the game character in the game world, such as footsteps from the left side. For another example, when the electronic device is playing game audio data, it determines to use the speaker channel with the specific identifier for the right channel to play specific sound effects from the right side of the game character in the game world, such as footsteps from the right side.
[0167] As an implementation, the electronic device may also pre-configure a correspondence 1 between different types of specific sound effects and various specific identifiers. Thus, when the electronic device determines that it needs to play a specific sound effect of any type, such as specific sound effect a, it can determine the specific identifier corresponding to specific sound effect a based on the correspondence 1, such as specific identifier a. Then, based on the mapping table, it can determine the audio data interface a corresponding to specific identifier a. This allows the speaker channel corresponding to audio data interface a to be controlled to play specific sound effect a.
[0168] In some embodiments, when the electronic device is playing audio data, if it is detected that a speaker is blocked, the audio played by one or more groups of speaker channels can be adjusted.
[0169] In an exemplary scenario, when a user's hand blocks the sound outlet of a speaker on the housing of an electronic device, the electronic device can detect that the speaker channel is blocked. It is understood that the electronic device can detect whether the speaker channel is blocked by referring to related technologies, such as by detecting the impedance value corresponding to the speaker to determine whether the speaker channel is blocked and the degree of obstruction. The specific implementation details are not repeated here.
[0170] In an exemplary scenario, when the sound outlet of a speaker is blocked by a foreign object, the electronic device can also recognize that the speaker channel is blocked.
[0171] In some embodiments, the electronic device adjusts the audio played by one or more speaker channels in the following ways:
[0172] In the first approach, the electronic device may adjust only the audio played by the speaker channel with the occlusion (i.e., the speaker channel with the speaker blocked, hereinafter referred to as speaker channel a). For example, the audio energy and audio phase of the audio played by the speaker channel a may be adjusted.
[0173] As you can understand, when a speaker channel is blocked or obstructed, even if the same audio is being played, the actual sound wave signal broadcast by the corresponding speaker channel will change, for example, the phase and vibration amplitude will change. These changes will cause the user to hear a decrease in volume and change the perceived location of the sound source.
[0174] As shown in Figure 11, when speaker channel a is unobstructed or blocked, the actual sound wave signal a broadcasted by speaker channel a is superimposed with the sound wave signal b broadcasted by another speaker channel to produce sound wave signal c. If speaker channel a is obstructed or blocked, the audio broadcasted by speaker channel a will experience a phase shift, meaning the phase of the actual sound wave signal a broadcasted by speaker channel a will change. Furthermore, the superposition of the phase-shifted sound wave signal a and sound wave signal b produces sound wave signal d.
[0175] As shown in Figure 11, the phase between the sound wave signal d and the original sound wave signal c also changes. At the same time, after the phase of the sound wave signal a changes, the sound waves in some frequency bands of the sound wave signal a and the sound wave signal b will cancel each other out, and the vibration amplitude of the sound wave signal d obtained after superposition will also be smaller than that of the sound wave signal c.
[0176] In this case, when modulating the audio intended for speaker channel a, the electronic device can adjust the phase of the audio to compensate for the phase shift caused by the obstruction of speaker channel a. For example, if speaker channel a is obstructed, the phase of the actual audio being broadcast shifts by half of π. Therefore, when modulating the audio intended for speaker channel a, the phase compensation for half of π must be applied.
[0177] In addition, as shown in FIG11 , when the speaker channel a is blocked or clogged, the vibration amplitude of the sound wave signal a actually broadcasted is also attenuated when the speaker channel a plays the corresponding audio.
[0178] At this time, when the electronic device modulates the audio to be played by the speaker channel a, it can adjust the audio energy of the audio, thereby compensating for the attenuation of the vibration amplitude caused by the blocking of the speaker channel a.
[0179] That is, in the embodiment of the present application, the electronic device can adjust the sound wave signal actually broadcast by speaker channel a to the state before speaker channel a was unobstructed by adjusting the audio phase and audio energy. In addition, in other embodiments, the sound wave signal actually broadcast by speaker channel a can also be adjusted to the state before speaker channel a was unobstructed by adjusting the audio in related technologies. This is not specifically limited in the embodiment of the present application. In this way, for the user, whether the speaker channel is obstructed will not affect the sound heard by the user.
[0180] Take the electronic device as an example, which is a tablet computer as shown in FIG9 .
[0181] As shown in Figure 12, when no speaker channels are blocked or obstructed, the set of speaker channels configured on the upper left edge of the tablet computer is used to play regular sound effects and / or special sound effect 1. The set of speaker channels configured on the lower left edge of the tablet computer is also used to play regular sound effects and / or special sound effect 1. The set of speaker channels configured on the upper right edge of the tablet computer is used to play regular sound effects and / or special sound effect 2. The set of speaker channels configured on the lower right edge of the tablet computer is also used to play regular sound effects and / or special sound effect 2.
[0182] As shown in Figure 12, when a group of speaker channels on the lower side of the left edge are blocked or clogged, that is, when a group of speaker channels configured on the lower side of the left edge are speaker channels a, the audio played by the group of speaker channels on the lower side of the left edge is adjusted, that is, the speaker channel is controlled to play the adjusted regular sound effects and / or specific sound effects 1.
[0183] As shown in Figure 12, when a group of speaker channels on the lower side of the right edge are blocked or clogged, that is, when a group of speaker channels configured on the lower side of the right edge are speaker channels a, the audio played by the group of speaker channels on the lower side of the right edge is adjusted, that is, the speaker channel is controlled to play the adjusted regular sound effects and / or specific sound effects 2.
[0184] It is understood that the above adjustments may include adjustments to the audio phase, audio energy, etc. By adjusting the audio phase and audio energy, the actual sound wave signals broadcast before and after the speaker channel is blocked are made similar (for example, the corresponding phases and vibration amplitudes are nearly equal), and the volume actually heard by the user can also remain unchanged.
[0185] Of course, Figure 12 exemplarily illustrates a scenario where the speaker channels at the lower left and right edges belong to speaker channel a. It is understood that scenarios where other groups of speaker channels have speakers that are blocked or clogged are handled in the same manner, and will not be further elaborated here.
[0186] In the second manner, the electronic device may pause the use of the group of speaker channels a, and at the same time, adjust the audio played by the speaker channel on the same side and not blocked (such as speaker channel b).
[0187] Adjusting the audio played by speaker channel b may include adjusting the audio phase and audio energy of the played audio. In addition, adjusting the audio played by speaker channel b may also include adjusting the played audio content.
[0188] Example 1: Take the electronic device as the tablet computer shown in Figure 9. As shown in Figure 13, when no speakers are blocked or obstructed, the set of speaker channels configured on the upper left edge of the tablet computer is used to play regular sound effects and / or specific sound effect 1. The set of speaker channels configured on the lower left edge of the tablet computer is also used to play regular sound effects and / or specific sound effect 1. The set of speaker channels configured on the upper right edge of the tablet computer is used to play regular sound effects and / or specific sound effect 2. The set of speaker channels configured on the lower right edge of the tablet computer is also used to play regular sound effects and / or specific sound effect 2.
[0189] As shown in Figure 13, if one of the speaker channels on the lower left edge is blocked or obstructed, that is, if the speaker channel located on the lower left edge is speaker channel a, the speaker channels on the lower left edge will pause playing audio. Additionally, the speaker channel located on the upper left edge, that is, speaker channel b, will play the adjusted normal sound effects and / or special sound effect 1.
[0190] As shown in Figure 13, if one of the speaker channels on the lower right edge is blocked or obstructed, that is, if the speaker channel located on the lower right edge is speaker channel a, the speaker channels on the lower right edge will pause playing audio. Additionally, the speaker channel located on the upper right edge, that is, speaker channel b, will play the adjusted normal sound effects and / or special sound effect 2.
[0191] The adjustments mentioned in the above example 1 may include adjustments to audio phase, audio energy, etc.
[0192] It can be understood that before speaker channel a is blocked or obstructed, the sound wave signals actually broadcast by speaker channel a and the corresponding speaker channel b are superimposed to produce sound wave signal e. After speaker channel a is blocked or obstructed, the sound wave signals actually broadcast by speaker channel a and the corresponding speaker channel b are superimposed to produce sound wave signal f. By adjusting the audio phase and audio energy of the audio signal intended to be broadcast by speaker channel b, the phase difference and vibration amplitude difference between sound wave signal e and sound wave signal f can be reduced. In addition, the volume actually heard by the user can be kept unchanged.
[0193] Example 2: Consider the tablet computer shown in Figure 10. As shown in Figure 14, if no speaker channels are blocked or obstructed, the speaker channels located on the upper left edge of the tablet computer are used to play regular sound effects. The speaker channels located on the lower left edge of the tablet computer are used to play special sound effect 1. The speaker channels located on the upper right edge of the tablet computer are used to play regular sound effects. The speaker channels located on the lower right edge of the tablet computer are also used to play special sound effect 2.
[0194] As shown in Figure 14, when a group of speaker channels on the lower left side of the left edge is blocked or clogged, that is, when the group of speaker channels configured on the lower left side is speaker channel a, the group of speaker channels on the lower left side of the left edge pauses playing audio. In addition, a group of speaker channels configured on the upper left side of the left edge, that is, speaker channel b, plays the adjusted regular sound effects and / or special sound effect 1. In other words, speaker channel b, which originally did not need to play special sound effect 1, needs to play special sound effect 1 in addition to playing regular sound effects when the speaker channel on the lower left side of the left edge is blocked or clogged. In this way, the electronic device adjusts the audio content played by the corresponding speaker channel b.
[0195] As shown in Figure 14, when one of the speaker channels on the lower right side of the right edge is blocked or clogged, that is, when the speaker channel configured on the lower right side is speaker channel a, the speaker channel on the lower right side of the right edge pauses playing audio. In addition, the speaker channel configured on the upper right side of the right edge, that is, speaker channel b, plays the adjusted regular sound effects and / or special sound effect 2. In other words, speaker channel b, which originally did not need to play special sound effect 2, needs to play special sound effect 2 in addition to regular sound effects when the speaker channel on the lower right side of the right edge is blocked. In this way, the electronic device adjusts the audio content played by the corresponding speaker channel b.
[0196] In a third approach, when the audio played by speaker channel a includes a specific sound effect, the electronic device can adjust not only the audio played by speaker channel a but also the audio played by an unobstructed speaker channel (e.g., speaker channel b) on the same side as speaker channel a. If there is no unobstructed speaker channel on the same side as speaker channel a, the audio played by any unobstructed speaker channel can also be adjusted.
[0197] Take the electronic device, for example, the tablet computer shown in FIG9 . As shown in FIG15 , when no speaker channels are blocked or obstructed, the set of speaker channels configured on the upper left edge of the tablet computer is used to play regular sound effects and / or specific sound effect 1. The set of speaker channels configured on the lower left edge of the tablet computer is also used to play regular sound effects and / or specific sound effect 1. The set of speaker channels configured on the upper right edge of the tablet computer is used to play regular sound effects and / or specific sound effect 2. The set of speaker channels configured on the lower right edge of the tablet computer is also used to play regular sound effects and / or specific sound effect 2.
[0198] As shown in Figure 15, if the speaker channel group on the lower left side of the left edge is blocked or obstructed, that is, if the speaker channel group configured on the lower left side of the left edge is speaker channel a, the speaker channel group on the lower left side of the left edge will no longer play special sound effect 1, but it can still play regular sound effects. In addition, the speaker channel group on the upper left side of the left edge, that is, the corresponding speaker channel b, will play the adjusted regular sound effects and / or special sound effect 1.
[0199] For example, when only regular audio is playing, no processing is performed. When only specific sound effect 1 is playing, the phase and vibration amplitude of the sound waves corresponding to specific sound effect 1 are adjusted and played. When specific sound effect 1 and regular audio are playing simultaneously, the regular audio and specific sound effect 1 are mixed, the phase and vibration amplitude of the sound waves corresponding to the mix are adjusted, and then played. In this way, the electronic device adjusts the audio to be played by speaker channel a and the corresponding speaker channel b.
[0200] As shown in Figure 15, if the speaker channel group on the lower right side of the right edge is blocked or obstructed, that is, if the speaker channel group configured on the lower right side of the right edge is speaker channel a, the speaker channel group on the lower right side of the right edge will no longer play special sound effect 2, but it can continue to play regular sound effects. In addition, the speaker channel group on the upper right side of the right edge, that is, speaker channel b, will play the adjusted regular sound effects and / or special sound effect 2.
[0201] For example, when only regular audio is played, no processing is performed. When only specific sound effect 2 is played, the phase and vibration amplitude of the sound waves corresponding to specific sound effect 2 are adjusted and played. When specific sound effect 2 and regular audio are played simultaneously, the regular audio and specific sound effect 2 are mixed, the phase and vibration amplitude of the sound waves corresponding to the mix are adjusted, and played. In this way, the electronic device adjusts the audio to be played by speaker channel a and the corresponding speaker channel b.
[0202] For example, consider the tablet computer shown in Figure 10. As shown in Figure 16, when no speaker channels are blocked or obstructed, the speaker channels located on the upper left edge of the tablet computer are used to play regular sound effects. The speaker channels located on the lower left edge of the tablet computer are used to play special sound effect 1. The speaker channels located on the upper right edge of the tablet computer are used to play regular sound effects. The speaker channels located on the lower right edge of the tablet computer are also used to play special sound effect 2.
[0203] As shown in Figure 16, if the speaker channel group on the lower left edge is blocked or obstructed, that is, if the speaker channel group configured on the lower left edge is speaker channel a, the electronic device can control the speaker channel group on the lower left edge to play only regular sound effects, and control the speaker channel group on the upper left edge to play only special sound effect 1. In other words, speaker channel b, which is not originally required to play special sound effect 1, will no longer play regular sound effects when the speaker channel group on the lower left edge is blocked or obstructed, and will instead play special sound effect 1. This ensures that the more important special sound effect is not affected by the speaker obstruction.
[0204] As shown in Figure 16, if the speaker channel group on the lower right edge is blocked or obstructed, that is, if the speaker channel group configured on the lower right edge is speaker channel a, the electronic device can control the speaker channel group on the lower right edge to play only regular sound effects, and control the speaker channel group on the upper right edge to play only special sound effect 2. In other words, speaker channel b, which originally plays regular sound effects, will no longer play regular sound effects when the speaker channel group on the lower right edge is blocked or obstructed, and will instead play special sound effect 2. This ensures that the more important special sound effects are not affected by the speaker obstruction.
[0205] In other possible embodiments, different processing methods may be used for different specific scenarios.
[0206] For example, when the audio played by a group of speaker channels a does not include a specific sound effect, the electronic device may not adjust the audio played by each speaker channel.
[0207] For example, if all speaker channels on one edge of an electronic device are blocked or obstructed, all audio data can be played through the speaker channels on the other edge. Alternatively, the audio played through the blocked or obstructed speaker channels can be adjusted to compensate for the effects of the speaker channel obstruction.
[0208] For example, if the channel corresponding to the woofer in speaker channel a is blocked, but the tweeter is not, then when the high-frequency portion of the audio needs to be played by speaker channel a, it is considered that speaker channel a is not blocked. In other words, the audio can be played normally without any additional processing. When the low-frequency portion of the audio needs to be played by speaker channel a, it is considered that speaker channel a is blocked, and the audio to be played by one or more speaker channels can be adjusted in the above manner.
[0209] In some embodiments, the electronic device may further adjust the audio played by one or more speaker channels based on the degree of obstruction (or blockage) of the speaker channels. The degree of obstruction (or blockage) may be a ratio quantified by the electronic device based on the impedance of the speaker.
[0210] For example, the electronic device can obtain the impedance value a corresponding to each speaker when it is unobstructed and the impedance value b when it is completely obstructed. Then, the impedance value a is associated with 0% and the impedance value b is associated with 100%. Finally, the impedance value between the impedance value a and the impedance value b can be quantified as a ratio between 0% and 100%.
[0211] In this way, the electronic device can determine the degree of shielding (or blocking) of the corresponding speaker channel according to the real-time impedance value of each speaker.
[0212] After determining the degree of occlusion (or blockage) corresponding to each speaker channel, the electronic device may determine whether the degree of occlusion (or blockage) exceeds a preset threshold. The preset threshold may be a system default value or a user-configured value, for example, 50%.
[0213] If the threshold is exceeded, the second method of the aforementioned embodiment is used to adjust the audio played by one or more speaker channels. If the threshold is not exceeded and is not 0, the first or third method of the aforementioned embodiment is used to adjust the audio played by one or more speaker channels.
[0214] For example, the electronic device is the tablet computer shown in Figure 9. As shown in Figure 17, if a group of speaker channels on the lower left edge are blocked (or clogged) and the degree of blockage (or clogged) does not exceed a preset threshold, the adjusted normal sound effects and / or special sound effects 1 are played through the group of speaker channels on the lower left edge.
[0215] As shown in FIG17 , when the degree of occlusion (or blockage) of the speaker channels on the lower right edge exceeds a preset threshold, the speaker channels on the upper right edge can be controlled to pause audio playback. Simultaneously, the speaker channels on the upper right edge can be controlled to play adjusted regular sound effects and / or special sound effects 2.
[0216] For example, the electronic device is a tablet computer as shown in Figure 10. As shown in Figure 18, if the set of speaker channels on the lower left edge is blocked (or clogged) and the degree of blockage (or occlusion) does not exceed a preset threshold, the set of speaker channels on the lower left edge plays regular sound effects, and the set of speaker channels on the upper left edge plays special sound effect 1.
[0217] As shown in Figure 18, when the degree of occlusion (or blockage) of a group of speaker channels on the lower side of the right edge exceeds a preset threshold, the adjusted regular sound effects and / or specific sound effects 2 are played by a group of speaker channels on the upper side of the right edge, and the group of speaker channels on the lower side of the right edge pause playing audio.
[0218] In summary, in some embodiments, as shown in FIG19 , the above-mentioned speaker control method may include the following steps:
[0219] S101, determining audio data to be played, where the audio data includes a first audio and a second audio.
[0220] In some embodiments, the electronic device may determine the audio data to be played based on the detected specific service requirements. To facilitate the description of the above method, an example is given in which the audio data to be played includes a first audio and a second audio.
[0221] In addition, the first audio and second audio can be different audio. For example, the first audio can be the specific sound effect 1 in the aforementioned embodiment, and the second audio can be the regular sound effect in the aforementioned embodiment. For another example, the first audio can be the regular sound effect in the aforementioned embodiment, and the second audio can be the specific sound effect 1 in the aforementioned embodiment. For another example, the first audio can be the regular sound effect and specific sound effect 1 in the aforementioned embodiment, and the second audio can be the regular sound effect and specific sound effect 2 in the aforementioned embodiment.
[0222] S102: Control the first speaker to play the first audio, and control the second speaker to play the second audio.
[0223] In some embodiments, the first speaker and the second speaker may be examples of two speakers disposed on the same side of the electronic device. For example, the first speaker and the second speaker are both disposed on the same side edge of the electronic device, that is, the corresponding sound holes face the same direction.
[0224] In some embodiments, after determining the audio data to be played, it is also necessary to determine the portion to be played by each speaker. The method for determining the audio to be played by each speaker can refer to the description in the previous embodiments. For example, the sound effect to be played by each speaker can be determined based on the correspondence between the sound effect type and the speaker channel. Here, the example of a first speaker playing the first audio and a second speaker playing the second audio is directly used.
[0225] S103: When the sound outlet of the first speaker is blocked, adjust the audio played by the first speaker and / or the second speaker.
[0226] For example, when the sound outlet of the first speaker is blocked, the first speaker can be controlled to play the adjusted first audio. The adjustment of the first audio can be performed by changing the sound wave phase and audio energy of the first audio when modulating the first audio to be played by the first speaker, thereby also changing the phase and vibration amplitude of the sound wave signal actually broadcast by the first speaker.
[0227] In some embodiments, under condition 1, the first speaker is controlled to play the adjusted first audio. Condition 1 may include any one of the following:
[0228] (1) Obtain a first occlusion ratio corresponding to the sound outlet of the first speaker (ie, the degree of occlusion of the first speaker), and determine that the first occlusion ratio is less than a first threshold (preset threshold).
[0229] (2) Determine that the preset priority of the second audio is higher than that of the first audio. For example, the second audio is a specific audio and the first audio is a regular audio.
[0230] Exemplarily, when the sound outlet of the first speaker is blocked, the second speaker is controlled to play the first audio.
[0231] In some examples, before controlling the second speaker to play the first audio, controlling the first speaker may stop playing the first audio or may not stop playing the first audio, which is not limited in this embodiment of the present application.
[0232] In other embodiments, when the preset priority of the first audio is higher than that of the second audio, for example, when the first audio is a specific audio and the second audio is a regular audio, the second speaker can be controlled to stop playing the second audio while the second speaker is controlled to play the first audio, and the first speaker can be controlled to play the second audio. By swapping the speakers used for the first and second audio, the higher-priority first audio can be better played.
[0233] In some embodiments, under condition 2, the electronic device selects a method for controlling the second speaker to play the first audio control to ensure audio output quality. Condition 2 includes: obtaining a first occlusion ratio corresponding to the sound outlet of the first speaker; and determining that the first occlusion ratio is not less than a first threshold.
[0234] In other embodiments, when the second speaker is controlled to play the first audio, the second speaker continues to play the second audio, similar to what is shown in FIG. 14 .
[0235] In other embodiments, the electronic device may further include a third speaker and a fourth speaker, wherein the third speaker and the fourth speaker may also be disposed on the same side edge of the electronic device, that is, the sound holes of the third speaker and the fourth speaker may also face the same direction.
[0236] When both the third and fourth speakers are playing the third audio, if it is detected that the sound outlet of the third speaker is blocked, the third speaker can be controlled to stop playing the third audio, and the fourth speaker can be controlled to play the fourth audio, which is the third audio with the sound wave phase and vibration amplitude adjusted.
[0237] In other embodiments, when the third speaker and the fourth speaker both play the fifth audio and the sixth audio, it is detected that the sound outlet of the third speaker is blocked; when the fifth audio is the first type of audio, that is, belongs to a specific sound effect, and the sixth audio is not the first type of audio, the third speaker is controlled to play only the sixth audio; the fourth speaker is controlled to play the seventh audio and the sixth audio, and the seventh audio is the fifth audio after the sound wave phase and vibration amplitude are adjusted, similar to that shown in Figure 15.
[0238] In addition, the electronic device includes a first set, which includes multiple audio type identifiers, and the audio that matches the audio type identifier in the first set is the first type of audio.
[0239] The following describes the implementation effects of the speaker control method provided in the embodiments of the present application in combination with several common application scenarios, such as scenarios in which users use electronic devices to play games and scenarios in which users use electronic devices to watch videos.
[0240] For the convenience of description, taking an electronic device including a speaker channel 1 and a speaker channel 2 as an example, the speaker sound holes corresponding to the speaker channel 1 and the speaker channel 2 can be configured on the same side of the electronic device housing.
[0241] In a scenario where a user is playing a shooting game on an electronic device, the game audio data corresponding to the shooting game includes background sound, gunshot sound effects, footstep sound effects, and game character sound effects. In some examples, if the configuration file corresponding to the shooting game specifies gunshot sound effects and footstep sound effects as specific sound effects, the electronic device may determine that the gunshot sound effects and footstep sound effects are specific sound effects, while the background sound and game character sound effects are regular sound effects. In other examples, if the system configuration file in the electronic device specifies that gunshot sound effects and footstep sound effects are specific sound effects, the electronic device may also determine that the gunshot sound effects and footstep sound effects are specific sound effects, while the background sound and game character sound effects are regular sound effects.
[0242] For example, when an electronic device is playing a shooting game, both speaker channel 1 and speaker channel 2 are used to play background sound, gunshot sound effects, footstep sound effects, and game character sound effects. That is, if the audio data to be played in real time includes background sound, then both speaker channel 1 and speaker channel 2 will play the background sound. If the audio data to be played in real time includes background sound and footstep sound effects, then both speaker channel 1 and speaker channel 2 will play the mixed background sound and footstep sound effects, and so on.
[0243] When the electronic device detects that speaker channel 1 is blocked, the phase and audio intensity of the audio to be played by speaker channel 1 (such as background sound, gunshot sound effects, footsteps sound effects, and game character sound effects) can be adjusted.
[0244] Alternatively, when the electronic device detects that speaker channel 1 is blocked, it controls speaker channel 1 to stop playing audio and adjusts the phase and intensity of the audio to be played by speaker channel 2 (such as background sound, gunshot sound effects, footsteps sound effects, and game character sound effects).
[0245] As another example, when the electronic device runs a shooting game, speaker channel 1 is used to play gunshot sound effects and footsteps sound effects, and speaker channel 2 is used for background sounds and game character sound effects.
[0246] When the electronic device detects that speaker channel 1 is blocked, it controls speaker channel 1 to play background sounds and game character sound effects. It controls speaker channel 2 to play gunshot and footstep sounds. In other words, the audio played by speaker channel 1 and speaker channel 2 are swapped.
[0247] In this way, even if some speakers are blocked, users can still clearly hear the footsteps and gunshots in the game, and can also accurately determine the sound source location of the footsteps and gunshots in the game world.
[0248] In addition, when a user is watching a video on an electronic device, the audio data corresponding to the video includes background sound and dialogue sound effects. In some examples, if the configuration file corresponding to the video application specifies that the dialogue sound effects are specific sound effects, the electronic device may determine that the dialogue sound effects are specific sound effects and the background sound is regular sound effects. In other examples, if the system configuration file in the electronic device specifies that the dialogue sound effects are specific sound effects, the electronic device may also determine that the dialogue sound effects are specific sound effects and the background sound is regular sound effects.
[0249] In addition, when the electronic device plays a video, speaker channel 1 is used to play the dialogue sound effects, and speaker channel 2 is used to play the background sound.
[0250] When the electronic device detects that the speaker of speaker channel 1 is blocked, the phase and intensity of the audio (ie, the dialogue sound effect) to be played by speaker channel 1 can be adjusted.
[0251] Alternatively, when the electronic device detects that the speaker of speaker channel 1 is blocked, it controls speaker channel 1 to stop playing audio, and controls speaker channel 2 to play background sound and dialogue sound effects.
[0252] Alternatively, when the electronic device detects that the speaker of speaker channel 1 is blocked, it controls speaker channel 1 to play background sound and controls speaker channel 2 to play dialogue sound effects.
[0253] In this way, even if some speakers are blocked, users can still clearly hear the actors' lines and dialogues in the video, which will not affect the user's viewing experience.
[0254] An embodiment of the present application further provides an electronic device, which may include a memory and one or more processors. The memory and processor are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device performs each step of the above embodiment. Of course, the electronic device includes but is not limited to the above memory and one or more processors.
[0255] The embodiment of the present application also provides a chip system, which can be applied to the terminal device in the aforementioned embodiment. As shown in Figure 20, the chip system includes at least one processor 2201 and at least one interface circuit 2202. The processor 2201 can be the processor in the above-mentioned electronic device. The processor 2201 and the interface circuit 2202 can be interconnected via a line. The processor 2201 can receive and execute computer instructions from the memory of the above-mentioned electronic device through the interface circuit 2202. When the computer instructions are executed by the processor 2201, the electronic device can perform the various steps in the above-mentioned embodiment. Of course, the chip system can also include other discrete components, which are not specifically limited in the embodiment of the present application.
[0256] In some embodiments, through the description of the above 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 used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0257] The functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0258] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
[0259] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A speaker control method, characterized in that: Applied to an electronic device, the electronic device includes a first speaker and a second speaker, and the method includes: In the case of determining to play the first audio and the second audio, controlling the first speaker to play the first audio, and controlling the second speaker to play the second audio; When a sound outlet of the first speaker is blocked, controlling the first speaker to play the adjusted first audio; Alternatively, the second speaker is controlled to play the first audio.
2. The method according to claim 1, characterized in that Before controlling the first speaker to play the adjusted first audio, the method includes: Adjust the sound wave phase and vibration amplitude corresponding to the first audio.
3. The method according to claim 2, characterized in that Before adjusting the sound wave phase and vibration amplitude corresponding to the first audio, the method further includes: Determining a first occlusion ratio corresponding to the sound outlet of the first speaker; Determine whether the first occlusion ratio is less than a first threshold.
4. The method according to claim 2, characterized in that Before adjusting the sound wave phase and vibration amplitude corresponding to the first audio, the method further includes: It is determined that a preset priority of the second audio is higher than that of the first audio.
5. The method according to claim 1, wherein Before controlling the second speaker to play the first audio, the method includes: Control the first speaker to stop playing the first audio.
6. The method according to claim 5, characterized in that In the case of controlling the second speaker to play the first audio, the method further includes: controlling the second speaker to stop playing the second audio; Control the first speaker to play the second audio.
7. The method according to claim 5, characterized in that Before controlling the first speaker to stop playing the first audio, the method further includes: Determining a first occlusion ratio corresponding to the sound outlet of the first speaker; Determine whether the first occlusion ratio is not less than a first threshold.
8. The method according to claim 1, characterized in that When the second speaker is controlled to play the first audio, the second speaker continues to play the second audio.
9. The method according to any one of claims 1 to 8, characterized in that The sound holes of the first speaker and the second speaker are oriented in the same direction.
10. The method according to claim 1, characterized in that The electronic device includes a third speaker and a fourth speaker, and the method includes: When the third speaker and the fourth speaker both play the third audio, detecting that the sound outlet of the third speaker is blocked; Controlling the third speaker to stop playing the third audio; The fourth speaker is controlled to play a fourth audio, where the fourth audio is the third audio after adjusting the sound wave phase and vibration amplitude.
11. The method according to claim 10, characterized in that The sound holes of the third speaker and the fourth speaker are oriented in the same direction.
12. The method according to claim 1, characterized in that The electronic device includes a third speaker and a fourth speaker, and the method includes: When the third speaker and the fourth speaker both play the fifth audio frequency and the sixth audio frequency, it is detected that the sound outlet of the third speaker is blocked; When the fifth audio is audio marked as the first type and the sixth audio is not audio of the first type, controlling the third speaker to play only the sixth audio; The fourth speaker is controlled to play a seventh audio and the sixth audio, where the seventh audio is the fifth audio after adjusting the sound wave phase and vibration amplitude.
13. The method according to claim 12, characterized in that The electronic device includes a first set, the first set includes multiple audio type identifiers, and the audio matching the audio type identifier in the first set is the first type of audio.
14. An electronic device, characterized in that: The electronic device includes one or more processors and a memory; the memory is coupled to the processor, and the memory is used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the one or more processors are used to execute the method according to any one of claims 1 to 13.
15. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 13.
16. A computer program product, characterized in that The computer program product comprises a computer program which, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 13.