Commit Graph

874 Commits

Author SHA1 Message Date
Takashi Sakamoto 5919a38981 ASoC: sst-bxt-rt298: fix obsoleted initializers for array
Sparse reports below warnings.

bxt_rt298.c:275:9: warning: obsolete array initializer, use C99 syntax
bxt_rt298.c:290:9: warning: obsolete array initializer, use C99 syntax
bxt_rt298.c:304:9: warning: obsolete array initializer, use C99 syntax
bxt_rt298.c:317:9: warning: obsolete array initializer, use C99 syntax
bxt_rt298.c:331:9: warning: obsolete array initializer, use C99 syntax
bxt_rt298.c:344:9: warning: obsolete array initializer, use C99 syntax
bxt_rt298.c:357:9: warning: obsolete array initializer, use C99 syntax

There's no need to use obsoleted way. This commit fixes it.

Fixes: 76016322ec (ASoC: Intel: Add Broxton-P machine driver)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-27 09:11:31 -07:00
Takashi Sakamoto 43d443dc25 ASoC: sst-bxt-da7219_max98357a: fix obsoleted initializers for array
Sparse reports below warnings.

bxt_da7219_max98357a.c:250:9: warning: obsolete array initializer, use C99 syntax
bxt_da7219_max98357a.c:275:9: warning: obsolete array initializer, use C99 syntax
bxt_da7219_max98357a.c:290:9: warning: obsolete array initializer, use C99 syntax
bxt_da7219_max98357a.c:304:9: warning: obsolete array initializer, use C99 syntax
bxt_da7219_max98357a.c:317:9: warning: obsolete array initializer, use C99 syntax

There's no need to use obsoleted way. This commit fixes it.

Fixes: 723bad3fef (ASoC: Intel: Add Broxton-P Dialog Maxim machine driver)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-27 09:11:10 -07:00
Yong Zhi 43c02ede76 ASoC: Intel: Add DMIC channel constraint for bxt machine
Add channel and rate constraints for Refcap and dmiccap devices
respectively.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-26 14:05:29 -07:00
John Keeping 2d995e5dc2 ASoC: Intel: boards: Add bdw-rt5677 machine driver
This is used by the Chromebook Pixel 2015.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Dylan Reid <dgreid@chromium.org>
[john@metanate.com:
 - forward-port driver from Chromium OS 3.14 tree to master
 - remove wake on voice function that isn't supported by upstream rt5677
   driver
 - remote owner assignment in platform_driver (Evan McClain)
 - convert to devm_snd_soc_register_card (Evan McClain)
 - add a full copyright header based on module license and Chromium OS
   Git history
]
Signed-off-by: John Keeping <john@metanate.com>
Tested-by: Genki Marshall <genki@genki.is>
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24 20:02:03 +01:00
Colin Ian King dc995069c6 ASoC: Intel: remove status, it is shadowing status of a higher scope
The second declaration of status is shadowing the status of a higher
scope.  This uninitialized status results in garbage being returned
by the !x86_match_cpu(cpu_ids) || !iosf_mbi_available() return exit
path.  Fix this by removing the extraneous second declaration of
status.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24 19:56:28 +01:00
Colin Ian King 1635c69412 ASoC: Intel: atom: add missing \n to end of dev_err/dev_dbg messages
Trival fix, some dev_err/deb_dbg messages are missing a \n, so add it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24 19:43:45 +01:00
Colin Ian King ecd286a9d8 ASoC: Intel: Skylake: add missing \n to end of dev_* messages
Trival fix, some dev_* messages are missing a \n, so add it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24 19:42:42 +01:00
Dharageswari R 55a92ea9cf ASoC: Intel: Skylake: Add table for module id for quick ref
Since modules ids are generated dynamically, we do not know the id
associate with modules in another pipelines. This limits our ability to
tell DSP about neighbouring modules.

So add a table for quick referencing of allocated module ids.

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>
2016-09-24 19:26:26 +01:00
Dharageswari R 5e8f0ee46d ASoC: Intel: Skylake: Update to use instance ids generated
Post bind parameters of KPB module contains the instance id's of
neighbouring modules in the sink path

Now that module instance ids are generated dynamically we need to update
these parameters as well, so use the table created and update the ids

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>
2016-09-24 19:26:25 +01:00
Dharageswari R ef2a352cfb ASoC: Intel: Skylake: Use private instance id of modules in IPC
Use private id's of module instances that are generated during
init_module for the IPC messages to DSP. These id's are freed
up during delete pipeline.

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>
2016-09-24 19:26:25 +01:00
Dharageswari R 700a9a63f9 ASoC: Intel: Skylake: Add module instance id generation APIs
Driver needs to send unique module instance id to firmware while
creating the module and uses this id to communicate with DSP for setting
parameters while audio use case is ongoing.

But, we have upper bound of instance ID. The current IDs are coming from
topology but it doesn't know the upper bound and can't assign unique
id's subject to upper bounds as we can create a big graph but not all
parts running at same time.

This patch adds a 128bit unique id management routines which are built
on top of ffz() for faster implementation. Unfortunately ffz() works on
32bits values, so additional code is added on top of ffz() to create a
128bit unique id.

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>
2016-09-24 19:26:24 +01:00
Samaga Krishna dde53bcc3e ASoC: Intel: Skylake: Add 32bit support
We also support 32bit playback, so add that in DAI capabilities.

Signed-off-by: Samaga Krishna <samaga.krishna@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-14 17:54:20 +01:00
Julia Lawall 115c725488 ASoC: constify snd_pcm_ops structures
Check for snd_pcm_ops structures that are only stored in the ops field of a
snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops.  The corresponding field or parameter is declared const,
so snd_pcm_ops structures that have this property can be declared as const
also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_pcm_ops i@p = { ... };

@ok1@
identifier r.i;
struct snd_soc_platform_driver e;
position p;
@@
e.ops = &i@p;

