CN113179477B - LHDC earphone testing method and system - Google Patents

LHDC earphone testing method and system Download PDF

Info

Publication number
CN113179477B
CN113179477B CN202110732048.1A CN202110732048A CN113179477B CN 113179477 B CN113179477 B CN 113179477B CN 202110732048 A CN202110732048 A CN 202110732048A CN 113179477 B CN113179477 B CN 113179477B
Authority
CN
China
Prior art keywords
lhdc
audio
avdtp
media packet
earphone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110732048.1A
Other languages
Chinese (zh)
Other versions
CN113179477A (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.)
Hangzhou Crysound Electronics Co Ltd
Original Assignee
Cry Sound 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 Cry Sound Co ltd filed Critical Cry Sound Co ltd
Priority to CN202110732048.1A priority Critical patent/CN113179477B/en
Publication of CN113179477A publication Critical patent/CN113179477A/en
Application granted granted Critical
Publication of CN113179477B publication Critical patent/CN113179477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a method and a system for testing an LHDC earphone. The method includes setting a maximum length of one audio data frame; LHDC coding is carried out on the wav format audio file to generate an LHDC coding file, and the LHDC coding file comprises a plurality of audio data frames; typesetting the LHDC coding file again to obtain LHDC original data; dynamically packaging LHDC original data to obtain a plurality of AVDTP audio media packets in accordance with AVDTP protocols; calculating the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet; reading the next AVDTP audio media packet, and temporarily sending the next AVDTP audio media packet to the Bluetooth test control board at the sending time node of the next AVDTP audio media packet; and sending the time node for dynamic compensation; the AVDTP protocol stack sends the audio media data to the earphone for playing, and the audio collector records the sound played by the earphone and sends the sound to the client software for audio analysis.

Description

