diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-05-08 20:44:41 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-13 14:06:16 -0400 |
commit | 68b6af3656a1f3303cca094a19e26653fad1853a (patch) | |
tree | 53355e3e9bfbe95796d4a0146bbaae14cdca77bb /sound/soc/sh | |
parent | b42fccf69cd7153d1158c85137ec718d7309e074 (diff) |
ASoC: rsnd: enable to use multi parameter on rsnd_dai_call/rsnd_mod_call
rsnd_mod_ops would like to come to use multi parameter.
modify macro to enable it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/rcar/core.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 86c9b78d8df1..378985b028ef 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c | |||
@@ -338,7 +338,7 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod) | |||
338 | /* | 338 | /* |
339 | * rsnd_dai functions | 339 | * rsnd_dai functions |
340 | */ | 340 | */ |
341 | #define __rsnd_mod_call(mod, func, rdai) \ | 341 | #define __rsnd_mod_call(mod, func, rdai...) \ |
342 | ({ \ | 342 | ({ \ |
343 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \ | 343 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \ |
344 | struct device *dev = rsnd_priv_to_dev(priv); \ | 344 | struct device *dev = rsnd_priv_to_dev(priv); \ |
@@ -347,12 +347,12 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod) | |||
347 | (mod)->ops->func(mod, rdai); \ | 347 | (mod)->ops->func(mod, rdai); \ |
348 | }) | 348 | }) |
349 | 349 | ||
350 | #define rsnd_mod_call(mod, func, rdai) \ | 350 | #define rsnd_mod_call(mod, func, rdai...) \ |
351 | (!(mod) ? -ENODEV : \ | 351 | (!(mod) ? -ENODEV : \ |
352 | !((mod)->ops->func) ? 0 : \ | 352 | !((mod)->ops->func) ? 0 : \ |
353 | __rsnd_mod_call(mod, func, (rdai))) | 353 | __rsnd_mod_call(mod, func, rdai)) |
354 | 354 | ||
355 | #define rsnd_dai_call(rdai, io, fn) \ | 355 | #define rsnd_dai_call(fn, io, rdai...) \ |
356 | ({ \ | 356 | ({ \ |
357 | struct rsnd_mod *mod; \ | 357 | struct rsnd_mod *mod; \ |
358 | int ret = 0, i; \ | 358 | int ret = 0, i; \ |
@@ -360,7 +360,7 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod) | |||
360 | mod = (io)->mod[i]; \ | 360 | mod = (io)->mod[i]; \ |
361 | if (!mod) \ | 361 | if (!mod) \ |
362 | continue; \ | 362 | continue; \ |
363 | ret = rsnd_mod_call(mod, fn, (rdai)); \ | 363 | ret = rsnd_mod_call(mod, fn, rdai); \ |
364 | if (ret < 0) \ | 364 | if (ret < 0) \ |
365 | break; \ | 365 | break; \ |
366 | } \ | 366 | } \ |
@@ -510,20 +510,20 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
510 | if (ret < 0) | 510 | if (ret < 0) |
511 | goto dai_trigger_end; | 511 | goto dai_trigger_end; |
512 | 512 | ||
513 | ret = rsnd_dai_call(rdai, io, init); | 513 | ret = rsnd_dai_call(init, io, rdai); |
514 | if (ret < 0) | 514 | if (ret < 0) |
515 | goto dai_trigger_end; | 515 | goto dai_trigger_end; |
516 | 516 | ||
517 | ret = rsnd_dai_call(rdai, io, start); | 517 | ret = rsnd_dai_call(start, io, rdai); |
518 | if (ret < 0) | 518 | if (ret < 0) |
519 | goto dai_trigger_end; | 519 | goto dai_trigger_end; |
520 | break; | 520 | break; |
521 | case SNDRV_PCM_TRIGGER_STOP: | 521 | case SNDRV_PCM_TRIGGER_STOP: |
522 | ret = rsnd_dai_call(rdai, io, stop); | 522 | ret = rsnd_dai_call(stop, io, rdai); |
523 | if (ret < 0) | 523 | if (ret < 0) |
524 | goto dai_trigger_end; | 524 | goto dai_trigger_end; |
525 | 525 | ||
526 | ret = rsnd_dai_call(rdai, io, quit); | 526 | ret = rsnd_dai_call(quit, io, rdai); |
527 | if (ret < 0) | 527 | if (ret < 0) |
528 | goto dai_trigger_end; | 528 | goto dai_trigger_end; |
529 | 529 | ||
@@ -951,11 +951,11 @@ static int rsnd_probe(struct platform_device *pdev) | |||
951 | } | 951 | } |
952 | 952 | ||
953 | for_each_rsnd_dai(rdai, priv, i) { | 953 | for_each_rsnd_dai(rdai, priv, i) { |
954 | ret = rsnd_dai_call(rdai, &rdai->playback, probe); | 954 | ret = rsnd_dai_call(probe, &rdai->playback, rdai); |
955 | if (ret) | 955 | if (ret) |
956 | return ret; | 956 | return ret; |
957 | 957 | ||
958 | ret = rsnd_dai_call(rdai, &rdai->capture, probe); | 958 | ret = rsnd_dai_call(probe, &rdai->capture, rdai); |
959 | if (ret) | 959 | if (ret) |
960 | return ret; | 960 | return ret; |
961 | } | 961 | } |
@@ -998,11 +998,11 @@ static int rsnd_remove(struct platform_device *pdev) | |||
998 | pm_runtime_disable(&pdev->dev); | 998 | pm_runtime_disable(&pdev->dev); |
999 | 999 | ||
1000 | for_each_rsnd_dai(rdai, priv, i) { | 1000 | for_each_rsnd_dai(rdai, priv, i) { |
1001 | ret = rsnd_dai_call(rdai, &rdai->playback, remove); | 1001 | ret = rsnd_dai_call(remove, &rdai->playback, rdai); |
1002 | if (ret) | 1002 | if (ret) |
1003 | return ret; | 1003 | return ret; |
1004 | 1004 | ||
1005 | ret = rsnd_dai_call(rdai, &rdai->capture, remove); | 1005 | ret = rsnd_dai_call(remove, &rdai->capture, rdai); |
1006 | if (ret) | 1006 | if (ret) |
1007 | return ret; | 1007 | return ret; |
1008 | } | 1008 | } |