Commit graph

248 commits

Author SHA1 Message Date
Jeeja KP 4557c305d4 ASoC: Intel: Skylake: Add support for active suspend
Some of the usecases can be marked as 'ignore_suspend' by
machine. For these on suspend we should keep audio controller
ON by saving the state and not suspending the device

For this we need to maintain a counter for these streams and be
active on suspend when such a stream is opened.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:58:07 +00:00
Omair M Abdullah 7d9f29119d ASoC: Intel: Skylake: read params from DSP if module is on
If a module is ON then we should read the module parameters from
DSP rather than driver cached values

Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:57:51 +00:00
Mousami Jana cce1c7f383 ASoC: Intel: Skylake: add LARGE_CONFIG_GET IPC support
For messages which have larger payload than mailbox data, we need
to split the payload using set of messages containing mailbox
size as payload.

For sending such payload we already support LARGE_CONFIG_SET
IPCs and now to query such payload add LARGE_CONFIG_GET IPC

Signed-off-by: Mousami Jana <mousami.janax@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:57:51 +00:00
Omair M Abdullah c99b80564c ASoC: Intel: Skylake: update mailbox uplink window offset and size
SKL actual mailbox size is 0x10000 and initial values were 0x800,
so update these accordingly

Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:57:51 +00:00
Jeeja KP 4ced182763 ASoC: Intel: Skylake: Fix module init data correctly
Module initialization parameter data can be set by
     - INIT_INSTANCE IPC by using the default value
     - SET_PARAMS immediately after INIT_INSTANCE
     - SET_PARAMS data from kcontrol values set
this patch add param type to identify the parameters
has to be sent to DSP.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:57:51 +00:00
Dharageswari R fd18110f14 ASoC: Intel: Skylake: Add support for Mic Select module
Mic select is a DSP module which is used to select one or many
inputs to form an output. This is useful to select data
selectively from PDM input and hence the name. This module is of
generic module type.

This patch adds support to add and configure Mic select module in
firmware topology.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:57:51 +00:00
Jeeja KP b18c458de1 ASoC: Intel: Skylake: Add memory pages to widget data.
A module can require extra memory for processing, like audio
algorithms. The memory for these modules needs to be represented
in base module configuration and passed to DSP on init, so add
the memory pages as a field in widget data

Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:57:51 +00:00
Dharageswari R 6c5768b3aa ASoC: Intel: Skylake: Add support for Loadable modules
A module is loaded when the path consisting the module is opened.
The module binary(ies) is loaded from file system and cached in
kernel memory for future use. This is downloaded to DSP using DMA
and invoking Load module IPCs

This patch adds support for load/unload module IPCs, DMAing
modules and manging the modules

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08 17:57:51 +00:00
Jeeja KP 140adfba52 ASoC: Intel: Skylake: Add tlv byte kcontrols
This adds tlv bytes topology control creation and control load to
initialize kcontrol data. And this also adds the callbacks for
the these tlv byte kcontrols

Signed-off-by: Mythri P K <mythri.p.k@intel.com>
Signed-off-by: Divya Prakash <divya1.prakash@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01 22:17:00 +00:00
Jeeja KP abb740033b ASoC: Intel: Skylake: Add support to configure module params
This adds support to configure module parameter during module
initialization or after module init using set module param
required by the DSP firmware sequence.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01 22:17:00 +00:00
Jeeja KP 399b210bef ASoC: Intel: Skylake: Add helper routine to handle Algo parameter
Some DSP modules has user configurable parameters, which are
required by some modules at module initialization.

To configure the module algorithm parameter during initialization
we add helpers here

Signed-off-by: Divya Prakash <divya1.prakash@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01 22:17:00 +00:00
Jeeja KP 9939a9c331 ASoC: Intel: Skylake: Add helper routines to handle module params
Some DSP modules have user configurable parameters. These
parameters are required by modules in the following scenario
	-  during initialization
	-  after initialization using set parameter

