Commit 662ffae9 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

ASoC: davinci-mcasp: Harmonize the sub hw_params function names

Instead of
davinci_hw_common_param - for common, I2S/DIT mode settings
davinci_hw_dit_param - for DIT protocol configuration
davinci_hw_param - for I2S (and compatible protocols)

Use the following names:
mcasp_common_hw_param, mcasp_dit_hw_param and mcasp_i2s_hw_param.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7552f34a
...@@ -448,7 +448,7 @@ static int davinci_config_channel_size(struct davinci_mcasp *mcasp, ...@@ -448,7 +448,7 @@ static int davinci_config_channel_size(struct davinci_mcasp *mcasp,
return 0; return 0;
} }
static int davinci_hw_common_param(struct davinci_mcasp *mcasp, int stream, static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
int channels) int channels)
{ {
int i; int i;
...@@ -524,7 +524,7 @@ static int davinci_hw_common_param(struct davinci_mcasp *mcasp, int stream, ...@@ -524,7 +524,7 @@ static int davinci_hw_common_param(struct davinci_mcasp *mcasp, int stream,
return 0; return 0;
} }
static void davinci_hw_param(struct davinci_mcasp *mcasp, int stream) static void mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream)
{ {
int i, active_slots; int i, active_slots;
u32 mask = 0; u32 mask = 0;
...@@ -567,7 +567,7 @@ static void davinci_hw_param(struct davinci_mcasp *mcasp, int stream) ...@@ -567,7 +567,7 @@ static void davinci_hw_param(struct davinci_mcasp *mcasp, int stream)
} }
/* S/PDIF */ /* S/PDIF */
static void davinci_hw_dit_param(struct davinci_mcasp *mcasp) static void mcasp_dit_hw_param(struct davinci_mcasp *mcasp)
{ {
/* Set the TX format : 24 bit right rotation, 32 bit slot, Pad 0 /* Set the TX format : 24 bit right rotation, 32 bit slot, Pad 0
and LSB first */ and LSB first */
...@@ -611,7 +611,7 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream, ...@@ -611,7 +611,7 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
active_serializers = (channels + slots - 1) / slots; active_serializers = (channels + slots - 1) / slots;
if (davinci_hw_common_param(mcasp, substream->stream, channels) == -EINVAL) if (mcasp_common_hw_param(mcasp, substream->stream, channels) == -EINVAL)
return -EINVAL; return -EINVAL;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
fifo_level = mcasp->txnumevt * active_serializers; fifo_level = mcasp->txnumevt * active_serializers;
...@@ -619,9 +619,9 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream, ...@@ -619,9 +619,9 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
fifo_level = mcasp->rxnumevt * active_serializers; fifo_level = mcasp->rxnumevt * active_serializers;
if (mcasp->op_mode == DAVINCI_MCASP_DIT_MODE) if (mcasp->op_mode == DAVINCI_MCASP_DIT_MODE)
davinci_hw_dit_param(mcasp); mcasp_dit_hw_param(mcasp);
else else
davinci_hw_param(mcasp, substream->stream); mcasp_i2s_hw_param(mcasp, substream->stream);
switch (params_format(params)) { switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8: case SNDRV_PCM_FORMAT_U8:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment