GitHub/MotorolaMobilityLLC/kernel-slsi.git
8 years agoASoC: Intel: boards: add DEEP_BUFFER support for BYT/CHT/BSW
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:45 +0000 (20:35 -0600)]
ASoC: Intel: boards: add DEEP_BUFFER support for BYT/CHT/BSW

Add dai links to enable additional playback stream with deeper
buffer for lower power consumption.
The normal and DEEP_buffer streams are not mutually exclusive,
content will be mixed by the DSP.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoc: Intel: Atom: add deep buffer definitions for atom platforms
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:44 +0000 (20:35 -0600)]
ASoc: Intel: Atom: add deep buffer definitions for atom platforms

Add definitions for MERR_DPCM_DEEP_BUFFER AND PIPE_MEDIA3_IN
Add relevant cpu-dai and dai link names

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: tag byt-rt5640 machine driver as deprecated
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:43 +0000 (20:35 -0600)]
ASoC: Intel: tag byt-rt5640 machine driver as deprecated

All the functionality was merged in DPCM-based driver,
keep older driver to avoid breaking userspace but
tag it as unsupported/deprecated

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: boards: merge DMI-based quirks in bytcr-rt5640 driver
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:42 +0000 (20:35 -0600)]
ASoC: Intel: boards: merge DMI-based quirks in bytcr-rt5640 driver

Merge DMI quirks for various machines such as Asus T100
and clean-up code

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: boards: start merging byt-rt5640 drivers
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:41 +0000 (20:35 -0600)]
ASoC: Intel: boards: start merging byt-rt5640 drivers

first renaming and reducing delta with byt-rt5640 code before
dmi-based quirks are enabled

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: boards: align pin names between byt-rt5640 drivers
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:40 +0000 (20:35 -0600)]
ASoC: Intel: boards: align pin names between byt-rt5640 drivers

initial cleanup to use same pins

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: bytcr_rt5640: set SSP to I2S mode 2ch
Sebastien Guiriec [Fri, 18 Dec 2015 02:35:39 +0000 (20:35 -0600)]
ASoC: Intel: bytcr_rt5640: set SSP to I2S mode 2ch

Using the hw_fixup function in order to overwrite the default SSP
setting for Audio DSP port connected to the codec. Instead of
TDM 4ch use I2S 2ch 24 bits.

Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: Skylake: Fix to set pipe state to invalid when deleting
Jeeja KP [Fri, 18 Dec 2015 09:41:58 +0000 (15:11 +0530)]
ASoC: Intel: Skylake: Fix to set pipe state to invalid when deleting

When pipeline is deleted, set the pipeline state to invalid 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>
8 years agoASoC: Intel: Skylake: Clear stream registers before stream setup
Jeeja KP [Fri, 18 Dec 2015 09:41:57 +0000 (15:11 +0530)]
ASoC: Intel: Skylake: Clear stream registers before stream setup

This patch adds clean up routine to clear the stream registers and
calls this routine before setting up stream registers.

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>
8 years agoASoc: Intel: boards: Add HDMI/DP links for nau88l25_ssm4567 machine
Fang, Yang A [Fri, 11 Dec 2015 19:29:13 +0000 (11:29 -0800)]
ASoc: Intel: boards: Add HDMI/DP links for nau88l25_ssm4567 machine

This machine supports HDMI/DP ports so add these ports and its FE and BE
DAIlinks

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoc: Intel: boards: Add WOV as sink for nau88l25_ssm4567 machine
Sathyanarayana Nujella [Fri, 11 Dec 2015 19:29:12 +0000 (11:29 -0800)]
ASoc: Intel: boards: Add WOV as sink for nau88l25_ssm4567 machine

We have WOV module which should act as DAPM sink, so add that and
its links.

Also rename the refcap to "Wake On Voice" as some user expect to
find this name

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoc: Intel: boards: update constraints for nau88l25_ssm4567 machine
Yong Zhi [Fri, 11 Dec 2015 19:29:11 +0000 (11:29 -0800)]
ASoc: Intel: boards: update constraints for nau88l25_ssm4567 machine

We have specific constraints for FE device (48KHz, stereo, 16
bits) and fixups for BE DMIC links (2 or 4 ch), so add those.

