CN101409093B - Method and apparatus for determining audio data sampling point position - Google Patents

Method and apparatus for determining audio data sampling point position Download PDF

Info

Publication number
CN101409093B
CN101409093B CN2008101730909A CN200810173090A CN101409093B CN 101409093 B CN101409093 B CN 101409093B CN 2008101730909 A CN2008101730909 A CN 2008101730909A CN 200810173090 A CN200810173090 A CN 200810173090A CN 101409093 B CN101409093 B CN 101409093B
Authority
CN
China
Prior art keywords
count value
pulse
frame head
hopping edge
synchronizing frame
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.)
Expired - Fee Related
Application number
CN2008101730909A
Other languages
Chinese (zh)
Other versions
CN101409093A (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.)
ACTIONS (ZHUHAI) TECHNOLOGY CO., LTD.
Original Assignee
Actions Semiconductor 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 Actions Semiconductor Co Ltd filed Critical Actions Semiconductor Co Ltd
Priority to CN2008101730909A priority Critical patent/CN101409093B/en
Publication of CN101409093A publication Critical patent/CN101409093A/en
Application granted granted Critical
Publication of CN101409093B publication Critical patent/CN101409093B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention discloses a method and a device for determining the position of an audio data sampling point. The method comprises the following steps: jump edge detection is carried out to synchronous frame head B pulse; counting is carried out according to a system clock of a receiving end; corresponding count values in the interval of every two cocurrent adjacent jump edges of the synchronous frame B pulse are determined; whether the synchronous frame B pulse is correct or not; if so, a count value that is corresponding to the pulse width of a clock of a sending end is determined, according to the count value corresponding to the pulse width of the clock of the sending end, a time that is corresponding to half of the count value is determined, and the corresponding time is determined as the position of the audio data sampling point; if not, a data block which the B pulse belongs to is discarded. The adoption of the method and the device provided by the invention solves the problems of data loss and large power consumption in the prior art.

Description

