diff options
Diffstat (limited to 'sound/soc/sh/rcar/dvc.c')
-rw-r--r-- | sound/soc/sh/rcar/dvc.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index 74769b1be005..ed0007006899 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #define RSND_DVC_NAME_SIZE 16 | 13 | #define RSND_DVC_NAME_SIZE 16 |
14 | #define RSND_DVC_VOLUME_MAX 100 | 14 | #define RSND_DVC_VOLUME_MAX 100 |
15 | #define RSND_DVC_VOLUME_NUM 2 | 15 | #define RSND_DVC_VOLUME_NUM 2 |
16 | |||
17 | #define DVC_NAME "dvc" | ||
18 | |||
16 | struct rsnd_dvc { | 19 | struct rsnd_dvc { |
17 | struct rsnd_dvc_platform_info *info; /* rcar_snd.h */ | 20 | struct rsnd_dvc_platform_info *info; /* rcar_snd.h */ |
18 | struct rsnd_mod mod; | 21 | struct rsnd_mod mod; |
@@ -43,6 +46,17 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod) | |||
43 | rsnd_mod_write(mod, DVC_VOL1R, vol[1]); | 46 | rsnd_mod_write(mod, DVC_VOL1R, vol[1]); |
44 | } | 47 | } |
45 | 48 | ||
49 | static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod, | ||
50 | struct rsnd_dai *rdai) | ||
51 | { | ||
52 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | ||
53 | struct device *dev = rsnd_priv_to_dev(priv); | ||
54 | |||
55 | dev_dbg(dev, "%s (Gen2) is probed\n", rsnd_mod_name(mod)); | ||
56 | |||
57 | return 0; | ||
58 | } | ||
59 | |||
46 | static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, | 60 | static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, |
47 | struct rsnd_dai *rdai) | 61 | struct rsnd_dai *rdai) |
48 | { | 62 | { |
@@ -208,7 +222,8 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, | |||
208 | } | 222 | } |
209 | 223 | ||
210 | static struct rsnd_mod_ops rsnd_dvc_ops = { | 224 | static struct rsnd_mod_ops rsnd_dvc_ops = { |
211 | .name = "dvc (gen2)", | 225 | .name = DVC_NAME, |
226 | .probe = rsnd_dvc_probe_gen2, | ||
212 | .init = rsnd_dvc_init, | 227 | .init = rsnd_dvc_init, |
213 | .quit = rsnd_dvc_quit, | 228 | .quit = rsnd_dvc_quit, |
214 | .start = rsnd_dvc_start, | 229 | .start = rsnd_dvc_start, |
@@ -255,7 +270,8 @@ int rsnd_dvc_probe(struct platform_device *pdev, | |||
255 | priv->dvc = dvc; | 270 | priv->dvc = dvc; |
256 | 271 | ||
257 | for_each_rsnd_dvc(dvc, priv, i) { | 272 | for_each_rsnd_dvc(dvc, priv, i) { |
258 | snprintf(name, RSND_DVC_NAME_SIZE, "dvc.%d", i); | 273 | snprintf(name, RSND_DVC_NAME_SIZE, "%s.%d", |
274 | DVC_NAME, i); | ||
259 | 275 | ||
260 | clk = devm_clk_get(dev, name); | 276 | clk = devm_clk_get(dev, name); |
261 | if (IS_ERR(clk)) | 277 | if (IS_ERR(clk)) |