Control method and apparatus, and head-mounted display device, and medium
By working together with the application processor and digital signal processor, the microphone input pin identifier is determined using a preset mapping relationship, and the phase of the audio signal picked up by the microphone is corrected. This solves the phase difference problem when recording with multiple microphones, and realizes flexible and automatic phase correction, which is suitable for all recording scenarios.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- GOERTEK INC
- Filing Date
- 2025-11-21
- Publication Date
- 2026-06-25
AI Technical Summary
When multiple microphones pick up the same sound signal, the phase difference caused by the time difference affects the spatial perception and clarity of the synthesized sound signal, and existing technologies are unable to effectively correct the phase.
The application processor obtains the microphone identifier, uses a preset mapping relationship to determine the microphone input pin identifier, and sends it to the digital signal processor. The digital signal processor corrects the audio signal in the storage space to avoid phase correction in the application processor's HAL layer, KERNEL layer, or codec driver.
It achieves phase correction of the audio signal picked up by the microphone, covering all recording scenarios, and automatically completes the correction without interfering with the recording process, with low computing power and power consumption.
Smart Images

Figure CN2025136666_25062026_PF_FP_ABST
Abstract
Description
[Detailed Rules, Article 26, 13.01.2026] System, method, apparatus and medium for phase correction of audio signals
[0001] This application claims priority to Chinese Patent Application No. 202411859399.9, filed on December 17, 2024, entitled "A System, Method, Apparatus and Medium for Phase Correction of Audio Signals", the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present invention relates to the field of audio processing technology, and more specifically, to a phase correction system, method, device and medium for audio signals. Background Technology
[0003] As a sound signal acquisition device, the performance of a microphone has a crucial impact on the sound quality of the final acquired sound signal.
[0004] When multiple microphones capture the same sound source, if the sound signals picked up by the microphones are out of phase, or if the sound signals arrive at each microphone at different times, a phase difference may occur in the sound signals picked up by each microphone. This difference can cause phase interference when the sound signals picked up by multiple microphones are combined. That is, when the waveforms of two or more sound signals are out of phase at certain frequencies, they will cancel each other out, resulting in the partial or complete loss of the combined sound signal. This severely affects the spatial perception and clarity of the combined sound signal during playback.
[0005] Therefore, in order to ensure that the sound signals recorded by multiple microphones can be correctly synthesized, it is necessary to correct the phase of the sound signals picked up by the microphones. Summary of the Invention
[0006] One objective of this invention is to provide a new technical solution for phase correction of audio signals.
[0007] According to a first aspect of the present invention, a phase correction system for an audio signal is provided, comprising:
[0008] An application processor is configured to, for any microphone to be phase corrected, obtain the microphone identifier of the microphone to be phase corrected, determine the microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and send the microphone input pin identifier to a digital signal processor. The preset mapping relationship is used to reflect the correspondence between the microphone identifier and the corresponding microphone input pin identifier.
[0009] The digital signal processor is configured to obtain the microphone input pin identifier from the application processor, determine the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and correct the audio signal in the storage space.
[0010] Optionally, the application processor is specifically used for:
[0011] Based on the microphone identifier and the first preset mapping relationship, determine the channel identifier corresponding to the microphone identifier;
[0012] The microphone input pin identifier is determined based on the channel identifier and the second preset mapping relationship;
[0013] The preset mapping relationship includes a first preset mapping sub-relationship and a second preset mapping sub-relationship. The first preset mapping sub-relationship is used to reflect the correspondence between the microphone identifier and the corresponding channel identifier, and the second preset mapping relationship is used to reflect the correspondence between the channel identifier and the microphone input pin identifier.
[0014] Optionally, the application processor is further configured to acquire phase correction parameters of the microphone to be phase corrected, and to send the phase correction parameters to the digital signal processor;
[0015] The digital signal processor is specifically used to correct the audio signal in the storage space according to the phase correction parameters.
[0016] Optionally, the application processor is specifically used for:
[0017] Receive input from the microphone identifier of the microphone to be phase corrected in the display interface;
[0018] In response to the input operation, the microphone identifier of the microphone to be phase corrected is determined.
[0019] Optionally, the application processor is specifically configured to have a hardware abstraction layer deployed in the application processor obtain the microphone identifier of any microphone to be phase corrected, and a kernel layer deployed in the application processor determine the microphone input pin identifier according to the microphone identifier and a preset mapping relationship, and send the microphone input pin identifier to the digital signal processor.
[0020] Optionally, the application processor is specifically used for:
[0021] The hardware abstraction layer deployed in the application processor reads the phase correction configuration file, obtains the microphone identifier and phase correction identifier of the microphone to be phase corrected, encapsulates the microphone identifier and the phase correction identifier of the microphone to be phase corrected into a kcontrol node, and passes the kcontrol node to the kernel layer deployed in the application processor through the ioctl system. The phase correction identifier is used to instruct the application processor to determine the microphone input pin identifier based on the microphone identifier in the kernel layer, and sends the microphone input pin identifier to the digital signal processor.
[0022] The kernel layer deployed in the application processor calls the put function registered by the kcontrol node to obtain the microphone identifier and phase correction identifier of the microphone to be phase corrected encapsulated in the kcontrol node. Under the indication of the phase correction identifier, the microphone input pin identifier is determined according to the microphone identifier and the preset mapping relationship, and the microphone input pin identifier is sent to the digital signal processor.
[0023] According to a second aspect of the present invention, a phase correction method for an audio signal is provided, comprising:
[0024] For any microphone to be phase corrected, the application processor obtains the microphone identifier of the microphone to be phase corrected, determines the microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor. The preset mapping relationship is used to reflect the correspondence between the microphone identifier and the corresponding microphone input pin identifier.
[0025] The digital signal processor obtains the microphone input pin identifier from the application processor, determines the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and corrects the audio signal in the storage space.
[0026] Optionally, determining the microphone input pin identifier based on the microphone identifier includes:
[0027] Based on the microphone identifier and the first preset mapping relationship, determine the channel identifier corresponding to the microphone identifier;
[0028] The microphone input pin identifier is determined based on the channel identifier and the second preset mapping relationship;
[0029] The preset mapping relationship includes a first preset mapping sub-relationship and a second preset mapping sub-relationship. The first preset mapping sub-relationship is used to reflect the correspondence between the microphone identifier and the corresponding channel identifier, and the second preset mapping relationship is used to reflect the correspondence between the channel identifier and the microphone input pin identifier.
[0030] Optionally, the method further includes:
[0031] The application processor acquires the phase correction parameters of the microphone to be phase corrected, and sends the phase correction parameters to the digital signal processor.
[0032] The digital signal processor corrects the stored audio signal in the storage space according to the phase correction parameter.
[0033] Optionally, obtaining the microphone identifier of the microphone to be phase corrected includes:
[0034] Receive input from the microphone identifier of the microphone to be phase corrected in the display interface;
[0035] In response to the input operation, the microphone identifier of the microphone to be phase corrected is determined.
[0036] Optionally, for any microphone to be phase-corrected, the application processor obtains the microphone identifier of the microphone to be phase-corrected, determines the microphone input pin identifier based on the microphone identifier, and sends the microphone input pin identifier to the digital signal processor, including:
[0037] For any microphone to be phase-corrected, the hardware abstraction layer deployed in the application processor obtains the microphone identifier of the microphone to be phase-corrected, and the kernel layer deployed in the application processor determines the microphone input pin identifier according to the microphone identifier and a preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor.
[0038] Optionally, the hardware abstraction layer deployed in the application processor acquires the microphone identifier of any microphone to be phase-corrected, and the kernel layer deployed in the application processor determines the microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor, including:
[0039] The hardware abstraction layer deployed in the application processor reads the phase correction configuration file, obtains the microphone identifier and phase correction identifier of the microphone to be phase corrected, encapsulates the microphone identifier and the phase correction identifier of the microphone to be phase corrected into a kcontrol node, and passes the kcontrol node to the kernel layer deployed in the application processor through the ioctl system. The phase correction identifier is used to instruct the application processor to determine the microphone input pin identifier based on the microphone identifier in the kernel layer, and sends the microphone input pin identifier to the digital signal processor.
[0040] The kernel layer deployed in the application processor calls the put function registered by the kcontrol node to obtain the microphone identifier and phase correction identifier of the microphone to be phase corrected encapsulated in the kcontrol node. Under the indication of the phase correction identifier, the microphone input pin identifier is determined according to the microphone identifier and the preset mapping relationship, and the microphone input pin identifier is sent to the digital signal processor.
[0041] According to a third aspect of the invention, an electronic device is provided, the electronic device comprising a phase correction system for an audio signal as described in any of the first aspects; or,
[0042] The electronic device includes a memory and a processor, the memory being used to store computer instructions, and the processor being used to retrieve the computer instructions from the memory to perform the method as described in any one of the second aspects.
[0043] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of the second aspects.
[0044] This invention provides an audio signal phase correction system, comprising: an application processor, configured to, for any microphone to be phase corrected, acquire a microphone identifier of the microphone to be phase corrected, determine a microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and send the microphone input pin identifier to a digital signal processor (DSP). The preset mapping relationship reflects the correspondence between the microphone identifier and the corresponding microphone input pin identifier. The DSP is configured to acquire the microphone input pin identifier from the application processor, determine the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and correct the audio signal in the storage space. This audio signal phase correction system can complete the phase correction of the audio signal picked up by the microphone. Specifically, the application processor transmits the microphone input pin identifier corresponding to the microphone to be phase corrected to the DSP, and the DSP corrects the audio signal of the microphone to be phase corrected based on the microphone input pin identifier. This avoids performing phase correction in the application processor's HAL layer, KERNEL layer, or codec driver, thus avoiding the problem of being unable to perform phase correction due to the inability to obtain the audio signal of a single microphone. On the other hand, it can operate independently of the limitations of any recording scenario, covering all recording scenarios. This avoids the problem of integrating correction algorithms for specific recording scenarios into a digital signal processor, which limits audio correction to the specific recording scenario in which the algorithm is loaded. Furthermore, it automatically performs phase correction without interfering with the microphone's recording process, making it imperceptible to the user. Finally, by correcting the audio signal stored in the microphone's audio signal storage space, it requires minimal additional computing power and consumes minimal power.
[0045] Other features and advantages of this specification will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of this specification and, together with their description, serve to explain the principles of this specification.
[0047] Figure 1 is a schematic diagram of the structure of an audio signal phase correction system provided by the present invention;
[0048] Figure 2 is a schematic diagram of the structure of an audio signal phase correction system provided by the present invention;
[0049] Figure 3 is a schematic diagram of the structure of an audio signal phase correction system provided by the present invention;
[0050] Figure 4 is a schematic flowchart of a phase correction system for audio signals provided by the present invention;
[0051] Figure 5 is a schematic diagram of the structure of an electronic device provided by the present invention.
[0052] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0055] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0056] This invention provides a phase correction system 100 for audio signals, as shown in Figure 1, comprising:
[0057] Application processor 101 is used to obtain the microphone identifier of any microphone to be phase corrected, determine the microphone input pin identifier according to the microphone identifier and a preset mapping relationship, and send the microphone input pin identifier to the digital signal processor. The preset mapping relationship is used to reflect the correspondence between the microphone identifier and the corresponding microphone input pin identifier.
[0058] The digital signal processor 102 is used to obtain the microphone input pin identifier from the application processor 101, determine the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and correct the audio signal in the storage space.
[0059] In this embodiment, for the same electronic device, the microphones requiring phase correction are determined in advance based on acoustic experiments, for example, the microphones in the microphone array included in the electronic device that require phase correction are determined. Further, after determining the microphones requiring phase correction, the microphone identifier of the microphones requiring phase correction is input to the application processor 101. It is understood that an electronic device corresponds to at least one microphone requiring phase correction. The following embodiment uses one microphone requiring phase correction as an example to illustrate the phase correction process.
[0060] Based on the above, the application processor 101 can specifically obtain the microphone identifier of the microphone to be phase corrected through the following steps S11 and S12.
[0061] Step S11: Receive input on the display interface for the microphone identifier of the microphone to be phase corrected.
[0062] Step S12: In response to the input operation, determine the microphone identifier of the microphone to be phase corrected.
[0063] In one embodiment of the present invention, the application processor 101 provides a display interface with an input interface for a user to input the microphone identifier of the microphone to be phase-corrected. The user inputs the microphone identifier of the microphone to be phase-corrected through the input interface. The application processor 101 recognizes the user's input of the microphone identifier of the microphone to be phase-corrected through the input interface as an input operation. Further, the application processor 101 parses the input operation to determine the microphone identifier of the microphone to be phase-corrected.
[0064] In one example, the microphone identifier could be, for instance, the microphone number.
[0065] In one embodiment of the present invention, after obtaining the microphone identifier of the microphone to be phase-corrected based on the above steps S11 and S12, the application processor 101 writes the microphone identifier of the microphone to be phase-corrected and the phase correction identifier into a phase correction configuration file. The phase correction identifier is used to instruct the application processor 101, after reading the microphone identifier, to determine the microphone input pin identifier according to the microphone identifier and a preset mapping relationship, and then send the microphone input pin identifier to the digital signal processor 102.
[0066] Through the above steps S11 and S12, in the audio signal phase correction system 100 provided by the present invention, the user can specify the microphone identifier of the microphone that needs to be phase corrected, which improves the flexibility of the audio signal phase correction system 100 provided by the present invention.
[0067] In one embodiment of the present invention, as shown in FIG2, the application processor 101 deploys a Hardware Abstraction Layer (HAL) and a KERNEL layer. Specifically, the application processor 101 performs the following steps S21 and S22 to obtain the microphone identifier of any microphone to be phase corrected, determine the microphone input pin identifier based on the microphone identifier, and send the microphone input pin identifier to the digital signal processor 102.
[0068] Step S21: The hardware abstraction layer deployed in the application processor 101 obtains the microphone identifier of any microphone to be phase corrected.
[0069] In step S22, the kernel layer deployed in the application processor 101 determines the microphone input pin identifier based on the microphone identifier and the preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor 102.
[0070] In one embodiment of the present invention, the above step S21 is implemented by the following step S210.
[0071] In step S210, the hardware abstraction layer deployed in the application processor 101 reads the phase correction configuration file, obtains the microphone identifier and phase correction identifier of the microphone to be phase corrected, encapsulates the microphone identifier and phase correction identifier of the microphone to be phase corrected into a kcontrol node, and transmits the kcontrol node to the kernel layer deployed in the application processor through the ioctl system. The phase correction identifier is used to instruct the application processor to determine the microphone input pin identifier in the kernel layer based on the microphone identifier, and sends the microphone input pin identifier to the digital signal processor 102.
[0072] In one embodiment of the present invention, step S22 is implemented by step S220.
[0073] In step S220, the kernel layer deployed in the application processor 101 calls the put function registered by the kcontrol node to obtain the microphone identifier and phase correction identifier of the microphone to be phase corrected encapsulated in the kcontrol node, and determines the microphone input pin identifier according to the microphone identifier and the preset mapping relationship under the indication of the phase correction identifier, and sends the microphone input pin identifier to the digital signal processor 102.
[0074] In this embodiment, after the application processor 101 reads the phase correction configuration file at the HAL layer to obtain the microphone identifier and correction identifier of the microphone to be phase corrected, it encapsulates the microphone identifier and phase correction identifier of the microphone to be phase corrected into a kcontrol node and transmits the kcontrol node to the KERNEL layer through the ioctl system. The phase correction identifier is used to instruct the application processor 101 to determine the microphone input pin identifier at the KERNEL layer based on the microphone identifier, and then send the microphone input pin identifier to the digital signal processor 102. The phase correction identifier can be, for example, true. Based on this, the application processor 101 responds to the aforementioned ioctl system at the KERNEL layer, calling the put function registered by the aforementioned kcontrol node to obtain the microphone identifier and phase correction identifier of the microphone to be phase corrected from the kcontrol node. Under the instruction of the phase correction identifier, it determines the microphone input pin identifier according to the microphone identifier and a preset mapping relationship, and then sends the microphone input pin identifier to the digital signal processor 102.
[0075] The `kcontrol` node is the control interface in the sound card, used to implement various control functions for audio devices. The `ioctl` (Input / Output Control) system is an input / output control system, a system call widely used in UNIX and UNIX-like operating systems (such as Linux and BSD). Its main function is to provide a mechanism for low-level communication between user programs and kernel drivers or device drivers.
[0076] In one embodiment of the present invention, different microphone identifiers correspond to different microphone input pin identifiers. Based on this, the application processor 101 records a preset mapping relationship between the microphone identifier and the microphone input pin identifier for each microphone. The application processor 101 then searches the aforementioned preset mapping relationship for a microphone input pin identifier that matches the microphone identifier of the microphone to be phase corrected, thereby achieving the aforementioned determination of the microphone input pin identifier based on the microphone identifier.
[0077] In one embodiment of the present invention, in practical applications, if the configured channel of the microphone changes, in order to avoid the problem of incorrect microphone input pin identifier being determined due to the change in the configured channel of the microphone, the application processor 101 performs the following steps S31 and S32 to determine the microphone input pin identifier based on the microphone identifier.
[0078] Step S31: Determine the channel identifier corresponding to the microphone identifier based on the microphone identifier and the first preset mapping relationship.
[0079] Step S32: Determine the microphone input pin identifier based on the channel identifier and the second preset mapping relationship.
[0080] The preset mapping relationship includes a first preset mapping sub-relationship and a second preset mapping relationship. The first preset mapping sub-relationship is used to reflect the correspondence between the microphone identifier and the corresponding channel identifier, and the second preset mapping relationship is used to reflect the correspondence between the channel identifier and the microphone input pin identifier.
[0081] In this embodiment, different microphones are configured to different channels in different scenarios. The application processor 101 records a first preset mapping relationship between the microphone identifier of each microphone in the current scenario and the channel identifier of the configured channel. To achieve this, the application processor searches the aforementioned first preset mapping relationship for a channel identifier that matches the microphone identifier of the microphone to be phase corrected, thus implementing step S31.
[0082] Furthermore, the correspondence between audio channels and microphone input pins is fixed. The application processor 101 records a second preset mapping relationship between the microphone input pin identifiers (i.e., AFE pin identifiers) corresponding to the audio channel identifiers of different channels. In this regard, a microphone input pin identifier that matches the audio channel identifier obtained based on the above step S31 is searched in the aforementioned second preset mapping relationship to implement the above step S32.
[0083] In one embodiment of the present invention, the application processor 101 may obtain any of the above mapping relationships in the mixer path configuration.
[0084] After obtaining the microphone input pin identifier, the application processor 101 sends the microphone input pin identifier to the digital signal processor 102. In one embodiment of the present invention, the digital signal processor 102 may specifically be a digital audio signal processor.
[0085] Furthermore, to send the microphone input pin identifier to the digital signal processor 102, the microphone input pin identifier is encapsulated into an APR message and sent to the digital signal processor 102. Upon receiving the APR message, the digital signal processor 102 parses the APR message to obtain the microphone input pin identifier. Further, based on the fact that the sound signal picked up by the microphone is stored in the corresponding storage space via the microphone input pin connected to the corresponding channel, the storage space of the audio signal picked up by the microphone corresponding to that microphone input pin identifier can be determined according to the microphone input pin identifier. Even further, the audio data stored in the aforementioned storage space is corrected. In one example, if the microphone to be phase corrected is a microphone whose phase needs to be adjusted by 180°, the audio data 'data' in the aforementioned storage space is corrected to 0-'data'.
[0086] Based on the above, the audio signal phase correction system 100 provided by this invention can perform phase correction of the audio signal picked up by the microphone. Specifically, the application processor 101 transmits the microphone input pin identifier corresponding to the microphone to be phase corrected to the digital signal processor 102, and the digital signal processor 102 corrects the audio signal of the microphone to be phase corrected based on the microphone input pin identifier. This avoids the problem of not being able to perform phase correction due to the inability to obtain the audio signal of a single microphone, thus avoiding the limitation of recording scenarios and covering all recording scenarios. This avoids the problem of only being able to perform audio correction in the specific recording scenario where the correction algorithm for a specific recording scenario is integrated into the digital signal processor 102. Furthermore, the phase correction is performed automatically without interfering with the microphone's recording process, making it imperceptible to the user. Finally, by correcting the audio signal in the storage space where the audio signal of the microphone to be phase corrected is located, the computational power and power consumption are low.
[0087] This invention provides an audio signal phase correction system, comprising: an application processor, configured to, for any microphone to be phase corrected, acquire the microphone identifier of the microphone to be phase corrected, determine the microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and send the microphone input pin identifier to a digital signal processor (DSP). The preset mapping relationship reflects the correspondence between the microphone identifier and the corresponding microphone input pin identifier. A DSP, configured to acquire the microphone input pin identifier from the application processor, determine the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and correct the audio signal in the storage space. This audio signal phase correction system can complete the phase correction of the audio signal picked up by the microphone. Specifically, the application processor transmits the microphone input pin identifier corresponding to the microphone to be phase corrected to the DSP, and the DSP corrects the audio signal of the microphone to be phase corrected based on the microphone input pin identifier. This avoids performing phase correction in the application processor's HAL layer, KERNEL layer, or codec driver, thus avoiding the problem of being unable to perform phase correction due to the inability to obtain the audio signal of a single microphone. On the other hand, it can operate independently of the limitations of any recording scenario, covering all recording scenarios. This avoids the problem of integrating correction algorithms for specific recording scenarios into a digital signal processor, which limits audio correction to the specific recording scenario in which the algorithm is loaded. Furthermore, it automatically performs phase correction without interfering with the microphone's recording process, making it imperceptible to the user. Finally, by correcting the audio signal stored in the microphone's audio signal storage space, it requires minimal additional computing power and consumes minimal power.
[0088] In one embodiment of the present invention, in order to accurately correct the audio phase of the microphone to be phase corrected, the phase correction parameters corresponding to the audio signal of the microphone to be phase corrected can be determined in advance based on acoustic experiments. The phase correction parameters include the phase correction direction and the phase correction amplitude. Based on this, the application processor 101 is further configured to execute the following step S41.
[0089] Step S41: Obtain the phase correction parameters of the microphone to be phase corrected, and send the phase correction parameters to the digital signal processor 102.
[0090] Corresponding to step S41 above, the digital signal processor 102 is specifically used to correct the audio signal in the storage space according to step S42 below.
[0091] Step S42: Correct the audio signal in the storage space according to the phase correction parameters.
[0092] It should be noted that the method by which the application processor 101 obtains the phase correction parameters of the microphone in step S41 above can be the same as the method by which the application processor obtains the microphone identifier, and the method by which the phase correction parameters are sent to the digital signal processor 102 can be the same as the method by which the application processor sends the microphone input pin identifier to the digital signal processor 102. Further details will not be provided here.
[0093] Based on the above, in one embodiment of the present invention, an audio signal phase correction system 100 is provided, as shown in FIG3. The application processor 101 includes a phase correction indication module 1011, a kcontrol node configuration module 1012, a microphone identifier and channel identifier mapping module 1013, a channel identifier and microphone input pin identifier mapping module 1014, and an APR message sending module 1015. The phase correction indication module 1011 and the kcontrol node configuration module 1012 are implemented through a HAL layer, while the microphone identifier and channel identifier mapping module 1013, the channel identifier and microphone input pin identifier mapping module 1014, and the APR message sending module 1015 are implemented through a KERNEL layer. The digital signal processor 102 includes an APR message receiving module 1021 and a phase correction module 1022.
[0094] Specifically, the phase correction indicator module 1011 is used to obtain the microphone identifier of the microphone to be phase corrected, and write the microphone identifier of the microphone to be phase corrected and the phase correction identifier into the phase correction configuration file.
[0095] The kcontrol node configuration module 1012 is used to read the phase correction configuration file to obtain the microphone identifier and correction identifier of the microphone to be phase corrected, encapsulate the microphone identifier and phase correction identifier of the microphone to be phase corrected into a kcontrol node, and pass the aforementioned kcontrol node to the KERNEL layer through the ioctl system.
[0096] The microphone identifier and channel identifier mapping module 1013 is used to determine the channel identifier corresponding to the microphone identifier based on the microphone identifier;
[0097] The channel identifier and microphone input pin identifier mapping module 1014 is used to determine the microphone input pin identifier based on the channel identifier;
[0098] The APR message sending module 1015 is used to encapsulate the microphone input pin identifier into an APR message and send the APR message to the digital signal processor 102;
[0099] The APR message receiving module 1021 is used to receive the APR message sent by the APR message sending module 1015, parse the APR message, and obtain the microphone input pin identifier.
[0100] The phase correction module 1022 is used to determine the storage space of the audio signal picked up by the microphone corresponding to the microphone input pin according to the microphone input pin identifier, and to correct the audio data stored in the aforementioned storage space.
[0101] The present invention also provides a phase correction method for audio signals, as shown in Figure 4, which includes the following steps S410 and S420.
[0102] Step S410: For any microphone to be phase corrected, the application processor obtains the microphone identifier of the microphone to be phase corrected, determines the microphone input pin identifier according to the microphone identifier and the preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor. The preset mapping relationship is used to reflect the correspondence between the microphone identifier and the corresponding microphone input pin identifier.
[0103] In step S420, the digital signal processor obtains the microphone input pin identifier from the application processor, determines the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and corrects the audio signal in the storage space.
[0104] In one embodiment of the present invention, the step S410 above, which involves determining the microphone input pin identifier based on the microphone identifier, includes the following steps S411 and S412.
[0105] Step S411: Determine the channel identifier corresponding to the microphone identifier based on the microphone identifier and the first preset mapping relationship;
[0106] Step S412: Determine the microphone input pin identifier based on the channel identifier and the second preset mapping relationship;
[0107] The preset mapping relationship includes a first preset mapping sub-relationship and a second preset mapping sub-relationship. The first preset mapping sub-relationship is used to reflect the correspondence between the microphone identifier and the corresponding channel identifier, and the second preset mapping relationship is used to reflect the correspondence between the channel identifier and the microphone input pin identifier.
[0108] In one embodiment of the present invention, the phase correction method for audio signals provided by the present invention further includes the following step S430.
[0109] Step S430: The application processor obtains the phase correction parameters of the microphone to be phase corrected, and sends the phase correction parameters to the digital signal processor.
[0110] In this embodiment, the correction of the audio signal in the storage space in step S420 is specifically implemented through step S421 below.
[0111] Step S421: The digital signal processor corrects the audio signal stored in the storage space according to the phase correction parameter.
[0112] In one embodiment of the present invention, the acquisition of the microphone identifier of the microphone to be phase corrected in step S410 is achieved by the following steps S413 and S414.
[0113] Step S413: Receive input operation on the display interface for the microphone identifier of the microphone to be phase corrected;
[0114] Step S414: In response to the input operation, determine the microphone identifier of the microphone to be phase corrected.
[0115] In one embodiment of the present invention, step S410 is specifically implemented by step S415.
[0116] In step S415, the hardware abstraction layer deployed in the application processor obtains the microphone identifier of any microphone to be phase corrected, and the kernel layer deployed in the application processor determines the microphone input pin identifier according to the microphone identifier and a preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor.
[0117] In one embodiment of the present invention, the above step S415 is specifically implemented by the following step S4151.
[0118] In step S4151, the hardware abstraction layer deployed in the application processor reads the phase correction configuration file, obtains the microphone identifier and phase correction identifier of the microphone to be phase corrected, encapsulates the microphone identifier and the phase correction identifier of the microphone to be phase corrected into a kcontrol node, and transmits the kcontrol node to the kernel layer deployed in the application processor through the ioctl system. The phase correction identifier is used to instruct the application processor to determine the microphone input pin identifier based on the microphone identifier in the kernel layer, and sends the microphone input pin identifier to the digital signal processor.
[0119] The kernel layer deployed in the application processor calls the put function registered by the kcontrol node to obtain the microphone identifier and phase correction identifier of the microphone to be phase corrected encapsulated in the kcontrol node. Under the indication of the phase correction identifier, the microphone input pin identifier is determined according to the microphone identifier and the preset mapping relationship, and the microphone input pin identifier is sent to the digital signal processor.
[0120] The present invention also provides an electronic device comprising the phase correction system 100 for audio signals provided in any of the above embodiments.
[0121] Alternatively, as shown in FIG5, the electronic device 500 includes a memory 510 and a processor 520, the memory 510 for storing computer instructions, and the processor 520 for calling the computer instructions from the memory 510 to execute any of the audio signal phase correction methods provided in the above method embodiments.
[0122] In the above embodiments, the processor 520 includes an application processor and a digital signal processor.
[0123] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a phase correction method for any of the audio signals provided in the above-described method embodiments.
[0124] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0125] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0126] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0127] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0128] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0129] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0130] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0132] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0133] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, television, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0134] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.
Claims
1. A phase correction system for an audio signal, characterized in that, include: An application processor is configured to, for any microphone to be phase corrected, obtain the microphone identifier of the microphone to be phase corrected, determine the microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and send the microphone input pin identifier to a digital signal processor. The preset mapping relationship is used to reflect the correspondence between the microphone identifier and the corresponding microphone input pin identifier. The digital signal processor is configured to obtain the microphone input pin identifier from the application processor, determine the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and correct the audio signal in the storage space.
2. The system according to claim 1, characterized in that, The application processor is specifically used for: Based on the microphone identifier and the first preset mapping relationship, determine the channel identifier corresponding to the microphone identifier; The microphone input pin identifier is determined based on the channel identifier and the second preset mapping relationship; The preset mapping relationship includes a first preset mapping sub-relationship and a second preset mapping sub-relationship. The first preset mapping sub-relationship is used to reflect the correspondence between the microphone identifier and the corresponding channel identifier, and the second preset mapping relationship is used to reflect the correspondence between the channel identifier and the microphone input pin identifier.
3. The system according to claim 1, characterized in that, The application processor is also used to acquire phase correction parameters of the microphone to be phase corrected, and to send the phase correction parameters to the digital signal processor. The digital signal processor is specifically used to correct the audio signal in the storage space according to the phase correction parameters.
4. The system according to claim 1, characterized in that, The application processor is specifically used for: Receive input from the microphone identifier of the microphone to be phase corrected in the display interface; In response to the input operation, the microphone identifier of the microphone to be phase corrected is determined.
5. The system according to claim 1, characterized in that, The application processor is specifically configured to, for any microphone to be phase-corrected, obtain the microphone identifier of the microphone in the hardware abstraction layer deployed in the application processor, and determine the microphone input pin identifier according to the microphone identifier and a preset mapping relationship in the kernel layer deployed in the application processor, and send the microphone input pin identifier to the digital signal processor.
6. The system according to claim 5, characterized in that, The application processor is specifically used for: The hardware abstraction layer deployed in the application processor reads the phase correction configuration file, obtains the microphone identifier and phase correction identifier of the microphone to be phase corrected, encapsulates the microphone identifier and the phase correction identifier of the microphone to be phase corrected into a kcontrol node, and passes the kcontrol node to the kernel layer deployed in the application processor through the ioctl system. The phase correction identifier is used to instruct the application processor to determine the microphone input pin identifier based on the microphone identifier in the kernel layer, and sends the microphone input pin identifier to the digital signal processor. The kernel layer deployed in the application processor calls the put function registered by the kcontrol node to obtain the microphone identifier and phase correction identifier of the microphone to be phase corrected encapsulated in the kcontrol node. Under the indication of the phase correction identifier, the microphone input pin identifier is determined according to the microphone identifier and the preset mapping relationship, and the microphone input pin identifier is sent to the digital signal processor.
7. A phase correction method for an audio signal, characterized in that, include: For any microphone to be phase corrected, the application processor obtains the microphone identifier of the microphone to be phase corrected, determines the microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor. The preset mapping relationship is used to reflect the correspondence between the microphone identifier and the corresponding microphone input pin identifier. The digital signal processor obtains the microphone input pin identifier from the application processor, determines the storage space where the audio signal picked up by the microphone corresponding to the microphone input pin identifier is located, and corrects the audio signal in the storage space.
8. The method according to claim 7, characterized in that, Determining the microphone input pin identifier based on the microphone identifier includes: Based on the microphone identifier and the first preset mapping relationship, determine the channel identifier corresponding to the microphone identifier; The microphone input pin identifier is determined based on the channel identifier and the second preset mapping relationship; The preset mapping relationship includes a first preset mapping sub-relationship and a second preset mapping sub-relationship. The first preset mapping sub-relationship is used to reflect the correspondence between the microphone identifier and the corresponding channel identifier, and the second preset mapping relationship is used to reflect the correspondence between the channel identifier and the microphone input pin identifier.
9. The method according to claim 8, characterized in that, The method further includes: The application processor acquires the phase correction parameters of the microphone to be phase corrected, and sends the phase correction parameters to the digital signal processor. The digital signal processor corrects the stored audio signal in the storage space according to the phase correction parameter.
10. The method according to claim 7, characterized in that, The step of acquiring the microphone identifier of the microphone to be phase corrected includes: Receive input from the microphone identifier of the microphone to be phase corrected in the display interface; In response to the input operation, the microphone identifier of the microphone to be phase corrected is determined.
11. The method according to claim 7, characterized in that, For any microphone requiring phase correction, the application processor acquires the microphone identifier of the microphone, determines the microphone input pin identifier based on the microphone identifier, and sends the microphone input pin identifier to the digital signal processor, including: For any microphone to be phase-corrected, the hardware abstraction layer deployed in the application processor obtains the microphone identifier of the microphone to be phase-corrected, and the kernel layer deployed in the application processor determines the microphone input pin identifier according to the microphone identifier and a preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor.
12. The method according to claim 11, characterized in that, The hardware abstraction layer deployed in the application processor acquires the microphone identifier of any microphone to be phase corrected, and the kernel layer deployed in the application processor determines the microphone input pin identifier based on the microphone identifier and a preset mapping relationship, and sends the microphone input pin identifier to the digital signal processor, including: The hardware abstraction layer deployed in the application processor reads the phase correction configuration file, obtains the microphone identifier and phase correction identifier of the microphone to be phase corrected, encapsulates the microphone identifier and the phase correction identifier of the microphone to be phase corrected into a kcontrol node, and passes the kcontrol node to the kernel layer deployed in the application processor through the ioctl system. The phase correction identifier is used to instruct the application processor to determine the microphone input pin identifier based on the microphone identifier in the kernel layer, and sends the microphone input pin identifier to the digital signal processor. The kernel layer deployed in the application processor calls the put function registered by the kcontrol node to obtain the microphone identifier and phase correction identifier of the microphone to be phase corrected encapsulated in the kcontrol node. Under the indication of the phase correction identifier, the microphone input pin identifier is determined according to the microphone identifier and the preset mapping relationship, and the microphone input pin identifier is sent to the digital signal processor.
13. An electronic device, characterized in that, The electronic device includes the phase correction system for audio signals as described in any one of claims 1-6; or, The electronic device includes a memory and a processor, the memory being used to store computer instructions, and the processor being used to retrieve the computer instructions from the memory to perform the method as described in any one of claims 7-12.
14. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method according to any one of claims 7-12.