LHDC earphone testing method and system
Technical Field
The invention relates to an earphone testing method, in particular to an LHDC earphone testing method and an LHDC earphone testing system.
Background
LHDC (Low-Latency High-Definition audio Codec) is used as an audio coding technology with Low Latency and High sound quality, and the data transmission of the LHDC (Low-Latency High-Definition audio Codec) is up to 900kbps which is 3 times as High as that of a conventional audio coder SBC (sub-band code) (328 kbps). The audio delay is only one fifth of SBC (400 ms) for 80 ms.
At present, the market supports more and more earphone brands of LHDC, but at present, no complete performance and tone quality test of the LHDC earphone is available, and the traditional earphone test method is mostly used for testing SBC (single bit rate) coding and decoding earphones and is not suitable for the LHDC coding and decoding earphones. For headphones, SBC encoding can only reach 48KHZ at most, while testing can only measure frequency responses below 24 KHZ. LHDC can now transmit 96KHZ sample frequency audio, which testing can measure a frequency response in 48 KHZ.
Because the LHDC coding technology is relatively new, the testing scheme for the LHDC headset is not perfect, mainly because a PC (computer) does not support the audio protocol, and the LHDC has a high requirement for the downlink time sequence of data, and the real-time property of the PC cannot meet the communication requirement, most of the testing methods utilize a mobile phone or an embedded device to connect to the LHDC headset and play a specified audio for testing, and the testing method is limited by the mobile phone (not all brands support the LHDC, and one mobile phone can only connect to one headset).
Disclosure of Invention
In order to overcome the above-mentioned defects of the prior art, the present invention provides a method and a system for testing LHDC headphones.
The LHDC earphone testing method comprises the following steps:
after the LHDC player is connected with an LHDC Bluetooth headset, reading LHDC information of the headset, a maximum transmission unit supported by the headset and audio information supported by the headset to set the maximum length of an audio data frame, wherein the LHDC player runs on a PC;
the LHDC playing module carries out LHDC coding on the wav format audio file according to the maximum length of the audio data frames, the audio information supported by the earphone and the LHDC information of the earphone to generate an LHDC coding file, wherein the LHDC coding file comprises a plurality of audio data frames;
the LHDC player rearranges the LHDC coding file to obtain LHDC original data;
the LHDC player dynamically packages the LHDC original data to obtain a plurality of AVDTP audio media packets which accord with AVDTP protocols;
the LHDC player calculates the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet; the sending time node of the next AVDTP audio media packet is the sending time node of the current AVDTP audio media packet plus the rounding value of the audio time to the preset time period plus the rounding value of the time difference to the preset time period; the time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet;
the LHDC player reads the next AVDTP audio media packet and sends the next AVDTP audio media packet to the Bluetooth test control board at the sending time node of the next AVDTP audio media packet;
the Bluetooth test control board sends the AVDTP audio media packet to an AVDTP protocol stack, and simultaneously receives LHDC information, control signals and audio information supported by the earphone from the earphone and feeds the LHDC information back to the LHDC player;
the LHDC player controls the earphone and adjusts the communication state according to the control signal and LHDC information of the earphone, and dynamically compensates the sending time node of the AVDTP audio media packet;
and the AVDTP protocol stack sends audio media data to the earphone, the earphone plays sound, the audio collector records the sound played by the earphone and sends the sound to client software for audio analysis, and an LHDC earphone test report is obtained.
In one embodiment, the dynamic compensation comprises:
calculating communication delay according to the sending time node of the current AVDTP audio media packet and the response time of the earphone;
and adding the communication delay into the time difference to correct the time difference, thereby realizing the dynamic compensation of the sending time node.
In one embodiment, the total audio time is a cumulative audio time of each audio media packet that has been sent; the audio time is the number of frames of audio data contained in an AVDTP audio media packet multiplied by the time taken for each frame.
In one embodiment, the rearranging includes:
removing the LHDC file header and the frame information in the LHDC coding file so as to facilitate the LHDC player to read quickly without playing and coding at the same time; the LHDC raw data contains the LHDC encoding information.
In one embodiment, the dynamic packaging mode is to adjust the number of audio data frames contained in each AVDTP audio media packet in real time; and enabling each AVDTP audio media packet to contain audio data frames as much as possible according to the limitation of the maximum transmission unit.
In one embodiment, the predetermined time period is a divisor of 20 ms.
In one embodiment, the LHDC information of the headset includes a LHDC version of the headset, a LHDC communication code rate, and a data channel splitting mode.
In one embodiment, the audio information supported by the headset includes a sampling frequency, a number of channels, and a number of audio bits.
The invention also provides an LHDC earphone test system, which comprises an LHDC Bluetooth earphone to be tested, an earphone test client module, a Bluetooth test control board and an audio acquisition device, wherein the earphone test client module is positioned in the PC;
the earphone testing client module is used for LHDC coding, sending control and audio analysis so as to realize automatic testing, and comprises an LHDC player and an audio analysis module;
the LHDC player is configured to:
after establishing connection with an LHDC Bluetooth headset, reading LHDC information of the headset, a maximum transmission unit supported by the headset and audio information supported by the headset to set the maximum length of an audio data frame, wherein the LHDC player runs on a PC;
according to the maximum length of the audio data frames, audio information supported by the earphone and LHDC information of the earphone, LHDC coding is carried out on the wav format audio file to generate an LHDC coding file, and the LHDC coding file comprises a plurality of audio data frames;
typesetting the LHDC coding file again to obtain LHDC original data;
dynamically packaging the LHDC original data to obtain a plurality of AVDTP audio media packets which accord with AVDTP protocols;
calculating the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet; the sending time node of the next AVDTP audio media packet is the sending time node of the current AVDTP audio media packet plus the rounding value of the audio time to the preset time period plus the rounding value of the time difference to the preset time period; the time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet;
reading the next AVDTP audio media packet, and sending the next AVDTP audio media packet to the Bluetooth test control board when the sending time node of the next AVDTP audio media packet comes;
controlling the earphone according to the control signal and LHDC information on the earphone, adjusting the communication state, and dynamically compensating the sending time node of the AVDTP audio media packet;
the Bluetooth test control board is configured to send an AVDTP audio media packet to an AVDTP protocol stack and send the AVDTP protocol stack to the earphone for playing, and meanwhile, receive LHDC information from the earphone, a maximum transmission unit supported by the earphone, audio information supported by the earphone and a control signal on the earphone and feed the LHDC information back to the LHDC player;
the audio collector records the sound played by the earphone and sends the sound to the audio analysis module;
the audio analysis module is configured to perform audio analysis to derive an LHDC headset test report.
In one embodiment, the dynamic compensation comprises:
calculating communication delay according to the sending time node of the current AVDTP audio media packet and the response time of the earphone;
and adding the communication delay into the time difference to correct the time difference, thereby realizing the dynamic compensation of the sending time node.
In one embodiment, the total audio time is a cumulative audio time of each audio media packet that has been sent; the audio time is the number of frames of audio data contained in an AVDTP audio media packet multiplied by the time taken for each frame.
In one embodiment, the rearranging includes:
removing the LHDC file header and the frame information in the LHDC coding file so as to facilitate the LHDC player to read quickly without playing and coding at the same time; the LHDC raw data contains the LHDC encoding information.
In one embodiment, the dynamic packaging mode is to adjust the number of audio data frames contained in each AVDTP audio media packet in real time; and enabling each AVDTP audio media packet to contain audio data frames as much as possible according to the limitation of the maximum transmission unit.
In one embodiment, the predetermined time period is a divisor of 20 ms.
In one embodiment, the LHDC information of the headset includes a LHDC version of the headset, a LHDC communication code rate, and a data channel splitting mode.
In one embodiment, the audio information supported by the headset includes a sampling frequency, a number of channels, and a number of audio bits.
The LHDC earphone testing method of the invention breaks through the LHDC data transmission downlink channel, can support the time sequence requirement of 96KHZ 900kbps LHDC data communication, has high testing efficiency by using the LHDC earphone testing method, reduces the technical requirement on staff, and simultaneously reduces the testing cost and testing time.
Drawings
The foregoing summary, as well as the following detailed description of the invention, will be better understood when read in conjunction with the appended drawings. It is to be noted that the appended drawings are intended as examples of the claimed invention. In the drawings, like reference characters designate the same or similar elements.
Figure 1 illustrates a flow diagram of a method for testing a LHDC headset according to an embodiment of the invention;
figure 2 illustrates a LHDC headset test system architecture according to an embodiment of the invention;
figure 3 shows a schematic diagram of data interaction between an LHDC player and a bluetooth test control board and an LHDC bluetooth headset implementing an embodiment of the invention.
Detailed Description
The detailed features and advantages of the present invention are described in detail in the detailed description which follows, and will be sufficient for anyone skilled in the art to understand the technical content of the present invention and to implement the present invention, and the related objects and advantages of the present invention will be easily understood by those skilled in the art from the description, claims and drawings disclosed in the present specification.
Fig. 1 shows a flow chart of a testing method of an LHDC headset according to an embodiment of the present invention. The flow chart comprises the following steps.
Step 101: and after the LHDC player is connected with the earphone, reading LHDC information of the earphone, a Maximum Transmission Unit (MTU) supported by the earphone and audio information supported by the earphone. The LHDC player of the invention can be realized to run on a PC.
The LHDC information of the earphone comprises an earphone LHDC version, LHDC communication code rate and a data channel splitting mode.
The audio information supported by the headset includes the sampling frequency, the number of channels, and the number of audio bits.
Step 102: the maximum length of one audio data frame is set according to LHDC information of the headphone, a Maximum Transmission Unit (MTU) supported by the headphone, and audio information supported by the headphone.
Step 103: and the LHDC player performs LHDC coding on the wav format audio file according to the maximum length of the audio data frame, the audio information supported by the earphone and the LHDC information of the earphone to generate an LHDC coding file. The LHDC encoded file is composed of a plurality of audio data frames and a LHDC file header.
Step 104: and rearranging the LHDC coding file to obtain LHDC original data. Wherein, the rearrangement comprises removing LHDC file header and frame information in the LHDC coding file; the LHDC raw data contains the encoded information of the LHDC. In the present invention, the conversion into LHDC raw data is done to facilitate fast reading by the LHDC player without the need for encoding while playing.
Step 105: and dynamically packaging the LHDC original data to obtain a plurality of AVDTP audio media packets conforming to an AVDTP (audio video Bluetooth transmission protocol) protocol. Wherein an audio media packet may comprise one or more audio data frames. The dynamic packaging refers to adjusting the number of audio data frames contained in each AVDTP audio media packet in real time.
In order to ensure the playing quality of the LHDC communication audio, the invention uses a dynamic packet packing mode to adjust the number of audio data frames contained in each AVDTP audio media packet in real time. For example, each audio media packet in the LHDC communication protocol contains at most 8 audio data frames in the version of LHDCV 3; containing at most 4 audio data frames in the version LHDCV 2.
In addition, because the Maximum Transmission Unit (MTU) limit exists in the bluetooth headset communication, the maximum length of the AVDTP audio media packet is limited, and the AVDTP audio media packet contains as many audio data frames as possible during packaging.
Step 106: and calculating the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet.
Wherein, the total audio time is the accumulated audio time of each audio media packet which has been sent.
The audio time is the number of frames of audio data contained in an AVDTP audio media packet multiplied by the time taken for each frame.
And the sending time node of the next AVDTP audio media packet is equal to the sending time node of the current AVDTP audio media packet, the rounding value of the audio time to the preset time period, and the rounding value of the time difference to the preset time period.
The time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet.
The preset time period is a divisor of 20 ms. In one embodiment, the preset time period may be 5 ms.
The rounding value of the audio time to 5ms, i.e., the length of time after the remainder obtained by dividing the audio time length by 5, is removed. For example, the audio time length is 5.33ms, then the rounding is 5 ms.
The time difference is the rounded value of 5ms, i.e., the length of time after which the remainder of the time difference divided by 5 is removed. For example, if the total audio time is 10.66ms and the current time node is 10ms, the time difference is 0.66ms, and the time difference is 0ms after rounding up to 5 ms.
Table 1 shows an example of the transmission timing of the AVDTP audio media packet, where the transmission time node of the first AVDTP audio media packet is known to be 5ms, the audio time is known to be 5.33ms, and the preset time period is known to be 5 ms. The table is suitable for LHDC V3, 96 KHZ.
TABLE 1
Figure DEST_PATH_IMAGE002
Step 107: and reading the next AVDTP audio media packet, and sending the AVDTP audio media packet to the Bluetooth test control board temporarily at the sending time node of the next AVDTP audio media packet.
Step 108: the Bluetooth test control board sends the AVDTP audio media packet to an AVDTP protocol stack, and meanwhile, receives LHDC information, control signals and audio information supported by the earphone from the earphone and feeds the LHDC information back to the LHDC player.
Step 109: and the LHDC player controls the earphone according to the control signal and the LHDC information of the earphone, adjusts the communication state and dynamically compensates the sending time node of the AVDTP audio media packet.
In one embodiment, the dynamic compensation is implemented by calculating a communication delay and adding the communication delay to the time difference to correct the time difference.
In one embodiment, the communication delay may be calculated based on the transmission time of the AVDTP audio media packet and the response time of the headset. (when the bluetooth communication quality is poor, the efficiency that the earphone received data can reduce, if when the earphone did not receive a packet of data, send next packet of data, can cause the communication to block to lead to the earphone card to die).
Step 110: and the AVDTP protocol stack sends the audio media data to the earphone, the earphone starts to play sound, the audio collector records the sound played by the earphone, and then the audio data is sent to client software for audio analysis to obtain an LHDC earphone test report.
Figure 2 illustrates an LHDC headset test system architecture implementing an embodiment of the invention. The LHDC earphone test system framework comprises an LHDC Bluetooth earphone 201 to be tested, an earphone test client module 206, a Bluetooth test control board 203 and an audio acquisition device 205. The headset testing client module 206 is located within the PC.
The headset testing client module 206 is used for LHDC coding and transmission control, audio analysis, and automated testing is achieved. The headset testing client module 206 includes the LHDC player 202 and the audio analysis module 204.
In one embodiment, the headset testing client module 206 may be client software.
The bluetooth test control board 203 is used for bluetooth connection with the headset, and balancing communication loads. In one embodiment, the Bluetooth test control board can be plugged into a PC and has a wireless communication function.
The audio collecting device 205 is used for collecting the sound played by the earphone.
Data interaction between the LHDC player 202 and the bluetooth test control board 203 and the LHDC bluetooth headset 201 is shown in fig. 3.
The LHDC player 202 includes a LHDC encoding module, a LHDC raw data generating module, an audio media packet generating module, a Control Core (Control Core) module, a Bulk data input port (Bulk _ EP In), and a Bulk data output port (Bulk _ EP Out).
The LHDC coding module is configured to set a maximum length of one audio data frame according to the maximum length of the audio data frame, the audio information supported by the headset and the LHDC information of the headset, and LHDC codes the wav format audio file to generate an LHDC coded file. The LHDC encoded file is composed of a plurality of audio data frames.
The LHDCLHDC raw data generation module is configured to re-typeset the LHDC encoded file to obtain LHDC raw data. Wherein, the rearrangement comprises removing LHDC file header in the LHDC coding file and removing frame information. The LHDC raw data contains LHDC encoded information. In the present invention, the conversion into LHDC raw data is done to facilitate fast reading by the LHDC player without the need for encoding while playing.
The audio media packet generation module is configured to dynamically package the LHDC raw data to obtain a plurality of AVDTP audio media packets that conform to an AVDTP (audio video bluetooth transport protocol) protocol. Wherein an AVDTP audio media packet contains one or more audio data frames. The dynamic packaging refers to adjusting the number of audio data frames contained in each AVDTP audio media packet in real time.
The control core module is configured to calculate a sending time node of a next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packets, and the sending time node of the current AVDTP audio media packet.
Wherein, the total audio time is the accumulated audio time of each audio media packet sent out.
The audio time is the number of audio frames contained in an AVDTP audio media packet multiplied by the time taken for each frame.
And the sending time node of the next AVDTP audio media packet is equal to the sending time node of the current AVDTP audio media packet, the rounding value of the audio time to the preset time period, and the rounding value of the time difference to the preset time period.
The time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet.
The control core module is further configured to read messages from the LHDC bluetooth headset from the bulk data input port and, based on the messages, perform headset control, communication state adjustment, and dynamic compensation for time nodes.
Reading messages from the LHDC bluetooth headset from the bulk data input port includes: and after the LHDC player is connected with the earphone, reading LHDC information of the earphone, a Maximum Transmission Unit (MTU) supported by the earphone and audio information supported by the earphone.
Reading messages from the LHDC bluetooth headset from the bulk data input port further includes: control information on the headset is received.
In one embodiment, the LHDC information of the headset includes a LHDC version of the headset, a LHDC communication code rate, and a data channel splitting pattern.
In one embodiment, the audio information supported by the headphones includes a sampling frequency, a number of channels, and a number of audio bits.
In one embodiment, the control information on the headset includes play, pause, volume adjustment, and the like.
Dynamically compensating the time node includes dynamically compensating the time node by calculating a communication delay and adding the communication delay to the time difference.
In one embodiment, the communication delay may be calculated based on the transmission time of the AVDTP audio media packets and the response time of the headphones.
The control core module is further configured to read the specified AVDTP audio media packet and write the AVDTP audio media packet to the bulk data output port temporarily at a transmit time node of a next AVDTP audio media packet.
The bluetooth test control board 203 includes a Bulk data input port (Bulk _ EP In), a Bulk data output port (Bulk _ EP Out), a USB controller (USB Source), and an AVDTP protocol stack (AVDTP Source).
The Bulk data input port (Bulk _ EP In) of the bluetooth test control board receives data from the Bulk data output port of the LHDC player.
The USB controller is configured to read the AVDTP audio media packets from the bulk data input port of the bluetooth test control board and send the AVDTP audio media packets to the AVDTP protocol stack while writing the message from the LHDC bluetooth headset to the bulk data output port of the bluetooth test control board. The message includes LHDC information of the headset, Maximum Transmission Unit (MTU) supported by the headset, audio information supported by the headset, and a control signal of the headset.
The AVDTP protocol stack is configured to send audio media data to the headset, from which sound begins to play.
The audio capture device 205 records the sound played by the headphones and sends the recorded sound to the audio analysis module 204.
The audio analysis module 204 analyzes the audio recorded by the audio acquisition device to obtain a test report of the LHDC headset.
The LHDC earphone testing method provided by the invention gets through the LHDC data transmission downlink channel, can support the time sequence requirement of 96KHZ 900kbps LHDC data communication, can quickly and effectively build a testing production line of the LHDC earphone, has high testing efficiency, reduces the technical requirement on staff, and simultaneously reduces the testing cost and testing time.
The invention provides a method for testing an LHDC earphone, which comprises the following steps:
after the LHDC player is connected with an LHDC Bluetooth headset, reading LHDC information of the headset, a maximum transmission unit supported by the headset and audio information supported by the headset to set the maximum length of an audio data frame, wherein the LHDC player runs on a PC;
the LHDC playing module carries out LHDC coding on the wav format audio file according to the maximum length of the audio data frames, the audio information supported by the earphone and the LHDC information of the earphone to generate an LHDC coding file, wherein the LHDC coding file comprises a plurality of audio data frames;
the LHDC player rearranges the LHDC coding file to obtain LHDC original data;
the LHDC player dynamically packages the LHDC original data to obtain a plurality of AVDTP audio media packets which accord with AVDTP protocols;
the LHDC player calculates the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet; the sending time node of the next AVDTP audio media packet is the sending time node of the current AVDTP audio media packet plus the rounding value of the audio time to the preset time period plus the rounding value of the time difference to the preset time period; the time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet;
the LHDC player reads the next AVDTP audio media packet and sends the next AVDTP audio media packet to the Bluetooth test control board at the sending time node of the next AVDTP audio media packet;
the Bluetooth test control board sends the AVDTP audio media packet to an AVDTP protocol stack, and simultaneously receives LHDC information, control signals and audio information supported by the earphone from the earphone and feeds the LHDC information back to the LHDC player;
the LHDC player controls the earphone and adjusts the communication state according to the control signal and LHDC information of the earphone, and dynamically compensates the sending time node of the AVDTP audio media packet;
and the AVDTP protocol stack sends audio media data to the earphone, the earphone plays sound, the audio collector records the sound played by the earphone and sends the sound to client software for audio analysis, and an LHDC earphone test report is obtained.
In one embodiment, the dynamic compensation comprises:
calculating communication delay according to the sending time node of the current AVDTP audio media packet and the response time of the earphone;
and adding the communication delay into the time difference to correct the time difference, thereby realizing the dynamic compensation of the sending time node.
In one embodiment, the total audio time is a cumulative audio time of each audio media packet that has been sent; the audio time is the number of frames of audio data contained in an AVDTP audio media packet multiplied by the time taken for each frame.
In one embodiment, the rearranging includes:
removing the LHDC file header and the frame information in the LHDC coding file so as to facilitate the LHDC player to read quickly without playing and coding at the same time; the LHDC raw data contains the LHDC encoding information.
In one embodiment, the dynamic packaging mode is to adjust the number of audio data frames contained in each AVDTP audio media packet in real time; and enabling each AVDTP audio media packet to contain audio data frames as much as possible according to the limitation of the maximum transmission unit.
In one embodiment, the predetermined time period is a divisor of 20 ms.
In one embodiment, the LHDC information of the headset includes a LHDC version of the headset, a LHDC communication code rate, and a data channel splitting mode.
In one embodiment, the audio information supported by the headset includes a sampling frequency, a number of channels, and a number of audio bits.
The invention also provides an LHDC earphone test system, which comprises an LHDC Bluetooth earphone to be tested, an earphone test client module, a Bluetooth test control board and an audio acquisition device, wherein the earphone test client module is positioned in the PC;
the earphone testing client module is used for LHDC coding, sending control and audio analysis so as to realize automatic testing, and comprises an LHDC player and an audio analysis module;
the LHDC player is configured to:
after establishing connection with an LHDC Bluetooth headset, reading LHDC information of the headset, a maximum transmission unit supported by the headset and audio information supported by the headset to set the maximum length of an audio data frame, wherein the LHDC player runs on a PC;
according to the maximum length of the audio data frames, audio information supported by the earphone and LHDC information of the earphone, LHDC coding is carried out on the wav format audio file to generate an LHDC coding file, and the LHDC coding file comprises a plurality of audio data frames;
typesetting the LHDC coding file again to obtain LHDC original data;
dynamically packaging the LHDC original data to obtain a plurality of AVDTP audio media packets which accord with AVDTP protocols;
calculating the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet; the sending time node of the next AVDTP audio media packet is the sending time node of the current AVDTP audio media packet plus the rounding value of the audio time to the preset time period plus the rounding value of the time difference to the preset time period; the time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet;
reading the next AVDTP audio media packet, and sending the next AVDTP audio media packet to the Bluetooth test control board when the sending time node of the next AVDTP audio media packet comes;
controlling the earphone according to the control signal and LHDC information on the earphone, adjusting the communication state, and dynamically compensating the sending time node of the AVDTP audio media packet;
the Bluetooth test control board is configured to send an AVDTP audio media packet to an AVDTP protocol stack and send the AVDTP protocol stack to the earphone for playing, and meanwhile, receive LHDC information from the earphone, a maximum transmission unit supported by the earphone, audio information supported by the earphone and a control signal on the earphone and feed the LHDC information back to the LHDC player;
the audio collector records the sound played by the earphone and sends the sound to the audio analysis module;
the audio analysis module is configured to perform audio analysis to derive an LHDC headset test report.
In one embodiment, the dynamic compensation comprises:
calculating communication delay according to the sending time node of the current AVDTP audio media packet and the response time of the earphone;
and adding the communication delay into the time difference to correct the time difference, thereby realizing the dynamic compensation of the sending time node.
In one embodiment, the total audio time is a cumulative audio time of each audio media packet that has been sent; the audio time is the number of frames of audio data contained in an AVDTP audio media packet multiplied by the time taken for each frame.
In one embodiment, the rearranging includes:
removing the LHDC file header and the frame information in the LHDC coding file so as to facilitate the LHDC player to read quickly without playing and coding at the same time; the LHDC raw data contains the LHDC encoding information.
In one embodiment, the dynamic packaging mode is to adjust the number of audio data frames contained in each AVDTP audio media packet in real time; and enabling each AVDTP audio media packet to contain audio data frames as much as possible according to the limitation of the maximum transmission unit.
In one embodiment, the predetermined time period is a divisor of 20 ms.
In one embodiment, the LHDC information of the headset includes a LHDC version of the headset, a LHDC communication code rate, and a data channel splitting mode.
In one embodiment, the audio information supported by the headset includes a sampling frequency, a number of channels, and a number of audio bits.
The terms and expressions which have been employed herein are used as terms of description and not of limitation. The use of such terms and expressions is not intended to exclude any equivalents of the features shown and described (or portions thereof), and it is recognized that various modifications may be made within the scope of the claims. Other modifications, variations, and alternatives are also possible. Accordingly, the claims should be looked to in order to cover all such equivalents.
Also, it should be noted that although the present invention has been described with reference to the current specific embodiments, it should be understood by those skilled in the art that the above embodiments are merely illustrative of the present invention, and various equivalent changes or substitutions may be made without departing from the spirit of the present invention, and therefore, it is intended that all changes and modifications to the above embodiments be included within the scope of the claims of the present application.

