CN105657632A - Audio test method and system and terminal - Google Patents

Audio test method and system and terminal Download PDF

Info

Publication number
CN105657632A
CN105657632A CN201610013519.2A CN201610013519A CN105657632A CN 105657632 A CN105657632 A CN 105657632A CN 201610013519 A CN201610013519 A CN 201610013519A CN 105657632 A CN105657632 A CN 105657632A
Authority
CN
China
Prior art keywords
audio
frequency
unit
mark
logic strategy
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.)
Granted
Application number
CN201610013519.2A
Other languages
Chinese (zh)
Other versions
CN105657632B (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.)
Shenzhen Microphone Holdings Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment 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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201610013519.2A priority Critical patent/CN105657632B/en
Publication of CN105657632A publication Critical patent/CN105657632A/en
Application granted granted Critical
Publication of CN105657632B publication Critical patent/CN105657632B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements

Abstract

The embodiment of the invention provides an audio test method and system and a terminal. The method comprises the following steps: receiving an audio test instruction triggered by a user, wherein the audio test instruction includes an identifier of audio equipment; setting a logical policy of the audio equipment according to the audio test instruction, wherein the logical policy of the audio equipment includes the identifier of the audio equipment; in a process of calling an audio recording-tracking unit, calling the logical policy of the audio equipment, and acquiring the identifier of the audio equipment from the logical policy of the audio equipment; and controlling an audio kernel unit to turn on the audio equipment to carry out an audio test according to the identifier of the audio equipment. Through the embodiment of the invention, the audio test can be carried out specific to any of independent audio equipment in the terminal, and the accuracy, convenience and application universality of the audio test are improved.

Description

A kind of audio testing method, terminal and system
Technical field
The present invention relates to multimedia technology field, be specifically related to a kind of audio testing method, terminal and system.
Background technology
Now, mobile phone has had become as the necessary of people's daily life. In modernization mobile terminal large-scale production, in order to ensure the audio performance of product, audio-frequency test is necessary link in production test. In prior art, produce at mobile phone, research and development test phase is required for mobile phone audio frequency apparatus is tested, whether checking audio frequency apparatus is normal, such as Android system (android system, the operating system of Google's exploitation) mobile phone, the test of Mobile phone horn is had two kinds by present audio testing method: one is monomer test, it is exactly that loudspeaker are individually tested, pure tone test is carried out by the sinusoidal signal of audio signal generator, listen whether can normal play sound etc., this kind of test mode is inapplicable for assembling complete mobile phone; Another kind is to do installation test, loudspeaker are loaded in mobile phone, with the audio signal on mobile phone carry out audition carry out test horn whether can normal play sound, but for many loudspeaker mobile phone, integrated testability can only be carried out for all loudspeaker when carrying out audio-frequency test, if test find mobile phone cannot normal play sound, then can accurately not test out specifically which loudspeaker and occur in that fault, therefore existing audio testing method test inaccuracy, and there is limitation.
Summary of the invention
Embodiments provide a kind of audio testing method, terminal and system, improve the popularity of the accuracy of audio-frequency test, convenience and application.
First aspect, embodiments provides a kind of audio test system, and described audio test system includes:
Applying unit, for receiving the audio-frequency test instruction that user triggers, and sends described audio-frequency test instruction to Application service element, and described audio-frequency test instruction includes the mark of audio frequency apparatus;
Described Application service element, for sending described audio-frequency test instruction to hardware abstraction unit by the local audio service unit AudioFlinger in described audio test system;
Described hardware abstraction unit, arranges the logic strategy of audio frequency apparatus for controlling audio frequency policy manager AudioPolicyManager according to described audio-frequency test instruction, and the logic strategy of described audio frequency apparatus includes the mark of described audio frequency apparatus;
Call in the process of audio-record broadcast unit of described audio test system at described applying unit, described AudioFlinger, for calling the logic strategy of the described audio frequency apparatus in described AudioPolicyManager, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus;
Described AudioFlinger, is additionally operable to send to described hardware abstraction unit the mark of described audio frequency apparatus;
Described hardware abstraction unit, is additionally operable to the mark according to described audio frequency apparatus and controls the audio frequency kernel unit of described audio test system and open described audio frequency apparatus and carry out audio-frequency test.
Second aspect, embodiments provides a kind of audio testing method, is applied to audio test system, and described audio test system includes audio-record broadcast unit and audio frequency kernel unit; Described method includes:
Receiving the audio-frequency test instruction that user triggers, described audio-frequency test instruction includes the mark of audio frequency apparatus;
Arrange the logic strategy of audio frequency apparatus according to described audio-frequency test instruction, the logic strategy of described audio frequency apparatus includes the mark of described audio frequency apparatus;
In the process calling described audio-record broadcast unit, call the logic strategy of described audio frequency apparatus, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus;
The described audio frequency kernel unit of mark control according to described audio frequency apparatus is opened described audio frequency apparatus and is carried out audio-frequency test.
The third aspect, embodiments provides a kind of terminal, and including audio test system, described audio test system includes audio-record broadcast unit and audio frequency kernel unit; Described terminal includes:
Receiving unit, for receiving the audio-frequency test instruction that user triggers, described audio-frequency test instruction includes the mark of audio frequency apparatus;
Arranging unit, for arranging the logic strategy of audio frequency apparatus according to described audio-frequency test instruction, the logic strategy of described audio frequency apparatus includes the mark of described audio frequency apparatus;
Acquiring unit, for, in the process calling described audio-record broadcast unit, calling the logic strategy of described audio frequency apparatus, and obtain the mark of described audio frequency apparatus from the logic strategy of described audio frequency apparatus;
Control unit, opens described audio frequency apparatus for the described audio frequency kernel unit of mark control according to described audio frequency apparatus and carries out audio-frequency test.
By implementing the embodiment of the present invention, applying unit receives the audio-frequency test instruction that user triggers, by Application service element and local audio service unit AudioFlinger, this audio-frequency test instruction is sent to hardware abstraction unit, hardware abstraction unit controls audio frequency policy manager AudioPolicyManage according to this audio-frequency test instruction and arranges the logic strategy of audio frequency apparatus, when applying unit calls audio-record broadcast unit, AudioFlinger calls the logic strategy of the audio frequency apparatus in AudioPolicyManager, and from the logic strategy of this audio frequency apparatus, obtain the mark of audio frequency apparatus, and the mark of audio frequency apparatus is sent to hardware abstraction unit, hardware abstraction unit is opened audio frequency apparatus according to the mark control audio frequency kernel unit of this audio frequency apparatus and is carried out audio-frequency test, thus realizing audio frequency apparatus is carried out audio-frequency test, reduce the complexity of existing terminal audio frequency test and not convenient property, audio-frequency test can be carried out for the audio frequency apparatus that in terminal, any one is independent, improve the accuracy of audio-frequency test, the popularity of convenience and application.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme in the embodiment of the present invention, below the accompanying drawing used required during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the block schematic illustration of a kind of audio test system that the embodiment of the present invention provides;
Fig. 2 is the schematic flow sheet of a kind of audio testing method that the embodiment of the present invention provides;
Fig. 3 is the schematic flow sheet of the another kind of audio testing method that the embodiment of the present invention provides;
Fig. 4 is the schematic flow sheet of the another kind of audio testing method that the embodiment of the present invention provides;
Fig. 5 is the structural representation of a kind of terminal that the embodiment of the present invention provides;
Fig. 6 is the structural representation of the another kind of terminal that the embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is a part of embodiment of the present invention, rather than whole embodiments. Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Refer to the block schematic illustration that Fig. 1, Fig. 1 are a kind of audio test systems that the embodiment of the present invention provides.
Audio test system 100 in this embodiment includes applying unit 101, Application service element 102, audio-record broadcast unit 103, local service unit 104, hardware abstraction unit 105 and audio frequency kernel unit 106. Wherein,
Applying unit 101 is client, can such as AudioAPP (Application, application program) etc., applying unit 101 is specifically as follows the JAVA applying unit in android system;
Application service element 102 includes AudioManager1021 (audio manager) and AudioService1022 (audio server), AudioManager1021 is an AudioService1022 agency in client, client is to the AudioManager1021 audio-frequency test instruction sent, transferring to AudioService1022 to forward and be given to local audio server A udioSystem1041, Application service element 102 is specifically as follows the JAVA service unit in android system;
Audio-record broadcast unit 103 includes audio sound-recording unit AudioRecord1031 and audio playing unit AudioTrack1032, AudioRecord1031 and AudioTrack1032 belongs to the API (ApplicationProgrammingInterface that audio system externally provides, application programming interface) class, applying unit 101 can complete recording and the playback task of audio system sound intermediate frequency data by calling the two api interface, wherein, AudioRecord1031 is used for recording audio data, and AudioTrack1032 is used for playing back voice data;
Local service unit 104 includes AudioSystem1041, AudioFlinger1042 (local audio service unit), AudioPolicyService1043 (audio frequency strategic server) and AudioPolicyManager1044 (audio frequency policy manager), wherein, AudioSystem1041 is local audio system service, AudioFlinger is local audio service unit, also it is a system service, it it is the audio hub of local service, play the effect formed a connecting link and (provide access interface for upper strata, audio frequency apparatus is managed) by the hardware abstraction unit of lower floor, AudioPolicyService1043 is the policy control center of audio system, the audio frequency tactical management of AudioPolicyService1043 and formulation complete in AudioPolicyManager1044, AudioPolicyManager1044 is responsible to define the logic strategy of audio frequency apparatus, the logic strategy of audio frequency apparatus comprises the mark of the mark of audio input device to be tested that the audio-frequency test instruction that user triggers specifies and audio output apparatus to be detected, AudioFlinger1042 is the executor of audio frequency strategy, namely which audio frequency apparatus concrete is known as audio input device to be tested by calling the AudioPolicyManager1044 audio frequency strategy made, which audio frequency apparatus concrete is as audio output apparatus to be tested,
Hardware abstraction unit 105 includes AudioHAL1051 and AudioAlsaHardware1052, AudioHAL1051 is for connection to local service unit 104 and audio frequency kernel unit 106, its object is to audio frequency kernel unit 106 hardware abstraction, hardware device manufacturer is made to avoid exposing the source code driven, AudioHAL1051 is a programming layer, allow computer operating system at logical layer rather than hardware layer with hardware device alternately, specifically controlled AudioKernelDriver1061 by AudioAlsaHardware1052 and open or close certain audio frequency apparatus;
Audio frequency kernel unit 106 includes AudioKernelDriver1061 (audio frequency kernel-driven) and AudioHW1062 (Hardware, audio hardware equipment), AudioHW1062 includes MIC (Microphone, mike), loudspeaker, the audio frequency apparatus such as receiver, AudioKernelDriver1061 controls the opening and closing of above-mentioned audio frequency apparatus.
Wherein, the function of above-mentioned unit describes as follows:
Applying unit 101 receives the audio-frequency test instruction that user triggers, and sends audio-frequency test instruction to Application service element 102, and audio-frequency test instruction includes the mark of audio frequency apparatus;
Audio-frequency test instruction is sent to hardware abstraction unit 105 by Application service element 102 by AudioFlinger1042;
Hardware abstraction unit 105 controls AudioPolicyManager1044 according to audio-frequency test instruction and arranges the logic strategy of audio frequency apparatus, and the logic strategy of audio frequency apparatus includes the mark of audio frequency apparatus;
Calling in the process of audio-record broadcast unit 103 at applying unit 101, AudioFlinger1042 calls the logic strategy of the audio frequency apparatus in AudioPolicyManager1044, and obtains the mark of audio frequency apparatus from the logic strategy of audio frequency apparatus;
The mark of audio frequency apparatus is sent to hardware abstraction unit 105 by AudioFlinger1042;
Hardware abstraction unit 105 is opened audio frequency apparatus according to the mark control audio frequency kernel unit 106 of audio frequency apparatus and is carried out audio-frequency test.
Concrete, for android system, when analyzing Android audio system, custom is realized being divided into two parts: voice data stream and audio frequency strategy. voice data stream description voice data flows to the process of destination from data source. audio frequency strategy is then management and controls the path of voice data stream and the process presented. in embodiments of the present invention, AudioRecord1031, AudioTrack1032, AudioFlinger1042 and audio frequency kernel unit 106 can be gone to discuss by the category incorporating voice data stream into, content relevant for AudioPolicyService1043 and AudioPolicyManager1044 then belongs to audio frequency strategy category, and audio system is substantially not involved in voice data stream in application layer. AudioKernelDriver1061 in the embodiment of the present invention includes the hardware control interface controlling to open independent AudioHW1062, in implementing, cell phone manufacturer is when manufacturing terminal unit, in software development process, in AudioKernelDriver1061 layer, the hardware control interface of the audio frequency apparatus installed in independent each terminal corresponding is added in encapsulation, such as corresponding for main MIC hardware control interface, the hardware control interface that secondary MIC is corresponding, the hardware control interface that left horn is corresponding, the hardware control interface that right horn is corresponding, the hardware control interface etc. that receiver is corresponding, and in AudioHAL1051 layer, add control AudioKernelDriver1061 open the access control interface individually opening each audio frequency apparatus, such as corresponding for main MIC access controls interface, access corresponding for secondary MIC controls interface, the access that left horn is corresponding controls interface, the access that right horn is corresponding controls interface, the access that receiver is corresponding controls interface etc., therefore when the audio frequency apparatus of terminal is tested, AudioHAL1051 layer accesses control Interface Controller by calling these, AudioKernelDriver1061 can be controlled and control individually to open or close the audio frequency apparatus of correspondence by above-mentioned hardware control interface.
In implementing, test user is by the test instruction of client trigger audio, test user triggers the concrete mode of this audio-frequency test instruction: click testing button in audio-frequency test APP, the audio frequency apparatus carrying out audio-frequency test is needed to include but not limited to: receiver, left horn (when terminal includes two loudspeaker), right horn, audio loop (main MIC and receiver), secondary MIC loop (secondary MIC and loudspeaker), the audio hardware equipment such as earphone loop (earphone MIC and headset earpiece), therefore, audio-frequency test APP is provided with the testing button of corresponding above-mentioned each audio frequency apparatus, test user realizes each audio frequency apparatus is individually carried out audio-frequency test by clicking these testing buttons. after applying unit 101 receives the audio-frequency test instruction that user triggers, by AudioManager.setParameters interface, this audio-frequency test instruction is sent to AudioManager1021, AudioManager1021 transfers to AudioService1022 to realize audio-frequency test instruction is forwarded to AudioService1022, this audio-frequency test instruction is forwarded and is given to AudioFlinger1042 by AudioService1022 again, by AudioFlinger1042, this audio-frequency test instruction is transmitted to AudioHAL1051 again, the corresponding relation of the mark of audio frequency apparatus is consulted in advance between applying unit 101 and AudioHAL1051, therefore when AudioHAL1051 receives this audio-frequency test instruction, can judge that test user needs to specify which audio frequency apparatus to carry out audio-frequency test, AudioHAL1051 sends to AudioPolicyService1043 and arranges should the instruction of logic strategy of audio frequency apparatus, after AudioPolicyService1043 receives this instruction, arrange should the logic strategy of audio frequency apparatus by AudioPolicyManage, or, also the corresponding relation of the mark of audio frequency apparatus is consulted in advance between applying unit 101 and AudioPolicyService1043, after AudioHAL1051 receives the AudioFlinger1042 audio-frequency test instruction transmitted, this audio-frequency test instruction is sent to AudioPolicyService1043, AudioPolicyService1043 controls AudioPolicyManage and arranges the logic strategy of audio frequency apparatus according to this audio-frequency test instruction. concrete, if the mark for independent audio output apparatus carried in audio-frequency test instruction, then AudioPolicyManage has only to the mark according to this audio output apparatus and arranges the logic strategy of audio output apparatus, if audio-frequency test instruction carries the mark of audio input device and the mark of audio output apparatus simultaneously, then AudioPolicyManage needs to arrange the logic strategy of audio input device according to the mark of this audio input device, and arranges the logic strategy of audio output apparatus according to the mark of this audio output apparatus. so far, the setting up procedure of audio frequency strategy is completed.
Wherein, the mark that each independent audio frequency apparatus is corresponding can be consulted in advance between applying unit 101 and AudioHAL1051, such as, the audio frequency apparatus identifying 1 correspondence is audio loop, including main MIC and receiver, if the audio frequency apparatus carried in the audio-frequency test instruction that then AudioHAL1051 receives is designated 1, then namely AudioHAL1051 can determine that user needs main MIC and receiver are carried out audio-frequency test, the audio frequency apparatus identifying 2 correspondences is left horn, when the audio frequency apparatus carried in audio-frequency test instruction is designated 4, namely AudioHAL1051 can determine that user needs left horn is individually carried out audio-frequency test.
After AudioPolicyManage sets up the logic strategy of audio frequency apparatus, applying unit 101 carries out recording and the playback of voice data by calling AudioRecord1031 and AudioTrack1032, thus really realizing audio frequency apparatus is tested, concrete, applying unit 101 calls the process of AudioRecord1031 can include following components: 1, create AudioRecord1031 object. 2, call the start function of AudioRecord1031, namely start AudioRecord1031 thread. 3, call the write function of AudioRecord1031, namely start recording audio data by AudioRecord1031. In the process of start function calling AudioRecord1031, AudioFlinger1042 can remove to read in AudioPolicyManage the logic strategy of the audio input device pre-set, and extracts the mark of audio input device to be tested from the logic strategy of audio input device. In the process of write function calling AudioRecord1031, when namely starting recording audio data by AudioRecord1031, user is carried out Record and Save from the voice data that audio input device is incoming by AudioRecord1031. Applying unit 101 calls the process of AudioTrack1032 can include following components: 1, create AudioTrack1032 object. 2, call the start function of AudioTrack1032, namely start AudioTrack1032 thread. 3, call the read function of AudioRecord1031, namely start to play back voice data by AudioTrack1032. In the process of start function calling AudioTrack1032, AudioFlinger1042 can remove to read in AudioPolicyManage the logic strategy of the audio output apparatus pre-set, the mark of audio output apparatus to be tested is extracted from the logic strategy of audio output apparatus, thus when starting to play back voice data by AudioTrack1032, the voice data of broadcasting is transferred to audio output apparatus to be tested and exports by AudioTrack1032.
After AudioFlinger1042 gets the mark of audio frequency apparatus to be tested from the logic strategy of audio frequency apparatus, the mark of the audio frequency apparatus got is sent to AudioHAL1051, AudioHAL1051 by call to should audio frequency apparatus access control Interface Controller audio frequency kernel unit 106 open audio frequency apparatus to be tested, and then the audio input device inputting audio by specifying, audio frequency is play by the audio output apparatus specified, whether normal by the audio frequency input audio output apparatus tested in the sound real-time judge audio-frequency test path that user hears.
As the optional embodiment of one, if test user needs individually certain audio output apparatus to be tested, then audio-record broadcast unit 103 is AudioTrack1032, and audio frequency apparatus is audio output apparatus; Then hardware abstraction unit 105 arranges the logic strategy of audio output apparatus according to audio-frequency test instruction control AudioPolicyManager1044, and the logic strategy of audio output apparatus includes the mark of audio output apparatus; Call in the process of AudioTrack1032 at applying unit 101, AudioFlinger1042 calls the logic strategy of the audio output apparatus in AudioPolicyManager1044, and obtains the mark of audio output apparatus from the logic strategy of audio output apparatus; Hardware abstraction unit 105 is opened audio output apparatus according to the mark control audio frequency kernel unit 106 of audio output apparatus and is carried out audio-frequency test, when audio output apparatus is carried out audio-frequency test, the voice data of broadcasting is exported by AudioTrack1032 by audio output apparatus.
Concrete, when testing user and needing individually audio output apparatus (such as loudspeaker or receiver) to be carried out audio-frequency test, AudioPolicyManage has only to arrange the logic strategy of audio output apparatus, then applying unit 101 realizes the playback of voice data by calling AudioTrack1032, and then at AudioTrack1032, the path of an audio-frequency test is set up between AudioFlinger1042 and audio output apparatus to be tested, in the process of start function calling AudioTrack1032, AudioFlinger1042 can remove to call the logic strategy of the audio output apparatus pre-set in AudioPolicyManage, the mark of audio output apparatus to be tested is obtained from the logic strategy of audio output apparatus, and the mark of this audio output apparatus is sent to AudioHAL1051, AudioHAL1051 has only to call to the access of audio output apparatus should controlling Interface Controller audio frequency kernel unit 106 and open this audio output apparatus, the voice data of one section of predeterminated frequency is play by AudioTrack1032, AudioFlinger1042 is by the AudioTrack1032 voice data play transmission to audio output apparatus to be tested, audio frequency is play thereby through this audio output apparatus, by the sound heard, test user judges that whether audio output apparatus is normal.
Such as, the voice data of 1khz is play by AudioTrack1032, AudioFlinger1042 gets audio output apparatus to be tested from the logic strategy of audio output apparatus and is designated the mark that left horn is corresponding, AudioHAL1051 opens according to the access control Interface Controller audio frequency kernel unit 106 that left horn is corresponding and individually opens left horn, the voice data transmission of the AudioTrack1032 1khz play is played out by AudioFlinger1042 to left horn, whether test user can normally send sound and judges that whether left horn is normal by listening in left horn.
As the optional embodiment of another kind, if test user needs (certain audio loop had both been included audio input device, include again audio output apparatus) test, then audio-record broadcast unit 103 includes AudioRecord1031 and AudioTrack1032, and audio frequency apparatus includes audio input device and audio output apparatus, hardware abstraction unit 105 controls AudioPolicyManager1044 according to audio-frequency test instruction and arranges the logic strategy of audio input device and the logic strategy of audio output apparatus, the logic strategy of audio input device includes the mark of audio input device, and the logic strategy of audio output apparatus includes the mark of audio output apparatus, call in the process of AudioRecord1031 and AudioTrack1032 at applying unit 101, AudioFlinger1042 calls the logic strategy of the audio input device in AudioPolicyManager1044 and the logic strategy of audio output apparatus, and from the logic strategy of audio input device, obtain the mark of audio input device, and from the logic strategy of audio output apparatus, obtain the mark of audio output apparatus, hardware abstraction unit 105 is opened audio input device according to the mark control audio frequency kernel unit 106 of audio input device and is carried out audio-frequency test, and control audio frequency kernel unit 106 according to the mark of audio output apparatus and open audio output apparatus and carry out audio-frequency test, when audio input device and audio output apparatus are carried out audio-frequency test, the voice data that audio input device is got by AudioRecord1031 is recorded, AudioTrack1032 plays the AudioRecord1031 voice data recorded, and the voice data of broadcasting is exported by audio output apparatus.
Concrete, when test user needs (audio loop is included audio input device and audio output apparatus, such as audio loop, secondary MIC loop etc.) when carrying out audio-frequency test, AudioPolicyManage needs the logic strategy of logic strategy and the audio output apparatus simultaneously arranging audio input device, then applying unit 101 realizes the playback of voice data by calling AudioRecord1031 and AudioTrack1032, and then at AudioRecord1031, AudioTrack1032, AudioFlinger1042, the path of an audio-frequency test is set up between audio input device and audio output apparatus, in the process of start function calling AudioRecord1031 and AudioTrack1032, AudioFlinger1042 can remove the logic strategy of logic strategy and the audio output apparatus calling the audio input device in AudioPolicyManage, the mark of audio input device to be tested is obtained from the logic strategy of audio input device, the mark of audio output apparatus to be tested is obtained from the logic strategy of audio output apparatus, and the mark of this audio input device and the mark of this audio output apparatus are sent to AudioHAL1051, AudioHAL1051 call to should audio input device access control Interface Controller audio frequency kernel unit 106 open this audio input device, and call to should audio output apparatus access control Interface Controller audio frequency kernel unit 106 open this audio output apparatus, user passes through the incoming voice data of audio input device, AudioFlinger1042 sends this voice data to AudioRecord1031 and records, AudioRecord1031 sends this voice data to AudioTrack1032, this voice data is played back by AudioTrack1032, AudioFlinger1042 sends this voice data to audio output apparatus and plays out, by the sound heard, test user judges that whether this audio loop is normal, wherein, the voice data recorded can be transmitted to buffer area Buffer by AudioRecord1031, AudioTrack1032 reads voice data from Buffer and plays out.
Such as, if user needs audio loop is carried out audio-frequency test, then audio input device is designated the mark that main MIC is corresponding, audio output apparatus is designated the mark that receiver is corresponding, then main MIC mark and receiver mark are sent to AudioHAL1051 by AudioFlinger1042, AudioHAL1051 opens main MIC according to each self-corresponding access control Interface Controller audio frequency kernel unit 106 of main MIC and receiver and receiver carries out audio-frequency test, when testing, user speaks facing to main MIC, the voice data that main MIC receives is recorded by AudioRecord1031, and played back by AudioTrack1032, and then played back by receiver, by the sound that receiver is play, user judges that whether main MIC and receiver be normal, if can normally be heard the content of speaking of user by receiver, then show that main MIC and receiver are all normal, if cannot the content of speaking of normal play user from receiver, then show that main MIC and receiver are likely to have one there is a problem, now can again receiver individually be tested, if test can the sound of 1khz of normal play AudioTrack1032 playback to receiver, then show that receiver is normal, and then may determine that it is that main MIC there is a problem, if showing that receiver there is a problem by receiver being carried out individually test, then main MIC is likely to be normally, it could also be possible that it is abnormal, if need to accurately judge, whether main MIC is normal, individually main MIC can also be carried out audio-frequency test, namely first pass through AudioRecord1031 and the main MIC voice data received is carried out Record and Save, play out again through the normal audio output apparatus of test and judge that whether main MIC is normal accurately.
Audio test system in the embodiment of the present invention, applying unit receives the audio-frequency test instruction that user triggers, by Application service element and local audio service unit AudioFlinger, this audio-frequency test instruction is sent to hardware abstraction unit, hardware abstraction unit controls audio frequency policy manager AudioPolicyManage according to this audio-frequency test instruction and arranges the logic strategy of audio frequency apparatus, when applying unit calls audio-record broadcast unit, AudioFlinger calls the logic strategy of the audio frequency apparatus in AudioPolicyManager, and from the logic strategy of this audio frequency apparatus, obtain the mark of audio frequency apparatus, and the mark of audio frequency apparatus is sent to hardware abstraction unit, hardware abstraction unit is opened audio frequency apparatus according to the mark control audio frequency kernel unit of this audio frequency apparatus and is carried out audio-frequency test, thus realizing audio frequency apparatus is carried out audio-frequency test, reduce the complexity of existing terminal audio frequency test and not convenient property, audio-frequency test can be carried out for the audio frequency apparatus that in terminal, any one is independent, improve the accuracy of audio-frequency test, the popularity of convenience and application.
Refer to the schematic flow sheet that Fig. 2, Fig. 2 are a kind of audio testing methods that the embodiment of the present invention provides. This audio testing method is applied to audio test system, and this audio test system includes audio-record broadcast unit and audio frequency kernel unit, as in figure 2 it is shown, this audio testing method can include but not limited to following steps.
The audio-frequency test instruction that S201, reception user trigger, audio-frequency test instruction includes the mark of audio frequency apparatus.
The associated description that the implementing of step S201 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 applying unit 101, repeats no more herein.
S203, arranging the logic strategy of audio frequency apparatus according to audio-frequency test instruction, the logic strategy of audio frequency apparatus includes the mark of audio frequency apparatus.
The implementing of step S203 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 Application service element 102, the associated description of local service unit 104 and hardware abstraction unit 105, repeats no more herein.
S205, in the process calling audio-record broadcast unit, call the logic strategy of audio frequency apparatus, and from the logic strategy of audio frequency apparatus, obtain the mark of audio frequency apparatus.
Step S205 in the embodiment of the present invention implements the associated description being referred to embodiment illustrated in fig. 1 sound intermediate frequency recorded broadcast unit 103 and local service unit 104, repeats no more herein.
S207, control audio frequency kernel unit according to the mark of audio frequency apparatus and open audio frequency apparatus and carry out audio-frequency test.
The associated description that the implementing of step S207 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 hardware abstraction unit 105 and audio frequency kernel unit 106, repeats no more herein.
Refer to the schematic flow sheet that Fig. 3, Fig. 3 are the another kind of audio testing methods that the embodiment of the present invention provides. This audio testing method is applied to audio test system, this audio test system includes audio-record broadcast unit and audio frequency kernel unit, audio-record broadcast unit includes audio playing unit AudioTrack, audio frequency apparatus includes audio output apparatus, as it is shown on figure 3, this audio testing method can include but not limited to following steps.
The audio-frequency test instruction that S301, reception user trigger, audio-frequency test instruction includes the mark of audio output apparatus.
The associated description that the implementing of step S301 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 applying unit 101, repeats no more herein.
S303, arranging the logic strategy of audio output apparatus according to audio-frequency test instruction, the logic strategy of audio output apparatus includes the mark of audio output apparatus.
The implementing of step S303 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 Application service element 102, the associated description of local service unit 104 and hardware abstraction unit 105, repeats no more herein.
S305, in the process calling AudioTrack, call the logic strategy of audio output apparatus, and from the logic strategy of audio output apparatus, obtain the mark of audio output apparatus.
Step S305 in the embodiment of the present invention implements the associated description being referred to embodiment illustrated in fig. 1 sound intermediate frequency recorded broadcast unit 103 and local service unit 104, repeats no more herein.
S307, controlling audio frequency kernel unit according to the mark of audio output apparatus and open audio output apparatus and carry out audio-frequency test, when audio output apparatus is carried out audio-frequency test, the voice data of broadcasting is exported by AudioTrack by audio output apparatus.
The associated description that the implementing of step S307 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 hardware abstraction unit 105 and audio frequency kernel unit 106, repeats no more herein.
Refer to the schematic flow sheet that Fig. 4, Fig. 4 are the another kind of audio testing methods that the embodiment of the present invention provides. This audio testing method is applied to audio test system, this audio test system includes audio-record broadcast unit and audio frequency kernel unit, audio-record broadcast unit includes audio sound-recording unit AudioRecord and audio playing unit AudioTrack, audio frequency apparatus includes audio input device and audio output apparatus, as shown in Figure 4, this audio testing method can include but not limited to following steps.
The audio-frequency test instruction that S401, reception user trigger, audio-frequency test instruction includes the mark of audio input device and the mark of audio output apparatus.
The associated description that the implementing of step S401 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 applying unit 101, repeats no more herein.
S403, the logic strategy of audio input device and the logic strategy of audio output apparatus are set according to audio-frequency test instruction, the logic strategy of audio input device includes the mark of audio input device, and the logic strategy of audio output apparatus includes the mark of audio output apparatus.
The implementing of step S403 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 Application service element 102, the associated description of local service unit 104 and hardware abstraction unit 105, repeats no more herein.
S405, in the process calling AudioRecord and AudioTrack, call the logic strategy of audio input device and the logic strategy of audio output apparatus, and from the logic strategy of audio input device, obtain the mark of audio input device, and from the logic strategy of audio output apparatus, obtain the mark of audio output apparatus.
Step S405 in the embodiment of the present invention implements the associated description being referred to embodiment illustrated in fig. 1 sound intermediate frequency recorded broadcast unit 103 and local service unit 104, repeats no more herein.
S407, control audio frequency kernel unit according to the mark of audio input device and open audio input device and carry out audio-frequency test, and control audio frequency kernel unit according to the mark of audio output apparatus and open audio output apparatus and carry out audio-frequency test, when audio input device and audio output apparatus are carried out audio-frequency test, the voice data that audio input device is got by AudioRecord is recorded, AudioTrack plays the AudioRecord voice data recorded, and is exported by audio output apparatus by the voice data of broadcasting.
The associated description that the implementing of step S407 in the embodiment of the present invention is referred in embodiment illustrated in fig. 1 hardware abstraction unit 105 and audio frequency kernel unit 106, repeats no more herein.
The above-mentioned method illustrating the embodiment of the present invention, following for being easy to implement better the such scheme of the embodiment of the present invention, correspondingly, is also provided below for coordinating the associated terminal implementing such scheme.
Refer to the structural representation that Fig. 5, Fig. 5 are a kind of terminals that the embodiment of the present invention provides. This terminal includes audio test system, and audio test system includes audio-record broadcast unit and audio frequency kernel unit, as it is shown in figure 5, this terminal 50 includes: receives unit 501, arrange unit 503, acquiring unit 505 and control unit 507, wherein,
Receiving unit 501, for receiving the audio-frequency test instruction that user triggers, audio-frequency test instruction includes the mark of audio frequency apparatus;
The unit 501 that receives in the embodiment of the present invention can be corresponding to the associated description of applying unit 101 in embodiment illustrated in fig. 1, repeats no more herein.
Arranging unit 503, for arranging the logic strategy of audio frequency apparatus according to audio-frequency test instruction, the logic strategy of audio frequency apparatus includes the mark of audio frequency apparatus;
The unit 503 that arranges in the embodiment of the present invention can be corresponding to the associated description of Application service element 102, local service unit 104 and hardware abstraction unit 105 in embodiment illustrated in fig. 1, repeats no more herein.
Acquiring unit 505, for, in the process calling audio-record broadcast unit, calling the logic strategy of audio frequency apparatus, and obtain the mark of audio frequency apparatus from the logic strategy of audio frequency apparatus;
Acquiring unit 505 in the embodiment of the present invention can the corresponding associated description with reference to embodiment illustrated in fig. 1 sound intermediate frequency recorded broadcast unit 103 and local service unit 104, repeat no more herein.
Control unit 507, opens audio frequency apparatus for the mark control audio frequency kernel unit according to audio frequency apparatus and carries out audio-frequency test.
Control unit 507 in the embodiment of the present invention can the corresponding associated description with reference to hardware abstraction unit 105 in embodiment illustrated in fig. 1 and audio frequency kernel unit 106, repeat no more herein.
As the optional embodiment of one, audio-record broadcast unit includes audio playing unit AudioTrack, and audio frequency apparatus includes audio output apparatus; Arrange unit 503 specifically for:
Arrange the logic strategy of audio output apparatus according to audio-frequency test instruction, the logic strategy of audio output apparatus includes the mark of audio output apparatus;
Acquiring unit 505 specifically for:
In the process calling AudioTrack, call the logic strategy of audio output apparatus, and from the logic strategy of audio output apparatus, obtain the mark of audio output apparatus;
Control unit 507 specifically for:
Mark control audio frequency kernel unit according to audio output apparatus is opened audio output apparatus and is carried out audio-frequency test, and when audio output apparatus is carried out audio-frequency test, the voice data of broadcasting is exported by AudioTrack by audio output apparatus.
As the optional embodiment of another kind, audio-record broadcast unit includes audio sound-recording unit AudioRecord and audio playing unit AudioTrack, and audio frequency apparatus includes audio input device and audio output apparatus; Arrange unit 503 specifically for:
The logic strategy of audio input device and the logic strategy of audio output apparatus are set according to audio-frequency test instruction, the logic strategy of audio input device includes the mark of audio input device, and the logic strategy of audio output apparatus includes the mark of audio output apparatus;
Acquiring unit 505 specifically for:
In the process calling AudioRecord and AudioTrack, call the logic strategy of audio input device and the logic strategy of audio output apparatus, and from the logic strategy of audio input device, obtain the mark of audio input device, and from the logic strategy of audio output apparatus, obtain the mark of audio output apparatus;
Control unit 507 specifically for:
Mark control audio frequency kernel unit according to audio input device is opened audio input device and is carried out audio-frequency test, and control audio frequency kernel unit according to the mark of audio output apparatus and open audio output apparatus and carry out audio-frequency test, when audio input device and audio output apparatus are carried out audio-frequency test, the voice data that audio input device is got by AudioRecord is recorded, AudioTrack plays the AudioRecord voice data recorded, and is exported by audio output apparatus by the voice data of broadcasting.
Will be understood that, the unit that each functional unit of the terminal 50 of the present embodiment is tested in system 100 with embodiment illustrated in fig. 1 sound intermediate frequency is corresponding, the function of each functional unit can embodiment sound intermediate frequency shown in Figure 1 test system 100 associated description, repeat no more herein.
Refer to Fig. 6, be the structural representation of another kind of terminal provided by the invention. Wherein, as shown in Figure 6, terminal 60 may include that at least one processor 601, for instance CPU, at least one bus 602, at least one input terminal 603 and at least one outlet terminal 604, memorizer 605. Wherein, bus 602 is for realizing the communication connection between these assemblies; The contact panel of input terminal 603 concretely terminal, including touch screen and touch screen, for detecting the operational order in terminal touch panel; Outlet terminal 604 can include the display screen (Display) of terminal, is used for exporting, showing image or data, and outlet terminal 604 can also include loudspeaker, is used for playing audio frequency; Memorizer 605 can be high-speed RAM display, can also be non-labile display (non-volatilememory), such as at least one disk display, memorizer 605 optionally can also is that at least one is located remotely from the display terminal of aforementioned processor 601. As shown in Figure 6, as the memorizer 605 of a kind of Computer display medium can include operating system, network communication unit, user interface section and audio-frequency test program.
In the terminal 60 shown in Fig. 6, processor 601 may be used for the audio-frequency test program of storage in run memory 605, and performs following operation:
Receiving, by input terminal 603, the audio-frequency test instruction that user triggers, audio-frequency test instruction includes the mark of audio frequency apparatus;
Arrange the logic strategy of audio frequency apparatus according to audio-frequency test instruction, the logic strategy of audio frequency apparatus includes the mark of audio frequency apparatus;
In the process calling audio-record broadcast unit, call the logic strategy of audio frequency apparatus, and from the logic strategy of audio frequency apparatus, obtain the mark of audio frequency apparatus;
Mark control audio frequency kernel unit according to audio frequency apparatus is opened audio frequency apparatus and is carried out audio-frequency test.
Further, audio-record broadcast unit includes audio playing unit AudioTrack, and audio frequency apparatus includes audio output apparatus; Processor 601 performs to arrange the logic strategy of audio frequency apparatus according to audio-frequency test instruction, including:
Arrange the logic strategy of audio output apparatus according to audio-frequency test instruction, the logic strategy of audio output apparatus includes the mark of audio output apparatus;
Processor 601 performs in the process calling audio-record broadcast unit, calls the logic strategy of audio frequency apparatus, and obtains the mark of audio frequency apparatus from the logic strategy of audio frequency apparatus, including:
In the process calling AudioTrack, call the logic strategy of audio output apparatus, and from the logic strategy of audio output apparatus, obtain the mark of audio output apparatus;
Processor 601 performs mark according to audio frequency apparatus and controls audio frequency kernel unit and open audio frequency apparatus and carry out audio-frequency test, including:
Mark control audio frequency kernel unit according to audio output apparatus is opened audio output apparatus and is carried out audio-frequency test, and when audio output apparatus is carried out audio-frequency test, the voice data of broadcasting is exported by AudioTrack by audio output apparatus.
Further, audio-record broadcast unit includes audio sound-recording unit AudioRecord and audio playing unit AudioTrack, and audio frequency apparatus includes audio input device and audio output apparatus; Processor 601 performs to arrange the logic strategy of audio frequency apparatus according to audio-frequency test instruction, including:
The logic strategy of audio input device and the logic strategy of audio output apparatus are set according to audio-frequency test instruction, the logic strategy of audio input device includes the mark of audio input device, and the logic strategy of audio output apparatus includes the mark of audio output apparatus;
Processor 601 performs in the process calling audio-record broadcast unit, calls the logic strategy of audio frequency apparatus, and obtains the mark of audio frequency apparatus from the logic strategy of audio frequency apparatus, including:
In the process calling AudioRecord and AudioTrack, call the logic strategy of audio input device and the logic strategy of audio output apparatus, and from the logic strategy of audio input device, obtain the mark of audio input device, and from the logic strategy of audio output apparatus, obtain the mark of audio output apparatus;
Processor 601 performs mark according to audio frequency apparatus and controls audio frequency kernel unit and open audio frequency apparatus and carry out audio-frequency test, including:
Mark control audio frequency kernel unit according to audio input device is opened audio input device and is carried out audio-frequency test, and control audio frequency kernel unit according to the mark of audio output apparatus and open audio output apparatus and carry out audio-frequency test, when audio input device and audio output apparatus are carried out audio-frequency test, the voice data that audio input device is got by AudioRecord is recorded, AudioTrack plays the AudioRecord voice data recorded, and is exported by audio output apparatus by the voice data of broadcasting.
It will be appreciated that the execution step of processor 601 specifically referring to the content of Fig. 1 embodiment, can repeat no more here.
In sum, applying unit receives the audio-frequency test instruction that user triggers, by Application service element and local audio service unit AudioFlinger, this audio-frequency test instruction is sent to hardware abstraction unit, hardware abstraction unit controls audio frequency policy manager AudioPolicyManage according to this audio-frequency test instruction and arranges the logic strategy of audio frequency apparatus, when applying unit calls audio-record broadcast unit, AudioFlinger calls the logic strategy of the audio frequency apparatus in AudioPolicyManager, and from the logic strategy of this audio frequency apparatus, obtain the mark of audio frequency apparatus, and the mark of audio frequency apparatus is sent to hardware abstraction unit, hardware abstraction unit is opened audio frequency apparatus according to the mark control audio frequency kernel unit of this audio frequency apparatus and is carried out audio-frequency test, thus realizing audio frequency apparatus is carried out audio-frequency test, reduce the complexity of existing terminal audio frequency test and not convenient property, audio-frequency test can be carried out for the audio frequency apparatus that in terminal, any one is independent, improve the accuracy of audio-frequency test, the popularity of convenience and application.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can be by the hardware that computer program carrys out instruction relevant to complete, described program can be stored in a computer read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.
Step in embodiment of the present invention method can carry out order according to actual needs and adjust, merges and delete.
Unit in embodiment of the present invention terminal can merge according to actual needs, divides and delete.
Above disclosed it is only one preferred embodiment of the present invention, certainly the interest field of the present invention can not be limited with this, one of ordinary skill in the art will appreciate that all or part of flow process realizing above-described embodiment, and according to the equivalent variations that the claims in the present invention are made, still fall within the scope that invention is contained.

