CN109743668A - A kind of audio testing method and equipment - Google Patents

A kind of audio testing method and equipment Download PDF

Info

Publication number
CN109743668A
CN109743668A CN201910009294.7A CN201910009294A CN109743668A CN 109743668 A CN109743668 A CN 109743668A CN 201910009294 A CN201910009294 A CN 201910009294A CN 109743668 A CN109743668 A CN 109743668A
Authority
CN
China
Prior art keywords
audio
data
ble
measured
format
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
CN201910009294.7A
Other languages
Chinese (zh)
Other versions
CN109743668B (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 Space Time Kettle Technology Co Ltd
Original Assignee
Shenzhen Space Time Kettle 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 Shenzhen Space Time Kettle Technology Co Ltd filed Critical Shenzhen Space Time Kettle Technology Co Ltd
Priority to CN201910009294.7A priority Critical patent/CN109743668B/en
Publication of CN109743668A publication Critical patent/CN109743668A/en
Application granted granted Critical
Publication of CN109743668B publication Critical patent/CN109743668B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present invention proposes a kind of audio testing method and equipment, is applied to include BLE object to be measured, intermediate ends, in the system of SPDIF audio-frequency test instrument, wherein this method comprises: obtaining audio data acquired in the MIC of BLE object to be measured by intermediate ends;The audio data is sent to internal I2S interface by the intermediate ends;SPDIF format will be converted to by the audio data of I2S interface by the intermediate ends, and be converted into the audio data after SPDIF format and be sent on SPDIF audio-frequency test instrument to carry out analysis test.In this programme by the way that the audio data of BLE object is converted to SPDIF format after, be linked on mature SPDIF wireline audio test equipment, realize and test is automatically analyzed to BLE audio product.

Description

A kind of audio testing method and equipment
Technical field
The present invention relates to audio-frequency test field, in particular to a kind of audio testing method and equipment.
Background technique
Existing bluetooth headset is all based on classical Bluetooth technology, and existing bluetooth headset audio-frequency test instrument is also all based on Classical Bluetooth technology.But low-power consumption BLE Bluetooth technology development in recent years is swift and violent, the audio product land based on BLE transmission technology Continuous listing.
BLE audio product be possible to assembling link because sealing gas leakage or sound outlet be plugged cause it is bad;Furthermore BLE Wearable product will not reserve other wireline interfaces because small in size, and classical Bluetooth audio frequency test equipment test side general at present What formula was tested using in a manual manner, specific test is to pass through plug wire to output interface in a manual manner Mode detected, monitoring personnel listens to the sound that plug wire is transmitted after needing plug wire to judge whether output interface good Good, this mode is time-consuming and laborious to be easy to generate human error, can not can not also be answered in face of the BLE product of not valid interface The test of current large-scale BLE audio product is needed.
Summary of the invention
In view of this, the invention proposes a kind of audio testing method and equipment, to realize the automation sound of BLE product Frequency is tested.
Specifically, the invention proposes embodiments in detail below:
The embodiment of the present invention proposes a kind of audio testing method, is applied to include BLE object to be measured, intermediate ends, SPDIF In the system of audio-frequency test instrument, this method comprises: obtaining audio number acquired in the MIC of BLE object to be measured by intermediate ends According to;The audio data is sent to internal I2S interface by the intermediate ends;It will be connect by I2S by the intermediate ends The audio data of mouth is converted to SPDIF format, and is converted into the audio data after SPDIF format and is sent to the survey of SPDIF audio Analysis test is carried out on test instrument.
In a specific embodiment, it before the audio data acquired in the MIC for acquiring BLE object to be measured, also wraps It includes: the data acquisition parameters by the way that the MIC is arranged on the BLE object to be measured, and acquisition parameter is logical based on the data It crosses the MIC and carries out audio data collecting;By the adc interface in the BLE object to be measured to MIC audio collected Data are sampled, and carry out data buffering to the sampled audio data that sampling obtains;It will be described by the BLE object to be measured Sampled audio data is divided into multiple packets of audio data of default size;By the BLE object to be measured in the audio data Data packet is generated after packet addition data head control information, and the data packet is put into BLE transmit queue, described in bulk transfer Data packet is to the intermediate ends.
In a specific embodiment, the data acquisition parameters include sample rate;In the sampling sound obtained to sampling After frequency is according to progress data buffering, further includes: be based on adopting described in sample rate judgement transmission by the BLE object to be measured Whether sample audio data is more than BLE bandwidth;If the determination result is YES, then data compression is carried out to the sampled audio data, and The process for being divided into multiple packets of audio data of default size is executed to the sampled audio data Jing Guo data compression.
In a specific embodiment, the data compression includes lossless compression or lossy compression.
In a specific embodiment, the default size is 240 bytes.
In a specific embodiment, data head control information includes package identification, the information of data checking mechanisms, Compress zone bit information, the information of packet loss retransmission mechanism.
In a specific embodiment, described " data to be added in the packets of audio data by the BLE object to be measured Data packet is generated after head control information, into BLE transmit queue, with data packet described in bulk transfer to the intermediate ends ", packet It includes: through the BLE object to be measured after the data packet adds data head control information, into BLE transmit queue, being criticized Measure data transmission;Through the BLE object to be measured after bulk data transfer, BLE response is inquired, to judge whether packet loss; If the determination result is YES, then the data packet of loss is retransmitted by the BLE object to be measured;If judging result is It is no, then it is executed through the adc interface in the BLE object to be measured by the BLE object to be measured to MIC sound collected Frequency carries out the process of data buffering to the sampled audio data that sampling obtains according to being sampled.
In a specific embodiment, the intermediate ends include audio CODEC chip and for obtaining audio data BLE chip;Described " obtaining audio data acquired in the MIC of BLE object to be measured by intermediate ends " includes: by the audio CODEC chip received data packet;The data packet is stored in data receiver queue by the audio CODEC chip;Pass through institute It states audio CODEC chip to parse the data packet, to determine data head control information and packets of audio data;Pass through institute It states audio CODEC chip and packet loss is judged whether there is according to data head control information;If the determination result is YES, then by described Audio CODEC chip reissues the data packet of loss using BLE response request;By the audio CODEC chip according to the number Judge whether the packets of audio data needs to decompress according to head control information;If the determination result is YES, then pass through the audio CODEC Chip is decompressed, to generate audio data.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;" the sending the audio data to internal I2S interface by the intermediate ends " includes: will by BLE core The audio data is sent to the I2S interface connecting with the audio CODEC chip.
In a specific embodiment, described " to be converted to by the audio data of I2S interface by the intermediate ends SPDIF format, and be converted into the audio data after SPDIF format and be sent on SPDIF audio-frequency test instrument to carry out analysis survey Examination " includes: SPDIF format will to be converted to by the audio data of I2S interface by the audio CODEC chip, and will convert It is sent on SPDIF audio-frequency test instrument for the audio data after SPDIF format and carries out analysis test, to realize to the MIC Detection.
The embodiment of the present invention also proposed a kind of audio testing method, be applied to include BLE object to be measured, intermediate ends, In the system of SPDIF audio-frequency test instrument, this method comprises: sending SPDIF format test letter by SPDIF audio-frequency test instrument Number arrive intermediate ends;SPDIF format test signal is converted to the test signal of I2S format by the intermediate ends;By described Intermediate ends will be sent to BLE object to be measured for the test signal of I2S format;The SPEAKER of the BLE object to be measured is driven, with It will pass through artitificial ear and monitor the sound of the SPEAKER and be transmitted on SPDIF audio-frequency test instrument and analyzed.
In a specific embodiment, the intermediate ends include audio CODEC chip and for obtaining audio data BLE chip;Described " SPDIF format test signal is converted to the test signal of I2S format by the intermediate ends ", comprising: SPDIF format test signal is converted to the test signal of I2S format, and the test to I2S format by audio CODEC chip Signal carries out data buffering.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;Described " BLE object to be measured will be sent to by the intermediate ends for the test signal of I2S format ", comprising: pass through sound The test signal of I2S format is sent I2S interface by frequency CODEC chip;It is obtained by the BLE chip from the I2S interface The test signal of I2S format;BLE object to be measured is sent by the test signal of I2S format by the BLE chip.
In a specific embodiment, described " by the BLE chip by the test signal of I2S format be sent to Survey BLE object ", comprising: the test signal of I2S format is divided by the multiple to acoustic of default size by the BLE chip Frequency data packet, to be suitble to BLE transmission;Testing data is generated after the packets of audio data addition data head control information to be measured Packet;The testing data packet is discharged into BLE transmit queue, to carry out BLE bulk data transfer, realization sends testing data packet To BLE object to be measured.
In a specific embodiment, the SPDIF audio-frequency test instrument is previously provided with test parameter;Wherein, institute Stating test signal is that the SPDIF audio-frequency test instrument is generated based on the test parameter;It include sampling in the test parameter Rate;Further include: judge whether the test signal for transmitting I2S format exceeds the transmission bandwidth of BLE based on the sample rate;If judgement As a result be it is yes, then data compression, and the test signal of the I2S format after compressing data are carried out to the test signal of I2S format Execute the process for being divided into multiple packets of audio data to be measured of default size;If judging result be it is no, execute pass through the BLE The test signal of I2S format is divided into the process of multiple packets of audio data to be measured of default size by chip.
In a specific embodiment, the data compression includes lossless compression or lossy compression;The default size For 240 bytes.
In a specific embodiment, described " the testing data packet to be discharged into BLE transmit queue, to carry out BLE batches Data transmission is measured, realizes and sends BLE object to be measured for testing data packet ", comprising: the testing data packet is discharged into BLE hair Send queue;BLE bulk data transfer is carried out based on the BLE transmit queue, sends BLE pairs to be measured for testing data packet As, and after the completion of bulk data transfer, BLE response is inquired to determine whether packet loss;If it is determined that packet loss, then send loss to Measured data packet;If it is determined that then continuing to execute the stream for carrying out BLE bulk data transfer based on the BLE transmit queue without packet loss Journey.
In a specific embodiment, the described " SPEAKER of the driving BLE object to be measured, will pass through artitificial ear Monitor the sound of the SPEAKER and be transmitted on SPDIF audio-frequency test instrument and analyzed ", comprising: pass through BLE pairs to be measured Data receiver queue is stored in as receiving testing data packet, and by the testing data packet;By BLE object to be measured to described to be measured Data packet is parsed, and controls information with determination packets of audio data to be measured and data head;It will be described to be measured by BLE object to be measured Packets of audio data is sent to I2S interface, is I2S format by audio data tissue to be measured;Pass through the CODEC in BLE object to be measured The packets of audio data to be measured of I2S format is converted into analog signal, to drive SPEAKER by the analog signal, to lead to It crosses artitificial ear and monitors the sound of the SPEAKER and be transmitted on SPDIF audio-frequency test instrument and analyzed.
In a specific embodiment, further includes: information is controlled by the data head and judges whether that packet loss occurs;If Judgement has generation packet loss, then generates BLE response by BLE object requests to be measured to request to reissue lost testing data packet; Information is controlled by the data head by BLE object to be measured and judges whether that the packets of audio data to be measured needs to decompress;If sentencing Disconnected result be it is yes, then the packets of audio data to be measured is decompressed by BLE object to be measured, so as to based on to be measured after decompression Packets of audio data execution is sent to I2S interface, is the process of I2S format by audio data tissue to be measured.
The embodiment of the present invention also proposed a kind of audio-frequency test equipment, be applied to include BLE object to be measured, intermediate ends, In the system of SPDIF audio-frequency test instrument, which includes: acquisition module, for obtaining BLE object to be measured by intermediate ends Audio data acquired in MIC;Sending module, for sending the audio data to internal I2S by the intermediate ends Interface;Test module for will be converted to SPDIF format by the audio data of I2S interface by the intermediate ends, and will turn Audio data after being changed to SPDIF format is sent on SPDIF audio-frequency test instrument and carries out analysis test.
In a specific embodiment, further includes: dividing processing module, in the MIC institute for acquiring BLE object to be measured Before the audio data of acquisition, by the way that the data acquisition parameters of the MIC are arranged on the BLE object to be measured, and it is based on institute It states data acquisition parameters and audio data collecting is carried out by the MIC;By the adc interface in the BLE object to be measured to institute It states MIC audio data collected to be sampled, and data buffering is carried out to the sampled audio data that sampling obtains;By described The sampled audio data is divided into multiple packets of audio data of default size by BLE object to be measured;Pass through described BLE pairs to be measured As generating data packet after packets of audio data addition data head control information, and the data packet is put into BLE and sends team Column, with data packet described in bulk transfer to the intermediate ends.
In a specific embodiment, the data acquisition parameters include sample rate;Compression module, for sampling After obtained sampled audio data carries out data buffering, sample rate judgement transmission is based on by the BLE object to be measured Whether the sampled audio data is more than BLE bandwidth;If the determination result is YES, then data pressure is carried out to the sampled audio data Contracting, and the stream for being divided into multiple packets of audio data of default size is executed to the sampled audio data Jing Guo data compression Journey.
In a specific embodiment, the data compression includes lossless compression or lossy compression.
In a specific embodiment, the default size is 240 bytes.
In a specific embodiment, data head control information includes package identification, the information of data checking mechanisms, Compress zone bit information, the information of packet loss retransmission mechanism.
In a specific embodiment, the dividing processing module is " by the BLE object to be measured in the audio number Data packet is generated after controlling information according to packet addition data head, into BLE transmit queue, with data packet described in bulk transfer described in Intermediate ends ", comprising: through the BLE object to be measured after the data packet adds data head control information, sent into BLE Queue carries out bulk data transfer;Through the BLE object to be measured after bulk data transfer, BLE response is inquired, to sentence It is disconnected whether packet loss;If the determination result is YES, then the data packet of loss is retransmitted by the BLE object to be measured;If Judging result be it is no, then executed through the adc interface in the BLE object to be measured by the BLE object to be measured to the MIC Audio data collected is sampled, and the process of data buffering is carried out to the sampled audio data that sampling obtains.
In a specific embodiment, the intermediate ends include audio CODEC chip and for obtaining audio data BLE chip;The acquisition module, is used for: passing through the audio CODEC chip received data packet;Pass through the audio CODEC core The data packet is stored in data receiver queue by piece;The data packet is parsed by the audio CODEC chip, with true Determine data head control information and packets of audio data;Information is controlled according to the data head by the audio CODEC chip to sentence It is disconnected whether to have packet loss;If the determination result is YES, then loss is reissued using BLE response request by the audio CODEC chip Data packet;By the audio CODEC chip according to the data head control information judge the packets of audio data whether needs Decompression;If the determination result is YES, then it is decompressed by the audio CODEC chip, to generate audio data.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;The sending module, is used for: being sent the audio data to by BLE core and connect with the audio CODEC chip I2S interface.
In a specific embodiment, the test module, is used for: will pass through I2S by the audio CODEC chip The audio data of interface is converted to SPDIF format, and is converted into the audio data after SPDIF format and is sent to SPDIF audio Analysis test is carried out on test equipment, to realize the detection to the MIC.
The embodiment of the present invention also proposed a kind of audio-frequency test equipment, be applied to include BLE object to be measured, intermediate ends, In the system of SPDIF audio-frequency test instrument, which includes: the first sending module, for being sent out by SPDIF audio-frequency test instrument SPDIF format is sent to test signal to intermediate ends;Conversion module turns for SPDIF format to be tested signal by the intermediate ends It is changed to the test signal of I2S format;Second sending module, for will be sent out by the intermediate ends for the test signal of I2S format It is sent to BLE object to be measured;Test module is analyzed, for driving the SPEAKER of the BLE object to be measured, will pass through artitificial ear It monitors the sound of the SPEAKER and is transmitted on SPDIF audio-frequency test instrument and analyzed.
In a specific embodiment, the intermediate ends include audio CODEC chip and for obtaining audio data BLE chip;The conversion module, is used for: SPDIF format test signal being converted to I2S format by audio CODEC chip Signal is tested, and data buffering is carried out to the test signal of I2S format.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;Second sending module, is used for: sending I2S for the test signal of I2S format by audio CODEC chip and connects Mouthful;The test signal of I2S format is obtained from the I2S interface by the BLE chip;By the BLE chip by I2S format Test signal be sent to BLE object to be measured.
In a specific embodiment, second sending module is " by the BLE chip by the test of I2S format Signal is sent to BLE object to be measured ", comprising: the test signal of I2S format is divided by default size by the BLE chip Multiple packets of audio data to be measured, be suitble to BLE transmission;It is raw after the packets of audio data addition data head control information to be measured At testing data packet;The testing data packet is discharged into BLE transmit queue, to carry out BLE bulk data transfer, realization will be to be measured Data packet is sent to BLE object to be measured.
In a specific embodiment, the SPDIF audio-frequency test instrument is previously provided with test parameter;Wherein, institute Stating test signal is that the SPDIF audio-frequency test instrument is generated based on the test parameter;It include sampling in the test parameter Rate;The equipment further include: preprocessing module, for judging whether the test signal for transmitting I2S format surpasses based on the sample rate The transmission bandwidth of BLE out;If the determination result is YES, then data compression, and compressing data are carried out to the test signal of I2S format The test signal of I2S format afterwards executes the process for being divided into multiple packets of audio data to be measured of default size;If judging result Be it is no, then execute and the test signal of I2S format be divided into multiple audio datas to be measured of default size by the BLE chip The process of packet.
In a specific embodiment, the data compression includes lossless compression or lossy compression;The default size For 240 bytes.
In a specific embodiment, the testing data packet " is discharged into BLE and sends team by second sending module Column are realized to carry out BLE bulk data transfer and send BLE object to be measured for testing data packet ", comprising: by the number to be measured BLE transmit queue is discharged into according to packet;BLE bulk data transfer is carried out based on the BLE transmit queue, testing data packet is sent To BLE object to be measured, and after the completion of bulk data transfer, BLE response is inquired to determine whether packet loss;If it is determined that packet loss, then Send the testing data packet lost;If it is determined that then continuing to execute without packet loss and carrying out BLE batch based on the BLE transmit queue The process of data transmission.
In a specific embodiment, the analysis test module, is used for: receiving number to be measured by BLE object to be measured Data receiver queue is stored according to packet, and by the testing data packet;The testing data packet is solved by BLE object to be measured Analysis controls information with determination packets of audio data to be measured and data head;The packets of audio data to be measured is sent out by BLE object to be measured It is sent to I2S interface, is I2S format by audio data tissue to be measured;By CODEC in BLE object to be measured by I2S format to It surveys packets of audio data and is converted to analog signal, to drive SPEAKER by the analog signal, monitor institute will pass through artitificial ear It states the sound of SPEAKER and is transmitted on SPDIF audio-frequency test instrument and analyzed.
In a specific embodiment, further includes: execution module, for being by data head control information judgement No generation packet loss;If judgement has generation packet loss, it is lost to request to reissue that BLE response is generated by BLE object requests to be measured Testing data packet;Information is controlled by the data head by BLE object to be measured and judges whether the packets of audio data to be measured It needs to decompress;If the determination result is YES, then the packets of audio data to be measured is decompressed by BLE object to be measured, so as to base Packets of audio data to be measured execution after decompression is sent to I2S interface, is the process of I2S format by audio data tissue to be measured.
With this, the embodiment of the present invention proposes a kind of audio testing method and equipment, is applied to include BLE object to be measured, Intermediate ends, in the system of SPDIF audio-frequency test instrument, wherein this method comprises: obtaining BLE object to be measured by intermediate ends Audio data acquired in MIC;The audio data is sent to internal I2S interface by the intermediate ends;By described Intermediate ends will be converted to SPDIF format by the audio data of I2S interface, and be converted into the audio data after SPDIF format It is sent on SPDIF audio-frequency test instrument and carries out analysis test.By being converted to the audio data of BLE object in this programme After SPDIF format, it is linked on mature SPDIF wireline audio test equipment, realizes and BLE audio product is automatically analyzed Test, improves the efficiency of test, reduces costs, can cope with the test needs of BLE audio product.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is proposition of the embodiment of the present invention for carrying out a kind of audio-frequency test side that uplink tests BLE object MIC to be measured The flow diagram of method;
Fig. 2 is the block schematic illustration of system involved by a kind of audio testing method of proposition of the embodiment of the present invention;
Fig. 3 is proposition of the embodiment of the present invention for carrying out a kind of audio-frequency test side that uplink tests BLE object MIC to be measured The flow diagram of method;
Fig. 4 is that the downlink that is used to carry out that the embodiment of the present invention proposes tests a kind of audio-frequency test of BLE object SPEAKER to be measured The flow diagram of method;
Fig. 5 is that the downlink that is used to carry out that the embodiment of the present invention proposes tests a kind of audio-frequency test of BLE object SPEAKER to be measured The flow diagram of method;
Fig. 6 is that a kind of audio-frequency test that BLE object MIC to be measured is tested for carrying out uplink that the embodiment of the present invention proposes is set Standby structural schematic diagram;
Fig. 7 is that a kind of audio that BLE object SPEAKER to be measured is tested for carrying out downlink that the embodiment of the present invention proposes is surveyed Try the structural schematic diagram of equipment.
Specific embodiment
Hereinafter, the various embodiments of the disclosure will be described more fully.The disclosure can have various embodiments, and It can adjust and change wherein.It should be understood, however, that: there is no the various embodiments of the disclosure are limited to spy disclosed herein Determine the intention of embodiment, but the disclosure should be interpreted as in the spirit and scope for covering the various embodiments for falling into the disclosure All adjustment, equivalent and/or optinal plan.
The term used in the various embodiments of the disclosure is used only for the purpose of describing specific embodiments and not anticipates In the various embodiments of the limitation disclosure.As used herein, singular is intended to also include plural form, unless context is clear Chu it is indicated otherwise.Unless otherwise defined, otherwise all terms (including technical terms and scientific terms) used herein have There is meaning identical with the various normally understood meanings of embodiment one skilled in the art of the disclosure.The term (term such as limited in the dictionary generally used) is to be interpreted as having and situational meaning in the related technical field Identical meaning and it will be interpreted as having Utopian meaning or meaning too formal, unless in the various of the disclosure It is clearly defined in embodiment.
Embodiment 1
The embodiment of the present invention 1 discloses a kind of audio testing method, and the MIC of BLE object to be measured is tested for carrying out uplink, Applied to including BLE object to be measured, intermediate ends, in the system of SPDIF audio-frequency test instrument, as shown in Figure 1, this method include with Lower step:
Step 101 obtains audio acquired in the MIC (microphone, microphone) of BLE object to be measured by intermediate ends Data;
Step 102, by the intermediate ends by the audio data be sent to internal I2S (Inter-IC Sound, Integrated circuit built-in audio bus) interface;
Step 103 will be converted to SPDIF (Sony/Philips by the audio data of I2S interface by the intermediate ends Digital Interface, SONY, PHILIPS digital audio interface) format, and it is converted into the audio number after SPDIF format Analysis test is carried out according to being sent on SPDIF audio-frequency test instrument.
Specific system includes BLE object to be measured (namely the BLE product to be tested in Fig. 2, including MIC to be measured and SPEAKER (loudspeaker)), intermediate ends (namely the BLE chip in Fig. 2 and audio CODEC (codec) chip), SPDIF audio-frequency test instrument Device (namely audio analysis instrument in Fig. 2).
It is obtained specifically, intermediate ends obtain BLE (Bluetooth Low Energy, bluetooth low energy consumption) object MIC to be measured After the audio data taken, be transferred to internal I2S interface, so as to the internal unit of intermediate ends, such as audio CODEC chip by its Audio data after being converted to SPDIF format is sent on SPDIF audio-frequency test instrument and carries out analysis test, passes through conversion with this And be linked on mature SPDIF wireline audio test equipment, it realizes and test is automatically analyzed to BLE audio product.
In a specific embodiment, as shown in figure 3, the audio data acquired in the MIC for acquiring BLE object to be measured Before, further includes:
By the way that the data acquisition parameters of the MIC are arranged on the BLE object to be measured, and acquisition ginseng based on the data Number carries out audio data collecting by the MIC;
By being sampled in the adc interface of the BLE object to be measured to MIC audio data collected, and it is right It samples obtained sampled audio data and carries out data buffering;
The sampled audio data is divided into multiple packets of audio data of default size by the BLE object to be measured;
It is added after data head controls information by the BLE object to be measured in the packets of audio data and generates data packet, and The data packet is put into BLE transmit queue, with data packet described in bulk transfer to the intermediate ends.
Specifically, needing audio data to be smoothly transferred to before the audio data acquired in the MIC of BLE object to be measured Intermediate ends, carry out in advance thus data acquisition parameters setting on MIC and in specific transmission will by sampled audio data into It after row segmentation, is transmitted in a manner of transmit queue, with this in the case where BLE transmission belt broad forehead can support, realizes and pass The raising of defeated speed.
In a specific embodiment, the data acquisition parameters include sample rate;
After the sampled audio data obtained to sampling carries out data buffering, further includes:
Whether be based on the sample rate by the BLE object to be measured judges the transmission sampled audio data more than BLE Bandwidth;
If the determination result is YES, then data compression is carried out to the sampled audio data, and to the institute Jing Guo data compression It states sampled audio data and executes the process for being divided into multiple packets of audio data of default size.
Specifically, can have previously been based on sample rate in data acquisition parameters judge the transmission sampled audio data whether be more than BLE bandwidth;When determination can be more than, data segmentation is just carried out, to realize that data are passed in the case where being no more than BLE bandwidth It is defeated.
Specifically, the data compression includes lossless compression or lossy compression.
Specifically, the default size is 240 bytes under specific application scenarios.
In a specific embodiment, data head control information includes package identification, the information of data checking mechanisms, Compress zone bit information, the information of packet loss retransmission mechanism.
In a specific embodiment, noted earlier " to be added by the BLE object to be measured in the packets of audio data Data packet is generated after data head control information, into BLE transmit queue, with data packet described in bulk transfer to the intermediate ends ", Include:
It is added after data head controls information by the BLE object to be measured in the data packet, into BLE transmit queue, Carry out bulk data transfer;
Through the BLE object to be measured after bulk data transfer, BLE response is inquired, to judge whether packet loss;
If the determination result is YES, then the data packet of loss is retransmitted by the BLE object to be measured;
If judging result be it is no, executed by the BLE object to be measured by being connect in the adc of the BLE object to be measured Mouth samples MIC audio data collected, and carries out data buffering to the sampled audio data that sampling obtains Process.
Specifically, having BLE response, and determine whether to lose based on BLE response to guarantee that data can be transmitted as function Packet is retransmitted if packet loss occurs.
In a specific embodiment, at any time such as Fig. 2, the intermediate ends include audio CODEC chip and for obtaining The BLE chip of audio data;
Described " obtaining audio data acquired in the MIC of BLE object to be measured by intermediate ends " with this, in step 101 Include:
Pass through the audio CODEC chip received data packet;
The data packet is stored in data receiver queue by the audio CODEC chip;
The data packet is parsed by the audio CODEC chip, to determine data head control information and sound Frequency data packet;
Information is controlled according to the data head by the audio CODEC chip and judges whether there is packet loss;
If the determination result is YES, then the data of loss are reissued using BLE response request by the audio CODEC chip Packet;
By the audio CODEC chip according to the data head control information judge the packets of audio data whether needs Decompression;
If the determination result is YES, then it is decompressed by the audio CODEC chip, to generate audio data.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;
Described " sending the audio data to internal I2S interface by the intermediate ends " with this, in step 102 Include:
The I2S interface connecting with the audio CODEC chip is sent by the audio data by BLE core.
In a specific embodiment, described " to be converted to by the audio data of I2S interface by the intermediate ends SPDIF format, and be converted into the audio data after SPDIF format and be sent on SPDIF audio-frequency test instrument to carry out analysis survey Try " include:
SPDIF format will be converted to by the audio data of I2S interface by the audio CODEC chip, and will conversion It is sent on SPDIF audio-frequency test instrument for the audio data after SPDIF format and carries out analysis test, to realize to the MIC Detection.
Specifically, uplink tests the MIC device of BLE object to be measured, and testing procedure is as schemed under a concrete application scene Shown in 3, include the following steps:
The setting of step 1.MIC data acquisition parameters, including sample rate, channel number;
ABC (Analog-to-Digital Converter, the modulus turn that step 2. passes through CODEC in BLE object to be measured Parallel operation) sampling interface data, and BLE object handler to be measured is transferred data to by the I2S interface of standard, it is buffered to data BUFFER;
Whether step 3. calculates according to sample rate size beyond BLE transmission bandwidth;
Step 4. carries out data compression (including lossless compression, compression method) if exceeding;
Step 5. audio data is divided into the packet size of suitable BLE transmission, and default setting is 240 bytes;
Step 6. data packet (includes packet ID, data check compresses flag bit, and reserved mark plus data head control information Will position), default 4 bytes;
Step 7. data enter BLE transmit queue;
Step 8.BLE bulk data transfer.Transmission speed can be improved in bulk data transfer, reduces interactive number of shaking hands With the number of BLE suspend mode;
After the completion of step 9. bulk data transfer, inquiry BLE response whether packet loss, if packet loss, again by the packet of loss It sends;
Step 10. enters step 2 if not receiving and terminating order;
ATE (Automatic Test Equipment, the automatic test equipment) plate of step 11. intermediate ends receives BLE number According to packet;
Step 12.BLE data packet is stored in data receiver queue;
Step 13.BLE resolve packet goes out packet header and effective packets of audio data;
Step 14. judges according to header packet information either with or without packet loss, if there is packet loss then requests to mend to wrap;
Step 15. judges whether effective audio data needs to decompress according to header packet information;
Step 16. is then first decompressed if necessary to decompress;
The CPU (Central Processing Unit, central processing unit) of step 17. intermediate ends transfers data to I2S Interface;
The CODEC of step 18. intermediate ends at SPDIF format, and sends I2S data conversion on SPDIF audio equipment;
Step 19. receives data using SPDIF audio equipment and analyzes.
Embodiment 2
The embodiment of the invention also discloses a kind of audio testing methods, test BLE object to be measured for carrying out downlink SPEAKER is applied to include BLE object to be measured, intermediate ends, in the system of SPDIF audio-frequency test instrument, as shown in figure 4, the party Method the following steps are included:
Step 201 sends SPDIF format test signal by SPDIF audio-frequency test instrument to intermediate ends;
Step 202, the test signal that SPDIF format test signal is converted to I2S format by the intermediate ends;
Step 203 will be sent to BLE object to be measured by the intermediate ends for the test signal of I2S format;
The SPEAKER of step 204, the driving BLE object to be measured (is raised with will pass through the artitificial ear monitoring SPEAKER Sound device) sound and being transmitted on SPDIF audio-frequency test instrument analyzed.
Specifically, when downlink tests the SPEAKER of BLE object to be measured, the process with the test MIC in embodiment 1 is Inverse process first passes through SPDIF audio-frequency test instrument and sends SPDIF format test signal to intermediate ends, then will by intermediate ends SPDIF format test signal is converted to the test signal of I2S format, and is sent to BLE object to be measured, drives BLE to be measured with this The SPEAKER of object is will pass through the sound of the artitificial ear monitoring SPEAKER (loudspeaker) and be transmitted to SPDIF audio-frequency test It is analyzed on instrument.
In a specific embodiment, the intermediate ends include audio CODEC chip and for obtaining audio data BLE chip;
With this, in step 202 it is described " by the intermediate ends by SPDIF format test signal be converted to I2S format Test signal ", comprising:
SPDIF format test signal is converted to the test signal of I2S format by audio CODEC chip, and to I2S lattice The test signal of formula carries out data buffering.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;
" BLE to be measured will be sent to for the test signal of I2S format by the intermediate ends described in this step 203 Object ", comprising:
I2S interface is sent by the test signal of I2S format by audio CODEC chip;
The test signal of I2S format is obtained from the I2S interface by the BLE chip;
BLE object to be measured is sent by the test signal of I2S format by the BLE chip.
In a specific embodiment, above-mentioned " to be sent the test signal of I2S format to by the BLE chip BLE object to be measured ", comprising:
The test signal of I2S format is divided into multiple packets of audio data to be measured of default size by the BLE chip, To be suitble to BLE transmission;
Testing data packet is generated after the packets of audio data addition data head control information to be measured;
The testing data packet is discharged into BLE transmit queue, to carry out BLE bulk data transfer, is realized testing data Packet is sent to BLE object to be measured.
Specifically, passing through the transmission mode of BLE transmit queue, transmission speed can be effectively improved, reduces interaction of shaking hands Number and BLE suspend mode number.
In a specific embodiment, the SPDIF audio-frequency test instrument is previously provided with test parameter;Wherein, institute Stating test signal is that the SPDIF audio-frequency test instrument is generated based on the test parameter;It include sampling in the test parameter Rate;Further include:
Judge whether the test signal for transmitting I2S format exceeds the transmission bandwidth of BLE based on the sample rate;
If the determination result is YES, then data compression, and the I2S after compressing data are carried out to the test signal of I2S format The test signal of format executes the process for being divided into multiple packets of audio data to be measured of default size;
If judging result be it is no, execute and the test signal of I2S format be divided by default size by the BLE chip Multiple packets of audio data to be measured process.
Specifically, judging the test signal for transmitting I2S format whether more than BLE bandwidth;When determination can be more than, just carry out Data segmentation, to realize data transmission in the case where being no more than BLE bandwidth.
In a specific embodiment, the data compression includes lossless compression or lossy compression;The default size For 240 bytes.
In a specific embodiment, described " the testing data packet to be discharged into BLE transmit queue, to carry out BLE batches Data transmission is measured, realizes and sends BLE object to be measured for testing data packet ", comprising:
The testing data packet is discharged into BLE transmit queue;
BLE bulk data transfer is carried out based on the BLE transmit queue, sends BLE pairs to be measured for testing data packet As, and after the completion of bulk data transfer, BLE response is inquired to determine whether packet loss;
If it is determined that packet loss, then send the testing data packet of loss;
If it is determined that then continuing to execute the stream for carrying out BLE bulk data transfer based on the BLE transmit queue without packet loss Journey.
Specifically, having BLE response, and determine whether to lose based on BLE response to guarantee that data can be transmitted as function Packet is retransmitted if packet loss occurs.
In a specific embodiment, as shown in figure 5, described " SPEAKER of the driving BLE object to be measured, so as to The sound of the SPEAKER, which is monitored, by artitificial ear and is transmitted on SPDIF audio-frequency test instrument is analyzed ", comprising:
Testing data packet is received by BLE object to be measured, and the testing data packet is stored in data receiver queue;
The testing data packet is parsed by BLE object to be measured, with determination packets of audio data to be measured and data head Control information;
I2S interface is sent by the packets of audio data to be measured by BLE object to be measured, is by audio data tissue to be measured I2S format;
The packets of audio data to be measured of I2S format is converted into analog signal by CODEC in BLE object to be measured, with logical Analog signal driving SPEAKER is crossed, the sound of the SPEAKER is monitored will pass through artitificial ear and is transmitted to SPDIF sound It is analyzed on frequency test equipment.
In a specific embodiment, this method further include: control information by the data head and judge whether to lose Packet;
If judgement have generation packet loss, by BLE object requests to be measured generation BLE response with request to reissue it is lost to Measured data packet;
Information is controlled by the data head by BLE object to be measured and judges whether that the packets of audio data to be measured needs to solve Pressure;
If the determination result is YES, then the packets of audio data to be measured is decompressed by BLE object to be measured, to be based on Packets of audio data to be measured execution after decompression is sent to I2S interface, is the process of I2S format by audio data tissue to be measured.
With this, under a concrete application scene, downlink tests the SPEAKER of BLE object to be measured, testing procedure such as Fig. 5 It is shown, include the following steps:
Step 1.SPDIF audio-frequency test instrument parameter setting, including sample rate, channel number .SPDIF audio-frequency test instrument, which issues, to be surveyed On trial signal to SPDIF interface;
SPDIF format is converted into I2S format by the CODEC of intermediate ends by step 2.;
Step 3. transfers data to processor by the I2S interface of intermediate ends, is buffered to data BUFFER;
Whether step 4. calculates according to sample rate size beyond BLE transmission bandwidth;
Step 5. carries out data compression (including lossless compression, compression method) if exceeding;
Step 6. audio data is divided into the packet size of suitable BLE transmission, and default setting is 240 bytes;
Step 7. data packet (includes packet ID, data check compresses flag bit, and reserved mark plus data head control information Will position), default 4 bytes;
Step 8. data enter BLE transmit queue;
Step 8.BLE bulk data transfer;Transmission speed can be improved in bulk data transfer, reduces interactive number of shaking hands With the number of BLE suspend mode;
After the completion of step 9. bulk data transfer, inquiry BLE response whether packet loss.If packet loss, again by the packet of loss It sends;
Step 10. then jumps to step 9 if there is packet loss;
Step 11. jumps to step 2 if not receiving and terminating order;
Step 12. BLE object to be measured receives BLE data packet;
Step 12.BLE data packet is stored in data receiver queue;
Step 13.BLE resolve packet goes out packet header and effective packets of audio data;
Step 14. judges according to header packet information either with or without packet loss, if there is packet loss then requests to mend to wrap;
Step 15. judges whether effective audio data needs to decompress according to header packet information;
Step 16. is then first decompressed if necessary to decompress;
The CPU of step 17. intermediate ends transfers data to I2S interface;
I2S data conversion at analog signal, is driven SPEAKER by step 18.CODEC;
Step 19. artitificial ear monitors SPEAKER sound and collects audio equipment and analyzed.
Embodiment 3
The embodiment of the present invention 3 also discloses a kind of audio-frequency test equipment, is applied to include BLE object to be measured, intermediate ends, In the system of SPDIF audio-frequency test instrument, as shown, the equipment includes:
Module 301 is obtained, for obtaining audio data acquired in the MIC of BLE object to be measured by intermediate ends;
Sending module 302, for sending the audio data to internal I2S interface by the intermediate ends;
Test module 303, for by the intermediate ends SPDIF format will to be converted to by the audio data of I2S interface, And it is converted into the audio data after SPDIF format and is sent on SPDIF audio-frequency test instrument to carry out analysis test.
In a specific embodiment, further includes: dividing processing module, in the MIC institute for acquiring BLE object to be measured Before the audio data of acquisition, by the way that the data acquisition parameters of the MIC are arranged on the BLE object to be measured, and it is based on institute It states data acquisition parameters and audio data collecting is carried out by the MIC;
By being sampled in the ABC interface of the BLE object to be measured to MIC audio data collected, and it is right It samples obtained sampled audio data and carries out data buffering;
The sampled audio data is divided into multiple packets of audio data of default size by the BLE object to be measured;
It is added after data head controls information by the BLE object to be measured in the packets of audio data and generates data packet, and The data packet is put into BLE transmit queue, with data packet described in bulk transfer to the intermediate ends.
In a specific embodiment, the data acquisition parameters include sample rate;
Compression module, for after carrying out data buffering to the obtained sampled audio data of sampling, by described to be measured Whether BLE object is based on the sample rate and judges the transmission sampled audio data more than BLE bandwidth;
If the determination result is YES, then data compression is carried out to the sampled audio data, and to the institute Jing Guo data compression It states sampled audio data and executes the process for being divided into multiple packets of audio data of default size.
In a specific embodiment, the data compression includes lossless compression or lossy compression.
In a specific embodiment, the default size is 240 bytes.
In a specific embodiment, data head control information includes package identification, the information of data checking mechanisms, pressure Contracting zone bit information, the information of packet loss retransmission mechanism.
In a specific embodiment, the dividing processing module is " by the BLE object to be measured in the audio number Data packet is generated after controlling information according to packet addition data head, into BLE transmit queue, with data packet described in bulk transfer described in Intermediate ends ", comprising:
It is added after data head controls information by the BLE object to be measured in the data packet, into BLE transmit queue, Carry out bulk data transfer;
Through the BLE object to be measured after bulk data transfer, BLE response is inquired, to judge whether packet loss;
If the determination result is YES, then the data packet of loss is retransmitted by the BLE object to be measured;
If judging result be it is no, executed by the BLE object to be measured by being connect in the adc of the BLE object to be measured Mouth samples MIC audio data collected, and carries out data buffering to the sampled audio data that sampling obtains Process.
In a specific embodiment, the intermediate ends include audio CODEC chip and for obtaining audio data BLE chip;
The acquisition module 301, is used for:
Pass through the audio CODEC chip received data packet;
The data packet is stored in data receiver queue by the audio CODEC chip;
The data packet is parsed by the audio CODEC chip, to determine data head control information and sound Frequency data packet;
Information is controlled according to the data head by the audio CODEC chip and judges whether there is packet loss;
If the determination result is YES, then the data of loss are reissued using BLE response request by the audio CODEC chip Packet;
By the audio CODEC chip according to the data head control information judge the packets of audio data whether needs Decompression;
If the determination result is YES, then it is decompressed by the audio CODEC chip, to generate audio data.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;
The sending module 302, is used for:
The I2S interface connecting with the audio CODEC chip is sent by the audio data by BLE core.
In a specific embodiment, the test module 303, is used for:
SPDIF format will be converted to by the audio data of I2S interface by the audio CODEC chip, and will conversion It is sent on SPDIF audio-frequency test instrument for the audio data after SPDIF format and carries out analysis test, to realize to the MIC Detection.
Specifically, specific correlated characteristic refers in embodiment 1 the embodiment of the invention also includes other correlated characteristics Record.
Embodiment 4
The embodiment of the present invention 4 also discloses a kind of audio-frequency test equipment, is applied to include BLE object to be measured, intermediate ends, In the system of SPDIF audio-frequency test instrument, as shown, the equipment includes:
First sending module 401 tests signal to centre for sending SPDIF format by SPDIF audio-frequency test instrument End;
Conversion module 402, for SPDIF format test signal to be converted to the test of I2S format by the intermediate ends Signal;
Second sending module 403, for by the intermediate ends BLE to be measured will to be sent to for the test signal of I2S format Object;
Test module 404 is analyzed, for driving the SPEAKER of the BLE object to be measured, monitors institute will pass through artitificial ear It states the sound of SPEAKER and is transmitted on SPDIF audio-frequency test instrument and analyzed.
In a specific embodiment, the intermediate ends include audio CODEC chip and for obtaining audio data BLE chip;
The conversion module 402, is used for:
SPDIF format test signal is converted to the test signal of I2S format by audio CODEC chip, and to I2S lattice The test signal of formula carries out data buffering.
In a specific embodiment, real by I2S interface between the audio CODEC chip and the BLE chip Now connect;
Second sending module 403, is used for:
I2S interface is sent by the test signal of I2S format by audio CODEC chip;
The test signal of I2S format is obtained from the I2S interface by the BLE chip;
BLE object to be measured is sent by the test signal of I2S format by the BLE chip.
In a specific embodiment,
Second sending module 403 " sends BLE pairs to be measured for the test signal of I2S format by the BLE chip As ", comprising:
The test signal of I2S format is divided into multiple packets of audio data to be measured of default size by the BLE chip, To be suitble to BLE transmission;
Testing data packet is generated after the packets of audio data addition data head control information to be measured;
The testing data packet is discharged into BLE transmit queue, to carry out BLE bulk data transfer, is realized testing data Packet is sent to BLE object to be measured.
In a specific embodiment, the SPDIF audio-frequency test instrument is previously provided with test parameter;Wherein, institute Stating test signal is that the SPDIF audio-frequency test instrument is generated based on the test parameter;It include sampling in the test parameter Rate;The equipment further include:
Preprocessing module, for judging whether the test signal for transmitting I2S format exceeds the biography of BLE based on the sample rate Defeated bandwidth;
If the determination result is YES, then data compression, and the I2S after compressing data are carried out to the test signal of I2S format The test signal of format executes the process for being divided into multiple packets of audio data to be measured of default size;
If judging result be it is no, execute and the test signal of I2S format be divided by default size by the BLE chip Multiple packets of audio data to be measured process.
In a specific embodiment, the data compression includes lossless compression or lossy compression;The default size For 240 bytes.
In a specific embodiment, the testing data packet " is discharged into BLE to send by second sending module 403 Queue is realized to carry out BLE bulk data transfer and sends BLE object to be measured for testing data packet ", comprising:
The testing data packet is discharged into BLE transmit queue;
BLE bulk data transfer is carried out based on the BLE transmit queue, sends BLE pairs to be measured for testing data packet As, and after the completion of bulk data transfer, BLE response is inquired to determine whether packet loss;
If it is determined that packet loss, then send the testing data packet of loss;
If it is determined that then continuing to execute the stream for carrying out BLE bulk data transfer based on the BLE transmit queue without packet loss Journey.
In a specific embodiment, the analysis test module 404, is used for:
Testing data packet is received by BLE object to be measured, and the testing data packet is stored in data receiver queue;
The testing data packet is parsed by BLE object to be measured, with determination packets of audio data to be measured and data head Control information;
I2S interface is sent by the packets of audio data to be measured by BLE object to be measured, is by audio data tissue to be measured I2S format;
The packets of audio data to be measured of I2S format is converted into analog signal by the CODEC in BLE object to be measured, with logical Analog signal driving SPEAKER is crossed, the sound of the SPEAKER is monitored will pass through artitificial ear and is transmitted to SPDIF sound It is analyzed on frequency test equipment.
In a specific embodiment, further includes: execution module, for being by data head control information judgement No generation packet loss;If judgement has generation packet loss, it is lost to request to reissue that BLE response is generated by BLE object requests to be measured Testing data packet;Information is controlled by the data head by BLE object to be measured and judges whether the packets of audio data to be measured It needs to decompress;If the determination result is YES, then the packets of audio data to be measured is decompressed by BLE object to be measured, so as to base Packets of audio data to be measured execution after decompression is sent to I2S interface, is the process of I2S format by audio data tissue to be measured.
Specifically, specific correlated characteristic refers in embodiment 2 the embodiment of the invention also includes other correlated characteristics Record.
The embodiment of the present invention proposes a kind of audio testing method and equipment, is applied to include BLE object to be measured, intermediate It holds, in the system of SPDIF audio-frequency test instrument, wherein this method comprises: obtaining the MIC institute of BLE object to be measured by intermediate ends The audio data of acquisition;The audio data is sent to internal I2S interface by the intermediate ends;Pass through the intermediate ends SPDIF format will be converted to by the audio data of I2S interface, and the audio data being converted into after SPDIF format is sent to Analysis test is carried out on SPDIF audio-frequency test instrument.By the way that the audio data of BLE object is converted to SPDIF lattice in this programme After formula, it is linked on mature SPDIF wireline audio test equipment, realizes and test is automatically analyzed to BLE audio product, mention The efficiency for having risen test, reduces costs, can cope with the test needs of BLE audio product.
It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or Process is not necessarily implemented necessary to the present invention.It will be appreciated by those skilled in the art that the mould in device in implement scene Block can according to implement scene describe be distributed in the device of implement scene, can also carry out corresponding change be located at be different from In one or more devices of this implement scene.The module of above-mentioned implement scene can be merged into a module, can also be into one Step splits into multiple submodule.Aforementioned present invention serial number is for illustration only, does not represent the superiority and inferiority of implement scene.It is disclosed above Several specific implementation scenes only of the invention, still, the present invention is not limited to this, and any those skilled in the art can think Variation should all fall into protection scope of the present invention.

Claims (38)

1. a kind of audio testing method, which is characterized in that be applied to include BLE object to be measured, intermediate ends, SPDIF audio-frequency test In the system of instrument, this method comprises:
Audio data acquired in the MIC of BLE object to be measured is obtained by intermediate ends;
The audio data is sent to internal I2S interface by the intermediate ends;
SPDIF format will be converted to by the audio data of I2S interface by the intermediate ends, and be converted into SPDIF format Audio data afterwards is sent on SPDIF audio-frequency test instrument and carries out analysis test.
2. a kind of audio testing method as described in claim 1, which is characterized in that obtained in the MIC for acquiring BLE object to be measured Before the audio data taken, further includes:
By the way that the data acquisition parameters of the MIC are arranged on the BLE object to be measured, and based on the data, acquisition parameter is logical It crosses the MIC and carries out audio data collecting;
By being sampled in the ABC interface of the BLE object to be measured to MIC audio data collected, and to sampling Obtained sampled audio data carries out data buffering;
The sampled audio data is divided into multiple packets of audio data of default size by the BLE object to be measured;
It is added after data head controls information by the BLE object to be measured in the packets of audio data and generates data packet, and by institute It states data packet and is put into BLE transmit queue, with data packet described in bulk transfer to the intermediate ends.
3. a kind of audio testing method as claimed in claim 2, which is characterized in that the data acquisition parameters include sampling Rate;
After the sampled audio data obtained to sampling carries out data buffering, further includes:
Whether be based on the sample rate by the BLE object to be measured judges the transmission sampled audio data more than BLE bandwidth;
If the determination result is YES, then data compression is carried out to the sampled audio data, and to by adopting described in data compression Sample audio data executes the process for being divided into multiple packets of audio data of default size.
4. a kind of audio testing method as claimed in claim 3, which is characterized in that the data compression include lossless compression or Lossy compression.
5. a kind of audio testing method as claimed in claim 2, which is characterized in that the default size is 240 bytes.
6. a kind of audio testing method as claimed in claim 2 or claim 3, which is characterized in that it includes data that data head, which controls information, Packet mark, the information of data checking mechanisms compress zone bit information, the information of packet loss retransmission mechanism.
7. a kind of audio testing method as claimed in claim 2, which is characterized in that described " to be existed by the BLE object to be measured Data packet is generated after the packets of audio data addition data head control information, into BLE transmit queue, with number described in bulk transfer The intermediate ends are arrived according to packet ", comprising:
Through the BLE object to be measured after the data packet adds data head control information, into BLE transmit queue, carry out Bulk data transfer;
Through the BLE object to be measured after bulk data transfer, BLE response is inquired, to judge whether packet loss;
If the determination result is YES, then the data packet of loss is retransmitted by the BLE object to be measured;
If judging result be it is no, the adc interface pair in the BLE object to be measured is passed through by the BLE object to be measured execution The MIC audio data collected is sampled, and the process of data buffering is carried out to the sampled audio data that sampling obtains.
8. a kind of audio testing method as claimed in claim 2, which is characterized in that the intermediate ends include audio CODEC core Piece and BLE chip for obtaining audio data;
" the obtaining audio data acquired in the MIC of BLE object to be measured by intermediate ends " includes:
Pass through the audio CODEC chip received data packet;
The data packet is stored in data receiver queue by the audio CODEC chip;
The data packet is parsed by the audio CODEC chip, to determine data head control information and audio number According to packet;
Information is controlled according to the data head by the audio CODEC chip and judges whether there is packet loss;
If the determination result is YES, then the data packet of loss is reissued using BLE response request by the audio CODEC chip;
Information is controlled according to the data head by the audio CODEC chip and judges whether the packets of audio data needs to solve Pressure;
If the determination result is YES, then it is decompressed by the audio CODEC chip, to generate audio data.
9. a kind of audio testing method as claimed in claim 8, which is characterized in that the audio CODEC chip and the BLE Connection is realized by I2S interface between chip;
" the sending the audio data to internal I2S interface by the intermediate ends " includes:
The I2S interface connecting with the audio CODEC chip is sent by the audio data by BLE core.
10. a kind of audio testing method as claimed in claim 9, which is characterized in that described " to be passed through by the intermediate ends The audio data of I2S interface is converted to SPDIF format, and is converted into the audio data after SPDIF format and is sent to SPDIF sound Analysis test is carried out on frequency test equipment " include:
SPDIF format will be converted to by the audio data of I2S interface by the audio CODEC chip, and is converted into Audio data after SPDIF format is sent on SPDIF audio-frequency test instrument and carries out analysis test, to realize to the MIC's Detection.
11. a kind of audio testing method, which is characterized in that be applied to include BLE object to be measured, intermediate ends, SPDIF audio-frequency test In the system of instrument, this method comprises:
SPDIF format, which is sent, by SPDIF audio-frequency test instrument tests signal to intermediate ends;
SPDIF format test signal is converted to the test signal of I2S format by the intermediate ends;
By the intermediate ends BLE object to be measured will be sent to for the test signal of I2S format;
The SPEAKER of the BLE object to be measured is driven, the sound of the SPEAKER is monitored will pass through artitificial ear and is transmitted to It is analyzed on SPDIF audio-frequency test instrument.
12. a kind of audio testing method as claimed in claim 11, which is characterized in that the intermediate ends include audio CODEC Chip and BLE chip for obtaining audio data;
Described " SPDIF format test signal is converted to the test signal of I2S format by the intermediate ends ", comprising:
SPDIF format test signal is converted to the test signal of I2S format by audio CODEC chip, and to I2S format It tests signal and carries out data buffering.
13. a kind of audio testing method as claimed in claim 12, which is characterized in that the audio CODEC chip with it is described Connection is realized by I2S interface between BLE chip;
Described " BLE object to be measured will be sent to by the intermediate ends for the test signal of I2S format ", comprising:
I2S interface is sent by the test signal of I2S format by audio CODEC chip;
The test signal of I2S format is obtained from the I2S interface by the BLE chip;
BLE object to be measured is sent by the test signal of I2S format by the BLE chip.
14. a kind of audio testing method as claimed in claim 13, which is characterized in that
Described " BLE object to be measured is sent for the test signal of I2S format by the BLE chip ", comprising:
The test signal of I2S format is divided into multiple packets of audio data to be measured of default size by the BLE chip, with suitable Close BLE transmission;
Testing data packet is generated after the packets of audio data addition data head control information to be measured;
The testing data packet is discharged into BLE transmit queue, to carry out BLE bulk data transfer, testing data packet is sent out in realization It is sent to BLE object to be measured.
15. a kind of audio testing method as claimed in claim 14, which is characterized in that the SPDIF audio-frequency test instrument is pre- First it is provided with test parameter;Wherein, the test signal is that the SPDIF audio-frequency test instrument is raw based on the test parameter At;It include sample rate in the test parameter;Further include:
Judge whether the test signal for transmitting I2S format exceeds the transmission bandwidth of BLE based on the sample rate;
If the determination result is YES, then data compression, and the I2S format after compressing data are carried out to the test signal of I2S format Test signal execute be divided into default size multiple packets of audio data to be measured process;
If judging result be it is no, execute and the test signal of I2S format be divided by the more of default size by the BLE chip The process of a packets of audio data to be measured.
16. a kind of audio testing method as claimed in claim 14, which is characterized in that the data compression includes lossless compression Or lossy compression;The default size is 240 bytes.
17. a kind of audio testing method as claimed in claim 14, which is characterized in that described " to arrange the testing data packet Enter BLE transmit queue, to carry out BLE bulk data transfer, realize and send BLE object to be measured for testing data packet ", comprising:
The testing data packet is discharged into BLE transmit queue;
BLE bulk data transfer is carried out based on the BLE transmit queue, sends BLE object to be measured for testing data packet, and After the completion of bulk data transfer, BLE response is inquired to determine whether packet loss;
If it is determined that packet loss, then send the testing data packet of loss;
If it is determined that then continuing to execute the process for carrying out BLE bulk data transfer based on the BLE transmit queue without packet loss.
18. a kind of audio testing method as claimed in claim 14, which is characterized in that " the driving BLE object to be measured SPEAKER, monitor the sound of the SPEAKER and be transmitted on SPDIF audio-frequency test instrument to will pass through artitificial ear and carry out Analysis ", comprising:
Testing data packet is received by BLE object to be measured, and the testing data packet is stored in data receiver queue;
The testing data packet is parsed by BLE object to be measured, is controlled with determination packets of audio data to be measured and data head Information;
I2S interface is sent by the packets of audio data to be measured by BLE object to be measured, is I2S by audio data tissue to be measured Format;
The packets of audio data to be measured of I2S format is converted into analog signal by the CODEC in BLE object to be measured, to pass through State analog signal driving SPEAKER, with will pass through artitificial ear monitor the sound of the SPEAKER and be transmitted to SPDIF audio survey It is analyzed on test instrument.
19. a kind of audio testing method as claimed in claim 18, which is characterized in that further include: pass through the data head control Information processed judges whether that packet loss occurs;
If judgement has generation packet loss, BLE response is generated to request to reissue lost number to be measured by BLE object requests to be measured According to packet;
Information is controlled by the data head by BLE object to be measured and judges whether that the packets of audio data to be measured needs to decompress;
If the determination result is YES, then the packets of audio data to be measured is decompressed by BLE object to be measured, so as to based on decompression Packets of audio data to be measured execution afterwards is sent to I2S interface, is the process of I2S format by audio data tissue to be measured.
20. a kind of audio-frequency test equipment, which is characterized in that be applied to include BLE object to be measured, intermediate ends, SPDIF audio-frequency test In the system of instrument, which includes:
Module is obtained, for obtaining audio data acquired in the MIC of BLE object to be measured by intermediate ends;
Sending module, for sending the audio data to internal I2S interface by the intermediate ends;
Test module for will be converted to SPDIF format by the audio data of I2S interface by the intermediate ends, and will turn Audio data after being changed to SPDIF format is sent on SPDIF audio-frequency test instrument and carries out analysis test.
21. a kind of audio-frequency test equipment as claimed in claim 20, which is characterized in that further include: dividing processing module is used for Before the audio data acquired in the MIC for acquiring BLE object to be measured, by the way that the MIC is arranged on the BLE object to be measured Data acquisition parameters, and based on the data acquisition parameter by the MIC carry out audio data collecting;
By being sampled in the ABC interface of the BLE object to be measured to MIC audio data collected, and to sampling Obtained sampled audio data carries out data buffering;
The sampled audio data is divided into multiple packets of audio data of default size by the BLE object to be measured;
It is added after data head controls information by the BLE object to be measured in the packets of audio data and generates data packet, and by institute It states data packet and is put into BLE transmit queue, with data packet described in bulk transfer to the intermediate ends.
22. a kind of audio-frequency test equipment as claimed in claim 21, which is characterized in that the data acquisition parameters include sampling Rate;
Compression module, for passing through described BLE pairs to be measured after the sampled audio data obtained to sampling carries out data buffering As judging the transmission sampled audio data whether more than BLE bandwidth based on the sample rate;
If the determination result is YES, then data compression is carried out to the sampled audio data, and to by adopting described in data compression Sample audio data executes the process for being divided into multiple packets of audio data of default size.
23. a kind of audio-frequency test equipment as claimed in claim 22, which is characterized in that the data compression includes lossless compression Or lossy compression.
24. a kind of audio-frequency test equipment as claimed in claim 21, which is characterized in that the default size is 240 bytes.
25. a kind of audio-frequency test equipment as described in claim 21 or 22, which is characterized in that it includes number that data head, which controls information, It is identified according to packet, the information of data checking mechanisms, compresses zone bit information, the information of packet loss retransmission mechanism.
26. a kind of audio-frequency test equipment as claimed in claim 21, which is characterized in that the dividing processing module " passes through institute It states BLE object to be measured and generates data packet after packets of audio data addition data head control information, into BLE transmit queue, With data packet described in bulk transfer to the intermediate ends ", comprising:
Through the BLE object to be measured after the data packet adds data head control information, into BLE transmit queue, carry out Bulk data transfer;
Through the BLE object to be measured after bulk data transfer, BLE response is inquired, to judge whether packet loss;
If the determination result is YES, then the data packet of loss is retransmitted by the BLE object to be measured;
If judging result be it is no, the adc interface pair in the BLE object to be measured is passed through by the BLE object to be measured execution The MIC audio data collected is sampled, and the process of data buffering is carried out to the sampled audio data that sampling obtains.
27. a kind of audio-frequency test equipment as claimed in claim 21, which is characterized in that the intermediate ends include audio CODEC Chip and BLE chip for obtaining audio data;
The acquisition module, is used for:
Pass through the audio CODEC chip received data packet;
The data packet is stored in data receiver queue by the audio CODEC chip;
The data packet is parsed by the audio CODEC chip, to determine data head control information and audio number According to packet;
Information is controlled according to the data head by the audio CODEC chip and judges whether there is packet loss;
If the determination result is YES, then the data packet of loss is reissued using BLE response request by the audio CODEC chip;
Information is controlled according to the data head by the audio CODEC chip and judges whether the packets of audio data needs to solve Pressure;
If the determination result is YES, then it is decompressed by the audio CODEC chip, to generate audio data.
28. a kind of audio-frequency test equipment as claimed in claim 27, which is characterized in that the audio CODEC chip with it is described Connection is realized by I2S interface between BLE chip;
The sending module, is used for:
The I2S interface connecting with the audio CODEC chip is sent by the audio data by BLE core.
29. a kind of audio-frequency test equipment as claimed in claim 28, which is characterized in that the test module is used for:
SPDIF format will be converted to by the audio data of I2S interface by the audio CODEC chip, and is converted into Audio data after SPDIF format is sent on SPDIF audio-frequency test instrument and carries out analysis test, to realize to the MIC's Detection.
30. a kind of audio-frequency test equipment, which is characterized in that be applied to include BLE object to be measured, intermediate ends, SPDIF audio-frequency test In the system of instrument, which includes:
First sending module tests signal to intermediate ends for sending SPDIF format by SPDIF audio-frequency test instrument;
Conversion module, for SPDIF format test signal to be converted to the test signal of I2S format by the intermediate ends;
Second sending module, for by the intermediate ends BLE object to be measured will to be sent to for the test signal of I2S format;
Test module is analyzed, for driving the SPEAKER of the BLE object to be measured, will pass through described in artitificial ear monitoring The sound of SPEAKER and being transmitted on SPDIF audio-frequency test instrument is analyzed.
31. a kind of audio-frequency test equipment as claimed in claim 30, which is characterized in that the intermediate ends include audio CODEC Chip and BLE chip for obtaining audio data;
The conversion module, is used for:
SPDIF format test signal is converted to the test signal of I2S format by audio CODEC chip, and to I2S format It tests signal and carries out data buffering.
32. a kind of audio-frequency test equipment as claimed in claim 31, which is characterized in that the audio CODEC chip with it is described Connection is realized by I2S interface between BLE chip;
Second sending module, is used for:
I2S interface is sent by the test signal of I2S format by audio CODEC chip;
The test signal of I2S format is obtained from the I2S interface by the BLE chip;
BLE object to be measured is sent by the test signal of I2S format by the BLE chip.
33. a kind of audio-frequency test equipment as claimed in claim 32, which is characterized in that
Second sending module " BLE object to be measured is sent for the test signal of I2S format by the BLE chip ", packet It includes:
The test signal of I2S format is divided into multiple packets of audio data to be measured of default size by the BLE chip, with suitable Close BLE transmission;
Testing data packet is generated after the packets of audio data addition data head control information to be measured;
The testing data packet is discharged into BLE transmit queue, to carry out BLE bulk data transfer, testing data packet is sent out in realization It is sent to BLE object to be measured.
34. a kind of audio-frequency test equipment as claimed in claim 33, which is characterized in that the SPDIF audio-frequency test instrument is pre- First it is provided with test parameter;Wherein, the test signal is that the SPDIF audio-frequency test instrument is raw based on the test parameter At;It include sample rate in the test parameter;The equipment further include:
Preprocessing module, for judging whether the test signal for transmitting I2S format exceeds the transmission belt of BLE based on the sample rate It is wide;
If the determination result is YES, then data compression, and the I2S format after compressing data are carried out to the test signal of I2S format Test signal execute be divided into default size multiple packets of audio data to be measured process;
If judging result be it is no, execute and the test signal of I2S format be divided by the more of default size by the BLE chip The process of a packets of audio data to be measured.
35. a kind of audio-frequency test equipment as claimed in claim 33, which is characterized in that the data compression includes lossless compression Or lossy compression;The default size is 240 bytes.
36. a kind of audio testing method as claimed in claim 33, which is characterized in that second sending module " will be described Testing data packet is discharged into BLE transmit queue, to carry out BLE bulk data transfer, realizes and sends BLE to be measured for testing data packet Object ", comprising:
The testing data packet is discharged into BLE transmit queue;
BLE bulk data transfer is carried out based on the BLE transmit queue, sends BLE object to be measured for testing data packet, and After the completion of bulk data transfer, BLE response is inquired to determine whether packet loss;
If it is determined that packet loss, then send the testing data packet of loss;
If it is determined that then continuing to execute the process for carrying out BLE bulk data transfer based on the BLE transmit queue without packet loss.
37. a kind of audio-frequency test equipment as claimed in claim 33, which is characterized in that the analysis test module is used for:
Testing data packet is received by BLE object to be measured, and the testing data packet is stored in data receiver queue;
The testing data packet is parsed by BLE object to be measured, is controlled with determination packets of audio data to be measured and data head Information;
I2S interface is sent by the packets of audio data to be measured by BLE object to be measured, is I2S by audio data tissue to be measured Format;
The packets of audio data to be measured of I2S format is converted into analog signal by the CODEC in BLE object to be measured, to pass through State analog signal driving SPEAKER, with will pass through artitificial ear monitor the sound of the SPEAKER and be transmitted to SPDIF audio survey It is analyzed on test instrument.
38. a kind of audio-frequency test equipment as claimed in claim 37, which is characterized in that further include: execution module, for passing through The data head control information judges whether that packet loss occurs;
If judgement has generation packet loss, BLE response is generated to request to reissue lost number to be measured by BLE object requests to be measured According to packet;
Information is controlled by the data head by BLE object to be measured and judges whether that the packets of audio data to be measured needs to decompress;
If the determination result is YES, then the packets of audio data to be measured is decompressed by BLE object to be measured, so as to based on decompression Packets of audio data to be measured execution afterwards is sent to I2S interface, is the process of I2S format by audio data tissue to be measured.
CN201910009294.7A 2019-01-04 2019-01-04 Audio testing method and device Active CN109743668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910009294.7A CN109743668B (en) 2019-01-04 2019-01-04 Audio testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910009294.7A CN109743668B (en) 2019-01-04 2019-01-04 Audio testing method and device

Publications (2)

Publication Number Publication Date
CN109743668A true CN109743668A (en) 2019-05-10
CN109743668B CN109743668B (en) 2021-06-22

Family

ID=66363550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910009294.7A Active CN109743668B (en) 2019-01-04 2019-01-04 Audio testing method and device

Country Status (1)

Country Link
CN (1) CN109743668B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538725A (en) * 2021-07-09 2021-10-22 深圳市湘凡科技有限公司 Hardware product testing method and related equipment
CN113726467A (en) * 2021-07-29 2021-11-30 黎兴荣 Electronic product data transmission method, system, storage medium and program product
WO2024065841A1 (en) * 2022-09-30 2024-04-04 北京小米移动软件有限公司 Audio quality testing method and apparatus, device, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011017593A (en) * 2009-07-08 2011-01-27 Alps Electric Co Ltd Method for confirming operation of sound source receiving apparatus
WO2014055312A1 (en) * 2012-10-02 2014-04-10 Mh Acoustics, Llc Earphones having configurable microphone arrays
CN104104762A (en) * 2014-07-22 2014-10-15 南京声准科技有限公司 Efficient audio test method of communication terminal
CN106559705A (en) * 2015-09-28 2017-04-05 青岛海信电器股份有限公司 A kind of processing method of voice data, device and system
CN107920392A (en) * 2016-10-07 2018-04-17 音响精密有限公司 wireless audio analysis, test and measurement
CN207560339U (en) * 2017-09-29 2018-06-29 广东思派康电子科技有限公司 Bluetooth headset test device, bluetooth headset test system
CN108738006A (en) * 2018-05-31 2018-11-02 出门问问信息科技有限公司 Data transmission method based on bluetooth and device
CN109036462A (en) * 2018-08-31 2018-12-18 上海与德通讯技术有限公司 The test macro and method of Bluetooth bracket

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011017593A (en) * 2009-07-08 2011-01-27 Alps Electric Co Ltd Method for confirming operation of sound source receiving apparatus
WO2014055312A1 (en) * 2012-10-02 2014-04-10 Mh Acoustics, Llc Earphones having configurable microphone arrays
CN104104762A (en) * 2014-07-22 2014-10-15 南京声准科技有限公司 Efficient audio test method of communication terminal
CN106559705A (en) * 2015-09-28 2017-04-05 青岛海信电器股份有限公司 A kind of processing method of voice data, device and system
CN107920392A (en) * 2016-10-07 2018-04-17 音响精密有限公司 wireless audio analysis, test and measurement
CN207560339U (en) * 2017-09-29 2018-06-29 广东思派康电子科技有限公司 Bluetooth headset test device, bluetooth headset test system
CN108738006A (en) * 2018-05-31 2018-11-02 出门问问信息科技有限公司 Data transmission method based on bluetooth and device
CN109036462A (en) * 2018-08-31 2018-12-18 上海与德通讯技术有限公司 The test macro and method of Bluetooth bracket

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538725A (en) * 2021-07-09 2021-10-22 深圳市湘凡科技有限公司 Hardware product testing method and related equipment
CN113538725B (en) * 2021-07-09 2023-06-06 深圳市湘凡科技有限公司 Method for testing hardware products and related equipment
CN113726467A (en) * 2021-07-29 2021-11-30 黎兴荣 Electronic product data transmission method, system, storage medium and program product
WO2024065841A1 (en) * 2022-09-30 2024-04-04 北京小米移动软件有限公司 Audio quality testing method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
CN109743668B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN109743668A (en) A kind of audio testing method and equipment
CN109246672B (en) Data transmission method, device and system and Bluetooth headset
WO2001093627A3 (en) Method and apparatus measuring hearing aid performance
CA2507982A1 (en) System and method of audio testing of acoustic devices
US20080031478A1 (en) Control device and method for wireless audio signal transmission within the context of hearing device programming
CN106254518A (en) A kind of vehicle-mounted Ethernet system and automobile
CN111065035B (en) Bone conduction earphone testing method and testing system
CN111432324B (en) Testing method and testing system for bone voiceprint earphone
CN103260124B (en) The audio testing method of mobile terminal and test macro thereof
CN111565354B (en) Testing method and testing system for bone conduction earphone
CN107948905A (en) A kind of intelligent sound box and microphone array test system
JP2002232548A (en) Portable telephone set terminal, and peripheral device for acoustic test for the portable telephone set terminal
CN105529037A (en) Communication equipment voice quality evaluation testing system and testing method
CN102334977A (en) Measuring device, mobile equipment, system for measuring physiological parameters of human bodies and wireless transmission method for measuring data
CN211128028U (en) Audio coding and decoding chip test tool and audio coding and decoding chip test device
CN115604621A (en) Earphone testing method, device, equipment and computer readable storage medium
JP2006128997A5 (en)
CN109342870A (en) A kind of trouble-shooter applied to 10KV network distribution transformer
US20040128123A1 (en) Quality evaluation equipment of network speaking
CN112908345B (en) Voice compression and decompression method for Internet of things
CN208241889U (en) A kind of Bluetooth audio frequency transmitting device and test macro for electroacoustical measurement
CN213186560U (en) Audio test system
CN202261341U (en) Non-intrusive dual-end acquired audio end-to-end delay measuring device
CN110473558B (en) Real-time multifunctional coder-decoder of 450M locomotive radio station unit
CN113671292A (en) Equipment testing method, system, device, electronic equipment 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