Commit bf851392 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/intel' and...

Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/intel' and 'asoc/topic/omap' into asoc-next
...@@ -335,13 +335,47 @@ static int dw_i2s_resume(struct snd_soc_dai *dai) ...@@ -335,13 +335,47 @@ static int dw_i2s_resume(struct snd_soc_dai *dai)
#define dw_i2s_resume NULL #define dw_i2s_resume NULL
#endif #endif
static void dw_configure_dai_by_pd(struct dw_i2s_dev *dev,
struct snd_soc_dai_driver *dw_i2s_dai,
struct resource *res,
const struct i2s_platform_data *pdata)
{
/* Set DMA slaves info */
dev->play_dma_data.data = pdata->play_dma_data;
dev->capture_dma_data.data = pdata->capture_dma_data;
dev->play_dma_data.addr = res->start + I2S_TXDMA;
dev->capture_dma_data.addr = res->start + I2S_RXDMA;
dev->play_dma_data.max_burst = 16;
dev->capture_dma_data.max_burst = 16;
dev->play_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
dev->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
dev->play_dma_data.filter = pdata->filter;
dev->capture_dma_data.filter = pdata->filter;
if (pdata->cap & DWC_I2S_PLAY) {
dev_dbg(dev->dev, " designware: play supported\n");
dw_i2s_dai->playback.channels_min = MIN_CHANNEL_NUM;
dw_i2s_dai->playback.channels_max = pdata->channel;
dw_i2s_dai->playback.formats = pdata->snd_fmts;
dw_i2s_dai->playback.rates = pdata->snd_rates;
}
if (pdata->cap & DWC_I2S_RECORD) {
dev_dbg(dev->dev, "designware: record supported\n");
dw_i2s_dai->capture.channels_min = MIN_CHANNEL_NUM;
dw_i2s_dai->capture.channels_max = pdata->channel;
dw_i2s_dai->capture.formats = pdata->snd_fmts;
dw_i2s_dai->capture.rates = pdata->snd_rates;
}
}
static int dw_i2s_probe(struct platform_device *pdev) static int dw_i2s_probe(struct platform_device *pdev)
{ {
const struct i2s_platform_data *pdata = pdev->dev.platform_data; const struct i2s_platform_data *pdata = pdev->dev.platform_data;
struct dw_i2s_dev *dev; struct dw_i2s_dev *dev;
struct resource *res; struct resource *res;
int ret; int ret;
unsigned int cap;
struct snd_soc_dai_driver *dw_i2s_dai; struct snd_soc_dai_driver *dw_i2s_dai;
if (!pdata) { if (!pdata) {
...@@ -356,44 +390,23 @@ static int dw_i2s_probe(struct platform_device *pdev) ...@@ -356,44 +390,23 @@ static int dw_i2s_probe(struct platform_device *pdev)
} }
dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL); dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL);
if (!dw_i2s_dai) { if (!dw_i2s_dai)
dev_err(&pdev->dev, "mem allocation failed for dai driver\n");
return -ENOMEM; return -ENOMEM;
}
dw_i2s_dai->ops = &dw_i2s_dai_ops; dw_i2s_dai->ops = &dw_i2s_dai_ops;
dw_i2s_dai->suspend = dw_i2s_suspend; dw_i2s_dai->suspend = dw_i2s_suspend;
dw_i2s_dai->resume = dw_i2s_resume; dw_i2s_dai->resume = dw_i2s_resume;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "no i2s resource defined\n");
return -ENODEV;
}
dev->i2s_base = devm_ioremap_resource(&pdev->dev, res); dev->i2s_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(dev->i2s_base)) { if (IS_ERR(dev->i2s_base))
dev_err(&pdev->dev, "ioremap fail for i2s_region\n");
return PTR_ERR(dev->i2s_base); return PTR_ERR(dev->i2s_base);
}
cap = pdata->cap;
dev->capability = cap;
dev->i2s_clk_cfg = pdata->i2s_clk_cfg;
/* Set DMA slaves info */
dev->play_dma_data.data = pdata->play_dma_data; dev->dev = &pdev->dev;
dev->capture_dma_data.data = pdata->capture_dma_data; dw_configure_dai_by_pd(dev, dw_i2s_dai, res, pdata);
dev->play_dma_data.addr = res->start + I2S_TXDMA;
dev->capture_dma_data.addr = res->start + I2S_RXDMA;
dev->play_dma_data.max_burst = 16;
dev->capture_dma_data.max_burst = 16;
dev->play_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
dev->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
dev->play_dma_data.filter = pdata->filter;
dev->capture_dma_data.filter = pdata->filter;
dev->capability = pdata->cap;
dev->i2s_clk_cfg = pdata->i2s_clk_cfg;
dev->clk = clk_get(&pdev->dev, NULL); dev->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(dev->clk)) if (IS_ERR(dev->clk))
return PTR_ERR(dev->clk); return PTR_ERR(dev->clk);
...@@ -402,23 +415,6 @@ static int dw_i2s_probe(struct platform_device *pdev) ...@@ -402,23 +415,6 @@ static int dw_i2s_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto err_clk_put; goto err_clk_put;
if (cap & DWC_I2S_PLAY) {
dev_dbg(&pdev->dev, " designware: play supported\n");
dw_i2s_dai->playback.channels_min = MIN_CHANNEL_NUM;
dw_i2s_dai->playback.channels_max = pdata->channel;
dw_i2s_dai->playback.formats = pdata->snd_fmts;
dw_i2s_dai->playback.rates = pdata->snd_rates;
}
if (cap & DWC_I2S_RECORD) {
dev_dbg(&pdev->dev, "designware: record supported\n");
dw_i2s_dai->capture.channels_min = MIN_CHANNEL_NUM;
dw_i2s_dai->capture.channels_max = pdata->channel;
dw_i2s_dai->capture.formats = pdata->snd_fmts;
dw_i2s_dai->capture.rates = pdata->snd_rates;
}
dev->dev = &pdev->dev;
dev_set_drvdata(&pdev->dev, dev); dev_set_drvdata(&pdev->dev, dev);
ret = snd_soc_register_component(&pdev->dev, &dw_i2s_component, ret = snd_soc_register_component(&pdev->dev, &dw_i2s_component,
dw_i2s_dai, 1); dw_i2s_dai, 1);
......
...@@ -46,7 +46,7 @@ config SND_SOC_INTEL_BAYTRAIL ...@@ -46,7 +46,7 @@ config SND_SOC_INTEL_BAYTRAIL
config SND_SOC_INTEL_HASWELL_MACH config SND_SOC_INTEL_HASWELL_MACH
tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint" tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && I2C && \\ depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && I2C && \
I2C_DESIGNWARE_PLATFORM I2C_DESIGNWARE_PLATFORM
select SND_SOC_INTEL_HASWELL select SND_SOC_INTEL_HASWELL
select SND_SOC_RT5640 select SND_SOC_RT5640
...@@ -76,7 +76,7 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH ...@@ -76,7 +76,7 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
config SND_SOC_INTEL_BROADWELL_MACH config SND_SOC_INTEL_BROADWELL_MACH
tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint" tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && DW_DMAC && \\ depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS && DW_DMAC && \
I2C_DESIGNWARE_PLATFORM I2C_DESIGNWARE_PLATFORM
select SND_SOC_INTEL_HASWELL select SND_SOC_INTEL_HASWELL
select SND_COMPRESS_OFFLOAD select SND_COMPRESS_OFFLOAD
......
...@@ -215,7 +215,6 @@ static int snd_byt_mc_probe(struct platform_device *pdev) ...@@ -215,7 +215,6 @@ static int snd_byt_mc_probe(struct platform_device *pdev)
static struct platform_driver snd_byt_mc_driver = { static struct platform_driver snd_byt_mc_driver = {
.driver = { .driver = {
.owner = THIS_MODULE,
.name = "bytt100_rt5640", .name = "bytt100_rt5640",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
......
...@@ -270,7 +270,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) ...@@ -270,7 +270,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
static struct platform_driver snd_cht_mc_driver = { static struct platform_driver snd_cht_mc_driver = {
.driver = { .driver = {
.owner = THIS_MODULE,
.name = "cht-bsw-rt5672", .name = "cht-bsw-rt5672",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
......
...@@ -497,6 +497,7 @@ struct sst_module *sst_module_new(struct sst_fw *sst_fw, ...@@ -497,6 +497,7 @@ struct sst_module *sst_module_new(struct sst_fw *sst_fw,
sst_module->sst_fw = sst_fw; sst_module->sst_fw = sst_fw;
sst_module->scratch_size = template->scratch_size; sst_module->scratch_size = template->scratch_size;
sst_module->persistent_size = template->persistent_size; sst_module->persistent_size = template->persistent_size;
sst_module->entry = template->entry;
INIT_LIST_HEAD(&sst_module->block_list); INIT_LIST_HEAD(&sst_module->block_list);
INIT_LIST_HEAD(&sst_module->runtime_list); INIT_LIST_HEAD(&sst_module->runtime_list);
......
...@@ -245,7 +245,7 @@ static struct sst_machines *sst_acpi_find_machine( ...@@ -245,7 +245,7 @@ static struct sst_machines *sst_acpi_find_machine(
return NULL; return NULL;
} }
int sst_acpi_probe(struct platform_device *pdev) static int sst_acpi_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
int ret = 0; int ret = 0;
...@@ -332,7 +332,7 @@ int sst_acpi_probe(struct platform_device *pdev) ...@@ -332,7 +332,7 @@ int sst_acpi_probe(struct platform_device *pdev)
* This function is called by OS when a device is unloaded * This function is called by OS when a device is unloaded
* This frees the interrupt etc * This frees the interrupt etc
*/ */
int sst_acpi_remove(struct platform_device *pdev) static int sst_acpi_remove(struct platform_device *pdev)
{ {
struct intel_sst_drv *ctx; struct intel_sst_drv *ctx;
...@@ -366,7 +366,6 @@ MODULE_DEVICE_TABLE(acpi, sst_acpi_ids); ...@@ -366,7 +366,6 @@ MODULE_DEVICE_TABLE(acpi, sst_acpi_ids);
static struct platform_driver sst_acpi_driver = { static struct platform_driver sst_acpi_driver = {
.driver = { .driver = {
.name = "intel_sst_acpi", .name = "intel_sst_acpi",
.owner = THIS_MODULE,
.acpi_match_table = ACPI_PTR(sst_acpi_ids), .acpi_match_table = ACPI_PTR(sst_acpi_ids),
.pm = &intel_sst_pm, .pm = &intel_sst_pm,
}, },
......
...@@ -393,7 +393,6 @@ static int omap_hdmi_audio_remove(struct platform_device *pdev) ...@@ -393,7 +393,6 @@ static int omap_hdmi_audio_remove(struct platform_device *pdev)
static struct platform_driver hdmi_audio_driver = { static struct platform_driver hdmi_audio_driver = {
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.owner = THIS_MODULE,
}, },
.probe = omap_hdmi_audio_probe, .probe = omap_hdmi_audio_probe,
.remove = omap_hdmi_audio_remove, .remove = omap_hdmi_audio_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment