CN107360495B - Method for reducing plugging noise of external microphone suitable for android system - Google Patents
Method for reducing plugging noise of external microphone suitable for android system Download PDFInfo
- Publication number
- CN107360495B CN107360495B CN201610304843.XA CN201610304843A CN107360495B CN 107360495 B CN107360495 B CN 107360495B CN 201610304843 A CN201610304843 A CN 201610304843A CN 107360495 B CN107360495 B CN 107360495B
- Authority
- CN
- China
- Prior art keywords
- external microphone
- audio data
- noise
- driver
- microphone
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2410/00—Microphones
- H04R2410/01—Noise reduction using microphones having different directional characteristics
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Soundproofing, Sound Blocking, And Sound Damping (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
A method for reducing plugging noise of an external microphone suitable for an android system is disclosed, wherein the android system is installed on an intelligent device with a built-in microphone. The method comprises the following steps: the driver of the intelligent device transmits the audio data to the buffer area, wherein when the external microphone is not connected with the intelligent device, the audio data comes from the built-in microphone, and otherwise, the audio data comes from the external microphone; judging whether an interrupt signal generated by inserting or removing an external microphone into or from the intelligent device is received by a driving program of the intelligent device; and when the driver receives the interrupt signal, the driver transmits the audio data stored in the buffer area to the sound filter, the audio data comprises plug noise generated when the external microphone is plugged in or unplugged, and the sound filter reduces the sound intensity of the plug noise in the audio data.
Description
Technical Field
The present invention relates to a method for reducing noise, and more particularly, to a method for reducing noise generated by plugging and unplugging an external microphone in an android system.
Background
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a recording control and management in a conventional Android system architecture. Devices that install android systems may be referred to as smart devices (smart devices), such as smart handheld devices. Common smart handheld devices include smart phones and tablet computers. The android system is constructed by a framework Layer (framework)100, a Hardware Abstraction Layer (HAL) 200, and a core Layer (Kernel) 300. When applied to sound recording, the source of the audio data AU may be a built-in microphone or an external microphone. When the driver (driver)31 detects the interrupt signal (interrupt) INT inserted by the external microphone, the driver 31 notifies the system (the driver 31 notifies the audio hardware abstraction layer (audio HAL)21, and then the audio hardware abstraction layer 21 notifies the audio manager 11) that the external microphone is inserted. In the opposite case, when the external microphone is pulled out, the driver 31 also receives the interrupt signal INT, and the driver 31 also notifies the system.
When the external microphone is plugged, the system can still continuously record, and the plugging of the external microphone can generate noise, so that the noise of the plugging of the external microphone can be recorded in the recording process. That is, when listening to the recorded content, the user hears an obvious external microphone plugging noise.
Disclosure of Invention
The embodiment of the invention provides a method for reducing plugging and unplugging noise of an external microphone, which is suitable for an android system, so that the noise generated when the external microphone is plugged and unplugged can be inhibited.
The embodiment of the invention provides a method for reducing plugging noise of an external microphone, which is suitable for an android system. Firstly, the driver of the intelligent device transmits audio data to the buffer area, wherein the audio data come from the built-in microphone when the external microphone is not connected with the intelligent device, and the audio data come from the external microphone when the external microphone is connected with the intelligent device. Then, the driver of the intelligent device determines whether an interrupt signal is received, wherein the interrupt signal is generated when the intelligent device is plugged into or unplugged from the external microphone. When the driver receives the interrupt signal, the driver transmits the audio data stored in the buffer area to the sound filter, wherein the audio data comprises plug-in noise generated when the external microphone is plugged in or unplugged, and the sound filter reduces the sound intensity of the plug-in noise in the audio data.
In summary, the embodiments of the present invention provide a method for reducing plug noise of an external microphone for an android system, in which a user uses a sound filter to suppress plug noise generated when inserting or removing the external microphone during recording using the android system, so that audio content is not affected by the plug noise of the external microphone. In addition, by using the method for reducing the plugging noise of the external microphone, the user can be prevented from generating uncomfortable feeling due to the plugging noise of the external microphone when hearing the replayed recording.
For a better understanding of the nature and technical content of the present invention, reference should be made to the following detailed description of the invention, taken in conjunction with the accompanying drawings, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
Drawings
Fig. 1 is a schematic diagram of controlling and managing recording by a conventional android system architecture.
Fig. 2 is a schematic diagram of the application of the android system architecture to control and manage recording in the embodiment of the present invention.
Fig. 3 is a schematic diagram of an intelligent device and an external microphone according to an embodiment of the present invention.
Fig. 4 is a flowchart of a method for reducing plugging noise of an external microphone, which is suitable for an android system and provided by the embodiment of the present invention.
Fig. 5 is a waveform diagram of the insertion/extraction noise and the filtered insertion/extraction noise shown in the audio data according to the embodiment of the present invention.
Description of reference numerals:
100: frame layer
11: audio manager
200: hardware abstraction layer
21: audio hardware abstraction layer
300: core layer
31: driver program
311: sound filter
AU: audio data
And SS: control command
4: intelligent device
5: external microphone
INT: interrupt signal
S110, S120, S130, S140: flow of steps
Detailed Description
[ embodiment of method for reducing plug noise of external microphone for android System ]
Referring to fig. 2, fig. 2 is a schematic view of an application of an android system architecture to control and manage recording according to an embodiment of the present invention. Android system installation is in intelligent device, intelligent device has built-in microphone, and external microphone is used for detachable connection intelligent device. The smart device is, for example, a smart handheld device, such as a smart phone or a tablet computer, but the invention is not limited thereto. Referring to fig. 3, fig. 3 is a schematic diagram of an intelligent device and an external microphone according to an embodiment of the present invention. When the method for reducing plugging noise of the external microphone, which is applicable to the android system, is applied to the intelligent device 4 using the android system, the intelligent device 4 is an intelligent handheld device, such as a smart phone. The external microphone 5 is, for example, an earphone microphone (ear microphone), but the present invention is not limited thereto. The invention also does not limit the type of the external microphone.
The android system includes a framework layer (framework)100, a Hardware Abstraction Layer (HAL) 200, and a core layer (Kernel) 300. For the recording function, the framework layer 100 has an audio manager 11, the hardware abstraction layer 200 has an audio hardware abstraction layer 21, and the core layer 300 has a driver 31. The driver 31 has a sound filter 311. The driver 31 in the core layer 300 receives the audio data AU from each microphone device, and the source of the audio data AU is determined according to the microphone device to be switched. The microphone device includes a built-in microphone and an external microphone 5, the built-in microphone of the smart device 4 is not shown in fig. 3 because the built-in microphone is usually of a hidden design. The plugging and unplugging of the external microphone 5 can change the electrical state of the audio connection terminal, and the electrical state of the audio connection terminal is different between the plugging and unplugging of the external microphone 5. The audio connection terminal is electrically connected to the driver 31, so that the driver 31 obtains the interrupt signal INT, and the driver 31 can know whether the external microphone 5 is plugged in or unplugged according to the content of the interrupt signal. Driver 31 can notify the system of the audio device change according to the interrupt signal INT, and when driver 31 receives the interrupt signal INT, driver 31 notifies (via audio hardware abstraction layer 21) audio manager 11 located in framework layer 10 of the android system that the audio path needs to be switched (or has been switched). The driver 31 passes the audio data AU to the audio hardware abstraction layer 21 at the hardware abstraction layer 200 and then to the audio manager 11 at the framework layer 100. In addition, when the driver 31 determines that the smart device 4 has been plugged into or unplugged from the external microphone 5, the driver 31 may notify the audio manager 11 of the change of the audio device, and the driver 31 may also switch the audio path according to the control command SS from the audio hardware abstraction layer 21. The audio manager 11 sends a control command SS to the audio hardware abstraction layer 21, and then to the driver 31 to control the driver 31 to switch the audio path. In brief, the audio manager 11 can control the driver 31 to switch the audio path via the audio hardware abstraction layer 21, and receive and record the audio data AU communicated via the audio path.
Referring to fig. 2 and fig. 4, fig. 4 is a flowchart of a method for reducing plugging noise of an external microphone, which is suitable for an android system according to an embodiment of the present invention. The method for reducing the plugging noise of the external microphone suitable for the android system comprises the following steps. During recording, the driver 31 of the smart device 4 continuously transfers the audio data AU to the buffer (buffer) (step S110), wherein the audio data AU is from the built-in microphone when the external microphone 5 is not connected to the smart device 4, and the audio data AU is from the external microphone 5 by switching the driver 31 when the external microphone 5 is connected to the smart device 4. The buffer is used to temporarily store the audio data AU, and the size of the buffer is determined according to the design of the intelligent device 4. The buffer may be implemented by using a data storage element, and may be considered as a part of the system memory in the android system, however, the implementation of the buffer is not limited by the present invention. In practical applications, the driver 31 transfers the audio data in the buffer to the upper layer of the system (e.g. the audio manager 11) and stores the audio data whenever the buffer is full, and then the buffer can be emptied, and then the buffer can continue to store new audio data AU, but the present invention is not limited to the buffer.
Then, in step S120, the driver 31 of the smart device 4 determines whether an interrupt signal INT is received, wherein the interrupt signal INT is generated by inserting or removing the external microphone 5 into or from the smart device 4. When the driver 31 does not receive the interrupt signal INT, the driver 31 transmits the audio data AU to the system (step S140), where the audio data AU does not include a plug noise generated when the external microphone is plugged in or unplugged. In detail, in step S140, the driver transfers the audio data AU stored in the buffer to the audio manager 11 located in the framework layer 100 of the android system (via the audio hardware abstraction layer 21), so that the system can record audio. After step S140 is completed, the process returns to step S110.
When the driver 31 receives the interrupt signal INT, step S130 is performed, in which the driver 31 transmits the audio data AU stored in the buffer to the sound filter 311, the audio data AU includes a plug-in noise generated when the external microphone is plugged in or unplugged, and the sound filter 311 reduces the sound intensity of the plug-in noise in the audio data AU. In the present embodiment, the sound filter 311 is disposed in the driver 31, but the present invention is not limited thereto. The sound filter 311 and the driver 31 may be provided separately (independently of each other). The sound filter 311 reduces the sound intensity of the plug-in noise in the audio data AU, and may reduce the volume and mute through audio data processing, or filter the noise, and the embodiment of the invention adjusts the volume through data displacement, mutes through setting a value to zero, or filters the noise through a special algorithm, but the invention is not limited thereto.
Further, referring to fig. 5, fig. 5 is a signal waveform diagram showing the plugging noise and the filtered plugging noise in the audio data according to the embodiment of the present invention, wherein a portion of the signal with sudden fluctuation represents noise generated when the external microphone 5 is plugged or noise generated when the external microphone 5 is unplugged. After the processing of the acoustic filter 311, the insertion/extraction noise is significantly suppressed. During the recording process, the following two situations are included according to the plugging or unplugging actions of the external microphone. The first case is that the external microphone 5 is originally plugged into the smart device 4, and then the external microphone 5 is unplugged. In this case, the driver 31 receives the audio data (AU) from the external microphone 5 before the external microphone 5 is removed and stores the audio data (AU) in the buffer, and receives the removal noise when the external microphone 5 is removed, and receives the audio data (AU) from the internal microphone after the external microphone 5 is removed. That is, when the driver 31 receives the interrupt signal INT, the audio data (AU) stored in the buffer already includes the audio data obtained by the external microphone 5 before the external microphone 5 is unplugged, and then when the driver 31 receives the interrupt signal INT, the buffer continues to store the audio data (AU), so that the buffer stores the noise generated when the external microphone 5 is unplugged. Then, the buffer continues to store audio data (AU) which is then the sound obtained by the built-in microphone after the external microphone 5 is removed. The sound filter 311 is designed to distinguish noise (e.g., a portion where a signal suddenly fluctuates in fig. 5) generated when the external microphone 5 is removed from sound obtained by the external microphone 5 and the internal microphone in the audio data (AU), and suppress the noise generated when the external microphone 5 is removed.
In another case, in the recording process, if the external microphone 5 is not originally plugged into the smart device 4, then the external microphone 5 is plugged into the smart device 4. In this case, the driver 31 receives the audio data (AU) from the internal microphone before the external microphone 5 is plugged, stores the audio data (AU) in the buffer, receives the plugging noise when the external microphone 5 is plugged, and receives the audio data (AU) from the external microphone 5 after the external microphone 5 is plugged into the smart device 4. When the driver 31 receives the interrupt signal INT, the audio data stored in the buffer already includes the audio data (AU) obtained by the internal microphone before the external microphone 5 is plugged, and then when the driver 31 receives the interrupt signal INT, the buffer continues to store the audio data (AU), thereby receiving the noise generated when the external microphone 5 is plugged. Then, the buffer continues to store the audio data (AU), and the audio data (AU) thereafter is the sound obtained by the external microphone 5. The sound filter 311 is designed to distinguish noise generated when the external microphone 5 is plugged in from sound obtained by the external microphone 5 and the built-in microphone in the audio data (AU), and suppress noise generated when the external microphone 5 is plugged in.
According to the above two cases, the audio data AU to be processed by the audio filter 311 has not only the insertion/extraction noise but also the sound obtained by the internal/external microphone before the external microphone is inserted/extracted and the sound obtained by the external/internal microphone after the external microphone is inserted/extracted. According to the operating speed (or performance) of the driver 31 and the time length of the plugging noise, a buffer with a proper size can be designed, so that when the driver 31 receives the interrupt signal INT, the driver 31 can transmit the audio data (AU) (with the plugging noise) currently stored in the buffer to the audio filter in real time to suppress the plugging noise.
The manner of reducing the sound intensity of the plug noise in the audio data AU by the sound filter 311 is variously selected, and at least, as described below, but the present invention is not limited thereto. In one embodiment, the acoustic filter 311 can filter out plug noise. For example, the signal of the noise section is changed to zero (no signal), but the invention is not limited thereto. In another embodiment, the sound filter 311 may adjust the gain of the audio data with plug noise, for example, adjust the overall gain of the audio data with plug noise from the buffer, and reduce the overall gain of the audio data, so that all sounds in the vicinity of the plug noise are reduced.
After step S130 is finished, step S140 is performed, and the driver 31 transmits the audio data AU to the upper layer of the system, where the audio data AU is processed by the filter to suppress the insertion/extraction noise. Since the size of the buffer is limited, the buffer can only store a part of the audio data each time, so that the system can obtain all the audio data in the recording process, after the above step 140 is finished, the process can return to the step S110 for the next cycle.
[ possible technical effects of the embodiment ]
In summary, in the method for reducing the plugging noise of the external microphone applicable to the android system provided by the embodiments of the present invention, when the user uses the android system to perform recording, the sound filter is used to suppress the noise generated when the external microphone is plugged or unplugged, so that the audio content is not affected by the noise generated when the external microphone is plugged or unplugged by the device for switching recording. In addition, by using the method for reducing the plugging noise of the external microphone, because the noise generated by plugging the external microphone in the recorded content is inhibited, the uncomfortable feeling caused by the plugging noise of the external microphone when the user hears the replayed recording can be avoided.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention.
Claims (10)
1. The utility model provides a method for reducing external microphone plug noise suitable for tall and erect system of ann, this tall and erect system mount in an intelligent device, this intelligent device has a built-in microphone, and an external microphone is used for detachable connection this intelligent device, its characterized in that, this method includes:
in a recording process of the intelligent device, a driving program of the intelligent device transmits audio data to a buffer area, wherein when the external microphone is not connected with the intelligent device, the audio data comes from the built-in microphone, and when the external microphone is connected with the intelligent device, the audio data comes from the external microphone;
the driver of the intelligent device judges whether an interrupt signal is received, wherein the interrupt signal is generated by inserting or removing the external microphone into or from the intelligent device; and
when the driver receives the interrupt signal, the driver transmits the audio data stored in the buffer area to a sound filter, the audio data includes a plug noise generated when the external microphone is plugged in or unplugged, and the plug noise is generated when the external microphone is plugged in or unplugged
The sound filter reduces the sound intensity of the plugging noise in the audio data; and
after the driver receives the interrupt signal, an audio path of the audio data is switched from the internal microphone to the external microphone or from the external microphone to the internal microphone;
the size of the buffer area is designed according to the operation speed, the efficiency and the time length of the plugging noise of the driver program, so that when the driver program receives the interrupt signal, the driver program can transmit the audio data to the sound filter in real time.
2. The method of claim 1, wherein the driver is located in a core layer of the android system.
3. The method for reducing plugging noise of an external microphone according to claim 1, wherein said sound filter is in said driver.
4. The method for reducing plug noise of an external microphone according to claim 1, wherein in the step of reducing the sound intensity of the plug noise in the audio data by the sound filter, the sound filter filters the plug noise.
5. The method of claim 1, wherein in the step of the acoustic filter reducing the sound intensity of the plug noise in the audio data, the acoustic filter adjusts the gain of the audio data with the plug noise.
6. The method for reducing plugging noise of an external microphone suitable for use in an android system of claim 1, further comprising:
when the driver receives the interrupt signal, the driver notifies an audio manager located in a framework layer of the android system.
7. The method for reducing plugging noise of an external microphone applicable to an android system of claim 1, wherein after the step of the sound filter reducing the sound intensity of the plugging noise in the audio data, further comprising:
the driver transmits the audio data to an audio manager located in a framework layer of the android system.
8. The method of claim 1, wherein the audio data further comprises sound obtained by the external microphone before insertion and sound obtained by the external microphone after insertion.
9. The method of claim 1, wherein the audio data further comprises sounds obtained by the external microphone before the external microphone is unplugged and sounds obtained by the internal microphone after the external microphone is unplugged.
10. The method for reducing plugging noise of an external microphone suitable for use in an android system of claim 1, wherein the external microphone is an earphone microphone.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610304843.XA CN107360495B (en) | 2016-05-10 | 2016-05-10 | Method for reducing plugging noise of external microphone suitable for android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610304843.XA CN107360495B (en) | 2016-05-10 | 2016-05-10 | Method for reducing plugging noise of external microphone suitable for android system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107360495A CN107360495A (en) | 2017-11-17 |
CN107360495B true CN107360495B (en) | 2020-01-24 |
Family
ID=60272075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610304843.XA Active CN107360495B (en) | 2016-05-10 | 2016-05-10 | Method for reducing plugging noise of external microphone suitable for android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107360495B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110989965A (en) * | 2019-11-29 | 2020-04-10 | 安徽咪鼠科技有限公司 | Voice mouse based recording line switching method, system and device and readable storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101115322A (en) * | 2006-07-28 | 2008-01-30 | 美商富迪科技股份有限公司 | Electronic device with external connection microphone to change radio-receiving mode and radio-receiving method |
CN201302810Y (en) * | 2008-11-28 | 2009-09-02 | 中国华录·松下电子信息有限公司 | Kara OK player capable of adjusting amplitude of output audio frequency |
CN102695116B (en) * | 2012-05-30 | 2015-06-03 | 蒋憧 | Sound acquisition, processing and recurrence method |
CN103513954A (en) * | 2012-08-08 | 2014-01-15 | Tcl集团股份有限公司 | Method and system for realizing support of USB wireless audio equipment |
TWI522902B (en) * | 2013-04-03 | 2016-02-21 | 宏碁股份有限公司 | Electronic device and method for sensing headset |
JP6314977B2 (en) * | 2013-06-07 | 2018-04-25 | ソニー株式会社 | Input device, transmission method, host device, reception method, signal processing system, and transmission / reception method |
CN103686535B (en) * | 2013-12-02 | 2017-11-10 | Tcl集团股份有限公司 | The terminal and recognition methods of automatic identification ear microphone and karaoke equipment |
US9674598B2 (en) * | 2014-04-15 | 2017-06-06 | Fairchild Semiconductor Corporation | Audio accessory communication with active noise cancellation |
KR20160064842A (en) * | 2014-11-28 | 2016-06-08 | 삼성전자주식회사 | Method for confirming a foreign substance in earjack and electronic device thereof |
-
2016
- 2016-05-10 CN CN201610304843.XA patent/CN107360495B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107360495A (en) | 2017-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108509176B (en) | Method and device for playing audio data, storage medium and intelligent terminal | |
JP6742465B2 (en) | Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker | |
WO2017215657A1 (en) | Sound effect processing method, and terminal device | |
KR101874888B1 (en) | Method and apparatus for recognizing earphone in portable device | |
US11201598B2 (en) | Volume adjusting method and mobile terminal | |
CN107566618B (en) | Volume adjusting method and device, terminal equipment and storage medium | |
CN107621933B (en) | Audio playing method and device and related medium product | |
CN105022297B (en) | A kind of sound box parameter collocation method, mobile terminal | |
CN111247781B (en) | Audio circuit and audio playing system based on intelligent terminal | |
CN103324459A (en) | Method and system for implementing USB (universal serial bus) headset devices | |
CN106851488B (en) | Audio output control method, device and circuit | |
CN109672950A (en) | A kind of power-saving circuit and electricity saving method based on Type-C earphone | |
CN107526570A (en) | volume adjusting method, device, terminal device and storage medium | |
CN104113816A (en) | Electronic device and earphone detection method | |
CN110888619A (en) | Digital audio power amplifier synchronization circuit and method and electronic equipment | |
CN107018465A (en) | Suitable for the gapless way of recording of Android system | |
CN110517711A (en) | Playback method, device, storage medium and the electronic equipment of audio | |
CN107360495B (en) | Method for reducing plugging noise of external microphone suitable for android system | |
CN111107226A (en) | Volume control method applied to mobile terminal | |
CN104581515A (en) | Audio playing device and method as well as mobile terminal | |
CN114503529A (en) | Backwards compatibility of audio systems and methods | |
WO2020057656A1 (en) | Method, device and mobile terminal for collecting external sound wave based on sound output element | |
CN107479851B (en) | Volume adjusting method, device, terminal device and storage medium | |
CN103544958A (en) | Method and device for controlling voice-frequency howling during switching of voice-frequency output | |
CN105472128A (en) | Call control method and call control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |