diff options
Diffstat (limited to 'sound/soc/sh/rcar/src.c')
-rw-r--r-- | sound/soc/sh/rcar/src.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index c5ddbccd7530..4b5671b0d1e6 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c | |||
@@ -10,6 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | #include "rsnd.h" | 11 | #include "rsnd.h" |
12 | 12 | ||
13 | #define SRC_NAME "src" | ||
14 | |||
13 | struct rsnd_src { | 15 | struct rsnd_src { |
14 | struct rsnd_src_platform_info *info; /* rcar_snd.h */ | 16 | struct rsnd_src_platform_info *info; /* rcar_snd.h */ |
15 | struct rsnd_mod mod; | 17 | struct rsnd_mod mod; |
@@ -389,6 +391,17 @@ static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod, | |||
389 | return 0; | 391 | return 0; |
390 | } | 392 | } |
391 | 393 | ||
394 | static int rsnd_src_probe_gen1(struct rsnd_mod *mod, | ||
395 | struct rsnd_dai *rdai) | ||
396 | { | ||
397 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | ||
398 | struct device *dev = rsnd_priv_to_dev(priv); | ||
399 | |||
400 | dev_dbg(dev, "%s (Gen1) is probed\n", rsnd_mod_name(mod)); | ||
401 | |||
402 | return 0; | ||
403 | } | ||
404 | |||
392 | static int rsnd_src_init_gen1(struct rsnd_mod *mod, | 405 | static int rsnd_src_init_gen1(struct rsnd_mod *mod, |
393 | struct rsnd_dai *rdai) | 406 | struct rsnd_dai *rdai) |
394 | { | 407 | { |
@@ -434,7 +447,8 @@ static int rsnd_src_stop_gen1(struct rsnd_mod *mod, | |||
434 | } | 447 | } |
435 | 448 | ||
436 | static struct rsnd_mod_ops rsnd_src_gen1_ops = { | 449 | static struct rsnd_mod_ops rsnd_src_gen1_ops = { |
437 | .name = "sru (gen1)", | 450 | .name = SRC_NAME, |
451 | .probe = rsnd_src_probe_gen1, | ||
438 | .init = rsnd_src_init_gen1, | 452 | .init = rsnd_src_init_gen1, |
439 | .quit = rsnd_src_quit, | 453 | .quit = rsnd_src_quit, |
440 | .start = rsnd_src_start_gen1, | 454 | .start = rsnd_src_start_gen1, |
@@ -498,6 +512,8 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod, | |||
498 | if (ret < 0) | 512 | if (ret < 0) |
499 | dev_err(dev, "SRC DMA failed\n"); | 513 | dev_err(dev, "SRC DMA failed\n"); |
500 | 514 | ||
515 | dev_dbg(dev, "%s (Gen2) is probed\n", rsnd_mod_name(mod)); | ||
516 | |||
501 | return ret; | 517 | return ret; |
502 | } | 518 | } |
503 | 519 | ||
@@ -558,7 +574,7 @@ static int rsnd_src_stop_gen2(struct rsnd_mod *mod, | |||
558 | } | 574 | } |
559 | 575 | ||
560 | static struct rsnd_mod_ops rsnd_src_gen2_ops = { | 576 | static struct rsnd_mod_ops rsnd_src_gen2_ops = { |
561 | .name = "src (gen2)", | 577 | .name = SRC_NAME, |
562 | .probe = rsnd_src_probe_gen2, | 578 | .probe = rsnd_src_probe_gen2, |
563 | .remove = rsnd_src_remove_gen2, | 579 | .remove = rsnd_src_remove_gen2, |
564 | .init = rsnd_src_init_gen2, | 580 | .init = rsnd_src_init_gen2, |
@@ -652,7 +668,8 @@ int rsnd_src_probe(struct platform_device *pdev, | |||
652 | priv->src = src; | 668 | priv->src = src; |
653 | 669 | ||
654 | for_each_rsnd_src(src, priv, i) { | 670 | for_each_rsnd_src(src, priv, i) { |
655 | snprintf(name, RSND_SRC_NAME_SIZE, "src.%d", i); | 671 | snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d", |
672 | SRC_NAME, i); | ||
656 | 673 | ||
657 | clk = devm_clk_get(dev, name); | 674 | clk = devm_clk_get(dev, name); |
658 | if (IS_ERR(clk)) | 675 | if (IS_ERR(clk)) |