801-audio-0002-Revert-ASoC-fsl_sai-Implement-set_bclk_ratio.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From aff2edb9c66a1188ed6554643e3cf76595c56846 Mon Sep 17 00:00:00 2001
  2. From: Leonard Crestez <[email protected]>
  3. Date: Thu, 3 Oct 2019 20:44:59 +0300
  4. Subject: [PATCH] Revert "ASoC: fsl_sai: Implement set_bclk_ratio"
  5. This reverts commit 63d1a3488ff58e094a7f517cf93c0250f0a3f6be.
  6. ---
  7. sound/soc/fsl/fsl_sai.c | 21 ++-------------------
  8. sound/soc/fsl/fsl_sai.h | 1 -
  9. 2 files changed, 2 insertions(+), 20 deletions(-)
  10. --- a/sound/soc/fsl/fsl_sai.c
  11. +++ b/sound/soc/fsl/fsl_sai.c
  12. @@ -137,16 +137,6 @@ static int fsl_sai_set_dai_tdm_slot(stru
  13. return 0;
  14. }
  15. -static int fsl_sai_set_dai_bclk_ratio(struct snd_soc_dai *dai,
  16. - unsigned int ratio)
  17. -{
  18. - struct fsl_sai *sai = snd_soc_dai_get_drvdata(dai);
  19. -
  20. - sai->bclk_ratio = ratio;
  21. -
  22. - return 0;
  23. -}
  24. -
  25. static int fsl_sai_set_dai_sysclk_tr(struct snd_soc_dai *cpu_dai,
  26. int clk_id, unsigned int freq, int fsl_dir)
  27. {
  28. @@ -433,14 +423,8 @@ static int fsl_sai_hw_params(struct snd_
  29. slot_width = sai->slot_width;
  30. if (!sai->is_slave_mode) {
  31. - if (sai->bclk_ratio)
  32. - ret = fsl_sai_set_bclk(cpu_dai, tx,
  33. - sai->bclk_ratio *
  34. - params_rate(params));
  35. - else
  36. - ret = fsl_sai_set_bclk(cpu_dai, tx,
  37. - slots * slot_width *
  38. - params_rate(params));
  39. + ret = fsl_sai_set_bclk(cpu_dai, tx,
  40. + slots * slot_width * params_rate(params));
  41. if (ret)
  42. return ret;
  43. @@ -646,7 +630,6 @@ static void fsl_sai_shutdown(struct snd_
  44. }
  45. static const struct snd_soc_dai_ops fsl_sai_pcm_dai_ops = {
  46. - .set_bclk_ratio = fsl_sai_set_dai_bclk_ratio,
  47. .set_sysclk = fsl_sai_set_dai_sysclk,
  48. .set_fmt = fsl_sai_set_dai_fmt,
  49. .set_tdm_slot = fsl_sai_set_dai_tdm_slot,
  50. --- a/sound/soc/fsl/fsl_sai.h
  51. +++ b/sound/soc/fsl/fsl_sai.h
  52. @@ -176,7 +176,6 @@ struct fsl_sai {
  53. unsigned int mclk_streams;
  54. unsigned int slots;
  55. unsigned int slot_width;
  56. - unsigned int bclk_ratio;
  57. const struct fsl_sai_soc_data *soc_data;
  58. struct snd_soc_dai_driver cpu_dai_drv;