All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rsnd: Fixup SRCm_IFSVR calculate method
       [not found] ` <redmine.journal-761890.20160725005929.c30ee56718186304@dm.renesas.com>
@ 2016-07-25  1:52     ` Kuninori Morimoto
  0 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2016-07-25  1:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: Linux-ALSA, Liam Girdwood, Simon, linux-renesas-soc,
	hiroyuki.yokoyama.vx, kouei.abe.cp, ryo.kataoka.wt,
	hideya.tanaka.nx, yuta.wakasawa.pv, takamitsu.honda.pv,
	yoshifumi.hosoya.wj, mitsuhiro.kimura.kc, takeshi.kihara.df,
	ren.imaoka.vj, harunobu.kurokawa.dn, tomoharu.fukawa.eb,
	naoya.shiiba.nx, tomohiro.komagata.aj, khiem.nguyen.xt,
	takahiko.gomi.yn, hien.dang.eb, Chris.Paterson2, ryo.kodama.vz


From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>

This patch fixes the calculation accuracy degradation of SRCm_IFSVR
register value.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/src.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index e39f916..969a516 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -226,8 +226,12 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
 	ifscr = 0;
 	fsrate = 0;
 	if (fin != fout) {
+		u64 n;
+
 		ifscr = 1;
-		fsrate = 0x0400000 / fout * fin;
+		n = (u64)0x0400000 * fin;
+		do_div(n, fout);
+		fsrate = n;
 	}
 
 	/*
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ASoC: rsnd: Fixup SRCm_IFSVR calculate method
@ 2016-07-25  1:52     ` Kuninori Morimoto
  0 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2016-07-25  1:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: Linux-ALSA, Liam Girdwood, Simon, linux-renesas-soc,
	hiroyuki.yokoyama.vx, kouei.abe.cp, ryo.kataoka.wt,
	hideya.tanaka.nx, yuta.wakasawa.pv, takamitsu.honda.pv,
	yoshifumi.hosoya.wj, mitsuhiro.kimura.kc, takeshi.kihara.df,
	ren.imaoka.vj, harunobu.kurokawa.dn, tomoharu.fukawa.eb,
	naoya.shiiba.nx, tomohiro.komagata.aj, khiem.nguyen.xt,
	takahiko.gomi.yn, hien.dang.eb, Chris.Paterson2, ryo.kodama.vz


From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>

This patch fixes the calculation accuracy degradation of SRCm_IFSVR
register value.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/src.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index e39f916..969a516 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -226,8 +226,12 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
 	ifscr = 0;
 	fsrate = 0;
 	if (fin != fout) {
+		u64 n;
+
 		ifscr = 1;
-		fsrate = 0x0400000 / fout * fin;
+		n = (u64)0x0400000 * fin;
+		do_div(n, fout);
+		fsrate = n;
 	}
 
 	/*
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Applied "ASoC: rsnd: Fixup SRCm_IFSVR calculate method" to the asoc tree
  2016-07-25  1:52     ` Kuninori Morimoto
@ 2016-07-27 19:09       ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-07-27 19:09 UTC (permalink / raw)
  To: Hiroyuki Yokoyama
  Cc: Kuninori Morimoto, Mark Brown, Mark Brown, tomoharu.fukawa.eb,
	Linux-ALSA, naoya.shiiba.nx, mitsuhiro.kimura.kc,
	hideya.tanaka.nx, tomohiro.komagata.aj, khiem.nguyen.xt,
	hien.dang.eb, ryo.kodama.vz, takeshi.kihara.df, ryo.kataoka.wt,
	takamitsu.honda.pv, hiroyuki.yokoyama.vx, Chris.Paterson2,
	kouei.abe.cp, ren.imaoka.vj, Simon, takahiko.gomi.yn,
	yuta.wakasawa.pv, yoshifumi.hosoya.wj, Liam Girdwood,
	linux-renesas-soc, harunobu.kurokawa.dn

The patch

   ASoC: rsnd: Fixup SRCm_IFSVR calculate method

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 24e06559a8f52889b3dd581d2ddd572421a73ae0 Mon Sep 17 00:00:00 2001
From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Date: Mon, 25 Jul 2016 01:52:43 +0000
Subject: [PATCH] ASoC: rsnd: Fixup SRCm_IFSVR calculate method

This patch fixes the calculation accuracy degradation of SRCm_IFSVR
register value.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sh/rcar/src.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index e39f916d0f2f..969a5169de25 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -226,8 +226,12 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
 	ifscr = 0;
 	fsrate = 0;
 	if (fin != fout) {
+		u64 n;
+
 		ifscr = 1;
-		fsrate = 0x0400000 / fout * fin;
+		n = (u64)0x0400000 * fin;
+		do_div(n, fout);
+		fsrate = n;
 	}
 
 	/*
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Applied "ASoC: rsnd: Fixup SRCm_IFSVR calculate method" to the asoc tree
@ 2016-07-27 19:09       ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-07-27 19:09 UTC (permalink / raw)
  Cc: Kuninori Morimoto, Mark Brown

The patch

   ASoC: rsnd: Fixup SRCm_IFSVR calculate method

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 24e06559a8f52889b3dd581d2ddd572421a73ae0 Mon Sep 17 00:00:00 2001
From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Date: Mon, 25 Jul 2016 01:52:43 +0000
Subject: [PATCH] ASoC: rsnd: Fixup SRCm_IFSVR calculate method

This patch fixes the calculation accuracy degradation of SRCm_IFSVR
register value.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sh/rcar/src.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index e39f916d0f2f..969a5169de25 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -226,8 +226,12 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
 	ifscr = 0;
 	fsrate = 0;
 	if (fin != fout) {
+		u64 n;
+
 		ifscr = 1;
-		fsrate = 0x0400000 / fout * fin;
+		n = (u64)0x0400000 * fin;
+		do_div(n, fout);
+		fsrate = n;
 	}
 
 	/*
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-27 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-96645.20160708053315@dm.renesas.com>
     [not found] ` <redmine.journal-761890.20160725005929.c30ee56718186304@dm.renesas.com>
2016-07-25  1:52   ` [PATCH] ASoC: rsnd: Fixup SRCm_IFSVR calculate method Kuninori Morimoto
2016-07-25  1:52     ` Kuninori Morimoto
2016-07-27 19:09     ` Applied "ASoC: rsnd: Fixup SRCm_IFSVR calculate method" to the asoc tree Mark Brown
2016-07-27 19:09       ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.