Guest User

452_x1000_EROSQ_ES9018K2M_DPLL_Bandwidth_Fix.diff

a guest
Jul 27th, 2024
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.20 KB | Source Code | 0 0
  1. --- a/firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c.orig 2024-06-23 14:02:15.562051005 +0200
  2. +++ b/firmware/target/mips/ingenic_x1000/erosqnative/audiohw-erosqnative.c  2024-06-23 13:58:51.311463492 +0200
  3. @@ -104,6 +104,30 @@
  4.          * for 24-bit data... */
  5.          // es9018k2m_write_reg(ES9018K2M_REG1_INPUT_CONFIG, 0b01001100); // 24-bit data
  6.  
  7. +        /* Datasheet: Sets the number os FSR edges that must occur before    *
  8. +         * the DPLL and ASRC can lock on to the the incoming Signal.         *
  9. +         * When Samplerates >= 96khz could be used, STOP_DIV should be set   *
  10. +         * to 0 (= 16384 FSR Edges).                                         *
  11. +         *   Reg #10 [3:0] (0x05 default, 2730 FSR Edges)                    */
  12. +        es9018k2m_write_reg(ES9018K2M_REG10_MASTER_MODE_CTRL, 0x00);
  13. +
  14. +        /* Datasheet: The ES90x8Q2M/K2M contains a Jitter Eliminator block,   *
  15. +         * which employs the use of a digital phase locked loop (DPLL) to     *
  16. +         * lock to the incoming audio clock rate. When in I2S or SPDIF mode,  *
  17. +         * the DPLL will lock to the frame clock (1 x fs). However, when in   *
  18. +         * DSD mode, the DPLL has no frame clock information, and must in-    *
  19. +         * stead lock to the bit clock rate (BCK). For this reason, there are *
  20. +         * two bandwidth settings for the DPLL.                               *
  21. +            Reg #12 [7:4] (0x05 default) bandwidth for I2S / SPDIF mode.
  22. +            Reg #12 [3:0] (0x0A default) bandwidth for DSD mode.
  23. +         * The DPLL bandwidth sets how quickly the DPLL can adjust its intern *
  24. +         * representation of the audio clock. The higher the jitter or        *
  25. +         * frequency drift on the audio clock, the higher the bandwidth must  *
  26. +         * be so that the DPLL can react.                                     *
  27. +         * ! If the bandwidth is “too low”, the DPLL will loose lock and you  *
  28. +         * ! will hear random dropouts. (Fixed my SurfansF20 v3.2 dropouts)   */
  29. +        es9018k2m_write_reg(ES9018K2M_REG12_DPLL_SETTINGS, 0xda);
  30. +
  31.      } else { /* Default to SWVOL for PCM5102A DAC */
  32.          logf("Default to SWVOL: ret=%d", ret);
  33.      }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment