* [PATCH 1/3] ASoC: fsi: Add over_period flag to prevent the misunderstanding
@ 2009-12-28 5:09 Kuninori Morimoto
2009-12-30 18:31 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Kuninori Morimoto @ 2009-12-28 5:09 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
---
sound/soc/sh/fsi.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 497c5e0..4337afc 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -373,14 +373,16 @@ static int fsi_data_push(struct fsi_priv *fsi)
int fifo_free;
int width;
u8 *start;
- int i;
+ int i, over_period;
if (!fsi ||
!fsi->substream ||
!fsi->substream->runtime)
return -EINVAL;
- runtime = fsi->substream->runtime;
+ over_period = 0;
+ substream = fsi->substream;
+ runtime = substream->runtime;
/* FSI FIFO has limit.
* So, this driver can not send periods data at a time
@@ -388,7 +390,7 @@ static int fsi_data_push(struct fsi_priv *fsi)
if (fsi->byte_offset >=
fsi->period_len * (fsi->periods + 1)) {
- substream = fsi->substream;
+ over_period = 1;
fsi->periods = (fsi->periods + 1) % runtime->periods;
if (0 == fsi->periods)
@@ -429,7 +431,7 @@ static int fsi_data_push(struct fsi_priv *fsi)
fsi_irq_enable(fsi, 1);
- if (substream)
+ if (over_period)
snd_pcm_period_elapsed(substream);
return 0;
@@ -443,14 +445,16 @@ static int fsi_data_pop(struct fsi_priv *fsi)
int fifo_fill;
int width;
u8 *start;
- int i;
+ int i, over_period;
if (!fsi ||
!fsi->substream ||
!fsi->substream->runtime)
return -EINVAL;
- runtime = fsi->substream->runtime;
+ over_period = 0;
+ substream = fsi->substream;
+ runtime = substream->runtime;
/* FSI FIFO has limit.
* So, this driver can not send periods data at a time
@@ -458,7 +462,7 @@ static int fsi_data_pop(struct fsi_priv *fsi)
if (fsi->byte_offset >=
fsi->period_len * (fsi->periods + 1)) {
- substream = fsi->substream;
+ over_period = 1;
fsi->periods = (fsi->periods + 1) % runtime->periods;
if (0 == fsi->periods)
@@ -498,7 +502,7 @@ static int fsi_data_pop(struct fsi_priv *fsi)
fsi_irq_enable(fsi, 0);
- if (substream)
+ if (over_period)
snd_pcm_period_elapsed(substream);
return 0;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] ASoC: fsi: Add over_period flag to prevent the misunderstanding
2009-12-28 5:09 [PATCH 1/3] ASoC: fsi: Add over_period flag to prevent the misunderstanding Kuninori Morimoto
@ 2009-12-30 18:31 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2009-12-30 18:31 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA
On Mon, Dec 28, 2009 at 02:09:05PM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Applied all three, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-30 18:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28 5:09 [PATCH 1/3] ASoC: fsi: Add over_period flag to prevent the misunderstanding Kuninori Morimoto
2009-12-30 18:31 ` 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.