Claims (14)

1. An LHDC headset testing method, characterized in that the method comprises:
after the LHDC player is connected with an LHDC Bluetooth headset, reading LHDC information of the headset, a maximum transmission unit supported by the headset and audio information supported by the headset to set the maximum length of an audio data frame, wherein the LHDC player runs on a PC;
the LHDC playing module carries out LHDC coding on the wav format audio file according to the maximum length of the audio data frames, the audio information supported by the earphone and the LHDC information of the earphone to generate an LHDC coding file, wherein the LHDC coding data comprise a plurality of audio data frames;
the LHDC player rearranges the LHDC coding file to obtain LHDC original data;
the LHDC player dynamically packages the LHDC original data to obtain a plurality of AVDTP audio media packets which accord with AVDTP protocols;
the LHDC player calculates the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet; the sending time node of the next AVDTP audio media packet is the sending time node of the current AVDTP audio media packet plus the rounding value of the audio time to the preset time period plus the rounding value of the time difference to the preset time period; the time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet;
the LHDC player reads the next AVDTP audio media packet and sends the next AVDTP audio media packet to the Bluetooth test control board at the sending time node of the next AVDTP audio media packet;
the Bluetooth test control board sends the AVDTP audio media packet to an AVDTP protocol stack, and simultaneously receives LHDC information, control signals and audio information supported by the earphone from the earphone and feeds the LHDC information back to the LHDC player;
the LHDC player controls the earphone and adjusts the communication state according to the control signal and LHDC information of the earphone, and dynamically compensates the sending time node of the AVDTP audio media packet;
the AVDTP protocol stack sends audio media data to the earphone, the earphone plays sound, the audio collector records the sound played by the earphone and sends the sound to client software for audio analysis, and an LHDC earphone test report is obtained;
wherein the rearranging comprises:
removing the LHDC file header and the frame information in the LHDC coding data so as to facilitate the LHDC player to read quickly without playing and coding; the LHDC raw data contains the LHDC encoding information.
2. The LHDC headset testing method of claim 1, wherein the dynamic compensation comprises:
calculating communication delay according to the sending time node of the current AVDTP audio media packet and the response time of the earphone;
and adding the communication delay into the time difference to correct the time difference, thereby realizing the dynamic compensation of the sending time node.
3. The LHDC headset testing method of claim 1, wherein the total audio time is a cumulative audio time for each audio media packet that has been sent; the audio time is the number of frames of audio data contained in an AVDTP audio media packet multiplied by the time taken for each frame.
4. The LHDC headset testing method of claim 1, wherein the dynamic packaging is performed by adjusting the number of audio data frames contained in each AVDTP audio media packet in real time; and enabling each AVDTP audio media packet to contain audio data frames as much as possible according to the limitation of the maximum transmission unit.
5. The LHDC headset testing method of claim 1, wherein the predetermined period of time is a divisor of 20 ms.
6. The LHDC headset testing method of claim 1, wherein the LHDC information of the headset includes a headset LHDC version, a LHDC communication code rate, and a data channel splitting pattern.
7. The LHDC headset testing method of claim 1, wherein the headset-supported audio information includes a sampling frequency, a number of channels, and an audio bit number.
8. An LHDC earphone test system is characterized by comprising an LHDC Bluetooth earphone to be tested, an earphone test client module, a Bluetooth test control board and an audio acquisition device, wherein the earphone test client module is positioned in a PC;
the earphone testing client module is used for LHDC coding, sending control and audio analysis so as to realize automatic testing, and comprises an LHDC player and an audio analysis module;
the LHDC player is configured to:
after establishing connection with an LHDC Bluetooth headset, reading LHDC information of the headset, a maximum transmission unit supported by the headset and audio information supported by the headset to set the maximum length of an audio data frame, wherein the LHDC player runs on a PC;
according to the maximum length of the audio data frames, audio information supported by the earphone and LHDC information of the earphone, LHDC coding is carried out on the wav format audio file to generate an LHDC coding file, and the LHDC coding data comprise a plurality of audio data frames;
typesetting the LHDC coding file again to obtain LHDC original data;
dynamically packaging the LHDC original data to obtain a plurality of AVDTP audio media packets which accord with AVDTP protocols;
calculating the sending time node of the next AVDTP audio media packet according to the audio time of each AVDTP audio media packet, the total audio time of the sent AVDTP audio media packet and the sending time node of the current AVDTP audio media packet; the sending time node of the next AVDTP audio media packet is the sending time node of the current AVDTP audio media packet plus the rounding value of the audio time to the preset time period plus the rounding value of the time difference to the preset time period; the time difference is the node of the total audio time minus the sending time of the current AVDTP audio media packet;
reading the next AVDTP audio media packet, and sending the next AVDTP audio media packet to the Bluetooth test control board when the sending time node of the next AVDTP audio media packet comes;
controlling the earphone according to the control signal and LHDC information on the earphone, adjusting the communication state, and dynamically compensating the sending time node of the AVDTP audio media packet;
the Bluetooth test control board is configured to send an AVDTP audio media packet to an AVDTP protocol stack and send the AVDTP protocol stack to the earphone for playing, and meanwhile, receive LHDC information from the earphone, a maximum transmission unit supported by the earphone, audio information supported by the earphone and a control signal on the earphone and feed the LHDC information back to the LHDC player;
the audio acquisition device records the sound played by the earphone and sends the sound to the audio analysis module;
the audio analysis module is configured to perform audio analysis to obtain an LHDC headset test report;
wherein the rearranging comprises:
removing the LHDC file header and the frame information in the LHDC coding data so as to facilitate the LHDC player to read quickly without playing and coding; the LHDC raw data contains the LHDC encoding information.
9. The LHDC headset testing system of claim 8, wherein the dynamic compensation comprises:
calculating communication delay according to the sending time node of the current AVDTP audio media packet and the response time of the earphone;
and adding the communication delay into the time difference to correct the time difference, thereby realizing the dynamic compensation of the sending time node.
10. The LHDC headset testing system of claim 8, wherein the total audio time is a cumulative audio time for each audio media packet that has been sent; the audio time is the number of frames of audio data contained in an AVDTP audio media packet multiplied by the time taken for each frame.
11. The LHDC headset testing system of claim 8, wherein the dynamic packaging is performed by adjusting the number of audio data frames contained in each AVDTP audio media packet in real time; and enabling each AVDTP audio media packet to contain audio data frames as much as possible according to the limitation of the maximum transmission unit.
12. The LHDC headset testing system of claim 8, wherein the preset time period is a divisor of 20 ms.
13. The LHDC headset testing system of claim 8, wherein the LHDC information of the headset includes a headset LHDC version, a LHDC communication code rate, and a data channel splitting pattern.
14. The LHDC headset testing system of claim 8, wherein the headset-supported audio information includes a sampling frequency, a number of channels, and an audio bit number.
CN202110732048.1A 2021-06-30 2021-06-30 LHDC earphone testing method and system Active CN113179477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110732048.1A CN113179477B (en) 2021-06-30 2021-06-30 LHDC earphone testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110732048.1A CN113179477B (en) 2021-06-30 2021-06-30 LHDC earphone testing method and system

