ASoC: fsi: Add fsi_get_frame_width function

It is not so important for now.
But will be used in future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index dd99633..aa2cbb1 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -368,6 +368,14 @@
 	return num * width;
 }
 
+static int fsi_get_frame_width(struct fsi_priv *fsi)
+{
+	struct snd_pcm_substream *substream = fsi->substream;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+
+	return frames_to_bytes(runtime, 1) / fsi->chan_num;
+}
+
 /*
  *		dma function
  */
@@ -596,7 +604,7 @@
 	}
 
 	/* get 1 channel data width */
-	ch_width = frames_to_bytes(runtime, 1) / fsi->chan_num;
+	ch_width = fsi_get_frame_width(fsi);
 
 	/* get residue data number of alsa */
 	data_residue_num = fsi_len2num(fsi->buff_len - fsi->buff_offset,