aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-02-05 15:18:39 -0500
committerMark Brown <broonie@kernel.org>2015-02-05 15:18:39 -0500
commit8a5b69017e1923ce467c6e0c6231e0882f4afe56 (patch)
treecbb60d38560b6880ecea9bfc3460ecd80220d8fb /sound/soc
parente948262ad01fc683d893abe10d1161231b2a6457 (diff)
parent5c2b06369dafd796ebb4f17dab543d3da500245e (diff)
Merge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
Conflicts: sound/soc/intel/sst/sst_acpi.c
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/intel/Kconfig4
-rw-r--r--sound/soc/intel/bytcr_dpcm_rt5640.c2
-rw-r--r--sound/soc/intel/sst-firmware.c15
-rw-r--r--sound/soc/intel/sst-haswell-ipc.c34
4 files changed, 45 insertions, 10 deletions
diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index 12093fdfd678..ee03dbdda235 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -89,7 +89,7 @@ config SND_SOC_INTEL_BROADWELL_MACH
89 89
90config SND_SOC_INTEL_BYTCR_RT5640_MACH 90config 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
102config SND_SOC_INTEL_CHT_BSW_RT5672_MACH 102config 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 9277f2baefb1..59308629043e 100644
--- a/sound/soc/intel/bytcr_dpcm_rt5640.c
+++ b/sound/soc/intel/bytcr_dpcm_rt5640.c
@@ -226,4 +226,4 @@ module_platform_driver(snd_byt_mc_driver);
226MODULE_DESCRIPTION("ASoC Intel(R) Baytrail CR Machine driver"); 226MODULE_DESCRIPTION("ASoC Intel(R) Baytrail CR Machine driver");
227MODULE_AUTHOR("Subhransu S. Prusty <subhransu.s.prusty@intel.com>"); 227MODULE_AUTHOR("Subhransu S. Prusty <subhransu.s.prusty@intel.com>");
228MODULE_LICENSE("GPL v2"); 228MODULE_LICENSE("GPL v2");
229MODULE_ALIAS("platform:bytrt5640-audio"); 229MODULE_ALIAS("platform:bytt100_rt5640");
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index dcc145f81ec9..5f71ef607a57 100644
--- a/sound/soc/intel/sst-firmware.c
+++ b/sound/soc/intel/sst-firmware.c
@@ -707,6 +707,7 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba
707 struct list_head *block_list) 707 struct list_head *block_list)
708{ 708{
709 struct sst_mem_block *block, *tmp; 709 struct sst_mem_block *block, *tmp;
710 struct sst_block_allocator ba_tmp = *ba;
710 u32 end = ba->offset + ba->size, block_end; 711 u32 end = ba->offset + ba->size, block_end;
711 int err; 712 int err;
712 713
@@ -731,9 +732,9 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba
731 if (ba->offset >= block->offset && ba->offset < block_end) { 732 if (ba->offset >= block->offset && ba->offset < block_end) {
732 733
733 /* align ba to block boundary */ 734 /* align ba to block boundary */
734 ba->size -= block_end - ba->offset; 735 ba_tmp.size -= block_end - ba->offset;
735 ba->offset = block_end; 736 ba_tmp.offset = block_end;
736 err = block_alloc_contiguous(dsp, ba, block_list); 737 err = block_alloc_contiguous(dsp, &ba_tmp, block_list);
737 if (err < 0) 738 if (err < 0)
738 return -ENOMEM; 739 return -ENOMEM;
739 740
@@ -764,10 +765,14 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba
764 /* does block span more than 1 section */ 765 /* does block span more than 1 section */
765 if (ba->offset >= block->offset && ba->offset < block_end) { 766 if (ba->offset >= block->offset && ba->offset < block_end) {
766 767
768 /* add block */
769 list_move(&block->list, &dsp->used_block_list);
770 list_add(&block->module_list, block_list);
767 /* align ba to block boundary */ 771 /* align ba to block boundary */
768 ba->offset = block->offset; 772 ba_tmp.size -= block_end - ba->offset;
773 ba_tmp.offset = block_end;
769 774
770 err = block_alloc_contiguous(dsp, ba, block_list); 775 err = block_alloc_contiguous(dsp, &ba_tmp, block_list);
771 if (err < 0) 776 if (err < 0)
772 return -ENOMEM; 777 return -ENOMEM;
773 778
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c
index ccd9669bc307..a282179a3064 100644
--- a/sound/soc/intel/sst-haswell-ipc.c
+++ b/sound/soc/intel/sst-haswell-ipc.c
@@ -652,11 +652,11 @@ static void hsw_notification_work(struct work_struct *work)
652 } 652 }
653 653
654 /* tell DSP that notification has been handled */ 654 /* tell DSP that notification has been handled */
655 sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IPCD, 655 sst_dsp_shim_update_bits(hsw->dsp, SST_IPCD,
656 SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE); 656 SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE);
657 657
658 /* unmask busy interrupt */ 658 /* unmask busy interrupt */
659 sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); 659 sst_dsp_shim_update_bits(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0);
660} 660}
661 661
662static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header) 662static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header)
@@ -1230,6 +1230,11 @@ int sst_hsw_stream_free(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
1230 struct sst_dsp *sst = hsw->dsp; 1230 struct sst_dsp *sst = hsw->dsp;
1231 unsigned long flags; 1231 unsigned long flags;
1232 1232
1233 if (!stream) {
1234 dev_warn(hsw->dev, "warning: stream is NULL, no stream to free, ignore it.\n");
1235 return 0;
1236 }
1237
1233 /* dont free DSP streams that are not commited */ 1238 /* dont free DSP streams that are not commited */
1234 if (!stream->commited) 1239 if (!stream->commited)
1235 goto out; 1240 goto out;
@@ -1417,6 +1422,16 @@ int sst_hsw_stream_commit(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
1417 u32 header; 1422 u32 header;
1418 int ret; 1423 int ret;
1419 1424
1425 if (!stream) {
1426 dev_warn(hsw->dev, "warning: stream is NULL, no stream to commit, ignore it.\n");
1427 return 0;
1428 }
1429
1430 if (stream->commited) {
1431 dev_warn(hsw->dev, "warning: stream is already committed, ignore it.\n");
1432 return 0;
1433 }
1434
1420 trace_ipc_request("stream alloc", stream->host_id); 1435 trace_ipc_request("stream alloc", stream->host_id);
1421 1436
1422 header = IPC_GLB_TYPE(IPC_GLB_ALLOCATE_STREAM); 1437 header = IPC_GLB_TYPE(IPC_GLB_ALLOCATE_STREAM);
@@ -1521,6 +1536,11 @@ int sst_hsw_stream_pause(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
1521{ 1536{
1522 int ret; 1537 int ret;
1523 1538
1539 if (!stream) {
1540 dev_warn(hsw->dev, "warning: stream is NULL, no stream to pause, ignore it.\n");
1541 return 0;
1542 }
1543
1524 trace_ipc_request("stream pause", stream->reply.stream_hw_id); 1544 trace_ipc_request("stream pause", stream->reply.stream_hw_id);
1525 1545
1526 ret = sst_hsw_stream_operations(hsw, IPC_STR_PAUSE, 1546 ret = sst_hsw_stream_operations(hsw, IPC_STR_PAUSE,
@@ -1537,6 +1557,11 @@ int sst_hsw_stream_resume(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
1537{ 1557{
1538 int ret; 1558 int ret;
1539 1559
1560 if (!stream) {
1561 dev_warn(hsw->dev, "warning: stream is NULL, no stream to resume, ignore it.\n");
1562 return 0;
1563 }
1564
1540 trace_ipc_request("stream resume", stream->reply.stream_hw_id); 1565 trace_ipc_request("stream resume", stream->reply.stream_hw_id);
1541 1566
1542 ret = sst_hsw_stream_operations(hsw, IPC_STR_RESUME, 1567 ret = sst_hsw_stream_operations(hsw, IPC_STR_RESUME,
@@ -1552,6 +1577,11 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
1552{ 1577{
1553 int ret, tries = 10; 1578 int ret, tries = 10;
1554 1579
1580 if (!stream) {
1581 dev_warn(hsw->dev, "warning: stream is NULL, no stream to reset, ignore it.\n");
1582 return 0;
1583 }
1584
1555 /* dont reset streams that are not commited */ 1585 /* dont reset streams that are not commited */
1556 if (!stream->commited) 1586 if (!stream->commited)
1557 return 0; 1587 return 0;