From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> To: Mark Brown <broonie@kernel.org> Cc: Linux-ALSA <alsa-devel@alsa-project.org>, Simon <horms@verge.net.au>, <linux-renesas-soc@vger.kernel.org>, Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Subject: [PATCH 1/3] ASoC: rsnd: tidyup src->convert_rate reset timing Date: Thu, 6 Apr 2017 07:24:36 +0000 [thread overview] Message-ID: <87vaqi3stx.wl%kuninori.morimoto.gx@renesas.com> (raw) In-Reply-To: <87wpay3svc.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Current src->convert_rate will be set on .hw_param, and be reset on .quit timing. But, .hw_param will not be called again if user did Ctrl-Z + fg. It should be reset on initial of .hw_param to keep its value. Here, ctu.c already do this. This patch solves this issue, other wise, MIXed sound will be strange if user did like below. > aplay -D plughw:0,0 sound_44100.wav & > aplay -D plughw:0,1 sound_96000.wav > Ctrl-Z > fg # 96kHz will be played as 44.1kHz Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> --- sound/soc/sh/rcar/src.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 42db48d..20b5b2e 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -167,6 +167,7 @@ static int rsnd_src_hw_params(struct rsnd_mod *mod, * dpcm_fe_dai_hw_params() * dpcm_be_dai_hw_params() */ + src->convert_rate = 0; if (fe->dai_link->dynamic) { int stream = substream->stream; struct snd_soc_dpcm *dpcm; @@ -414,8 +415,6 @@ static int rsnd_src_quit(struct rsnd_mod *mod, rsnd_mod_power_off(mod); - src->convert_rate = 0; - /* reset sync convert_rate */ src->sync.val = 0; -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> To: Mark Brown <broonie@kernel.org> Cc: Linux-ALSA <alsa-devel@alsa-project.org>, Simon <horms@verge.net.au>, linux-renesas-soc@vger.kernel.org, Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Subject: [PATCH 1/3] ASoC: rsnd: tidyup src->convert_rate reset timing Date: Thu, 6 Apr 2017 07:24:36 +0000 [thread overview] Message-ID: <87vaqi3stx.wl%kuninori.morimoto.gx@renesas.com> (raw) In-Reply-To: <87wpay3svc.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Current src->convert_rate will be set on .hw_param, and be reset on .quit timing. But, .hw_param will not be called again if user did Ctrl-Z + fg. It should be reset on initial of .hw_param to keep its value. Here, ctu.c already do this. This patch solves this issue, other wise, MIXed sound will be strange if user did like below. > aplay -D plughw:0,0 sound_44100.wav & > aplay -D plughw:0,1 sound_96000.wav > Ctrl-Z > fg # 96kHz will be played as 44.1kHz Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> --- sound/soc/sh/rcar/src.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 42db48d..20b5b2e 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -167,6 +167,7 @@ static int rsnd_src_hw_params(struct rsnd_mod *mod, * dpcm_fe_dai_hw_params() * dpcm_be_dai_hw_params() */ + src->convert_rate = 0; if (fe->dai_link->dynamic) { int stream = substream->stream; struct snd_soc_dpcm *dpcm; @@ -414,8 +415,6 @@ static int rsnd_src_quit(struct rsnd_mod *mod, rsnd_mod_power_off(mod); - src->convert_rate = 0; - /* reset sync convert_rate */ src->sync.val = 0; -- 1.9.1
next prev parent reply other threads:[~2017-04-06 7:24 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-06 7:23 [PATCH 0/3] ASoC: rsnd: fixup Ctrl-Z + fg behavior Kuninori Morimoto 2017-04-06 7:23 ` Kuninori Morimoto 2017-04-06 7:24 ` Kuninori Morimoto [this message] 2017-04-06 7:24 ` [PATCH 1/3] ASoC: rsnd: tidyup src->convert_rate reset timing Kuninori Morimoto 2017-04-06 10:48 ` Applied "ASoC: rsnd: tidyup src->convert_rate reset timing" to the asoc tree Mark Brown 2017-04-06 10:48 ` Mark Brown 2017-04-06 7:25 ` [PATCH 2/3] ASoC: rsnd: merge rsnd_kctrl_new_m/s/e into rsnd_kctrl_new() Kuninori Morimoto 2017-04-06 7:25 ` Kuninori Morimoto 2017-04-06 10:58 ` Applied "ASoC: rsnd: merge rsnd_kctrl_new_m/s/e into rsnd_kctrl_new()" to the asoc tree Mark Brown 2017-04-06 10:58 ` Mark Brown 2017-04-06 7:25 ` [PATCH 3/3] ASoC: rsnd: control kctrl items acceptance anytime/runtime Kuninori Morimoto 2017-04-06 7:25 ` Kuninori Morimoto 2017-04-06 10:48 ` Mark Brown 2017-04-07 0:26 ` Kuninori Morimoto 2017-04-07 0:26 ` Kuninori Morimoto 2017-06-13 21:08 ` Applied "ASoC: rsnd: control kctrl items acceptance anytime/runtime" to the asoc tree Mark Brown 2017-06-13 21:08 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=87vaqi3stx.wl%kuninori.morimoto.gx@renesas.com \ --to=kuninori.morimoto.gx@renesas.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=hiroyuki.yokoyama.vx@renesas.com \ --cc=horms@verge.net.au \ --cc=linux-renesas-soc@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.