diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-01-23 21:40:27 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-03 07:41:37 -0500 |
commit | f5cab3b8976d59c6166228874a5af3d87c94c723 (patch) | |
tree | 54ad0a3254d423f9e98b488d3e2e033726ec82bd | |
parent | 64de62b38641dec05905930024133726c540040e (diff) |
ASoC: rsnd: don't use schedule_work() when rsnd_dma_start()
rsnd_dma_start() is the function to start DMAEngine.
Current code is using schedule_work() for it,
but it breaks DMAC/SSI register setting timing.
Don't use schedule_work() on it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/sh/rcar/core.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 4fd57351c54a..11eb0e35b9ce 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c | |||
@@ -132,6 +132,7 @@ void rsnd_mod_init(struct rsnd_priv *priv, | |||
132 | /* | 132 | /* |
133 | * rsnd_dma functions | 133 | * rsnd_dma functions |
134 | */ | 134 | */ |
135 | static void __rsnd_dma_start(struct rsnd_dma *dma); | ||
135 | static void rsnd_dma_continue(struct rsnd_dma *dma) | 136 | static void rsnd_dma_continue(struct rsnd_dma *dma) |
136 | { | 137 | { |
137 | /* push next A or B plane */ | 138 | /* push next A or B plane */ |
@@ -143,7 +144,7 @@ void rsnd_dma_start(struct rsnd_dma *dma) | |||
143 | { | 144 | { |
144 | /* push both A and B plane*/ | 145 | /* push both A and B plane*/ |
145 | dma->submit_loop = 2; | 146 | dma->submit_loop = 2; |
146 | schedule_work(&dma->work); | 147 | __rsnd_dma_start(dma); |
147 | } | 148 | } |
148 | 149 | ||
149 | void rsnd_dma_stop(struct rsnd_dma *dma) | 150 | void rsnd_dma_stop(struct rsnd_dma *dma) |
@@ -169,9 +170,8 @@ static void rsnd_dma_complete(void *data) | |||
169 | rsnd_unlock(priv, flags); | 170 | rsnd_unlock(priv, flags); |
170 | } | 171 | } |
171 | 172 | ||
172 | static void rsnd_dma_do_work(struct work_struct *work) | 173 | static void __rsnd_dma_start(struct rsnd_dma *dma) |
173 | { | 174 | { |
174 | struct rsnd_dma *dma = container_of(work, struct rsnd_dma, work); | ||
175 | struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma)); | 175 | struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma)); |
176 | struct device *dev = rsnd_priv_to_dev(priv); | 176 | struct device *dev = rsnd_priv_to_dev(priv); |
177 | struct dma_async_tx_descriptor *desc; | 177 | struct dma_async_tx_descriptor *desc; |
@@ -204,6 +204,13 @@ static void rsnd_dma_do_work(struct work_struct *work) | |||
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | static void rsnd_dma_do_work(struct work_struct *work) | ||
208 | { | ||
209 | struct rsnd_dma *dma = container_of(work, struct rsnd_dma, work); | ||
210 | |||
211 | __rsnd_dma_start(dma); | ||
212 | } | ||
213 | |||
207 | int rsnd_dma_available(struct rsnd_dma *dma) | 214 | int rsnd_dma_available(struct rsnd_dma *dma) |
208 | { | 215 | { |
209 | return !!dma->chan; | 216 | return !!dma->chan; |