diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-03-30 20:03:25 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-03-30 20:03:25 +0200 |
commit | 9dfcce42b09cde01b2b1f5527ed91112a04a8ab0 (patch) | |
tree | f9519c7144c13e7e038615a2697b81abe12384c1 /sound/soc/sh/rcar/cmd.c | |
parent | 2d7d54002e396c180db0c800c1046f0a3c471597 (diff) | |
parent | 2ddaa6762696db4bb35726063b421782a9e0436f (diff) | |
download | op-kernel-dev-9dfcce42b09cde01b2b1f5527ed91112a04a8ab0.zip op-kernel-dev-9dfcce42b09cde01b2b1f5527ed91112a04a8ab0.tar.gz |
Merge tag 'asoc-fix-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.11
A relatively large pile of fixes for mainline, the first since the merge
window. The biggest block of changes here by volume is the sun8i-codec
set, the driver was newly added in the merge window but it was realized
that renaming some of the user visible controls was required so these
are being pushed for v4.11 to avoid the original code appearing in a
release. Otherwise it's all fairly standard bugfix stuff.
Diffstat (limited to 'sound/soc/sh/rcar/cmd.c')
-rw-r--r-- | sound/soc/sh/rcar/cmd.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/sound/soc/sh/rcar/cmd.c b/sound/soc/sh/rcar/cmd.c index abb5eaa..7d92a24 100644 --- a/sound/soc/sh/rcar/cmd.c +++ b/sound/soc/sh/rcar/cmd.c @@ -31,23 +31,24 @@ static int rsnd_cmd_init(struct rsnd_mod *mod, struct rsnd_mod *mix = rsnd_io_to_mod_mix(io); struct device *dev = rsnd_priv_to_dev(priv); u32 data; + u32 path[] = { + [1] = 1 << 0, + [5] = 1 << 8, + [6] = 1 << 12, + [9] = 1 << 15, + }; if (!mix && !dvc) return 0; + if (ARRAY_SIZE(path) < rsnd_mod_id(mod) + 1) + return -ENXIO; + if (mix) { struct rsnd_dai *rdai; struct rsnd_mod *src; struct rsnd_dai_stream *tio; int i; - u32 path[] = { - [0] = 0, - [1] = 1 << 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 1 << 8 - }; /* * it is assuming that integrater is well understanding about @@ -70,16 +71,19 @@ static int rsnd_cmd_init(struct rsnd_mod *mod, } else { struct rsnd_mod *src = rsnd_io_to_mod_src(io); - u32 path[] = { - [0] = 0x30000, - [1] = 0x30001, - [2] = 0x40000, - [3] = 0x10000, - [4] = 0x20000, - [5] = 0x40100 + u8 cmd_case[] = { + [0] = 0x3, + [1] = 0x3, + [2] = 0x4, + [3] = 0x1, + [4] = 0x2, + [5] = 0x4, + [6] = 0x1, + [9] = 0x2, }; - data = path[rsnd_mod_id(src)]; + data = path[rsnd_mod_id(src)] | + cmd_case[rsnd_mod_id(src)] << 16; } dev_dbg(dev, "ctu/mix path = 0x%08x", data); |