aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-02-20 05:23:08 -0500
committerMark Brown <broonie@kernel.org>2015-03-07 10:04:29 -0500
commit4715219ecef50cf79d7784545bf5bb4664bb800d (patch)
treef5ec7e46713ca2caa34dfae6053183e7819b235b /sound/soc/sh
parentc303cf0895ad927f5e9b8a5f8ed1c6b8c96a500f (diff)
ASoC: rsnd: remove un-needed parameter from rsnd_dma_init()
It can get DMA direction via rsnd_dai_stream. Remove un-needed is_play from rsnd_dma_init(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/core.c6
-rw-r--r--sound/soc/sh/rcar/rsnd.h16
-rw-r--r--sound/soc/sh/rcar/src.c1
-rw-r--r--sound/soc/sh/rcar/ssi.c1
4 files changed, 5 insertions, 19 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 0b14d3762cff..1edf4dc41c70 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -311,13 +311,15 @@ static void rsnd_dma_of_path(struct rsnd_dma *dma,
311 } 311 }
312} 312}
313 313
314int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, 314int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id)
315 int is_play, int id)
316{ 315{
317 struct device *dev = rsnd_priv_to_dev(priv); 316 struct device *dev = rsnd_priv_to_dev(priv);
318 struct dma_slave_config cfg; 317 struct dma_slave_config cfg;
318 struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
319 struct rsnd_mod *mod_from; 319 struct rsnd_mod *mod_from;
320 struct rsnd_mod *mod_to; 320 struct rsnd_mod *mod_to;
321 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
322 int is_play = rsnd_io_is_play(io);
321 char dma_name[DMA_NAME_SIZE]; 323 char dma_name[DMA_NAME_SIZE];
322 dma_cap_mask_t mask; 324 dma_cap_mask_t mask;
323 int ret; 325 int ret;
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 5ffde9b8955d..93a1a256f37c 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -179,8 +179,7 @@ struct rsnd_dma {
179void rsnd_dma_start(struct rsnd_dma *dma); 179void rsnd_dma_start(struct rsnd_dma *dma);
180void rsnd_dma_stop(struct rsnd_dma *dma); 180void rsnd_dma_stop(struct rsnd_dma *dma);
181int rsnd_dma_available(struct rsnd_dma *dma); 181int rsnd_dma_available(struct rsnd_dma *dma);
182int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, 182int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id);
183 int is_play, int id);
184void rsnd_dma_quit(struct rsnd_priv *priv, 183void rsnd_dma_quit(struct rsnd_priv *priv,
185 struct rsnd_dma *dma); 184 struct rsnd_dma *dma);
186 185
@@ -413,19 +412,6 @@ struct rsnd_priv {
413#define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags) 412#define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags)
414#define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags) 413#define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags)
415 414
416#define rsnd_info_is_playback(priv, type) \
417({ \
418 struct rcar_snd_info *info = rsnd_priv_to_info(priv); \
419 int i, is_play = 0; \
420 for (i = 0; i < info->dai_info_nr; i++) { \
421 if (info->dai_info[i].playback.type == (type)->info) { \
422 is_play = 1; \
423 break; \
424 } \
425 } \
426 is_play; \
427})
428
429/* 415/*
430 * rsnd_kctrl 416 * rsnd_kctrl
431 */ 417 */
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 81c182b4bad5..7fb879871a8e 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -713,7 +713,6 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod,
713 713
714 ret = rsnd_dma_init(priv, 714 ret = rsnd_dma_init(priv,
715 rsnd_mod_to_dma(mod), 715 rsnd_mod_to_dma(mod),
716 rsnd_info_is_playback(priv, src),
717 src->info->dma_id); 716 src->info->dma_id);
718 if (ret) 717 if (ret)
719 goto rsnd_src_probe_gen2_fail; 718 goto rsnd_src_probe_gen2_fail;
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 9e7b627c08e2..57e737c7046b 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -478,7 +478,6 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
478 478
479 ret = rsnd_dma_init( 479 ret = rsnd_dma_init(
480 priv, rsnd_mod_to_dma(mod), 480 priv, rsnd_mod_to_dma(mod),
481 rsnd_info_is_playback(priv, ssi),
482 dma_id); 481 dma_id);
483 if (ret) 482 if (ret)
484 goto rsnd_ssi_dma_probe_fail; 483 goto rsnd_ssi_dma_probe_fail;