Advertisement
codekipper

spdif fixup

Nov 7th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
  2. index cbe598b0f..08f0ed3e9 100644
  3. --- a/sound/soc/sunxi/sun4i-spdif.c
  4. +++ b/sound/soc/sunxi/sun4i-spdif.c
  5. @@ -175,6 +175,7 @@ struct sun4i_spdif_quirks {
  6. unsigned int reg_dac_txdata;
  7. bool has_reset;
  8. unsigned int val_fctl_ftx;
  9. + unsigned int mclk_multiplier;
  10. };
  11.  
  12. struct sun4i_spdif_dev {
  13. @@ -311,6 +312,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream,
  14. default:
  15. return -EINVAL;
  16. }
  17. + mclk *= host->quirks->mclk_multiplier;
  18.  
  19. ret = clk_set_rate(host->spdif_clk, mclk);
  20. if (ret < 0) {
  21. @@ -345,6 +347,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream,
  22. default:
  23. return -EINVAL;
  24. }
  25. + mclk_div *= host->quirks->mclk_multiplier;
  26.  
  27. reg_val = 0;
  28. reg_val |= SUN4I_SPDIF_TXCFG_ASS;
  29. @@ -427,24 +430,28 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = {
  30. static const struct sun4i_spdif_quirks sun4i_a10_spdif_quirks = {
  31. .reg_dac_txdata = SUN4I_SPDIF_TXFIFO,
  32. .val_fctl_ftx = SUN4I_SPDIF_FCTL_FTX,
  33. + .mclk_multiplier = 1,
  34. };
  35.  
  36. static const struct sun4i_spdif_quirks sun6i_a31_spdif_quirks = {
  37. .reg_dac_txdata = SUN4I_SPDIF_TXFIFO,
  38. .val_fctl_ftx = SUN4I_SPDIF_FCTL_FTX,
  39. .has_reset = true,
  40. + .mclk_multiplier = 1,
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement