Commit Graph

34 Commits

Author SHA1 Message Date
Kevin Strasser
de5f644e3c ASoC: Intel: fix possible acpi enumeration panic
A crash can occur on some platforms where adsp is enumerated but codec is not
matched. Define codec_id as a pointer intead of an array so that it gets
initialized to NULL for the terminating element of sst_acpi_bytcr[] and
sst_acpi_chv[].

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-16 11:52:09 +00:00
Wei Yongjun
f5d40b400f ASoC: Intel: fix return value check in sst_acpi_probe()
In case of error, the function platform_device_register_data()
returns ERR_PTR() and never returns NULL. The NULL test in the
return value check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-15 18:21:40 +00:00
kbuild test robot
14cd792312 ASoC: Intel: chv_platform_data can be static
sound/soc/intel/sst/sst_acpi.c:135:26: sparse: symbol 'chv_platform_data' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 23:17:58 +00:00
Mengdong Lin
bd01fdc3aa ASoC: Intel: add support for Cherrytrail and Braswell in SST driver
This patch add ACPI device ID and platform data for two Cherryview-based
platforms, Cherrytrail and Braswell. Also reuse mfld driver ops in sst driver.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 19:23:01 +00:00
kbuild test robot
1a28fc190c ASoC: Intel: byt_rvp_platform_data can be static
sound/soc/intel/sst/sst_acpi.c:124:26: sparse: symbol 'byt_rvp_platform_data' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 15:59:57 +00:00
Vinod Koul
92a6e2a227 ASoC: Intel: cleanup runtime_pm initialization
For ACPI we missed to pm_runtime_enable() call which is required to tell PM
core that runtime on this device is enabled now. Since this is common to
both PCI and APCI move it out. Also for ACPI we do not require
pm_runtime_allow() call, so remove that

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19 10:56:46 +00:00
Mengdong Lin
eb826a35d2 ASoC: Intel: add missing ACPI device table
The ACPI device table will generate the driver module alias for
Intel audio devices enumerated from ACPI.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17 10:57:12 +00:00
Vinod Koul
336cfbb05e ASoC: Intel: mrfld- add ACPI module
Add the last ACPI module support which also uses core module like the PCI
part

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14 11:07:43 +00:00
Vinod Koul
9b105fe447 ASoC: Intel: mrfld - remove non static definition
sst_save_shim64() is defined as static in code but header is non static.
Since this is not used other than file where defined remove non static
definition

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 16:08:13 +00:00
Vinod Koul
b0d94acd63 ASoC: Intel: mrfld - add shim save restore
In ACPI platform we need to save few registers of Shim on suspend and
restore them on resume, so add handlers to do this

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 12:36:18 +00:00
Vinod Koul
f533a035e4 ASoC: Intel: mrfld - create separate module for pci part
Now the SST_IPC will support both ACPI and PCI, separate into core module
and PCI module. This also move probe function into PCI module and exports
the required symbols from core module

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 12:36:17 +00:00
Subhransu S. Prusty
7fb73c74ff ASoC: Intel: more probe modularization for sst
Move the PCI BAR and resource initialization to a separate routine

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 16:57:33 +00:00
Subhransu S. Prusty
250454d8fe ASoC: Intel: modularize driver probe and remove
The driver probe which initializes driver and remove which cleans up can be
shared with APCI as well, so move them to common init_context and
cleanup_context routines which can be used by ACPI as well

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 16:57:32 +00:00
Subhransu S. Prusty
2559d9928f ASoC: Intel: move the driver context allocation to routine
This will be used by ACPI code as well, so moving to common routine helps

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 16:57:32 +00:00
Subhransu S. Prusty
54adc0ad64 ASoC: Intel: move the lock and wq initialization to routine
This will be used by ACPI code as well, so moving to common routine helps

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 16:57:27 +00:00
Subhransu S. Prusty
7e73e4d805 ASoC: Intel: move the driver wq init to a routine
This will be used by ACPI code as well, so moving to common routine helps

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 16:57:25 +00:00
Vinod Koul
7adab122a5 ASoC: Intel: sst - add compressed ops handling
This patch add low level IPC handling for compressed stream operations

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 12:52:43 +00:00
Fang, Yang A
5794b7ec62 ASoC: Intel: use correct firmware name
The firmware name was used worngly, so fix it up

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 12:51:14 +00:00
Vinod Koul
6e9b05607f ASoC: Intel: sst: load firmware using async callback
We would like the DSP firmware to be available in driver as soon as possible. So
use the async callback in driver to probe to load the firmware as soon as
usermode is up

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 12:50:38 +00:00
Mythri P K
45f31bfcda ASoC: Intel: use lock when changing SST state.
SST state change should be done under sst_lock

