Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216623
b: refs/heads/master
c: cca1b23
h: refs/heads/master
i:
  216621: f9feb51
  216619: 1ff36d2
  216615: e22dd17
  216607: 211ece1
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Oct 12, 2010
1 parent 217eea2 commit 26fd04e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1422408b34fd27ac7ab4a42e72d4b61553b6f631
refs/heads/master: cca1b2353a364fd51619d0f304dd9681282b864c
10 changes: 9 additions & 1 deletion trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 26fd04e

Please sign in to comment.