diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-06-22 20:57:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-28 09:41:19 -0400 |
commit | 65f459923b7926f6a7f156970d83360bd80cb169 (patch) | |
tree | 65f9af5ceabaaa9828f0cc0625710f1cdc6a3a26 | |
parent | ccd01559ead29b59918458e9b412ff18b88fc6cf (diff) |
ASoC: rsnd: enable DVC when capture
Current DVC can be enabled only when playback,
but, this came from misunderstanding.
It is not correct.
DVC <-> DMA relationship is...
Playback: MEM -> DMAC -> SRC -> DVC -> DMACp -> SSI
Capture: SSI -> DMACp -> SRC -> DVC -> DMAC -> MEM
DVC can be used for both Playback/Capture
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/sh/rcar/dvc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index ed0007006899..deef310c75dc 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c | |||
@@ -191,24 +191,20 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, | |||
191 | struct snd_soc_pcm_runtime *rtd) | 191 | struct snd_soc_pcm_runtime *rtd) |
192 | { | 192 | { |
193 | struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); | 193 | struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); |
194 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | ||
195 | struct device *dev = rsnd_priv_to_dev(priv); | ||
196 | struct snd_card *card = rtd->card->snd_card; | 194 | struct snd_card *card = rtd->card->snd_card; |
197 | struct snd_kcontrol *kctrl; | 195 | struct snd_kcontrol *kctrl; |
198 | static struct snd_kcontrol_new knew = { | 196 | static struct snd_kcontrol_new knew = { |
199 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 197 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
200 | .name = "Playback Volume", | ||
201 | .info = rsnd_dvc_volume_info, | 198 | .info = rsnd_dvc_volume_info, |
202 | .get = rsnd_dvc_volume_get, | 199 | .get = rsnd_dvc_volume_get, |
203 | .put = rsnd_dvc_volume_put, | 200 | .put = rsnd_dvc_volume_put, |
204 | }; | 201 | }; |
205 | int ret; | 202 | int ret; |
206 | 203 | ||
207 | if (!rsnd_dai_is_play(rdai, io)) { | 204 | if (rsnd_dai_is_play(rdai, io)) |
208 | dev_err(dev, "DVC%d is connected to Capture DAI\n", | 205 | knew.name = "Playback Volume"; |
209 | rsnd_mod_id(mod)); | 206 | else |
210 | return -EINVAL; | 207 | knew.name = "Capture Volume"; |
211 | } | ||
212 | 208 | ||
213 | kctrl = snd_ctl_new1(&knew, mod); | 209 | kctrl = snd_ctl_new1(&knew, mod); |
214 | if (!kctrl) | 210 | if (!kctrl) |