Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342525
b: refs/heads/master
c: ddeb2d7
h: refs/heads/master
i:
  342523: 72ca0a7
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Oct 29, 2012
1 parent 5cd0149 commit 463119e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 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: 1ddd82868cc888e008ed520465c172a6cdddd689
refs/heads/master: ddeb2d701b76bb1fc299c0f9306c63109769bc33
23 changes: 8 additions & 15 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,12 +1333,17 @@ static int fsi_hw_startup(struct fsi_priv *fsi,
/* fifo init */
fsi_fifo_init(fsi, io, dev);

/* start master clock */
if (fsi_is_clk_master(fsi))
fsi_set_master_clk(dev, fsi, fsi->rate, 1);

return 0;
}

static void fsi_hw_shutdown(struct fsi_priv *fsi,
struct device *dev)
{
/* stop master clock */
if (fsi_is_clk_master(fsi))
fsi_set_master_clk(dev, fsi, fsi->rate, 0);
}
Expand Down Expand Up @@ -1461,19 +1466,11 @@ static int fsi_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct fsi_priv *fsi = fsi_get_priv(substream);
long rate = params_rate(params);
int ret;

if (!fsi_is_clk_master(fsi))
return 0;

ret = fsi_set_master_clk(dai->dev, fsi, rate, 1);
if (ret < 0)
return ret;

fsi->rate = rate;
if (fsi_is_clk_master(fsi))
fsi->rate = params_rate(params);

return ret;
return 0;
}

static const struct snd_soc_dai_ops fsi_dai_ops = {
Expand Down Expand Up @@ -1770,10 +1767,6 @@ static void __fsi_resume(struct fsi_priv *fsi,
return;

fsi_hw_startup(fsi, io, dev);

if (fsi_is_clk_master(fsi) && fsi->rate)
fsi_set_master_clk(dev, fsi, fsi->rate, 1);

fsi_stream_start(fsi, io);
}

Expand Down

0 comments on commit 463119e

Please sign in to comment.