This patch adds helper routine to set module parameters using
large config set IPC message and removes params to be passed as
init module routine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01 22:17:00 +00:00
Jeeja KP 8f35bf3f71 ASoC: Intel: Skylake: Update DMIC DAIs and capabilities
On Skylake we can support upton 4DMICs on the PDM port, so update
the PCM capabilities accordingly

Also add a new DAI for DMIC pin which can be used for getting raw
DMIC data

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01 22:17:00 +00:00
Vinod Koul 65976878ca ASoC: Intel: Skylake: Move up pipe mem free
The MCPS is freed first thing in pmd events but non memory. So if
we face error during teardown we leak this mem, so move the code
up

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-25 17:55:46 +00:00
Jeeja KP 2434caf098 ASoC: Intel: Skylake: Poll CLDMA RUN bit when set
This patch adds polling of CLDMA stream run bit when set
to confirm the HW reports the same value.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-25 17:55:41 +00:00
Jeeja KP 06b23d9379 ASoC: Intel: Skylake: Update pcm capability
This patch adds pcm capability to support 16/8k rates and 32 bit formats

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-25 17:55:41 +00:00
Jeeja KP 98256f83d2 ASoC: Intel: Skylake: Fix to update bit depth for module params
Module hw param fixup will change the valid bit depth based
on the fixup flag. If valid bit depth changes, need to set
the bit depth according to valid bit depth. This patch
fixes this issue of updating bit depth correctly.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-25 17:55:41 +00:00
Jeeja KP 7e3a17d311 ASoC: Intel: Skylake: Reconfigure HDA stream register in prepare/resume
PCM prepare callbacks can be called multiple times. During S3
the stream registers will be reset when Controller is reset.
When stream is resumed, these stream registers needs to reconfigured.

This patch removes the check in prepare callback() if stream already
prepared, which will allow reconfiguring of stream registers and also
decouple stream when stream is resumed to route audio via DSP.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-25 17:55:41 +00:00
Sudip Mukherjee 87b5ed8ecb ASoC: Intel: Skylake: fix memory leak
We have requested the firmware but missed releasing it.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-23 11:29:12 +00:00
Vinod Koul cd470fae88 ASoC: Intel: Skylake: Fix test of a field address
Skylake driver uses snd_dma_buffer for data and buffer, these are variables
and not pointer so do not test field addresses.

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>
2015-11-22 12:48:11 +00:00
Jeeja KP 0ed95d769c ASoC: Intel: Skylake: Fix null ptr dereferenced in skl_tplg_bind_sinks
This patch fixes the below warning form smatch and makes the
skl_tplg_bind_sinks take the next sink as argument which is true
when the current sink is valid

sound/soc/intel/skylake/skl-topology.c:453 skl_tplg_bind_sinks()
	error: we previously assumed 'sink' could be null (see line 452)

sound/soc/intel/skylake/skl-topology.c
   451
   452		if (!sink)
                     ^^^^
New check.  Reversed?

   453			return skl_tplg_bind_sinks(sink, skl, src_mconfig);
                                                   ^^^^ This is
dereferenced inside the function.

   454
   455		return 0;

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:46:36 +00:00
Jeeja KP e797af53b8 ASoC: Intel: Skylake: Fix CLDMA buffer wrap case
When downloading the firmware/module, if the ring buffer boundary
is reached, we need to wrap to the zeroth position. On next copy
we need to copy till end of buffer and the remaining buffer needs
to be copied from zeroth position.

In this case copy was not handled correctly when wrap condition
is reached which caused invalid data to be copied resulting in
invalid hash failure.

This patch fixes the issue by handling copy at the boundary
condition correctly.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:46:36 +00:00
Jeeja KP 53afce2c57 ASoC: Intel: Skylake: Reset the DSP when set D3 fails
Sometimes firmware D3 IPC fails causing firmware to be in invalid
state. To recover we need to reset the DSP and then shut it down,
so don't return on error and continue resetting to recover.

On D0, firmware will be redownloaded and DSP will be back in
clean state

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:46:36 +00:00
Jeeja KP ae395937ab ASoC: Intel: Skylake: Fix cleanup of dma buffer
During firmware download, dma buffers are allocated in prepare
and never freed on clean up. This patch frees the allocated dma
buffer in cldma controller clean up.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:46:36 +00:00
Jeeja KP e03fc82d7c ASoC: Intel: Skylake: Remove redundant init in resume
Since we call _skl_resume which also initializes the chip we no
need to call these explicitly, so remove the duplication

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:46:36 +00:00
Jeeja KP a71e269728 ASoC: Intel: Skylake: Don't enable WAKEENABLE on suspend
For HDA codecs WAKEENABLE bit is to programmed if codec event
change has to wake the system when suspended.

In skylake I2S systems which are currently supported we have
only HDMI codec, which doesn't use this capability to detect a
HDMI connect/ disconnect event. HDMI HDA codec uses display
interface to detect connect/disconnect event.

This patch removes the WAKEBIT enabling during device D0/D3 as
this seems to cause spurious wakes on the system

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:46:36 +00:00
Jeeja KP 28823f1538 ASoC: Intel: Skylake: remove pm_runtime_get/put calls
The ASoC core already does pm_runtime_get/put in the core before
opening/closing the devices.
So we do not need to do this is driver, hence remove

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:46:36 +00:00
Fang, Yang A 02cc23555d ASoC: Intel: Skylake: add adi + nau8825 machine driver entry
This patch adds skl_nau8825_ssn4567_i2s machine driver into
machine table

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:34:23 +00:00
Jeeja KP c80fd4da68 ASoC: Intel: Skylake: Add support for SSP1 BE cpu dai
Adds new BE cpu dai to support SSP1 port.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:34:23 +00:00
Vinod Koul aecf6fd878 ASoC: Intel: Skylake: Use the fw name from ACPI mach table
The firmware name is hard coded which doesnt allow to load
different platforms for various platforms so get this name from
available machine table and pass it to dsp context for loading

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Vinod Koul cc18c5fdcd ASoC: Intel: Skylake: Fix skl machine driver creation
Now that we have common match code in place, update the SKL
driver to use the common match routines for driver entry creation
for UEFI BIOS systems

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Vinod Koul 7ae3cb1559 ASoC: Intel: Skylake: Fix resource cleanup on teardown
MCPS free was being done from PGA context which will free up MCPS
for only last modules in a pipe and not the rest causing MCPS
leak and eventual audio loss due to no "free" MCPS.

This needs to be freed for every module while cleaning up the
modules, so move the check to
skl_tplg_mixer_dapm_post_pmd_event()

Signed-off-by: Mohan Krishna Velaga <mohan.krishnax.velaga@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Vinod Koul c7b2a44410 ASoC: Intel: Skylake: Fix substream dereference before check
Smatch warns that we dereferenced substream before check, so fix
this by initializing ebus after the check

sound/soc/intel/skylake/skl-pcm.c:802 skl_get_position()
        warn: variable dereferenced before check 'substream->runtime'

Reported by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Subhransu S. Prusty b4fe965f4e ASoC: Intel: Skylake: Fix to cleanup if skl_sst_dsp_init fails
This patch fixes the below warning reported by Dan by invoking
skl_sst_dsp_cleanup() in cleanup path on error and not bailing out

	sound/soc/intel/skylake/skl-sst.c:270 skl_sst_dsp_init()
	info: ignoring unreachable code.

Reported-by: Dan Carpenter <dan.carpenter@oracle.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>
2015-11-16 10:08:09 +00:00
Vincent Stehlé aaec7e9f78 ASoC: Intel: Skylake: fix typo in sizeof
The size of the pointer to a data structure to send is erroneously
passed to sst_ipc_tx_message_wait() as its tx_bytes argument. It should
be given the size of the pointed skl_ipc_dxstate_info structure instead.

Coincidentally, both the pointer and the structure have the same size of
8 bytes on a 64 bit machine, which "masks" the issue. Compiling for 32
bit reveals the issue more clearly.

Fix the typo for correctness, and to make the code robust to future
evolutions of the skl_ipc_dxstate_info structure size.

This fixes the following coccicheck error:

  sound/soc/intel/skylake/skl-sst-ipc.c:641:8-14: ERROR: application of sizeof to pointer

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Cc: Jeeja KP <jeeja.kp@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: trivial@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 61722f4472 ASoC: Intel: Skylake: Fix PM behaviour
The driver runtime behaviour is fine but in suspend, we missed
setting the DSP to suspend and also missed resuming DSP on
resume.

Fix this by having common SKL suspend and resume routines which
power up/down links, suspend/resume DSP and other common
routines, and call these routines from both runtime as well as
system PM handlers

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 3e81f1a3c7 ASoC: Intel: Skylake: Fix to remove channel_map calculation
Widget FW topology private data already has the information
on the channel map, ch_cfg and interleaving. This patch removes
the calculation of channel_map in driver and reads the value
directly from widget private data.

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-11-16 10:08:09 +00:00
Jeeja KP 16882d24b3 ASoC: Intel: Skylake: Ignore rate check for DMIC link
DMIC NHLT entry is sample rate agnostic, so ignore the rate
checks for DMIC type

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Hardik T Shah 65aecfa884 ASoC: Intel: Skylake: Add support for module GUIDs
The DSP FW specifies loadable modules using GUIDs so add support to
specify the GUIDs from topology

Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-11-16 10:08:09 +00:00
Hardik T Shah 04afbbbb1c ASoC: Intel: Skylake: Update the topology interface structure
This patch updates the topology interface structure alignment and
also updates the Sample interleaving defines

Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-11-16 10:08:09 +00:00
Hardik T Shah 4cd9899f0d ASoC: Intel: Skylake: Add multiple pin formats
The module pin formats are considered homogeneous, but some
modules can have different pcm formats on different pins, like
reference signal for a module.

This patch add support for configuration of each pin of module
and allows us to specify if pins and homogeneous or heterogeneous

Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-11-16 10:08:09 +00:00
Jeeja KP 9a03cb49c1 ASoC: Intel: Skylake: Fix to remove be copier widget power check
ASoC core already checks if BE is active. If BE is active,
hw_params callback is ignored.
This patch removes the redundant check in driver for copier
widget power check in update be hw_params.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP d1730c3dd9 ASoC: Intel: Skylake: Fix DSP pipe underrun/overrun issue
While rigourous testing of SKL drivers, we noticed underuns and
overuns and on debug realized that we need to change driver
handling of FE pipe startup and shutdown

We need to start DMA and then run pipe together and not split
these up. Similarly while stopping we should stop pipe and then
DMA in a sequence.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 8724ff1752 ASoC: Intel: Skylake: Add support for virtual dsp widgets
In SKL topology routes, some paths can be connected by a widget
which are not a DSP FW widget and virtual with respect to
firmware. In these case when module has to bind, then the
virtual DSP modules needs to skipped till a actual DSP module is
found which connects the pipelines.

So we need to walk the graph and find a widget which is real in
nature. This patch adds that support and splits
skl_tplg_pga_dapm_pre_pmu_event() fn with parsing code to
skl_tplg_bind_sinks() fn and call that recursively as well as
while parsing

The patch moves code a bit while splitting so diffstat doesn't
tell real picture

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP ce1b5551a0 ASoC: Intel: Skylake: use module_pin info for unbind
in_pin and out_pin list for a module has the information about
the module that are bound together. So we can directly look at
pin information of module for binding and unbind.

As a result the preinitialized dapm_path_last we had is removed
and code and memory optimzed.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 83b50246d3 ASoC: Intel: Skylake: Fix bit depth when querying the NHLT blob
Bps calculation is not correct as this needs to be based on valid
bit depth.  16 bit fmt bit depth is 16 bit and for 24 and 32 bit
as it is container size This patch fixes the bps.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 4f7457089d ASoC: Intel: Skylake: Fix support for multiple pins in a module
For supporting multiple dynamic pins, module state check is
incorrect. In case of unbind, module state need to be changed to
uninit if all pins in the module is is unbind state.
To handle module state correctly add pin state and use pin
state check to set module state correctly.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP b30c275e44 ASoC: Intel: Skylake: Fix to ignore blob check if link type is HDA
If link type is HDA, NHLT blob is null, as NHLT defines non HDA
links only.  So we should ignore blob query for HDA links.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 029890c67a ASoC: Intel: Skylake: Fix to ignore codec_mask check in probe
We have both I2S and hda codec support in the driver. codec_mask
check is relevant only for hda codec and some boards may have
only I2S Codec, so removed probe error in case no hda codec is
found and update the log to info as it may not be error.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 6654f39eb4 ASoC: Intel: Skylake: Fix to add 32 bit in update FE params
In case of 32 bit, the FE update params returns error as it falls
thru to default case. This patch adds 32 bit depth handling in
update FE params.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 4bd073f93f ASoC: Intel: Skylake: Fix not to ignore return value in be hw_params
Return value from skl_tplg_be_update_params() is ignored. But if the
blob is null then the hw_params needs to return error.
This patch fixes the issue by not ignoring return value from
skl_tplg_be_update_params().

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP a28f51db28 ASoC: Intel: Skylake: Fix to correct check for non DSP widget
To get the FE copier module, the check to ignore non DSP widgets
was wrong. This path corrects the check to ignore non DSP widget.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:08:09 +00:00
Jeeja KP 6abca1d71b ASoC: Intel: Skylake: Add support to topology for module static pin
Some module pin connection are static and defined by the topology.
This patch adds support for static pin definitions in topology widget
private data

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Jeeja KP bfa764accd ASoC: Intel: Skylake: Fix to set Non gateway copier cfg
If copier instance is connected to a DMA gateway then driver
needs to configure the gateway configuration otherwise set
it to invalid.
This patch sets the non gateway copier node value to invalid.

Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Jeeja KP 2ac454ffe6 ASoC: Intel: Skylake: Fix to check return value of dsp init
If DSP initialization fails, ipc to disable notification
will cause NULL ptr exception as ipc is not initialized.
This patch returns error if dsp init fails before
sending disable notification ipc.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Jeeja KP 4e10996ba8 ASoC: Intel: Skylake: Add support to disable module notifications
Each FW modules can report underrun/overrun notification from
all modules. This patch disables underrun/overrun notification after
firmware is loaded.
This will be supportted for debug mode only thru debugfs

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Jeeja KP d7b188131c ASoC: Intel: Skylake: Update for ssp node index in copier cfg
DSP firmware has interface change for SSP node index structure.
New FW interface removes the dual_mono field and adds 4 bits for
TDM slot group index. This patch updates the ssp dma to align with
the DSP firmware structure.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Subhransu S. Prusty 4d8adccb22 ASoC: Intel: Skylake: Fix to fill all sink/source pipe params
Currently params only for first copier widget identified in the
source/sink path is queried from NHLT. In the dapm route the
playback/capture widget may be connected to more than one copier
widget. This patch adds return check to return only for any error
case.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Subhransu S. Prusty f0900eb213 ASoC: Intel: Skylake: Fix to use correct macros for the path iteration
In case of playback, for the BE dai source path should be iterated to find
the pipe params. With sink path iterated, this resulted in a loop and kernel
panic with page request failure.
Similar are the cases for Capture and FE dais. Using correct macros to fix
the panic

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>
2015-10-24 01:31:34 +09:00
Jeeja KP bc03281a5c ASoC: Intel: Skylake: Remove BE copier blob memcpy
The BE copier private data allowed endpoint configuration blobs, now these
are queried from BIOS, we don't need to copy the blob, but only capability.