Also add one more FE DAIlink for dmiccap

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoc: Intel: boards: update ignore suspend for nau88l25_ssm4567 machine
Yong Zhi [Fri, 11 Dec 2015 19:29:10 +0000 (11:29 -0800)]
ASoc: Intel: boards: update ignore suspend for nau88l25_ssm4567 machine

We don't support ignore suspend on few devices so remove that.
Also since we support ignore susend on PDM DMIC, add that

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoc: Intel: boards: fix dapm map of nau88l25_ssm4567 machine
Fang, Yang A [Fri, 11 Dec 2015 19:29:09 +0000 (11:29 -0800)]
ASoc: Intel: boards: fix dapm map of nau88l25_ssm4567 machine

The DAPM map for DMIC and SSP was not properly done, so fix that up.
Also mark machine as fully routed

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: Skylake: Add Nuvoton Maxim machine driver
Rohit Ainapure [Fri, 11 Dec 2015 19:29:08 +0000 (11:29 -0800)]
ASoC: Intel: Skylake: Add Nuvoton Maxim machine driver

This adds Skylake I2S machine driver which uses NAU88L25 as anlog codec and
MAX98357A as speakers

Signed-off-by: Rohit Ainapure <rohit.m.ainapure@intel.com>
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>
8 years agoASoC: Intel: Add Nuvoton+Maxim machine driver entry
Rohit Ainapure [Fri, 11 Dec 2015 19:29:07 +0000 (11:29 -0800)]
ASoC: Intel: Add Nuvoton+Maxim machine driver entry

Add the NAU88L25 + MAX98357A machine driver entry into
the machine table

Signed-off-by: Rohit Ainapure <rohit.m.ainapure@intel.com>
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>
8 years agoASoC: Intel: Skylake: pointer math issue
Dan Carpenter [Tue, 8 Dec 2015 05:53:22 +0000 (08:53 +0300)]
ASoC: Intel: Skylake: pointer math issue

"data" is a u32 pointer so this copies the information to wrong place
entirely.

Fixes: 140adfba5280 ('ASoC: Intel: Skylake: Add tlv byte kcontrols')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: Skylake: Fix a couple signedness bugs
Dan Carpenter [Tue, 15 Dec 2015 09:20:14 +0000 (12:20 +0300)]
ASoC: Intel: Skylake: Fix a couple signedness bugs

These need to be signed because they hold negative error codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: sst: fix sst_memcpy32 wrong with non-4x bytes issue
Jie Yang [Mon, 14 Dec 2015 14:27:13 +0000 (22:27 +0800)]
ASoC: Intel: sst: fix sst_memcpy32 wrong with non-4x bytes issue

sst_memcpy32() only copied bytes/4 32bits, which means it dropped
the remaining bytes%4 bytes wrongly.

Here add copying those missing bytes, first to a 32bits tmp, and
then write the tmp to 32bits iomem.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: sst: fix the IRQ locked issue
Liam Girdwood [Mon, 14 Dec 2015 12:06:13 +0000 (20:06 +0800)]
ASoC: Intel: sst: fix the IRQ locked issue

If driver received a message that it can't handle, it won't
clear the corresponding bit and unmask interrupt, this may
lock the IRQ and DSP can't send message anymore.

To fix the issue, we should Always update IMRX after IPC.

Here we always clear the DONE/BUSY bit and unmask the IRQ
source, even when IPC failures have occurred previously.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Modified-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoMerge branch 'topic/sink' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Wed, 9 Dec 2015 15:01:44 +0000 (15:01 +0000)]
Merge branch 'topic/sink' of git://git./linux/kernel/git/broonie/sound into asoc-intel

8 years agoASoC: Intel: Skylake: Update ignore suspend for rt286 machine
Praveen Diwakar [Thu, 3 Dec 2015 18:00:01 +0000 (23:30 +0530)]
ASoC: Intel: Skylake: Update ignore suspend for rt286 machine

We should only add ignore suspend flag for some DAIs and not all.
This patches removes it from the DAIs where we do not support
this

It also marks the endpoints for which ignore_suspend should be
enabled

Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com>
Signed-off-by: Vunny Sodhi <vunnyx.sodhi@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>
8 years agoASoC: Intel: Skylake: Add support for active suspend
Jeeja KP [Thu, 3 Dec 2015 18:00:00 +0000 (23:30 +0530)]
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>
8 years agoASoC: Intel: Skylake: Fix the dapm machine map
Vinod Koul [Thu, 3 Dec 2015 17:59:59 +0000 (23:29 +0530)]
ASoC: Intel: Skylake: Fix the dapm machine map

DAPM Machine map for machine was not specifying the paths
correctly.

The correct order should be:
"DMIC01 Rx" (SoC DMIC BE), connected to "DMIC AIF" (DMic Codec
AIF) and then "DMic" (DMic codec Input) connected to "SoC DMIC"
(Machine DMIC MIC 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>
8 years agoASoC: Intel: Skylake: add wov as int sink
Vinod Koul [Thu, 3 Dec 2015 17:59:58 +0000 (23:29 +0530)]
ASoC: Intel: Skylake: add wov as int sink

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>
8 years agoASoC: Intel: Skylake: Add dai link for DMIC capture
Jeeja KP [Thu, 3 Dec 2015 17:59:57 +0000 (23:29 +0530)]
ASoC: Intel: Skylake: Add dai link for DMIC capture

Since in Skylake we support another DAI for DMIC quad capture,
add a dailink for this as well. Also specify constrains for DMIC
FE devices and fixup for DMIC BEs

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>
8 years agoASoC: Intel: Skylake: read params from DSP if module is on
Omair M Abdullah [Thu, 3 Dec 2015 17:59:56 +0000 (23:29 +0530)]
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>
8 years agoASoC: Intel: Skylake: add LARGE_CONFIG_GET IPC support
Mousami Jana [Thu, 3 Dec 2015 17:59:55 +0000 (23:29 +0530)]
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>
8 years agoASoC: Intel: Skylake: update mailbox uplink window offset and size
Omair M Abdullah [Thu, 3 Dec 2015 17:59:54 +0000 (23:29 +0530)]
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>
8 years agoASoC: Intel: Skylake: Fix module init data correctly
Jeeja KP [Thu, 3 Dec 2015 17:59:53 +0000 (23:29 +0530)]
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>
8 years agoASoC: Intel: Skylake: Add support for Mic Select module
Dharageswari R [Thu, 3 Dec 2015 17:59:52 +0000 (23:29 +0530)]
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>
8 years agoASoC: Intel: Skylake: Add memory pages to widget data.
Jeeja KP [Thu, 3 Dec 2015 17:59:51 +0000 (23:29 +0530)]
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>
8 years agoASoC: Intel: Skylake: Add support for Loadable modules
Dharageswari R [Thu, 3 Dec 2015 17:59:50 +0000 (23:29 +0530)]
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>
8 years agoASoC: Intel: Skylake: Add tlv byte kcontrols
Jeeja KP [Sat, 28 Nov 2015 09:31:50 +0000 (15:01 +0530)]
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>
8 years agoASoC: Intel: Skylake: Add support to configure module params
Jeeja KP [Sat, 28 Nov 2015 09:31:49 +0000 (15:01 +0530)]
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>
8 years agoASoC: Intel: Skylake: Add helper routine to handle Algo parameter
Jeeja KP [Sat, 28 Nov 2015 09:31:48 +0000 (15:01 +0530)]
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>
8 years agoASoC: Intel: Skylake: Add helper routines to handle module params
Jeeja KP [Sat, 28 Nov 2015 09:31:47 +0000 (15:01 +0530)]
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>
8 years agoASoC: Intel: Skylake: Update DMIC DAIs and capabilities
Jeeja KP [Sat, 28 Nov 2015 09:31:46 +0000 (15:01 +0530)]
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>
8 years agoASoC: hdac_hdmi: check error return
Sudip Mukherjee [Tue, 1 Dec 2015 08:59:35 +0000 (14:29 +0530)]
ASoC: hdac_hdmi: check error return

As hdac->num_nodes is unsigned we can not check if
snd_hdac_get_sub_nodes() has returned error or success. Lets have a
temporary int to check the error value.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: Skylake: Move up pipe mem free
Vinod Koul [Mon, 23 Nov 2015 16:56:29 +0000 (22:26 +0530)]
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>
8 years agoASoC: Intel: Skylake: Poll CLDMA RUN bit when set
Jeeja KP [Mon, 23 Nov 2015 16:56:27 +0000 (22:26 +0530)]
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>
8 years agoASoC: Intel: Skylake: Update pcm capability
Jeeja KP [Mon, 23 Nov 2015 16:56:26 +0000 (22:26 +0530)]
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>
8 years agoASoC: Intel: Skylake: Fix to update bit depth for module params
Jeeja KP [Mon, 23 Nov 2015 16:56:25 +0000 (22:26 +0530)]
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>
8 years agoASoC: Intel: Skylake: Reconfigure HDA stream register in prepare/resume
Jeeja KP [Mon, 23 Nov 2015 16:56:24 +0000 (22:26 +0530)]
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>
8 years agoASoC: dapm: add a dapm sink widget
Vinod Koul [Mon, 23 Nov 2015 15:52:30 +0000 (21:22 +0530)]
ASoC: dapm: add a dapm sink widget

DAPM models various widgets but lacks a sink widget.
DSPs can have modules which take audio data, process it and are
capable of generating events thus acting as a sink of data.

To make the dapm graph complete for such paths we need a dapm
sink widget for these modules, so add a SND_SOC_DAPM_SINK to
declare such a widget.  This widget will be treated as
SND_SOC_DAPM_EP_SINK endpoint in the dapm graph

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: sst: only select sst-firmware when DW DMAC is built-in
Jie Yang [Tue, 24 Nov 2015 14:01:21 +0000 (22:01 +0800)]
ASoC: Intel: sst: only select sst-firmware when DW DMAC is built-in

The previous commit ef3e199a49c8 ("ASoC: Intel: sst: only use
sst-firmware when DW DMAC is available") does not fix the 0day
building errors thoroughly:

   sound/built-in.o: In function 'dw_dma_remove'
   sound/built-in.o: In function 'dw_dma_probe'

Here we fallback to select sst-firmware only when DW DMAC
is built-in selected. We may need to refactor sst common
driver and split DW related codes to platform driver, but
ATM, this fallback may be the smallest fix.

Please be noticed that after applying this patch, we may
need select DW DMAC manually in DMA driver menu, before
we can prompt and select HSW/BDW and old BYT machines.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: hdac: Fix Makefile and Kconfig sorting
Mark Brown [Mon, 23 Nov 2015 14:43:06 +0000 (14:43 +0000)]
ASoC: hdac: Fix Makefile and Kconfig sorting

Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: hdac_hdmi: fix possible NULL dereference
Sudip Mukherjee [Mon, 23 Nov 2015 12:15:13 +0000 (17:45 +0530)]
ASoC: hdac_hdmi: fix possible NULL dereference

kzalloc() can return NULL if it fails, and then we will be dereferencing
a NULL pointer.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: hdac-hdmi: make driver select CONFIG_HDMI
Vinod Koul [Sun, 22 Nov 2015 10:54:58 +0000 (16:24 +0530)]
ASoC: hdac-hdmi: make driver select CONFIG_HDMI

Since driver use infoframe symbols from video/hdmi.c we should select this
symbol for this driver

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>
8 years agoASoC: Intel: Skylake: Fix test of a field address
Vinod Koul [Sun, 22 Nov 2015 10:54:57 +0000 (16:24 +0530)]
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>
8 years agoASoC: hdac_hdmi: Use i915 component framework for PM
Subhransu S. Prusty [Tue, 10 Nov 2015 13:12:10 +0000 (18:42 +0530)]
ASoC: hdac_hdmi: Use i915 component framework for PM

Use the component framework to keep the display on till the
playback in progress.

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>
8 years agoASoC: hdac_hdmi: Setup and start infoframe
Subhransu S. Prusty [Tue, 10 Nov 2015 13:12:09 +0000 (18:42 +0530)]
ASoC: hdac_hdmi: Setup and start infoframe

This patch uses hdmi framework in video to fill audio infoframe.

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>
8 years agoASoC: hdac_hdmi: Add hdac hdmi dai ops
Subhransu S. Prusty [Tue, 10 Nov 2015 13:12:08 +0000 (18:42 +0530)]
ASoC: hdac_hdmi: Add hdac hdmi dai ops

The DAI ops are used for triggering HDMI streams and configuring
the parameters

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>
8 years agoASoC: hdac_hdmi: Add PM support for HDMI
Subhransu S. Prusty [Tue, 10 Nov 2015 13:12:07 +0000 (18:42 +0530)]
ASoC: hdac_hdmi: Add PM support for HDMI

Power up/down the AFG node during runtime resume/suspend.

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>
8 years agoASoC: hdac-hdmi: Add hdmi driver
Subhransu S. Prusty [Tue, 10 Nov 2015 13:12:06 +0000 (18:42 +0530)]
ASoC: hdac-hdmi: Add hdmi driver

This adds HDA based HDMI driver to be used in platforms like SKL
and onwards

Register the hdmi driver with hda bus and register dais.

Also parse the widget and initialize identified pin and converter
widgets.

For simplification, currently only one pin and one converter
widget are enabled on board, as well as limit the rates supported
to simples ones and not based on ELD.  This things will come
eventually once basic support for this is merged

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>
8 years agoMerge branch 'topic/hdac' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Sat, 21 Nov 2015 13:58:13 +0000 (13:58 +0000)]
Merge branch 'topic/hdac' of git://git./linux/kernel/git/broonie/sound into asoc-intel

8 years agoALSA: hdac: structure definition for ext_dma_params
Subhransu S. Prusty [Tue, 10 Nov 2015 13:12:05 +0000 (18:42 +0530)]
ALSA: hdac: structure definition for ext_dma_params

This extends the structure definition of ext_device and adds
definition for dma_params which will be used when hdmi codec.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: Intel: pass correct parameter in sst_alloc_stream_mrfld()
Dan Carpenter [Wed, 18 Nov 2015 10:04:20 +0000 (13:04 +0300)]
ASoC: Intel: pass correct parameter in sst_alloc_stream_mrfld()

"data" is always NULL in this function.  I think we should be passing
"&data" to sst_prepare_and_post_msg() instead of "data".

Fixes: 3d9ff34622ba ('ASoC: Intel: sst: add stream operations')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Dinesh Mirche <dinesh.mirche@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Skylake: Update the rtd query
Vinod Koul [Fri, 20 Nov 2015 17:04:41 +0000 (22:34 +0530)]
ASoC: Intel: Skylake: Update the rtd query

sound card rtd was an array and was updated to a list so update
the driver to use a list

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoMerge branch 'topic/pcm-list' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Mark Brown [Fri, 20 Nov 2015 19:23:22 +0000 (19:23 +0000)]
Merge branch 'topic/pcm-list' of git://git./linux/kernel/git/broonie/sound into asoc-intel

9 years agoASoC: Intel: Skylake: Add pm ops for skl_rt286 machine
Jeeja KP [Fri, 13 Nov 2015 13:52:13 +0000 (19:22 +0530)]
ASoC: Intel: Skylake: Add pm ops for skl_rt286 machine

The PM ops are required so that DAPM will suspend and resume the DSP
pipelines properly

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>
9 years agoASoC: Intel: Skylake: Constrain the audio devices
Vinod Koul [Fri, 13 Nov 2015 13:52:12 +0000 (19:22 +0530)]
ASoC: Intel: Skylake: Constrain the audio devices

In ref configuration for Skylake, we support only 16bit, 48KHz,
stereo audio, so specify these as constrains for the devices

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>
9 years agoASoC: Intel: Skylake: Fix null ptr dereferenced in skl_tplg_bind_sinks
Jeeja KP [Fri, 13 Nov 2015 13:52:11 +0000 (19:22 +0530)]
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>
9 years agoASoC: Intel: Skylake: Fix CLDMA buffer wrap case
Jeeja KP [Fri, 13 Nov 2015 13:52:10 +0000 (19:22 +0530)]
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>
9 years agoASoC: Intel: Skylake: Reset the DSP when set D3 fails
Jeeja KP [Fri, 13 Nov 2015 13:52:09 +0000 (19:22 +0530)]
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>
9 years agoASoC: Intel: Skylake: Fix cleanup of dma buffer
Jeeja KP [Fri, 13 Nov 2015 13:52:08 +0000 (19:22 +0530)]
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>
9 years agoASoC: Intel: Skylake: Remove redundant init in resume
Jeeja KP [Fri, 13 Nov 2015 13:52:07 +0000 (19:22 +0530)]
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>
9 years agoASoC: Intel: Skylake: Don't enable WAKEENABLE on suspend
Jeeja KP [Fri, 13 Nov 2015 13:52:06 +0000 (19:22 +0530)]
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>
9 years agoASoC: Intel: Skylake: remove pm_runtime_get/put calls
Jeeja KP [Fri, 13 Nov 2015 13:52:05 +0000 (19:22 +0530)]
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>
9 years agoASoC: Intel: Skylake: add adi + nau8825 machine driver entry
Fang, Yang A [Thu, 5 Nov 2015 17:23:08 +0000 (22:53 +0530)]
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>
9 years agoASoC: Intel: Skylake: Adding nau88l25+ssm4567 machine driver
Harsha Priya [Thu, 5 Nov 2015 17:23:07 +0000 (22:53 +0530)]
ASoC: Intel: Skylake: Adding nau88l25+ssm4567 machine driver

Add i2s machine driver with NAU88L25 and SSM4567 codecs

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Conrad Cooke <conrad.cooke@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Skylake: Add support for SSP1 BE cpu dai
Jeeja KP [Thu, 5 Nov 2015 17:23:06 +0000 (22:53 +0530)]
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>
9 years agoASoC: Change the PCM runtime array to a list
Mengdong Lin [Wed, 18 Nov 2015 07:34:11 +0000 (02:34 -0500)]
ASoC: Change the PCM runtime array to a list

Currently the number of DAI links is statically defined by the machine
driver at build time using an array. This makes it difficult to shrink/
grow the number of DAI links at runtime in order to reflect any changes
in topology.

We can change the DAI link array in the core to a list so that PCMs and
FE DAI links can be added and deleted at runtime to reflect changes in
use case and DSP topology. The machine driver can still register DAI links
as an array.

As the 1st step, this patch change the PCM runtime array to a list. A new
PCM runtime is added to the list when a DAI link is bound successfully.

Later patches will further implement the DAI link list.

More:
- define snd_soc_new/free_pcm_runtime() to create/free a runtime.
- define soc_add_pcm_runtime() to add a runtime to the rtd list.
- define soc_remove_pcm_runtimes() to clean up the runtime list.

- traverse the rtd list to probe the link components and dais.

- Add a field "num" to PCM runtime struct, used to specify the device
  number when creating the pcm device, and for a soc card to access
  its dai_props array.

- The following 3rd party machine/platform drivers iterate the rtd list
  to check the runtimes:
  sound/soc/intel/atom/sst-mfld-platform-pcm.c
  sound/soc/intel/boards/cht_bsw_rt5645.c
  sound/soc/intel/boards/cht_bsw_rt5672.c
  sound/soc/intel/boards/cht_bsw_max98090_ti.c

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Vendor drivers get a link's runtime by snd_soc_get_pcm_runtime()
Mengdong Lin [Wed, 18 Nov 2015 07:34:01 +0000 (02:34 -0500)]
ASoC: Vendor drivers get a link's runtime by snd_soc_get_pcm_runtime()

Vendor drivers no longer access a DAI link's runtime by the link index
but by matching the link name via snd_soc_get_pcm_runtime(). We assume
each DAI link has a unique name.

This is preparation for changing runtimes from an array to a list later.

Vendor drivers changed:
sound/soc/fsl/fsl-asoc-card.c
sound/soc/fsl/imx-wm8962.c
sound/soc/pxa/mioa701_wm9713.c
sound/soc/samsung/bells.c
sound/soc/samsung/littlemill.c
sound/soc/samsung/odroidx2_max98090.c
sound/soc/samsung/snow.c
sound/soc/samsung/speyside.c
sound/soc/samsung/tobermory.c
sound/soc/tegra/tegra_wm8903

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Skylake: Add I2C depends for SKL machine
Vinod Koul [Wed, 18 Nov 2015 13:41:46 +0000 (19:11 +0530)]
ASoC: Intel: Skylake: Add I2C depends for SKL machine

The i2c is dependency for the i2c codec drivers, so machine should depend on
i2c. WIthout this we get build failures if I2C is not selected

   sound/soc/codecs/rl6347a.c: In function 'rl6347a_hw_write':
>> sound/soc/codecs/rl6347a.c:66:8: error: implicit declaration of function
>> 'i2c_master_send' [-Werror=implicit-function-declaration]
     ret = i2c_master_send(client, data, 4);
           ^
   sound/soc/codecs/rl6347a.c: In function 'rl6347a_hw_read':
>> sound/soc/codecs/rl6347a.c:114:8: error: implicit declaration of function
>> 'i2c_transfer' [-Werror=implicit-function-declaration]
     ret = i2c_transfer(client->adapter, xfer, 2);

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>
9 years agoASoC: Intel: constify sst_block_ops structures
Julia Lawall [Tue, 10 Nov 2015 23:18:52 +0000 (00:18 +0100)]
ASoC: Intel: constify sst_block_ops structures

The sst_block_ops structure is never modified, and is thus declared as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Skylake: Use the fw name from ACPI mach table
Vinod Koul [Thu, 5 Nov 2015 16:04:15 +0000 (21:34 +0530)]
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>
9 years agoASoC: Intel: add fw name to common dsp context
Vinod Koul [Thu, 5 Nov 2015 16:04:14 +0000 (21:34 +0530)]
ASoC: Intel: add fw name to common dsp context

In order to pass the fw name to IPC driver for loading fw, we
need to add a memeber to store the fw name

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Skylake: Fix skl machine driver creation
Vinod Koul [Thu, 5 Nov 2015 16:04:13 +0000 (21:34 +0530)]
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>
9 years agoASoC: Intel: Atom: move atom driver to common acpi match
Vinod Koul [Thu, 5 Nov 2015 16:04:12 +0000 (21:34 +0530)]
ASoC: Intel: Atom: move atom driver to common acpi match

This patch moves the atom driver to use the common acpi match
functions.  Since atom driver has few more information in machine
table, these are appended to table and set to NULL for common
driver

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Move apci find machine routines
Vinod Koul [Thu, 5 Nov 2015 16:04:11 +0000 (21:34 +0530)]
ASoC: Intel: Move apci find machine routines

This code to find the machine is common for all drivers so move
it to a separate file and header for use in other drivers

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Skylake: Fix resource cleanup on teardown
Vinod Koul [Thu, 5 Nov 2015 16:04:10 +0000 (21:34 +0530)]
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>
9 years agoASoC: Intel: Skylake: Fix substream dereference before check
Vinod Koul [Fri, 30 Oct 2015 15:04:20 +0000 (20:34 +0530)]
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>
9 years agoASoC: Intel: Skylake: Fix to cleanup if skl_sst_dsp_init fails
Subhransu S. Prusty [Fri, 30 Oct 2015 15:04:19 +0000 (20:34 +0530)]
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>
9 years agoASoC: Intel: Skylake: fix typo in sizeof
Vincent Stehlé [Thu, 29 Oct 2015 22:04:41 +0000 (23:04 +0100)]
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>
9 years agoASoC: Intel: Skylake: Fix the SSP0 Fmt fixup to 24 bit
Jeeja KP [Thu, 29 Oct 2015 03:31:34 +0000 (12:31 +0900)]
ASoC: Intel: Skylake: Fix the SSP0 Fmt fixup to 24 bit

SSP0 FMT uses 24 bits so fix to the value to 24 bits

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>
9 years agoASoC: Intel: Skylake: Fix PM behaviour
Jeeja KP [Tue, 27 Oct 2015 00:23:00 +0000 (09:23 +0900)]
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>
9 years agoASoC: Intel: Skylake: Fix to remove channel_map calculation
Jeeja KP [Tue, 27 Oct 2015 00:22:59 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Ignore rate check for DMIC link
Jeeja KP [Tue, 27 Oct 2015 00:22:58 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Add support for module GUIDs
Hardik T Shah [Tue, 27 Oct 2015 00:22:57 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Update the topology interface structure
Hardik T Shah [Tue, 27 Oct 2015 00:22:56 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Add multiple pin formats
Hardik T Shah [Tue, 27 Oct 2015 00:22:55 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Fix to remove be copier widget power check
Jeeja KP [Tue, 27 Oct 2015 00:22:54 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Fix DSP pipe underrun/overrun issue
Jeeja KP [Tue, 27 Oct 2015 00:22:53 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Add support for virtual dsp widgets
Jeeja KP [Tue, 27 Oct 2015 00:22:52 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: use module_pin info for unbind
Jeeja KP [Tue, 27 Oct 2015 00:22:51 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Fix bit depth when querying the NHLT blob
Jeeja KP [Tue, 27 Oct 2015 00:22:50 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Fix support for multiple pins in a module
Jeeja KP [Tue, 27 Oct 2015 00:22:49 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Fix to ignore blob check if link type is HDA
Jeeja KP [Tue, 27 Oct 2015 00:22:48 +0000 (09:22 +0900)]
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>
9 years agoASoC: Intel: Skylake: Fix to ignore codec_mask check in probe
Jeeja KP [Tue, 27 Oct 2015 00:22:47 +0000 (09:22 +0900)]
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>