diff options
Diffstat (limited to 'sound/soc/intel')
| -rw-r--r-- | sound/soc/intel/Kconfig | 4 | ||||
| -rw-r--r-- | sound/soc/intel/bytcr_dpcm_rt5640.c | 2 | ||||
| -rw-r--r-- | sound/soc/intel/sst-firmware.c | 15 | ||||
| -rw-r--r-- | sound/soc/intel/sst-haswell-ipc.c | 30 | ||||
| -rw-r--r-- | sound/soc/intel/sst/sst_acpi.c | 2 |
5 files changed, 44 insertions, 9 deletions
diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index e989ecf046c9..f86de1211b96 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig | |||
| @@ -89,7 +89,7 @@ config SND_SOC_INTEL_BROADWELL_MACH | |||
| 89 | 89 | ||
| 90 | config SND_SOC_INTEL_BYTCR_RT5640_MACH | 90 | config SND_SOC_INTEL_BYTCR_RT5640_MACH |
| 91 | tristate "ASoC Audio DSP Support for MID BYT Platform" | 91 | tristate "ASoC Audio DSP Support for MID BYT Platform" |
| 92 | depends on X86 | 92 | depends on X86 && I2C |
| 93 | select SND_SOC_RT5640 | 93 | select SND_SOC_RT5640 |
| 94 | select SND_SST_MFLD_PLATFORM | 94 | select SND_SST_MFLD_PLATFORM |
| 95 | select SND_SST_IPC_ACPI | 95 | select SND_SST_IPC_ACPI |
| @@ -101,7 +101,7 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH | |||
| 101 | 101 | ||
| 102 | config SND_SOC_INTEL_CHT_BSW_RT5672_MACH | 102 | config SND_SOC_INTEL_CHT_BSW_RT5672_MACH |
| 103 | tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec" | 103 | tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec" |
| 104 | depends on X86_INTEL_LPSS | 104 | depends on X86_INTEL_LPSS && I2C |
| 105 | select SND_SOC_RT5670 | 105 | select SND_SOC_RT5670 |
| 106 | select SND_SST_MFLD_PLATFORM | 106 | select SND_SST_MFLD_PLATFORM |
| 107 | select SND_SST_IPC_ACPI | 107 | select SND_SST_IPC_ACPI |
diff --git a/sound/soc/intel/bytcr_dpcm_rt5640.c b/sound/soc/intel/bytcr_dpcm_rt5640.c index f5d0fc1ab10c..eef0c56ec32e 100644 --- a/sound/soc/intel/bytcr_dpcm_rt5640.c +++ b/sound/soc/intel/bytcr_dpcm_rt5640.c | |||
| @@ -227,4 +227,4 @@ module_platform_driver(snd_byt_mc_driver); | |||
| 227 | MODULE_DESCRIPTION("ASoC Intel(R) Baytrail CR Machine driver"); | 227 | MODULE_DESCRIPTION("ASoC Intel(R) Baytrail CR Machine driver"); |
| 228 | MODULE_AUTHOR("Subhransu S. Prusty <subhransu.s.prusty@intel.com>"); | 228 | MODULE_AUTHOR("Subhransu S. Prusty <subhransu.s.prusty@intel.com>"); |
| 229 | MODULE_LICENSE("GPL v2"); | 229 | MODULE_LICENSE("GPL v2"); |
| 230 | MODULE_ALIAS("platform:bytrt5640-audio"); | 230 | MODULE_ALIAS("platform:bytt100_rt5640"); |
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index 4a5bde9c686b..b3f9489794a6 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c | |||
| @@ -706,6 +706,7 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba | |||
| 706 | struct list_head *block_list) | 706 | struct list_head *block_list) |
| 707 | { | 707 | { |
| 708 | struct sst_mem_block *block, *tmp; | 708 | struct sst_mem_block *block, *tmp; |
| 709 | struct sst_block_allocator ba_tmp = *ba; | ||
| 709 | u32 end = ba->offset + ba->size, block_end; | 710 | u32 end = ba->offset + ba->size, block_end; |
| 710 | int err; | 711 | int err; |
| 711 | 712 | ||
| @@ -730,9 +731,9 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba | |||
| 730 | if (ba->offset >= block->offset && ba->offset < block_end) { | 731 | if (ba->offset >= block->offset && ba->offset < block_end) { |
| 731 | 732 | ||
| 732 | /* align ba to block boundary */ | 733 | /* align ba to block boundary */ |
| 733 | ba->size -= block_end - ba->offset; | 734 | ba_tmp.size -= block_end - ba->offset; |
| 734 | ba->offset = block_end; | 735 | ba_tmp.offset = block_end; |
| 735 | err = block_alloc_contiguous(dsp, ba, block_list); | 736 | err = block_alloc_contiguous(dsp, &ba_tmp, block_list); |
| 736 | if (err < 0) | 737 | if (err < 0) |
| 737 | return -ENOMEM; | 738 | return -ENOMEM; |
| 738 | 739 | ||
| @@ -763,10 +764,14 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba | |||
| 763 | /* does block span more than 1 section */ | 764 | /* does block span more than 1 section */ |
| 764 | if (ba->offset >= block->offset && ba->offset < block_end) { | 765 | if (ba->offset >= block->offset && ba->offset < block_end) { |
| 765 | 766 | ||
| 767 | /* add block */ | ||
| 768 | list_move(&block->list, &dsp->used_block_list); | ||
| 769 | list_add(&block->module_list, block_list); | ||
| 766 | /* align ba to block boundary */ | 770 | /* align ba to block boundary */ |
| 767 | ba->offset = block->offset; | 771 | ba_tmp.size -= block_end - ba->offset; |
| 772 | ba_tmp.offset = block_end; | ||
| 768 | 773 | ||
| 769 | err = block_alloc_contiguous(dsp, ba, block_list); | 774 | err = block_alloc_contiguous(dsp, &ba_tmp, block_list); |
| 770 | if (err < 0) | 775 | if (err < 0) |
| 771 | return -ENOMEM; | 776 | return -ENOMEM; |
| 772 | 777 | ||
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index 3f8c48231364..5bf14040c24a 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c | |||
| @@ -1228,6 +1228,11 @@ int sst_hsw_stream_free(struct sst_hsw *hsw, struct sst_hsw_stream *stream) | |||
| 1228 | struct sst_dsp *sst = hsw->dsp; | 1228 | struct sst_dsp *sst = hsw->dsp; |
| 1229 | unsigned long flags; | 1229 | unsigned long flags; |
| 1230 | 1230 | ||
| 1231 | if (!stream) { | ||
| 1232 | dev_warn(hsw->dev, "warning: stream is NULL, no stream to free, ignore it.\n"); | ||
| 1233 | return 0; | ||
| 1234 | } | ||
| 1235 | |||
| 1231 | /* dont free DSP streams that are not commited */ | 1236 | /* dont free DSP streams that are not commited */ |
| 1232 | if (!stream->commited) | 1237 | if (!stream->commited) |
| 1233 | goto out; | 1238 | goto out; |
| @@ -1415,6 +1420,16 @@ int sst_hsw_stream_commit(struct sst_hsw *hsw, struct sst_hsw_stream *stream) | |||
| 1415 | u32 header; | 1420 | u32 header; |
| 1416 | int ret; | 1421 | int ret; |
| 1417 | 1422 | ||
| 1423 | if (!stream) { | ||
| 1424 | dev_warn(hsw->dev, "warning: stream is NULL, no stream to commit, ignore it.\n"); | ||
| 1425 | return 0; | ||
| 1426 | } | ||
| 1427 | |||
| 1428 | if (stream->commited) { | ||
| 1429 | dev_warn(hsw->dev, "warning: stream is already committed, ignore it.\n"); | ||
| 1430 | return 0; | ||
| 1431 | } | ||
| 1432 | |||
| 1418 | trace_ipc_request("stream alloc", stream->host_id); | 1433 | trace_ipc_request("stream alloc", stream->host_id); |
| 1419 | 1434 | ||
| 1420 | header = IPC_GLB_TYPE(IPC_GLB_ALLOCATE_STREAM); | 1435 | header = IPC_GLB_TYPE(IPC_GLB_ALLOCATE_STREAM); |
| @@ -1519,6 +1534,11 @@ int sst_hsw_stream_pause(struct sst_hsw *hsw, struct sst_hsw_stream *stream, | |||
| 1519 | { | 1534 | { |
| 1520 | int ret; | 1535 | int ret; |
| 1521 | 1536 | ||
| 1537 | if (!stream) { | ||
| 1538 | dev_warn(hsw->dev, "warning: stream is NULL, no stream to pause, ignore it.\n"); | ||
| 1539 | return 0; | ||
| 1540 | } | ||
| 1541 | |||
| 1522 | trace_ipc_request("stream pause", stream->reply.stream_hw_id); | 1542 | trace_ipc_request("stream pause", stream->reply.stream_hw_id); |
| 1523 | 1543 | ||
| 1524 | ret = sst_hsw_stream_operations(hsw, IPC_STR_PAUSE, | 1544 | ret = sst_hsw_stream_operations(hsw, IPC_STR_PAUSE, |
| @@ -1535,6 +1555,11 @@ int sst_hsw_stream_resume(struct sst_hsw *hsw, struct sst_hsw_stream *stream, | |||
| 1535 | { | 1555 | { |
| 1536 | int ret; | 1556 | int ret; |
| 1537 | 1557 | ||
| 1558 | if (!stream) { | ||
| 1559 | dev_warn(hsw->dev, "warning: stream is NULL, no stream to resume, ignore it.\n"); | ||
| 1560 | return 0; | ||
| 1561 | } | ||
| 1562 | |||
| 1538 | trace_ipc_request("stream resume", stream->reply.stream_hw_id); | 1563 | trace_ipc_request("stream resume", stream->reply.stream_hw_id); |
| 1539 | 1564 | ||
| 1540 | ret = sst_hsw_stream_operations(hsw, IPC_STR_RESUME, | 1565 | ret = sst_hsw_stream_operations(hsw, IPC_STR_RESUME, |
| @@ -1550,6 +1575,11 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream) | |||
| 1550 | { | 1575 | { |
| 1551 | int ret, tries = 10; | 1576 | int ret, tries = 10; |
| 1552 | 1577 | ||
| 1578 | if (!stream) { | ||
| 1579 | dev_warn(hsw->dev, "warning: stream is NULL, no stream to reset, ignore it.\n"); | ||
| 1580 | return 0; | ||
| 1581 | } | ||
| 1582 | |||
| 1553 | /* dont reset streams that are not commited */ | 1583 | /* dont reset streams that are not commited */ |
| 1554 | if (!stream->commited) | 1584 | if (!stream->commited) |
| 1555 | return 0; | 1585 | return 0; |
diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c index 3abc29e8a928..2ac72eb5e75d 100644 --- a/sound/soc/intel/sst/sst_acpi.c +++ b/sound/soc/intel/sst/sst_acpi.c | |||
| @@ -343,7 +343,7 @@ int sst_acpi_remove(struct platform_device *pdev) | |||
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | static struct sst_machines sst_acpi_bytcr[] = { | 345 | static struct sst_machines sst_acpi_bytcr[] = { |
| 346 | {"10EC5640", "T100", "bytt100_rt5640", NULL, "fw_sst_0f28.bin", | 346 | {"10EC5640", "T100", "bytt100_rt5640", NULL, "intel/fw_sst_0f28.bin", |
| 347 | &byt_rvp_platform_data }, | 347 | &byt_rvp_platform_data }, |
| 348 | {}, | 348 | {}, |
| 349 | }; | 349 | }; |
