File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -674,7 +674,7 @@ static void IRQ_wdata_dma(void)
674
674
bc_dat = image -> write_bc_window ;
675
675
for (cons = dma_wr -> cons ; cons != prod ; cons = (cons + 1 ) & buf_mask ) {
676
676
next = dma_wr -> buf [cons ];
677
- curr = (uint16_t )(next - prev ) - (cell >> 1 );
677
+ curr = (int16_t )(next - prev ) - (cell >> 1 );
678
678
if (unlikely (curr < 0 )) {
679
679
/* Runt flux, much shorter than bitcell clock. Merge it forward. */
680
680
continue ;
@@ -686,6 +686,8 @@ static void IRQ_wdata_dma(void)
686
686
if (!(bc_prod & 31 ))
687
687
bc_buf [((bc_prod - 1 ) / 32 ) & bc_bufmask ] = htobe32 (bc_dat );
688
688
}
689
+ curr += cell >> 1 ; /* remove the 1/2-cell bias */
690
+ prev -= curr >> 2 ; /* de-jitter/precomp: carry 1/4 of phase error */
689
691
bc_dat = (bc_dat << 1 ) | 1 ;
690
692
bc_prod ++ ;
691
693
switch (sync ) {
You can’t perform that action at this time.
0 commit comments