diff options
| -rw-r--r-- | arch/arm/mach-s3c64xx/dev-audio.c | 6 | ||||
| -rw-r--r-- | arch/arm/plat-samsung/devs.c | 6 | ||||
| -rw-r--r-- | drivers/dma/Kconfig | 2 | ||||
| -rw-r--r-- | include/linux/platform_data/asoc-s3c.h | 4 | ||||
| -rw-r--r-- | sound/soc/samsung/Kconfig | 2 | ||||
| -rw-r--r-- | sound/soc/samsung/ac97.c | 3 | ||||
| -rw-r--r-- | sound/soc/samsung/dma.h | 4 | ||||
| -rw-r--r-- | sound/soc/samsung/dmaengine.c | 16 | ||||
| -rw-r--r-- | sound/soc/samsung/i2s.c | 11 | ||||
| -rw-r--r-- | sound/soc/samsung/pcm.c | 5 | ||||
| -rw-r--r-- | sound/soc/samsung/s3c2412-i2s.c | 4 | ||||
| -rw-r--r-- | sound/soc/samsung/s3c24xx-i2s.c | 4 | ||||
| -rw-r--r-- | sound/soc/samsung/spdif.c | 9 |
13 files changed, 50 insertions, 26 deletions
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index 9a42736ef4ac..b57783371d52 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c | |||
| @@ -58,6 +58,7 @@ static struct resource s3c64xx_iis0_resource[] = { | |||
| 58 | 58 | ||
| 59 | static struct s3c_audio_pdata i2s0_pdata = { | 59 | static struct s3c_audio_pdata i2s0_pdata = { |
| 60 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, | 60 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, |
| 61 | .dma_filter = pl08x_filter_id, | ||
| 61 | .dma_playback = DMACH_I2S0_OUT, | 62 | .dma_playback = DMACH_I2S0_OUT, |
| 62 | .dma_capture = DMACH_I2S0_IN, | 63 | .dma_capture = DMACH_I2S0_IN, |
| 63 | }; | 64 | }; |
| @@ -79,6 +80,7 @@ static struct resource s3c64xx_iis1_resource[] = { | |||
| 79 | 80 | ||
| 80 | static struct s3c_audio_pdata i2s1_pdata = { | 81 | static struct s3c_audio_pdata i2s1_pdata = { |
| 81 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, | 82 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, |
| 83 | .dma_filter = pl08x_filter_id, | ||
| 82 | .dma_playback = DMACH_I2S1_OUT, | 84 | .dma_playback = DMACH_I2S1_OUT, |
| 83 | .dma_capture = DMACH_I2S1_IN, | 85 | .dma_capture = DMACH_I2S1_IN, |
| 84 | }; | 86 | }; |
| @@ -100,6 +102,7 @@ static struct resource s3c64xx_iisv4_resource[] = { | |||
| 100 | 102 | ||
| 101 | static struct s3c_audio_pdata i2sv4_pdata = { | 103 | static struct s3c_audio_pdata i2sv4_pdata = { |
| 102 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, | 104 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, |
| 105 | .dma_filter = pl08x_filter_id, | ||
| 103 | .dma_playback = DMACH_HSI_I2SV40_TX, | 106 | .dma_playback = DMACH_HSI_I2SV40_TX, |
| 104 | .dma_capture = DMACH_HSI_I2SV40_RX, | 107 | .dma_capture = DMACH_HSI_I2SV40_RX, |
| 105 | .type = { | 108 | .type = { |
| @@ -150,6 +153,7 @@ static struct resource s3c64xx_pcm0_resource[] = { | |||
| 150 | 153 | ||
| 151 | static struct s3c_audio_pdata s3c_pcm0_pdata = { | 154 | static struct s3c_audio_pdata s3c_pcm0_pdata = { |
| 152 | .cfg_gpio = s3c64xx_pcm_cfg_gpio, | 155 | .cfg_gpio = s3c64xx_pcm_cfg_gpio, |
| 156 | .dma_filter = pl08x_filter_id, | ||
| 153 | .dma_capture = DMACH_PCM0_RX, | 157 | .dma_capture = DMACH_PCM0_RX, |
| 154 | .dma_playback = DMACH_PCM0_TX, | 158 | .dma_playback = DMACH_PCM0_TX, |
| 155 | }; | 159 | }; |
| @@ -171,6 +175,7 @@ static struct resource s3c64xx_pcm1_resource[] = { | |||
| 171 | 175 | ||
| 172 | static struct s3c_audio_pdata s3c_pcm1_pdata = { | 176 | static struct s3c_audio_pdata s3c_pcm1_pdata = { |
| 173 | .cfg_gpio = s3c64xx_pcm_cfg_gpio, | 177 | .cfg_gpio = s3c64xx_pcm_cfg_gpio, |
| 178 | .dma_filter = pl08x_filter_id, | ||
| 174 | .dma_playback = DMACH_PCM1_TX, | 179 | .dma_playback = DMACH_PCM1_TX, |
| 175 | .dma_capture = DMACH_PCM1_RX, | 180 | .dma_capture = DMACH_PCM1_RX, |
| 176 | }; | 181 | }; |
| @@ -205,6 +210,7 @@ static struct resource s3c64xx_ac97_resource[] = { | |||
| 205 | 210 | ||
| 206 | static struct s3c_audio_pdata s3c_ac97_pdata = { | 211 | static struct s3c_audio_pdata s3c_ac97_pdata = { |
| 207 | .dma_playback = DMACH_AC97_PCMOUT, | 212 | .dma_playback = DMACH_AC97_PCMOUT, |
| 213 | .dma_filter = pl08x_filter_id, | ||
| 208 | .dma_capture = DMACH_AC97_PCMIN, | 214 | .dma_capture = DMACH_AC97_PCMIN, |
| 209 | .dma_capture_mic = DMACH_AC97_MICIN, | 215 | .dma_capture_mic = DMACH_AC97_MICIN, |
| 210 | }; | 216 | }; |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 823de7b4e53b..7263e95a6f35 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
| @@ -78,6 +78,9 @@ static struct resource s3c_ac97_resource[] = { | |||
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | static struct s3c_audio_pdata s3c_ac97_pdata = { | 80 | static struct s3c_audio_pdata s3c_ac97_pdata = { |
| 81 | #ifdef CONFIG_S3C24XX_DMAC | ||
| 82 | .dma_filter = s3c24xx_dma_filter, | ||
| 83 | #endif | ||
| 81 | .dma_playback = (void *)DMACH_PCM_OUT, | 84 | .dma_playback = (void *)DMACH_PCM_OUT, |
| 82 | .dma_capture = (void *)DMACH_PCM_IN, | 85 | .dma_capture = (void *)DMACH_PCM_IN, |
| 83 | .dma_capture_mic = (void *)DMACH_MIC_IN, | 86 | .dma_capture_mic = (void *)DMACH_MIC_IN, |
| @@ -572,6 +575,9 @@ static struct resource s3c_iis_resource[] = { | |||
| 572 | }; | 575 | }; |
| 573 | 576 | ||
| 574 | static struct s3c_audio_pdata s3c_iis_platdata = { | 577 | static struct s3c_audio_pdata s3c_iis_platdata = { |
| 578 | #ifdef CONFIG_S3C24XX_DMAC | ||
| 579 | .dma_filter = s3c24xx_dma_filter, | ||
| 580 | #endif | ||
| 575 | .dma_playback = (void *)DMACH_I2S_OUT, | 581 | .dma_playback = (void *)DMACH_I2S_OUT, |
| 576 | .dma_capture = (void *)DMACH_I2S_IN, | 582 | .dma_capture = (void *)DMACH_I2S_IN, |
| 577 | }; | 583 | }; |
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index e6cd1a32025a..17655d9ba518 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig | |||
| @@ -432,7 +432,7 @@ config STE_DMA40 | |||
| 432 | Support for ST-Ericsson DMA40 controller | 432 | Support for ST-Ericsson DMA40 controller |
| 433 | 433 | ||
| 434 | config S3C24XX_DMAC | 434 | config S3C24XX_DMAC |
| 435 | tristate "Samsung S3C24XX DMA support" | 435 | bool "Samsung S3C24XX DMA support" |
| 436 | depends on ARCH_S3C24XX | 436 | depends on ARCH_S3C24XX |
| 437 | select DMA_ENGINE | 437 | select DMA_ENGINE |
| 438 | select DMA_VIRTUAL_CHANNELS | 438 | select DMA_VIRTUAL_CHANNELS |
diff --git a/include/linux/platform_data/asoc-s3c.h b/include/linux/platform_data/asoc-s3c.h index 33f88b4479e4..15bf56ee8af7 100644 --- a/include/linux/platform_data/asoc-s3c.h +++ b/include/linux/platform_data/asoc-s3c.h | |||
| @@ -13,6 +13,9 @@ | |||
| 13 | */ | 13 | */ |
| 14 | #define S3C64XX_AC97_GPD 0 | 14 | #define S3C64XX_AC97_GPD 0 |
| 15 | #define S3C64XX_AC97_GPE 1 | 15 | #define S3C64XX_AC97_GPE 1 |
| 16 | |||
| 17 | #include <linux/dmaengine.h> | ||
| 18 | |||
| 16 | extern void s3c64xx_ac97_setup_gpio(int); | 19 | extern void s3c64xx_ac97_setup_gpio(int); |
| 17 | 20 | ||
| 18 | struct samsung_i2s { | 21 | struct samsung_i2s { |
| @@ -39,6 +42,7 @@ struct samsung_i2s { | |||
| 39 | */ | 42 | */ |
| 40 | struct s3c_audio_pdata { | 43 | struct s3c_audio_pdata { |
| 41 | int (*cfg_gpio)(struct platform_device *); | 44 | int (*cfg_gpio)(struct platform_device *); |
| 45 | dma_filter_fn dma_filter; | ||
| 42 | void *dma_playback; | 46 | void *dma_playback; |
| 43 | void *dma_capture; | 47 | void *dma_capture; |
| 44 | void *dma_play_sec; | 48 | void *dma_play_sec; |
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig index 3744c9ed5370..78baa26e938b 100644 --- a/sound/soc/samsung/Kconfig +++ b/sound/soc/samsung/Kconfig | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | config SND_SOC_SAMSUNG | 1 | config SND_SOC_SAMSUNG |
| 2 | tristate "ASoC support for Samsung" | 2 | tristate "ASoC support for Samsung" |
| 3 | depends on (PLAT_SAMSUNG || ARCH_EXYNOS) | 3 | depends on (PLAT_SAMSUNG || ARCH_EXYNOS) |
| 4 | depends on S3C64XX_PL080 || !ARCH_S3C64XX | ||
| 5 | depends on S3C24XX_DMAC || !ARCH_S3C24XX | ||
| 6 | select SND_SOC_GENERIC_DMAENGINE_PCM | 4 | select SND_SOC_GENERIC_DMAENGINE_PCM |
| 7 | help | 5 | help |
| 8 | Say Y or M if you want to add support for codecs attached to | 6 | Say Y or M if you want to add support for codecs attached to |
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 9c5219392460..4a7a503fe13c 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c | |||
| @@ -388,7 +388,8 @@ static int s3c_ac97_probe(struct platform_device *pdev) | |||
| 388 | if (ret) | 388 | if (ret) |
| 389 | goto err5; | 389 | goto err5; |
| 390 | 390 | ||
| 391 | ret = samsung_asoc_dma_platform_register(&pdev->dev); | 391 | ret = samsung_asoc_dma_platform_register(&pdev->dev, |
| 392 | ac97_pdata->dma_filter); | ||
| 392 | if (ret) { | 393 | if (ret) { |
| 393 | dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); | 394 | dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); |
| 394 | goto err5; | 395 | goto err5; |
diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h index 085ef30f5ca2..a7616cc9b39e 100644 --- a/sound/soc/samsung/dma.h +++ b/sound/soc/samsung/dma.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #define _S3C_AUDIO_H | 13 | #define _S3C_AUDIO_H |
| 14 | 14 | ||
| 15 | #include <sound/dmaengine_pcm.h> | 15 | #include <sound/dmaengine_pcm.h> |
| 16 | #include <linux/dmaengine.h> | ||
| 16 | 17 | ||
| 17 | struct s3c_dma_params { | 18 | struct s3c_dma_params { |
| 18 | void *slave; /* Channel ID */ | 19 | void *slave; /* Channel ID */ |
| @@ -25,6 +26,7 @@ struct s3c_dma_params { | |||
| 25 | void samsung_asoc_init_dma_data(struct snd_soc_dai *dai, | 26 | void samsung_asoc_init_dma_data(struct snd_soc_dai *dai, |
| 26 | struct s3c_dma_params *playback, | 27 | struct s3c_dma_params *playback, |
| 27 | struct s3c_dma_params *capture); | 28 | struct s3c_dma_params *capture); |
| 28 | int samsung_asoc_dma_platform_register(struct device *dev); | 29 | int samsung_asoc_dma_platform_register(struct device *dev, |
| 30 | dma_filter_fn fn); | ||
| 29 | 31 | ||
| 30 | #endif | 32 | #endif |
diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c index 727008d57d14..063125937311 100644 --- a/sound/soc/samsung/dmaengine.c +++ b/sound/soc/samsung/dmaengine.c | |||
| @@ -28,17 +28,8 @@ | |||
| 28 | 28 | ||
| 29 | #include "dma.h" | 29 | #include "dma.h" |
| 30 | 30 | ||
| 31 | #ifdef CONFIG_ARCH_S3C64XX | 31 | static struct snd_dmaengine_pcm_config samsung_dmaengine_pcm_config = { |
| 32 | #define filter_fn pl08x_filter_id | ||
| 33 | #elif defined(CONFIG_ARCH_S3C24XX) | ||
| 34 | #define filter_fn s3c24xx_dma_filter | ||
| 35 | #else | ||
| 36 | #define filter_fn NULL | ||
| 37 | #endif | ||
| 38 | |||
| 39 | static const struct snd_dmaengine_pcm_config samsung_dmaengine_pcm_config = { | ||
| 40 | .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, | 32 | .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, |
| 41 | .compat_filter_fn = filter_fn, | ||
| 42 | }; | 33 | }; |
| 43 | 34 | ||
| 44 | void samsung_asoc_init_dma_data(struct snd_soc_dai *dai, | 35 | void samsung_asoc_init_dma_data(struct snd_soc_dai *dai, |
| @@ -67,8 +58,11 @@ void samsung_asoc_init_dma_data(struct snd_soc_dai *dai, | |||
| 67 | } | 58 | } |
| 68 | EXPORT_SYMBOL_GPL(samsung_asoc_init_dma_data); | 59 | EXPORT_SYMBOL_GPL(samsung_asoc_init_dma_data); |
| 69 | 60 | ||
| 70 | int samsung_asoc_dma_platform_register(struct device *dev) | 61 | int samsung_asoc_dma_platform_register(struct device *dev, |
| 62 | dma_filter_fn filter) | ||
| 71 | { | 63 | { |
| 64 | samsung_dmaengine_pcm_config.compat_filter_fn = filter; | ||
| 65 | |||
| 72 | return devm_snd_dmaengine_pcm_register(dev, | 66 | return devm_snd_dmaengine_pcm_register(dev, |
| 73 | &samsung_dmaengine_pcm_config, | 67 | &samsung_dmaengine_pcm_config, |
| 74 | SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME | | 68 | SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME | |
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 0945b5de39e7..84d9e77c0fbe 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
| @@ -89,6 +89,7 @@ struct i2s_dai { | |||
| 89 | struct s3c_dma_params dma_playback; | 89 | struct s3c_dma_params dma_playback; |
| 90 | struct s3c_dma_params dma_capture; | 90 | struct s3c_dma_params dma_capture; |
| 91 | struct s3c_dma_params idma_playback; | 91 | struct s3c_dma_params idma_playback; |
| 92 | dma_filter_fn filter; | ||
| 92 | u32 quirks; | 93 | u32 quirks; |
| 93 | u32 suspend_i2smod; | 94 | u32 suspend_i2smod; |
| 94 | u32 suspend_i2scon; | 95 | u32 suspend_i2scon; |
| @@ -1244,7 +1245,8 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
| 1244 | if (ret != 0) | 1245 | if (ret != 0) |
| 1245 | return ret; | 1246 | return ret; |
| 1246 | 1247 | ||
| 1247 | return samsung_asoc_dma_platform_register(&pdev->dev); | 1248 | return samsung_asoc_dma_platform_register(&pdev->dev, |
| 1249 | sec_dai->filter); | ||
| 1248 | } | 1250 | } |
| 1249 | 1251 | ||
| 1250 | pri_dai = i2s_alloc_dai(pdev, false); | 1252 | pri_dai = i2s_alloc_dai(pdev, false); |
| @@ -1264,6 +1266,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
| 1264 | 1266 | ||
| 1265 | pri_dai->dma_playback.slave = i2s_pdata->dma_playback; | 1267 | pri_dai->dma_playback.slave = i2s_pdata->dma_playback; |
| 1266 | pri_dai->dma_capture.slave = i2s_pdata->dma_capture; | 1268 | pri_dai->dma_capture.slave = i2s_pdata->dma_capture; |
| 1269 | pri_dai->filter = i2s_pdata->dma_filter; | ||
| 1267 | 1270 | ||
| 1268 | if (&i2s_pdata->type) | 1271 | if (&i2s_pdata->type) |
| 1269 | i2s_cfg = &i2s_pdata->type.i2s; | 1272 | i2s_cfg = &i2s_pdata->type.i2s; |
| @@ -1325,8 +1328,10 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
| 1325 | sec_dai->dma_playback.dma_addr = regs_base + I2STXDS; | 1328 | sec_dai->dma_playback.dma_addr = regs_base + I2STXDS; |
| 1326 | sec_dai->dma_playback.ch_name = "tx-sec"; | 1329 | sec_dai->dma_playback.ch_name = "tx-sec"; |
| 1327 | 1330 | ||
| 1328 | if (!np) | 1331 | if (!np) { |
| 1329 | sec_dai->dma_playback.slave = i2s_pdata->dma_play_sec; | 1332 | sec_dai->dma_playback.slave = i2s_pdata->dma_play_sec; |
| 1333 | sec_dai->filter = i2s_pdata->dma_filter; | ||
| 1334 | } | ||
| 1330 | 1335 | ||
| 1331 | sec_dai->dma_playback.dma_size = 4; | 1336 | sec_dai->dma_playback.dma_size = 4; |
| 1332 | sec_dai->addr = pri_dai->addr; | 1337 | sec_dai->addr = pri_dai->addr; |
| @@ -1348,7 +1353,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
| 1348 | 1353 | ||
| 1349 | pm_runtime_enable(&pdev->dev); | 1354 | pm_runtime_enable(&pdev->dev); |
| 1350 | 1355 | ||
| 1351 | ret = samsung_asoc_dma_platform_register(&pdev->dev); | 1356 | ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter); |
| 1352 | if (ret != 0) | 1357 | if (ret != 0) |
| 1353 | return ret; | 1358 | return ret; |
| 1354 | 1359 | ||
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index c77f324e0bb8..498f563a4c9c 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c | |||
| @@ -488,6 +488,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) | |||
| 488 | struct s3c_pcm_info *pcm; | 488 | struct s3c_pcm_info *pcm; |
| 489 | struct resource *mem_res; | 489 | struct resource *mem_res; |
| 490 | struct s3c_audio_pdata *pcm_pdata; | 490 | struct s3c_audio_pdata *pcm_pdata; |
| 491 | dma_filter_fn filter; | ||
| 491 | int ret; | 492 | int ret; |
| 492 | 493 | ||
| 493 | /* Check for valid device index */ | 494 | /* Check for valid device index */ |
| @@ -556,9 +557,11 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) | |||
| 556 | s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start | 557 | s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start |
| 557 | + S3C_PCM_TXFIFO; | 558 | + S3C_PCM_TXFIFO; |
| 558 | 559 | ||
| 560 | filter = NULL; | ||
| 559 | if (pcm_pdata) { | 561 | if (pcm_pdata) { |
| 560 | s3c_pcm_stereo_in[pdev->id].slave = pcm_pdata->dma_capture; | 562 | s3c_pcm_stereo_in[pdev->id].slave = pcm_pdata->dma_capture; |
| 561 | s3c_pcm_stereo_out[pdev->id].slave = pcm_pdata->dma_playback; | 563 | s3c_pcm_stereo_out[pdev->id].slave = pcm_pdata->dma_playback; |
| 564 | filter = pcm_pdata->dma_filter; | ||
| 562 | } | 565 | } |
| 563 | 566 | ||
| 564 | pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; | 567 | pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; |
| @@ -573,7 +576,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) | |||
| 573 | goto err5; | 576 | goto err5; |
| 574 | } | 577 | } |
| 575 | 578 | ||
| 576 | ret = samsung_asoc_dma_platform_register(&pdev->dev); | 579 | ret = samsung_asoc_dma_platform_register(&pdev->dev, filter); |
| 577 | if (ret) { | 580 | if (ret) { |
| 578 | dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); | 581 | dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); |
| 579 | goto err5; | 582 | goto err5; |
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 105317f523f2..204029d12f5b 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <sound/soc.h> | 25 | #include <sound/soc.h> |
| 26 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
| 27 | 27 | ||
| 28 | #include <mach/dma.h> | ||
| 29 | #include <mach/gpio-samsung.h> | 28 | #include <mach/gpio-samsung.h> |
| 30 | #include <plat/gpio-cfg.h> | 29 | #include <plat/gpio-cfg.h> |
| 31 | 30 | ||
| @@ -177,7 +176,8 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev) | |||
| 177 | return ret; | 176 | return ret; |
| 178 | } | 177 | } |
| 179 | 178 | ||
| 180 | ret = samsung_asoc_dma_platform_register(&pdev->dev); | 179 | ret = samsung_asoc_dma_platform_register(&pdev->dev, |
| 180 | pdata->dma_filter); | ||
| 181 | if (ret) | 181 | if (ret) |
| 182 | pr_err("failed to register the DMA: %d\n", ret); | 182 | pr_err("failed to register the DMA: %d\n", ret); |
| 183 | 183 | ||
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 9e6a5bc012e3..b3a475d73ba7 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c | |||
| @@ -23,7 +23,6 @@ | |||
| 23 | #include <sound/soc.h> | 23 | #include <sound/soc.h> |
| 24 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
| 25 | 25 | ||
| 26 | #include <mach/dma.h> | ||
| 27 | #include <mach/gpio-samsung.h> | 26 | #include <mach/gpio-samsung.h> |
| 28 | #include <plat/gpio-cfg.h> | 27 | #include <plat/gpio-cfg.h> |
| 29 | #include "regs-iis.h" | 28 | #include "regs-iis.h" |
| @@ -482,7 +481,8 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) | |||
| 482 | return ret; | 481 | return ret; |
| 483 | } | 482 | } |
| 484 | 483 | ||
| 485 | ret = samsung_asoc_dma_platform_register(&pdev->dev); | 484 | ret = samsung_asoc_dma_platform_register(&pdev->dev, |
| 485 | pdata->dma_filter); | ||
| 486 | if (ret) | 486 | if (ret) |
| 487 | pr_err("failed to register the dma: %d\n", ret); | 487 | pr_err("failed to register the dma: %d\n", ret); |
| 488 | 488 | ||
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 9dd7ee6d03ff..4687f521197c 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c | |||
| @@ -361,6 +361,7 @@ static int spdif_probe(struct platform_device *pdev) | |||
| 361 | struct s3c_audio_pdata *spdif_pdata; | 361 | struct s3c_audio_pdata *spdif_pdata; |
| 362 | struct resource *mem_res; | 362 | struct resource *mem_res; |
| 363 | struct samsung_spdif_info *spdif; | 363 | struct samsung_spdif_info *spdif; |
| 364 | dma_filter_fn filter; | ||
| 364 | int ret; | 365 | int ret; |
| 365 | 366 | ||
| 366 | spdif_pdata = pdev->dev.platform_data; | 367 | spdif_pdata = pdev->dev.platform_data; |
| @@ -426,11 +427,15 @@ static int spdif_probe(struct platform_device *pdev) | |||
| 426 | 427 | ||
| 427 | spdif_stereo_out.dma_size = 2; | 428 | spdif_stereo_out.dma_size = 2; |
| 428 | spdif_stereo_out.dma_addr = mem_res->start + DATA_OUTBUF; | 429 | spdif_stereo_out.dma_addr = mem_res->start + DATA_OUTBUF; |
| 429 | spdif_stereo_out.slave = spdif_pdata ? spdif_pdata->dma_playback : NULL; | 430 | filter = NULL; |
| 431 | if (spdif_pdata) { | ||
| 432 | spdif_stereo_out.slave = spdif_pdata->dma_playback; | ||
| 433 | filter = spdif_pdata->dma_filter; | ||
| 434 | } | ||
| 430 | 435 | ||
| 431 | spdif->dma_playback = &spdif_stereo_out; | 436 | spdif->dma_playback = &spdif_stereo_out; |
| 432 | 437 | ||
| 433 | ret = samsung_asoc_dma_platform_register(&pdev->dev); | 438 | ret = samsung_asoc_dma_platform_register(&pdev->dev, filter); |
| 434 | if (ret) { | 439 | if (ret) { |
| 435 | dev_err(&pdev->dev, "failed to register DMA: %d\n", ret); | 440 | dev_err(&pdev->dev, "failed to register DMA: %d\n", ret); |
| 436 | goto err4; | 441 | goto err4; |
