summaryrefslogtreecommitdiff
path: root/sound/soc/sh/fsi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-05-23 15:45:57 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-24 14:41:32 +0400
commit0ffe296addcfb8414ebad3d399859f9bf8f955d2 (patch)
treea738be17f3956d7600fdd56d92f2955bdf2b30f0 /sound/soc/sh/fsi.c
parent60c655e62f1ee85b9144fa259b3d1064ddbbe847 (diff)
downloadlinux-0ffe296addcfb8414ebad3d399859f9bf8f955d2.tar.xz
ASoC: sh: fsi: tidyup parameter of fsi_stream_push
It is possible to create buff_len and period_len from substream->runtime. This patch is preparation of tidyup unclear variable naming patch. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r--sound/soc/sh/fsi.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 4a9da6b5f4e1..702588577f59 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -344,16 +344,15 @@ static u32 fsi_get_port_shift(struct fsi_priv *fsi, int is_play)
static void fsi_stream_push(struct fsi_priv *fsi,
int is_play,
- struct snd_pcm_substream *substream,
- u32 buffer_len,
- u32 period_len)
+ struct snd_pcm_substream *substream)
{
struct fsi_stream *io = fsi_get_stream(fsi, is_play);
+ struct snd_pcm_runtime *runtime = substream->runtime;
io->substream = substream;
- io->buff_len = buffer_len;
+ io->buff_len = frames_to_bytes(runtime, runtime->buffer_size);
io->buff_offset = 0;
- io->period_len = period_len;
+ io->period_len = frames_to_bytes(runtime, runtime->period_size);
io->period_num = 0;
io->oerr_num = -1; /* ignore 1st err */
io->uerr_num = -1; /* ignore 1st err */
@@ -844,15 +843,12 @@ static int fsi_dai_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{
struct fsi_priv *fsi = fsi_get_priv(substream);
- struct snd_pcm_runtime *runtime = substream->runtime;
int is_play = fsi_is_play(substream);
int ret = 0;
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
- fsi_stream_push(fsi, is_play, substream,
- frames_to_bytes(runtime, runtime->buffer_size),
- frames_to_bytes(runtime, runtime->period_size));
+ fsi_stream_push(fsi, is_play, substream);
ret = is_play ? fsi_data_push(fsi) : fsi_data_pop(fsi);
fsi_irq_enable(fsi, is_play);
fsi_port_start(fsi);