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