Volume adjusting method and electronic device
By detecting the holding direction of the electronic device and adjusting the volume of the unobstructed microphone, the problem of poor sound pickup caused by a blocked microphone is solved, achieving better sound pickup effect and user experience.
Patent Information
- Application Number
- PCT/CN2024/139967
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-21
- Filing Date
- 2024-12-17
- Publication Date
- 2025-09-25
AI Technical Summary
When users use electronic devices, the microphone may be blocked, resulting in poor sound pickup and affecting the user experience.
By detecting the holding direction of the electronic device, the volume of the unobstructed microphone is adjusted to the maximum to ensure the pickup effect, and the user voice and environmental noise are separated by combined echo cancellation and noise reduction processing.
The microphone's sound pickup effect has been improved, especially in gaming and call scenarios, improving the user's voice call quality and usage experience.
Smart Images

Figure CN2024139967_25092025_PF_FP_ABST
Abstract
Description
Volume adjustment method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 21, 2024, with application number 202410331902.7 and application name “Volume Adjustment 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 field of terminal technology, and in particular to a volume adjustment method and an electronic device. Background Art
[0003] Mobile phones and other electronic devices have become indispensable tools for people in daily life. Users can use electronic devices for leisure and entertainment, communicate with other users, etc.
[0004] Currently, electronic devices are equipped with microphones, through which electronic devices can perform voice calls, voice recognition, and audio recording. However, when users use electronic devices, the microphones may be blocked, resulting in poor sound pickup effect of the microphones and a poor user experience. Summary of the Invention
[0005] The present application provides a volume adjustment method and an electronic device, which can ensure the sound pickup effect of the electronic device as quickly as possible and improve the user experience.
[0006] In a first aspect, the present application provides a volume adjustment method, which is applied to an electronic device, the electronic device including a first microphone and a second microphone, the method comprising:
[0007] When it is detected that the first application launched is an application in the first list, it is determined whether the holding direction of the electronic device is the first direction. The applications in the first list include applications that require the first microphone and / or the second microphone to pick up sound when in use. When the holding direction of the electronic device is the first direction, there is no risk of blockage of the sound pickup hole of the first microphone, and there is a risk of blockage of the sound pickup hole of the second microphone; when the holding direction of the electronic device is the first direction, the sound pickup volume of the first microphone is adjusted to a first volume, and the first volume is a volume greater than or equal to a first threshold.
[0008] It should be understood that in order to ensure the sound pickup effect of the first microphone, the first threshold is usually set to be relatively large, so that the first volume is at least greater than the volume of the first microphone after the last adjustment, or the first threshold is close to the maximum volume supported by the electronic device, then the first volume is close to the maximum volume supported by the electronic device.
[0009] In the above method, when it is detected that the first application launched is an application in the first list, it is determined whether the holding direction of the electronic device is the first direction. When the holding direction of the electronic device is the first direction, since there is no risk of blockage of the first microphone, the first electronic device can adjust the pickup volume of the first microphone to a first volume greater than or equal to the first threshold. In this way, by increasing the volume of the first microphone whose pickup hole is not at risk of blockage, the electronic device can pick up the user's voice data to a greater extent, ensure the sound reception effect, and improve the voice call effect between the user and teammates in scenarios such as games.
[0010] In conjunction with the first aspect, in certain implementations of the first aspect, adjusting the pickup volume of the first microphone to the first volume includes:
[0011] The sound pickup volume of the first microphone is adjusted to a first volume, and the sound pickup volume of the second microphone is adjusted to a second volume, where the second volume is less than the first volume and greater than a minimum volume supported by the electronic device.
[0012] In the above method, the first microphone and the second microphone are turned on, and the pickup volume of the first microphone is greater than or equal to the first threshold, and the pickup volume of the second microphone is lower than the first volume and greater than the maximum volume supported by the electronic device. Combined with the sounds collected by the above two microphones, the electronic device can separate the user's voice and environmental noise from the sound data captured by the two microphones through echo cancellation processing and noise reduction processing, thereby facilitating the electronic device to obtain the best user voice data.
[0013] In combination with the first aspect, in some implementations of the first aspect, when the electronic device is held in a first direction, the first microphone and the second microphone are turned on.
[0014] In the above method, the electronic device can turn on two microphones when the holding direction of the electronic device is a first direction, so as to combine the sounds collected by the above two microphones. The electronic device can separate the user's voice and environmental noise from the sound data captured by the two microphones through echo cancellation processing and noise reduction processing, thereby facilitating the electronic device to obtain the best user voice data.
[0015] In conjunction with the first aspect, in certain implementations of the first aspect, when detecting that the launched first application is an application in the first list, determining whether the holding direction of the electronic device is the first direction includes:
[0016] When it is detected that the first application launched is an application in the first list, a first parameter in the electronic device is obtained, where the first parameter is used to indicate the holding direction of the electronic device; and based on the first parameter, it is determined whether the holding direction of the electronic device is the first direction.
[0017] In the above method, when it is detected that the first application launched is an application in the first list, a first parameter for indicating the holding direction of the electronic device can be obtained in the electronic device, so that whether the holding direction of the electronic device is the first direction can be determined by the first parameter.
[0018] In conjunction with the first aspect, in certain implementations of the first aspect, the electronic device includes an acceleration sensor, and when detecting that the launched first application is an application in the first list, obtaining a first parameter of the electronic device includes:
[0019] During the operation of the electronic device, each time an acceleration signal is collected by the acceleration sensor, the three-axis acceleration modulus value corresponding to the acceleration signal is recorded. The three-axis acceleration modulus value is used to represent the size of the total acceleration signal collected by the acceleration sensor in multiple different directions; when it is detected that the first application launched is an application in the first list, the recorded three-axis acceleration modulus value closest to the current moment is read; and the three-axis acceleration modulus value is determined as the first parameter.
[0020] In the above method, the recorded three-axis acceleration modulus value obtained by the acceleration sensor closest to the current moment can be read, so that whether the holding direction of the electronic device is the first direction can be determined based on the three-axis acceleration modulus value closest to the current moment.
[0021] In conjunction with the first aspect, in certain implementations of the first aspect, adjusting the pickup volume of the first microphone to a first volume, and adjusting the pickup volume of the second microphone to a second volume, includes:
[0022] The gain value of the first microphone is adjusted to a first gain value, and the gain value of the second microphone is adjusted to a second gain value, so that the pickup volume of the first microphone is the first volume, and the pickup volume of the second microphone is the second volume; wherein the first volume is the maximum volume supported by the electronic device, the first gain value is the maximum gain value supported by the electronic device, and the second gain value is less than the maximum gain value supported by the electronic device and greater than the minimum gain value supported by the electronic device.
[0023] In the above method, the pickup volume of the microphones can be adjusted by adjusting the gain values of the two microphones.
[0024] In some embodiments, the first volume is a maximum volume supported by the electronic device, and the first gain value is a maximum gain value supported by the electronic device.
[0025] When the first volume is the maximum volume supported by the electronic device, the electronic device can pick up the user's voice data to the greatest extent, ensure the sound reception effect, and improve the voice call effect between the user and teammates in scenarios such as games.
[0026] In combination with the first aspect, in certain implementations of the first aspect, when the first application is a gaming application that requires the first microphone and / or the second microphone to pick up sound when in use, and the first direction is a landscape orientation or a reverse landscape orientation, the first microphone is a microphone on the long side of the electronic device, a microphone on the back panel and / or a screen side, and the second microphone is a microphone on the short side of the electronic device.
[0027] For example, if the first application is the Honor of Kings application and the first orientation is the horizontal orientation, then the pickup hole of the microphone on the short side of the electronic device is at risk of being blocked. Therefore, the microphone on the long side of the electronic device, the back panel and / or the screen side does not have a risk of being blocked.
[0028] In combination with the first aspect, in certain implementations of the first aspect, when the first application is a call application that requires the first microphone and / or the second microphone to pick up sound when in use, and the first direction is a portrait screen direction or a reverse portrait screen direction, the first microphone is the microphone on the short side of the electronic device, the back panel and / or the screen side, and the second microphone is the microphone on the long side of the electronic device.
[0029] For example, if the first application is a call and the first orientation is a vertical screen orientation, then the microphone on the long side of the electronic device is at risk of being blocked. Therefore, the microphone on the short side of the electronic device, the back panel and / or the screen side does not have a risk of being blocked.
[0030] In conjunction with the first aspect, in certain implementations of the first aspect, when detecting that the launched first application is an application in the first list, before determining whether the direction of the electronic device is the first direction, the method further includes:
[0031] A first interface is displayed, wherein an identifier of a first application is displayed in the first interface; and in response to a first operation on the first interface, the first application is started, wherein the first operation is an operation on the identifier of the first application.
[0032] The first interface may be an interface including an identifier of the first application in the electronic device, such as a main interface of the electronic device.
[0033] In a second aspect, the present application provides an electronic device, which includes: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method in the first aspect and any possible implementation of the first aspect.
[0034] In a third aspect, the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the method in the first aspect and any possible implementation of the first aspect.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device executes the method in the first aspect and any possible implementation of the first aspect.
[0036] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method in the first aspect and any possible implementation manner of the first aspect.
[0037] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] FIG1 is a schematic diagram of microphone positions of an electronic device provided by the prior art;
[0039] FIG2 is a schematic diagram of a holding direction of an electronic device provided by the prior art;
[0040] FIG3 is a schematic diagram of a scenario of holding an electronic device provided by the prior art;
[0041] FIG4 is a schematic structural diagram of an electronic device provided in one embodiment of the present application;
[0042] FIG5 is a schematic diagram of a software architecture of an electronic device provided in one embodiment of the present application;
[0043] FIG6 is a flow chart of a volume adjustment method according to an embodiment of the present application;
[0044] FIG7 is a schematic diagram of an electronic device in three directions provided by an embodiment of the present application;
[0045] FIG8 is a flow chart of a volume adjustment method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In this application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a alone, b alone, or c alone can represent: a alone, b alone, c alone, a and b in combination, a and c in combination, b and c in combination, or a, b, and c in combination, where a, b, and c can be single or multiple. In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance.
[0047] To facilitate understanding, some of the examples given are provided for reference to the description of concepts related to the embodiments of the present application.
[0048] 1. Accelerometer
[0049] An accelerometer is a device in electronic equipment that can measure acceleration.
[0050] For example, in mobile phones, accelerometers are often used to detect the movement of the phone, such as rotation, shaking, tilting, etc. This data can be used by applications to determine the state of the phone and implement functions such as automatic screen rotation, game control, and pedometer.
[0051] 2. Microphone (MIC)
[0052] The microphone is mainly used to receive sound signals and provide support for functions such as voice calls, voice recognition, and audio recording.
[0053] For example, the main roles and functions of the microphone in a mobile phone include:
[0054] a. Call: During a call, the microphone is used to receive the user's voice and convert it into an electrical signal to transmit to the other party, thereby enabling a two-way call.
[0055] b. Voice recognition: In voice assistant applications such as Siri, Xiao Ai, YOYO, etc., the microphone can receive the user's voice and convert it into text for subsequent voice recognition and response.
[0056] c. Recording: The microphone in the phone can also be used to record sounds, such as recording voice memos, recording music, recording videos, etc.
[0057] 3. Echo cancellation processing
[0058] Echo cancellation works by identifying and eliminating the echo caused by the audio output returning to the microphone. This process involves analyzing the audio data, identifying the characteristics of the echo signal, and then using a signal processing algorithm to remove it from the captured sound data, ensuring that the user's voice is not disturbed by the echo.
[0059] 4. Noise reduction
[0060] Noise reduction is used to identify and filter noise data in the environment, such as other users' voices, to reduce the interference of background noise on the user's voice. Noise reduction typically involves the use of digital signal processing technology, using specific algorithms to remove or reduce noise from the captured sound data, ensuring that the user's voice can be clearly conveyed to the listener.
[0061] Figure 1 shows a schematic diagram of the position of a microphone in an electronic device provided by the prior art. For ease of explanation, Figure 1 takes a mobile phone as an example.
[0062] FIG1( a ) shows a side view of a mobile phone, from which it can be seen that a microphone A is provided on the long side of the mobile phone.
[0063] FIG1( b ) shows a rear view of the mobile phone, from which it can be seen that a microphone B is provided on the back panel of the mobile phone.
[0064] (c) in FIG1 shows a front view of the mobile phone, from which it can be seen that a microphone C is provided on the screen side of the mobile phone.
[0065] FIG1( d ) shows a side view of the mobile phone, from which it can be seen that a microphone D is provided on the short side of the mobile phone.
[0066] The mobile phone can pick up sound (receive sound) through microphone A, microphone B, microphone C and / or microphone D.
[0067] It is understood that FIG1 is merely an exemplary illustration and should not be construed as limiting the scope of protection of this application. For example, different mobile phones may have different numbers and locations of microphones.
[0068] In addition, as shown in FIG2 , the electronic device may include four holding directions, namely, landscape, reverse landscape, portrait, and reverse portrait. When the long side of the electronic device screen is in the horizontal direction and the short side is in the vertical direction perpendicular to the horizontal direction, the holding direction of the electronic device is landscape, as shown in FIG2 (a); at this time, when the electronic device is rotated 180° clockwise from the landscape orientation, the holding direction of the electronic device is reverse landscape, as shown in FIG2 (b); when the electronic device is rotated 90° clockwise from the landscape orientation, the holding direction of the electronic device is portrait, as shown in FIG2 (c); when the electronic device is rotated 90° counterclockwise from the landscape orientation, the holding direction of the electronic device is reverse portrait, as shown in FIG2 (d).
[0069] When a user is using an electronic device, the microphone may be blocked by the user's hand, resulting in poor voice pickup effect of the microphone in the electronic device and a poor microphone usage experience for the user.
[0070] For example, as shown in FIG3 , in a scenario where a user holds an electronic device in landscape orientation with both hands and plays a game through a game application in the electronic device that requires a microphone to pick up sound, the user's hands may block the pickup hole of the microphone on the short side of the electronic device, resulting in poor voice pickup when the user chats with the player or chat partner, causing the player or chat partner to not be able to hear the user clearly, or the sound quality to deteriorate, resulting in a poor microphone usage experience for the user.
[0071] For another example, in a scenario where a user holds an electronic device in a portrait orientation and makes a call through a call application in the electronic device that requires a microphone to pick up sound, the user's hand may block the pickup hole of the microphone on the long side of the electronic device, resulting in poor voice pickup when the user is talking to the other party, causing the other party to not be able to hear the user clearly, or the sound quality to deteriorate, resulting in a poor microphone usage experience for the user.
[0072] In response to the above problems, the present application may provide a volume adjustment method, an electronic device, a chip system, a computer-readable storage medium, and a computer program product. Since microphones are provided at multiple positions of the electronic device, and considering that the user may block part of the microphones of the electronic device, when the application launched by the electronic device is an application that requires the use of a microphone to pick up sound, and the holding direction of the electronic device is a first direction pre-saved in the electronic device, the electronic device can adjust the volume of the other part of the microphone that will not be blocked by the user when the holding direction of the electronic device is the first direction to the maximum. In this way, sound can be picked up by the aforementioned other part of the microphone that will not be blocked by the user, thereby improving the sound pickup effect and ensuring the user's microphone usage experience.
[0073] The above-mentioned electronic device may be an electronic device with microphone hardware and corresponding software support.
[0074] The electronic devices may include mobile phones, tablet computers, vehicle-mounted devices, laptop computers, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart cars, smart TVs, robots, and other devices.
[0075] It should be noted that in some possible implementations, the electronic device may also be called a terminal device, user equipment (UE), etc., and the embodiments of the present application do not limit this.
[0076] For the scenarios of this application, please continue to refer to the application scenario diagram in Figure 3.
[0077] In some embodiments, the electronic device is provided with multiple microphones, namely, a microphone located on the short side of the electronic device, a microphone on the long side, a microphone on the back panel and / or the screen side; the applications in the first list may include applications that require the use of a microphone to pick up sound during use; the first direction is the horizontal screen direction.
[0078] When it is detected that the first application launched is an application in the first list, the electronic device can determine whether the holding direction of the electronic device is landscape; when the holding direction of the electronic device is landscape, the electronic device can turn on any one or more of the other microphones in the electronic device except the short side; and the electronic device can adjust the pickup volume of the aforementioned other microphones except the short side to the maximum volume supported by the electronic device.
[0079] It should be understood that the above is an example of a scenario and does not limit the scenario of this application.
[0080] For the sake of convenience, FIG4 takes the electronic device 100 as a mobile phone as an example.
[0081] As shown in Figure 4, in some embodiments, the electronic device 100 may include a processor 101, a communication module 102, a display screen 103, a camera 104, a sensor 105, an internal memory 106, a USB interface 107, an external memory interface 108, a charging management module 109, a power management module 110, and a battery 111, etc.
[0082] The processor 101 may include one or more processing units, for example, an application processor (AP), a modem processor, a graphics processor, an image signal processor (ISP), a controller, a memory, a video stream codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors 101.
[0083] 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.
[0084] The processor 101 may also include a memory for storing instructions and data.
[0085] The communication module 102 may include antenna 1 and antenna 2 , a mobile communication module, and / or a wireless communication module.
[0086] The display screen 103 is used to display images or videos in the human-computer interaction interface. The display screen 103 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 103, where N is a positive integer greater than one.
[0087] The sensor 105 in the electronic device 100 may include an acceleration sensor, a capacitance sensor, an image sensor, a touch sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, a distance sensor, a proximity light sensor, an ambient light sensor, a fingerprint sensor, a temperature sensor, a bone conduction sensor and other components to realize the sensing and / or acquisition functions of different signals.
[0088] Optionally, the electronic device 100 may further include peripheral devices, such as a mouse, buttons, indicator lights, a keyboard, a speaker, a microphone, etc.
[0089] A microphone is a device used to receive and record sound. It's typically located on the short side, long side, back panel, and / or screen of an electronic device and is covered by a small hole, known as the sound pickup port. Microphones in electronic devices can use different operating principles, such as condenser, dynamic, or electromagnetic, but the most common is the condenser microphone.
[0090] A condenser microphone consists of a metal diaphragm and a fixed metal plate. When sound waves enter the microphone, the diaphragm vibrates in response to the sound waves. This vibration causes a change in capacitance between the plate and the diaphragm. Circuitry in the phone measures this capacitance change and converts it into an electrical signal, which is ultimately processed by the audio chip into a recognizable sound signal.
[0091] Microphones play a key role in electronic devices. Microphones enable users to make voice calls, record voice, and perform voice control through electronic devices.
[0092] For example, when a user makes a phone call, a microphone receives the user's voice and converts it into an electrical signal, which is then transmitted to the other party's electronic device via the network. Microphones also play an important role when recording audio or video, capturing the sound that the user wants to record.
[0093] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100 .
[0094] In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine some components, separate some components, or arrange the components differently. The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0095] Please refer to Figure 5, which is a schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application. When the volume adjustment method provided in an embodiment of the present application is applied to the electronic device 100 shown in Figure 4, the software in the electronic device 100 can be divided into an application layer 201, an application framework layer (framework, FWK) 202, a hardware abstraction layer (hardware abstraction layer, HAL) 203, and a driver layer 204 as shown in Figure 5.
[0096] A plurality of applications may be installed in the application layer 201, for example, a call application (camera application) and a game application.
[0097] The application framework layer 202 provides a set of basic functions and services for the application layer 201 to call and use.
[0098] The hardware abstraction layer 203 is a software located between the operating system kernel and the hardware circuit, and is generally used to abstract the hardware to achieve interaction between the operating system and the hardware circuit at the logic layer.
[0099] The driver layer 204 may be installed with a plurality of drivers for driving the hardware.
[0100] In this embodiment of the present application, the driver layer 204 may include a microphone driver. The microphone driver may be connected to the operating system and the microphone respectively, and the operating system may control the microphone driver to drive the microphone to pick up sound.
[0101] It should be noted that the application layer 201 , the application framework layer 202 , the hardware abstraction layer 203 and the driver layer 204 may also include other contents, which are not specifically limited here.
[0102] Based on the description of the above scenario, the volume adjustment method provided in the embodiment of the present application is described in detail below in combination with the accompanying drawings and application scenarios.
[0103] Please refer to FIG6 , which shows a flow chart of a volume adjustment method provided in an embodiment of the present application.
[0104] As shown in FIG6 , the volume adjustment method provided by this application may include:
[0105] S11. The operating system determines whether the first application started is an application in the first list.
[0106] The first application can be started in multiple ways.
[0107] In some embodiments, the first electronic device includes an icon of a first application. After receiving a user triggering operation (such as a click, double-click, or long press operation, etc.) on the icon of the first application, the first application can be started.
[0108] In other embodiments, a voice assistant is added to the first electronic device. After receiving a specific wake-up word input by the user's voice, the voice assistant can be woken up, and after receiving an indication to open the first application input by the user's voice, the first application can be started.
[0109] For example, the voice assistant may be YOYO. After receiving the user's voice input of "Hello, YOYO", YOYO may be awakened, and after receiving the user's voice input of a voice instruction "open the first application", the first application may be started.
[0110] This application does not limit the specific implementation method of starting the first application.
[0111] The electronic device includes a first microphone and a second microphone, and the applications in the first list include applications that need to use the first microphone and / or the second microphone to pick up sound.
[0112] Exemplarily, the first application started is a game application that requires the first microphone and / or the second microphone to pick up sound when in use, and the first application is an application in the first list.
[0113] Exemplarily, the first application started is a call application that needs to use the first microphone and / or the second microphone to pick up sound when in use, and the first application is an application in the first list.
[0114] It should be understood that the electronic device may have multiple applications installed, and the first application may be an application that requires the first microphone and / or the second microphone to pick up sound when any one of the multiple applications in the electronic device is used.
[0115] Based on this, when the first application is started, the operating system can determine whether the started first application is an application in the first list, thereby preparing data for whether the operating system executes S12.
[0116] When the first application is an application in the first list, the operating system may execute S12; when the first application is not an application in the first list, the first application may be an application that does not require a microphone to pick up sound when in use, and the operating system may not execute any operation.
[0117] S12. The operating system obtains a first parameter of the electronic device.
[0118] The first parameter is used to indicate the holding direction of the electronic device.
[0119] There are many ways to implement the first parameter.
[0120] In some embodiments, the first parameter is a three-axis acceleration modulus; an acceleration sensor is provided in the electronic device, and during the operation of the electronic device, each time the electronic device collects an acceleration signal through the acceleration sensor, the three-axis acceleration modulus corresponding to the acceleration signal can be recorded. Thus, when it is detected that the first application launched is an application in the first list, the recorded three-axis acceleration modulus closest to the current moment can be read, and the three-axis acceleration modulus can be determined as the first parameter.
[0121] It is understood that for any frame of acceleration signals collected by the acceleration sensor, the electronic device can obtain the acceleration signal values corresponding to the three directions of the electronic device in Figure 7, namely the X-axis, Y-axis, and Z-axis. Based on this, the electronic device can calculate a three-axis acceleration modulus value using the three acceleration signal values corresponding to the three directions.
[0122] In some embodiments, the calculation formula for any three-axis acceleration modulus value can be:
[0123] Wherein, x represents the acceleration signal value in the X-axis direction, y represents the acceleration signal value in the Y-axis direction, and z represents the acceleration signal value in the Z-axis direction.
[0124] For example, the acceleration sensor collects acceleration signals at 10:00, 10:05, and 10:10, respectively. The electronic device can obtain the acceleration signal values corresponding to the X-axis, Y-axis, and Z-axis directions of the electronic device at the above three time points, respectively, and record the three-axis acceleration modulus values corresponding to the three acceleration signal values. The time when the operating system detects that the first application started is an application in the first list is 10:11, then the operating system can read the three-axis acceleration modulus value recorded at 10:10, and determine the three-axis acceleration modulus value recorded at 10:10 as the first parameter.
[0125] In other embodiments, the first parameter is a rotational angular velocity value; a gyroscope is provided in the electronic device, and during the operation of the electronic device, each time the electronic device collects a rotational angular velocity signal through the gyroscope, the three-axis rotational angular velocity value corresponding to the rotational angular velocity signal can be recorded. Thus, when it is detected that the first application started is an application in the first list, the recorded three-axis rotational angular velocity value closest to the current moment can be read, and the three-axis rotational angular velocity value can be determined as the first parameter.
[0126] It is understood that for any frame of rotational angular velocity signals collected by the gyroscope, the electronic device can obtain the corresponding rotational angular velocity signal values in the three directions of the electronic device, namely the X-axis, Y-axis, and Z-axis, as shown in Figure 7. Based on this, the electronic device can calculate a three-axis rotation angle value using the three rotational angular velocity signals corresponding to the aforementioned three directions.
[0127] This application does not specifically limit the specific implementation method of the first parameter.
[0128] S13: The operating system determines whether the holding direction of the electronic device is the first direction.
[0129] The first direction is a pre-saved direction in which the user holds the electronic device; the first direction can be determined according to actual conditions.
[0130] There may be four first directions. For example, the first direction may be a landscape direction, a reverse landscape direction, a portrait direction, or a reverse portrait direction.
[0131] That is to say, there are four situations in the first direction:
[0132] Case 1: The first direction is the horizontal screen direction.
[0133] For situation 1, when it is detected that the first application launched is an application in the first list, the operating system can determine whether the holding direction of the electronic device is the landscape direction.
[0134] Case 2: The first direction is the reverse horizontal screen direction.
[0135] For situation 2, when it is detected that the first application launched is an application in the first list, the operating system can determine whether the holding direction of the electronic device is the reverse landscape direction.
[0136] Case 3: The first direction is the vertical screen direction.
[0137] For situation 3, when it is detected that the first application launched is an application in the first list, the operating system can determine whether the holding direction of the electronic device is the portrait direction.
[0138] Case 4: The first direction is the anti-portrait direction.
[0139] For situation 4, when it is detected that the first application launched is an application in the first list, the operating system can determine whether the holding direction of the electronic device is the anti-portrait direction.
[0140] When it is determined that the holding direction of the electronic device is the first direction, the operating system may execute S14; when it is determined that the holding direction of the electronic device is not the first direction, the operating system may not execute any operation.
[0141] S14. The operating system sends an activation request to the microphone driver.
[0142] The start request is used to instruct the microphone driver to control the first microphone, or to turn on the first microphone and the second microphone.
[0143] The first microphone is a microphone whose sound pickup hole is not at risk of being blocked when the user holds the electronic device in the first direction.
[0144] The second microphone is a microphone whose sound pickup hole is at risk of being blocked when the user holds the electronic device in the first direction.
[0145] When the first orientation is the landscape orientation, the first microphone may be a microphone on a long side of the electronic device, a microphone on a back panel or a screen side, and the second microphone may be a microphone on a short side of the electronic device.
[0146] Based on this, when the holding direction of the electronic device is the first direction, the power-on request sent by the operating system to the microphone driver can only be used to instruct the first microphone to turn on, so that the microphone driver can control the first microphone to turn on, and the electronic device picks up sound through the first microphone.
[0147] Optionally, when the electronic device is held in the first direction, the power-on request sent by the operating system to the microphone driver can also be used to instruct the second microphone to turn on, so that the microphone driver can control the first microphone and the second microphone to turn on, and the electronic device picks up sound through the first microphone and the second microphone.
[0148] Among them, the microphone blocked by the user may be the same when the first direction is the anti-landscape direction and the first direction is the landscape direction. Therefore, the operations performed by the operating system when the first direction is the anti-landscape direction are the same as the operations performed by the operating system when the first direction is the landscape direction, and are not described in detail here.
[0149] When the first orientation is a portrait orientation, the first microphone may be a microphone on a short side of the electronic device, and the second microphone may be a microphone on a long side of the electronic device, a microphone on a back panel, or a microphone on a screen side.
[0150] Based on this, when the holding direction of the electronic device is the first direction, the power-on request sent by the operating system to the microphone driver can only be used to instruct the first microphone to turn on, so that the microphone driver can control the first microphone to turn on, and the electronic device picks up sound through the first microphone.
[0151] Optionally, when the electronic device is held in the first direction, the power-on request sent by the operating system to the microphone driver can also be used to instruct the second microphone to turn on, so that the microphone driver can control the first microphone and the second microphone to turn on, and the electronic device picks up sound through the first microphone and the second microphone.
[0152] Among them, the microphone blocked by the user may be the same when the first direction is the anti-portrait screen direction and when the first direction is the portrait screen direction. Therefore, the operations performed by the operating system when the first direction is the anti-portrait screen direction are the same as the operations performed by the operating system when the first direction is the portrait screen direction, and are not described in detail here.
[0153] S151: The microphone driver controls the first microphone to turn on.
[0154] S152: The microphone driver controls the second microphone to turn on.
[0155] It should be understood that when the first direction is the horizontal screen direction, the microphone drives the first microphone to turn on, which can ensure that the electronic device can pick up the user's voice data through the first microphone without the risk of blocking the sound pickup hole.
[0156] Specifically, when the first orientation is a horizontal orientation, the first microphone is a microphone on a long side of the electronic device, a microphone on a back panel, or a microphone on a screen side.
[0157] When the first orientation is a portrait orientation, the first microphone is a microphone on a short side of the electronic device, a microphone on a back panel and / or a screen side.
[0158] Based on this, when the power-on request received by the microphone driver is used to instruct the microphone driver to control the first microphone to turn on, the microphone driver can control the first microphone to turn on, so that the electronic device can pick up the user's voice data through the first microphone without the risk of blocking the sound pickup hole.
[0159] Optionally, when the power-on request received by the microphone driver is used to instruct the microphone driver to control the first microphone and the second microphone to turn on, the microphone driver can also control the first microphone and the second microphone to turn on, so that the electronic device can better pick up the user's voice data through the first microphone whose sound pickup hole is not at risk of being blocked and the second microphone whose sound pickup hole is at risk of being blocked.
[0160] When the activation request is used to instruct the first microphone to be activated, the microphone driving only needs to execute S151 ; when the activation request is used to instruct the first microphone and the second microphone to be activated, the microphone driving needs to execute S151 and S152 .
[0161] Based on this, when the power-on request is used to indicate that the first microphone and the second microphone are turned on, the microphone drive can execute S151 and S152 simultaneously, or execute S151 and S152 sequentially. When the microphone drive executes S151 and S152 sequentially, it can execute S151 first and then S152, or it can execute S152 first and then S151.
[0162] S16. The microphone driver sends an adjustment request to the audio digital signal processor.
[0163] The adjustment request is used to instruct the audio digital signal processor to adjust the volume of the first microphone, or the first microphone and the second microphone.
[0164] When the on request received by the microphone driver is used to instruct the microphone driver to control the first microphone to be on, the microphone driver only executes S151. Then, the adjustment request sent by the microphone driver to the audio digital signal processor is used to instruct the audio digital signal processor to adjust the volume of the first microphone.
[0165] When the turn-on request received by the microphone driver is used to instruct the microphone driver to control the first microphone and the second microphone to turn on, the microphone driver executes S151 and S151, then the adjustment request sent by the microphone driver to the audio digital signal processor is used to instruct the audio digital signal processor to adjust the volume of the first microphone and the second microphone.
[0166] In addition, if the microphone driver only executes S151, then the microphone driver may execute S16 after completing S151; if the microphone driver executes S151 and S152, then the microphone driver may execute S16 after completing S151 and S152.
[0167] S171: The audio digital signal processor calls an audio adjustment parameter to adjust the sound pickup volume of the first microphone to a first volume.
[0168] The first volume is a volume greater than or equal to a first threshold.
[0169] It should be understood that in order to ensure the sound pickup effect of the first microphone, the first threshold is usually set to be relatively large, so that the first volume is at least greater than the volume of the first microphone after the last adjustment, or the first threshold is close to the maximum volume supported by the electronic device, then the first volume is close to the maximum volume supported by the electronic device.
[0170] The turn-on request received by the microphone driver is used to instruct the microphone driver to control the first microphone to turn on. The microphone driver can control the first microphone to turn on and send an adjustment request to the audio digital signal processor to instruct the first microphone to turn on. The audio digital signal processor adjusts the pickup volume of the first microphone to the first volume, that is, the volume of the first microphone is greater than or equal to the first threshold. There is no risk of clogging the pickup hole of the electronic device, and the first microphone with a pickup volume greater than or equal to the first threshold can collect the user's voice data to a greater extent.
[0171] In some embodiments, the first volume is a maximum volume supported by the electronic device.
[0172] Based on this, the audio digital signal processor adjusts the pickup volume of the first microphone to the first volume, that is, the volume of the first microphone is the maximum volume supported by the electronic device, and the electronic device does not have the risk of blocking the pickup hole, and the first microphone with the maximum pickup volume supported by the electronic device can collect the user's voice data to the greatest extent.
[0173] Assume that the first direction is a horizontal screen direction, and the first application is a game application (for example, Honor of Kings, Game for Peace) that requires the use of the first microphone and / or the second microphone to pick up sound when in use.
[0174] Then, the game application is an application in the first list. When it is determined that the holding direction of the electronic device is landscape orientation, the operating system sends a power-on request to the microphone driver to instruct the microphone driver to control the first microphone (the microphone on the long side of the electronic device, the microphone on the back panel or the screen side) to turn on. The microphone driver can control the first microphone to turn on, and the microphone driver can send an adjustment request to the audio digital signal processor to instruct the audio digital signal processor to adjust the pickup volume of the first microphone. In this way, the audio digital signal processor can adjust the pickup volume of the first microphone to the first volume, and the electronic device can pick up the user's voice data to the greatest extent, ensure the reception effect, and improve the voice call effect between the user and teammates in the game.
[0175] The audio adjustment parameter is used to adjust the sound pickup volume of a microphone of the electronic device.
[0176] The present application can store the audio adjustment parameter in the electronic device and / or a storage device communicating with the electronic device, so that the audio digital signal processor can call the audio adjustment parameter to adjust the pickup volume of the first microphone to the first volume.
[0177] In some embodiments, the audio digital signal processor may call an audio adjustment parameter to adjust the gain value of the first microphone to a first gain value so that the pickup volume of the first microphone is the first volume; wherein the first gain value is the maximum gain value supported by the electronic device.
[0178] Assume that the gain values supported by the electronic device include [0, 100].
[0179] Then, the audio digital signal processor calls the audio adjustment parameter, and when the gain value of the first microphone is adjusted to 0, the pickup volume of the first microphone is 0, that is, the pickup volume of the first microphone is the minimum volume supported by the electronic device; when the gain value of the first microphone is adjusted to the first gain value of 100, the pickup volume of the first microphone is 100, that is, the pickup volume of the first microphone is the maximum volume supported by the electronic device.
[0180] It should be noted that when the power-on request received by the microphone driver is used to instruct the microphone driver to control the first microphone to turn on, the microphone driver only executes S151 and does not execute S152. Then, the adjustment request sent by the microphone driver to the audio digital signal processor is used to instruct the audio digital signal processor to adjust the pickup volume of the first microphone. The audio digital signal processor only executes S171 and does not execute S172.
[0181] S172: The audio digital signal processor calls the audio adjustment parameter to adjust the pickup volume of the second microphone to a second volume.
[0182] The second volume is smaller than the first volume and larger than the minimum volume supported by the electronic device.
[0183] The turn-on request received by the microphone driver is used to instruct the microphone driver to control the first microphone and the second microphone to turn on. The microphone driver can control the first microphone and the second microphone to turn on, and send an adjustment request to the audio digital signal processor to instruct the first microphone and the second microphone to turn on. The audio digital signal processor adjusts the pickup volume of the first microphone to the first volume and adjusts the volume of the second microphone to the second volume, that is, the volume of the second microphone is less than the first volume and greater than the minimum volume supported by the electronic device.
[0184] Assume that the first direction is a horizontal screen direction, and the first application is a game application (for example, Honor of Kings, Game for Peace) that requires the use of the first microphone and / or the second microphone to pick up sound when in use.
[0185] Then, the game application is an application in the first list. When it is determined that the holding direction of the electronic device is landscape orientation, the operating system sends an on request to the microphone driver to instruct the microphone driver to control the first microphone (the microphone on the long side of the electronic device, the microphone on the back panel or the screen side) and the second microphone (the microphone on the short side of the electronic device) to turn on. The microphone driver can control the first microphone and the second microphone to turn on, and the microphone driver can send an adjustment request to the audio digital signal processor to instruct the audio digital signal processor to adjust the pickup volume of the first microphone and the second microphone. In this way, the audio digital signal processor can adjust the pickup volume of the first microphone to the first volume, and adjust the pickup volume of the second microphone to the second volume.
[0186] Therefore, there is no risk of clogging the sound pickup hole of the electronic device, and the first microphone with the first pickup volume can pick up all sound data in the environment (including the user's voice data and the noise data in the environment) to the greatest extent, ensuring the sound pickup effect, so that the user's teammates in the game can hear the user's voice conversation clearly, thereby improving the voice call effect between the user and teammates in the game.
[0187] Moreover, there is no risk of blockage in the sound pickup hole of the electronic device, and the second microphone, whose pickup volume is lower than the first volume and greater than the minimum volume supported by the electronic device, can obtain the noise data in the environment (such as the sound data of other users speaking) to the greatest extent. In this way, the electronic device can separate the user's voice data and the noise data in the environment through noise reduction processing, further ensure the sound pickup effect of the user's voice, and improve the voice call effect between the user and teammates in the game.
[0188] Moreover, there is no risk of blockage in the sound pickup hole of the electronic device, and the second microphone, whose pickup volume is lower than the first volume and greater than the minimum volume supported by the electronic device, can obtain the echo data in the environment (such as the sound data of the speaker of the electronic device) to the greatest extent. In this way, the electronic device can separate the user's voice data and the echo data in the environment through echo cancellation processing, further ensuring the sound pickup effect of the user's voice and improving the voice call effect between the user and teammates in the game.
[0189] Based on the above description, the first microphone and the second microphone are turned on, and the pickup volume of the first microphone is the maximum volume supported by the electronic device, and the pickup volume of the second microphone is lower than the maximum volume supported by the electronic device. Through the sound collected by the above two microphones, the electronic device can use echo cancellation processing and noise reduction processing to separate the user's voice and environmental noise from the sound data captured by the two microphones, thereby facilitating the electronic device to obtain the best user voice data.
[0190] In some embodiments, the audio digital signal processor can call audio adjustment parameters to adjust the gain value of the first microphone to a first gain value, and adjust the gain value of the second microphone to a second gain value, so that the pickup volume of the first microphone is the first volume, and the pickup volume of the second microphone is the second volume; wherein the first gain value is the maximum gain value supported by the electronic device, and the second gain value is less than the maximum gain value supported by the electronic device and greater than the minimum gain value supported by the electronic device.
[0191] Assume that the gain values supported by the electronic device include [0, 100].
[0192] Then, when the audio digital signal processor calls the audio adjustment parameter and adjusts the gain value of the first microphone to the first gain value of 100, the pickup volume of the first microphone is 100, that is, the pickup volume of the first microphone is the maximum volume supported by the electronic device. When the audio digital signal processor adjusts the gain value of the second microphone to any one of the second gain values [0, 100] (for example, any one of 60-80), the pickup volume of the second microphone is less than the maximum volume supported by the electronic device and greater than the minimum volume supported by the electronic device.
[0193] It should be noted that when the power-on request received by the microphone driver is used to instruct the microphone driver to control the power-on of the first microphone and the second microphone, the microphone driver executes S151 and S152. Then, the adjustment request sent by the microphone driver to the audio digital signal processor is used to instruct the audio digital signal processor to adjust the volume of the first microphone and the second microphone. The audio digital signal processor can not only execute S171, but also execute S172.
[0194] The volume adjustment method of the present application, when the first application started is an application in the first list, the operating system can obtain a first parameter in the electronic device for indicating the holding direction of the electronic device. When it is determined that the holding direction of the electronic device is the first direction based on the first parameter, the operating system can send an on request to the microphone driver to instruct the first microphone to turn on. Thus, the microphone driver can control the first microphone to turn on when there is no risk of blocking the pickup hole when the electronic device is held. In addition, the microphone driver can also send an adjustment request to the audio digital signal processor to instruct the audio digital signal processor to adjust the pickup volume of the first microphone. In this way, the audio digital signal processor can adjust the pickup volume of the first microphone to the first volume (such as the maximum pickup volume supported by the electronic device), so that the electronic device can pick up the user's voice data to the greatest extent, ensure the sound reception effect, and improve the voice call effect between the user and teammates in scenarios such as games.
[0195] Furthermore, when the first application started is an application in the first list, the operating system can obtain a first parameter in the electronic device for indicating the holding direction of the electronic device. When it is determined that the holding direction of the electronic device is the first direction based on the first parameter, the operating system can also send a turn-on request to the microphone driver to instruct the second microphone to turn on. Thus, the microphone driver can also control the second microphone to turn on when there is no risk of blocking the pickup hole when the electronic device is held. In addition, the microphone driver can also send an adjustment request to the audio digital signal processor to instruct the audio digital signal processor to adjust the pickup volume of the second microphone. In this way, the audio digital signal processor can also adjust the pickup volume of the second microphone to a second volume (the second volume is less than the first volume and greater than the minimum volume supported by the electronic device), so that the electronic device can perform echo cancellation and noise reduction processing on the picked up sound data to the greatest extent, further ensuring the sound reception effect, and improving the voice call effect between the user and teammates in the game.
[0196] Based on the aforementioned embodiments, the volume adjustment method provided by this application is introduced below.
[0197] Illustratively, the present application provides a volume adjustment method.
[0198] For ease of explanation, the volume adjustment method of the present application may be executed by the electronic device 100 in FIG. 4 .
[0199] The electronic device 100 may include a first microphone and a second microphone.
[0200] Please refer to FIG8 , which shows a flow chart of a volume adjustment method provided in an embodiment of the present application.
[0201] As shown in FIG8 , the volume adjustment method provided in this application may include:
[0202] S301. When it is detected that the first application launched is an application in the first list, determine whether the holding direction of the electronic device is the first direction, the applications in the first list include applications that require the first microphone and / or the second microphone to pick up sound when used. When the holding direction of the electronic device is the first direction, there is no risk of blockage of the sound pickup hole of the first microphone, and there is a risk of blockage of the sound pickup hole of the second microphone.
[0203] The specific implementation of the first application can be found in the relevant description of the first application in S11 in FIG6 , which will not be elaborated here.
[0204] The specific implementation method of the first list can be found in S11 in Figure 6 regarding the relevant description of the first list, which will not be repeated here.
[0205] The specific implementation of the first direction can be found in S11-S13 in FIG6 , which is not described in detail here.
[0206] The specific implementation of S301 can be found in the relevant description of S11-S13 in FIG4 , which will not be described in detail here.
[0207] S302: When the electronic device is held in a first direction, adjust the sound pickup volume of the first microphone to a first volume, where the first volume is a volume greater than or equal to a first threshold.
[0208] It should be understood that in order to ensure the sound pickup effect of the first microphone, the first threshold is usually set to be relatively large, so that the first volume is at least greater than the volume of the first microphone after the last adjustment, or the first threshold is close to the maximum volume supported by the electronic device, then the first volume is close to the maximum volume supported by the electronic device.
[0209] The specific implementation of the first volume can be found in S171 in FIG6 , which will not be elaborated here.
[0210] The specific implementation of S301 can be found in the relevant description of S14-S171 in Figure 6, which will not be repeated here.
[0211] The volume adjustment method of the present application determines whether the holding direction of the electronic device is the first direction when it is detected that the first application launched is an application in the first list. When the holding direction of the electronic device is the first direction, since there is no risk of blockage of the first microphone, the first electronic device can adjust the pickup volume of the first microphone to a first volume greater than or equal to the first threshold. In this way, by increasing the volume of the first microphone whose pickup hole is not at risk of blockage, the electronic device can pick up the user's voice data to a greater extent, ensure the sound reception effect, and improve the voice call effect between the user and teammates in scenarios such as games.
[0212] In some embodiments, the volume adjustment method provided by this application may include:
[0213] The sound pickup volume of the first microphone is adjusted to a first volume, and the sound pickup volume of the second microphone is adjusted to a second volume, where the second volume is less than the first volume and greater than a minimum volume supported by the electronic device.
[0214] The specific implementation of the second volume can be found in S172 in FIG6 , which will not be elaborated here.
[0215] The specific implementation of S302 can refer to the relevant description of S172 in Figure 6, which will not be repeated here.
[0216] In this application, the first microphone and the second microphone are turned on, and the pickup volume of the first microphone is greater than or equal to the first threshold, and the pickup volume of the second microphone is lower than the first volume. Combined with the sounds collected by the above two microphones, the electronic device can separate the user's voice and environmental noise from the sound data captured by the two microphones through echo cancellation processing and noise reduction processing, thereby facilitating the electronic device to obtain the best user voice data.
[0217] In some embodiments, the volume adjustment method provided in the present application may include: when the holding direction of the electronic device is a first direction, turning on the first microphone and the second microphone.
[0218] The specific implementation of the above steps can be found in the relevant description of S151-S152 in Figure 6, which will not be repeated here.
[0219] In some embodiments, the volume adjustment method provided by this application may include:
[0220] When it is detected that the first application launched is an application in the first list, a first parameter in the electronic device is obtained, where the first parameter is used to indicate the holding direction of the electronic device; and based on the first parameter, it is determined whether the holding direction of the electronic device is the first direction.
[0221] The specific implementation of the first parameter can be found in the relevant description of the first parameter in S13 in FIG6 , which will not be elaborated here.
[0222] The specific implementation of the above steps can be found in the relevant description of S12 in Figure 6, which will not be repeated here.
[0223] In some embodiments, the volume adjustment method provided by this application may include:
[0224] During the operation of the electronic device, each time an acceleration signal is collected by the acceleration sensor, the three-axis acceleration modulus value corresponding to the acceleration signal is recorded. The three-axis acceleration modulus value is used to represent the size of the total acceleration signal collected by the acceleration sensor in multiple different directions; when it is detected that the first application launched is an application in the first list, the recorded three-axis acceleration modulus value closest to the current moment is read; and the three-axis acceleration modulus value is determined as the first parameter.
[0225] The specific implementation of the above steps can be found in S12 in FIG6 regarding the description of obtaining the three-axis acceleration modulus values, which will not be elaborated here.
[0226] In some embodiments, the volume adjustment method provided by this application may include:
[0227] The gain value of the first microphone is adjusted to a first gain value, and the gain value of the second microphone is adjusted to a second gain value, so that the pickup volume of the first microphone is the first volume, and the pickup volume of the second microphone is the second volume; wherein the first volume is the maximum volume supported by the electronic device, the first gain value is the maximum gain value supported by the electronic device, and the second gain value is less than the maximum gain value supported by the electronic device and greater than the minimum gain value supported by the electronic device.
[0228] Among them, the specific implementation method of the first gain value can refer to the relevant description of the first gain value in S171 in Figure 6; the specific implementation method of the second gain value can refer to the relevant description of the second gain value in S172 in Figure 6, which will not be repeated here.
[0229] Among them, the specific implementation method of the above steps can be found in the relevant description of S171-S172 in Figure 6, which will not be repeated here.
[0230] In some embodiments, the volume adjustment method provided by the present application may include: when the first application is a game application that needs to use the first microphone and / or the second microphone to pick up sound, and the first direction is a landscape orientation or a reverse landscape orientation, the first microphone is a microphone on the long side of the electronic device, a microphone on the back panel and / or the screen side, and the second microphone is a microphone on the short side of the electronic device.
[0231] For example, if the first application is the Honor of Kings application and the first orientation is the horizontal orientation, then the pickup hole of the microphone on the short side of the electronic device is at risk of being blocked. Therefore, the microphone on the long side of the electronic device, the back panel and / or the screen side does not have a risk of being blocked.
[0232] In some embodiments, the volume adjustment method provided by the present application may include: when the first application is a call application that needs to use the first microphone and / or the second microphone to pick up sound, and the first direction is a vertical screen direction or a reverse vertical screen direction, the first microphone is the microphone on the short side of the electronic device, the back panel and / or the screen side, and the second microphone is the microphone on the long side of the electronic device.
[0233] For example, if the first application is a call and the first orientation is a vertical screen orientation, then the microphone on the long side of the electronic device is at risk of being blocked. Therefore, the microphone on the short side of the electronic device, the back panel and / or the screen side does not have a risk of being blocked.
[0234] In some embodiments, the volume adjustment method provided by this application may include:
[0235] A first interface is displayed, wherein an identifier of a first application is displayed in the first interface; and in response to a first operation on the first interface, the first application is started, wherein the first operation is an operation on the identifier of the first application.
[0236] The first interface may be an interface including an identifier of the first application in the electronic device, such as a main interface of the electronic device.
[0237] Illustratively, the present application provides an electronic device, including a processor; when the processor executes computer code or instructions in the memory, the electronic device executes the volume adjustment method in the above embodiment.
[0238] Illustratively, the present application provides an electronic device comprising: a memory and a processor; the memory is coupled to the processor, and the memory is used to store program code or instructions; the processor is used to call the program code or instructions in the memory so that the electronic device executes the volume adjustment method in the above embodiment.
[0239] Illustratively, the present application provides a chip system, which is applied to an electronic device including a memory, a display screen, and a sensor; the chip system includes: one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the interface circuit is used to receive signals from the memory and send signals to the processor, the signals including computer code or instructions stored in the memory; when the processor executes the computer code or instructions, the electronic device executes the volume adjustment method in the previous embodiment.
[0240] Illustratively, the present application provides a computer-readable storage medium storing codes or instructions. When the codes or instructions are executed on an electronic device, the electronic device implements the volume adjustment method in the foregoing embodiment.
[0241] Illustratively, the present application provides a computer program product, which, when executed on a computer, enables an electronic device to implement the volume adjustment method in the foregoing embodiment.
[0242] In the above embodiments, all or part of the functions can be implemented by software, hardware, or a combination of software and hardware. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer codes or instructions. When the computer program code or instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer code or instructions can be stored in a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0243] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by a computer program instructing related hardware to perform the processes. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A volume adjustment method, characterized in that: Applied to an electronic device, the electronic device includes a first microphone and a second microphone, and the method includes: When detecting that the launched first application is an application in a first list, determining whether the holding direction of the electronic device is a first direction, the applications in the first list include applications that require the first microphone and / or the second microphone to pick up sound when used, and when the electronic device is held in the first direction, there is no risk of blockage of the sound pickup hole of the first microphone, and there is a risk of blockage of the sound pickup hole of the second microphone; When the electronic device is held in the first direction, the sound pickup volume of the first microphone is adjusted to a first volume, where the first volume is a volume greater than or equal to a first threshold.
2. The method according to claim 1, characterized in that The adjusting the pickup volume of the first microphone to a first volume includes: The sound pickup volume of the first microphone is adjusted to the first volume, and the sound pickup volume of the second microphone is adjusted to a second volume, where the second volume is less than the first volume and greater than a minimum volume supported by the electronic device.
3. The method according to claim 2, characterized in that The method further comprises: When the electronic device is held in the first direction, the first microphone and the second microphone are turned on.
4. The method according to any one of claims 1 to 3, characterized in that The step of determining whether the holding direction of the electronic device is the first direction when detecting that the launched first application is an application in the first list includes: When detecting that the first application started is an application in the first list, obtaining a first parameter in the electronic device, where the first parameter is used to indicate a holding direction of the electronic device; It is determined, according to the first parameter, whether the holding direction of the electronic device is the first direction.
5. The method according to any one of claims 2 to 4, characterized in that The step of adjusting the sound pickup volume of the first microphone to the first volume and adjusting the sound pickup volume of the second microphone to the second volume includes: Adjusting the gain value of the first microphone to a first gain value, and adjusting the gain value of the second microphone to a second gain value, so that the sound pickup volume of the first microphone is the first volume, and the sound pickup volume of the second microphone is the second volume; The first volume is the maximum volume supported by the electronic device, the first gain value is the maximum gain value supported by the electronic device, and the second gain value is less than the maximum gain value supported by the electronic device and greater than the minimum gain value supported by the electronic device.
6. The method according to any one of claims 1 to 5, characterized in that When the first application is a game application that needs to use the first microphone and / or the second microphone to pick up sound when in use, and the first direction is landscape or anti-landscape, the first microphone is the microphone on the long side, back panel and / or screen side of the electronic device, and the second microphone is the microphone on the short side of the electronic device.
7. The method according to any one of claims 1 to 5, characterized in that When the first application is a call application that needs to use the first microphone and / or the second microphone to pick up sound when in use, and the first direction is a portrait screen direction or a reverse portrait screen direction, the first microphone is the microphone on the short side of the electronic device, the back panel and / or the screen side, and the second microphone is the microphone on the long side of the electronic device.
8. The method according to any one of claims 1 to 7, characterized in that Before determining whether the direction of the electronic device is the first direction when detecting that the launched first application is an application in the first list, the method further includes: Displaying a first interface, wherein the first interface displays a logo of the first application; In response to a first operation on the first interface, the first application is started, where the first operation is an operation on the first application identifier.
9. An electronic device, characterized in that: The electronic device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and is configured to store computer program codes, where the computer program codes include computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 8.
10. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises instructions, which, when executed on an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Speech signal acquisition method and apparatus and terminal
CN106331359A
Switching method and device of phone-communication MIC and mobile terminal
CN107547704A
Call quality adjustment method, mobile terminal and storage medium
CN108076226A
Voice pickup method and related product
CN108924331A
Voice pickup method and related product
CN108965600A