Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342722
b: refs/heads/master
c: ab6340c
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Nov 20, 2012
1 parent 54c7c78 commit 76d173e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 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: c2052def9e92de0f702eb38e179b7991f4638351
refs/heads/master: ab6340c4ecc21c01a487e9be15754d5f934a003a
4 changes: 2 additions & 2 deletions trunk/include/sound/sh_fsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@

/* D: clock selecter if master mode */
#define SH_FSI_CLK_MASK 0x0000F000
#define SH_FSI_CLK_EXTERNAL (1 << 12)
#define SH_FSI_CLK_CPG (2 << 12) /* FSIxCK + FSI-DIV */
#define SH_FSI_CLK_EXTERNAL (0 << 12)
#define SH_FSI_CLK_CPG (1 << 12) /* FSIxCK + FSI-DIV */

/*
* set_rate return value
Expand Down
17 changes: 8 additions & 9 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ struct fsi_priv {

int chan_num:16;
int clk_master:1;
int clk_cpg:1;
int spdif:1;

long rate;
Expand Down Expand Up @@ -1779,7 +1780,6 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{
struct fsi_priv *fsi = fsi_get_priv_frm_dai(dai);
set_rate_func set_rate = fsi_get_info_set_rate(fsi);
u32 flags = fsi_get_info_flags(fsi);
int ret;

/* set master/slave audio interface */
Expand All @@ -1802,16 +1802,12 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
if (set_rate)
dev_warn(dai->dev, "set_rate will be removed soon\n");

switch (flags & SH_FSI_CLK_MASK) {
case SH_FSI_CLK_EXTERNAL:
fsi_clk_init(dai->dev, fsi, 1, 1, 0,
fsi_clk_set_rate_external);
break;
case SH_FSI_CLK_CPG:
if (fsi->clk_cpg)
fsi_clk_init(dai->dev, fsi, 0, 1, 1,
fsi_clk_set_rate_cpg);
break;
}
else
fsi_clk_init(dai->dev, fsi, 1, 1, 0,
fsi_clk_set_rate_external);
}

/* set format */
Expand Down Expand Up @@ -1989,6 +1985,9 @@ static void fsi_port_info_init(struct fsi_priv *fsi,
{
if (info->flags & SH_FSI_FMT_SPDIF)
fsi->spdif = 1;

if (info->flags & SH_FSI_CLK_CPG)
fsi->clk_cpg = 1;
}

static void fsi_handler_init(struct fsi_priv *fsi,
Expand Down

0 comments on commit 76d173e

Please sign in to comment.