diff options
| -rw-r--r-- | sound/soc/dwc/designware_i2s.c | 86 | ||||
| -rw-r--r-- | sound/soc/intel/Kconfig | 4 | ||||
| -rw-r--r-- | sound/soc/intel/bytcr_dpcm_rt5640.c | 1 | ||||
| -rw-r--r-- | sound/soc/intel/cht_bsw_rt5672.c | 1 | ||||
| -rw-r--r-- | sound/soc/intel/sst-firmware.c | 1 | ||||
| -rw-r--r-- | sound/soc/intel/sst/sst_acpi.c | 5 | ||||
| -rw-r--r-- | sound/soc/omap/omap-hdmi-audio.c | 1 |
7 files changed, 46 insertions, 53 deletions
diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c index 8d18bbda661b..06d3a34ac90a 100644 --- a/sound/soc/dwc/designware_i2s.c +++ b/sound/soc/dwc/designware_i2s.c | |||
| @@ -335,13 +335,47 @@ static int dw_i2s_resume(struct snd_soc_dai *dai) | |||
| 335 | #define dw_i2s_resume NULL | 335 | #define dw_i2s_resume NULL |
| 336 | #endif | 336 | #endif |
| 337 | 337 | ||
| 338 | static void dw_configure_dai_by_pd(struct dw_i2s_dev *dev, | ||
| 339 | struct snd_soc_dai_driver *dw_i2s_dai, | ||
| 340 | struct resource *res, | ||
| 341 | const struct i2s_platform_data *pdata) | ||
| 342 | { | ||
| 343 | /* Set DMA slaves info */ | ||
| 344 | |||
| 345 | dev->play_dma_data.data = pdata->play_dma_data; | ||
| 346 | dev->capture_dma_data.data = pdata->capture_dma_data; | ||
| 347 | dev->play_dma_data.addr = res->start + I2S_TXDMA; | ||
| 348 | dev->capture_dma_data.addr = res->start + I2S_RXDMA; | ||
| 349 | dev->play_dma_data.max_burst = 16; | ||
| 350 | dev->capture_dma_data.max_burst = 16; | ||
| 351 | dev->play_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | ||
| 352 | dev->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | ||
| 353 | dev->play_dma_data.filter = pdata->filter; | ||
| 354 | dev->capture_dma_data.filter = pdata->filter; | ||
| 355 | |||
| 356 | if (pdata->cap & DWC_I2S_PLAY) { | ||
| 357 | dev_dbg(dev->dev, " designware: play supported\n"); | ||
| 358 | dw_i2s_dai->playback.channels_min = MIN_CHANNEL_NUM; | ||
| 359 | dw_i2s_dai->playback.channels_max = pdata->channel; | ||
| 360 | dw_i2s_dai->playback.formats = pdata->snd_fmts; | ||
| 361 | dw_i2s_dai->playback.rates = pdata->snd_rates; | ||
| 362 | } | ||
| 363 | |||
| 364 | if (pdata->cap & DWC_I2S_RECORD) { | ||
| 365 | dev_dbg(dev->dev, "designware: record supported\n"); | ||
| 366 | dw_i2s_dai->capture.channels_min = MIN_CHANNEL_NUM; | ||
| 367 | dw_i2s_dai->capture.channels_max = pdata->channel; | ||
| 368 | dw_i2s_dai->capture.formats = pdata->snd_fmts; | ||
| 369 | dw_i2s_dai->capture.rates = pdata->snd_rates; | ||
| 370 | } | ||
| 371 | } | ||
| 372 | |||
| 338 | static int dw_i2s_probe(struct platform_device *pdev) | 373 | static int dw_i2s_probe(struct platform_device *pdev) |
| 339 | { | 374 | { |
| 340 | const struct i2s_platform_data *pdata = pdev->dev.platform_data; | 375 | const struct i2s_platform_data *pdata = pdev->dev.platform_data; |
| 341 | struct dw_i2s_dev *dev; | 376 | struct dw_i2s_dev *dev; |
| 342 | struct resource *res; | 377 | struct resource *res; |
| 343 | int ret; | 378 | int ret; |
| 344 | unsigned int cap; | ||
| 345 | struct snd_soc_dai_driver *dw_i2s_dai; | 379 | struct snd_soc_dai_driver *dw_i2s_dai; |
| 346 | 380 | ||
| 347 | if (!pdata) { | 381 | if (!pdata) { |
| @@ -356,44 +390,23 @@ static int dw_i2s_probe(struct platform_device *pdev) | |||
| 356 | } | 390 | } |
| 357 | 391 | ||
| 358 | dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL); | 392 | dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL); |
| 359 | if (!dw_i2s_dai) { | 393 | if (!dw_i2s_dai) |
| 360 | dev_err(&pdev->dev, "mem allocation failed for dai driver\n"); | ||
| 361 | return -ENOMEM; | 394 | return -ENOMEM; |
| 362 | } | ||
| 363 | 395 | ||
| 364 | dw_i2s_dai->ops = &dw_i2s_dai_ops; | 396 | dw_i2s_dai->ops = &dw_i2s_dai_ops; |
| 365 | dw_i2s_dai->suspend = dw_i2s_suspend; | 397 | dw_i2s_dai->suspend = dw_i2s_suspend; |
| 366 | dw_i2s_dai->resume = dw_i2s_resume; | 398 | dw_i2s_dai->resume = dw_i2s_resume; |
| 367 | 399 | ||
| 368 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 400 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 369 | if (!res) { | ||
| 370 | dev_err(&pdev->dev, "no i2s resource defined\n"); | ||
| 371 | return -ENODEV; | ||
| 372 | } | ||
| 373 | |||
| 374 | dev->i2s_base = devm_ioremap_resource(&pdev->dev, res); | 401 | dev->i2s_base = devm_ioremap_resource(&pdev->dev, res); |
| 375 | if (IS_ERR(dev->i2s_base)) { | 402 | if (IS_ERR(dev->i2s_base)) |
| 376 | dev_err(&pdev->dev, "ioremap fail for i2s_region\n"); | ||
| 377 | return PTR_ERR(dev->i2s_base); | 403 | return PTR_ERR(dev->i2s_base); |
| 378 | } | ||
| 379 | |||
| 380 | cap = pdata->cap; | ||
| 381 | dev->capability = cap; | ||
| 382 | dev->i2s_clk_cfg = pdata->i2s_clk_cfg; | ||
| 383 | |||
| 384 | /* Set DMA slaves info */ | ||
| 385 | 404 | ||
| 386 | dev->play_dma_data.data = pdata->play_dma_data; | 405 | dev->dev = &pdev->dev; |
| 387 | dev->capture_dma_data.data = pdata->capture_dma_data; | 406 | dw_configure_dai_by_pd(dev, dw_i2s_dai, res, pdata); |
| 388 | dev->play_dma_data.addr = res->start + I2S_TXDMA; | ||
| 389 | dev->capture_dma_data.addr = res->start + I2S_RXDMA; | ||
| 390 | dev->play_dma_data.max_burst = 16; | ||
| 391 | dev->capture_dma_data.max_burst = 16; | ||
| 392 | dev->play_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | ||
| 393 | dev->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | ||
| 394 | dev->play_dma_data.filter = pdata->filter; | ||
| 395 | dev->capture_dma_data.filter = pdata->filter; | ||
| 396 | 407 | ||
| 408 | dev->capability = pdata->cap; | ||
| 409 | dev->i2s_clk_cfg = pdata->i2s_clk_cfg; | ||
| 397 | dev->clk = clk_get(&pdev->dev, NULL); | 410 | dev->clk = clk_get(&pdev->dev, NULL); |
| 398 | if (IS_ERR(dev->clk)) | 411 | if (IS_ERR(dev->clk)) |
| 399 | return PTR_ERR(dev->clk); | 412 | return PTR_ERR(dev->clk); |
| @@ -402,23 +415,6 @@ static int dw_i2s_probe(struct platform_device *pdev) | |||
| 402 | if (ret < 0) | 415 | if (ret < 0) |
| 403 | goto err_clk_put; | 416 | goto err_clk_put; |
| 404 | 417 | ||
| 405 | if (cap & DWC_I2S_PLAY) { | ||
| 406 | dev_dbg(&pdev->dev, " designware: play supported\n"); | ||
| 407 | dw_i2s_dai->playback.channels_min = MIN_CHANNEL_NUM; | ||
| 408 | dw_i2s_dai->playback.channels_max = pdata->channel; | ||
| 409 | dw_i2s_dai->playback.formats = pdata->snd_fmts; | ||
| 410 | dw_i2s_dai->playback.rates = pdata->snd_rates; | ||
| 411 | } | ||
| 412 | |||
| 413 | if (cap & DWC_I2S_RECORD) { | ||
| 414 | dev_dbg(&pdev->dev, "designware: record supported\n"); | ||
| 415 | dw_i2s_dai->capture.channels_min = MIN_CHANNEL_NUM; | ||
| 416 | dw_i2s_dai->capture.channels_max = pdata->channel; | ||
| 417 | dw_i2s_dai->capture.formats = pdata->snd_fmts; | ||
| 418 | dw_i2s_dai->capture.rates = pdata->snd_rates; | ||
| 419 | } | ||
| 420 | |||
| 421 | dev->dev = &pdev->dev; | ||
| 422 | dev_set_drvdata(&pdev->dev, dev); | 418 | dev_set_drvdata(&pdev->dev, dev); |
| 423 | ret = snd_soc_register_component(&pdev->dev, &dw_i2s_component, | 419 | ret = snd_soc_register_component(&pdev->dev, &dw_i2s_component, |
| 424 | dw_i2s_dai, 1); | 420 | dw_i2s_dai, 1); |
diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index f86de1211b96..c0813f546d1f 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig | |||
| @@ -46,7 +46,7 @@ config SND_SOC_INTEL_BAYTRAIL | |||
| 46 | 46 | ||
| 47 | config SND_SOC_INTEL_HASWELL_MACH | 47 | config SND_SOC_INTEL_HASWELL_MACH |
| 48 | tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint" | 48 | tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint" |
| 49 | depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && I2C && \\ | 49 | depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && I2C && \ |
| 50 | I2C_DESIGNWARE_PLATFORM | 50 | I2C_DESIGNWARE_PLATFORM |
| 51 | select SND_SOC_INTEL_HASWELL | 51 | select SND_SOC_INTEL_HASWELL |
| 52 | select SND_SOC_RT5640 | 52 | select SND_SOC_RT5640 |
| @@ -76,7 +76,7 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH | |||
| 76 | 76 | ||
| 77 | config SND_SOC_INTEL_BROADWELL_MACH | 77 | config SND_SOC_INTEL_BROADWELL_MACH |
| 78 | tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint" | 78 | tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint" |
| 79 | depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && DW_DMAC && \\ | 79 | depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && DW_DMAC && \ |
| 80 | I2C_DESIGNWARE_PLATFORM | 80 | I2C_DESIGNWARE_PLATFORM |
| 81 | select SND_SOC_INTEL_HASWELL | 81 | select SND_SOC_INTEL_HASWELL |
| 82 | select SND_COMPRESS_OFFLOAD | 82 | select SND_COMPRESS_OFFLOAD |
diff --git a/sound/soc/intel/bytcr_dpcm_rt5640.c b/sound/soc/intel/bytcr_dpcm_rt5640.c index eef0c56ec32e..59308629043e 100644 --- a/sound/soc/intel/bytcr_dpcm_rt5640.c +++ b/sound/soc/intel/bytcr_dpcm_rt5640.c | |||
| @@ -215,7 +215,6 @@ static int snd_byt_mc_probe(struct platform_device *pdev) | |||
| 215 | 215 | ||
| 216 | static struct platform_driver snd_byt_mc_driver = { | 216 | static struct platform_driver snd_byt_mc_driver = { |
| 217 | .driver = { | 217 | .driver = { |
| 218 | .owner = THIS_MODULE, | ||
| 219 | .name = "bytt100_rt5640", | 218 | .name = "bytt100_rt5640", |
| 220 | .pm = &snd_soc_pm_ops, | 219 | .pm = &snd_soc_pm_ops, |
| 221 | }, | 220 | }, |
diff --git a/sound/soc/intel/cht_bsw_rt5672.c b/sound/soc/intel/cht_bsw_rt5672.c index 9b8b561171b7..a406c6104897 100644 --- a/sound/soc/intel/cht_bsw_rt5672.c +++ b/sound/soc/intel/cht_bsw_rt5672.c | |||
| @@ -270,7 +270,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) | |||
| 270 | 270 | ||
| 271 | static struct platform_driver snd_cht_mc_driver = { | 271 | static struct platform_driver snd_cht_mc_driver = { |
| 272 | .driver = { | 272 | .driver = { |
| 273 | .owner = THIS_MODULE, | ||
| 274 | .name = "cht-bsw-rt5672", | 273 | .name = "cht-bsw-rt5672", |
| 275 | .pm = &snd_soc_pm_ops, | 274 | .pm = &snd_soc_pm_ops, |
| 276 | }, | 275 | }, |
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index ef2e8b5766a1..50d6925893ff 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c | |||
| @@ -497,6 +497,7 @@ struct sst_module *sst_module_new(struct sst_fw *sst_fw, | |||
| 497 | sst_module->sst_fw = sst_fw; | 497 | sst_module->sst_fw = sst_fw; |
| 498 | sst_module->scratch_size = template->scratch_size; | 498 | sst_module->scratch_size = template->scratch_size; |
| 499 | sst_module->persistent_size = template->persistent_size; | 499 | sst_module->persistent_size = template->persistent_size; |
| 500 | sst_module->entry = template->entry; | ||
| 500 | 501 | ||
| 501 | INIT_LIST_HEAD(&sst_module->block_list); | 502 | INIT_LIST_HEAD(&sst_module->block_list); |
| 502 | INIT_LIST_HEAD(&sst_module->runtime_list); | 503 | INIT_LIST_HEAD(&sst_module->runtime_list); |
diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c index 2ac72eb5e75d..c3fbcdec6a15 100644 --- a/sound/soc/intel/sst/sst_acpi.c +++ b/sound/soc/intel/sst/sst_acpi.c | |||
| @@ -245,7 +245,7 @@ static struct sst_machines *sst_acpi_find_machine( | |||
| 245 | return NULL; | 245 | return NULL; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | int sst_acpi_probe(struct platform_device *pdev) | 248 | static int sst_acpi_probe(struct platform_device *pdev) |
| 249 | { | 249 | { |
| 250 | struct device *dev = &pdev->dev; | 250 | struct device *dev = &pdev->dev; |
| 251 | int ret = 0; | 251 | int ret = 0; |
| @@ -332,7 +332,7 @@ do_sst_cleanup: | |||
| 332 | * This function is called by OS when a device is unloaded | 332 | * This function is called by OS when a device is unloaded |
| 333 | * This frees the interrupt etc | 333 | * This frees the interrupt etc |
| 334 | */ | 334 | */ |
| 335 | int sst_acpi_remove(struct platform_device *pdev) | 335 | static int sst_acpi_remove(struct platform_device *pdev) |
| 336 | { | 336 | { |
| 337 | struct intel_sst_drv *ctx; | 337 | struct intel_sst_drv *ctx; |
| 338 | 338 | ||
| @@ -366,7 +366,6 @@ MODULE_DEVICE_TABLE(acpi, sst_acpi_ids); | |||
| 366 | static struct platform_driver sst_acpi_driver = { | 366 | static struct platform_driver sst_acpi_driver = { |
| 367 | .driver = { | 367 | .driver = { |
| 368 | .name = "intel_sst_acpi", | 368 | .name = "intel_sst_acpi", |
| 369 | .owner = THIS_MODULE, | ||
| 370 | .acpi_match_table = ACPI_PTR(sst_acpi_ids), | 369 | .acpi_match_table = ACPI_PTR(sst_acpi_ids), |
| 371 | .pm = &intel_sst_pm, | 370 | .pm = &intel_sst_pm, |
| 372 | }, | 371 | }, |
diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c index 3f9ac7dbdc80..ccfb41c22e53 100644 --- a/sound/soc/omap/omap-hdmi-audio.c +++ b/sound/soc/omap/omap-hdmi-audio.c | |||
| @@ -393,7 +393,6 @@ static int omap_hdmi_audio_remove(struct platform_device *pdev) | |||
| 393 | static struct platform_driver hdmi_audio_driver = { | 393 | static struct platform_driver hdmi_audio_driver = { |
| 394 | .driver = { | 394 | .driver = { |
| 395 | .name = DRV_NAME, | 395 | .name = DRV_NAME, |
| 396 | .owner = THIS_MODULE, | ||
| 397 | }, | 396 | }, |
| 398 | .probe = omap_hdmi_audio_probe, | 397 | .probe = omap_hdmi_audio_probe, |
| 399 | .remove = omap_hdmi_audio_remove, | 398 | .remove = omap_hdmi_audio_remove, |
