summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/ssi.c
diff options
context:
space:
mode:
authorKuninori Morimoto2014-11-10 05:00:58 +0100
committerMark Brown2014-11-10 15:52:38 +0100
commitd3a768233243b5892a9c74b85896b9e8c017b259 (patch)
tree680670669a916065d34a9f7fd3f2b496370beeb1 /sound/soc/sh/rcar/ssi.c
parentASoC: rsnd: tidyup debug message format and timing (diff)
downloadkernel-qcow2-linux-d3a768233243b5892a9c74b85896b9e8c017b259.tar.gz
kernel-qcow2-linux-d3a768233243b5892a9c74b85896b9e8c017b259.tar.xz
kernel-qcow2-linux-d3a768233243b5892a9c74b85896b9e8c017b259.zip
ASoC: rsnd: fallback to PIO mode if DMA mode was failed
Current Renesas R-Car sound driver probe will be failed if it try to use DMA mode and it couldn't use for some reasons. But PIO mode works even though in such case. This patch try to fallback to PIO mode if DMA mode probing was failed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/ssi.c')
-rw-r--r--sound/soc/sh/rcar/ssi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index cae08b7ffa53..346d3dc66d73 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -465,8 +465,23 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
static int rsnd_ssi_dma_remove(struct rsnd_mod *mod,
struct rsnd_dai *rdai)
{
+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
+ struct device *dev = rsnd_priv_to_dev(priv);
+
rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod));
+ /*
+ * fallback to PIO
+ *
+ * SSI .probe might be called again.
+ * see
+ * rsnd_rdai_continuance_probe()
+ */
+ mod->ops = &rsnd_ssi_pio_ops;
+
+ dev_info(dev, "%s[%d] fallback to PIO mode\n",
+ rsnd_mod_name(mod), rsnd_mod_id(mod));
+
return 0;
}