Claims (10)

1. an audio test system, it is characterised in that described audio test system includes:
Applying unit, for receiving the audio-frequency test instruction that user triggers, and sends described audio-frequency test instruction to Application service element, and described audio-frequency test instruction includes the mark of audio frequency apparatus;
Described Application service element, for sending described audio-frequency test instruction to hardware abstraction unit by the local audio service unit AudioFlinger in described audio test system;
Described hardware abstraction unit, arranges the logic strategy of audio frequency apparatus for controlling audio frequency policy manager AudioPolicyManager according to described audio-frequency test instruction, and the logic strategy of described audio frequency apparatus includes the mark of described audio frequency apparatus;
Call in the process of audio-record broadcast unit of described audio test system at described applying unit, described AudioFlinger, for calling the logic strategy of the described audio frequency apparatus in described AudioPolicyManager, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus;
Described AudioFlinger, is additionally operable to send to described hardware abstraction unit the mark of described audio frequency apparatus;
Described hardware abstraction unit, is additionally operable to the mark according to described audio frequency apparatus and controls the audio frequency kernel unit of described audio test system and open described audio frequency apparatus and carry out audio-frequency test.
2. system according to claim 1, it is characterised in that described audio-record broadcast unit includes audio playing unit AudioTrack, and described audio frequency apparatus includes audio output apparatus; Described hardware abstraction unit, arranges the logic strategy of audio frequency apparatus for controlling audio frequency policy manager AudioPolicyManager according to described audio-frequency test instruction, including:
Described hardware abstraction unit, arranging the logic strategy of audio output apparatus for controlling audio frequency policy manager AudioPolicyManager according to described audio-frequency test instruction, the logic strategy of described audio output apparatus includes the mark of described audio output apparatus;
Described call in the process of audio-record broadcast unit of described audio test system at described applying unit, described AudioFlinger, for calling the logic strategy of the described audio frequency apparatus in described AudioPolicyManager, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus, including:
Call in the process of described AudioTrack at described applying unit, described AudioFlinger, for calling the logic strategy of the described audio output apparatus in described AudioPolicyManager, and from the logic strategy of described audio output apparatus, obtain the mark of described audio output apparatus;
Described hardware abstraction unit, is additionally operable to the mark according to described audio frequency apparatus and controls the audio frequency kernel unit of described audio test system and open described audio frequency apparatus and carry out audio-frequency test, including:
Described hardware abstraction unit, it is additionally operable to the mark according to described audio output apparatus control the audio frequency kernel unit of described audio test system and open described audio output apparatus and carry out audio-frequency test, when described audio output apparatus is carried out audio-frequency test, the voice data of broadcasting is exported by described AudioTrack by described audio output apparatus.
3. system according to claim 1, it is characterised in that described audio-record broadcast unit includes audio sound-recording unit AudioRecord and audio playing unit AudioTrack, and described audio frequency apparatus includes audio input device and audio output apparatus; Described hardware abstraction unit, arranges the logic strategy of audio frequency apparatus for controlling audio frequency policy manager AudioPolicyManager according to described audio-frequency test instruction, including:
Described hardware abstraction unit, for controlling audio frequency policy manager AudioPolicyManager according to described audio-frequency test instruction, the logic strategy of audio input device and the logic strategy of audio output apparatus are set, the logic strategy of described audio input device includes the mark of described audio input device, and the logic strategy of described audio output apparatus includes the mark of described audio output apparatus;
Described call in the process of audio-record broadcast unit of described audio test system at described applying unit, described AudioFlinger, for calling the logic strategy of the described audio frequency apparatus in described AudioPolicyManager, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus, including:
Call in the process of described AudioRecord and described AudioTrack at described applying unit, described AudioFlinger, the logic strategy of logic strategy and described audio output apparatus for calling the described audio input device in described AudioPolicyManager, and from the logic strategy of described audio input device, obtain the mark of described audio input device, and from the logic strategy of described audio output apparatus, obtain the mark of described audio output apparatus;
Described hardware abstraction unit, is additionally operable to the mark according to described audio frequency apparatus and controls the audio frequency kernel unit of described audio test system and open described audio frequency apparatus and carry out audio-frequency test, including:
Described hardware abstraction unit, it is additionally operable to mark according to described audio input device control described audio frequency kernel unit and open described audio input device and carry out audio-frequency test, and control the audio frequency kernel unit of described audio test system according to the mark of described audio output apparatus and open described audio output apparatus and carry out audio-frequency test, when described audio input device and described audio output apparatus are carried out audio-frequency test, the voice data that described audio input device gets is recorded by described AudioRecord, described AudioTrack plays the described AudioRecord described voice data recorded, and the described voice data play is exported by described audio output apparatus.
4. an audio testing method, it is characterised in that be applied to audio test system, described audio test system includes audio-record broadcast unit and audio frequency kernel unit; Described method includes:
Receiving the audio-frequency test instruction that user triggers, described audio-frequency test instruction includes the mark of audio frequency apparatus;
Arrange the logic strategy of audio frequency apparatus according to described audio-frequency test instruction, the logic strategy of described audio frequency apparatus includes the mark of described audio frequency apparatus;
In the process calling described audio-record broadcast unit, call the logic strategy of described audio frequency apparatus, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus;
The described audio frequency kernel unit of mark control according to described audio frequency apparatus is opened described audio frequency apparatus and is carried out audio-frequency test.
5. method according to claim 4, it is characterised in that described audio-record broadcast unit includes audio playing unit AudioTrack, and described audio frequency apparatus includes audio output apparatus; The described logic strategy that audio frequency apparatus is set according to described audio-frequency test instruction, including:
Arrange the logic strategy of audio output apparatus according to described audio-frequency test instruction, the logic strategy of described audio output apparatus includes the mark of described audio output apparatus;
Described in the process calling described audio-record broadcast unit, call the logic strategy of described audio frequency apparatus, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus, including:
In the process calling described AudioTrack, call the logic strategy of described audio output apparatus, and from the logic strategy of described audio output apparatus, obtain the mark of described audio output apparatus;
The described described audio frequency kernel unit of mark control according to described audio frequency apparatus is opened described audio frequency apparatus and is carried out audio-frequency test, including:
The described audio frequency kernel unit of mark control according to described audio output apparatus is opened described audio output apparatus and is carried out audio-frequency test, when described audio output apparatus is carried out audio-frequency test, the voice data of broadcasting is exported by described AudioTrack by described audio output apparatus.
6. method according to claim 4, it is characterised in that described audio-record broadcast unit includes audio sound-recording unit AudioRecord and audio playing unit AudioTrack, and described audio frequency apparatus includes audio input device and audio output apparatus; The described logic strategy that audio frequency apparatus is set according to described audio-frequency test instruction, including:
The logic strategy of audio input device and the logic strategy of audio output apparatus are set according to described audio-frequency test instruction, the logic strategy of described audio input device includes the mark of described audio input device, and the logic strategy of described audio output apparatus includes the mark of described audio output apparatus;
Described in the process calling described audio-record broadcast unit, call the logic strategy of described audio frequency apparatus, and from the logic strategy of described audio frequency apparatus, obtain the mark of described audio frequency apparatus, including:
In the process calling described AudioRecord and described AudioTrack, call the logic strategy of described audio input device and the logic strategy of described audio output apparatus, and from the logic strategy of described audio input device, obtain the mark of described audio input device, and from the logic strategy of described audio output apparatus, obtain the mark of described audio output apparatus;
The described described audio frequency kernel unit of mark control according to described audio frequency apparatus is opened described audio frequency apparatus and is carried out audio-frequency test, including:
The described audio frequency kernel unit of mark control according to described audio input device is opened described audio input device and is carried out audio-frequency test, and control described audio frequency kernel unit according to the mark of described audio output apparatus and open described audio output apparatus and carry out audio-frequency test, when described audio input device and described audio output apparatus are carried out audio-frequency test, the voice data that described audio input device gets is recorded by described AudioRecord, described AudioTrack plays the described AudioRecord described voice data recorded, and the described voice data play is exported by described audio output apparatus.
7. a terminal, it is characterised in that include audio test system, described audio test system includes audio-record broadcast unit and audio frequency kernel unit; Described terminal includes:
Receiving unit, for receiving the audio-frequency test instruction that user triggers, described audio-frequency test instruction includes the mark of audio frequency apparatus;
Arranging unit, for arranging the logic strategy of audio frequency apparatus according to described audio-frequency test instruction, the logic strategy of described audio frequency apparatus includes the mark of described audio frequency apparatus;
Acquiring unit, for, in the process calling described audio-record broadcast unit, calling the logic strategy of described audio frequency apparatus, and obtain the mark of described audio frequency apparatus from the logic strategy of described audio frequency apparatus;
Control unit, opens described audio frequency apparatus for the described audio frequency kernel unit of mark control according to described audio frequency apparatus and carries out audio-frequency test.
8. terminal according to claim 7, it is characterised in that described audio-record broadcast unit includes audio playing unit AudioTrack, and described audio frequency apparatus includes audio output apparatus; Described arrange unit specifically for:
Arrange the logic strategy of audio output apparatus according to described audio-frequency test instruction, the logic strategy of described audio output apparatus includes the mark of described audio output apparatus;
Described acquiring unit specifically for:
In the process calling described AudioTrack, call the logic strategy of described audio output apparatus, and from the logic strategy of described audio output apparatus, obtain the mark of described audio output apparatus;
Described control unit specifically for:
The described audio frequency kernel unit of mark control according to described audio output apparatus is opened described audio output apparatus and is carried out audio-frequency test, when described audio output apparatus is carried out audio-frequency test, the voice data of broadcasting is exported by described AudioTrack by described audio output apparatus.
9. terminal according to claim 7, it is characterised in that described audio-record broadcast unit includes audio sound-recording unit AudioRecord and audio playing unit AudioTrack, and described audio frequency apparatus includes audio input device and audio output apparatus; Described arrange unit specifically for:
The logic strategy of audio input device and the logic strategy of audio output apparatus are set according to described audio-frequency test instruction, the logic strategy of described audio input device includes the mark of described audio input device, and the logic strategy of described audio output apparatus includes the mark of described audio output apparatus;
Described acquiring unit specifically for:
In the process calling described AudioRecord and described AudioTrack, call the logic strategy of described audio input device and the logic strategy of described audio output apparatus, and from the logic strategy of described audio input device, obtain the mark of described audio input device, and from the logic strategy of described audio output apparatus, obtain the mark of described audio output apparatus;
Described control unit specifically for:
The described audio frequency kernel unit of mark control according to described audio input device is opened described audio input device and is carried out audio-frequency test, and control described audio frequency kernel unit according to the mark of described audio output apparatus and open described audio output apparatus and carry out audio-frequency test, when described audio input device and described audio output apparatus are carried out audio-frequency test, the voice data that described audio input device gets is recorded by described AudioRecord, described AudioTrack plays the described AudioRecord described voice data recorded, and the described voice data play is exported by described audio output apparatus.
10. the terminal according to any one of claim 7-9, it is characterized in that, described audio test system includes controlling described audio frequency kernel unit and individually opens the access control interface of any one audio frequency apparatus, and described audio frequency kernel unit comprises the hardware control interface individually opening any one audio frequency apparatus.
CN201610013519.2A 2016-01-08 2016-01-08 A kind of audio testing method, terminal and system Active CN105657632B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610013519.2A CN105657632B (en) 2016-01-08 2016-01-08 A kind of audio testing method, terminal and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610013519.2A CN105657632B (en) 2016-01-08 2016-01-08 A kind of audio testing method, terminal and system

