Earphone sound effect compensation method and earphone sound effect compensation device
Patent Information
- Application Number
- CN202380089344.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-12-29
- Filing Date
- 2023-10-11
- Publication Date
- 2025-08-12
AI Technical Summary
Existing headphone sound compensation methods use common headphone sound compensation parameters, but the audio compensation effect is poor for headphones of different models, the same model with different serial numbers, or the left and right headphones in a pair of headphones, affecting the user's sound experience.
Each earphone stores its corresponding earphone sound effect compensation parameters, and when the earphones are connected to an electronic device with a sound effect rendering function, the electronic device obtains and uses these parameters for earphone sound effect compensation.
It improves the headphone sound compensation effect, enhances the user's sound experience, and avoids poor sound compensation effects caused by improper application of general parameters.
Smart Images

Figure CN120476609A_ABST
Abstract
Description
Headphone sound effect compensation method and headphone sound effect compensation device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on December 29, 2022, with application number 202211712424.1 and application name “Headphone Sound Compensation Method and Headphone Sound Compensation Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of earphone technology, and in particular to an earphone sound effect compensation method and an earphone sound effect compensation device. Background Art
[0003] Electronic devices can render audio data to create a good listening experience for users. With the continuous development of headphones, users often use headphones to play audio from electronic devices. In this scenario, to ensure the user's sound quality, electronic devices can add headphone compensation parameters when rendering audio data to ensure that the audio output from the headphones has good sound quality.
[0004] Currently, a common headphone sound effect compensation method is to store universal headphone sound effect compensation parameters in an electronic device. When the electronic device detects that the headphone is playing audio, it uses the universal headphone sound effect compensation parameters to compensate for the sound effect data. This implementation method has a poor headphone sound effect compensation effect.
[0005] Summary of the Invention
[0006] The present application provides a headphone sound compensation method and a headphone sound compensation device, which are beneficial to improving the headphone sound compensation effect.
[0007] In a first aspect, a headphone sound effect compensation method is provided, which is applied to a headphone, the headphone is connected to an electronic device, and the headphone stores headphone sound effect compensation parameters corresponding to the headphone; the method includes: if the electronic device has a headphone sound effect compensation function, the headphone sends the headphone sound effect compensation parameters to the electronic device, and the headphone sound effect compensation parameters are used to perform headphone sound effect compensation on the audio played by the user.
[0008] The earphones may be a pair of earphones or a single earphone, and this application does not limit this. If the earphone is a single earphone, the earphone may be a left earphone or a right earphone. If the earphones are a pair of earphones, the left earphone stores its corresponding earphone sound effect compensation parameters, and the right earphone also stores its corresponding earphone sound effect compensation parameters, and the earphone sound effect compensation parameters stored in the left and right earphones are different.
[0009] The headset can determine whether the electronic device has a headphone sound effect compensation function based on the communication instruction. If the electronic device has a headphone sound effect compensation function, the headset can send headphone sound effect compensation parameters to the electronic device so that the electronic device can perform headphone sound effect compensation on the audio played by the user. If the electronic device does not have a headphone sound effect compensation function, the headset can perform headphone sound effect compensation based on the stored drone sound effect compensation parameters.
[0010] The headphone sound effect compensation method provided in the present application stores headphone sound effect compensation parameters in the headphone. When the electronic device performs sound effect compensation on the headphone, the headphone sound effect compensation parameters stored in the headphone can be used to compensate the audio for the headphone sound effect. Different headphone sound effect compensation parameters can be used for different headphones to compensate the audio for the headphone sound effect, which is beneficial to improving the headphone sound effect compensation effect.
[0011] In combination with the first aspect, in certain implementations of the first aspect, before the headset sends the headphone sound effect compensation parameters to the electronic device, the method also includes: the headset sends first information to the electronic device, the first information is used to indicate that the headset has the ability to report the headphone sound effect compensation parameters; the headset receives second information from the electronic device, the second information is used to request the headphone sound effect compensation parameters.
[0012] The headset can inform the headset through the first information that it has the ability to report the headset sound effect compensation parameters, so that the electronic device requests the headset compensation parameters through the second information based on the first information.
[0013] Optionally, before the headset informs the headset through the first information that it has the ability to report the headphone sound effect compensation parameters, the electronic device can also query the headset whether the headset has the ability to report data. If the headset has the ability to report the headphone sound effect compensation parameters, the electronic device can send a second information to the headset to obtain the headphone sound effect compensation parameters stored in the headset.
[0014] In the method shown in FIG6 of the specific embodiment, the electronic device may send an information reporting capability query command to the headset to inquire whether the headset has the ability to report headphone sound effect compensation parameters. The information reporting capability response may represent the first information described above, indicating that the headset has the ability to report headphone sound effect compensation parameters. The existing information reporting command may be used to represent the second information described above, for obtaining the headphone sound effect compensation parameters stored in the headset.
[0015] The headphone sound effect compensation method provided in the present application is such that, before the electronic device obtains the headphone sound effect compensation parameters of the headphone from the headphone, it first inquires about the headphone's ability to report information, and based on the headphone's ability to report information, instructs the headphone to report the headphone sound effect compensation parameters. This is conducive to obtaining the headphone sound effect compensation parameters of the headphone within the reporting capability of the headphone and avoiding invalid indications.
[0016] In combination with the first aspect, in some implementations of the first aspect, the electronic device has a headphone sound effect compensation function, including: the headphone sends a first command to the electronic device, where the first command is used to query whether the electronic device has the headphone sound effect compensation function.
[0017] The headset can query whether the electronic device has a headphone sound effect compensation function through the first command to determine whether to perform headphone sound effect compensation on the audio. It is understood that if the electronic device has the headphone sound effect compensation function, the headset can send headphone sound effect compensation parameters to the electronic device, and the electronic device will perform headphone sound effect compensation; if the electronic device does not have the headphone sound effect compensation function, the headset can perform headphone sound effect compensation based on the headphone sound effect compensation parameters.
[0018] If the electronic device has the headphone sound effect compensation function, the electronic device can send a response to the headphone based on the first command. If the electronic device does not have the headphone sound effect compensation function, the electronic device may not respond, or send an indication information that it does not have the headphone sound effect compensation function. This application does not limit this.
[0019] The headphone sound compensation method provided in the present application determines whether the electronic device has a headphone sound compensation function based on a first command, which is conducive to the subsequent determination of a headphone sound compensation solution.
[0020] In combination with the first aspect, in certain implementations of the first aspect, the headset sends the headset sound effect compensation parameters to the electronic device, including: if the first control is in the open state, the headset sends the headset sound effect compensation parameters to the electronic device, and the first control is used to control the opening or closing of the headset sound effect compensation function.
[0021] The first control can be called a headphone sound compensation function control or a headphone targeted compensation control, which is not limited in this application. The first control can be turned on by default or turned on based on a user's opening operation, which is not limited in this application.
[0022] When the first control is in the on state, the headset can send the headphone sound effect compensation parameters to the electronic device, so that the electronic device can perform headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters; if the first control is in the off state, the headset may not send the headphone sound effect compensation parameters to the electronic device, and the electronic device will not perform headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters.
[0023] The headphone sound effect compensation method provided in the present application is such that when the first control is in the on state, the headphone can send headphone sound effect compensation parameters to the electronic device, and the electronic device can perform headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters. The headphone sound effect compensation can be performed on the audio played by the user based on demand, which is conducive to improving the user experience.
[0024] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: the headset receives third information from the electronic device, the third information is used to request head tracking data, and the head tracking data is used to render sound effects for the audio; and the headset sends the head tracking data to the electronic device based on the third information.
[0025] The electronic device may not calculate the user's head motion tracking data, and may obtain the head motion tracking data directly from the headset. Specifically, the electronic device sends a third information to the headset, and the third information is used to request the head motion tracking data; the electronic device receives the head motion tracking data from the headset. The third information may be the same information as the second information mentioned above, or may be different information, and this application is not limited to this. The headset may calculate the head motion tracking data based on the motion data of the headset. The headset may include an inertial measurement unit (IMU) sensor and an IMU driver to obtain the motion data of the headset.
[0026] The headphone sound compensation method provided in this application does not require the electronic device to calculate the user's head movement tracking data, which can save the computing power of the electronic device.
[0027] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: the headset receives fourth information from the electronic device, the fourth information is used to request angular velocity data and acceleration data of the headset, and the angular velocity data and acceleration data are used to render sound effects for the audio; and the headset sends the angular velocity data and acceleration data to the electronic device based on the fourth information.
[0028] The electronic device can calculate the user's head motion tracking data based on the motion data of the earphone, and the motion data of the earphone can be obtained from the earphone. Specifically, the electronic device sends fourth information to the earphone, and the fourth information is used to request the angular velocity data and acceleration data of the earphone; the electronic device receives the angular velocity data and acceleration data from the earphone; and the electronic device determines the head motion tracking data based on the angular velocity data and acceleration data. The fourth information can be the same information as the second information mentioned above, or it can be different information, and this application does not limit this. The earphone may include an IMU sensor and an IMU driver to obtain the motion data of the earphone.
[0029] The headphone sound effect compensation method provided in this application does not require the headphone to calculate the user's head movement tracking data, which can save the computing power of the headphone.
[0030] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: if the electronic device does not have a headphone sound effect compensation function, the headphone receives audio from the electronic device, and the audio is obtained by the electronic device in response to an operation of the user triggering the playback of audio; the headphone performs headphone sound effect compensation on the audio based on the headphone sound effect compensation parameters.
[0031] If the electronic device does not have a sound effect compensation function, the electronic device may not perform any operation on the audio in response to the user triggering the audio playback operation, and may directly send the audio played by the user to the headphones. After the headphones receive the audio, they may perform headphone sound effect compensation on the audio based on the headphone sound effect compensation parameters.
[0032] The headphone sound effect compensation method provided in the present application can perform headphone sound effect compensation based on stored headphone sound effect compensation parameters if the electronic device does not have a sound effect compensation function, which is beneficial to improving the headphone sound effect compensation effect.
[0033] On the second aspect, a headphone sound effect compensation method is provided, which is applied to an electronic device, where the electronic device and the headphone are in a connected state, and the headphone stores headphone sound effect compensation parameters corresponding to the headphone; the method includes: if the electronic device has a headphone sound effect compensation function, the electronic device receives the headphone sound effect compensation parameters from the headphone; the electronic device responds to the user triggering the operation of playing audio, and performs headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters.
[0034] In combination with the second aspect, in certain implementations of the second aspect, before the electronic device receives the headphone sound effect compensation parameters from the headphone, the method also includes: the electronic device receives first information from the headphone, the first information being used to indicate that the headphone has the ability to report the headphone sound effect compensation parameters; the electronic device sends second information to the headphone based on the first information, the second information being used to request the headphone sound effect compensation parameters.
[0035] In combination with the second aspect, in some implementations of the second aspect, the electronic device has a headphone sound compensation function, including: the electronic device receives a first command from the headphone, and the first command is used to query whether the electronic device has the headphone sound compensation function.
[0036] In combination with the second aspect, in certain implementations of the second aspect, the electronic device receives headphone sound effect compensation parameters from the headphone, including: if the first control is in the open state, the electronic device receives the headphone sound effect compensation parameters from the headphone, and the first control is used to control the opening or closing of the headphone sound effect compensation function.
[0037] In combination with the second aspect, in certain implementations of the second aspect, the method further includes: the electronic device obtains the user's head movement tracking data in response to the user triggering an operation to play audio; the electronic device obtains the relative motion data between the electronic device and the user's head based on the head movement tracking data; and the electronic device renders sound effects for the audio played by the user based on the relative motion data between the electronic device and the user's head.
[0038] The electronic device can also obtain the user's head motion tracking data in real time, and based on the head motion tracking data and the electronic device's motion data (such as acceleration data and angular velocity data), obtain relative motion data between the electronic device and the user's head; and based on the relative motion data between the electronic device and the user's head, render sound effects for the audio played by the user. The electronic device may include an IMU sensor and an IMU driver to obtain the electronic device's motion data.
[0039] The headphone sound compensation method provided in this application, in addition to performing headphone sound compensation on the audio, can also render the audio sound effects based on the relative motion data between the electronic device and the user's head, which is beneficial to improving the user's sound experience.
[0040] In combination with the second aspect, in certain implementations of the second aspect, obtaining the user's head motion tracking data includes: the electronic device sending third information to the headset, where the third information is used to request the head motion tracking data; and the electronic device receiving the head motion tracking data from the headset.
[0041] In combination with the second aspect, in certain implementations of the second aspect, obtaining the user's head motion tracking data includes: the electronic device sending fourth information to the headset, the fourth information being used to request angular velocity data and acceleration data of the headset; the electronic device receiving the angular velocity data and acceleration data from the headset; and the electronic device determining the head motion tracking data based on the angular velocity data and acceleration data.
[0042] In combination with the second aspect, in certain implementations of the second aspect, obtaining the user's head motion tracking data includes: if the second control is in an open state, the electronic device obtains the user's head motion tracking data, and the second control is used to control whether to obtain the head motion tracking data.
[0043] The second control can be called a head tracking function control or a head tracking control, which is not limited in this application. The second control can be in an open state by default or in an open state based on a user's opening operation, which is not limited in this application.
[0044] When the second control is in the on state, the electronic device can calculate the relative motion data of the user's head relative to the electronic device based on the user's head motion tracking data, and render sound effects for the audio played by the user based on the relative motion data of the user's head relative to the electronic device; if the second control is in the off state, the electronic device may not render sound effects for the audio played by the user.
[0045] The headphone sound effect compensation method provided in the present application obtains the user's head motion tracking data when the second control is in the open state, calculates the relative motion data of the user's head relative to the electronic device based on the user's head motion tracking data, and renders the sound effects of the audio played by the user based on the relative motion data of the user's head relative to the electronic device, which is conducive to improving the user experience.
[0046] In combination with the second aspect, in some implementations of the second aspect, the method further includes: if the electronic device does not have a headphone sound compensation function, the electronic device sends the audio played by the user to the headphone in response to the user triggering an operation to play audio.
[0047] According to a third aspect, a headphone sound effect compensation method is provided, which is applied to a communication system including an electronic device and a headphone, wherein the electronic device and the headphone are in a connected state, and the headphone stores headphone sound effect compensation parameters corresponding to the headphone; the method comprises: if the electronic device has a headphone sound effect compensation function, the headphone sends first information to the electronic device, and the first information is used to indicate that the headphone has the ability to report headphone sound effect compensation parameters; the electronic device sends second information to the headphone based on the first information, and the second information is used to request the headphone sound effect compensation parameters; the headphone receives the second information and, based on the first information, sends the headphone sound effect compensation parameters to the electronic device; the electronic device receives the headphone sound effect compensation parameters; the electronic device responds to the user triggering the operation of playing audio, and performs headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters.
[0048] In combination with the third aspect, in certain implementations of the third aspect, the method also includes: if the electronic device does not have a headphone sound effect compensation function, the electronic device sends the audio played by the user to the headphone in response to the user triggering an operation to play audio; the headphone receives the audio; and the headphone performs headphone sound effect compensation on the audio based on the headphone sound effect compensation parameters.
[0049] In a fourth aspect, a sound effect compensation device is provided. The sound effect compensation device is connected to an electronic device and stores sound effect compensation parameters corresponding to the sound effect compensation device. The sound effect compensation device includes a transceiver module. The transceiver module is configured to, if the electronic device has a sound effect compensation function, send the sound effect compensation parameters to the electronic device. The sound effect compensation parameters are used to compensate for the sound effects of audio played by a user.
[0050] In combination with the fourth aspect, in certain implementations of the fourth aspect, the transceiver module is further used to: send first information to the electronic device, the first information being used to indicate the ability to report sound effect compensation parameters; and receive second information from the electronic device, the second information being used to request sound effect compensation parameters.
[0051] In combination with the fourth aspect, in some implementations of the fourth aspect, the transceiver module is further used to: send a first command to the electronic device, where the first command is used to query whether the electronic device has a sound effect compensation function.
[0052] In combination with the fourth aspect, in certain implementations of the fourth aspect, the transceiver module is further used to: if the first control is in an open state, send sound compensation parameters to the electronic device, and the first control is used to control the opening or closing of the sound compensation function.
[0053] In combination with the fourth aspect, in certain implementations of the fourth aspect, the transceiver module is further used to: receive third information from the electronic device, the third information is used to request head tracking data, and the head tracking data is used to render sound effects for the audio; and based on the third information, send the head tracking data to the electronic device.
[0054] In combination with the fourth aspect, in certain implementations of the fourth aspect, the transceiver module is further used to: receive fourth information from the electronic device, where the fourth information is used to request angular velocity data and acceleration data, and the angular velocity data and acceleration data are used to render sound effects for the audio; and send angular velocity data and acceleration data to the electronic device based on the fourth information.
[0055] In conjunction with the fourth aspect, in certain implementations of the fourth aspect, the headphone sound effect compensation device further includes a processing module. The transceiver module is further configured to: if the electronic device does not have a sound effect compensation function, receive audio from the electronic device, the audio being generated by the electronic device in response to a user triggering an audio playback operation; and the processing module is configured to: perform sound effect compensation on the audio based on the sound effect compensation parameters.
[0056] In a fifth aspect, a headphone sound effect compensation device is provided. The headphone sound effect compensation device is connected to a headphone, and the headphone stores headphone sound effect compensation parameters corresponding to the headphone. The headphone sound effect compensation device includes a transceiver module and a processing module. The transceiver module is configured to receive the headphone sound effect compensation parameters from the headphone, if the headphone sound effect compensation function is enabled. The processing module is configured to, in response to a user triggering audio playback, perform headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters.
[0057] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver module is further used to: receive first information from the headset, the first information being used to indicate that the headset has the ability to report headphone sound effect compensation parameters; and based on the first information, send second information to the headset, the second information being used to request headphone sound effect compensation parameters.
[0058] In combination with the fifth aspect, in some implementations of the fifth aspect, the transceiver module is further used to: receive a first command from the headset, where the first command is used to query whether the headset sound effect compensation function is available.
[0059] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver module is further used to: if the first control is in the open state, receive the headphone sound compensation parameters from the headphone, and the first control is used to control the opening or closing of the headphone sound compensation function.
[0060] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver module is further used to: obtain the user's head movement tracking data in response to the user triggering an operation to play audio; the processing module is further used to: obtain relative motion data with the user's head based on the head movement tracking data; and render sound effects for the audio played by the user based on the relative motion data with the user's head.
[0061] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver module is further used to: send third information to the headset, where the third information is used to request head motion tracking data; and receive head motion tracking data from the headset.
[0062] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver module is further used to: send fourth information to the headset, the fourth information being used to request angular velocity data and acceleration data of the headset; receive angular velocity data and acceleration data from the headset; and determine head motion tracking data based on the angular velocity data and acceleration data.
[0063] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver module is further used to: if the second control is in an open state, obtain the user's head movement tracking data, and the second control is used to control whether to obtain the head movement tracking data.
[0064] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver module is further used to: if the headphone sound effect compensation function is not provided, in response to the user triggering the operation of playing audio, send the audio played by the user to the headphone.
[0065] In a sixth aspect, the present application provides a headphone sound compensation device, which includes: a processor and a memory; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the headphone sound compensation device performs each method in the above aspects.
[0066] In a seventh aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the various methods in the above aspects are implemented.
[0067] In an eighth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is run, it enables the computer to execute each method in the above aspects.
[0068] In a ninth aspect, the present application provides a chip, which includes a processor, and the processor is used to call a computer program in a memory to execute each method in the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] FIG1 is a schematic diagram of playing audio of an electronic device through headphones;
[0070] FIG2 is a schematic block diagram of a headphone sound effect compensation method;
[0071] FIG3 is a schematic diagram of a headphone sound compensation parameter measurement system provided by an embodiment of the present application;
[0072] FIG4 is a schematic flowchart of a method for measuring headphone sound compensation parameters provided in an embodiment of the present application;
[0073] FIG5 is a schematic block diagram of a headphone sound effect compensation method provided in an embodiment of the present application;
[0074] FIG6 is a schematic flow chart of a communication method provided in an embodiment of the present application;
[0075] FIG7 is a schematic flow chart of another communication method provided in an embodiment of the present application;
[0076] FIG8 is a schematic diagram of a functional interface provided in an embodiment of the present application;
[0077] FIG9 is a schematic block diagram of another headphone sound effect compensation method provided in an embodiment of the present application;
[0078] FIG10 is a schematic diagram of another functional interface provided in an embodiment of the present application;
[0079] FIG11 is a schematic block diagram of another headphone sound effect compensation method provided in an embodiment of the present application;
[0080] FIG12 is a schematic diagram of another functional interface provided in an embodiment of the present application;
[0081] FIG13 is a schematic flowchart of a method for selecting a headphone sound effect compensation solution provided in an embodiment of the present application;
[0082] FIG14 is a schematic block diagram of a headphone sound compensation device provided in an embodiment of the present application;
[0083] FIG15 is a schematic block diagram of another headphone sound compensation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] The technical solution in this application will be described below with reference to the accompanying drawings.
[0085] Electronic devices can render audio data to create a pleasant listening experience for users. With the continuous development of headphones, users often use headphones to play audio from electronic devices. In this scenario, to ensure the user's sound quality, electronic devices need to add headphone compensation parameters when rendering audio data to ensure that the audio output from the headphones has good sound quality.
[0086] Currently, a common headphone sound compensation method is for an electronic device to store universal headphone sound compensation parameters. When the electronic device detects that headphones are playing audio, it uses the universal headphone sound compensation parameters to compensate for the sound effect data. However, there are differences between different models of headphones, headphones of the same model with different serial numbers, and the left and right headphones in a pair of headphones. If the electronic device uses universal compensation parameters to compensate for the audio data, the sound effect compensation will be poor, thus affecting the user's sound experience.
[0087] For example, Figure 1 shows a schematic diagram of playing audio from an electronic device through headphones. As shown in Figure 1, user 101 is wearing headphones 102, which are connected to electronic device 103. Headphones 102 can transmit collected sound to electronic device 103, and can also receive audio data from electronic device 103 and play the audio corresponding to the audio data.
[0088] Electronic device 103 stores universal headphone sound effect compensation parameters. When electronic device 103 detects that user 101 triggers an operation to play music, electronic device 103 responds to the operation by performing sound effect compensation on the music data based on the universal headphone sound effect compensation parameters, rendering the music data with sound effects, and transmitting the rendered music data to headphone 102. Headphone 102 receives the rendered music data with sound effects and plays the music corresponding to the rendered music data with sound effects.
[0089] Sound compensation refers to adjusting the phase (or phase) and amplitude (or amplitude) of the audio. Sound rendering refers to processing the audio effects, such as immersive audio, noise reduction, and head tracking.
[0090] In order to better understand the headphone sound compensation method involved in Figure 1, the embodiment of the present application will introduce the method in detail.
[0091] FIG2 shows a schematic block diagram of a headphone sound effect compensation method. As shown in FIG2 , the headphone 102 includes a Bluetooth module, an audio playback module, and a headphone function control module. The Bluetooth module is used to perform Bluetooth communication with the electronic device 103, and the Bluetooth module includes a data receiving module, which is used to receive audio data from the electronic device 103 via Bluetooth technology. The audio playback module is used to play the audio corresponding to the audio data. The headphone function control module is used to store the status of the functions supported by the headphone. For example, if the headphone supports a sound effect rendering mode, the headphone function control module includes the on or off status of the sound effect rendering mode.
[0092] The electronic device 103 includes a storage module and a sound effect rendering framework. The storage module stores headphone sound effect compensation parameters, which are universal and can be used to characterize compensation parameters for any headphone. The sound effect rendering framework includes a sound effect algorithm for rendering sound effects on audio data.
[0093] The electronic device 103 is connected to the earphone 102, and the sound effect rendering mode of the earphone 102 is turned on. When the electronic device 103 detects that the user 101 triggers an operation to play music, the electronic device 103 can respond to the operation by obtaining a universal earphone sound effect compensation parameter from the storage module, inputting the universal earphone sound effect compensation parameter into the sound effect algorithm to perform earphone sound effect compensation on the music data, rendering the music data based on the sound effect algorithm, obtaining music data after sound effect rendering, and sending the music data after sound effect rendering to the earphone 102. The earphone 102 receives the music data after sound effect rendering through the data receiving module, and plays the music corresponding to the music data after sound effect rendering through the audio playing module.
[0094] In this implementation method, for headphones of different models, headphones of the same model but different serial numbers, or the left and right headphones in a pair of headphones, the electronic device 103 uses universal headphone sound compensation parameters to perform headphone sound compensation on music data, which will result in poor sound compensation effect, thereby affecting the user's sound experience.
[0095] If an electronic device, such as the electronic device 103, stores the corresponding headphone sound compensation parameters according to the headphone model or serial number to create a good listening experience for the user, the following problems may arise:
[0096] 1) The stored headphone sound compensation parameters are numerous, occupying a large amount of storage space in electronic devices, making it difficult to apply them to actual products.
[0097] 2) Poor flexibility: When an electronic device is connected to a headset of a new model or a new serial number, the electronic device does not store the headset sound compensation parameters corresponding to the headset, and cannot guarantee that the audio output of the headset has good sound quality.
[0098] 3) There are many stored headphone sound effect compensation parameters, but the types and numbers of headphones actually used by users are relatively small. Therefore, the usage rate of most of the stored headphone sound effect compensation parameters is low, resulting in a waste of resources.
[0099] In addition, the headphone sound effect compensation parameters stored in the electronic device are for compensation of a pair of headphones, and each headphone in a pair of headphones is different. Current electronic devices cannot perform sound effect compensation for each headphone.
[0100] In view of this, an embodiment of the present application provides a headphone sound effect compensation method and a headphone sound effect compensation device, which stores the corresponding headphone sound effect compensation parameters on each headphone. If the headphone is connected to an electronic device with a sound effect rendering function, when the electronic device detects the user's operation of playing audio, the electronic device can obtain the headphone sound effect compensation parameters of the headphone from the headphone, and perform headphone sound effect compensation on the audio data based on the headphone sound effect compensation parameters of the headphone, which is conducive to improving the headphone sound effect compensation effect, and thus improving the user's sound effect experience.
[0101] The method provided in the embodiments of the present application can be applied to any electronic device that can play audio through headphones, such as mobile phones, tablet computers, televisions, personal computers (PCs), and wearable terminal devices such as smart watches. It can also be various teaching auxiliary tools (such as learning machines, early childhood education machines), smart toys, portable robots, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, etc. It can also be devices with mobile office functions, devices with smart home functions, devices with audio and video entertainment functions, devices that support smart travel, etc. It should be understood that the embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
[0102] To facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.
[0103] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0104] In the embodiments of the present application, "at least one" refers to one or more, and "more" 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 previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0105] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other. For the same or similar concepts or processes, some embodiments may not be described in detail.
[0106] The embodiment of the present application provides a method for measuring headphone sound compensation parameters, which is conducive to storing the corresponding headphone sound compensation parameters for each headphone.
[0107] For example, FIG3 shows a schematic diagram of a system for measuring the sound compensation parameters of headphones. As shown in FIG3 , the measurement system includes a processor, a Bluetooth transmitter, an audio test instrument, a production line test soundproof box, a microphone driver, and a headphone 301 (also referred to as a headphone to be tested). The processor is a device with processing functions, and the processor can be connected to the Bluetooth transmitter and the audio test instrument through a universal serial bus (USB) respectively. The production line test soundproof box includes a microphone and a measurement coupler, and the headphone 301 can be placed in the production line test soundproof box to measure the headphone sound compensation parameters of the headphone 301. The microphone driver can also be replaced by an amplifier, which is not limited in the embodiment of the present application.
[0108] When earphones 301 are in the production line test soundproofing chamber, the audio test instrument is used to generate a test signal and transmit the test signal to earphones 301. The microphone is used to collect the sound played by earphones 301. The microphone driver is used to amplify the sound collected by the microphone and output a response signal. The audio test instrument is used to calculate earphone sound compensation parameters based on the test signal and the response signal. When earphones 301 are not in the production line test soundproofing chamber, the processor can be used to obtain the earphone sound compensation parameters from the audio test instrument and write the earphone sound compensation parameters to earphones 301 via the Bluetooth transmitter.
[0109] For example, Fig. 4 shows a schematic flow chart of a method 400 for measuring headphone sound compensation parameters. The method 400 can be applied to the test system described in Fig. 3 above.
[0110] As shown in FIG4 , the method 400 may include the following steps:
[0111] S401. An audio test instrument generates a test signal, which can be represented by the symbol H1(jw).
[0112] S402 : The audio test instrument may send a test signal H1 (jw) to the earphone 301 via a Bluetooth transmitter based on the Bluetooth audio transmission protocol (Advanced Audio Distribution Profile, A2DP). Correspondingly, the earphone 301 receives the test signal H1 (jw).
[0113] S403 : The earphone 301 plays a test signal H1 (jw).
[0114] S404: The microphone collects the sound played by the earphone 301 and transmits the sound played by the earphone 301 to the microphone driver or amplifier.
[0115] S405 : The microphone driver or amplifier amplifies the sound played by the earphone 301 and outputs a response signal H2 (jw).
[0116] S406 , the microphone driver or amplifier may transmit the response signal H2 (jw) to the audio test instrument.
[0117] S407: The audio test instrument calculates headphone sound effect compensation parameters based on the test signal H1 (jw) and the response signal H2 (jw), wherein the headphone sound effect compensation parameters may include amplitude-frequency compensation parameters and phase-frequency compensation parameters.
[0118] S408: The audio testing instrument may transmit the headphone sound effect compensation parameter to the processor, and correspondingly, the processor receives the headphone sound effect compensation parameter.
[0119] S409 : The processor may write the earphone sound effect compensation parameters into the earphone 301 via the Bluetooth transmitter.
[0120] The headphone sound compensation parameter measurement method provided in the embodiments of the present application can measure the headphone sound compensation parameters corresponding to each headphone, which is beneficial for subsequent sound compensation for each headphone to improve the sound quality of each headphone. In addition, this method stores the compensation parameters corresponding to each headphone in the corresponding headphone, and when the headphone is connected to an electronic device, it is beneficial to perform headphone sound compensation on audio data based on the headphone sound compensation parameters stored in the headphone, which is beneficial for the headphone to output audio with good sound quality.
[0121] Each headphone involved in the embodiments of this application stores headphone sound effect compensation parameters. Based on these parameters, the headphone sound effect compensation method provided by the embodiments of this application is described in detail. It is understood that the headphone sound effect compensation parameters function to perform headphone compensation or headphone sound effect compensation on audio data. Headphone sound effect compensation can also be referred to as headphone-targeted compensation, which is not limited in the embodiments of this application.
[0122] The headphone sound effect compensation methods provided by the embodiments of the present application vary in different scenarios. The embodiments of the present application illustrate headphone sound effect compensation for a single headphone as an example. If the headphone pair is a pair, the electronic device can perform headphone sound effect compensation for the left and right headphones of the pair separately according to the methods provided by the embodiments of the present application.
[0123] Example 1
[0124] Figure 5 shows a schematic block diagram of a headphone sound effect compensation method provided in an embodiment of the present application. As shown in Figure 5, an electronic device is connected to a headphone. The headphone can be the left headphone or the right headphone of a pair of headphones, which is not limited in this embodiment of the present application. The headphone can support communication with the electronic device through agreed commands. The electronic device has sound effect rendering capabilities and sound effect compensation capabilities.
[0125] The headset may include a storage module, a motion tracking sensor, a motion tracking algorithm, a Bluetooth module, an audio playback module, and a headset function control module. The storage module stores headset sound effect compensation parameters, which may be obtained based on the method shown in FIG4 . The motion tracking sensor includes an inertial measurement unit (IMU) sensor and an IMU driver for acquiring motion data of the headset (e.g., acceleration and angular velocity of the headset) in order to calculate the user's head motion tracking data (e.g., displacement and angle of the user's head motion). The motion tracking algorithm is used to calculate the user's head motion tracking data based on the headset's motion data. The Bluetooth module is used to perform Bluetooth communication with an electronic device. The Bluetooth module includes a data receiving module and a data sending module. The data receiving module is used to receive audio data from the electronic device via Bluetooth technology. The data sending module is used to send the headset's motion data or the user's head motion tracking data to the electronic device via Bluetooth technology. The audio playback module is used to play audio corresponding to the audio data. The headphone function control module is used to store the status of the functions supported by the headphones. For example, if the headphone sound effects function supports headphone targeted compensation and head motion tracking, the headphone function control module includes the on / off status of the headphone targeted compensation and the on / off status of head motion tracking. It should be noted that the motion tracking algorithm in the headphones is optional.
[0126] The electronic device includes a motion tracking sensor, a motion tracking algorithm, and a sound effect algorithm. The motion tracking sensor includes an IMU sensor and an IMU driver for obtaining motion data of the electronic device (e.g., acceleration and angular velocity of the electronic device). The motion tracking algorithm can be used to calculate the user's head motion tracking data based on the motion data of the earphones, and can also calculate the relative motion data between the electronic device and the user's head based on the motion data of the electronic device and the user's head motion tracking data. The sound effect algorithm is used to render sound effects on the audio data.
[0127] The headset can support communication with electronic devices through agreed commands. After the electronic device and the headset are paired or reconnected, if the headset's targeted headphone compensation is turned on, the electronic device can communicate with the headset through agreed commands to obtain the headset's headphone sound effect compensation parameters and store the headset's headphone sound effect compensation parameters. If the headset's head motion tracking is turned on, the electronic device can receive the headset's motion data or the user's head motion tracking data sent by the headset through the data sending module through agreed commands and store the headset's motion data or the user's head motion tracking data.
[0128] When the electronic device detects that the user has triggered an operation to play audio, the electronic device responds to the operation by obtaining the user's head tracking data and the electronic device's motion data through a motion tracking sensor. The user's head tracking data and the electronic device's motion data are input into a motion tracking algorithm to obtain relative motion data between the electronic device and the user's head. The relative motion data between the electronic device and the user's head, the headphone sound effect compensation parameters obtained from the headphones, and the original sound effect compensation parameters of the electronic device are then input into a sound effect algorithm to render the audio data, obtaining audio data after sound effect rendering. Finally, the audio data after sound effect rendering is sent to the headphones. The headphones receive the audio data after sound effect rendering through a data receiving module and play the audio corresponding to the audio data after sound effect rendering.
[0129] In this method, there are two possible implementations for the electronic device to obtain the user's head movement tracking data.
[0130] In one possible implementation, the electronic device calculates the user's head motion tracking data based on the motion data of the earphone.
[0131] If head tracking is enabled, the headset can obtain motion data, namely acceleration and angular velocity, from the IMU sensor. The IMU driver then uses the IMU to obtain the headset's acceleration and angular velocity, which are then transmitted to the electronic device via the Bluetooth module's data transmission module. The electronic device can then input the headset's acceleration and angular velocity into a motion tracking algorithm, which outputs the user's head tracking data.
[0132] With this implementation, the headset does not need to include a motion tracking algorithm and does not need to calculate the user's head movement tracking data, which can save the headset's computing power.
[0133] In another possible implementation, the electronic device receives the user's head movement tracking data sent by the headset.
[0134] If head tracking is enabled, the headset can obtain motion data, namely acceleration and angular velocity, from the IMU sensor. The IMU driver then uses the IMU to obtain the headset's acceleration and angular velocity. The acceleration and angular velocity are then input into a motion tracking algorithm. The output of the motion tracking algorithm is the user's head tracking data. Finally, the Bluetooth module's data transmission module transmits the user's head tracking data to the electronic device. The electronic device then receives the user's head tracking data.
[0135] In this implementation, the electronic device does not need to calculate the user's head movement tracking data, which can save the computing power of the electronic device.
[0136] Optionally, if the head tracking of the headset is off and the targeted headphone compensation of the headset is on, when the electronic device detects that the user triggers an operation to play audio, the electronic device, in response to the operation, can input the headphone sound effect compensation parameters obtained from the headset and the original sound effect compensation parameters of the electronic device into the sound effect algorithm to render the audio data, obtain audio data after sound effect rendering, and send the audio data after sound effect rendering to the headset. The headset receives the audio data after sound effect rendering through the data receiving module and plays the audio corresponding to the audio data after sound effect rendering.
[0137] If the head tracking of the headset is turned on, the targeted headphone compensation of the headset is turned off, and the electronic device stores universal or default headphone sound effect compensation parameters, when the electronic device detects that the user triggers an operation to play audio, the electronic device responds to the operation, obtains the user's head tracking data, and obtains the motion data of the electronic device through the motion tracking sensor, inputs the user's head tracking data and the motion data of the electronic device into the motion tracking algorithm, obtains the relative motion data of the electronic device and the user's head, and then inputs the relative motion data of the electronic device and the user's head, the universal or default headphone sound effect compensation parameters, and the original sound effect compensation parameters of the electronic device into the sound effect algorithm to render the audio data, obtain audio data after sound effect rendering, and finally sends the audio data after sound effect rendering to the headset. The headset receives the audio data after sound effect rendering through the data receiving module and plays the audio corresponding to the audio data after sound effect rendering.
[0138] If the head tracking of the headset is turned off, the targeted headphone compensation of the headset is turned off, and the electronic device stores universal or default headphone sound effect compensation parameters, when the electronic device detects that the user triggers an operation to play audio, the electronic device, in response to the operation, can input the universal or default headphone sound effect compensation parameters and the original sound effect compensation parameters of the electronic device into the sound effect algorithm to render the audio data, obtain audio data after sound effect rendering, and send the audio data after sound effect rendering to the headset. The headset receives the audio data after sound effect rendering through the data receiving module and plays the audio corresponding to the audio data after sound effect rendering.
[0139] The method provided in the embodiment of the present application allows the electronic device to adopt different headphone sound compensation methods according to whether the head movement tracking and the targeted compensation functions of the headphone are turned on or off, and can be applied to different scenarios with greater flexibility.
[0140] As an optional embodiment, in the above method, after the electronic device and the headset are paired or reconnected, the electronic device may also communicate with the headset through a predetermined command to obtain the model and / or serial number of the headset. The electronic device may determine whether the headset and the electronic device are from the same manufacturer based on the headset model and / or serial number.
[0141] For example, an electronic device stores a database of multiple headphone models, where the multiple headphone models and the electronic device are manufactured by the same manufacturer. The electronic device obtains the headphone model through a predetermined command. If the model matches any model in the database, the electronic device can determine that the headphone and the electronic device are manufactured by the same manufacturer.
[0142] In the above method, if the headset can support communication with the electronic device through agreed commands, after the electronic device and the headset are paired or reconnected, the electronic device can communicate with the headset through the agreed commands to obtain the headphone sound compensation parameters, the model of the headset, the serial number of the headset and the head movement tracking data of the headset, and can store the headphone sound compensation parameters, the model of the headset, the serial number of the headset and the head movement tracking data.
[0143] The embodiments of the present application provide two methods for an electronic device to communicate with a headset through agreed commands.
[0144] In a possible implementation, Figure 6 shows a schematic flow chart of a communication method 600. The method 600 may be applicable to the scenario shown in Figure 1 above, but the embodiments of the present application are not limited thereto.
[0145] As shown in FIG6 , the method 600 may include the following steps:
[0146] S601: After the electronic device and the headset are paired or reconnected, the electronic device sends a query command to the headset, and correspondingly, the headset receives the query command.
[0147] The electronic device can send a query command based on the Bluetooth general protocol. The format of the query command can be customized by the manufacturer, and the embodiments of the present application do not specifically limit this.
[0148] For example, the format of the query command may be defined as 0XF0F0F0F0. After the electronic device is paired with or reconnected to the headset, the electronic device may send the query command based on the serial port profile (SPP) protocol.
[0149] S602: If the headset can support communication with the electronic device through the agreed command, the headset sends a response to the electronic device based on the query command, and the electronic device receives the response accordingly.
[0150] If the headset supports communicating with the electronic device via the agreed command, the headset can determine the meaning of the query command and send a response to the electronic device based on the query command. The format of the response can also be customized by the manufacturer and is not specifically limited in this embodiment of the application.
[0151] For example, the manufacturer can preset a correspondence between query commands and responses in the headset. The query command format can be defined as 0XF0F0F0F0, and the response format can be defined as 0XABABABAB. After the headset receives the query command 0XF0F0F0F0 from the electronic device, it can determine the response 0XABABABAB based on the preset correspondence and send the response to the electronic device.
[0152] If the headset does not support communication with the electronic device through the agreed command, the headset is unsure of the meaning of the query command and cannot respond. If the electronic device does not receive a response within a period of time, it may not support communication with the electronic device through the agreed command. In this case, if the electronic device detects the user's operation of playing audio, in response to this operation, the electronic device can perform headphone sound effect compensation on the audio data based on existing technologies, that is, use universal or default headphone sound effect compensation parameters to perform headphone sound effect compensation on the audio data.
[0153] S603: The electronic device sends an information reporting capability query command to the headset based on the response. Correspondingly, the headset receives the information reporting capability query command.
[0154] The information reporting capability query command is used to query whether the headset has the ability to report headset information, where the headset information may include the headset model, headset serial number, headset sound compensation parameters, and head tracking data.
[0155] S604: The headset sends an information reporting capability response to the electronic device based on the information reporting capability query command. Correspondingly, the electronic device receives the information reporting capability response.
[0156] The data format of the information reporting capability response can be customized by the manufacturer, and the embodiments of the present application do not specifically limit this.
[0157] For example, the data format of the information reporting capability response may be shown in Table 1.
[0158] Table 1
[0159] As shown in Table 1, in the data format of the information reporting capability response, 1 indicates that the headset has the ability to upload the corresponding parameters, and 0 indicates that the headset does not have the ability to upload the corresponding parameters. In head tracking data, displacement includes components in the x, y, and z directions, and angles include rotation angles around the x, y, and z axes.
[0160] S605: The electronic device sends an existing information reporting command to the headset based on the information reporting capability response. Correspondingly, the headset receives the existing information reporting command.
[0161] The Existing Information Reporting command is used to instruct the headset to report uploadable data. If the headset is capable of reporting the headset model, serial number, amplitude-frequency compensation parameters, phase-frequency compensation parameters, and displacement and angle in head tracking data, the Existing Information Reporting command can be used to instruct the headset to report the headset model, serial number, amplitude-frequency compensation parameters, phase-frequency compensation parameters, and displacement and angle in head tracking data.
[0162] The number of existing information reporting commands may be one or more, and this embodiment of the present application does not limit this.
[0163] If the number of existing information reporting commands is one, the electronic device can obtain all data that can be reported by the headset through one existing information reporting command, which can reduce signaling interaction.
[0164] If there are multiple existing information reporting commands, the electronic device can obtain the required parameters in real time through the existing information reporting commands when needed, which is more flexible and does not require storing the required data in advance, thus saving memory space of the electronic device.
[0165] S606: The headset sends an existing information reporting response to the electronic device based on the existing information reporting command. Correspondingly, the electronic device receives the existing information reporting response.
[0166] The headset may have the data required to be reported based on the existing information reporting command, and send an existing information reporting response to the electronic device, where the existing information reporting response includes the data required to be reported.
[0167] Exemplarily, the existing information reporting command is used to instruct the headset to report the model of the headset, the serial number of the headset, the amplitude-frequency compensation parameters of the headset, and the phase-frequency compensation parameters of the headset. The headset then sends an existing information reporting response to the electronic device based on the existing information reporting command, and the existing information reporting response includes the model of the headset, the serial number of the headset, the amplitude-frequency compensation parameters of the headset, and the phase-frequency compensation parameters of the headset.
[0168] It should be noted that if an existing information reporting command is used to instruct the headset to report the displacement and angle in the head tracking data, the headset can obtain the acceleration and angular velocity of the headset in real time or periodically through the IMU sensor, and read the acceleration and angular velocity of the headset from the IMU sensor in real time or periodically through the IMU driver, and then calculate the displacement and angle based on the acceleration and angular velocity through the motion tracking algorithm, and finally transmit it to the electronic device through the data sending module of the Bluetooth module.
[0169] It should also be noted that if the headset does not include a motion tracking algorithm, the displacement shown in Table 1 above can be replaced by acceleration, and the angle can be replaced by angular velocity.
[0170] If the existing information reporting response includes the model of the headset and / or the serial number of the headset, the electronic device can determine whether the headset and the electronic device are produced by the same manufacturer based on the model of the headset and / or the serial number of the headset.
[0171] If the existing information reporting response includes the amplitude-frequency compensation parameters of the earphones and the phase-frequency compensation parameters of the earphones, when the electronic device detects the user's operation of playing audio, the electronic device can respond to the operation and input the amplitude-frequency compensation parameters of the earphones and the phase-frequency compensation parameters of the earphones into the sound effect algorithm to render the audio.
[0172] In the communication method provided in the embodiment of the present application, before the electronic device obtains information from the headset, it first inquires the headset about its ability to report information through an agreed command, and based on the headset's ability to report information, instructs the headset to report the information required by the electronic device, which is conducive to obtaining information from the headset within the reporting capability of the headset and avoiding invalid instructions.
[0173] In another possible implementation, Figure 7 shows a schematic flow chart of another communication method 700. The method 700 can be applied to the scenario shown in Figure 1 above, but the embodiments of the present application are not limited thereto.
[0174] As shown in FIG7 , the method 700 may include the following steps:
[0175] S701: After the electronic device and the headset are paired or reconnected, the electronic device sends a query command to the headset, and correspondingly, the headset receives the query command.
[0176] The electronic device can send a query command based on the Bluetooth general protocol. The format of the query command can be customized by the manufacturer, and the embodiments of the present application do not specifically limit this.
[0177] For example, the format of the query command may be defined as 0XF0F0F0F0. After the electronic device is paired with or reconnected to the headset, the electronic device may send the query command based on the serial port profile (SPP) protocol.
[0178] S702: If the headset can support communication with the electronic device through the agreed command, the headset sends a response to the electronic device based on the query command, and the electronic device receives the response accordingly.
[0179] If the headset supports communicating with the electronic device via the agreed command, the headset can determine the meaning of the query command and send a response to the electronic device based on the query command. The format of the response can also be customized by the manufacturer and is not specifically limited in this embodiment of the application.
[0180] For example, the manufacturer can preset a correspondence between query commands and responses in the headset. The query command format can be defined as 0XF0F0F0F0, and the response format can be defined as 0XABABABAB. After the headset receives the query command 0XF0F0F0F0 from the electronic device, it can determine the response 0XABABABAB based on the preset correspondence and send the response to the electronic device.
[0181] If the headset supports communication with the electronic device through agreed commands, the headset is unsure of the meaning of the query command and cannot respond. If the electronic device does not receive a response within a period of time, it can be determined that it does not support communication with the electronic device through agreed commands. In this case, if the electronic device detects the user's operation of playing audio, in response to this operation, the electronic device can render the sound effects based on existing technologies, that is, use universal or default headphone sound effect compensation parameters to perform headphone sound effect compensation on the audio data.
[0182] S703: The electronic device sends an information query command to the headset based on the response, and correspondingly, the headset receives the information query command.
[0183] The information query command is used to instruct the headset to report data. The format of the information query command can also be customized by the manufacturer, and this embodiment of the application does not specifically limit this.
[0184] Exemplarily, the format of the information query command can be customized to 0XCDCDCDCD.
[0185] S704: The headset sends an information reporting response to the electronic device based on the information query command. Correspondingly, the electronic device receives the information reporting response.
[0186] The data format of the information reporting response can be customized by the manufacturer, and the embodiments of the present application do not specifically limit this.
[0187] Illustratively, the data format of the information reporting response may be as shown in Table 2.
[0188] Table 2
[0189] As shown in Table 2, in the data format of the information reporting response, XX...X indicates that the headset has the corresponding parameters, while NA indicates that the headset does not have the corresponding parameters. In head tracking data, displacement includes components in the x, y, and z directions, and angles include rotation angles around the x, y, and z axes. NA indicates that the headset does not have the corresponding dimension parameters.
[0190] After receiving the information reporting response, the electronic device can parse it based on the defined data. If the parsed result is NA, it is determined that the corresponding parameters have not been received; if the parsed result is not NA, the corresponding parameters can be obtained.
[0191] If the information reporting response includes the model of the headset and / or the serial number of the headset, the electronic device can determine whether the headset and the electronic device are produced by the same manufacturer based on the model of the headset and / or the serial number of the headset.
[0192] If the information reporting response includes the amplitude-frequency compensation parameters of the earphones and the phase-frequency compensation parameters of the earphones, when the electronic device detects the user's operation of playing audio, the electronic device can respond to the operation and input the amplitude-frequency compensation parameters of the earphones and the phase-frequency compensation parameters of the earphones into the sound effect algorithm to render the audio.
[0193] The communication method provided in the embodiment of the present application is that the headset can send reportable data to the electronic device through an information reporting response and indicate which data cannot be reported. The electronic device does not need to query in advance which data the headset has the ability to report, which is conducive to saving signaling interaction and improving data acquisition efficiency.
[0194] As an optional embodiment, the turning on or off of the headphone targeted compensation and head motion tracking of the above-mentioned headphones is determined by default or in response to the user's turning on or off operation.
[0195] The electronic device may be installed with an application for controlling the functions of the headset, which may support the functions of the headset targeted compensation and head movement tracking, and provide controls to support users to turn them on or off. When the electronic device installs the application for controlling the functions of the headset, the functions of the headset targeted compensation and head movement tracking have a default state, which may be an on state or an off state, and the embodiments of the present application do not limit this. The user may change the on or off state of the headset targeted compensation and head movement tracking on the electronic device according to their own needs. When the electronic device detects that the user changes the state of the headset targeted compensation and / or head movement tracking, the on or off state of the headset targeted compensation is changed, and / or the on or off state of the head movement tracking is changed.
[0196] If the default states of the earphone targeted compensation and head movement tracking are both on when the electronic device installs the application for controlling the earphone function, the electronic device can detect that the earphone targeted compensation and head movement tracking are both in the on state. If the electronic device detects the user's operation of turning off the earphone targeted compensation, in response to the operation, the on state of the earphone targeted compensation can be changed to the off state. If the electronic device detects the user's operation of turning off head tracking, in response to the operation, the on state of the earphone head tracking can be changed to the off state. If the electronic device detects the user's operation of turning off head tracking and detects the user's operation of turning off the earphone targeted compensation, in response to these two operations, the on state of the earphone head tracking can be changed to the off state, and the on state of the earphone targeted compensation can be changed to the off state.
[0197] It is understood that if both the headphone targeted compensation and head movement tracking are turned on, the controls corresponding to the headphone targeted compensation and head movement tracking are both turned on. If the headphone targeted compensation is turned off and the head movement tracking is turned on, the controls corresponding to the headphone targeted compensation are turned off and the controls corresponding to the head movement tracking are turned on. If the headphone targeted compensation is turned on and the head movement tracking is turned off, the controls corresponding to the headphone targeted compensation are turned on and the controls corresponding to the head movement tracking are turned off. If both the headphone targeted compensation and head movement tracking are turned off, the controls corresponding to the headphone targeted compensation and head movement tracking are both turned on.
[0198] For example, Figure 8 shows a schematic diagram of a functional interface. As shown in Figure 8, the electronic device may be a mobile phone, which has an application installed for controlling headphone functions. The application provides a sound effect control menu bar interface, which includes head tracking and its corresponding controls, and headphone targeted compensation and its corresponding controls. As shown in Figure 8a, the controls corresponding to head tracking and headphone targeted compensation are both turned on. As shown in Figure 8b, the controls corresponding to head tracking are turned on, the controls corresponding to headphone targeted compensation are turned off, and the words "Headphone targeted compensation" and its corresponding controls are grayscaled to indicate that they are unavailable. As shown in Figure 8c, the controls corresponding to headphone targeted compensation are turned on, the controls corresponding to head tracking are turned off, and the words "Head tracking" and its corresponding controls are grayscaled to indicate that they are unavailable. As shown in Figure 8d, the controls corresponding to headphone targeted compensation and head tracking are both turned off, and the words "Headphone targeted compensation" and its corresponding controls, as well as the words "Head tracking" and its corresponding controls, are grayscaled to indicate that they are unavailable.
[0199] If the control corresponding to the headphone targeted compensation is turned on, the headphone can send the headphone sound compensation parameters to the electronic device; if the control corresponding to the headphone targeted compensation is turned off, the headphone may not send the headphone sound compensation parameters to the electronic device. If the control corresponding to head motion tracking is turned on, the headphone can send head motion tracking data to the electronic device; if the control corresponding to head motion tracking is turned off, the headphone may not send head motion tracking data to the electronic device.
[0200] After pairing or reconnecting the electronic device with the headphones, the electronic device can detect the status of the controls corresponding to the headphones' targeted compensation to determine whether to send the headphone sound compensation parameters to the electronic device; it can also detect the status of the controls corresponding to head motion tracking to determine whether to send head motion tracking data to the electronic device. When the electronic device and the headphones are connected, the electronic device can detect whether the status of the controls corresponding to the headphones' targeted compensation has changed, and can also detect whether the status of the controls corresponding to head motion tracking has changed.
[0201] If the electronic device detects that the state of the control corresponding to the headphone targeted compensation has changed from an on state to an off state, the electronic device may send information to the headphone indicating that the headphone targeted compensation function is turned off. The headphone receives the information and stores it in the headphone function control module. In the above method 600, the reported data indicated by the existing information capability sent by the electronic device to the headphone may not include the headphone sound effect compensation parameters. In the above method 700, the headphone may change the amplitude-frequency compensation parameters and the amplitude-frequency compensation parameters in Table 2 above to NA based on this information.
[0202] If the electronic device detects that the state of the control corresponding to head tracking has changed from on to off, the electronic device may send information to the headset indicating that the headset's head tracking function is disabled. The headset receives this information and stores it in the headset function control module. In the above method 600, the reported data indicated by the existing information capability sent by the electronic device to the headset may not include head tracking data. In the above method 700, the headset may change the displacement and angle in Table 2 above to NA based on this information.
[0203] In the method provided in the embodiment of the present application, the turning on or off of the headphone targeted compensation and head movement tracking of the headphone is determined by default or in response to the user's turning on or off operation, which is more flexible and has a wider range of applications.
[0204] Example 2
[0205] FIG9 shows a schematic block diagram of a headphone sound effect compensation method provided in an embodiment of the present application. As shown in FIG9 , the electronic device and the headphone are in a connected state. The headphone can be the left headphone in a pair of headphones or the right headphone in a pair of headphones, and this embodiment of the present application does not limit this. The headphone does not support communication with the electronic device through agreed commands, but can communicate with the electronic device through general commands. The electronic device has the ability to render sound effects and has the ability to compensate for sound effects.
[0206] The modules and functions included in the earphones and electronic devices are the same as those in Figure 5 above, and will not be repeated here. It should be noted that the earphone sound effect compensation parameters stored in the storage module in the earphones cannot be transmitted to the electronic device through general commands. That is to say, the electronic device can perform earphone sound effect compensation based on the general earphone sound effect compensation parameters stored in the electronic device, but cannot perform earphone sound effect compensation based on the earphone sound effect compensation parameters stored in the earphones. The earphones support targeted earphone compensation and head movement tracking, but the user is not allowed to select whether to turn head movement tracking on or off. Head movement tracking is always on. It should be noted that the fact that head movement tracking is always on is just an example, and the user can also select whether to turn head movement tracking on or off.
[0207] When the electronic device detects a user triggering an audio playback operation, the electronic device responds to the operation by obtaining head tracking data from the user and obtaining motion data of the electronic device through a motion tracking sensor. The head tracking data and the motion data of the electronic device are input into a motion tracking algorithm to obtain relative motion data between the electronic device and the user's head. The relative motion data between the electronic device and the user's head, the general headphone sound effect compensation parameters stored in the electronic device, and the original sound effect compensation parameters of the electronic device are then input into an audio effect algorithm to render the audio data, thereby obtaining audio data after sound effect rendering. The rendered audio data is then transmitted to the headphone. If the headphone targeted compensation of the headphone is enabled, the headphone receives the rendered audio data through a data receiving module, performs headphone sound effect compensation on the rendered audio data based on the headphone sound effect compensation parameters stored in the headphone, and plays the audio corresponding to the compensated audio data. If the headphone targeted compensation of the headphone is disabled, the headphone receives the rendered audio data through the data receiving module and plays the audio corresponding to the compensated audio data.
[0208] In the above method, there are two possible implementations for the electronic device to obtain the user's head movement tracking data. The specific implementations are the same as those in the above embodiment 1 and will not be described again here.
[0209] Optionally, the electronic device may obtain the model and / or serial number of the headset through a universal command. The electronic device may determine based on the model of the headset and / or whether the headset and the electronic device are from the same manufacturer.
[0210] For example, an electronic device stores a database of multiple headphone models, where the multiple headphone models and the electronic device are manufactured by the same manufacturer. The electronic device obtains the headphone model using a universal command. If the model matches any model in the database, the electronic device can determine that the headphone and the electronic device are manufactured by the same manufacturer.
[0211] As an optional embodiment, the turning on or off of the headphone-targeted compensation of the above-mentioned headphone is determined by default or in response to the turning on or off operation of the user.
[0212] The electronic device may be installed with an application for controlling the function of the headset. The application may support the headset targeted compensation function and provide controls to support users to turn it on or off. When the electronic device installs the application for controlling the function of the headset, the headset targeted compensation function has a default state, which can be an on state or an off state. The embodiment of the present application does not limit this. The user can change the on or off state of the headset targeted compensation on the electronic device according to their own needs. When the electronic device detects that the user has changed the state of the headset targeted compensation, it changes the on or off state of the headset targeted compensation.
[0213] If the earphone targeted compensation is turned on by default when the electronic device installs the application for controlling earphone functions, the electronic device can detect that the earphone targeted compensation is turned on. If the electronic device detects that the user has turned off the earphone targeted compensation, the electronic device changes the on state of the earphone targeted compensation to off in response to the user's operation.
[0214] It is understandable that if the earphone targeted compensation is turned on, the control corresponding to the earphone targeted compensation is turned on. If the earphone targeted compensation is turned off, the control corresponding to the earphone targeted compensation is turned on.
[0215] For example, Figure 10 shows a schematic diagram of a functional interface. As shown in Figure 10, the electronic device may be a mobile phone, which is installed with an application for controlling the functions of the headset. The application provides a headset control menu bar interface, which includes headset targeted compensation and its corresponding controls. As shown in a of Figure 10, the control corresponding to the headset targeted compensation is in the on state. As shown in b of Figure 10, the control corresponding to the headset targeted compensation is in the off state, and the words "headphone targeted compensation" and its corresponding controls are displayed in grayscale to indicate that they are unavailable.
[0216] If the control corresponding to the targeted compensation of the earphone is in the turned-on state, the earphone can send the earphone sound compensation parameters to the electronic device; if the control corresponding to the targeted compensation of the earphone is in the turned-off state, the earphone may not send the earphone sound compensation parameters to the electronic device.
[0217] After pairing or reconnecting the electronic device with the headphones, the electronic device can detect the status of the control corresponding to the headphone targeted compensation to determine whether to send the headphone sound effect compensation parameters to the electronic device. When the electronic device and the headphones are connected, the electronic device can detect whether the status of the control corresponding to the headphone targeted compensation has changed.
[0218] If the electronic device detects that the state of the control corresponding to the targeted compensation of the headset changes from on to off, the electronic device can send information to the headset to indicate that the targeted compensation function of the headset is turned off. The headset receives the information and can store it in the headset function control module.
[0219] Example 3
[0220] Figure 11 shows a schematic block diagram of a headphone sound effect compensation method provided in an embodiment of the present application. As shown in Figure 11, an electronic device is connected to a headphone. The headphone can be the left headphone or the right headphone of a pair of headphones, which is not limited in this embodiment of the present application. The electronic device does not have the ability to render sound effects and does not have the ability to compensate for sound effects. The headphone has the ability to render sound effects and has the ability to compensate for sound effects.
[0221] The headset may include a storage module, a motion tracking sensor, an application processor (AP), a Bluetooth module, an audio playback module, and a headset function control module. The storage module stores headset sound effect compensation parameters, which may be obtained based on the method shown in FIG4 . The motion tracking sensor includes an inertial measurement unit (IMU) sensor and an IMU driver for obtaining motion data of the headset (e.g., acceleration and angular velocity of the headset) in order to calculate the user's head motion tracking data (e.g., displacement and angle of the user's head motion). The AP includes a motion tracking algorithm and a sound effect algorithm. The motion tracking algorithm is used to calculate the user's head motion tracking data based on the headset's motion data, and the sound effect algorithm is used to render sound effects on the audio data. The Bluetooth module is used to perform Bluetooth communication with the electronic device. The Bluetooth module includes a data receiving module. The data receiving module is used to receive audio data (or audio stream) from the electronic device via Bluetooth technology. The audio playback module is used to play audio corresponding to the audio data. The headphone function control module is used to store the status of the functions supported by the headphone. For example, the sound effect function of the headphone supports headphone targeted compensation and head movement tracking. The headphone function control module includes the on or off status of the headphone targeted compensation and the on or off status of head movement tracking.
[0222] The electronic device includes an audio playing module, which is used to play audio or send audio data to headphones.
[0223] The electronic device and the headset are in a connected state. When the electronic device detects that the user triggers the operation of playing audio, the electronic device can send the audio data played by the user to the headset in response to the operation. The headset can receive the audio data played by the user through the data receiving module in the Bluetooth module. If the head tracking of the headset is turned on and the headset targeted compensation of the headset is turned on, the headset can obtain the motion data of the headset, namely the acceleration and angular velocity, through the IMU sensor, and obtain the acceleration and angular velocity of the headset from the IMU sensor through the IMU driver, and then input the acceleration and angular velocity of the headset into the motion tracking algorithm. The output of the motion tracking algorithm is the user's head tracking data. Finally, the user's head tracking data, the headset sound effect compensation parameters and the original sound effect compensation parameters of the headset can be input into the sound effect algorithm to render the audio data played by the user, obtain the audio data after sound effect rendering, and play the audio corresponding to the audio data after sound effect rendering through the audio playback module.
[0224] Optionally, the electronic device and the headset are in a connected state. When the electronic device detects that the user triggers an operation to play audio, the electronic device can send the audio data played by the user to the headset in response to the operation. If the head tracking of the headset is turned off and the headset targeted compensation of the headset is turned on, the headset can input the headset sound effect compensation parameters and the original sound effect compensation parameters of the headset into the sound effect algorithm to render the audio data played by the user, obtain the audio data after the sound effect rendering, and play the audio corresponding to the audio data after the sound effect rendering through the audio playback module.
[0225] Optionally, the electronic device is connected to the headset. When the electronic device detects that the user triggers an operation to play audio, the electronic device can send the audio data played by the user to the headset in response to the operation. If the head tracking of the headset is on and the targeted compensation of the headset is off, the headset can obtain the motion data of the headset, namely the acceleration and angular velocity, through the IMU sensor, and obtain the acceleration and angular velocity of the headset from the IMU sensor through the IMU driver, and then input the acceleration and angular velocity of the headset into the motion tracking algorithm. The output of the motion tracking algorithm is the user's head tracking data. Finally, the user's head tracking data and the original sound effect compensation parameters of the headset can be input into the sound effect algorithm to render the audio data played by the user, obtain the audio data after sound effect rendering, and play the audio corresponding to the audio data after sound effect rendering through the audio playback module.
[0226] Optionally, the electronic device is connected to the headset. When the electronic device detects that the user triggers an operation to play audio, the electronic device can send the audio data played by the user to the headset in response to the operation. If the head tracking of the headset is turned off and the targeted headphone compensation of the headset is turned off, the headset inputs the original sound effect compensation parameters of the headset into the sound effect algorithm to render the audio data played by the user, obtains the audio data after the sound effect rendering, and plays the audio corresponding to the audio data after the sound effect rendering through the audio playback module.
[0227] As an optional embodiment, the turning on or off of the headphone targeted compensation and head motion tracking of the above-mentioned headphones is determined by default or in response to the user's turning on or off operation.
[0228] The electronic device may be installed with an application for controlling the functions of the headset, which may support the functions of the headset targeted compensation and head movement tracking, and provide controls to support users to turn them on or off. When the electronic device installs the application for controlling the functions of the headset, the functions of the headset targeted compensation and head movement tracking have a default state, which may be an on state or an off state, and the embodiments of the present application do not limit this. The user may change the on or off state of the headset targeted compensation and head movement tracking on the electronic device according to their own needs. When the electronic device detects that the user changes the state of the headset targeted compensation and / or head movement tracking, the on or off state of the headset targeted compensation is changed, and / or the on or off state of the head movement tracking is changed.
[0229] If the electronic device installs the application for controlling the functions of the headset, the default states of the headset targeted compensation and head movement tracking are both on, and the electronic device can detect that the headset targeted compensation and head movement tracking are both in the on state. If the electronic device detects the user's operation to turn off the headset targeted compensation, in response to the operation, the on state of the headset targeted compensation is changed to the off state. If the electronic device detects the user's operation to turn off head tracking, in response to the operation, the on state of the headset head tracking is changed to the off state. If the electronic device detects the user's operation to turn off head tracking and detects the user's operation to turn off the headset targeted compensation, in response to these two operations, the on state of the headset head tracking is changed to the off state, and the on state of the headset targeted compensation is changed to the off state.
[0230] It is understood that if both the headphone targeted compensation and head movement tracking are turned on, the controls corresponding to the headphone targeted compensation and head movement tracking are both turned on. If the headphone targeted compensation is turned off and the head movement tracking is turned on, the controls corresponding to the headphone targeted compensation are turned off and the controls corresponding to the head movement tracking are turned on. If the headphone targeted compensation is turned on and the head movement tracking is turned off, the controls corresponding to the headphone targeted compensation are turned on and the controls corresponding to the head movement tracking are turned off. If both the headphone targeted compensation and head movement tracking are turned off, the controls corresponding to the headphone targeted compensation and head movement tracking are both turned on.
[0231] For example, Figure 12 shows a schematic diagram of a functional interface. As shown in Figure 12, the electronic device can be a mobile phone, which has an application installed for controlling headphone functions. The application provides a headphone control menu bar interface, which includes head tracking and its corresponding controls, and headphone targeted compensation and its corresponding controls. As shown in Figure 12a, the controls corresponding to head tracking and headphone targeted compensation are both turned on. As shown in Figure 12b, the controls corresponding to head tracking are turned on, the controls corresponding to headphone targeted compensation are turned off, and the words "Headphone targeted compensation" and its corresponding controls are grayscaled to indicate that they are unavailable. As shown in Figure 12c, the controls corresponding to headphone targeted compensation are turned on, the controls corresponding to head tracking are turned off, and the words "Head tracking" and its corresponding controls are grayscaled to indicate that they are unavailable. As shown in Figure 12d, the controls corresponding to headphone targeted compensation and head tracking are both turned off, and the words "Headphone targeted compensation" and its corresponding controls, as well as the words "Head tracking" and its corresponding controls, are grayscaled to indicate that they are unavailable.
[0232] If the headphone targeted compensation control is turned on, the headphones can compensate for the audio data based on the headphone sound compensation parameters. If the head tracking control is turned on, the headphones can compensate for the audio data based on the head tracking data.
[0233] After receiving audio data sent by the electronic device, the headset can detect the state of the headset's corresponding control for targeted compensation to determine whether to perform headphone sound effect compensation on the audio data based on the headphone sound effect compensation parameters; it can also detect the state of the control corresponding to head movement tracking to determine whether to render sound effects on the audio data based on the head movement tracking data. When the electronic device and the headset are connected, the electronic device can also detect whether the state of the headset's corresponding control for targeted compensation has changed, and can also detect whether the state of the head movement tracking control has changed.
[0234] If the electronic device detects that the state of the control corresponding to the headphone targeted compensation has changed from an on state to an off state, the electronic device may send information to the headphone indicating that the targeted compensation function of the headphone is turned off. The headphone receives the information and stores it in the headphone function control module. If the electronic device detects that the state of the control corresponding to the head movement tracking has changed from an on state to an off state, the electronic device may send information to the headphone indicating that the head movement tracking function of the headphone is turned off. The headphone receives the information and stores it in the headphone function control module.
[0235] It should be noted that in the above three headphone sound effect compensation methods provided in the embodiments of the present application, the headphones can be the same headphones, that is, the headphones can all store headphone sound effect compensation parameters and have sound effect compensation functions.
[0236] The embodiments of the present application provide the above-mentioned three headphone sound effect compensation methods. The embodiments of the present application also provide a method for selecting a headphone sound effect compensation scheme, which is used to select a suitable headphone sound effect compensation method from these three headphone sound effect compensation methods to perform sound effect compensation on audio data.
[0237] For example, FIG13 shows a schematic flowchart of a method 1300 for selecting a headphone sound compensation solution. The method 1300 may include the following steps:
[0238] S1301: The electronic device detects that a connection has been established with the headset.
[0239] After the electronic device is paired with the headset or reconnected, the electronic device can detect that it has established a connection with the headset. The headset may store the headset sound effect compensation parameters or may not store the headset sound effect compensation parameters, which is not limited in this embodiment of the present application.
[0240] S1302: The electronic device determines whether the electronic device has a headphone sound effect compensation function.
[0241] If the electronic device has a headphone sound effect compensation function, the electronic device may include universal headphone sound effect compensation parameters to perform headphone sound effect compensation on the audio data, or perform headphone sound effect compensation on the audio data based on the headphone sound effect compensation parameters stored in the headphone. The electronic device may determine whether the electronic device has the headphone sound effect compensation function based on whether the electronic device stores universal headphone sound effect compensation parameters or whether the electronic device stores a sound effect algorithm.
[0242] If the electronic device has a headphone sound effect compensation function, the electronic device can determine whether the headphone has stored headphone sound effect compensation parameters through the instruction, that is, the electronic device can execute S1303. If the electronic device does not have a headphone sound effect compensation function, the electronic device can determine whether the headphone has a headphone sound effect compensation function. If the headphone has a headphone sound effect compensation function, the electronic device can execute the headphone sound effect compensation method of the third embodiment above with the headphone, that is, the electronic device can execute S1306. The electronic device can determine whether the headphone has a headphone sound effect compensation function through the instruction.
[0243] The headset can also determine whether the electronic device has the headphone sound effect compensation function based on the instructions. If the headset determines based on the instructions that the electronic device has the headphone sound effect compensation function, the headset may not perform headphone sound effect compensation on the audio data sent by the electronic device; if the headset determines based on the instructions that the electronic device does not have the headphone sound effect compensation function, the headset may perform headphone sound effect compensation on the audio data sent by the electronic device.
[0244] S1303: If the electronic device has a headphone sound effect compensation function, the electronic device determines whether the headphone supports the agreed command.
[0245] For example, in the example shown in FIG6 , the electronic device may send a query command to the headset. If the electronic device receives a response from the headset based on the query command, the electronic device may determine that the headset supports the agreed command. If the electronic device does not receive a response from the headset based on the query command, the electronic device may determine that the headset does not support the agreed command.
[0246] If the headset supports the agreed command, the electronic device can communicate with the headset through the agreed command, that is, the electronic device can execute S1304. If the headset does not support the agreed command, the electronic device can communicate with the headset through a universal command, that is, the electronic device can execute S1305.
[0247] S1304: If the headset supports the agreed command, the electronic device and the headset may execute the headset sound effect compensation method of the first embodiment.
[0248] S1305: If the headset does not support the agreed command, the electronic device and the headset may execute the headset sound effect compensation method of the second embodiment.
[0249] S1306: If the electronic device does not have the headphone sound effect compensation function, and the headphone has the headphone sound effect compensation function, the electronic device and the headphone may execute the headphone sound effect compensation method of the third embodiment.
[0250] If the electronic device does not have the headphone sound effect compensation function, and the headphone does not have the headphone sound effect compensation function, neither the electronic device nor the headphone performs headphone sound effect compensation on the audio data.
[0251] The method for selecting the sound effect compensation scheme provided in the embodiment of the present application is conducive to selecting an appropriate sound effect compensation method to compensate the audio data for sound effects in different situations, and is more flexible.
[0252] The size of the serial number of each process in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of this application.
[0253] The method provided in the embodiment of the present application is described in detail above in conjunction with Figures 1 to 13. The device provided in the embodiment of the present application will be described in detail below in conjunction with Figures 14 and 15.
[0254] FIG14 shows a schematic block diagram of an earphone sound effect compensation device 1400 provided in an embodiment of the present application. As shown in FIG14 , the earphone sound effect compensation device 1400 includes a transceiver module 1410 and a processing module 1420 .
[0255] In a possible implementation, the headphone sound effect compensation device 1400 is used to execute the above-mentioned headphone execution method.
[0256] The transceiver module 1410 is used to: if the electronic device has a headphone sound effect compensation function, send headphone sound effect compensation parameters to the electronic device, and the headphone sound effect compensation parameters are used to perform headphone sound effect compensation on the audio played by the user.
[0257] In another possible implementation, the headphone sound effect compensation device 1400 is used to execute the method executed by the above electronic device.
[0258] The transceiver module 1410 is used to: if it has a headphone sound compensation function, receive headphone sound compensation parameters from the headphone; the processing module 1420 is used to: respond to the user's operation of triggering the audio playback, and perform headphone sound compensation on the audio played by the user based on the headphone sound compensation parameters.
[0259] It should be understood that the headphone sound effect compensation device 1400 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and memory for executing one or more software or firmware programs, a combined logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art will understand that the headphone sound effect compensation device 1400 may be specifically the headphone or electronic device in the above-mentioned method embodiment, or the functions of the headphone or electronic device in the above-mentioned method embodiment may be integrated into the headphone sound effect compensation device 1400, and the headphone sound effect compensation device 1400 may be used to execute the various processes and / or steps corresponding to the headphone or electronic device in the above-mentioned method embodiment. To avoid repetition, they will not be described here.
[0260] The headphone sound effect compensation device 1400 has the function of implementing the corresponding steps performed by the headphone or electronic device in the above method embodiment. The above functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0261] In the embodiment of the present application, the headphone sound compensation device 1400 in FIG. 14 may also be a chip or a chip system, such as a system on chip (SoC).
[0262] Figure 15 is a schematic block diagram of another headphone sound compensation device 1500 provided in an embodiment of the present application. As shown in Figure 15 , headphone sound compensation device 1500 includes a processor 1510, a transceiver 1520, and a memory 1530. Processor 1510, transceiver 1520, and memory 1530 communicate with each other via an internal connection path. Memory 1530 is used to store instructions, and processor 1510 is used to execute the instructions stored in memory 1530 to control transceiver 1520 to transmit and / or receive signals.
[0263] It should be understood that the headphone sound effect compensation device 1500 can be specifically the headphone or electronic device in the above-mentioned method embodiment, or the functions of the headphone or electronic device in the above-mentioned method embodiment can be integrated into the headphone sound effect compensation device 1500, and the headphone sound effect compensation device 1500 can be used to execute the various steps and / or processes corresponding to the headphone or electronic device in the above-mentioned method embodiment. Optionally, the memory 1530 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1510. A portion of the memory 1530 may also include a non-volatile random access memory. For example, the memory 1530 may also store device type information. The processor 1510 can be used to execute the instructions stored in the memory 1530, and when the processor 1510 executes the instructions, the processor 1510 can execute the various steps and / or processes corresponding to the headphone or electronic device in the above-mentioned method embodiment.
[0264] It should be understood that in the embodiment of the present application, the processor 1510 may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0265] During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.
[0266] The present application also provides a computer-readable storage medium storing a computer program for implementing the method corresponding to the headset or electronic device in the above method embodiment.
[0267] The present application also provides a chip system, which is used to support the headphones or electronic devices in the above method embodiments to implement the functions shown in the embodiments of the present application.
[0268] The present application also provides a computer program product, which includes a computer program (also referred to as code or instructions). When the computer program runs on a computer, the computer can execute the method corresponding to the headset or electronic device shown in the above method embodiment.
[0269] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0270] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0271] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0272] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.
[0273] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0274] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute 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 a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0275] The above description is merely a specific embodiment of the present application, but the scope of protection of the embodiments of the present application is not limited thereto. Any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in the embodiments of the present application, and such changes or substitutions should be included in the scope of protection of the embodiments of the present application. Therefore, the scope of protection of the embodiments of the present application should be based on the scope of protection of the claims.
Claims
1. A method for compensating earphone sound effects, characterized in that: Applied to earphones, the earphones are connected to an electronic device, and the earphones store earphone sound effect compensation parameters corresponding to the earphones; The method comprises: If the electronic device has a headphone sound effect compensation function, the headphone sends the headphone sound effect compensation parameter to the electronic device, and the headphone sound effect compensation parameter is used to perform headphone sound effect compensation on the audio played by the user.
2. The method according to claim 1, characterized in that: Before the earphone sends the earphone sound effect compensation parameter to the electronic device, the method further includes: The headset sends first information to the electronic device, where the first information is used to indicate that the headset has the ability to report the headset sound effect compensation parameter; The earphone receives second information from the electronic device, where the second information is used to request the earphone sound effect compensation parameter.
3. The method according to claim 1 or 2, characterized in that: The electronic device has a headphone sound effect compensation function, including: The headset sends a first command to the electronic device, where the first command is used to query whether the electronic device has a headset sound effect compensation function.
4. The method according to any one of claims 1 to 3, characterized in that The earphone sending the earphone sound effect compensation parameter to the electronic device includes: If the first control is in an on state, the earphone sends the earphone sound effect compensation parameter to the electronic device, and the first control is used to control the on or off of the earphone sound effect compensation function.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The headset receives third information from the electronic device, where the third information is used to request head tracking data, and the head tracking data is used to perform sound effect rendering on the audio; The headset sends the head movement tracking data to the electronic device based on the third information.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The headset receives fourth information from the electronic device, where the fourth information is used to request angular velocity data and acceleration data of the headset, where the angular velocity data and the acceleration data are used to perform sound effect rendering on the audio; The headset sends the angular velocity data and the acceleration data to the electronic device based on the fourth information.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: If the electronic device does not have a headphone sound effect compensation function, the headphone receives audio from the electronic device, where the audio is obtained by the electronic device in response to an operation of the user triggering the audio playback; The earphone performs earphone sound effect compensation on the audio based on the earphone sound effect compensation parameter.
8. A method for compensating earphone sound effects, characterized in that: Applied to an electronic device, the electronic device is connected to a headset, and the headset stores a headset sound effect compensation parameter corresponding to the headset; The method comprises: If the electronic device has a headphone sound effect compensation function, the electronic device receives the headphone sound effect compensation parameter from the headphone; In response to an operation of playing audio triggered by a user, the electronic device performs headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters.
9. The method according to claim 8, characterized in that Before the electronic device receives the headphone sound effect compensation parameter from the headphone, the method further includes: The electronic device receives first information from the headset, where the first information is used to indicate that the headset has the ability to report a headset sound effect compensation parameter; The electronic device sends second information to the headset based on the first information, where the second information is used to request the headset sound effect compensation parameter.
10. The method according to claim 8 or 9, characterized in that: The electronic device has a headphone sound effect compensation function, including: The electronic device receives a first command from the earphone, where the first command is used to query whether the electronic device has an earphone sound effect compensation function.
11. The method according to any one of claims 8 to 10, characterized in that The electronic device receives the headphone sound effect compensation parameter from the headphone, including: If the first control is in an on state, the electronic device receives the headphone sound effect compensation parameter from the headphone, and the first control is used to control the on or off of the headphone sound effect compensation function.
12. The method according to any one of claims 8 to 11, characterized in that The method further comprises: The electronic device obtains the user's head movement tracking data in response to the user triggering the audio playback operation; The electronic device obtains relative motion data between the electronic device and the user's head based on the head motion tracking data; The electronic device performs sound effect rendering on the audio played by the user based on the relative motion data between the electronic device and the user's head.
13. The method according to claim 12, characterized in that The obtaining of the user's head movement tracking data includes: The electronic device sends third information to the headset, where the third information is used to request the head movement tracking data; The electronic device receives the head tracking data from the headset.
14. The method according to claim 12, characterized in that The obtaining of the user's head movement tracking data includes: The electronic device sends fourth information to the headset, where the fourth information is used to request angular velocity data and acceleration data of the headset; The electronic device receives the angular velocity data and the acceleration data from the earphone; The electronic device determines the head motion tracking data based on the angular velocity data and the acceleration data.
15. The method according to any one of claims 12 to 14, characterized in that The obtaining of the user's head movement tracking data includes: If the second control is in an open state, the electronic device obtains the head movement tracking data of the user, and the second control is used to control whether to obtain the head movement tracking data.
16. The method according to any one of claims 8 to 15, characterized in that The method further comprises: If the electronic device does not have a headphone sound effect compensation function, the electronic device responds to the user triggering the playback of the sound The audio played by the user is sent to the headset through the operation of the audio.
17. A method for compensating earphone sound effects, characterized in that: Applicable to a communication system including an electronic device and a headset, wherein the electronic device and the headset are in a connected state, and the headset stores a headset sound effect compensation parameter corresponding to the headset; The method comprises: If the electronic device has a headphone sound effect compensation function, the headphone sends first information to the electronic device, where the first information is used to indicate that the headphone has the ability to report headphone sound effect compensation parameters; The electronic device sends second information to the headset based on the first information, where the second information is used to request the headset sound effect compensation parameter; The earphone receives the second information, and sends the earphone sound effect compensation parameter to the electronic device based on the first information; The electronic device receives the headphone sound effect compensation parameter; In response to an operation of playing audio triggered by a user, the electronic device performs headphone sound effect compensation on the audio played by the user based on the headphone sound effect compensation parameters.
18. The method according to claim 17, characterized in that The method further comprises: If the electronic device does not have a headphone sound effect compensation function, the electronic device sends the audio played by the user to the headphone in response to the user triggering an operation of playing the audio; The earphone receives the audio; The earphone performs earphone sound effect compensation on the audio based on the earphone sound effect compensation parameter.
19. An earphone sound effect compensation device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the headphone sound effect compensation device executes the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 16.
20. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 7 or performs the method according to any one of claims 8 to 16.
21. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables a computer to execute the method according to any one of claims 1 to 7 or to execute the method according to any one of claims 8 to 16.
22. A method for compensating earphone sound effects, characterized in that: Applied to earphones, the earphones are connected to an electronic device, the earphones store earphone sound effect compensation parameters corresponding to the earphones, the earphone sound effect compensation parameters are amplitude-frequency compensation parameters and phase-frequency compensation parameters calculated according to a test signal received by the earphones and a response signal of the earphones to the test signal; The method comprises: If the electronic device has a headphone sound effect compensation function, the headphone sends the headphone sound effect compensation parameter to the electronic device, and receives audio data after sound effect rendering sent by the electronic device, the audio data after sound effect rendering is obtained according to the relative motion data between the electronic device and the user's head and the headphone sound effect compensation parameter, and the relative motion data between the electronic device and the user's head is obtained according to the motion data of the electronic device and The user's head tracking data is obtained.
23. The method according to claim 22, characterized in that Before the earphone sends the earphone sound effect compensation parameter to the electronic device, the method further includes: The headset sends first information to the electronic device, where the first information is used to indicate that the headset has the ability to report the headset sound effect compensation parameter; The earphone receives second information from the electronic device, where the second information is used to request the earphone sound effect compensation parameter.
24. The method according to claim 22 or 23, characterized in that The electronic device has a headphone sound effect compensation function, including: The headset sends a first command to the electronic device, where the first command is used to query whether the electronic device has a headset sound effect compensation function.
25. The method according to any one of claims 22 to 24, characterized in that The earphone sends the earphone sound effect compensation parameter to the electronic device, including: If the first control is in an on state, the earphone sends the earphone sound effect compensation parameter to the electronic device, and the first control is used to control the on or off of the earphone sound effect compensation function.
26. The method according to any one of claims 22 to 24, characterized in that The method further comprises: The headset receives third information from the electronic device, where the third information is used to request head tracking data, and the head tracking data is used to perform sound effect rendering on the audio; The headset sends the head movement tracking data to the electronic device based on the third information.
27. The method according to any one of claims 22 to 24, characterized in that The method further comprises: The headset receives fourth information from the electronic device, where the fourth information is used to request angular velocity data and acceleration data of the headset, where the angular velocity data and the acceleration data are used to perform sound effect rendering on the audio; The headset sends the angular velocity data and the acceleration data to the electronic device based on the fourth information.
28. The method according to any one of claims 22 to 24, characterized in that The method further comprises: If the electronic device does not have a headphone sound effect compensation function, the headphone receives audio from the electronic device, where the audio is obtained by the electronic device in response to an operation of the user triggering the audio playback; The earphone performs earphone sound effect compensation on the audio based on the earphone sound effect compensation parameter.
29. A method for compensating earphone sound effects, characterized in that: Applied to an electronic device, the electronic device is connected to a headset, the headset stores a headset sound effect compensation parameter corresponding to the headset, the headset sound effect compensation parameter is an amplitude-frequency compensation parameter and a phase-frequency compensation parameter calculated according to a test signal received by the headset and a response signal of the headset to the test signal; The method comprises: If the electronic device has a headphone sound effect compensation function, the electronic device receives the headphone sound effect compensation parameter from the headphone; The electronic device obtains the user's head movement tracking data in response to the user triggering the audio playback operation; The electronic device obtains relative motion data between the electronic device and the user's head based on the head motion tracking data; The electronic device performs headphone sound effect compensation on the audio played by the user based on the relative motion data between the electronic device and the user's head and the headphone sound effect compensation parameters.
30. The method according to claim 29, characterized in that Before the electronic device receives the headphone sound effect compensation parameter from the headphone, the method further includes: The electronic device receives first information from the headset, where the first information is used to indicate that the headset has the ability to report a headset sound effect compensation parameter; The electronic device sends second information to the headset based on the first information, where the second information is used to request the headset sound effect compensation parameter.
31. The method according to claim 29 or 30, characterized in that The electronic device has a headphone sound effect compensation function, including: The electronic device receives a first command from the earphone, where the first command is used to query whether the electronic device has an earphone sound effect compensation function.
32. The method according to claim 29 or 30, characterized in that The electronic device receives the headphone sound effect compensation parameter from the headphone, including: If the first control is in an on state, the electronic device receives the headphone sound effect compensation parameter from the headphone, and the first control is used to control the on or off of the headphone sound effect compensation function.
33. The method according to claim 29, characterized in that The obtaining of the user's head movement tracking data includes: The electronic device sends third information to the headset, where the third information is used to request the head movement tracking data; The electronic device receives the head tracking data from the headset.
34. The method according to claim 29, characterized in that The obtaining of the user's head movement tracking data includes: The electronic device sends fourth information to the headset, where the fourth information is used to request angular velocity data and acceleration data of the headset; The electronic device receives the angular velocity data and the acceleration data from the earphone; The electronic device determines the head motion tracking data based on the angular velocity data and the acceleration data.
35. The method according to claim 33 or 34, characterized in that The obtaining of the user's head movement tracking data includes: If the second control is in an open state, the electronic device obtains the head movement tracking data of the user, and the second control is used to control whether to obtain the head movement tracking data.
36. The method of claim 29, 30, 33 or 34, wherein: The method further comprises: If the electronic device does not have a headphone sound effect compensation function, the electronic device sends the audio played by the user to the headphone in response to an operation of the user triggering the audio playing.
37. A method for compensating earphone sound effects, characterized in that: The invention is applied to a communication system including an electronic device and a headset, wherein the electronic device and the headset are in a connected state, and the headset stores a headset sound effect compensation parameter corresponding to the headset, wherein the headset sound effect compensation parameter is an amplitude-frequency compensation parameter and a phase-frequency compensation parameter calculated according to a test signal received by the headset and a response signal of the headset to the test signal; The method comprises: If the electronic device has a headphone sound effect compensation function, the headphone sends first information to the electronic device, where the first information is used to indicate that the headphone has the ability to report headphone sound effect compensation parameters; The electronic device sends second information to the headset based on the first information, where the second information is used to request the headset sound effect compensation parameter; The earphone receives the second information, and sends the earphone sound effect compensation parameter to the electronic device based on the first information; The electronic device receives the headphone sound effect compensation parameter; The electronic device acquires the user's head movement tracking data in response to the user triggering the audio playback operation; The electronic device obtains relative motion data between the electronic device and the user's head based on the head motion tracking data; The electronic device performs headphone sound effect compensation on the audio played by the user based on the relative motion data between the electronic device and the user's head and the headphone sound effect compensation parameters.
38. The method according to claim 37, characterized in that The method further comprises: If the electronic device does not have a headphone sound effect compensation function, the electronic device sends the audio played by the user to the headphone in response to the user triggering an operation of playing the audio; The earphone receives the audio; The earphone performs earphone sound effect compensation on the audio based on the earphone sound effect compensation parameter.
39. A headphone sound effect compensation device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the headphone sound compensation device executes the method as claimed in any one of claims 22 to 28 or the method as claimed in any one of claims 29 to 36.
40. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 22 to 28 or performs the method according to any one of claims 29 to 36.