diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-06 10:46:18 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-06 10:46:18 -0500 |
commit | 330f28f691e9b349e34adcaf82b273cf061bb491 (patch) | |
tree | fca3bfe41eff25ef19f576cef1979c68f6521af5 /sound/soc/s3c24xx | |
parent | fe3e78e073d25308756f38019956061153267769 (diff) | |
parent | 6fc786d5034ed7ce2d43c459211137de6d99dd28 (diff) |
Merge branch 'for-2.6.32' into for-2.6.33
Diffstat (limited to 'sound/soc/s3c24xx')
-rw-r--r-- | sound/soc/s3c24xx/s3c24xx-pcm.c | 17 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c64xx-i2s.c | 2 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c index 27cf097c2b1d..151a69463269 100644 --- a/sound/soc/s3c24xx/s3c24xx-pcm.c +++ b/sound/soc/s3c24xx/s3c24xx-pcm.c | |||
@@ -74,11 +74,19 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream) | |||
74 | { | 74 | { |
75 | struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; | 75 | struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; |
76 | dma_addr_t pos = prtd->dma_pos; | 76 | dma_addr_t pos = prtd->dma_pos; |
77 | unsigned int limit; | ||
77 | int ret; | 78 | int ret; |
78 | 79 | ||
79 | pr_debug("Entered %s\n", __func__); | 80 | pr_debug("Entered %s\n", __func__); |
80 | 81 | ||
81 | while (prtd->dma_loaded < prtd->dma_limit) { | 82 | if (s3c_dma_has_circular()) { |
83 | limit = (prtd->dma_end - prtd->dma_start) / prtd->dma_period; | ||
84 | } else | ||
85 | limit = prtd->dma_limit; | ||
86 | |||
87 | pr_debug("%s: loaded %d, limit %d\n", __func__, prtd->dma_loaded, limit); | ||
88 | |||
89 | while (prtd->dma_loaded < limit) { | ||
82 | unsigned long len = prtd->dma_period; | 90 | unsigned long len = prtd->dma_period; |
83 | 91 | ||
84 | pr_debug("dma_loaded: %d\n", prtd->dma_loaded); | 92 | pr_debug("dma_loaded: %d\n", prtd->dma_loaded); |
@@ -122,7 +130,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel, | |||
122 | snd_pcm_period_elapsed(substream); | 130 | snd_pcm_period_elapsed(substream); |
123 | 131 | ||
124 | spin_lock(&prtd->lock); | 132 | spin_lock(&prtd->lock); |
125 | if (prtd->state & ST_RUNNING) { | 133 | if (prtd->state & ST_RUNNING && !s3c_dma_has_circular()) { |
126 | prtd->dma_loaded--; | 134 | prtd->dma_loaded--; |
127 | s3c24xx_pcm_enqueue(substream); | 135 | s3c24xx_pcm_enqueue(substream); |
128 | } | 136 | } |
@@ -163,6 +171,11 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
163 | printk(KERN_ERR "failed to get dma channel\n"); | 171 | printk(KERN_ERR "failed to get dma channel\n"); |
164 | return ret; | 172 | return ret; |
165 | } | 173 | } |
174 | |||
175 | /* use the circular buffering if we have it available. */ | ||
176 | if (s3c_dma_has_circular()) | ||
177 | s3c2410_dma_setflags(prtd->params->channel, | ||
178 | S3C2410_DMAF_CIRCULAR); | ||
166 | } | 179 | } |
167 | 180 | ||
168 | s3c2410_dma_set_buffdone_fn(prtd->params->channel, | 181 | s3c2410_dma_set_buffdone_fn(prtd->params->channel, |
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c index b67eed59666a..d68cae15561c 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.c +++ b/sound/soc/s3c24xx/s3c64xx-i2s.c | |||
@@ -236,6 +236,8 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev) | |||
236 | goto err; | 236 | goto err; |
237 | } | 237 | } |
238 | 238 | ||
239 | clk_enable(i2s->iis_cclk); | ||
240 | |||
239 | ret = s3c_i2sv2_probe(pdev, dai, i2s, 0); | 241 | ret = s3c_i2sv2_probe(pdev, dai, i2s, 0); |
240 | if (ret) | 242 | if (ret) |
241 | goto err_clk; | 243 | goto err_clk; |