@ok2@
identifier r.i;
expression e1, e2;
position p;
@@
snd_pcm_set_ops(e1, e2, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct snd_pcm_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-12 20:04:09 +01:00
Takashi Iwai 3d2f4d0c0d Merge branch 'for-linus' into for-next
Back-merge from for-linus just to make the further development easier.
2016-09-11 09:33:12 +02:00
Masahiro Yamada 44cc4a017e ALSA: squash lines for simple wrapper functions
Remove unneeded variables and assignments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-07 20:35:29 +02:00
Pierre-Louis Bossart 94ae3ce189 ASoC: Intel: Atom: fix IOSF_MBI dependency
fix issue reported by 0-Day with randconfig

The commit a68bc0d43e
("ASoC: Intel: Atom: auto-detection of Baytrail-CR")
added a dependency on IOSF_MBI. The code used the IS_ENABLED macro
to check for this dependency but this is not enough in case the SST
driver is built-in. This could be fixed with IS_REACHABLE but
Baytrail-CR would not be detected depending on combinations of options

Add dependency in Kconfig to solve this for good

Reported-by: 0 day tester <fengguang.wu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-03 20:29:44 +01:00
Colin Ian King 0fd67cee29 ASoC: Intel: sst: fix to spelling mistake: "susupend" -> "suspend"
trivial fix to spelling mistake in dev_err message and replace "cant"
with "can't"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-03 12:08:10 +01:00
Dharageswari R b0fab9c6f6 ASoC: Intel: Skylake: Unload all the loadable modules
There could be more than one loadable module in a pipeline.
So unload all modules whilst parsing the list.

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>
2016-09-01 21:27:41 +01:00
Jeeja KP 0b6d76bbd5 ASoC: Intel: Skylake: Fix DMA control config size
DMA control IPC structure wrong config array length,
So corrected the size

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>
2016-09-01 21:27:41 +01:00
Vinod Koul fc94733e56 ASoC: Intel: Skylake: Fix the inverted logic check
While converting to new core hda capability parsing, one instance of
check had inverted logic which was converted wrongly.

Fixes: ec8ae5703d (ALSA: convert users to core bus_parse_capabilities)
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-01 21:27:41 +01:00
Vinod Koul c15ad605be ASoC: Intel: Skylake: check manifest size
For some platforms manifest data may not be defined, thus the private
data would not be defined as well.

So check the size of private data and proceed only if it is valid.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-01 21:27:41 +01:00
Nicolas Iooss 61ab0d403b ASoC: Intel: Atom: add a missing star in a memcpy call
In sst_prepare_and_post_msg(), when a response is received in "block",
the following code gets executed:

    *data = kzalloc(block->size, GFP_KERNEL);
    memcpy(data, (void *) block->data, block->size);

The memcpy() call overwrites the content of the *data pointer instead of
filling the newly-allocated memory (which pointer is hold by *data).
Fix this by merging kzalloc+memcpy into a single kmemdup() call.

Thanks Joe Perches for suggesting using kmemdup()

Fixes: 60dc8dbacb ("ASoC: Intel: sst: Add some helper functions")
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2016-09-01 20:59:10 +01:00
Harsha Priya de34dcfe70 ASoC: Intel: Atom: Fix message handling during drop stream
If a stream is being dropped, the period_elapsed received then after
need not be processed. Processing of the period_elapsed message causes
a time out in drop stream response processing. This patch adds a condition
to skip period_elapsed message processing if the stream is in INIT state.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-01 20:52:13 +01:00
Shreyas NC 541070cec4 ASoC: Intel: Skylake: Parse manifest data
Topology manifest has lib names and lib count info. So,
define tokens to represent module private data and parse
these tokens to fill up the manifest structure in the driver
accordingly.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-23 12:35:45 +01:00
Shreyas NC 33ece7f9c8 ASoC: Intel: Skylake: Remove dfw config and associated structures
The skl_dfw_config structure is no longer required as the module
config is populated by parsing and reading the token values.

So, remove the structure.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-22 18:44:11 +01:00
Shreyas NC 6277e83292 ASoC: Intel: Skylake: Parse vendor tokens to build module data
Skl topology data is preceded by a descriptor for number of data
blocks, the size of the data block and type of data block. The
type of the data block can be either a tuple or a binary blob.

Private data is parsed based on data block type and module data
is filled accordingly.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-22 18:44:11 +01:00
Colin Ian King 84ccd63686 ASoC: Intel: sst: fix ix spelling mistake: "capablities" -> "capabilites"
trivial fix to spelling mistake in dev_err message and reformat code
to avoid being over 80 chars wide per line

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-18 09:56:49 +01:00
Pierre-Louis Bossart 8f98307d02 ASoC: Intel: bytcr_rt5640: quirk for Acer Aspire SWS-012
Baytrail-CR platform needing SSP0-AIF1 routing
Also fix SSP0 while we are at it.

Suggested-by: Andrei Lavreniyuk <andy.lavr@gmail.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-17 10:32:11 +01:00
Pierre-Louis Bossart cac17731df ASoC: Intel: atom: fix 0-day warnings
spurious __initconst copy/pasted from other drivers

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-17 10:32:11 +01:00
Pierre-Louis Bossart d7e60d52ac ASoC: Intel: bytcr_rt5640: log quirks
use dev_info to provide better support for autodetection
and DMI-based quirks, no functional changes

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:15:18 +01:00
Pierre-Louis Bossart ec1c90e777 ASoC: Intel: bytcr_rt5640: Add quirk for Teclast X98 Air 3G tablet
Add DMI-based quirk, routing from SSP0 to AIF1 is not very
usual

Suggested-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:15:13 +01:00
Irina Tirdea 0565e773c2 AsoC: Intel: Add quirks for MinnowBoard MAX
I2S MCLK has been routed to LSE connector on the MinnowBoard
starting with HW version 3. Older versions of the board do
not have MCLK wired.

Add dmi quirk to disable MCLK for MinnowBoard MAX (v2).

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Irina Tirdea df1a2776a7 ASoC: Intel: bytcr_rt5640: add MCLK support
Use platform clocks "pmc_plt_clk_3" when MCLK quirk is defined.
By default always enable the 19.2 MHz PLL.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart 59e8b6520c ASoC: Intel: bytcr_rt5640: add IN3 map
Some platforms have the analog mic connected to IN3,
add route accordingly

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart e214f5e78a ASoC: Intel: bytcr_rt5640: default routing and quirks on Baytrail-CR
Auto routing based on Baytrail/Baytrail-CR detection

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart 038a50e735 ASoC: Intel: bytcr_rt5640: fix dai/clock setup for SSP0 routing
SSP0 uses 16 bits 2ch, SSP2 24 bits 2ch

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart f47088d5ae ASoC: Intel: bytcr_rt56040: additional routing quirks
Allow for all possible combinations of SSP0,SSP2, AIF1, AIF2
combination (only one at a time)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart 89b8907ce2 ASoC: Intel: bytcr_rt5640: add SSP2_AIF2 routing
Add quirk to model routing on Baytrail-CR devices

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart a3f10de184 ASoC: Intel: atom: enable configuration of SSP0
Existing code used SSP2, make selection of SSP id
dependent on port name. This is required when the
machine driver uses non-default settings

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart 3d240d73df ASoC: Intel: Atom: add definitions for modem/SSP0 interface
The Atom DPCM driver only allowed for the SSP2 interface, add
definitions for modem/SSP0.

These definitions might be used to route audio to a codec
connected to SSP0 (instead of a modem in traditional usages),
but there is a restriction to 2ch I2S. SSP2 is capable of
handling up to 4 slot TDM.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart a68bc0d43e ASoC: Intel: Atom: auto-detection of Baytrail-CR
BYT-CR needs special handling to deal with BIOS issues.
For some reason the IPC interrupt index is also modified from
the Baytrail-T reference.

Use PUNIT BIOS config bits to infer platform details.
Assume regular Baytrail configs if status is incorrect or
CONFIG_IOSF_MBI is not enabled.

SSP0 routing issues are solved without dedicated firmware
in following patches

Tested on Asus T100TA and T100TAF.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart 5d98f58fd6 ASoC: Intel: bytcr_rt5640: enable differential mic quirk
Some Baytrail-CR devices rely on analog mics connected with
differential pairs and not the single-ended default
Add quirk and enable it for T00TAF

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart 68817cdb3b ASoC: Intel: bytcr_rt5640: quirk for mono speaker
Some Baytrail devices only have a mono speaker, add quirk and enable
it for T100TAF.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Pierre-Louis Bossart 73442e3ccb ASoC: Intel: bytcr-rt5640: add Asus T100TAF quirks
Add quirk based on DMI string matching
Also fix matching to use DMI_EXACT_MATCH otherwise T100TA and T100TAF
will be using same quirk

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-15 15:14:57 +01:00
Wei Yongjun 979cf59acc ASoC: Intel: Skylake: Fix error return code in skl_probe()
Fix to return error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 87b2bdf022 ("ASoC: Intel: Skylake: Initialize NHLT table")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Acked-By: Vinod Koul <vinod.kou@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-12 13:29:12 +01:00
Vinod Koul a657ae7e5c ASoC: Intel: Skylake: remove module id query at runtime
Now that we have balanced loading of the topology file and split of init
and fw_init and fill module data during asoc probe.

So remove it from runtime, but keep error check in case things fall apart.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-10 18:54:05 +01:00
Vinod Koul 64cb1d0ad0 ASoC: Intel: Skylake: Populate modules after loading
Once topology and firmware are loaded, we can parse the manifest. Use driver
pipe and widget list to get list of all modules and populate the data.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-10 18:54:05 +01:00
Dharageswari R 0556ba463b ASoC: Intel: Skylake: modify snd_skl_get_module_info args
snd_skl_get_module_info() takes skl_dfw_module as an argument. The users
then updates the topology data, so instead pass skl_module_cfg and let
snd_skl_get_module_info() fill that up.

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>
2016-08-10 18:54:05 +01:00
Mark Brown da74273c49 Merge branch 'topic/hda-link-time' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-intel 2016-08-09 12:34:51 +01:00
Vinod Koul ec8ae5703d ALSA: convert users to core bus_parse_capabilities
Now that we have the bus parse capabilities moved to core, we need to
convert users.

The SKL driver and HDA extended lib needs to converted in single patch,
otherwise we regress on the functionality.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-09 08:53:56 +02:00
Senthilnathan Veppur 3d4006cd50 ASoC: Intel: Skylake: Add module processing domain support
A module can be scheduled in deferent processing domains in DSP. Topology
specifies the module domain.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul 8d983be820 ASoC: Intel: Skylake: Fix a comment style
While changing code notice bad comment style, so fix it up.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Ramesh Babu 1ef015e611 ASoC: Intel: Skylake: Add library loading support
The library load is added as one of the ops in skl_dsp_fw_ops().

The manifest load gives the files to be loaded which are loaded during
the fw_init()

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
kbuild test robot 004d94e5ab ASoC: Intel: Skylake: fix noderef.cocci warnings
sound/soc/intel/skylake/skl-topology.c:480:24-30: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

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>
2016-08-08 11:54:59 +01:00
Ramesh Babu 20fb2fbdfc ASoC: Intel: Skylake: Add library loading IPCs
DSP fw can have additional firmwares as libs. These libs can be
loaded using message IPC_GLB_LOAD_LIBRARY.

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul 0bdd6d8bed ASoC: Intel: Bxt: Parse UUIDs once
The firmware manifest contains UUIDs which needs to be passed only once.

So use the newly introduced is_first_boot flag to distinguish and parse
these only once on bxt platform as well.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul e280823c23 ASoC: Intel: Skylake: Parse UUIDs once
The firmware manifest contains UUIDs which needs to be passed only once.

So use the newly introduced is_first_boot flag to distinguish and parse
these only once.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Senthilnathan Veppur a8e2c19efd ASoC: Intel: Skylake: add additional args to module parsing
For additional library parsing, we need to pass firmware to be
loaded and not use the pointer in context. Also, Library module
IDs are combination of library index and module ID in manifest.

So add the additional arguments of firmware and library offset to
snd_skl_parse_uuids().

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Kranthi G 15ecaba914 ASoC: Intel: Skylake: add support for tplg manifest load
Topology manifest gives information about the libraries to be
loaded. Implement the topology manifest load callback to get
this.

Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul 78cdbbdac0 ASoC: Intel: Skylake: split fw and dsp initialization
The DSP instance creation also loads the firmware on DSPs. For library load
the firmware names come from topology so can't be loaded at object creation.

So split the firmware load and object creation. FW load is now called after
topology init in platform probe.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul 73a675816d ASoC: Intel: Skylake: modify skl_get_dsp_ops()
To query the ops used for a platform, we use skl_get_dsp_ops() which return
index and then we load the ops.

Rather than this return the ops, this way it cna be used later to query the
ops in rest of the driver.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul b7c505554c ASoC: Intel: Skylake: Move modules query to runtime
Since we are moving DSP init to later, at the topology load the
module info is not available.

So set the module id to -1 at init and query at first module
initialization.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul 2392f7fd69 ASoC: Intel: Skylake: Check list empty while getting module info
Module list can be NULL so check if the list is empty before
accessing the list.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-01 17:23:37 +01:00
Mark Brown 44d624622e Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2016-07-24 22:07:22 +01:00
Markus Elfring 1b00126cb3 ASoC: Intel: Skylake: Delete an unnecessary check before the function call "release_firmware"
The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-24 21:48:06 +01:00
Vedang Patel 96bd6033c2 ASoC: Intel: Skylake: Fix NULL Pointer exception in dynamic_debug.
The following bug was reported by sometime back:

https://lkml.org/lkml/2016/6/29/795

This commit fixes this bug by setting value for the prefix string.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-24 21:47:57 +01:00
Ben Zhang c999675b04 ASoC: Intel: Fix conflicting pcm dev drvdata on haswell
soc-core sets the snd_soc_pcm_runtime->dev drvdata to
snd_soc_pcm_runtime in soc_post_component_init, and access
it in places like codec_reg_show.

hsw_pcm_open overwrites the drvdata to point to hsw_pcm_data,
confusing soc-core, and causing crashes when cat
/sys/devices/pci0000:00/INT3438:00/.../System PCM/codec_reg

This patch removes the set in hsw_pcm_open since it's no longer
used. commit 7ff9d6714a ("ASoC: Intel: Split hsw_pcm_data for
playback and capture") already removed all calls to
snd_soc_pcm_get_drvdata(rtd).

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 17:30:03 +01:00
Vinod Koul 9dc201cf75 ASoC: Intel: board: add kabylake nau88l25_ssm4567 machine id
Like SKL we have skl_nau88l25_ssm4567 machine for KBL,
so add the ID for this machine too.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 17:21:29 +01:00
Vinod Koul 2ca972da5a ASoC: Intel: board: add kabylake nau88l25_max98357a machine id
Like SKL we have skl_nau88l25_max98357a machine for KBL,
so add the ID for this machine too.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 17:21:29 +01:00
Vinod Koul 156a071b9c ASoC: Intel: Kbl: add kabylake additional machine entries
Like SKL, we have two more machines for KBL, so add these IDs

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 17:21:29 +01:00
Vinod Koul a2f5b8db2e ASoC: Intel: Skylake: reduce machine name for skl_nau88l25_max98357a
The platform device id table expects names to be less that
20chars, so truncate the name in skl id table and
skl_nau88l25_max98357a machine.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 17:21:29 +01:00
Vinod Koul 400ada0c76 ASoC: Intel: Skylake: reduce machine name for skl_nau88l25_ssm4567
The platform device id table expects names to be less that
20chars, so truncate the name in skl id table and
skl_nau88l25_ssm4567 machine.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 17:21:29 +01:00
Senthilnathan Veppur c78722676e ASoC: Intel: Skylake: Fix fw reload failure
FW reload had two issues:
 - We need to disable the core 0 on when fw fails
 - Before loading firmware mark boot flag as false

This patch fixes these two

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 16:32:51 +01:00
Vinod Koul 894a16db29 ASoC: Intel: board: add kabylake machine id
Kabylake platform is similar to Skylake. So, add machine id.
Since same machine driver supports both, add these in id table.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11 22:20:15 +01:00
Vinod Koul 451dfb5f82 ASoC: Intel: add kablake device IDs
Kabylake is next generation Intel platform which has similar
audio controller to Skylake, so add the ID and driver data in
SKL driver.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11 22:20:15 +01:00
Alan Cox a6d4faeb29 ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute
Now we correctly error an attempt to execute an unsupported operation.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11 18:19:33 +01:00
Vinod Koul 25f3d86b1d ASoC: Intel: Skylake: Initialize module list for Broxton
The module list was not initialized for Broxton DSP code, so
initialize it.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11 18:19:33 +01:00
Takashi Iwai a395bdd6b2 ASoC: intel: Fix sst-dsp dependency on dw stuff
The recent commit [a92ea59b74e2: ASoC: Intel: sst: only select
sst-firmware when DW DMAC is built-in] introduced more strict kconfig
dependency (depends on DW_DMAC_CORE=y) for avoiding the build failures
due to dependency messes in intel-sst.  This makes, however, it
impossible to use this driver with the modularized systems,
i.e. typically on Linux distros.

The problem addressed in the commit above is that sst_dsp_new() and
sst_dsp_free() includes the firmware init / finish that call dw_*()
functions.  Thus building it as built-in with DW_DMAC_CORE module
results in the missing symbols.

However, these sst_dsp functions are basically called only from the
drivers that depend on DW_DMAC_CORE already.  That is, once when these
functions are split out, the rest can be independent from dw stuff.

This patch attempts to solve the issue by the following:
- Split sst-dsp stuff into two modules: snd-soc-sst-dsp and
  snd-soc-sst-firmware.
- Move sst_dsp_new() and sst_dsp_free() to the latter module so that
  the former module can be independent from DW_DMAC_CORE.
- Add a new kconfig SND_SOC_INTEL_SST_FIRMWARE to select the latter
  module by machine drivers.

One only remaining pitfall is that each machine driver has to select
SND_SOC_INTEL_SST_FIRMWARE carefully depending on DW_DMAC_CORE.
This can't be done cleanly due to the restriction of the current
kbuild.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=988117
Fixes: a92ea59b74 ('ASoC: Intel: sst: only select sst-firmware when DW DMAC is built-in')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11 18:19:23 +01:00
Vinod Koul 24dad509ed ASoC: Intel: atom: statify cht_quirk
Sparse rightly warns:
sound/soc/intel/atom/sst/sst_acpi.c:353:22: warning: symbol 'cht_quirk' was not declared. Should it be static?

So statify this

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08 16:36:45 +02:00
Vinod Koul 5d554ea4f2 ASoC: Intel: cht: fix uninit variable warning
Kbuild bot reports that we might use dai_index uninitialized.

sound/soc/intel/boards/cht_bsw_rt5645.c:391:37: warning: 'dai_index' may be used uninitialized in this function [-Wmaybe-uninitialized]

Since it is theoretically possible, set it while initializing.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08 16:36:45 +02:00
Dharageswari R 0d68210400 ASoC: Intel: Skylake: Fix to use the actual size for TLV control
DSP expects the actual length of parameters that is set through
TLV to be passed in large config set, so pass the actual size
received in tlv_control_set() instead of max size.

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>
2016-07-08 14:47:04 +02:00
Vinod Koul 07d5c17b80 ASoC: Intel: Add surface3 entry in CHT-RT5645 machine
Surface3 device is a CHT machine, so add entry for it.
Also update the HID from BIOS.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98001
Signed-off-by: Sachin Mokashi <sachinx.mokashi@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08 14:26:26 +02:00
Vinod Koul 73a33f6f6d ASoC: Intel: Atom: Add quirk for Surface 3
Surface 3 is CHT based device which shows up with RT5645 codec. But the
BIOS reports ACPI ID as 5640!

To solve this, add a DMI overide for cht-5640 machine.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98001
Signed-off-by: Sachin Mokashi <sachinx.mokashi@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08 14:26:26 +02:00
Vedang Patel 91c1832579 ASoC: Intel: Skylake: Increase loglevel of debug messages.
There is log spam while doing playback, record or reloading the
audio firmware.

print_hex_dump uses printk(KERN_DEBUG,... which is different from
dev_dbg used elsewhere in the driver: it's always enabled at
compile-time. Change it to print_hex_dump_debug for logging consistency.

For consistency with other log statements, change dev_info to dev_dbg
for a kernel print which is frequently printed by the driver.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-27 15:51:29 +01:00
Vedang Patel ef06b6f391 ASoC: Intel: common: increase the loglevel of "FW Poll Status".
For consistency with other log statements, change dev_info to dev_dbg
for a kernel print which is frequently printed by the driver.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-27 15:51:29 +01:00
Alan Cox 9c4639ec95 ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute
Now we correctly error an attempt to execute an unsupported operation.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-24 12:33:17 +01:00
Jayachandran B e68aca08d7 ASoC: Intel: Skylake: Support multi-core in Broxton
Add multicore DSP support in Broxton DSP operations.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:13:12 +01:00
Jayachandran B 40a166039a ASoC: Intel: Skylake: Support multi-core in Skylake
Add multicore DSP support in Skylake DSP operations.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:13:12 +01:00
Jayachandran B 052f103c89 ASoC: Intel: Skylake: Add DSP muti-core infrastructure
The DSP can have more than one cores. In that case the secondary
core has to be managed by the driver. This patch adds the changes
to driver infrastructure to support multiple core.

A new object skl_dsp_cores is introduced to support multiple
core. Helpers skl_dsp_get_core() skl_dsp_put_core() help to
managed the cores.

Many of the power_up/down and DSP APIs take additional argument
of core_id. The primary core, 0 is always powered up first and
then on demand second core.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:13:12 +01:00
Vinod Koul 957427d94a ASoC: Intel: Skylake: Update comment style
Noticed a style inconsistency in a comment, so update that

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:01:05 +01:00
Vinod Koul f749a78a54 ASoC: Intel: Skylake: Add pm ops for broxton-rt298 machine
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:01:05 +01:00
Vinod Koul 2e9dc2b645 ASoC: Intel: Skylake: Disable async suspend
We do not support async suspend due to dependency with rest of
card and require suspend/resume be executed synchronously, mark
the device accordingly.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:01:05 +01:00
Vinod Koul 45a9e07531 ASoC: Intel: Revert "ASoC: Intel: Add support for PM ops in bxt-rt298"
This reverts commit 3513798ca4 ("ASoC: Intel: Add support for
PM ops in bxt-rt298") as the right way to fix this is to disable
async suspend

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:01:05 +01:00
Vinod Koul c3f2fe621a ASoC: Intel: Kconfig: formatting update
Kconfig help texts were missing periods as suggested by Randy.

Also fix the alignment on a block of help text to be consistent
with rest.

Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 15:47:22 +01:00
Vinod Koul 3493d4a864 ASoC: Intel: Kconfig: fix build when ACPI is not enabled
Randy reported following error when ACPI is not enabled:

warning: (SND_SOC_INTEL_BYTCR_RT5640_MACH && SND_SOC_INTEL_BYTCR_RT5651_MACH
&& SND_SOC_INTEL_CHT_BSW_RT5672_MACH && SND_SOC_INTEL_CHT_BSW_RT5645_MACH &&
SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH) selects SND_SST_IPC_ACPI
+which has unmet direct dependencies (SOUND && !M68K && !UML && SND &&
SND_SOC && ACPI)

causing these build errors:

In file included from ../sound/soc/intel/atom/sst/sst_acpi.c:40:0:
../include/acpi/acpi_bus.h:65:20: error: conflicting types for
'acpi_evaluate_dsm'
 union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
In file included from ../sound/soc/intel/atom/sst/sst_acpi.c:31:0:
../include/linux/acpi.h:676:34: note: previous definition of
'acpi_evaluate_dsm' was here
 static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,

CONFIG_SND_SST_IPC_ACPI was already dependent upon ACPI, but that was not
solving it. So move the depends up to machine drivers and remove from
CONFIG_SND_SST_IPC_ACPI.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 15:47:22 +01:00
Vinod Koul a35aeaee94 ASoC: Intel: Skylake: Check for module list being NULL
While clearing loaded module count, we should check first to see
if module list is NULL or not. Some distributions can ship with
no modules and thus list can be empty.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 18:00:45 +01:00
Jeeja KP 3513798ca4 ASoC: Intel: Add support for PM ops in bxt-rt298
We need card to be early suspended and late resumed, so use prepare and
complete for card suspend and resume.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 14:59:33 +01:00
Jayachandran B 2f74053bea ASoC: Intel: Skylake: Update DSP stall bits
The stall bits needs to comprehend the number of DSP cores
running, so update the stall and unstall register writes to
comprehend SKL_DSP_CORES_MASK values as well.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 14:59:33 +01:00
Senthilnathan Veppur 2023576dd7 ASoC: Intel: Skylake: Update FW purge for Broxton
Broxton needs to send Purge firmware IPC to DSP before downloading the
firmware. The DMA id needs to be updated for that.

While at it also update Broxton boot sequence to send purge request after
power up and before yanking off reset.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 14:59:33 +01:00
Jayachandran B 1665c177ab ASoC: Intel: Skylake: Enable firmware reload in suspend
Broxton DSP needs retains code loaded during runtime_pm cycles.
But it looses that on suspend cycle, so on resume we need to
download the firmware again.

This is done by adding a new flag and based on flag status, we
download the firmware.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 14:59:33 +01:00