A kind of method of definite audio data sampling point position and device
Technical field
The present invention relates to the multimedia field, relate in particular to the method and the device of a kind of definite audio data sampling point position that is applied to digital audio interface.
Background technology
At present, portable media player improves the extended capability of audio frequency apparatus by using the data audio interface, offers consumer's specialty, hearing enjoying easily.Wherein, the data audio interface comprises: SONY/PHILIPS DAB (S/PDIF) interface of civilian level and U.S. Audio Engineering Society/European Broadcasting Union (AES/EBU) standard interface of specialized standard broadcast level.Usually the voice data that transmits between audiogenic device and player need carry out the encoding and decoding processing by codec, but owing to have serious electromagnetic wave between audiogenic device and the player, if transmission of analogue signal between them will certainly cause the decline of tonequality.Therefore processing scheme commonly used is: finish pulse code modulation (PCM) (Pulse CodeModulation by digital audio interface, PCM) transmission of voice data, in player or audio amplifier, finish modulus (D/A) the converter decoding of pcm audio data, amplify output then, so that promote tonequality.
In order to realize said process, need in portable media player, realize two-way mark coding (Biphase-Mark Decoding), S/PDIF interface and AES/EBU interface can both be realized two-way mark (Biphase-Mark) code encoding/decoding mode.
With the S/PDIF interface is example, and its data flow transmitted is made of piece (block), the form of each block as shown in Figure 1:
Each block is made up of 192 frames (frames); Each frame is made up of 2 subframes (sub-frame); Sub-frame represents a sampling point of a left side or R channel, and its form as shown in Figure 2.Preamble is divided into preamble B among Fig. 1, preamble W and preamble M.Wherein, the frame head of first L channel (Channel L) sampling point of a block of preamble B sign, the frame head of R channel (Channel R) sampling point among the preamble W sign block, the frame head of preamble M sign L channel sampling point (in block first L channel sampling point).
In sub-frame form shown in Figure 2,0-3 bit (bit) is synchronizing frame head (preamble), is the opening flag (start flag) of sampled point, and 4-27bit is the value of sampled point.The S/PDIF interface is supported the resolution (resolution) of 24bit or 20bit, and when the resolution of sampled point was 20bit, LSB was from 8bit, and 4-7bit fills out 0; Otherwise LSB is from 4bit.28bit is effective marker (validate flag), be used to indicate whether this sampling point value is effective, 29bit is user ID (user flag), indicate that this sub-frame is a multimedia form, or broadcasting format, 30bit is channel status (channel state), and 31bit is parity check bit (parity bit).
The coding of sampling point value satisfies the two-way mark coded format, specifically as shown in Figure 3: when data are encoded, following rule is followed in coded pulse: the boundary in the pulse of each bit data bit correspondence of raw data all saltus step can occur, as above the impulse level of a bit data bit is high (high level), the impulse level of then next bit data bit can saltus step be low (low level), opposite process is also set up, and locates shown in the dotted line among Fig. 3; Simultaneously, when data are encoded, when if current bit is " 1 ", place in the middle of the pulsewidth of this bit data bit correspondence, a saltus step also can occur, and current bit keeps then its corresponding impulse level value constant when being " 0 ", as part shown in the arrow of below among Fig. 3, indicated and in cataloged procedure, produce impulse hits and keep the constant corresponding moment point of impulse level.After having passed through the two-way mark coding, in the string graphic data interface, a minimum pulse width has in fact just been represented half information of True Data, usually this minimum pulse width is referred to as chip.
S/PDIF is as asynchronous unidirectional, self-built clock (self-clocking) interface, in data, implied clock information, so, bring in for reception and to say, can from data message, recover clock signal, and utilize this clock signal to finish reading of data, and sampling rate information is submitted to application layer, finish the broadcast of voice data.
In audio interface; recovered clock information can adopt synchronised logic (the analogphase-locked loop of simulation usually; PLL); Mo Ni phaselocked loop just, but because in the two-way mark coding, 1 is different with 0 coded system; if the input data are complete " 1 "; then the clock information after the digital coding is the twice of actual clock, because in the middle of the pulsewidth of each bit correspondence, all the pulsatile once saltus step can occur.And when the input data be complete " 0 ", then coding back hopping edge information and clock information be with frequency, because only can just saltus step can occur at the boundary of the pulse of bit correspondence.So adopt the phaselocked loop of traditional simulation can't lock actual clock information, and PLL can seriously be subject to the instability tolerance (JitterTolerance) of input signal.
The method that is applied to the sampling point position of digital audio interface accordatura audio data really at present in the prior art mainly contains two kinds: remove 3 methods and revised law.The basic thought that removes 3 methods is by calculating first high level or the low level length of synchronizing frame head pulse, again divided by 3, and then can determine the sampling point position of voice data, and 3 methods of removing realize simple, but need divider in the circuit, cause circuit area bigger; Revised law is at first supposed a sampling point position, determine the sampling point position of current voice data by the sampling point position that continues the correction original hypothesis, compare with 3 methods of removing, the revised law circuit realizes that area is less, but since the sampling point position of original hypothesis may be not accurate enough and need not stop to audio data detection to continue to revise current sampling point position, the situation that loss of data therefore may occur, and power consumption is bigger.
Summary of the invention
The invention provides a kind of method and device of definite audio data sampling point position, in order to solve loss of data and the big problem of power consumption in the prior art.
The embodiment of the invention provides a kind of method of definite audio data sampling point position, described voice data adopts two-way mark coded system coding to transfer to receiving end by transmitting terminal, described voice data is made up of data block, data block is made of frame, each frame comprises synchronizing frame head B pulse, and described method comprises:
The hopping edge is carried out in synchronizing frame head B pulse in the voice data that receives detect, and, count by the receiving terminal system clock according to detected hopping edge number;
Calculate first hopping edge during second hopping edge count value and the count value during three hopping edges, second hopping edge to the and value, as first count value; And calculate count value during three hopping edges, second hopping edge to the and the 3rd hopping edge to the forth jump become along during count value and value, as second count value; And calculate the 3rd hopping edge to the forth jump become along during count value and the forth jump become along become to the fifth jump along during count value and value, as the 3rd count value; Described first hopping edge, second hopping edge, the 3rd hopping edge, the forth jump become the edge and the fifth jump change edge is the hopping edge of described synchronizing frame head B pulse;
When the absolute value of 2 times difference of described first count value and described second count value smaller or equal to 1, and the absolute value of the difference of described first count value and described the 3rd count value determines that smaller or equal to 1 o'clock described synchronizing frame head B pulse is correct; Otherwise, determine that described synchronizing frame head B pulse is incorrect;
When definite described synchronizing frame head B pulse is correct, the size of more described first count value and described the 3rd count value; And with less in described first count value and described the 3rd count value count value divided by 4, obtain and the corresponding count value of transmitting terminal clock-pulse width;
According to the corresponding count value of described transmitting terminal clock-pulse width, determine the corresponding moment, with the described corresponding described audio data sampling point position that constantly is defined as at its half calculated value.
The method of described definite audio data sampling point position also comprises:
When determining that described synchronizing frame head B pulse is incorrect, abandon the affiliated data of described synchronizing frame head B pulse and determine.
Described with less in described first count value and described the 3rd count value count value divided by 4, be specially:
A less count value in described first count value of storing in the register and described the 3rd count value is moved to right 2.
The embodiment of the invention also provides a kind of device of definite audio data sampling point position, described voice data adopts two-way mark coded system coding back to transfer to receiving end by transmitting terminal, described voice data is made up of data block, data block is made of frame, each frame comprises synchronizing frame head B pulse, comprising: hopping edge detecting unit, counting unit, first determining unit, second determining unit, the 3rd determining unit and the 4th determining unit;
Described hopping edge detecting unit is used for that the hopping edge is carried out in the synchronizing frame head B pulse of the voice data that receives and detects, and when detecting the hopping edge of synchronizing frame head B pulse, notifies described counting unit;
Described counting unit is used for counting by the receiving terminal system clock according to detected hopping edge;
Described first determining unit, be used to calculate first hopping edge during second hopping edge count value and the count value during three hopping edges, second hopping edge to the and value, as first count value; And calculate count value during three hopping edges, second hopping edge to the and the 3rd hopping edge to the forth jump become along during count value and value, as second count value; And calculate the 3rd hopping edge to the forth jump become along during count value and the forth jump become along become to the fifth jump along during count value and value, as the 3rd count value; Described first hopping edge, described second hopping edge, described the 3rd hopping edge, described the forth jump become the edge and described the fifth jump change edge is the hopping edge of described synchronizing frame head B pulse;
Described second determining unit, be used for absolute value when 2 times difference of described first count value and described second count value smaller or equal to 1, and the absolute value of the difference of described first count value and described the 3rd count value determines that smaller or equal to 1 o'clock described synchronizing frame head B pulse is correct; Otherwise, determine that described synchronizing frame head B pulse is incorrect;
Described the 3rd determining unit is used for when definite described synchronizing frame head B pulse is correct the size of more described first count value and described the 3rd count value; And with less in described first count value and described the 3rd count value count value divided by 4, obtain and the corresponding count value of transmitting terminal clock-pulse width;
Described the 4th determining unit is used for according to the corresponding count value of described transmitting terminal clock-pulse width, determines the corresponding moment at its half calculated value, with the described corresponding described audio data sampling point position that constantly is defined as.
Described second determining unit also is used for when definite described synchronizing frame head B pulse is incorrect, abandons the affiliated data block of described synchronizing frame head B pulse.
Beneficial effect of the present invention is as follows:
The embodiment of the invention provides the method and the device of the sampling point position of accordatura audio data really, at receiving end the hopping edge is carried out in the synchronizing frame head B pulse in the voice data that receives and detects, and according to detected hopping edge, count by the receiving terminal system clock; Determine this synchronizing frame head B pulse first, corresponding first count value, second count value and the 3rd count value during second and the 3rd the adjacent in the same way hopping edge; According to the numerical relation that satisfies between first count value, second count value and the 3rd count value, determine that correctly whether this synchronizing frame head B pulse; According to the relation between synchronizing frame head B pulse width and the transmitting terminal clock-pulse width, determine and the corresponding count value of transmitting terminal clock-pulse width when correct; According to the corresponding count value of transmitting terminal clock-pulse width, determine in the corresponding moment of its half calculated value, should correspondence be defined as audio data sampling point position constantly; When incorrect, abandon the affiliated data block of this synchronizing frame head B pulse.Pulse detects to synchronizing frame head B owing to the inventive method, has determined sampling point position accurately before to the data sampling, therefore, avoided loss of data, and only pulse detects the inventive method to synchronizing frame head B, and pulse does not detect to data, has reduced power consumption.
Description of drawings
Fig. 1 is the composition synoptic diagram of a block in the prior art sound intermediate frequency data stream;
Fig. 2 is the composition synoptic diagram of a Sub-frame that block comprised in the prior art sound intermediate frequency data stream;
Fig. 3 is for after sampling to voice data in the prior art, the synoptic diagram of the two-way mark coding of sampled point sampled value;
Fig. 4 is a process flow diagram of determining the method for audio data sampling point position in the embodiment of the invention;
Fig. 5 is a synchronizing frame head B pulse synoptic diagram in the embodiment of the invention;
Fig. 6 is a structural representation of determining the device of audio data sampling point position in the embodiment of the invention;
Fig. 7 is a structural representation of determining first determining unit in the device of audio data sampling point position in the embodiment of the invention;
Fig. 8 is a structural representation of determining second determining unit in the device of audio data sampling point position in the embodiment of the invention;
Fig. 9 is a structural representation of determining the 3rd determining unit in the device of audio data sampling point position in the embodiment of the invention;
Figure 10 is a realization circuit block diagram of determining the device of audio data sampling point position in the embodiment of the invention.
Embodiment
The embodiment of the invention provides a kind of method of definite audio data sampling point position, comprising:
The hopping edge is carried out in synchronizing frame head B pulse in the voice data that receives detect, and, count by the receiving terminal system clock according to detected hopping edge;
Determine synchronizing frame head B pulse first, corresponding first count value, second count value and the 3rd count value during second and the 3rd the adjacent in the same way hopping edge;
According to the numerical relation that satisfies between first count value, second count value and the 3rd count value, determine whether synchronizing frame head B pulse is correct;
When determining that synchronizing frame head B pulse is correct,, determine and the corresponding count value of transmitting terminal clock-pulse width according to the relation between synchronizing frame head B pulse width and the transmitting terminal clock-pulse width;
According to the corresponding count value of transmitting terminal clock-pulse width, determine the corresponding moment at its half calculated value, should correspondence be defined as audio data sampling point position constantly;
When definite synchronizing frame head B pulse is incorrect, abandon the affiliated data block of synchronizing frame head B pulse.
Below in conjunction with accompanying drawing said method of the present invention is described in detail.
Figure 4 shows that the process flow diagram of determining the method for audio data sampling point position in the embodiment of the invention, comprising:
Step S401, receiving end receive through the synchronizing frame head B pulse in the asynchronous string shape voice data behind the two-way mark coding.
Receiving end uses a system clock SCLK, and needing this system clock usually is that the data sending terminal clock frequency is more than 3 times, to guarantee the accuracy and the security of sampled data.With regard to present system, generally adopt the above clock frequency of 20MHz to satisfy the demands.
Figure 5 shows that synchronizing frame head B pulse synoptic diagram in the embodiment of the invention.
When voice data being carried out the two-way mark coding, the coded format of synchronizing frame head B pulse has two kinds of forms according to its last position for " 0 " or " 1 ", correspondence is respectively 11101000 or 00010111, when last position of synchronizing frame head B pulse is " 0 ", follow-up first data bit is " 1 ", when last position of synchronizing frame head B pulse was " 1 ", follow-up first data bit was " 0 ".
As seen, synchronizing frame head B pulse has following feature:
When 1, entering synchronizing frame head B pulse, a saltus step appears in the level value of pulse.For a kind of form, the situation of " 1 " appears being jumped to by " 0 "; For another kind of form, the situation of " 0 " appears being jumped to by " 1 ".
When 2, withdrawing from synchronizing frame head B pulse, a saltus step appears in the level value of pulse.For a kind of form, the situation of " 1 " appears being jumped to by " 0 "; For another kind of form, the situation of " 0 " appears being jumped to by " 1 ".
3, the 4th of synchronizing frame head B pulse the opposite with the 5th bit data, a saltus step appears in the level value of pulse this moment.For a kind of form, the situation of " 1 " appears being jumped to by " 0 "; For another kind of form, the situation of " 0 " appears being jumped to by " 1 ".
4, the 3rd of synchronizing frame head B pulse the opposite with the 4th bit data, a saltus step appears in the level value of pulse this moment.For a kind of form, the situation of " 0 " appears being jumped to by " 1 "; For another kind of form, the situation of " 1 " appears being jumped to by " 0 ".
5, the 5th of synchronizing frame head B pulse the opposite with the 6th bit data, a saltus step appears in the level value of pulse this moment.For a kind of form, the situation of " 0 " appears being jumped to by " 1 "; For another kind of form, the situation of " 1 " appears being jumped to by " 0 ".
The embodiment of the invention is promptly utilized the above-mentioned feature of synchronizing frame head B pulse, judges whether the synchronizing frame head B pulse of current block is correct.
Step S402, when receiving end receives the new block of in the voice data one, the hopping edge is carried out in the synchronizing frame head B pulse of this block to be detected, promptly pulse detects to synchronizing frame head B, when the level value that detects synchronizing frame head B pulse by " 0 " saltus step for " 1 " or by " 1 " saltus step when " 0 ", promptly think the hopping edge that detects synchronizing frame head B pulse.
Step S403, detect each hopping edge, during per two adjacent hopping edges, count according to the system clock frequency of receiving end; Obtain the count value during per two adjacent hopping edges.
Step S404, determine synchronizing frame head B pulse first, the corresponding first count value X1, the second count value X2 and the 3rd count value X3 during second and the 3rd the adjacent in the same way hopping edge.
Step S403 and step S404 are specially:
When detecting first hopping edge, begin counting, according to the clock frequency of receiving end, whenever receive a clock trigger signal, then count value adds 1, when detecting follow-up second hopping edge, obtain the count value A1 of first hopping edge during second hopping edge, and preserve count value A1;
When detecting second hopping edge, restart counting, when detecting follow-up the 3rd hopping edge, obtain the count value A2 during three hopping edges, second hopping edge to the, and preserve count value A2;
Count value A1 and count value A2 and, obtain during these two adjacent in the same way hopping edges, three hopping edges, first hopping edge to the, just corresponding count value X1 during first adjacent in the same way hopping edge;
When detecting the 3rd hopping edge, restart counting, up to detect follow-up the forth jump become along the time, obtain the 3rd hopping edge to the forth jump become along during count value A3, and preserve count value A3;
Count value A2 and count value A3 and, obtain second hopping edge and become during these two the adjacent in the same way hopping edges, just corresponding count value X2 during second adjacent in the same way hopping edge to the forth jump;
When detect the forth jump become along the time, restart counting, up to detect follow-up the fifth jump become along the time, obtain the forth jump become along become to the fifth jump along during count value A4, and preserve count value A4;
Count value A3 and count value A4 and, obtain the 3rd hopping edge and become during these two the adjacent in the same way hopping edges, just corresponding count value X3 during the 3rd adjacent in the same way hopping edge to the fifth jump.
Can adopt three counters to realize above-mentioned functions when particular hardware realizes, implementation method is as follows:
When detecting first hopping edge, first counter is carried out zero clearing, begin counting, clock frequency according to receiving end, whenever receive a clock trigger signal, then the count value of first counter adds 1, when detecting second hopping edge, obtain the count value A1 of first hopping edge during second hopping edge, and send this count value A1 to second counter.
Simultaneously, when detecting second hopping edge, after sending count value A1 to second counter,, restart counting, when detecting the 3rd hopping edge, obtain the count value A2 during three hopping edges, second hopping edge to the first counter O reset.
Calculate the count value A2 that first counter obtains and the count value A1 sum of second counter storage by the 3rd counter, obtain corresponding count value X1 during first adjacent in the same way hopping edge.
Then, the count value A2 that first counter is obtained sends to behind second counter first counter O reset, restarts counting, up to detect the forth jump become along the time, obtain the 3rd hopping edge to the forth jump become along during count value A3.
Calculate the count value A3 that first counter obtains and the count value A2 sum of second counter storage by the 3rd counter, obtain corresponding count value X2 during second adjacent in the same way hopping edge.
Then, the count value A3 that first counter is obtained sends to behind second counter first counter O reset, restarts counting, up to detect the fifth jump become along the time, obtain the forth jump become along become to the fifth jump along during count value A4.
Calculate the count value A4 that first counter obtains and the count value A3 sum of second counter storage by the 3rd counter, obtain corresponding count value X3 during the 3rd the adjacent in the same way hopping edge.
Step S405, according to the numerical relation that satisfies between count value X1, X2 and the X3, determine whether synchronizing frame head B pulse correct.
According to as shown in Figure 5 synchronizing frame head B pulse as can be known, synchronizing frame head B pulse width (each hopping edge that is synchronizing frame head B pulse is to the width between its corresponding next hopping edge) has following relation with the transmitting terminal clock-pulse width: first pulse of synchronizing frame head B (preceding 3 " 111 " or " 000 " of corresponding its coding) width comprises 3 transmitting terminal clock-pulse widths; Second pulse of synchronizing frame head B (the 4th " 0 " or " 1 " of corresponding its coding) width comprises 1 transmitting terminal clock-pulse width; The 3rd pulse of synchronizing frame head B (the 5th " 1 " or " 0 " of corresponding its coding) width comprises 1 transmitting terminal clock-pulse width; The 4th pulse of synchronizing frame head B (back three " 000 " or " 111 " of corresponding its coding) width, comprise 3 transmitting terminal clock-pulse widths, therefore, when the count value of supposing corresponding transmitting terminal clock-pulse width was W, the count values in four synchronizing frame head B pulse width range were respectively: 3W, 1W, 1W and 3W.
Accordingly, corresponding during the adjacent in the same way hopping edge of first of synchronizing frame head B pulse is first and second pulse (corresponding its encode preceding 4 " 1110 " or " 0001 ") of synchronizing frame head B, the corresponding first count value X1; Correspondence is second and the 3rd pulse (corresponding its encode the 4th and the 5th " 01 " or " 10 ") of synchronizing frame head B during second adjacent in the same way hopping edge of synchronizing frame head B pulse, the corresponding second count value X2; Correspondence is the 3rd and the 4th pulse (corresponding its encode back 4 " 1000 " or " 0111 ") of synchronizing frame head B during the 3rd the adjacent in the same way hopping edge of synchronizing frame head B pulse, corresponding the 3rd count value X3, therefore, the first count value X1, the second count value X2 and the 3rd count value X3 are respectively 4W, 2W and 4W.
Because the system clock frequency of receiving end and the system clock frequency of transmitting terminal may not be the integral multiple relations, therefore, not to equate fully mutually between the X1 that when counting, is obtained, 2 times X2 and the X3, may have error smaller or equal to 1 according to the system clock frequency of receiving end.
Based on above-mentioned principle, whether the embodiment of the invention judges the absolute value of 2 times difference of the first count value X1 and the second count value X2 smaller or equal to 1, and whether the absolute value of the difference of the first count value X1 and the 3rd count value X3 is smaller or equal to 1.
If satisfy above-mentioned condition, promptly the absolute value of 2 times the difference of the first count value X1 and the second count value X2 is smaller or equal to 1, and the absolute value of the difference of the first count value X1 and the 3rd count value X3 determines then that smaller or equal to 1 synchronizing frame head B is correct;
Otherwise, determine that synchronizing frame head B is incorrect.
Step S406, when definite synchronizing frame head B pulse is correct, according to the relation between synchronizing frame head B pulse width and the transmitting terminal clock-pulse width, determine and the corresponding count value W of transmitting terminal clock-pulse width.
In the embodiment of the invention, when definite synchronizing frame head B is correct, because the first count value X1 and the 3rd count value X3 are 4W, consider as far as possible not obliterated data simultaneously, relatively the size of the first count value X1 and the 3rd count value X3 is selected a wherein less count value, and this count value of storing in the register is moved to right 2, promptly be equivalent to this count value divided by 4, the result is the corresponding count value W of transmitting terminal clock-pulse width;
Step S407, according to the corresponding count value W of transmitting terminal clock-pulse width, determine half calculated value of count value W corresponding constantly, should correspondence be defined as audio data sampling point position constantly.
Step S408, when definite synchronizing frame head B is incorrect, abandon the block under this synchronizing frame head B.
Based on same inventive concept, the method of the sampling point position of accordatura audio data really is provided according to the above embodiment of the present invention, correspondingly, the embodiment of the invention also provides a kind of device of definite audio data sampling point position, the apparatus structure synoptic diagram comprises as shown in Figure 6: hopping edge detecting unit 601, counting unit 602, first determining unit 603, second determining unit 604, the 3rd determining unit 605 and the 4th determining unit 606;
Hopping edge detecting unit 601 is used for that the hopping edge is carried out in the synchronizing frame head B pulse of the voice data that receives and detects, and when detecting the hopping edge of synchronizing frame head B pulse, notifications count unit 602;
Counting unit 602 is used for counting by the receiving terminal system clock according to detected hopping edge;
First determining unit 603, be used for determining synchronizing frame head B pulse first, corresponding first count value, second count value and the 3rd count value during second and the 3rd the adjacent in the same way hopping edge;
Second determining unit 604 is used for determining according to numerical relation satisfied between first count value, second count value and the 3rd count value whether synchronizing frame head B pulse is correct;
The 3rd determining unit 605 is used for when definite synchronizing frame head B pulse is correct, according to the relation between synchronizing frame head B pulse width and the transmitting terminal clock-pulse width, determines and the corresponding count value of transmitting terminal clock-pulse width;
The 4th determining unit 606 is used for according to the corresponding count value of transmitting terminal clock-pulse width, determines the corresponding moment at its half calculated value, should correspondence be defined as audio data sampling point position constantly.
Above-mentioned second determining unit 604 also is used for when definite synchronizing frame head B pulse is incorrect, abandons the affiliated data block of this synchronizing frame head B pulse.
Above-mentioned first determining unit 603 as shown in Figure 7, further comprises: obtain subelement 701, storing sub-units 702 and computation subunit 703;
Obtain subelement 701, be used to obtain the count value during two adjacent hopping edges of synchronizing frame head B pulse, and send storing sub-units 702 and computation subunit 703 to;
Storing sub-units 702 is used to store the count values of obtaining subelement 701 the last transmission;
Computation subunit 703 is used to calculate the count value of storing sub-units 702 storages and obtain subelement 701 these count value sums that get access to, as the corresponding count value during two adjacent in the same way hopping edges of synchronizing frame head B pulse.
Above-mentioned second determining unit 604 as shown in Figure 8, further comprises: first relatively subelement 801, determine subelement 802;
First subelement 801 relatively is used to calculate the absolute value of 2 times difference of first count value and second count value, and the absolute value that calculates the difference of first count value and the 3rd count value, and relatively this absolute value whether smaller or equal to 1;
Determine subelement 802, be used for when this absolute value smaller or equal to 1 the time, determine that synchronizing frame head B pulse is correct; Otherwise, determine that synchronizing frame head B pulse is incorrect, abandon the affiliated data block of this synchronizing frame head B pulse.
Above-mentioned the 3rd determining unit 605 as shown in Figure 9, further comprises: second compares subelement 901 and computation subunit 902;
Second compares subelement 901, is used for the size of comparison first count value and the 3rd count value;
Computation subunit 902 is used for the count value that first count value and the 3rd count value is less divided by 4, obtains and the corresponding count value of transmitting terminal clock-pulse width.
Determine method and apparatus according to above-mentioned audio data sampling point position, the embodiment of the invention provides a kind of concrete realization circuit, and its circuit block diagram as shown in figure 10.
The edge is carried out in the synchronizing frame head B pulse of voice data of input detect 1001, whenever detect impulse hits along the time, counter of notifications 1002 zero clearings, begin counting, when detecting follow-up next hopping edge, counter 1002 sends current count value to counter 1003 sum counters 1004, restart counting then, the last count value of counter 1003 memory counters 1002, the count value of the current count value sum counter 1003 of counter 1004 computing counters 1002 and, by counter 1002, the continuous counting and the calculating of counter 1003 sum counters 1004, successively obtain the first count value X1, the second count value X2 and the 3rd count value X3, obtain being stored in the register 1005 behind the first count value X1, the second count value X2 that obtains was moved to left after 1 1006 (being equivalent to multiply by 2), in equality comparator 1007, equate relatively with the count value X1 of register 1005 storages, the 3rd count value X3 that will obtain again equates in equality comparator 1007 relatively with the first count value X1 of register 1005 storages, because above-mentioned twice equates relatively to carry out in the different time, therefore only need to use an equality comparator 1007 promptly can realize equating for twice relatively, according to comparative result, when the absolute value of 2 times the difference of the first count value X1 and the second count value X2 smaller or equal to 1, and the absolute value of the difference of first count value X1 and the 3rd count value X3 was smaller or equal to 1 o'clock, equality comparator 1007 judges that synchronizing frame head B is correct, the first count value X1 and the 3rd count value X3 are got minimum value 1008, again this value is moved to right 2 (being equivalent to divided by 4), obtain count value W, the absolute value of difference that deducts 2 times the second count value X2 as the first count value X1 is not below or equal to 1, or first the count value X1 absolute value that deducts the difference of the 3rd count value X3 be not below or equal to 1 o'clock, equality comparator 1007 judges that synchronizing frame head B is incorrect, abandons the affiliated block of this synchronizing frame head B.
In sum, the scheme that the embodiment of the invention provides, receiving end to synchronizing frame head B pulse carry out the hopping edge and detect, and, count by the receiving terminal system clock according to detected hopping edge; Determine count value corresponding during per two the adjacent in the same way hopping edges of this synchronizing frame head B pulse; Determine according to this count value whether this synchronizing frame head B pulse is correct; When correct, according to the relation between this count value and synchronizing frame head B pulse width and the transmitting terminal clock-pulse width, determine and the corresponding count value of transmitting terminal clock-pulse width, according to this count value determine its half calculated value corresponding constantly, should correspondence be defined as audio data sampling point position constantly; When incorrect, abandon the affiliated data block of this synchronizing frame head B pulse.Adopt method provided by the invention and device, solved loss of data and the big problem of power consumption in the prior art.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (5)

