diff options
Diffstat (limited to 'sound/soc/sh/rcar/adg.c')
-rw-r--r-- | sound/soc/sh/rcar/adg.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 28327dd2c6cb..e821ccc70f47 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -249,28 +249,8 @@ int rsnd_adg_set_src_timesel_gen2(struct rsnd_mod *src_mod, out = out << shift; mask = 0x0f1f << shift; - switch (id / 2) { - case 0: - rsnd_mod_bset(adg_mod, SRCIN_TIMSEL0, mask, in); - rsnd_mod_bset(adg_mod, SRCOUT_TIMSEL0, mask, out); - break; - case 1: - rsnd_mod_bset(adg_mod, SRCIN_TIMSEL1, mask, in); - rsnd_mod_bset(adg_mod, SRCOUT_TIMSEL1, mask, out); - break; - case 2: - rsnd_mod_bset(adg_mod, SRCIN_TIMSEL2, mask, in); - rsnd_mod_bset(adg_mod, SRCOUT_TIMSEL2, mask, out); - break; - case 3: - rsnd_mod_bset(adg_mod, SRCIN_TIMSEL3, mask, in); - rsnd_mod_bset(adg_mod, SRCOUT_TIMSEL3, mask, out); - break; - case 4: - rsnd_mod_bset(adg_mod, SRCIN_TIMSEL4, mask, in); - rsnd_mod_bset(adg_mod, SRCOUT_TIMSEL4, mask, out); - break; - } + rsnd_mod_bset(adg_mod, SRCIN_TIMSEL(id / 2), mask, in); + rsnd_mod_bset(adg_mod, SRCOUT_TIMSEL(id / 2), mask, out); if (en) rsnd_mod_bset(adg_mod, DIV_EN, en, en); @@ -299,17 +279,7 @@ static void rsnd_adg_set_ssi_clk(struct rsnd_mod *ssi_mod, u32 val) if (id == 8) return; - switch (id / 4) { - case 0: - rsnd_mod_bset(adg_mod, AUDIO_CLK_SEL0, mask, val); - break; - case 1: - rsnd_mod_bset(adg_mod, AUDIO_CLK_SEL1, mask, val); - break; - case 2: - rsnd_mod_bset(adg_mod, AUDIO_CLK_SEL2, mask, val); - break; - } + rsnd_mod_bset(adg_mod, AUDIO_CLK_SEL(id / 4), mask, val); dev_dbg(dev, "AUDIO_CLK_SEL is 0x%x\n", val); } @@ -613,7 +583,7 @@ int rsnd_adg_probe(struct rsnd_priv *priv) return -ENOMEM; ret = rsnd_mod_init(priv, &adg->mod, &adg_ops, - NULL, NULL, 0, 0); + NULL, 0, 0); if (ret) return ret; |