提交 cca1b235 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

ASoC: fsi: Add fsi_get_frame_width function

It is not so important for now.
But will be used in future.
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 1422408b
......@@ -368,6 +368,14 @@ static int fsi_num2len(int num, int width)
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 @@ static int fsi_fifo_data_ctrl(struct fsi_priv *fsi, int startup, int is_play)
}
/* 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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册