diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-02-13 09:26:54 -0500 |
---|---|---|
committer | Liam Girdwood <lrg@ti.com> | 2012-03-12 09:34:21 -0400 |
commit | cb40b63a224b41325a8ecdbeed5290866864b9ae (patch) | |
tree | 3da24dc61c9af27fbf3b04aa7a067a4ac9c31b83 /sound/soc/omap/omap-mcbsp.c | |
parent | 81da6a9e49b9561f325d201c54eca274f066e13b (diff) |
ASoC: OMAP McBSP: Remove redundant accessors
We no longer need accessor functions for max_tx/rx_threshold, dma_op_mode
or for the FIFO size.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/omap/omap-mcbsp.c')
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 892400259494..9c703f18714c 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -67,13 +67,12 @@ static void omap_mcbsp_set_threshold(struct snd_pcm_substream *substream) | |||
67 | struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); | 67 | struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); |
68 | struct omap_mcbsp_data *mcbsp_data = &mcbsp->mcbsp_data; | 68 | struct omap_mcbsp_data *mcbsp_data = &mcbsp->mcbsp_data; |
69 | struct omap_pcm_dma_data *dma_data; | 69 | struct omap_pcm_dma_data *dma_data; |
70 | int dma_op_mode = omap_mcbsp_get_dma_op_mode(mcbsp); | ||
71 | int words; | 70 | int words; |
72 | 71 | ||
73 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 72 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
74 | 73 | ||
75 | /* TODO: Currently, MODE_ELEMENT == MODE_FRAME */ | 74 | /* TODO: Currently, MODE_ELEMENT == MODE_FRAME */ |
76 | if (dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) | 75 | if (mcbsp->dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) |
77 | /* | 76 | /* |
78 | * Configure McBSP threshold based on either: | 77 | * Configure McBSP threshold based on either: |
79 | * packet_size, when the sDMA is in packet mode, or | 78 | * packet_size, when the sDMA is in packet mode, or |
@@ -106,7 +105,7 @@ static int omap_mcbsp_hwrule_min_buffersize(struct snd_pcm_hw_params *params, | |||
106 | int size; | 105 | int size; |
107 | 106 | ||
108 | snd_interval_any(&frames); | 107 | snd_interval_any(&frames); |
109 | size = omap_mcbsp_get_fifo_size(mcbsp); | 108 | size = mcbsp->pdata->buffer_size; |
110 | 109 | ||
111 | frames.min = size / channels->min; | 110 | frames.min = size / channels->min; |
112 | frames.integer = 1; | 111 | frames.integer = 1; |
@@ -255,17 +254,14 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
255 | if (mcbsp->pdata->buffer_size) { | 254 | if (mcbsp->pdata->buffer_size) { |
256 | dma_data->set_threshold = omap_mcbsp_set_threshold; | 255 | dma_data->set_threshold = omap_mcbsp_set_threshold; |
257 | /* TODO: Currently, MODE_ELEMENT == MODE_FRAME */ | 256 | /* TODO: Currently, MODE_ELEMENT == MODE_FRAME */ |
258 | if (omap_mcbsp_get_dma_op_mode(mcbsp) == | 257 | if (mcbsp->dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) { |
259 | MCBSP_DMA_MODE_THRESHOLD) { | ||
260 | int period_words, max_thrsh; | 258 | int period_words, max_thrsh; |
261 | 259 | ||
262 | period_words = params_period_bytes(params) / (wlen / 8); | 260 | period_words = params_period_bytes(params) / (wlen / 8); |
263 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 261 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
264 | max_thrsh = omap_mcbsp_get_max_tx_threshold( | 262 | max_thrsh = mcbsp->max_tx_thres; |
265 | mcbsp); | ||
266 | else | 263 | else |
267 | max_thrsh = omap_mcbsp_get_max_rx_threshold( | 264 | max_thrsh = mcbsp->max_rx_thres; |
268 | mcbsp); | ||
269 | /* | 265 | /* |
270 | * If the period contains less or equal number of words, | 266 | * If the period contains less or equal number of words, |
271 | * we are using the original threshold mode setup: | 267 | * we are using the original threshold mode setup: |