Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321352
b: refs/heads/master
c: c2e1d90
h: refs/heads/master
v: v3
  • Loading branch information
Dong Aisheng authored and Mark Brown committed Jul 24, 2012
1 parent 992cf57 commit 7fdeac1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8edf3e5522735c8ce78b81845f7a1a2d4a08626
refs/heads/master: c2e1d9073fc98f471067c0257a31b4818306ebe1
10 changes: 10 additions & 0 deletions trunk/sound/soc/mxs/mxs-saif.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,14 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{
struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
struct mxs_saif *master_saif;
u32 scr, stat;
int ret;

master_saif = mxs_saif_get_master(saif);
if (!master_saif)
return -EINVAL;

/* mclk should already be set */
if (!saif->mclk && saif->mclk_in_use) {
dev_err(cpu_dai->dev, "set mclk first\n");
Expand All @@ -420,6 +425,11 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
return ret;
}

/* prepare clk in hw_param, enable in trigger */
clk_prepare(saif->clk);
if (saif != master_saif)
clk_prepare(master_saif->clk);

scr = __raw_readl(saif->base + SAIF_CTRL);

scr &= ~BM_SAIF_CTRL_WORD_LENGTH;
Expand Down

0 comments on commit 7fdeac1

Please sign in to comment.