ASoC: rsnd: replace rsnd_dai_is_play() to rsnd_io_is_play()

Current rsnd driver can use rsnd_io_to_rdai()
we can get play/capture direction via io now.
Let's replace rsnd_dai_is_play() to rsnd_io_is_play()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
这个提交包含在:
Kuninori Morimoto
2015-01-15 08:06:49 +00:00
提交者 Mark Brown
父节点 54cb556247
当前提交 985a4f6e61
修改 6 个文件,包含 12 行新增16 行删除

查看文件

@@ -206,11 +206,12 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
{
struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
int is_play = rsnd_io_is_play(io);
int ret;
/* Volume */
ret = rsnd_kctrl_new_m(mod, rdai, rtd,
rsnd_dai_is_play(rdai, io) ?
is_play ?
"DVC Out Playback Volume" : "DVC In Capture Volume",
rsnd_dvc_volume_update,
&dvc->volume, 0x00800000 - 1);
@@ -219,7 +220,7 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
/* Mute */
ret = rsnd_kctrl_new_m(mod, rdai, rtd,
rsnd_dai_is_play(rdai, io) ?
is_play ?
"DVC Out Mute Switch" : "DVC In Mute Switch",
rsnd_dvc_volume_update,
&dvc->mute, 1);
@@ -228,7 +229,7 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
/* Ramp */
ret = rsnd_kctrl_new_s(mod, rdai, rtd,
rsnd_dai_is_play(rdai, io) ?
is_play ?
"DVC Out Ramp Switch" : "DVC In Ramp Switch",
rsnd_dvc_volume_update,
&dvc->ren, 1);
@@ -236,7 +237,7 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
return ret;
ret = rsnd_kctrl_new_e(mod, rdai, rtd,
rsnd_dai_is_play(rdai, io) ?
is_play ?
"DVC Out Ramp Up Rate" : "DVC In Ramp Up Rate",
&dvc->rup,
rsnd_dvc_volume_update,
@@ -245,7 +246,7 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
return ret;
ret = rsnd_kctrl_new_e(mod, rdai, rtd,
rsnd_dai_is_play(rdai, io) ?
is_play ?
"DVC Out Ramp Down Rate" : "DVC In Ramp Down Rate",
&dvc->rdown,
rsnd_dvc_volume_update,