Removing the blob from private data will not allocate memory for module
specific config in which case memcpy will fail. Fix is to assign the ptr
queried from the NHLT table for the endpoint configuration.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Jeeja KP 9270b7b926 ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()
pm_runtime_get_sync() will return a negative value in case of
error and can return postive value for success.  The return check
for pm_runtime_get_sync() must be less than 0, so fix it

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-24 01:31:34 +09:00
Dan Williams ba40a854ea ASoC: Intel: switch from ioremap_cache to memremap
In preparation for deprecating ioremap_cache() convert its usage in
skl-nhlt to memremap.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 14:23:27 +01:00
Jeeja KP 01bb84b500 ASoC: Intel: Skylake: power down all link in suspend
This ensures that the link is not requesting any clock and the
PLL can turn off. The link is powered when controller is brought
out of reset.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-09 11:19:01 +01:00
Jeeja KP 84c9e2836a ASoC: Intel: Skylake: Correct the runtime handler behaviour
On runtime pm resume, we need to download the firmware, also on
suspend we need to ensure all the interrupts from controller and
DSP are disabled.

Also since we download the firmware on resume, we don't need to do
so on init, so remove that bit

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-09 11:19:00 +01:00
Jeeja KP def656fe22 ASoC: Intel: Skylake: Verify the status bit before handling interrupt
Like we have in legacy mode HDA driver, we need to check the
status bit and handle interrupt only when it is not zero or all
bits set.  We typically see the status as all 1's when controller
resumes from suspend, So add the check here as well and don't
handle for these cases.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-09 11:18:59 +01:00
Jeeja KP 6ea8ba33e6 ASoC: Intel: Skylake: Check CPA bit in DSP core power down
Skylake driver will set the SPA bit to 0 to turn off the DSP core.
Driver will poll the Current Power Active (CPA) bit to match the
Set Power Active (SPA) bit value. When CPA bit matches the value
of SPA bit, the achieved power state has reached.

In case of DSP power down, register that was polled is SPA
instead of CPA. This patch corrects the register to be polled
in case of DSP power down.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-09 11:18:58 +01:00
Vinod Koul 3373f71683 ASoC: Intel: Skylake: Modify the log level
dev_info is too noisy for tplg wiget loading, so move it to
debug level

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-08 09:46:22 +01:00
Jeeja KP 87b2bdf022 ASoC: Intel: Skylake: Initialize NHLT table
Load and Initialize Non HDA Link Table in Skylake driver
to get platform configuration.

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-10-07 16:04:17 +01:00
Jeeja KP 2a29b200c6 ASoC: Intel: Skylake: Add DSP support and enable it
If processing pipe capability is supported, add DSP support.
Adds initialization/free/suspend/resume DSP functionality.

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-10-07 16:04:16 +01:00
Jeeja KP b663a8c5c9 ASoC: Intel: Skylake: Initialize and load DSP controls
Initialize and creates DSP controls if processing pipe capability
is supported by HW. Updates the dma_id, hw_params to module param
to be used when DSP module has to be configured.

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-10-07 16:04:15 +01:00
Vinod Koul 3af36706ff ASoC: Intel: Skylake: Add topology core init and handlers
The SKL driver does not code DSP topology in driver. It uses the
newly added ASoC topology core to parse the topology information
(controls, widgets and map) from topology binary.
Each topology element passed private data which contains
information that driver used to identify the module instance
within firmware and send IPCs for that module to DSP firmware
along with parameters.
This patch adds init routine to invoke topology load and callback
for topology creation.

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-10-07 16:04:14 +01:00
Vinod Koul cfb0a87383 ASoC: Intel: Skylake: Add FE and BE hw_params handling
For FE and BE, the PCM parameters come from FE and BE hw_params
values passed. For a FE we convert the FE params to DSP expected
module format and pass to DSP. For a BE we need to find the
gateway settings (i2s/PDM) to be applied. These are queried from
NHLT table and applied.

Further for BE based on direction the settings are applied as
either source or destination parameters.

These helpers here allow the format to be calculated and queried
as per firmware format.

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-10-07 15:30:16 +01:00
Vinod Koul d93f8e550f ASoC: Intel: Skylake: add DSP platform widget event handlers
The Skylake driver topology model tries to model the firmware
rule for pipeline and module creation.
The creation rule is:
 - Create Pipe
 - Add modules to Pipe
 - Connect the modules (bind)
 - Start the pipes