1. the method for a definite audio data sampling point position, described voice data adopts two-way mark coded system coding to transfer to receiving end by transmitting terminal, described voice data is made up of data block, data block is made of frame, each frame comprises synchronizing frame head B pulse, it is characterized in that described method comprises:
The hopping edge is carried out in synchronizing frame head B pulse in the voice data that receives detect, and, count by the receiving terminal system clock according to detected hopping edge number;
Calculate first hopping edge during second hopping edge count value and the count value during three hopping edges, second hopping edge to the and value, as first count value; And calculate count value during three hopping edges, second hopping edge to the and the 3rd hopping edge to the forth jump become along during count value and value, as second count value; And calculate the 3rd hopping edge to the forth jump become along during count value and the forth jump become along become to the fifth jump along during count value and value, as the 3rd count value; Described first hopping edge, described second hopping edge, described the 3rd hopping edge, described the forth jump become the edge and described the fifth jump change edge is the hopping edge of described synchronizing frame head B pulse;
When the absolute value of 2 times difference of described first count value and described second count value smaller or equal to 1, and the absolute value of the difference of described first count value and described the 3rd count value determines that smaller or equal to 1 o'clock described synchronizing frame head B pulse is correct; Otherwise, determine that described synchronizing frame head B pulse is incorrect;
When definite described synchronizing frame head B pulse is correct, the size of more described first count value and described the 3rd count value; And with less in described first count value and described the 3rd count value count value divided by 4, obtain and the corresponding count value of transmitting terminal clock-pulse width;
According to the corresponding count value of described transmitting terminal clock-pulse width, determine the corresponding moment, with the described corresponding described audio data sampling point position that constantly is defined as at its half calculated value.
2. the method for claim 1 is characterized in that, also comprises:
When determining that described synchronizing frame head B pulse is incorrect, abandon the affiliated data block of described synchronizing frame head B pulse.
3. the method for claim 1 is characterized in that, described with less in described first count value and described the 3rd count value count value divided by 4, be specially:
A less count value in described first count value of storing in the register and described the 3rd count value is moved to right 2.
4. the device of a definite audio data sampling point position, described voice data adopts two-way mark coded system coding back to transfer to receiving end by transmitting terminal, described voice data is made up of data block, data block is made of frame, each frame comprises synchronizing frame head B pulse, it is characterized in that, comprising: hopping edge detecting unit, counting unit, first determining unit, second determining unit, the 3rd determining unit and the 4th determining unit;
Described hopping edge detecting unit is used for that the hopping edge is carried out in the synchronizing frame head B pulse of the voice data that receives and detects, and when detecting the hopping edge of synchronizing frame head B pulse, notifies described counting unit;
Described counting unit is used for counting by the receiving terminal system clock according to detected hopping edge;
Described first determining unit, be used to calculate first hopping edge during second hopping edge count value and the count value during three hopping edges, second hopping edge to the and value, as first count value; And calculate count value during three hopping edges, second hopping edge to the and the 3rd hopping edge to the forth jump become along during count value and value, as second count value; And calculate the 3rd hopping edge to the forth jump become along during count value and the forth jump become along become to the fifth jump along during count value and value, as the 3rd count value; Described first hopping edge, described second hopping edge, described the 3rd hopping edge, described the forth jump become the edge and described the fifth jump change edge is the hopping edge of described synchronizing frame head B pulse;
Described second determining unit, be used for absolute value when 2 times difference of described first count value and described second count value smaller or equal to 1, and the absolute value of the difference of described first count value and described the 3rd count value determines that smaller or equal to 1 o'clock described synchronizing frame head B pulse is correct; Otherwise, determine that described synchronizing frame head B pulse is incorrect;
Described the 3rd determining unit is used for when definite described synchronizing frame head B pulse is correct the size of more described first count value and described the 3rd count value; And with less in described first count value and described the 3rd count value count value divided by 4, obtain and the corresponding count value of transmitting terminal clock-pulse width;
Described the 4th determining unit is used for according to the corresponding count value of described transmitting terminal clock-pulse width, determines the corresponding moment at its half calculated value, with the described corresponding described audio data sampling point position that constantly is defined as.
5. device as claimed in claim 4 is characterized in that, described second determining unit also is used for when definite described synchronizing frame head B pulse is incorrect, abandons the affiliated data block of described synchronizing frame head B pulse.
CN2008101730909A 2008-11-28 2008-11-28 Method and apparatus for determining audio data sampling point position Expired - Fee Related CN101409093B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101730909A CN101409093B (en) 2008-11-28 2008-11-28 Method and apparatus for determining audio data sampling point position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101730909A CN101409093B (en) 2008-11-28 2008-11-28 Method and apparatus for determining audio data sampling point position

