diff options
author | Mark Brown <broonie@kernel.org> | 2016-02-22 20:12:13 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-22 20:12:13 +0900 |
commit | 8174b35f1d9b54b740a935410c7b3891e3e2a119 (patch) | |
tree | 95427a4dd7248c41547a9a8d4afcfe7aa9a3a9fd /sound/soc/samsung/spdif.c | |
parent | fcde5a7eca1a28d3f7158399809cb01f83bd0114 (diff) | |
parent | 81f70ba233d5f660e1ea5fe23260ee323af5d53a (diff) | |
download | blackbird-op-linux-8174b35f1d9b54b740a935410c7b3891e3e2a119.tar.gz blackbird-op-linux-8174b35f1d9b54b740a935410c7b3891e3e2a119.zip |
Merge tag 'v4.5-rc5' into asoc-mtk
Linux 4.5-rc5
Diffstat (limited to 'sound/soc/samsung/spdif.c')
-rw-r--r-- | sound/soc/samsung/spdif.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 36dbc0e96004..4687f521197c 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -359,20 +359,15 @@ static const struct snd_soc_component_driver samsung_spdif_component = { static int spdif_probe(struct platform_device *pdev) { struct s3c_audio_pdata *spdif_pdata; - struct resource *mem_res, *dma_res; + struct resource *mem_res; struct samsung_spdif_info *spdif; + dma_filter_fn filter; int ret; spdif_pdata = pdev->dev.platform_data; dev_dbg(&pdev->dev, "Entered %s\n", __func__); - dma_res = platform_get_resource(pdev, IORESOURCE_DMA, 0); - if (!dma_res) { - dev_err(&pdev->dev, "Unable to get dma resource.\n"); - return -ENXIO; - } - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem_res) { dev_err(&pdev->dev, "Unable to get register resource.\n"); @@ -432,11 +427,15 @@ static int spdif_probe(struct platform_device *pdev) spdif_stereo_out.dma_size = 2; spdif_stereo_out.dma_addr = mem_res->start + DATA_OUTBUF; - spdif_stereo_out.channel = dma_res->start; + filter = NULL; + if (spdif_pdata) { + spdif_stereo_out.slave = spdif_pdata->dma_playback; + filter = spdif_pdata->dma_filter; + } spdif->dma_playback = &spdif_stereo_out; - ret = samsung_asoc_dma_platform_register(&pdev->dev); + ret = samsung_asoc_dma_platform_register(&pdev->dev, filter); if (ret) { dev_err(&pdev->dev, "failed to register DMA: %d\n", ret); goto err4; |