Publications (2)

Publication Number Publication Date
CN105657632A true CN105657632A (en) 2016-06-08
CN105657632B CN105657632B (en) 2019-05-14

Family

ID=56484195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610013519.2A Active CN105657632B (en) 2016-01-08 2016-01-08 A kind of audio testing method, terminal and system

Country Status (1)

Country Link
CN (1) CN105657632B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108366160A (en) * 2018-01-26 2018-08-03 努比亚技术有限公司 Audio testing method, mobile terminal and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103456330A (en) * 2013-09-09 2013-12-18 深圳市诺威达科技有限公司 Audio control method and device
CN103729274A (en) * 2013-12-31 2014-04-16 广州华多网络科技有限公司 Method and system for detecting audio faults
CN104090766A (en) * 2014-07-17 2014-10-08 广东欧珀移动通信有限公司 Sound effect switching method and system for mobile terminal
US20140358262A1 (en) * 2013-05-29 2014-12-04 Microsoft Multiple concurrent audio modes
CN104536718A (en) * 2014-12-29 2015-04-22 珠海全志科技股份有限公司 Method for directly transmitting audio materials in multiple paths to different audio devices based on android
CN104731604A (en) * 2015-04-07 2015-06-24 锤子软件(北京)有限公司 Method and system for determining application program playing sound currently

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140358262A1 (en) * 2013-05-29 2014-12-04 Microsoft Multiple concurrent audio modes
CN103456330A (en) * 2013-09-09 2013-12-18 深圳市诺威达科技有限公司 Audio control method and device
CN103729274A (en) * 2013-12-31 2014-04-16 广州华多网络科技有限公司 Method and system for detecting audio faults
CN104090766A (en) * 2014-07-17 2014-10-08 广东欧珀移动通信有限公司 Sound effect switching method and system for mobile terminal
CN104536718A (en) * 2014-12-29 2015-04-22 珠海全志科技股份有限公司 Method for directly transmitting audio materials in multiple paths to different audio devices based on android
CN104731604A (en) * 2015-04-07 2015-06-24 锤子软件(北京)有限公司 Method and system for determining application program playing sound currently

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘楠: "基于Android平台的手机Swordfish的音频系统设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
王峻: "基于Android系统的音频架构", 《电声技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108366160A (en) * 2018-01-26 2018-08-03 努比亚技术有限公司 Audio testing method, mobile terminal and computer readable storage medium
CN108366160B (en) * 2018-01-26 2021-03-26 努比亚技术有限公司 Audio testing method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN105657632B (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN103596641B (en) A kind of audio frequency controller method and device
US10085102B2 (en) Detection of device configuration
CN107105367A (en) A kind of acoustic signal processing method and terminal
CN100382621C (en) Information processing device
WO2019109763A1 (en) Method and audio system for realizing multi-channel recording based on android system
CN106302997A (en) A kind of output control method, electronic equipment and system
CN106095387A (en) The audio method to set up of a kind of terminal and terminal
CN106454644A (en) Audio playing method and device
CN108366160A (en) Audio testing method, mobile terminal and computer readable storage medium
CN108710486A (en) Audio frequency playing method, device, earphone and computer readable storage medium
CN105096977A (en) Control method for multimedia playing and mobile terminal
CN102638756A (en) Mobile terminal voice frequency test method, test device and mobile terminal
KR102110515B1 (en) Hearing aid device of playing audible advertisement or audible data
CN111078448A (en) Method for processing audio abnormity and electronic equipment
CN105657632A (en) Audio test method and system and terminal
CN110097897A (en) A kind of Android device recording multiplexing method and system
CN110290441A (en) A kind of wireless headset control method, device and wireless headset and storage medium
CN104794074B (en) External equipment recognition methods and device
KR100619859B1 (en) Method for carrying out mp3 mode only function in mobile communication device
CN107580102A (en) Earphone and the method for earphone recording
CN106303841A (en) The changing method of a kind of audio frequency broadcast mode and mobile terminal
CN106878284A (en) The control method and device of media play function in multisystem
CN110365371A (en) The method and its system, electronic equipment that trigger signal realizes translation system control are provided based on bluetooth equipment
CN110032356A (en) Information processing method and electronic equipment
CN109814798A (en) Ear returns function control method, device and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210716

Address after: 518057 Desai Science and Technology Building, 9789 Shennan Avenue, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province, 17th Floor (15th Floor of Natural Floor) 1702-1703

Patentee after: Shenzhen Microphone Holdings Co.,Ltd.

Address before: 518040 21 floor, east block, Times Technology Building, 7028 Shennan Road, Futian District, Shenzhen, Guangdong.

Patentee before: DONGGUAN GOLDEX COMMUNICATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right