Publications (2)

Publication Number Publication Date
CN101409093A CN101409093A (en) 2009-04-15
CN101409093B true CN101409093B (en) 2011-06-15

Family

ID=40572063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101730909A Expired - Fee Related CN101409093B (en) 2008-11-28 2008-11-28 Method and apparatus for determining audio data sampling point position

Country Status (1)

Country Link
CN (1) CN101409093B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5843856B2 (en) * 2011-05-20 2016-01-13 株式会社ソシオネクスト Bitstream transmission apparatus, bitstream transmission / reception system, bitstream reception apparatus, bitstream transmission method, and bitstream reception method
CN103916211A (en) * 2013-01-06 2014-07-09 中兴通讯股份有限公司 Data receiving method and device
CN103268138A (en) * 2013-05-21 2013-08-28 四川九洲电器集团有限责任公司 Pulse position coding synchronous head capture module and pulse position coding synchronous head capture method on basis of field programmable gate array (FPGA) design
CN104914329B (en) * 2015-05-19 2017-12-08 苏州市职业大学 A kind of trigger device and triggering method of SPDIF interface signals
CN112765073A (en) * 2019-11-04 2021-05-07 中车株洲电力机车研究所有限公司 Data sampling method, system, storage medium and computer equipment
CN115118386B (en) * 2022-06-21 2024-04-12 上海艾为电子技术股份有限公司 Decoding method, decoding device, decoder, readable storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1485988A (en) * 2002-09-23 2004-03-31 珠海炬力集成电路设计有限公司 Method for sampling and transforming analog signal below lowest electric potential in a circuit
CN101018308A (en) * 2006-01-21 2007-08-15 珠海炬力集成电路设计有限公司 Making method of AMV audio and video file and AMV audio and video file player
CN101247187A (en) * 2008-03-27 2008-08-20 炬力集成电路设计有限公司 Audio data recovery method, device and multimedia data receiving system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1485988A (en) * 2002-09-23 2004-03-31 珠海炬力集成电路设计有限公司 Method for sampling and transforming analog signal below lowest electric potential in a circuit
CN101018308A (en) * 2006-01-21 2007-08-15 珠海炬力集成电路设计有限公司 Making method of AMV audio and video file and AMV audio and video file player
CN101247187A (en) * 2008-03-27 2008-08-20 炬力集成电路设计有限公司 Audio data recovery method, device and multimedia data receiving system

