ASoC: A few bug fixes for the merge window
Small driver-specific updates. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJPxfaDAAoJEBus8iNuMP3dnJgP/0cCc7LlY/6jUl+4Bq2KvTg7 hGH0vyCkhnVV6olPXDdGwFDrqK/Y+N9ezC/nRR1JD8hZT6oh9SYTl4yxQdApmmgV RNnWuKysjNbSA4nOG/HvLNaJ3xgKN8/Vy65jCT5shPUUL/WplKphko2z1/f/+x5P A+C1RzXG7PSrUjvf9YI199WHUErWDl3pmUZ99iepXaMz385fsQEuGkdZZzH7jOHo aLwn3hGJ52bproIFugkxBcSRpzf96k+XbjLl6mY+hwMCa6aWJe/IECJNulOuioJ6 8cnyPRSDxyOS0ScSyTPenu1SW+dTqPN65hHrd5FbSUDDa0FMt9pwUV7xrcw54YGX 33/sMll7JhfkSnt+pY5idqSKzseUiwooHYLnWqvfgTnxq/qR95TXKVNumPpyyb97 uoQ3A6VO+d6YtGeBFpV65tdAcyxoHE1etdDbmBrM/B+CevS1TfwxfEROiv3hd8Fp 8znMSp+8RNTAdg9VucTx21/6aqfLKGFykcET5wR5OPx6QFY8kg/h/d/AMFe3U6Bx 80zJVOCRxXTv+EB3HFwZfKjMD9I5bE7P+tmPxfeHzZXuIWsw/5yBee5w1Q5I7n1N r6GVcxwH0ZMhtqHyHo4MZfqiwDYk1w7PY7eokAH7V4ESL4izrYsQlMpaZeXiFC1H 1K1WJVvuDxMUMy77EWIQ =Ch46 -----END PGP SIGNATURE----- Merge tag 'asoc-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: A few bug fixes for the merge window Small driver-specific updates.
This commit is contained in:
commit
fbf2045af7
@ -543,7 +543,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
|
|||||||
ret);
|
ret);
|
||||||
goto failed_clk;
|
goto failed_clk;
|
||||||
}
|
}
|
||||||
clk_enable(ssi->clk);
|
clk_prepare_enable(ssi->clk);
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
@ -641,7 +641,7 @@ failed_ac97:
|
|||||||
failed_ioremap:
|
failed_ioremap:
|
||||||
release_mem_region(res->start, resource_size(res));
|
release_mem_region(res->start, resource_size(res));
|
||||||
failed_get_resource:
|
failed_get_resource:
|
||||||
clk_disable(ssi->clk);
|
clk_disable_unprepare(ssi->clk);
|
||||||
clk_put(ssi->clk);
|
clk_put(ssi->clk);
|
||||||
failed_clk:
|
failed_clk:
|
||||||
kfree(ssi);
|
kfree(ssi);
|
||||||
@ -664,7 +664,7 @@ static int __devexit imx_ssi_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
iounmap(ssi->base);
|
iounmap(ssi->base);
|
||||||
release_mem_region(res->start, resource_size(res));
|
release_mem_region(res->start, resource_size(res));
|
||||||
clk_disable(ssi->clk);
|
clk_disable_unprepare(ssi->clk);
|
||||||
clk_put(ssi->clk);
|
clk_put(ssi->clk);
|
||||||
kfree(ssi);
|
kfree(ssi);
|
||||||
|
|
||||||
|
@ -1052,6 +1052,13 @@ static int fsi_dma_quit(struct fsi_priv *fsi, struct fsi_stream *io)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static dma_addr_t fsi_dma_get_area(struct fsi_stream *io)
|
||||||
|
{
|
||||||
|
struct snd_pcm_runtime *runtime = io->substream->runtime;
|
||||||
|
|
||||||
|
return io->dma + samples_to_bytes(runtime, io->buff_sample_pos);
|
||||||
|
}
|
||||||
|
|
||||||
static void fsi_dma_complete(void *data)
|
static void fsi_dma_complete(void *data)
|
||||||
{
|
{
|
||||||
struct fsi_stream *io = (struct fsi_stream *)data;
|
struct fsi_stream *io = (struct fsi_stream *)data;
|
||||||
@ -1061,7 +1068,7 @@ static void fsi_dma_complete(void *data)
|
|||||||
enum dma_data_direction dir = fsi_stream_is_play(fsi, io) ?
|
enum dma_data_direction dir = fsi_stream_is_play(fsi, io) ?
|
||||||
DMA_TO_DEVICE : DMA_FROM_DEVICE;
|
DMA_TO_DEVICE : DMA_FROM_DEVICE;
|
||||||
|
|
||||||
dma_sync_single_for_cpu(dai->dev, io->dma,
|
dma_sync_single_for_cpu(dai->dev, fsi_dma_get_area(io),
|
||||||
samples_to_bytes(runtime, io->period_samples), dir);
|
samples_to_bytes(runtime, io->period_samples), dir);
|
||||||
|
|
||||||
io->buff_sample_pos += io->period_samples;
|
io->buff_sample_pos += io->period_samples;
|
||||||
@ -1078,13 +1085,6 @@ static void fsi_dma_complete(void *data)
|
|||||||
snd_pcm_period_elapsed(io->substream);
|
snd_pcm_period_elapsed(io->substream);
|
||||||
}
|
}
|
||||||
|
|
||||||
static dma_addr_t fsi_dma_get_area(struct fsi_stream *io)
|
|
||||||
{
|
|
||||||
struct snd_pcm_runtime *runtime = io->substream->runtime;
|
|
||||||
|
|
||||||
return io->dma + samples_to_bytes(runtime, io->buff_sample_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void fsi_dma_do_tasklet(unsigned long data)
|
static void fsi_dma_do_tasklet(unsigned long data)
|
||||||
{
|
{
|
||||||
struct fsi_stream *io = (struct fsi_stream *)data;
|
struct fsi_stream *io = (struct fsi_stream *)data;
|
||||||
@ -1110,7 +1110,7 @@ static void fsi_dma_do_tasklet(unsigned long data)
|
|||||||
len = samples_to_bytes(runtime, io->period_samples);
|
len = samples_to_bytes(runtime, io->period_samples);
|
||||||
buf = fsi_dma_get_area(io);
|
buf = fsi_dma_get_area(io);
|
||||||
|
|
||||||
dma_sync_single_for_device(dai->dev, io->dma, len, dir);
|
dma_sync_single_for_device(dai->dev, buf, len, dir);
|
||||||
|
|
||||||
sg_init_table(&sg, 1);
|
sg_init_table(&sg, 1);
|
||||||
sg_set_page(&sg, pfn_to_page(PFN_DOWN(buf)),
|
sg_set_page(&sg, pfn_to_page(PFN_DOWN(buf)),
|
||||||
@ -1172,9 +1172,16 @@ static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io)
|
|||||||
static void fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_stream *io,
|
static void fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_stream *io,
|
||||||
int start)
|
int start)
|
||||||
{
|
{
|
||||||
|
struct fsi_master *master = fsi_get_master(fsi);
|
||||||
|
u32 clk = fsi_is_port_a(fsi) ? CRA : CRB;
|
||||||
u32 enable = start ? DMA_ON : 0;
|
u32 enable = start ? DMA_ON : 0;
|
||||||
|
|
||||||
fsi_reg_mask_set(fsi, OUT_DMAC, DMA_ON, enable);
|
fsi_reg_mask_set(fsi, OUT_DMAC, DMA_ON, enable);
|
||||||
|
|
||||||
|
dmaengine_terminate_all(io->chan);
|
||||||
|
|
||||||
|
if (fsi_is_clk_master(fsi))
|
||||||
|
fsi_master_mask_set(master, CLK_RST, clk, (enable) ? clk : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io)
|
static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io)
|
||||||
|
Loading…
Reference in New Issue
Block a user