CN108366160B - Audio testing method, mobile terminal and computer readable storage medium - Google Patents

Audio testing method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN108366160B
CN108366160B CN201810076020.5A CN201810076020A CN108366160B CN 108366160 B CN108366160 B CN 108366160B CN 201810076020 A CN201810076020 A CN 201810076020A CN 108366160 B CN108366160 B CN 108366160B
Authority
CN
China
Prior art keywords
audio
test
path
sound source
mobile terminal
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
Application number
CN201810076020.5A
Other languages
Chinese (zh)
Other versions
CN108366160A (en
Inventor
曹夏波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201810076020.5A priority Critical patent/CN108366160B/en
Publication of CN108366160A publication Critical patent/CN108366160A/en
Application granted granted Critical
Publication of CN108366160B publication Critical patent/CN108366160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing

Abstract

The invention discloses an audio testing method, a mobile terminal and a computer readable storage medium, wherein the audio testing method comprises the following steps: when an audio test instruction is detected, acquiring an attribute value from the audio test instruction; determining an audio test channel according to the attribute value; acquiring an audio device corresponding to the audio test channel; the test sound source is used as an input signal of the audio device, the audio device is controlled to work, and the audio signal output by the audio device is transmitted to the audio automatic test equipment, so that the audio automatic test equipment analyzes the performance of the audio device according to the test sound source and the audio signal. Compared with the prior art, the invention adopts the attribute value mode to set the independent audio test channel for each audio device, realizes the flexible setting of the audio test channel for each audio device, and has strong expandability of audio test; meanwhile, an independent audio test channel is arranged for each audio device, and the test result can accurately reflect the performance of the corresponding audio device.

Description

Audio testing method, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to the field of audio testing technologies, and in particular, to an audio testing method, a mobile terminal, and a computer-readable storage medium.
Background
At present, audio tests are already common tests in the production of mobile phone manufacturers, and most of different mobile phone manufacturers adopt different test modes, but the test principle of the audio tests is generally adopted to be a complete machine test. And (4) testing the whole machine, namely playing the audio through the mobile phone, then collecting the audio signal by the audio automatic testing equipment, comparing and analyzing the audio signal with the played original audio signal, and then calibrating the comparison and analysis result with the golden machine calibration standard to obtain a testing result. However, the mobile phone audio device includes a plurality of devices such as a speaker, a receiver, a main microphone, and an auxiliary microphone, and the whole test can only reflect the whole performance of the mobile phone audio device, but cannot accurately reflect the performance of each audio device, and the audio test has poor expandability.
Therefore, it is desirable to provide an audio testing method, a mobile terminal and a computer readable storage medium to solve the above technical problems.
Disclosure of Invention
The invention mainly aims to provide an audio testing method, a mobile terminal and a computer readable storage medium, and aims to solve the technical problems that the performance of each audio device cannot be accurately reflected during the whole machine test and the expandability of the audio test is poor.
First, to achieve the above object, the present invention provides an audio testing method, which includes the following steps:
when an audio test instruction is detected, acquiring an attribute value from the audio test instruction;
determining an audio test channel according to the attribute value;
acquiring an audio device corresponding to the audio test channel;
and taking a test sound source as an input signal of the audio device, controlling the audio device to work, and transmitting an audio signal output by the audio device to audio automatic test equipment so that the audio automatic test equipment analyzes the performance of the audio device according to the test sound source and the audio signal.
Optionally, the step of determining an audio test path according to the attribute value further includes:
acquiring sound effect parameters corresponding to the audio test channel;
and controlling the audio device to work, and simultaneously carrying out corresponding sound effect processing on the test sound source transmitted in the audio test channel according to the sound effect parameters so as to obtain the audio signal after the sound effect processing.
Optionally, the audio device includes an audio input device and an audio output device, and the audio test path includes an audio input device test path and an audio output device test path, where each of the audio test paths corresponds to one of the attribute values.
Optionally, when the audio device is an audio output device, the step of using the test sound source as an input signal of the audio device, controlling the audio device to operate, and transmitting the audio signal output by the audio device to the audio automation test equipment includes:
controlling the mobile terminal to start the audio output device, and taking the test sound source as an input signal of the audio output device;
and starting a standard microphone of the audio automatic test equipment to acquire the audio signal output by the audio output device.
Optionally, when the audio device is an audio input device, the step of using the test sound source as an input signal of the audio device, controlling the audio device to operate, and transmitting the audio signal output by the audio device to the audio automation test equipment includes:
controlling an audio input device to record a test sound source played by the audio automatic test equipment;
and outputting the test sound source collected by the audio input device to the audio automatic test equipment through an earphone channel.
Optionally, the audio input device is a primary microphone or a secondary microphone, the audio output device is a speaker or an earphone, the audio input device test path is a primary microphone test path or a secondary microphone test path, and the audio output device test path is a speaker test path or an earphone test path.
Optionally, before the step of determining the audio test path according to the attribute value, the method further includes:
receiving and storing the corresponding relation between attribute values set by a user and audio test paths, wherein each audio test path corresponds to an audio xml configuration file, and the audio xml configuration file comprises a tinymix path required to be started when the audio test path is opened.
Optionally, the step of controlling the operation of the audio device comprises:
acquiring an audio xml configuration file corresponding to the audio test channel;
and opening a tinymix passage in the audio xml configuration file to realize the control of the operation of the audio device.
Meanwhile, the invention also provides a mobile terminal, which comprises a memory, a processor and an audio test program which is stored on the memory and can be operated on the processor, wherein the audio test program realizes the steps of the audio test method when being executed by the processor.
Furthermore, the present invention also provides a computer readable storage medium having stored thereon an audio test program, which when executed implements the steps of the audio test method as described above.
Compared with the prior art, the audio testing method, the mobile terminal and the computer-readable storage medium provided by the invention, when an audio test instruction is detected, acquiring an attribute value from the audio test instruction, determining an audio test path according to the attribute value, acquiring an audio device corresponding to the audio test path, then the test sound source is used as the input signal of the audio device to control the audio device to work and transmit the audio signal output by the audio device to the audio automatic test equipment, so that the audio automatic test equipment analyzes the performance of the audio device according to the test sound source and the audio signal, because the invention adopts the mode of attribute value to set independent audio frequency testing channel for each audio frequency device, the audio testing channel is flexibly arranged for each audio device, and the audio testing expandability is strong; meanwhile, an independent audio test channel is arranged for each audio device, and the test result can accurately reflect the performance of the corresponding audio device.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an exemplary embodiment of an audio testing method according to the present invention;
FIG. 4 is a flowchart illustrating an exemplary implementation of a second embodiment of an audio testing method according to the present invention;
FIG. 5 is a functional block diagram of an audio test program according to a first embodiment of the present invention;
FIG. 6 is a functional block diagram of an audio test program according to a second embodiment of the present invention;
FIG. 7 is a diagram illustrating an embodiment of an audio testing process performed by the audio automatic testing apparatus on the mobile terminal;
FIG. 8 is a diagram illustrating another embodiment of an audio testing apparatus for audio testing of a mobile terminal.
Reference numerals:
Figure BDA0001559585180000041
Figure BDA0001559585180000051
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles information systems, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber location Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the hardware structure of the mobile terminal 100 and the communication network system, various embodiments of the method of the present invention are provided.
First, the present invention provides an audio testing method, which is applied to the mobile terminal shown in fig. 1 to 2. Fig. 3 is a flowchart illustrating an implementation of the first embodiment of the audio testing method according to the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 3 may be changed and some steps may be omitted according to different requirements. The audio test method comprises the following steps:
step S301, when an audio test instruction is detected, obtaining an attribute value from the audio test instruction.
The audio test on the mobile terminal is usually realized by means of audio automatic test equipment, and a sound card and analysis software are arranged in the audio automatic test equipment. Referring to fig. 7, fig. 7 is a schematic diagram illustrating an embodiment of an audio test performed by an audio automation test device on a mobile terminal, where as shown in fig. 7, when analysis software on the audio automation test device wants to test the performance of an audio device, an audio test instruction needs to be sent to the mobile terminal, and when the mobile terminal detects the audio test instruction, an audio test is performed on the corresponding audio device. The audio device on the mobile terminal generally comprises two types of audio input devices and audio output devices, the audio input devices generally comprise a main microphone and an auxiliary microphone, the audio output devices generally comprise a loudspeaker and an earphone, and the audio test method and the audio test device are used for carrying out audio test, namely testing the performance of the main microphone, the auxiliary microphone, the loudspeaker or the earphone. Compared with the whole machine test in the prior art, the invention can carry out independent performance test on each audio device, therefore, the invention adopts the attribute mode to respectively set the audio test channels for the loudspeaker, the receiver, the main microphone and the auxiliary microphone, and for different audio devices, the audio test channels have different attribute values, namely, the attribute values are used for distinguishing different audio test channels. The audio test path is implemented by a QACT tool, and from the viewpoint of control flow, the audio test path uses an attribute (the attribute is referred to as an attribute value in the present invention) to specify which audio device is to operate or a group of audio devices is to operate, and the audio test path can be regarded as a test channel specially opened for a certain test purpose.
Step S302, determining an audio test path according to the attribute value.
In this embodiment, the audio test path includes four types, namely a main microphone test path, an auxiliary microphone test path, a speaker test path, and a receiver test path, where the main microphone test path and the auxiliary microphone test path are audio input device test paths, and the speaker test path and the receiver test path are audio output device test paths. Of course, if the audio device on the mobile terminal has other audio devices besides the main microphone, the sub-microphone, the speaker and the receiver, the corresponding audio test path can be set for the other audio devices in the same way, that is, the audio test path can be flexibly set for each audio device, and the audio test has strong expandability. Because the attribute values are in one-to-one correspondence with the audio test paths, the audio test paths can be determined according to the acquired attribute values.
Step S303, obtaining an audio device corresponding to the audio test path.
Specifically, the audio test paths and the audio devices have a one-to-one correspondence relationship, such as a main microphone test path, an auxiliary microphone test path, a loudspeaker test path, and a receiver test path, which correspond to the main microphone, the auxiliary microphone, the loudspeaker, and the receiver, respectively.
Step S304, using a test sound source as an input signal of the audio device, controlling the audio device to work, and transmitting an audio signal output by the audio device to audio automatic test equipment, so that the audio automatic test equipment analyzes the performance of the audio device according to the test sound source and the audio signal.
In the invention, after the mobile terminal determines the audio device through the attribute value, the audio device is controlled to work so as to carry out audio test on the audio device. Specifically, when the audio device is an audio output device, that is, the audio test path is an audio output device test path, the step of using the test sound source as the input signal of the audio device, controlling the audio device to operate, and transmitting the audio signal output by the audio device to the audio automation test equipment includes: (1) controlling the mobile terminal to start an audio output device, and taking the test sound source as an input signal of the audio output device; (2) and starting a standard microphone of the audio automatic test equipment to acquire the audio signal output by the audio output device. Using loudspeaker as an example, when carrying out audio test to loudspeaker, mobile terminal control loudspeaker broadcast the test sound source that sets up in advance, and audio frequency automation test equipment receives the audio signal of loudspeaker broadcast through standard microphone simultaneously, then analysis software compares received audio signal and built-in test sound source again to can obtain the distortion factor and the true loudness value of loudspeaker work under current environment, and then can obtain the correlation properties of loudspeaker. Since the receiver and the speaker are both audio output devices, the testing principle is the same, and the testing process of the receiver is not described in detail here. In addition, the test audio played by the loudspeaker or the receiver can be realized by a built-in sound source, and the built-in sound source is also specified by the audio automation equipment. When the audio device is an audio input device, that is, the audio test path is an audio input device test path, the step of using the test sound source as the input signal of the audio device, controlling the audio device to work, and transmitting the audio signal output by the audio device to the audio automatic test equipment includes: (1) controlling an audio input device to record a test sound source played by the audio automatic test equipment; (2) and outputting the test sound source collected by the audio input device to the audio automatic test equipment through an earphone channel. Using main microphone as an example, when carrying out the audio test to main microphone, audio frequency automation test equipment passes through artifical mouth broadcast test sound source, mobile terminal control main microphone records the test sound source of broadcast, then passes through the earphone route to the test sound source of recording and transmits for audio frequency automation test equipment, audio frequency automation test equipment carries out analysis processes to it again to the loudness value and the distortion factor value of acquireing main microphone, and then the performance of analysis main microphone. Similarly, the secondary microphone may be tested for audio frequency, and since the testing principles are the same, the testing process for the secondary microphone is not described in detail here.
Through the steps S301 to S304, when an audio test instruction is detected, the audio test method of the present invention obtains an attribute value from the audio test instruction, determines an audio test channel according to the attribute value, obtains an audio device corresponding to the audio test channel, then uses a test sound source as an input signal of the audio device, controls the audio device to operate, and transmits an audio signal output by the audio device to an audio automation test apparatus, so that the audio automation test apparatus analyzes the performance of the audio device according to the test sound source and the audio signal, because the audio test method of the present invention sets an independent audio test channel for each audio device in a manner of adopting the attribute value, it is realized that an audio test channel is flexibly set for each audio device, and the audio test has strong expandability; meanwhile, an independent audio test channel is arranged for each audio device, and the test result can accurately reflect the performance of the corresponding audio device.
Further, based on the first embodiment described above, a second embodiment of the audio testing method of the present invention is proposed. Fig. 4 is a flowchart illustrating an implementation of the second embodiment of the audio testing method according to the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 4 may be changed and some steps may be omitted according to different requirements. The audio test method comprises the following steps:
step S401, receiving and storing the corresponding relation between the attribute value set by the user and the audio test paths, wherein each audio test path corresponds to an audio xml configuration file, and the audio xml configuration file comprises the tinymix path which needs to be started when the audio test path is opened.
In order to implement the above audio testing method, the present invention needs to design an application layer, a HAL layer, an audio xml configuration file, and acdbID. The application layer is an APP, namely an audio test APP developed by the invention, the audio test APP is installed on the mobile terminal and is used for realizing the audio test method of the invention, a user can set attribute values for each audio device in the audio test APP, and when the audio test APP receives an audio test instruction, an audio test access can be determined according to the attribute values in the audio test instruction.
The audio xml configuration file is specifically a mixer _ paths _ mtp. xml file, and configuration paths with the formats of < path name "" > … </path > are stored in the file, and are a certain combination of the tinymix paths, for example, a plurality of tinymix paths need to be opened when a speaker plays, and a plurality of tinymix paths need to be opened when the speaker plays are stored in the audio xml configuration file. For example, the content of the part in the audio xml configuration file is as follows:
Figure BDA0001559585180000141
the tinymix pathway refers to tinymix RX1MIX1INP1RX1, that is, the < path > in the above document is a set of tinymix switches, which mainly functions to open many necessary tinymix pathways for the audio test pathway. The audio xml configuration file used to define the audio test path in the present invention is as follows:
<path name="speaker-test">…</path>
<path name="receiver-test">…</path>
<path name="mic1-test">…</path>
<path name="mic2-test">…</path>
the audio test path defined by the audio xml configuration file is associated with the HAL layer, and finally mapped to the audio xml configuration file at the HAL layer, so that each path (i.e. audio test path) is validated.
The HAL layer is an audio hardware abstraction layer, the HAL layer can work only by being matched with an audio xml configuration file, the HAL layer corresponds to two services, namely Audio Flanger. cpp and Audio policy service. cpp of an android audio frame, the Audio policy service is not a real device actually, and a manufacturer can conveniently customize an audio policy by adopting a virtual device mode. The task of the abstraction layer is to really associate the audioFlinger/audioPolicyservice with the hardware device, but to ensure that the change of the bottom layer does not affect the upper layer, so the HAL layer is a place where android suggests modification to the mobile phone manufacturer, and other parts of the audio frame are not modified generally. Specifically, when the xml configuration file is associated with the HAL layer, the mapping relationship is illustrated as follows: [ SND _ DEVICE _ OUT _ SPEAKER _ TEST ] - "spaker-TEST", where "spaker-TEST" refers to the < path name ═ spaker-TEST "> … </path > in the audio xml configuration file, and SND _ DEVICE _ OUT _ SPEAKER is the DEVICE sound card setting constant suggested in the android system, through which the HAL layer can be associated with the audio xml configuration file. Similarly, for the audio xml configuration files of other audio test paths, the following mapping relationship is set:
[SND_DEVICE_OUT_RECEIVER_TEST]="receiver-test"
[SND_DEVICE_OUT_MIC1_TEST]="mic1-test"
[SND_DEVICE_OUT_MIC2_TEST]="mic2-test"
in addition, the HAL layer is also associated with the acdbID, and the mapping relationship is as follows:
[SND_DEVICE_OUT_SPEAKER_TEST]="205"
[SND_DEVICE_OUT_RECEIVER_TEST]="204"
[SND_DEVICE_OUT_MIC1_TEST]="202"
[SND_DEVICE_OUT_MIC2_TEST]="201"
wherein 201, 202, 204 and 205 represent the values of acdbID, and different acdbIDs represent different sound effect parameters. In addition, the call logic can be distinguished by attribute values at the HAL layer, for example: when the audio output device is called, the call logic is platform _ get _ output _ snd _ device, and when the audio input device is called, the call logic is platform _ get _ input _ snd _ device. The two calling logics are determined by an Android system frame, the interface cannot be changed, and the calling logics are called certainly when the audio device is used. In order to distinguish the audio test path from the audio working path (i.e. the audio path when the mobile terminal is normally used), the present invention uses an attribute value to specify the path that we need to select, for example: when a loudspeaker TEST is performed, if the attribute value is not specified, a default loudspeaker playing path (audio working path) is selected for playing, and when the attribute value of the attribute debug.
Step S402, when an audio test instruction is detected, obtaining an attribute value from the audio test instruction.
Step S403, determining an audio test channel according to the attribute value, and acquiring an audio device corresponding to the audio test channel and a sound effect parameter corresponding to the audio test channel.
In this embodiment, the setting of the audio test path for each audio device is realized by a QACT tool, and the audio test path can be described from two aspects, that is, from the viewpoint of control flow, an attribute (the attribute corresponds to an attribute value) is used to specify which audio device operates or which group of audio devices operates, and the audio test path can be regarded as a test channel specially opened for a certain test purpose; from the audio effect angle, can distinguish the audio device sound effect parameter of normal use and the user is for during the test sound effect parameter that audio frequency test access set up through adding extra acdbID, also can say that has taken solitary sound effect access for a certain test purpose. It should be noted that, when the audio device is tested in the production process, the sound effect parameters of the audio test channel are set to be null, i.e. no extra sound effect parameters are used to reflect the performance of the audio device more truly, and if the test is developed, sound effect processing can be added according to the requirement, so as to develop whether some indexes of the sound effect which can be tested by using the audio automatic test equipment meet the design requirements of engineers, i.e. to facilitate the flexible debugging of the sound effect parameters by the sound effect engineers, when the audio effect is good, the corresponding sound effect parameters can be applied to the audio working channel used by the user, i.e. the conventional channel, the conventional channel refers to the channel which is added with the sound effect algorithm when the mobile phone is normally used, and is supplied for the user to use, therefore, some uncertain sound effect algorithms can be tested in the audio test channel in advance, and after the optimal sound effect parameters are obtained, the optimal sound effect parameters are added into an audio working channel used by a user.
Step S404, when the audio device is an audio output device, controlling the mobile terminal to start the audio output device, using the test sound source as an input signal of the audio output device, performing corresponding sound effect processing on the test sound source transmitted in the audio test channel according to the sound effect parameters, and starting a standard microphone of the audio automatic test equipment to collect an audio signal output by the audio output device, so that the audio automatic test equipment analyzes the performance of the audio device according to the test sound source and the audio signal.
In this embodiment, an audio test in the research and development process is taken as an example, and after a user sets a sound effect parameter for an audio test channel and acquires the sound effect parameter, the corresponding sound effect processing is performed on a test sound source transmitted in the audio test channel according to the sound effect parameter in the audio test process, so as to obtain an audio signal after the sound effect processing. Specifically, sound effect means that an additional algorithm is added when the audio device works: such as echo cancellation, noise reduction, etc., the addition of sound effect to the audio device is mainly to add an additional optimization algorithm, so that the sound quality displayed by the audio device is more consistent with the characteristics of human ears, and the sound is more comfortable and clear. Further, the step of controlling the operation of the audio device includes: acquiring an audio xml configuration file corresponding to the audio test channel; and opening a tinymix passage in the audio xml configuration file to realize the control of the operation of the audio device.
Step S405, when the audio device is an audio input device, controlling the audio input device to record a test sound source played by the audio automatic test equipment, simultaneously performing corresponding sound effect processing on the test sound source transmitted in the audio test channel according to the sound effect parameters, and outputting the test sound source after the sound effect processing to the audio automatic test equipment through an earphone channel so that the audio automatic test equipment analyzes the performance of the audio device according to the test sound source and the audio signal. Referring to fig. 8, fig. 8 is a schematic diagram illustrating another embodiment of an audio testing process performed by an audio automatic testing device on a mobile terminal, as shown in fig. 8, the audio testing process includes the following steps: 1. the audio automatic test equipment sends an audio test instruction to an audio test APP on the mobile terminal; 2. the audio test APP obtains an attribute value and sends the attribute value to the HAL layer; determining an audio test path by the HAL layer according to the attribute value; 4. the audio test APP obtains the ID of the audio device according to the attribute value analysis and sends the ID to the audio test channel, and sound effect processing can be carried out according to the acdbID while audio test is carried out in the embodiment; the HAL layer selects the audio device during the audio test according to the ID of the audio device; 6. feeding back the selection result of the audio device to the application layer; 7. controlling the audio device to work; 8. the audio device outputs an audio signal to the audio automatic test equipment; 9. the audio automatic test equipment analyzes the performance of the audio device through analysis software.
Through the steps S401 to S405, the audio test method of the invention sets independent audio test paths for each audio device by adopting the attribute value mode, thereby realizing the flexible setting of the audio test paths for each audio device and having strong expandability of audio test; meanwhile, an independent audio test channel is arranged for each audio device, and the test result can accurately reflect the performance of the corresponding audio device; in addition, in research and development test stage, set up the audio parameter for each audio frequency test access, whether some indexs of having realized testing the audio through audio frequency automation test equipment accord with engineer's design demand, made things convenient for the nimble debugging audio parameter of audio engineer promptly, just can apply corresponding audio parameter to the audio frequency working access that the user used when the audio frequency is effectual.
Meanwhile, the invention also provides a mobile terminal, which comprises a memory, a processor and an audio test program 400 which is stored on the memory and can be run on the processor. Fig. 5 is a functional block diagram of an audio test program 400 according to a first embodiment of the present invention. In this embodiment, the audio test program 400 may be divided into one or more modules, for example, in fig. 5, the audio test program 400 may be divided into an attribute value acquisition module 401, an audio test path determination module 402, an audio device acquisition module 403, and a control module 404. The module referred to in the present invention refers to a series of instruction segments of the fetcher program that can perform specific functions, and is more suitable than the fetcher program for describing the execution process of the software in the mobile terminal. The detailed description of the functions of the functional modules 401 and 404 will be described below. Wherein:
the attribute value obtaining module 401 is configured to obtain an attribute value from an audio test instruction when the audio test instruction is detected.
The audio test on the mobile terminal is usually realized by means of audio automatic test equipment, and a sound card and analysis software are arranged in the audio automatic test equipment. Referring to fig. 7, fig. 7 is a schematic diagram illustrating an embodiment of an audio test performed by an audio automation test device on a mobile terminal, where as shown in fig. 7, when analysis software on the audio automation test device wants to test the performance of an audio device, an audio test instruction needs to be sent to the mobile terminal, and when the mobile terminal detects the audio test instruction, an audio test is performed on the corresponding audio device. The audio device on the mobile terminal generally comprises two types of audio input devices and audio output devices, the audio input devices generally comprise a main microphone and an auxiliary microphone, the audio output devices generally comprise a loudspeaker and an earphone, and the audio test method and the audio test device are used for carrying out audio test, namely testing the performance of the main microphone, the auxiliary microphone, the loudspeaker or the earphone. Compared with the whole machine test in the prior art, the invention can carry out independent performance test on each audio device, therefore, the invention adopts the attribute mode to respectively set the audio test channels for the loudspeaker, the receiver, the main microphone and the auxiliary microphone, and for different audio devices, the audio test channels have different attribute values, namely, the attribute values are used for distinguishing different audio test channels. The audio test path is implemented by a QACT tool, and from the viewpoint of control flow, the audio test path uses an attribute (the attribute is referred to as an attribute value in the present invention) to specify which audio device is to operate or a group of audio devices is to operate, and the audio test path can be regarded as a test channel specially opened for a certain test purpose.
The audio test path determining module 402 is configured to determine an audio test path according to the attribute value.
In this embodiment, the audio test path includes four types, namely a main microphone test path, an auxiliary microphone test path, a speaker test path, and a receiver test path, where the main microphone test path and the auxiliary microphone test path are audio input device test paths, and the speaker test path and the receiver test path are audio output device test paths. Of course, if the audio device on the mobile terminal has other audio devices besides the main microphone, the sub-microphone, the speaker and the receiver, the corresponding audio test path can be set for the other audio devices in the same way, that is, the audio test path can be flexibly set for each audio device, and the audio test has strong expandability. Because the attribute values are in one-to-one correspondence with the audio test paths, the audio test paths can be determined according to the acquired attribute values.
The audio device obtaining module 403 is configured to obtain an audio device corresponding to the audio test path. Specifically, the audio test paths and the audio devices have a one-to-one correspondence relationship, such as a main microphone test path, an auxiliary microphone test path, a loudspeaker test path, and a receiver test path, which correspond to the main microphone, the auxiliary microphone, the loudspeaker, and the receiver, respectively.
The control module 404 is configured to use a test sound source as an input signal of the audio device, control the audio device to operate, and transmit an audio signal output by the audio device to an audio automation test device, so that the audio automation test device analyzes the performance of the audio device according to the test sound source and the audio signal.
In the invention, after the mobile terminal determines the audio device through the attribute value, the audio device is controlled to work so as to carry out audio test on the audio device. Specifically, when the audio device is an audio output device, that is, the audio test path is an audio output device test path, the step of using the test sound source as the input signal of the audio device, controlling the audio device to operate, and transmitting the audio signal output by the audio device to the audio automation test equipment includes: (1) controlling the mobile terminal to start an audio output device, and taking the test sound source as an input signal of the audio output device; (2) and starting a standard microphone of the audio automatic test equipment to acquire the audio signal output by the audio output device. Using loudspeaker as an example, when carrying out audio test to loudspeaker, mobile terminal control loudspeaker broadcast the test sound source that sets up in advance, and audio frequency automation test equipment receives the audio signal of loudspeaker broadcast through standard microphone simultaneously, then analysis software compares received audio signal and built-in test sound source again to can obtain the distortion factor and the true loudness value of loudspeaker work under current environment, and then can obtain the correlation properties of loudspeaker. Since the receiver and the speaker are both audio output devices, the testing principle is the same, and the testing process of the receiver is not described in detail here. In addition, the test audio played by the loudspeaker or the receiver can be realized by a built-in sound source, and the built-in sound source is also specified by the audio automation equipment. When the audio device is an audio input device, that is, the audio test path is an audio input device test path, the step of using the test sound source as the input signal of the audio device, controlling the audio device to work, and transmitting the audio signal output by the audio device to the audio automatic test equipment includes: (1) controlling an audio input device to record a test sound source played by the audio automatic test equipment; (2) and outputting the test sound source collected by the audio input device to the audio automatic test equipment through an earphone channel. Using main microphone as an example, when carrying out the audio test to main microphone, audio frequency automation test equipment passes through artifical mouth broadcast test sound source, mobile terminal control main microphone records the test sound source of broadcast, then passes through the earphone route to the test sound source of recording and transmits for audio frequency automation test equipment, audio frequency automation test equipment carries out analysis processes to it again to the loudness value and the distortion factor value of acquireing main microphone, and then the performance of analysis main microphone. Similarly, the secondary microphone may be tested for audio frequency, and since the testing principles are the same, the testing process for the secondary microphone is not described in detail here.
Through the modules 401 to 404, when an audio test instruction is detected by the audio test program, an attribute value is obtained from the audio test instruction, an audio test channel is determined according to the attribute value, an audio device corresponding to the audio test channel is obtained, then a test sound source is used as an input signal of the audio device, the audio device is controlled to work, and an audio signal output by the audio device is transmitted to an audio automatic test device, so that the audio automatic test device analyzes the performance of the audio device according to the test sound source and the audio signal; meanwhile, an independent audio test channel is arranged for each audio device, and the test result can accurately reflect the performance of the corresponding audio device.
Further, based on the above-mentioned first embodiment of the audio test program 400 of the present invention, a second embodiment of the audio test program 400 of the present invention is proposed. Referring to fig. 6, fig. 6 is a functional block diagram of an audio test program 400 according to a second embodiment of the present invention, wherein the audio test program 400 further includes a setting module 405, an audio parameter obtaining module 406, and an audio test module 407. In this embodiment, each functional module is described as follows:
the setting module 405 is configured to receive and store a corresponding relationship between an attribute value set by a user and an audio test path, where each audio test path corresponds to an audio xml configuration file, and the audio xml configuration file includes a tinymix path that needs to be started when the audio test path is opened.
In order to implement the above audio test program, the present invention needs to design the application layer, the HAL layer, the audio xml configuration file, and the acdbID. The application layer is an APP, namely an audio test APP developed by the invention, the audio test APP is installed on the mobile terminal and is used for realizing the audio test method of the invention, a user can set attribute values for each audio device in the audio test APP, and when the audio test APP receives an audio test instruction, an audio test access can be determined according to the attribute values in the audio test instruction.
The audio xml configuration file is specifically a mixer _ paths _ mtp. xml file, and configuration paths with the formats of < path name "" > … </path > are stored in the file, and are a certain combination of the tinymix paths, for example, a plurality of tinymix paths need to be opened when a speaker plays, and a plurality of tinymix paths need to be opened when the speaker plays are stored in the audio xml configuration file. For example, the content of the part in the audio xml configuration file is as follows:
Figure BDA0001559585180000211
the tinymix pathway refers to tinymix RX1MIX1INP1RX1, that is, the < path > in the above document is a set of tinymix switches, which mainly functions to open many necessary tinymix pathways for the audio test pathway. The audio xml configuration file used to define the audio test path in the present invention is as follows:
<path name="speaker-test">…</path>
<path name="receiver-test">…</path>
<path name="mic1-test">…</path>
<path name="mic2-test">…</path>
the audio test path defined by the audio xml configuration file is associated with the HAL layer, and finally mapped to the audio xml configuration file at the HAL layer, so that each path (i.e. audio test path) is validated.
The HAL layer is an audio hardware abstraction layer, the HAL layer can work only by being matched with an audio xml configuration file, the HAL layer corresponds to two services, namely Audio Flanger. cpp and Audio policy service. cpp of an android audio frame, the Audio policy service is not a real device actually, and a manufacturer can conveniently customize an audio policy by adopting a virtual device mode. The task of the abstraction layer is to really associate the audioFlinger/audioPolicyservice with the hardware device, but to ensure that the change of the bottom layer does not affect the upper layer, so the HAL layer is a place where android suggests modification to the mobile phone manufacturer, and other parts of the audio frame are not modified generally. Specifically, when the xml configuration file is associated with the HAL layer, the mapping relationship is illustrated as follows: [ SND _ DEVICE _ OUT _ SPEAKER _ TEST ] - "spaker-TEST", where "spaker-TEST" refers to the < path name ═ spaker-TEST "> … </path > in the audio xml configuration file, and SND _ DEVICE _ OUT _ SPEAKER is the DEVICE sound card setting constant suggested in the android system, through which the HAL layer can be associated with the audio xml configuration file. Similarly, for the audio xml configuration files of other audio test paths, the following mapping relationship is set:
[SND_DEVICE_OUT_RECEIVER_TEST]="receiver-test"
[SND_DEVICE_OUT_MIC1_TEST]="mic1-test"
[SND_DEVICE_OUT_MIC2_TEST]="mic2-test"
in addition, the HAL layer is also associated with the acdbID, and the mapping relationship is as follows:
[SND_DEVICE_OUT_SPEAKER_TEST]="205"
[SND_DEVICE_OUT_RECEIVER_TEST]="204"
[SND_DEVICE_OUT_MIC1_TEST]="202"
[SND_DEVICE_OUT_MIC2_TEST]="201"
wherein 201, 202, 204 and 205 represent the values of acdbID, and different acdbIDs represent different sound effect parameters. In addition, the call logic can be distinguished by attribute values at the HAL layer, for example: when the audio output device is called, the call logic is platform _ get _ output _ snd _ device, and when the audio input device is called, the call logic is platform _ get _ input _ snd _ device. The two calling logics are determined by an Android system frame, the interface cannot be changed, and the calling logics are called certainly when the audio device is used. In order to distinguish the audio test path from the audio working path (i.e. the audio path when the mobile terminal is normally used), the present invention uses an attribute value to specify the path that we need to select, for example: when a loudspeaker TEST is performed, if the attribute value is not specified, a default loudspeaker playing path (audio working path) is selected for playing, and when the attribute value of the attribute debug.
The sound effect parameter obtaining module 406 is configured to obtain a sound effect parameter corresponding to the audio test channel. In this embodiment, the setting of the audio test path for each audio device is realized by a QACT tool, and the audio test path can be described from two aspects, that is, from the viewpoint of control flow, an attribute (the attribute corresponds to an attribute value) is used to specify which audio device operates or which group of audio devices operates, and the audio test path can be regarded as a test channel specially opened for a certain test purpose; from the audio effect angle, can distinguish the audio device sound effect parameter of normal use and the user is for during the test sound effect parameter that audio frequency test access set up through adding extra acdbID, also can say that has taken solitary sound effect access for a certain test purpose. It should be noted that, when the audio device is tested in the production process, the sound effect parameters of the audio test channel are set to be null, i.e. no extra sound effect parameters are used to reflect the performance of the audio device more truly, and if the test is developed, sound effect processing can be added according to the requirement, so as to develop whether some indexes of the sound effect which can be tested by using the audio automatic test equipment meet the design requirements of engineers, i.e. to facilitate the flexible debugging of the sound effect parameters by the sound effect engineers, when the audio effect is good, the corresponding sound effect parameters can be applied to the audio working channel used by the user, i.e. the conventional channel, the conventional channel refers to the channel which is added with the sound effect algorithm when the mobile phone is normally used, and is supplied for the user to use, therefore, some uncertain sound effect algorithms can be tested in the audio test channel in advance, and after the optimal sound effect parameters are obtained, the optimal sound effect parameters are added into an audio working channel used by a user.
The sound effect test module 407 is used for controlling the audio device to work, and meanwhile, the sound effect parameters are right the test sound source transmitted in the audio test channel is subjected to corresponding sound effect processing to obtain the audio signal after the sound effect processing. In this embodiment, an audio test in the research and development process is taken as an example, and after a user sets a sound effect parameter for an audio test channel and acquires the sound effect parameter, the corresponding sound effect processing is performed on a test sound source transmitted in the audio test channel according to the sound effect parameter in the audio test process, so as to obtain an audio signal after the sound effect processing. Specifically, sound effect means that an additional algorithm is added when the audio device works: such as echo cancellation, noise reduction, etc., the addition of sound effect to the audio device is mainly to add an additional optimization algorithm, so that the sound quality displayed by the audio device is more consistent with the characteristics of human ears, and the sound is more comfortable and clear. Further, the step of controlling the operation of the audio device includes: acquiring an audio xml configuration file corresponding to the audio test channel; and opening a tinymix passage in the audio xml configuration file to realize the control of the operation of the audio device. Referring to fig. 8, fig. 8 is a schematic diagram illustrating another embodiment of an audio testing process performed by an audio automatic testing device on a mobile terminal, as shown in fig. 8, the audio testing process includes the following steps: 1. the audio automatic test equipment sends an audio test instruction to an audio test APP on the mobile terminal; 2. the audio test APP obtains an attribute value and sends the attribute value to the HAL layer; determining an audio test path by the HAL layer according to the attribute value; 4. the audio test APP obtains the ID of the audio device according to the attribute value analysis and sends the ID to the audio test channel, and sound effect processing can be carried out according to the acdbID while audio test is carried out in the embodiment; the HAL layer selects the audio device during the audio test according to the ID of the audio device; 6. feeding back the selection result of the audio device to the application layer; 7. controlling the audio device to work; 8. the audio device outputs an audio signal to the audio automatic test equipment; 9. the audio automatic test equipment analyzes the performance of the audio device through analysis software.
Through the modules 401 to 407, the audio test program of the invention sets independent audio test paths for each audio device by adopting an attribute value mode, thereby realizing flexible setting of the audio test paths for each audio device and having strong expandability of audio test; meanwhile, an independent audio test channel is arranged for each audio device, and the test result can accurately reflect the performance of the corresponding audio device; in addition, in research and development test stage, set up the audio parameter for each audio frequency test access, whether some indexs of having realized testing the audio through audio frequency automation test equipment accord with engineer's design demand, made things convenient for the nimble debugging audio parameter of audio engineer promptly, just can apply corresponding audio parameter to the audio frequency working access that the user used when the audio frequency is effectual.
In addition, the present invention also provides a computer readable storage medium, on which an audio test program is stored, and the audio test program implements the steps of the audio test method described in fig. 3 to 4 when executed.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a positioning server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (7)

1. An audio testing method, characterized in that the audio testing method comprises the following steps:
when an audio test instruction is detected, acquiring an attribute value from the audio test instruction;
determining an audio test channel according to the attribute value;
acquiring an audio device corresponding to the audio test channel;
taking a test sound source as an input signal of the audio device, controlling the audio device to work, and transmitting an audio signal output by the audio device to audio automatic test equipment so that the audio automatic test equipment analyzes the performance of the audio device according to the test sound source and the audio signal;
wherein the audio device comprises an audio input device and an audio output device, the audio test path comprises an audio input device test path and an audio output device test path, and each audio test path corresponds to one attribute value;
when the audio device is an audio output device, the step of using the test sound source as an input signal of the audio device, controlling the audio device to work, and transmitting the audio signal output by the audio device to the audio automatic test equipment comprises the following steps:
controlling the mobile terminal to start the audio output device, and taking the test sound source as an input signal of the audio output device;
starting a standard microphone of the audio automatic test equipment to collect an audio signal output by the audio output device;
when the audio device is an audio input device, the step of using the test sound source as an input signal of the audio device, controlling the audio device to work, and transmitting the audio signal output by the audio device to audio automatic test equipment comprises the following steps:
controlling an audio input device to record a test sound source played by the audio automatic test equipment;
and outputting the test sound source collected by the audio input device to the audio automatic test equipment through an earphone channel.
2. The audio testing method of claim 1, wherein said step of determining an audio test path based on said attribute value further comprises, after said step of:
acquiring sound effect parameters corresponding to the audio test channel;
and controlling the audio device to work, and simultaneously carrying out corresponding sound effect processing on the test sound source transmitted in the audio test channel according to the sound effect parameters so as to obtain the audio signal after the sound effect processing.
3. The audio testing method of claim 1, wherein the audio input device is a primary microphone or a secondary microphone, the audio output device is a speaker or a receiver, the audio input device test path is a primary microphone test path or a secondary microphone test path, and the audio output device test path is a speaker test path or a receiver test path.
4. The audio testing method of any of claims 1 to 3, wherein said step of determining an audio test path based on said attribute value is preceded by the step of:
receiving and storing the corresponding relation between attribute values set by a user and audio test paths, wherein each audio test path corresponds to an audio xml configuration file, and the audio xml configuration file comprises a tinymix path required to be started when the audio test path is opened.
5. The audio testing method of claim 4, wherein the step of controlling the operation of the audio device comprises:
acquiring an audio xml configuration file corresponding to the audio test channel;
and opening a tinymix passage in the audio xml configuration file to realize the control of the operation of the audio device.
6. A mobile terminal, characterized in that the mobile terminal comprises a memory, a processor and an audio test program stored on the memory and executable on the processor, the audio test program, when executed by the processor, implementing the steps of the audio test method according to any one of claims 1 to 5.
7. A computer-readable storage medium, having stored thereon an audio test program which, when executed, implements the steps of the audio test method of any of claims 1 to 5.
CN201810076020.5A 2018-01-26 2018-01-26 Audio testing method, mobile terminal and computer readable storage medium Active CN108366160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810076020.5A CN108366160B (en) 2018-01-26 2018-01-26 Audio testing method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810076020.5A CN108366160B (en) 2018-01-26 2018-01-26 Audio testing method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108366160A CN108366160A (en) 2018-08-03
CN108366160B true CN108366160B (en) 2021-03-26

Family

ID=63007194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810076020.5A Active CN108366160B (en) 2018-01-26 2018-01-26 Audio testing method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108366160B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109195089B (en) * 2018-09-05 2021-02-12 苏州思必驰信息科技有限公司 Method and system for testing electroacoustic parameters of loudspeaker in product
CN109195090B (en) * 2018-09-05 2021-01-22 苏州思必驰信息科技有限公司 Method and system for testing electroacoustic parameters of microphone in product
CN111613242B (en) * 2019-02-25 2023-03-07 杭州海康威视数字技术股份有限公司 Method and device for testing audio line of equipment and electronic equipment
CN110166923A (en) * 2019-05-30 2019-08-23 厦门盈趣科技股份有限公司 Audio frequency apparatus test macro and method
CN110177166A (en) * 2019-06-10 2019-08-27 深圳市中诺通讯有限公司 A kind of mobile phone audio test method and system
CN114650456B (en) * 2020-12-17 2023-07-25 深圳Tcl新技术有限公司 Configuration method, system, storage medium and configuration equipment of audio descriptor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638756A (en) * 2012-04-26 2012-08-15 青岛海信移动通信技术股份有限公司 Mobile terminal voice frequency test method, test device and mobile terminal
CN103179240A (en) * 2011-12-20 2013-06-26 比亚迪股份有限公司 Audio test method and system for mobile terminal
CN104601769A (en) * 2014-12-18 2015-05-06 上海斐讯数据通信技术有限公司 Automatic mobile phone main board audio testing system
CN105657632A (en) * 2016-01-08 2016-06-08 深圳市金立通信设备有限公司 Audio test method and system and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179240A (en) * 2011-12-20 2013-06-26 比亚迪股份有限公司 Audio test method and system for mobile terminal
CN102638756A (en) * 2012-04-26 2012-08-15 青岛海信移动通信技术股份有限公司 Mobile terminal voice frequency test method, test device and mobile terminal
CN104601769A (en) * 2014-12-18 2015-05-06 上海斐讯数据通信技术有限公司 Automatic mobile phone main board audio testing system
CN105657632A (en) * 2016-01-08 2016-06-08 深圳市金立通信设备有限公司 Audio test method and system and terminal

Also Published As

Publication number Publication date
CN108366160A (en) 2018-08-03

Similar Documents

Publication Publication Date Title
CN108366160B (en) Audio testing method, mobile terminal and computer readable storage medium
CN107995060B (en) Mobile terminal audio test method and device and computer readable storage medium
CN108600520B (en) Reception state control method, mobile terminal, and computer-readable storage medium
CN108172161B (en) Display method based on flexible screen, mobile terminal and computer readable storage medium
CN109697008B (en) Content sharing method, terminal and computer readable storage medium
WO2021104246A1 (en) Network connection method and electronic device
CN110187808B (en) Dynamic wallpaper setting method and device and computer-readable storage medium
CN110113779B (en) eSIM card testing method, system and medium
CN112306799A (en) Abnormal information acquisition method, terminal device and readable storage medium
CN111899695A (en) Backlight adjusting method, terminal device and readable storage medium
CN111427709A (en) Application program body-separating control method and device and computer readable storage medium
CN109522276B (en) Application icon management method, terminal and computer-readable storage medium
CN108009116B (en) MicroUSB interface circuit and mobile terminal thereof
CN107465469B (en) Receiving sensitivity testing method, testing device and computer readable storage medium
CN113176869A (en) Screen-projecting audio time delay control method and device and computer readable storage medium
CN112423211A (en) Multi-audio transmission control method, equipment and computer readable storage medium
CN109561221B (en) Call control method, device and computer readable storage medium
CN109861697B (en) Antenna performance optimization method and device, terminal and computer readable storage medium
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN111443850A (en) Terminal operation method, terminal and storage medium
CN108040311B (en) Audio playing method, terminal and computer readable storage medium
CN107678622B (en) Application icon display method, terminal and storage medium
CN107562304B (en) Control method, mobile terminal and computer readable storage medium
CN107580106B (en) Call control method, mobile terminal and computer readable storage medium
CN113805837A (en) Audio processing method, mobile terminal and storage medium

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