Also Published As

Publication number Publication date
CN101409093A (en) 2009-04-15

Similar Documents

Publication Publication Date Title
CN101409093B (en) Method and apparatus for determining audio data sampling point position
CN101247187B (en) Audio data recovery method, device and multimedia data receiving system
CN102160378B (en) Method and apparatus for synchronizing highly compressed enhancement layer data
US20110261969A1 (en) Biphase mark code decoder and method of operation
CN106817197B (en) Communication coding and decoding method based on duty ratio modulation
US8724745B2 (en) Method and apparatus for decoding coded data streams
US20070174523A1 (en) Apparatus and method for generating bitstream of s/pdif data in hdmi
CN101729198B (en) Method, device and system for encoding and decoding
CN110213023B (en) Decoding method and decoding circuit for two-phase mark codes with different transmission rates
CN101518081A (en) Method and system for error robust audio playback time stamp reporting
US6772021B1 (en) Digital audio data receiver without synchronized clock generator
US8000051B2 (en) Method for recovering a position and clock period from an input digital signal
CN108156557B (en) Clock and data recovery circuit and recovery method of digital audio interface
US3605091A (en) Feedback error control arrangement
CN104639176A (en) Asynchronous decoder and asynchronous decoding method for BMC (Biphase Mark Coding) signal
CN102932103B (en) A kind of message transmission rate adaptive reception method based on digital transformer substation
CN101656594B (en) Method and equipment for branch path synchronization of deletion type convolution code
US10990348B2 (en) Detection method and detection device for audio signal
CN210183341U (en) Decoding circuit for biphase mark coding of different transmission rates
CN101540656A (en) Decoding device and decoding method used for intermittent balise of CTCS
TWI443974B (en) Packet receiver and packet processing method thereof
CN103916211A (en) Data receiving method and device
CN113824545B (en) Asynchronous communication method, device and related equipment
CN102655502B (en) Precise fractional frequency division based data insertion method adapted to any data code stream
CN108564957B (en) Code stream decoding method and device, storage medium and processor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: JUXIN(ZHUHAI) TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: JULI INTEGRATED CIRCUIT DESIGN CO., LTD.

Effective date: 20141215

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20141215

Address after: 519085, C, No. 1, No. four, 1 hi tech Zone, Tang Wan Town, Guangdong, Zhuhai

Patentee after: ACTIONS (ZHUHAI) TECHNOLOGY CO., LTD.

Address before: 519085 No. 1, unit 15, building 1, 1 Da Ha Road, Tang Wan Town, Guangdong, Zhuhai

Patentee before: Juli Integrated Circuit Design Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110615

Termination date: 20181128