Similarly destroy rule is:
 - Stop the pipe
 - Disconnect it (unbind)
 - Delete the pipe

In driver we use Mixer, as there will always be ONE mixer in a
pipeline to model a pipe. The modules in pipe are modelled as PGA
widgets.  The DAPM sequencing rules (mixer and then PGA) are used
to create the sequence DSP expects as depicted above, and then
widget handlers for PMU and PMD events help in that.

This patch adds widget event handlers for PRE/POST PMU and
PRE/POST PMD event for mixer and pga modules.  These event
handlers invoke pipeline creation, destroy, module creation,
module bind, unbind and pipeline bind unbind

Event handler sequencing is implement to target the DSP FW
sequence expectations to enable path from source to sink pipe for
Playback/Capture.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Hardik T Shah <hardik.t.shah@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>
2015-10-07 15:30:15 +01:00
Jeeja KP f7590d4f15 ASoC: Intel: Skylake: Add module configuration helpers
To configure a module, driver needs to send input and output PCM
params for a module in DSP. The FE PCM params come from hw_params
ie from user, for a BE they also come from hw_params but from
BE-link fixups.
So based on PCM params required driver has to find a converter
module (src/updown/format) and then do the conversion and
calculate PCM params in these pipelines In this patch we add the
helper modules which allow driver to do these calculations.

Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-10-07 15:30:15 +01:00
Jeeja KP e4e2d2f452 ASoC: Intel: Skylake: Add pipe and modules handlers
SKL driver needs to instantiate pipelines and modules in the DSP.
The topology in the DSP is modelled as DAPM graph with a PGA
representing a module instance and mixer representing a pipeline
for a group of modules along with the mixer itself.

Here we start adding building block for handling these. We add
resource checks (memory/compute) for pipelines, find the modules
in a pipeline, init modules in a pipe and lastly bind/unbind
modules in a pipe These will be used by pipe event handlers in
subsequent patches

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-10-07 15:30:15 +01:00
Jeeja KP 5b97c0f18a ASoC: Intel: Skylake: Remove unused CPU dais
We need to create CPU DAI for each endpoint instance. For this we
should have one DMIC DAI, one HDA DAI and SSP DAI.  Thus, DMIC23,
HDA-SPK/AMIC was not required so this patch removes them

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-09-19 09:27:52 -07:00
Jeeja KP c9b1e834bc ASoC: Intel: Skylake: Add pipe management helpers
To manage DSP we need to create processing pipeline and on cleanup destroy
them. So we add create and destroy routines for pipelines The pipelines need
to to be executed so we add pipeline run and stop routines
All these send required IPCs to DSP using IPC routines added earlier

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:03 +01:00
Jeeja KP beb73b266a ASoC: Intel: Skylake: Add DSP module init and binding routines
A module needs to be instantiated and then connected with other modules. On
cleanup we need to disconnect the module.
This is achieved by helpers module init, bind and unbind which are added
here

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:02 +01:00
Hardik T Shah a0ffe48bb5 ASoC: Intel: Skylake: Add helpers for SRC and converter modules
SRC and converter modules are required to do frequency and channel
conversion in DSP. Both take base module configuration and additional SRC
and converter parameters. The helpers here are added to calculate the values
for these modules

Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:02 +01:00
Jeeja KP 23db472bba ASoC: Intel: Skylake: Add helpers for DSP module configuration
This adds helper functions to calculate parameters required for base module
format and copier module. A generic module is modelled by base module.
Copier module is responsible for getting/sending data to FE (host DMAs) and
BE (link HDA DMA, SSP, PDM)
This also ads module pin management helpers which help in finding pins to
use or freeing them up

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:02 +01:00
Jeeja KP aba3dd5ace ASoC: Intel: Skylake: Use acpi header for NHLT header
Instead of defining own acpi header, use the available acpi
header defined in acpi framework.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:01 +01:00
Jeeja KP 9f2dd0270d ASoC: Intel: Skylake: Fix the NHLT rate size
Sampling rate type needs to be u32 instead of u8, nhlt wav format
description expected u32 for rate, passing u8 will fetch NULL
config in skl_get_ep_blob().

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:01 +01:00
Jeeja KP d255b09555 ASoC: Intel: Skylake: Add dsp and ipc init helpers
This helper function will be used by the Skylake driver for dsp and
ipc initialization if processing pipe capability is supported.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:01 +01:00
Jeeja KP 473eb87adc ASoC: Intel: Skylake: Add NHLT support to get BE config
The Non-HD Audio Endpoint Description table contains the link
configuration information for the DSP. This is specific to Non HDA
links only, like I2s and PDM