Publications (2)

Publication Number Publication Date
CN113179477A CN113179477A (en) 2021-07-27
CN113179477B true CN113179477B (en) 2021-09-07

Family

ID=76928001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110732048.1A Active CN113179477B (en) 2021-06-30 2021-06-30 LHDC earphone testing method and system

Country Status (1)

Country Link
CN (1) CN113179477B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111313984A (en) * 2020-02-19 2020-06-19 北京瑞森新谱科技股份有限公司 Testing device and method for various audio codes of Bluetooth headset
CN112261566A (en) * 2020-09-15 2021-01-22 杭州兆华电子有限公司 AI intelligent glasses audio test method based on cloud service
CN112735450A (en) * 2020-12-30 2021-04-30 北京百瑞互联技术有限公司 Method, device, storage medium and equipment for transmitting data based on voice channel
CN112866893A (en) * 2020-12-23 2021-05-28 广东思派康电子科技有限公司 Method for testing audio delay of Bluetooth headset

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8989661B2 (en) * 2005-08-30 2015-03-24 Broadcom Corporation Method and system for optimized architecture for bluetooth streaming audio applications
CN103747407B (en) * 2013-12-27 2017-04-12 深圳英飞拓科技股份有限公司 Audio module automatic test method based on FFT frequency sweep
CN109495834A (en) * 2019-01-07 2019-03-19 歌尔科技有限公司 A kind of earphone test method, system and earphone and storage medium
EP3829129A1 (en) * 2019-11-26 2021-06-02 Tap Sound System Bluetooth audio streaming passthrough
CN111986685B (en) * 2020-08-31 2024-06-21 北京百瑞互联技术股份有限公司 Audio encoding and decoding method and system for realizing high sampling rate

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111313984A (en) * 2020-02-19 2020-06-19 北京瑞森新谱科技股份有限公司 Testing device and method for various audio codes of Bluetooth headset
CN112261566A (en) * 2020-09-15 2021-01-22 杭州兆华电子有限公司 AI intelligent glasses audio test method based on cloud service
CN112866893A (en) * 2020-12-23 2021-05-28 广东思派康电子科技有限公司 Method for testing audio delay of Bluetooth headset
CN112735450A (en) * 2020-12-30 2021-04-30 北京百瑞互联技术有限公司 Method, device, storage medium and equipment for transmitting data based on voice channel

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蓝牙音频信号处理算法研究;许书凯;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20210515(第05期);参见正文第0022-0038段 *

