From 26fd04ee20453e31760d8af534fc46eeb83d772c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 12 Oct 2010 11:39:25 +0900 Subject: [PATCH] --- yaml --- r: 216623 b: refs/heads/master c: cca1b2353a364fd51619d0f304dd9681282b864c h: refs/heads/master i: 216621: f9feb518bf5d23c7d6b3101d345886d47084ffec 216619: 1ff36d201c747c8049a07cb5f367b7decfb2dbf9 216615: e22dd17b7109f074faf3a1cbbfe612cdb61ea3b5 216607: 211ece1f63918c3d60da22954af8b2cdb81aea4e v: v3 --- [refs] | 2 +- trunk/sound/soc/sh/fsi.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index cab5ec5a77e1..9780a54e9da7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1422408b34fd27ac7ab4a42e72d4b61553b6f631 +refs/heads/master: cca1b2353a364fd51619d0f304dd9681282b864c diff --git a/trunk/sound/soc/sh/fsi.c b/trunk/sound/soc/sh/fsi.c index dd9963345b93..aa2cbb1ea988 100644 --- a/trunk/sound/soc/sh/fsi.c +++ b/trunk/sound/soc/sh/fsi.c @@ -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,