Skylake driver will use NHLT table to retrieve the configuration based
on the link type, format, channel and rate. This configuration is
passed to DSP FW

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:00 +01:00
Omair M Abdullah 28f3b6f113 ASoC: Intel: Skylake: Print error code in IPC for SKL
Signed-off-by: Omair M Abdullah <omair.m.abdullah@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>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty a750ba5f5a ASoC: Intel: Skylake: Add SKL DSP initialization
This adds the dsp and ipc initialization for the Skylake platform.
It also requests firmware and uses code loader dma to load it.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty 6cb0033380 ASoC: Intel: Skylake: Process code loader DMA interrupt
The code loader DMA interrupt is received by main interrupt handler which
dispatches it to cldma routines

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>
2015-07-16 21:46:50 +01:00
Vinod Koul 3e40a78461 ASoC: Intel: Skylake: Add code loader DMA APIs
This patch adds the last piece of code loader DMA APIs by adding the code
loader DMA APIs for the driver to use

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Vinod Koul 914426c865 ASoC: Intel: Skylake: add code loader DMA operations
This patch starts adding code loader DMA handling internal operations for
setting up bdle, controller, spb, cleanup routines and buffer filling

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Vinod Koul e30903877f ASoC: Intel: Skylake: Add code loader DMA registers
Skylake has a DMA controller for loading DSP code and modules to memory.
Add the register defines for this DMA

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty b662680252 ASoC: Intel: Skylake: Add dsp loader ops
The ops is initialized during the dsp registration and used for the
allocating dma buffers.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty e973e31a02 ASoC: Intel: Add DSP init and boot up functionality for SKL
This patch adds code to enable, disable and boot DSP core.
Also provide some helpers to reset and power up/down the core.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 18:33:23 +01:00
Subhransu S. Prusty b81fd26359 ASoC: Intel: Add Skylake IPC library
This adds base SKL IPC library which uses common SST IPC lib.
Here we add definition for IPC types, sending and receiving IPC messages
from aDSP, handling interrupt, sending different types of messages etc

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 18:33:23 +01:00
Jeeja KP 0505700104 ASoC: Intel: Add support for decoupled mode in skl driver
Decoupled mode is where audio link is broken to frontend HDA and backend
(hda/i2s/dmic/hdmi) links. This patch adds support for decoupled mode and
then adds dais, dai ops for be/fe cpu dais and interrupt handler change to
support decoupled mode

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09 11:54:26 +01:00
Jeeja KP eb965e3686 ASoC: Intel: Add makefile support for SKL driver
This adds makefile and Kconfig to enable Skylake HD audio PCM driver

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-07-09 11:54:26 +01:00
Jeeja KP d8c2dab838 ASoC: Intel: Add Skylake HDA audio driver
This patch follows up by adding the HDA controller operations. This
code is mostly derived from Intel HDA PCI driver without legacy bits

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-07-09 11:54:26 +01:00
Jeeja KP a40e693c7f ASoC: Intel: Add Skylake HDA platform driver
This patch starts to add the Skylake HDA platform driver by defining
SoC CPU dais, DMA driver ops and implements ALSA operations

Signed-off-by: Jeeja KP <jeeja.kp@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>
2015-07-09 11:54:26 +01:00
Subhransu S. Prusty 3582f9ae07 ASoC: Intel: Define SKL ADSP IPC and general purpose registers
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Kp, Jeeja <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 19:46:48 +01:00