Also Published As

Publication number Publication date
CN113179477A (en) 2021-07-27

Similar Documents

Publication Publication Date Title
CN111918261B (en) Bluetooth audio equipment synchronous playing method and system and Bluetooth audio master and slave equipment
CN100334571C (en) Network media playout
CN104834623B (en) Audio frequency playing method and device
CN106664161A (en) System and method of redundancy based packet transmission error recovery
US20080281447A1 (en) Wireless earphone, audio player, and audio playing method
CN104917671A (en) Mobile terminal based audio processing method and device
CN108847248B (en) Bluetooth device audio processing method, system, readable storage medium and Bluetooth device
US20070111801A1 (en) Method, apparatus and system for transmitting and receiving media data
KR100255328B1 (en) Hand-held telephone for recording/reproducing of voice signal and method thereof
CN108111997A (en) Bluetooth equipment audio synchronization method and system
CN109785841A (en) A kind of blue-tooth intelligence equipment voice interactive system and method
CN113365129B (en) Bluetooth audio data processing method, transmitter, receiver and transceiving equipment
JP2017011335A (en) Audio apparatus
JP2002175087A (en) System and method for reproduction, and device and method for data transmission
CN113179477B (en) LHDC earphone testing method and system
US8068418B2 (en) Information processing apparatus
JP2001358799A (en) Data transmission system, data transmitter used in the data transmission system, data reproducing device and data transmitter method
CN102326346A (en) Method and apparatus for transmitting audio data
CN214413006U (en) True wireless stereo earphone
JP4649901B2 (en) Method and apparatus for coded transmission of songs
JP3226711B2 (en) Compressed information reproducing apparatus and compressed information reproducing method
US9437203B2 (en) Error concealment for speech decoder
JP2002217852A (en) Method and device for transmitting data
CN218332560U (en) USB sound card signal transmission system
WO2024087001A1 (en) Bluetooth encoding method and apparatus, bluetooth decoding method and apparatus, and device and 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
CP01 Change in the name or title of a patent holder

Address after: 311121 building 3, No.10 Xianqiao Road, Zhongtai street, Yuhang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Zhaohua Electronics Co.,Ltd.

Address before: 311121 building 3, No.10 Xianqiao Road, Zhongtai street, Yuhang District, Hangzhou City, Zhejiang Province

Patentee before: CRY SOUND CO.,LTD.

CP01 Change in the name or title of a patent holder