Signed-off-by: Mythri P K <mythri.p.k@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 12:47:44 +00:00
Vinod Koul
d62f2a08b9 ASoC: Intel: sst: add runtime power management handling
This patch adds the runtime pm handlers, the driver already has code for
get/put for runtime pm and only these handlers being missing.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 12:46:45 +00:00
Subhransu S. Prusty
1a6db0bd26 ASoC: Intel: mrfld: Fix runtime pm calls in sst_open_pcm_stream
It's already done in open/close.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 12:29:50 +00:00
Subhransu S. Prusty
39581031a9 ASoC: Intel: mrfld: Replace pci_id with unique device id
In order to support both ACPI and PCI devices we need to use a genric device
id in driver, so change all pci_id instances to device_id

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-27 18:02:38 +00:00
Vinod Koul
33c1256f1c ASoC: intel: explain why block not found isn't error always
The IPC blocking can be error when we don't find block or a short message,
explain that by adding a comment about this scenario

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21 23:58:59 +01:00
Vinod Koul
dee2ce696e ASoC: intel: fix the kernldoc comment
copypaste error on function sst_get_num_channel caused the comment to be
wrong, so fix it here

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21 23:58:59 +01:00
Vinod Koul
790b4075b3 ASoC: intel: log an error on double free
the stream context should be freed only once on stream cleanup. If we ever
hit a chance that stream context is getting double freed, though not an
cause of panic as memory allocator can deal with this, we should still log
this to help in finding issues and debugging

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21 23:58:59 +01:00
Vinod Koul
b3baaa47cc ASoC: intel: use __iowrite32_copy for 32 bit copy
The driver was using own method to do 32bit copy, turns out we have a kernel
API so use that instead

Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21 23:58:59 +01:00
Vinod Koul
0fbc7d7320 ASoC: Intel: sst: Add makefile and kconfig changes
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:35 +01:00
Vinod Koul
60dc8dbacb ASoC: Intel: sst: Add some helper functions
This patch adds helper functions like wait, creating ipc headers, shim
wrappers.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:34 +01:00
Vinod Koul
3d9ff34622 ASoC: Intel: sst: add stream operations
This patch adds pcm and compressed stream control operations.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:34 +01:00
Vinod Koul
ea12aa4acd ASoC: Intel: sst: Add IPC handling
This patch adds APIs to post IPCs and process reply messages.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:34 +01:00
Vinod Koul
cc547054d3 ASoC: Intel: sst - add pcm ops handling
This patch adds low level IPC handling for pcm stream operations

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:34 +01:00
Vinod Koul
9012c9544e ASoC: Intel: mrfld - Add DSP load and management
This patch contains all dsp controlling functions like firmware download,
setting/resetting dsp cores, etc.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:34 +01:00
Vinod Koul
163d2089d2 ASoC: Intel: mrfld - add the dsp sst driver
The SST driver is the missing piece in our driver stack not upstreamed,
so push it now :) This driver currently supports PCI device on Merrifield.
Future updates will bring support for ACPI device as well as future update
to PCI devices as well

In subsequent patches support is added for DSP loading using memcpy,
pcm operations and compressed ops.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:34 +01:00