struct asrc_pair_params *params = (struct asrc_pair_params *)data;
dma_unmap_sg(NULL, params->output_sg, params->output_sg_nodes,
- DMA_MEM_TO_DEV);
+ DMA_DEV_TO_MEM);
complete(¶ms->output_complete);
}
}
output_a->dma_paddr = virt_to_dma(NULL, output_a->dma_vaddr);
- last_period->dma_vaddr = dma_alloc_coherent(NULL,
+ last_period->dma_vaddr = dma_alloc_coherent(asrc->dev,
1024 * params->last_period_sample,
&last_period->dma_paddr, GFP_KERNEL);
if (!last_period->dma_vaddr) {
dma_unmap_sg(NULL, params->input_sg, params->input_sg_nodes,
DMA_MEM_TO_DEV);
dma_unmap_sg(NULL, params->output_sg, params->output_sg_nodes,
- DMA_MEM_TO_DEV);
+ DMA_DEV_TO_MEM);
complete(¶ms->input_complete);
complete(¶ms->lastperiod_complete);