Commit graph

1196 commits

Author SHA1 Message Date
Pierre-Louis Bossart
f6a118a800 ASoC: Intel: clarify Kconfig dependencies
Introduce more logical dependencies, with the SOC selected first and the
relevant machine drivers are exposed.
The same mechanism will be used for SOF support.

Also select SND_SOC_ACPI_INTEL_MATCH for all machine drivers

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:21:47 +01:00
Pierre-Louis Bossart
d4d86b86e1 ASoC: Intel: reorder boards Kconfig by chronological order
This file is a mess, order by generation with more recent last

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:21:44 +01:00
Pierre-Louis Bossart
ea2851bd82 ASoC: Intel: move machine drivers to dedicated KConfig
split Kconfig to prepare for reuse of machine drivers for
SOF support
no functional change or edits

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:21:39 +01:00
Pierre-Louis Bossart
c1a8ed6930 ASoC: Intel: add SOF firmare/topology file information
Prepare for SOF integration, no functional change

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:21:35 +01:00
Pierre-Louis Bossart
6004640638 ASoC: Intel: move all ACPI match tables to common module
First step of cleaning, move all tables to soc-acpi-intel-match module.
The tables remain in separate files per platform to keep them
manageable. Skylake+ platforms are still handled elsewhere since
there is no conflict with SOF for now, but this will have to be
handled at a later point.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:21:31 +01:00
Pierre-Louis Bossart
928c8a8f11 ASoC: Intel: common: use c99 syntax for ACPI/machine tables
Before we add new fields for SOF support, move to C99 syntax
as done for atom/sst and legacy hsw/bdw code
No functional change

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:21:23 +01:00
Pierre-Louis Bossart
7feb2f786a ASoC: move ACPI common code out of Intel/sst tree
ACPI support is not specific to the Intel/SST driver. Move the enumeration
and matching code which is not hardware-dependent to sound/soc and rename
relevant sst_acpi_ structures and functions with snd_soc_acpi_ prefix

soc-acpi.h is protected by a #ifndef __LINUX_SND_SOC_ACPI_H for
consistency with all other SoC .h files:

grep -L __LINUX include/sound/soc* | wc -l
0
grep __LINUX include/sound/soc* | wc -l
14

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:21:09 +01:00
Carlo Caione
39712db878 SoC: intel: byt: Introduce new custom IN2 map
Introduce a new custom dapm routes map to quirk platforms with the
internal mic connected to IN2P.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:11:35 +01:00
Colin Ian King
271ef65b58 ASoC: Intel: sst: remove redundant variable dma_dev_name
The pointer dma_dev_name is assigned but never read, it is redundant
and can therefore be removed.

Cleans up clang warning:
sound/soc/intel/common/sst-firmware.c:288:3: warning: Value stored to
'dma_dev_name' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-21 11:05:29 +01:00
Pierre-Louis Bossart
2193eb9631 ASoC: Intel: boards: remove hard-coded compressed dailinks
The hard-coded compressed dailinks are not supported using
publicly-available firmwares, which creates unnecessary user
confusion [1]. Even if the firmware was available, the mainline
code does not have the required .dynamic=1 and .dpcm_playback=1
fields so probably never worked as is, and last and they conflict
with topology-defined streams.

Remove them and move on. This can be re-enabled with SOF later
in a more flexible manner.

[1] http://mailman.alsa-project.org/pipermail/alsa-devel/2017-August/124868.html

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:30:29 +01:00
Pierre-Louis Bossart
149f775759 ASoC: Intel: boards: fix off-by-one dailink id
For some reason the Atom/HiFi2 machine drivers use an id=1 instead
of zero as done on all other platforms. This gets in the way of
topology-based matching, realign for consistency. This should
not have any functional impact on existing solutions with don't rely
on topology.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:30:25 +01:00
Pierre-Louis Bossart
dfb6ec7ae5 ASoC: Intel: boards: use helper to get codec_dai
Remove duplicate code with a common helper in all Intel machine drivers.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:30:22 +01:00
Pierre-Louis Bossart
8a2eca50c6 ASoC: Intel: bytcht_es8316: remove useless code
get_codec_dai() is not used, remove it

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:30:18 +01:00
Pierre-Louis Bossart
22a317a050 ASoC: Intel: bytcht_da7213: cosmetic fixes
Reorder variable names, change tests
No functional change

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:30:14 +01:00
Pierre-Louis Bossart
6cdf01a5ad ASoC: Intel: cht_bsw_rt5645: cosmetic fixes
Reorder variable names, change MCLK test, change quirks
No functional change

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:30:11 +01:00
Pierre-Louis Bossart
17b5273d84 ASoC: Intel: bytcr_rt5640: cosmetic fixes
Reorder variable names, change MCLK test, change quirks
No functional change

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:29:48 +01:00
Pierre-Louis Bossart
02c0a3b304 ASoC: Intel: bytcr_rt5651: add MCLK, quirks and cleanups
Same as for other codecs, enable MCLK by default. When it is not
present, e.g. on MinnowBoard B3 since it's not routed on the LSE
connector, we fall back to blck-based clocking.

The DMIC quirks are also fixed, there is a single DMIC input of the
codec.

reorder variables in reverse x-mas tree as suggested by Andy

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18 12:29:25 +01:00
Guneshwor Singh
364497aca1 ASoC: Intel: Skylake: Fix missing sentinel in sst_acpi_mach
To make it consistent, add sentinel for sst_cnl_devdata also.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-13 20:25:23 +01:00
Guneshwor Singh
606e21fd6f ASoC: Intel: Skylake: Add dai load ops for dais from topology
Since FE dais can come from topology, add dai_load ops
for the dais from topology.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-13 20:25:20 +01:00
Guneshwor Singh
c3ae22e39d ASoC: Intel: Skylake: Add flag to check to register FE dais from topology
Since FE dais can come from topology, split the FE dais from existing
dai array so that FE dais need not be registered if they come from
topology. Add use_tplg_pcm flag to check whether FE dais will be
registered from topology during dai driver component registration.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-13 20:25:03 +01:00
Jaikrishna Nemallapudi
5514830dff ASoC: Intel: Skylake: Modify skl_dsp_set_dma_control API arguments
Set dma control ipc can be used to set the M/N divider, enable the clks. It
takes different payload for different configuration. So modify the
skl_dsp_set_dma_control API to take the size and node_id as argument.

Signed-off-by: Jaikrishna Nemallapudi <jaikrishnax.nemallapudi@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-09 10:22:40 +01:00
Pierre-Louis Bossart
0087f20131 ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver
Remove dead code which was missed in previous changes. This is not
visible with git diff but there is a test+return on the same condition
just above.

Also reuse local variable instead of fetching the jack information twice.

Tested on Acer R11 (cyan)

Fixes: 3bbda5a386 ('ASoC: Intel: cht_bsw_max98090_ti: Fix jack initialization')
Cc: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-09 10:15:43 +01:00
Chintan Patel
d1c4cb447a ASoC: Intel: Skylake: Fix jack name format substitution
Jack name is not getting formatted correctly hence resulting
in invalid name for HDMI/DP input devices.

