summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/src.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2016-10-27 01:05:21 +0000
committerMark Brown <broonie@kernel.org>2016-10-27 11:14:34 +0100
commit67923f779b8d9d210c5ec98ffb68d9fe5a68df18 (patch)
tree7836d28212e6141a99fcba8766cebcf87eec2975 /sound/soc/sh/rcar/src.c
parent814efe3ed72d1cad926e21b8d0869a1ea74bb9dd (diff)
downloadblackbird-op-linux-67923f779b8d9d210c5ec98ffb68d9fe5a68df18.tar.gz
blackbird-op-linux-67923f779b8d9d210c5ec98ffb68d9fe5a68df18.zip
ASoC: rsnd: enable SRC sync even FIN = FOUT
Current SRC (= Sampling Rate Converter) is supporting SYNC mode and ASYNC mode. Current src.c cares SRC if FIN != FOUT. Here, SYNC mode will be used for tweak, so it will be used even FIN = FOUT. This patch enables SRC sync in such situation Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Tested-by: Yuichi Takagi <yuichi.takagi.uh@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/src.c')
-rw-r--r--sound/soc/sh/rcar/src.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index aa24258b9b14..3a8f65bd1bf9 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -189,6 +189,7 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
struct device *dev = rsnd_priv_to_dev(priv);
struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
+ int use_src = 0;
u32 fin, fout;
u32 ifscr, fsrate, adinr;
u32 cr, route;
@@ -214,6 +215,8 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
return;
}
+ use_src = (fin != fout) | rsnd_src_sync_is_enabled(mod);
+
/*
* SRC_ADINR
*/
@@ -225,7 +228,7 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
*/
ifscr = 0;
fsrate = 0;
- if (fin != fout) {
+ if (use_src) {
u64 n;
ifscr = 1;
@@ -239,7 +242,7 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
*/
cr = 0x00011110;
route = 0x0;
- if (fin != fout) {
+ if (use_src) {
route = 0x1;
if (rsnd_src_sync_is_enabled(mod)) {
OpenPOWER on IntegriCloud