* [PATCH] ASoC: rt5514: reset dma_offset at hw_params
@ 2017-08-07 10:39 Oder Chiou
2017-08-07 11:52 ` Applied "ASoC: rt5514: reset dma_offset at hw_params" to the asoc tree Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Oder Chiou @ 2017-08-07 10:39 UTC (permalink / raw)
To: broonie, lgirdwood
Cc: Oder Chiou, jack.yu, alsa-devel, Hsin-Yu Chao, shumingf, bardliao,
flove
dma_offset needs reset every time otherwise for consecutive PCM
open the last dma_offset value will cause incorrect pointer position
be reported to user space.
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
sound/soc/codecs/rt5514-spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c
index 6f513cc..640193d 100644
--- a/sound/soc/codecs/rt5514-spi.c
+++ b/sound/soc/codecs/rt5514-spi.c
@@ -151,7 +151,6 @@ static irqreturn_t rt5514_spi_irq(int irq, void *data)
u8 buf[8];
rt5514_dsp->get_size = 0;
- rt5514_dsp->dma_offset = 0;
/**
* The address area x1800XXXX is the register address, and it cannot
@@ -205,6 +204,7 @@ static int rt5514_spi_hw_params(struct snd_pcm_substream *substream,
ret = snd_pcm_lib_alloc_vmalloc_buffer(substream,
params_buffer_bytes(hw_params));
rt5514_dsp->substream = substream;
+ rt5514_dsp->dma_offset = 0;
mutex_unlock(&rt5514_dsp->dma_lock);
return ret;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Applied "ASoC: rt5514: reset dma_offset at hw_params" to the asoc tree
2017-08-07 10:39 [PATCH] ASoC: rt5514: reset dma_offset at hw_params Oder Chiou
@ 2017-08-07 11:52 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-08-07 11:52 UTC (permalink / raw)
Cc: Oder Chiou, jack.yu, alsa-devel, lgirdwood, broonie, shumingf,
bardliao, Hsin-Yu Chao, flove
The patch
ASoC: rt5514: reset dma_offset at hw_params
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 b56bff43a965ffe03b4a994fd1a102059d272807 Mon Sep 17 00:00:00 2001
From: "oder_chiou@realtek.com" <oder_chiou@realtek.com>
Date: Mon, 7 Aug 2017 18:39:32 +0800
Subject: [PATCH] ASoC: rt5514: reset dma_offset at hw_params
dma_offset needs reset every time otherwise for consecutive PCM
open the last dma_offset value will cause incorrect pointer position
be reported to user space.
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/rt5514-spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c
index 6f513cc4c56c..640193d845be 100644
--- a/sound/soc/codecs/rt5514-spi.c
+++ b/sound/soc/codecs/rt5514-spi.c
@@ -151,7 +151,6 @@ static irqreturn_t rt5514_spi_irq(int irq, void *data)
u8 buf[8];
rt5514_dsp->get_size = 0;
- rt5514_dsp->dma_offset = 0;
/**
* The address area x1800XXXX is the register address, and it cannot
@@ -205,6 +204,7 @@ static int rt5514_spi_hw_params(struct snd_pcm_substream *substream,
ret = snd_pcm_lib_alloc_vmalloc_buffer(substream,
params_buffer_bytes(hw_params));
rt5514_dsp->substream = substream;
+ rt5514_dsp->dma_offset = 0;
mutex_unlock(&rt5514_dsp->dma_lock);
return ret;
--
2.13.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-07 11:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 10:39 [PATCH] ASoC: rt5514: reset dma_offset at hw_params Oder Chiou
2017-08-07 11:52 ` Applied "ASoC: rt5514: reset dma_offset at hw_params" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).