This was recently exposed due changes brought by MST:
commit 3a13347f05 ("ASoC: Intel: kbl: Add jack port initialize
in kbl machine drivers")

Signed-off-by: Chintan Patel <chintan.m.patel@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-28 09:30:41 -07:00
Harsha Priya N
4b2b915f88 ASoC: Intel: Kbl: Add Playback DAI for fixup
'Kbl Audio Headset Playback' FE DAI also needs SSP hw param fix.
Add this dai also to be handled in kabylake_ssp_fixup() call.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-27 10:04:43 -07:00
Pierre-Louis Bossart
57e9e87b35 ASoC: Intel: cht_bsw_rt5672: fix card name
For now reason the current card name is a ridiculous
'cherrytrailcraudio'. This isn't very useful or self-explanatory,
change to driver name cht-bsw-rt5672.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-25 17:15:21 +01:00
Pierre-Louis Bossart
e45e39123a ASoC: Intel: cht_bsw_rt5672: use actual HID in suspend/resume
The code scans all components looking for the default name
i2c-10EC5670:00, which of course doesn't work in platforms
where the BIOS uses a different HID such as Dell 5585

Since we already have the correct information available, just
use the actual codec name and length.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-25 17:14:52 +01:00
Colin Ian King
2b79b15c25 ASoC: Intel: Skylake: fix swapped order of function arguments dir and pin_index
The call to slk_tplg_fill_res_tkn is passing dir and pin_index in the
wrong order, they need to be in pin_index, dir order to match the function
slk_tplg_fill_res_tkn  correctly.

Detected by CoveritScan, CID#1454992 ("Arguments in wrong order")

Fixes: f6fa56e225 ("ASoC: Intel: Skylake: Parse and update module config structure")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-25 16:43:32 +01:00
Takashi Iwai
89db6f9632 ASoC: intel: Kill BUG_ON() usage
Don't use BUG_ON() for a non-critical sanity check on production
systems.  This patch either removes useless BUG_ON() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-20 12:45:50 +01:00
Corentin LABBE
870fcae998 ASoC: Intel: Atom: Remove unneeded linux/miscdevice.h include
No file in sound/soc/intel/ use any miscdevice.
This patch remove this uncessary include.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 16:55:17 +01:00
Pierre-Louis Bossart
355b3552d5 ASoC: Intel: cht_bsw_max98090: add gpio-based jack detection
Jacks are created but only enabled when the external TI chip is
present, this probably never worked as well. Forklift the gpio-based
code from the legacy byt-max98090 driver, with however a less strict
error check. It's fine to let users enjoy their device even if
jack detection doesn't work - it almost never does without quirks...

Tested on Lenovo100s

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:44:37 +01:00
Thierry Escande
3bbda5a386 ASoC: Intel: cht_bsw_max98090_ti: Fix jack initialization
If the ts3a227e audio accessory detection hardware is present and its
driver probed, the jack needs to be created before enabling jack
detection in the ts3a227e driver. With this patch, the jack is
instantiated in the max98090 headset init function if the ts3a227e is
present. This fixes a null pointer dereference as the jack detection
enabling function in the ts3a driver was called before the jack is
created.

[minor correction to keep error handling on jack creation the same
as before by Pierre Bossart]

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:44:30 +01:00
Pierre-Louis Bossart
c809fb1e84 ASoC: Intel: atom: use cht_bsw_max98090 for Baytrail Chromebooks
Baytrail Chromebooks used to be managed with legacy driver which
is not compatible with atom/sst drivers. Reuse CHT driver to
handle max98098 codec and allow distributions to support all
Atom platforms with the same build.

The legacy byt-max98090 can still be used but in a build for
Baytrail+max98090 only.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:44:25 +01:00
Pierre-Louis Bossart
299bad365b ASoC: Intel: cht_bsw_max98090: add support for Baytrail
Distributions such as Fedora, Ubuntu and Gallium don't currently
have a means to support Baytrail Chromebooks and other platforms
with the same build [1][2] due to incompatible platform drivers.

Add MCLK management to reuse this machine driver for Baytrail
platforms and solve this coexistence problem at last. UCM files are
provided at [3] and will eventually be submitted to the new repo.

The legacy byt-max98090 machine driver is still maintained but can
only be used when the other Atom/DPCM driver is not compiled in, or
when users don't want to configure extra mixers required by the
Atom/sst driver.

Tested on Lenovo 100s Baytrail Chromebook w/ Mr. Chromebox BOOT_STUB
firmware and Acer R11 Cherrytrail Chromebook

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1335196
[2] http://mailman.alsa-project.org/pipermail/alsa-devel/2016-August/
111641.html
[3] https://github.com/plbossart/UCM/tree/master/byt-max98090

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:44:20 +01:00
Pierre-Louis Bossart
948c5e192e ASoC: Intel: cht_bsw_max98090: Fix I2S config + unused code
This driver probably never worked, the slots are configured
for 2ch 16 bit and the SSP2 as 24 bits, the cpu_dai configured as
LEFT_J and the codec_dai as I2S.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:41:45 +01:00
Pierre-Louis Bossart
60f5cbae49 ASoC: Intel: bytcr_rt5640: simplify MCLK quirk tests
remove redundant tests to check MCLK (align with other
machine drivers). some checks remain since when the MCLK is
disabled we fall back to using the bclk as PLL reference

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:37:02 +01:00
Pierre-Louis Bossart
6356c78c68 ASoC: Intel: bytcr-rt5651: fix capture routes
There is only one dmic path and the routes were not added.
Probably a copy-paste mistake when initially creating the
file

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:36:23 +01:00
Pierre-Louis Bossart
7735bce05a ASoC: Intel: boards: use devm_clk_get() unconditionally
The clock framework was only used in Baytrail, on Cherrytrail
the firmware takes care of the MCLK/plt_clk_3.

With the fix in 'commit d31fd43c0f
("clk: x86: Do not gate clocks enabled by the firmware")'

the firmware-managed clocks are not impacted by enable/disable
requests make at the driver level, and the rates are identical.

Remove all checks for Baytrail and use devm_clk_get()
unconditionally. Tested on Asus T100HA (CHT) and Asus T100TAF (BYT)

Note that the RT5640 and RT5645 machine drivers need to keep some
checks for Valleyview to check for Baytrail-CR.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 14:36:18 +01:00
Bhumika Goyal
86cb5dee23 ASoC: Intel: atom: make sst_platform_compr_ops const
Make this const as it not modified in the file referencing it.
It only stored in the const field 'compr_ops' of a snd_soc_platform_driver
structure. Also, add const to the declaration in the header file.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19 13:33:31 +01:00
Naveen M
ae09a4783b ASoC: Intel: Headset button support in kabylake machine driver
Patch adds headset button support for kabylake machine driver
(kbl_rt5663_max98927).

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>
2017-09-19 13:32:56 +01:00
Mark Brown
796ff73a08 Merge remote-tracking branches 'asoc/topic/hisi', 'asoc/topic/img', 'asoc/topic/jack' and 'asoc/topic/jz4740' into asoc-next 2017-09-01 12:12:41 +01:00
Mark Brown
460f623a6e Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-09-01 12:12:19 +01:00
Mark Brown
c8b24e23ad Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2017-09-01 12:12:11 +01:00
Mark Brown
72aaea38a2 ASoC: Fixes for v4.13
A couple of fixes, one for a regression in simple-card introduced during
 the merge window that was only reported this week and another for a
 regression in registration of ACPI GPIOs.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlmn+AUTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0FTNB/9mqEy0JFFxpr5K5z9YxgXIqJTtIcEV
 IoWyrPsZauGYN1OV1ozD6Fih9ZXM4Mp9zZ3UupY3WidSDJksz89r2eLUSCeXPMHL
 lY/Cpbq4/4ZVQVXZIY0UskbYqXQrbcadSyQqrX/EfvP5qQwMN5DVvRg4GlAKdTE0
 kPVnOOcpEnHbFk3r5hEqRa9zynFog0xGwO45G8mHtEjOstrPNECBELdfc3sUqt55
 PGQPMaNWLRK7mk/EmT2hEcAZx0U9IFXkZ0vymqhVnxZ6pyZEu8YRrzW9oulmHdvU
 G+KTm/LqcyzEzQTYFI7VxukOd84MT+xwN/2bHNm0ViAdo8xruhkMU3rH
 =ag+w
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.13-rc7' into asoc-linus

ASoC: Fixes for v4.13

A couple of fixes, one for a regression in simple-card introduced during
the merge window that was only reported this week and another for a
regression in registration of ACPI GPIOs.

# gpg: Signature made Thu 31 Aug 2017 12:50:29 BST
# gpg:                using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0
# gpg:                issuer "broonie@kernel.org"
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [unknown]
# gpg:                 aka "Mark Brown <broonie@debian.org>" [unknown]
# gpg:                 aka "Mark Brown <broonie@kernel.org>" [unknown]
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>" [unknown]
# gpg:                 aka "Mark Brown <broonie@linaro.org>" [unknown]
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 3F25 68AA C269 98F9 E813  A1C5 C3F4 36CA 30F5 D8EB
#      Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2  9FEA 24D6 8B72 5D54 87D0
2017-09-01 12:12:09 +01:00
Pradeep Tewani
38a770859e ASoC: Intel: Skylake: Add IPC to configure the copier secondary pins
Copier can support upto 4 output pins. However, only pin 0 is configured
as a part of copier initialization. Configuring rest of pins require the
separate IPC to be sent to fw.

Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-01 12:06:35 +01:00
Naveen Manohar
64220b9d10 ASoC: Intel: kbl: Add map for Maxim IV Feedback
MAX98927 provides IV feedback on the capture widget.
Here we are connecting the capture widget to SSP0_RX and
SSP0_RX to the algorithm running on host.

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-29 19:47:37 +01:00
Naveen M
3a13347f05 ASoC: Intel: kbl: Add jack port initialize in kbl machine drivers
After the pcm jack is created, create and initialize the pin switch
widget for each port. For hdmi audio, invoke hdac_hdmi_jack_port_init
func() in rt5663_max98927 & rt5663_rt5514_max98927 to enable the pin,
when monitor is connected.

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>
2017-08-29 19:37:00 +01:00
Naveen M
c20252cf92 ASoC: Intel: kbl: Add MST route change to kbl machine drivers
To support MST hdmi audio, modify the current routes to be based
on port in rt5663_max98927 & rt5663_rt5514_max98927 machine.

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>
2017-08-29 19:36:54 +01:00
Jeeja KP
91fe0e70db ASoC: Intel: Skylake: Update module id in pin connections
Each module's id comes from the topology and gets updated in the
driver. This patch updates the input and output pin connections of
each module by matching the uuid for each module.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-25 14:54:10 +01:00
Ramesh Babu
f6fa56e225 ASoC: Intel: Skylake: Parse and update module config structure
A dsp path and the modules in the path can support various pcm
configurations. The list of supported pcm configurations from topology
manifest would be stored and later selected runtime based on the hw
pcm params. For legacy, module data is filled in the 0th index of
resource and interface table.

To accommodate both models, change the relevant structures and populate
them by parsing newly defined tokens. This change is backward compatible
with the existing model where driver computes the resources required by
each dsp module.

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-25 14:54:06 +01:00
Shreyas NC
db6ed55de6 ASoC: Intel: Skylake: Populate module data from topology manifest
All the module common data will now be populated in the topology
manifest. This includes the resource and interface list supported by
the module. With this, driver need not compute the resources required
by each dsp module for a particular pcm parameter since it comes as a
part of the topology manifest.

So, add functions to parse the manifest tokens to populate the module
config data structure.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-25 14:54:02 +01:00
Shreyas NC
822c3b044f ASoC: Intel: Skylake: Add driver structures to be filled from topology manifest
The topology manifest would include module common data including resource
and interface table. The resource table consists of resources required by
the dsp module such as buffer size, cycles per second, number of
input/output pins. And, the interface table consists of pcm parameters per
module which can be referenced later.

So define the structures accordingly to represent topology manifest data in
the driver.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-25 14:53:59 +01:00
Shreyas NC
ca312fda69 ASoC: Intel: Skylake: Commonize parsing of format tokens
Format resource tokens can be a part of either the widget or manifest
private data. In the current model, format resources come as a part of
widget private data and they come as a part of topology manifest in the
newly introduced model.

So add a common function that can fill up either of the structures.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-25 14:53:55 +01:00
Shreyas NC
9fc129f6e5 ASoC: Intel: Skylake: Parse multiple manifest data blocks
Currently we can parse a single manifest data block. But manifest
private data can have multiple data blocks.

So, fix the parsing logic to parse multiple data blocks by returning
offset of each parsed data block.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-25 14:53:47 +01:00
Subhransu S. Prusty
9149916f1e ASoC: Intel: Skylake: Fix uninitialized return
On failure to get dsp_ops, dsp_init returns error without assigning ret. ret
is assigned in code path which will never be executed. Fix it.

Fixes: f77d443c4c ("ASoC: Intel: Skylake: Fix to free resources for dsp_init failure"
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23 16:50:21 +01:00
Subhransu S. Prusty
7b992c24de ASoC: Intel: Skylake: Fix DSP core ref count for init failure
During dsp init failure, the ref count is not incremented and dsp is
powered down. But as the skl driver calls put_core for the init failure it
decrements the dsp core ref count and ref count becomes unbalanced.

This results in dsp core powered up in further runtime suspend/resume
cycles and never powered down.

So increment the ref count before dsp core powerup and for any failure,
decrement in put_core will be balanced.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23 11:55:18 +01:00
Subhransu S. Prusty
c360e0c3ab ASoC: Intel: Skylake: Fix to free correct dev id in free_irq
The dev_id passed by the driver in request_threaded_irq is an ebus pointer,
whereas to free_irq it is hdac_bus. Fix by passing correct dev_id to
free_irq.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23 11:55:14 +01:00
Subhransu S. Prusty
f77d443c4c ASoC: Intel: Skylake: Fix to free resources for dsp_init failure
unmap mmio and free memory resources if dsp_init fails.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23 11:55:11 +01:00
Subhransu S. Prusty
3b3011adad ASoC: Intel: Skylake: Fix to free dsp resource on ipc_init failure
For some dsp init error path, irq and few more resources are not freed.
This results in oops. So, fix it by freeing up the resources on ipc_init
failure.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23 11:55:07 +01:00
Takashi Iwai
804e73adf5 ASoC: rt5670: Fix GPIO headset detection regression
RT5670 codec driver and its machine driver for Intel CHT assume the
implicit GPIO mapping on the index 0 while BIOS on most devices don't
provide it.  The recent commit f10e4bf663 ("gpio: acpi: Even more
tighten up ACPI GPIO lookups") restricts such cases and it resulted in
a regression where the headset jack setup fails like:

  rt5670 i2c-10EC5672:00: ASoC: Cannot get gpio at index 0: -2
  rt5670 i2c-10EC5672:00: Adding jack GPIO failed

For fixing this, we need to provide the GPIO mapping explicitly in the
machine driver.  Also this patch corrects the string to be passed to
gpiolib to match with the pre-given mapping, too.

Fixes: f10e4bf663 ("gpio: acpi: Even more tighten up ACPI GPIO lookups")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-22 13:48:34 +01:00
Takashi Iwai
51f25e7f92 ASoC: intel: Remove superfluous snd_soc_jack_free_gpios() call
Since jack gpios are managed via devres, we don't have to call
snd_jack_free_gpios() at release any longer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-22 13:38:47 +01:00
Harsha Priya N
80b6490392 ASoC: Intel: Headset button support in kabylake machine driver
This patch adds headset button support for kabylake machine driver
(kbl_rt5663_rt5514_max98927).

Signed-off-by: Hsin-yu Chao <hychao@google.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-22 12:09:42 +01:00
Harsha Priya N
d46b182840 ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
Patch fixes cracking noise in rt5663 headphones for kbl platform by
calling rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER to set
ASRC.

The ASRC function is for asynchronous MCLK and LRCLK. For RT5663 ASRC
should be enabled to support pcm format with 100fs.
ASRC function will track i2s clock and generate corresponding
system clock for codec. Calling this func helps select clock source
for both RT5663_AD_STEREO_FILTER and RT5663_DA_STEREO_FILTER filters
which fixes the crackling sound.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@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>
2017-08-17 18:05:04 +01:00
Bhumika Goyal
8df397ff0e ASoC: Intel: Skylake: make snd_pcm_hardware const
Make this const as it is only passed as the 2nd argument to the
function snd_soc_set_runtime_hwparams, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-17 17:58:17 +01:00
Bhumika Goyal
a7468e478a ASoC: Intel: Atom: make snd_pcm_hardware const
Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-17 17:58:14 +01:00
Harsha Priya N
393a829bb2 ASoC: Intel: kbl_rt5663_rt5514_max98927: Add rt5514 spi dailink
This patch adds a dai to rt5514-spi driver for wake on voice functionality.

Signed-off-by: Hsin-yu Chao <hychao@google.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-17 15:25:08 +01:00
Markus Elfring
92ec46da6e ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe()
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-16 13:00:55 +01:00
Julia Lawall
70bad123ea ASoC: Intel: constify snd_compr_codec_caps structures
These snd_compr_codec_caps structures are only copied into other
structures, so they can be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-16 12:01:23 +01:00
Bhumika Goyal
2788808a1b ASoC: Intel: Skylake: make skl_dsp_fw_ops const
Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-16 12:01:15 +01:00
Bhumika Goyal
2d5f848781 ASoC: Intel: kbl: make snd_pcm_hw_constraint_list const
Make these const as they are only passed to the function
snd_pcm_hw_constraint_list having the corresponding argument as const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-16 12:01:03 +01:00
Arvind Yadav
f2c402ba55 ASoC: intel: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/soc.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-14 17:23:08 +01:00
Bhumika Goyal
80cc4df8b4 ASoC: Intel: make snd_soc_platform_driver const
Make these const as they are only passed as the 2nd argument to the
function snd_soc_register_platform, which is of type const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-14 17:22:29 +01:00
Arvind Yadav
67e8ee9b4b ASoC: Intel: constify pci_device_id.
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-04 11:18:55 +01:00
Guneshwor Singh
86d7ce3dd7 ASoC: Intel: cnl: add pci id for cnl
Enable cnl by adding its pci id in skl_ids[].

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:39 +01:00
Guneshwor Singh
b003a345dc ASoC: Intel: cnl: add dsp ops for cannonlake
Add cannonlake dsp support by adding its dsp_ops.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:36 +01:00
Guneshwor Singh
cb6a552846 ASoC: Intel: cnl: Add sst library functions for cnl platform
This adds the necessary DSP functions specific for the Cannonlake platform
which includes firmware download using host DMA, DO/D3 handlers, irq_thread
handlers and sst ops.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:33 +01:00
Guneshwor Singh
4bdb04f0e1 ASoC: Intel: cnl: Unstatify common ipc functions
Common ipc functions can be reused for cnl, so make them non-static.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:29 +01:00
Guneshwor Singh
2eed1b024a ASoC: Intel: Skylake: Move platform specific init to platform dsp_init()
Move ipc_init() from helper function to respective platform's dsp_init()
as ipc_init() per platform can be different.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:26 +01:00
Guneshwor Singh
a838dcc286 ASoC: Intel: cnl: Add cnl dsp functions and registers
This adds Cannonlake specific registers and support for CNL dsp related
library functions for programming the registers to power up/down dsp cores,
set/unset reset states for each core, enable/disable ipc interrupts and few
wrappers to be called from elsewhere.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:23 +01:00
Pardha Saradhi K
4147a6e59a ASoC: Intel: Skylake: Add dsp cores management
This patch adds support to manage additional cores on a demand basis.
For instance, if module is set to run on certain core, the particular
core is powered up in module init. The same is again powered down in
module unload.

Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:19 +01:00
Guneshwor Singh
f0a550a883 ASoC: Intel: Skylake: Use num_core to allocate instead of macro
For different platforms, number of dsp cores can vary. So instead of
creating array of size SKL_DSP_CORES_MAX, use num_core in dsp_ops() of
the respective platform to allocate core usage counts and states.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:15 +01:00
Dharageswari R
363d45385f ASoC: Intel: Skylake: Add num of cores in dsp ops
Number of dsp cores may differ for different platforms hence
adding it in dsp ops.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:12 +01:00
Naveen Manohar
0b06122fc8 ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo Ref
Modified DAPM Machine map for machine to suit the toplogy change
required to enable features:
Multi-Endpoint Playback
Echo Reference Capture

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:09 +01:00
Naveen Manohar
b32ee384ac ASoC: Intel: kbl: Add DAI links for Multi-Playback & Echo-reference
Add new FE DAI links to support:
1. Parallel playback on 2 ports simultaneously
2. Echo reference capture capability

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:05 +01:00
Naveen Manohar
da3cbb40f3 ASoC: Intel: kbl: Add new FEs for Multi-Playback & Echo-Reference
Adding new frontends to support:
1. Parallel playback on 2 ports simultaneously
2. Echo reference capture capability

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:06:33 +01:00
Naveen Manohar
d70c4a0481 ASoC: Intel: Skylake: Use correct nuvoton codec ID
Correcting the nau88l25 codec ID to match secondary codec
and load the machine driver.

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 10:23:03 +01:00
Mark Brown
7e5fed09dd Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2017-08-01 15:17:04 +01:00
guneshwor.o.singh@intel.com
10a5439f0e ASoC: Intel: Skylake: Fix potential null pointer dereference
Check if the next sink is not null to avoid potential null pointer
dereference in skl_tplg_bind_sinks().

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:34:09 +01:00
guneshwor.o.singh@intel.com
693c0fb26a ASoC: Intel: Skylake: Remove return check for skl_codec_create()
Since skl_codec_create() always returns 0, make it return void and remove
return check.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:34:05 +01:00
Dronamraju Santosh P K
3fbbcf4dad ASoC: Intel: bxtn: Remove code loader reference in cleanup
Since Broxton does not use code loader DMA, remove code loader cleanup
in its dsp cleanup routine. Remove the iounmap too as it is done in
skl_free_dsp().

Signed-off-by: Dronamraju Santosh P K <santosh.pavan.kumarx.dronamraju@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:34:01 +01:00
guneshwor.o.singh@intel.com
60767abcea ASoC: Intel: Skylake: Reset the controller in probe
Controller can be in reset state by default. Capability structure
traversal requires the controller to be out of reset else it
results in broken capability parsing. Hence make sure that controller is
out of reset before parsing capabilities by doing a full reset.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:33:58 +01:00
Harsha Priya N
cc4db0e257 ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform
This patch enables 4 slot IV feedback for max98927 speaker amp codec.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:42:58 +01:00
Harsha Priya N
6512dd4dcf ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform
This patch fixes the pop noise in dmic recording using rt5514 on kabylake platform.
This patch enables the rt5514 to use MCLK instead of BLCK as the sysclock which fixes
the pop noise.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:42:28 +01:00
Harsha Priya N
349d63c33a ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform
This patch fixes the cracking noise in rt5663 headphones for kabylake platform
by calling rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER to set ASRC.

The ASRC function is for asynchronous MCLK and LRCK. For RT5663 ASRC should be
enabled to  support special i2s clock format like Intel's 100fs.
ASRC function will track i2s clock and generate a corresponding
system clock for codec. Calling this function helps select the clock source
for both RT5663_AD_STEREO_FILTER and RT5663_DA_STEREO_FILTER filters
which fixes the crackling sound.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:42:23 +01:00
Kevin Cheng
0dfa7a046a ASoC: Intel: Add Kabylake RT5663 machine driver entry
Adds Kabylake rt5663 machine driver entry into machine table

Signed-off-by: Kevin Cheng <kevin.cheng@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:35:46 +01:00
Kevin Cheng
c06425705a ASoC: Intel: Add Kabylake machine driver for RT5663
This patch adds Kabylake I2S machine driver which uses
RT5663 as headset on ssp1.

Signed-off-by: Kevin Cheng <kevin.cheng@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:35:42 +01:00
Pradeep Tewani
82444cdb46 ASoC: Intel: board: Fix missing sentinel for bxt_board_id
Without a sentinel in the array of platform devices, we can get a panic
so add a sentinel. Full stack dump below:

[  231.564705] BUG: KASAN: global-out-of-bounds in platform_match+0xb0/0x146
[  231.565500] Read of size 1 at addr ffffffff8380a1a0 by task swapper/0/1
[  231.566280]
[  231.566594] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-00289-g152771f #1
[  231.567526] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[  231.568730] Call Trace:
[  231.569128]  dump_stack+0xf8/0x14a
[  231.569615]  print_address_description+0x57/0x1e4
[  231.570216]  ? driver_probe_device+0x814/0x814
[  231.570798]  kasan_report+0x1cb/0x1eb
[  231.571302]  ? platform_match+0xb0/0x146
[  231.571833]  __asan_load1+0x45/0x47
[  231.572324]  platform_match+0xb0/0x146
[  231.572843]  ? platform_uevent+0x73/0x73
[  231.573370]  __driver_attach+0x47/0x16a
[  231.573890]  bus_for_each_dev+0x11a/0x15c
[  231.574422]  ? bus_remove_file+0x57/0x57
[  231.574951]  ? do_raw_spin_unlock+0xc3/0xe0
[  231.575501]  driver_attach+0x2b/0x2e
[  231.576002]  bus_add_driver+0x25e/0x3c5
[  231.576520]  ? set_debug_rodata+0x20/0x20
[  231.584776]  driver_register+0x13e/0x19d
[  231.585305]  __platform_driver_register+0x6c/0x71
[  231.585908]  ? skl_driver_init+0x20/0x20
[  231.586436]  broxton_audio_init+0x17/0x19
[  231.586976]  do_one_initcall+0x11a/0x221
[  231.587499]  ? start_kernel+0x525/0x525
[  231.588020]  ? lock_downgrade+0x281/0x2ec
[  231.588557]  ? trace_hardirqs_on_caller+0x223/0x267
[  231.589169]  ? _raw_spin_unlock_irqrestore+0x49/0x55
[  231.589791]  ? set_debug_rodata+0x20/0x20
[  231.590324]  kernel_init_freeable+0x1fd/0x2b0
[  231.590891]  ? rest_init+0x17c/0x17c
[  231.591384]  kernel_init+0x11/0x157
[  231.591876]  ? rest_init+0x17c/0x17c
[  231.592371]  ret_from_fork+0x2a/0x40
[  231.592865]
[  231.593166] The buggy address belongs to the variable:
[  231.593806]  bxt_board_ids+0x40/0x9e0

Fixes: 152771fbc3 ("ASoC: Intel: board: Add Geminilake platform support")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-26 13:03:32 +01:00
Vinod Koul
b76e3f9333 ASoC: Intel: Skylake: Fix missing sentinels in sst_acpi_mach
Couple of instances of sst_acpi_mach were having missing sentinels
so add them up

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-26 13:03:18 +01:00
Pradeep Tewani
669eb871c4 ASoC: Intel: board: Add Geminilake platform support
Geminilake also features rt298 codec, so use the same machine driver
as Broxton. Geminilake uses SSP2 instead of SSP5.

Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-20 12:20:39 +01:00
Pradeep Tewani
0e46ccd5bc ASoC: Intel: board: Remove .owner initialization in bxt_rt298 driver
The .owner field is not required to be initialized in the driver. So,
remove it.

Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-20 12:20:26 +01:00
Gustavo A. R. Silva
c115a3178b ASoC: Intel: Atom: constify snd_soc_dai_ops structures
These structures are only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 15:22:12 +01:00