platform/kernel/linux-rpi.git
6 years agoASoC: qcom: Add support to parse common audio device nodes
Rohit kumar [Wed, 1 Aug 2018 09:01:08 +0000 (14:31 +0530)]
ASoC: qcom: Add support to parse common audio device nodes

This adds support to parse cpu, platform and codec
device nodes and add them in dai-links. Also, update
apq8096 machine driver to use the common API.

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dt-bindings: Update dt binding name for apq8096
Rohit kumar [Wed, 1 Aug 2018 09:01:07 +0000 (14:31 +0530)]
ASoC: dt-bindings: Update dt binding name for apq8096

Remove qcom prefix from machine driver dt bindings of
apq8096 SoC.

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qcom: dt-bindings: Add sdm845 machine bindings
Rohit kumar [Wed, 1 Aug 2018 09:01:06 +0000 (14:31 +0530)]
ASoC: qcom: dt-bindings: Add sdm845 machine bindings

Add devicetree bindings documentation file for SDM845 sound card.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge tag 'clk-core-duty-cycle-for-mark' of git://git.kernel.org/pub/scm/linux/kernel...
Mark Brown [Wed, 1 Aug 2018 10:43:52 +0000 (11:43 +0100)]
Merge tag 'clk-core-duty-cycle-for-mark' of git://git./linux/kernel/git/clk/linux into asoc-4.19

Duty cycle support for the clk api and drivers.

6 years agoMerge branch 'topic/drm_audio_component' of https://git.kernel.org/pub/scm/linux...
Mark Brown [Wed, 1 Aug 2018 09:32:05 +0000 (10:32 +0100)]
Merge branch 'topic/drm_audio_component' of https://git./linux/kernel/git/tiwai/sound into asoc-4.19

6 years agoASoC: wcd9335: add CLASS-H Controller support
Srinivas Kandagatla [Fri, 27 Jul 2018 12:18:01 +0000 (13:18 +0100)]
ASoC: wcd9335: add CLASS-H Controller support

CLASS-H controller/Amplifier is common accorss Qualcomm WCD codec series.
This patchset adds basic CLASS-H controller apis for WCD codecs after
wcd9335 to use.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wcd9335: add support to wcd9335 codec
Srinivas Kandagatla [Fri, 27 Jul 2018 12:18:00 +0000 (13:18 +0100)]
ASoC: wcd9335: add support to wcd9335 codec

Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC,
It supports both I2S/I2C and SLIMbus audio interfaces.
On slimbus interface it supports two data lanes; 16 Tx ports
and 8 Rx ports. It has Seven DACs and nine dedicated interpolators,
Seven (six audio ADCs, and one VBAT ADC), Multibutton headset
control (MBHC), Active noise cancellation and Sidetone paths
and processing.

This patchset adds very basic support for playback and capture
via the 9 interpolators and ADC respectively.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dt-bindings: add dt bindings for wcd9335 audio codec
Srinivas Kandagatla [Fri, 27 Jul 2018 12:17:57 +0000 (13:17 +0100)]
ASoC: dt-bindings: add dt bindings for wcd9335 audio codec

This patch adds bindings for wcd9335 audio codec which can support both SLIMbus
and I2S/I2C interface.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: uniphier: change functions to static
Katsuhiro Suzuki [Fri, 27 Jul 2018 02:37:44 +0000 (11:37 +0900)]
ASoC: uniphier: change functions to static

This patch changes some functions that are not used by other objects
to static.

Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: uniphier: add support for multichannel output
Katsuhiro Suzuki [Fri, 27 Jul 2018 02:37:28 +0000 (11:37 +0900)]
ASoC: uniphier: add support for multichannel output

This patch adds multichannel PCM output support for LD11/LD20.
Currently driver tested and supported only 2ch, 6ch, and 8ch.

Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sirf: Fix potential NULL pointer dereference
Gustavo A. R. Silva [Thu, 26 Jul 2018 20:49:10 +0000 (15:49 -0500)]
ASoC: sirf: Fix potential NULL pointer dereference

There is a potential execution path in which function
platform_get_resource() returns NULL. If this happens,
we will end up having a NULL pointer dereference.

Fix this by replacing devm_ioremap with devm_ioremap_resource,
which has the NULL check and the memory region request.

This code was detected with the help of Coccinelle.

Cc: stable@vger.kernel.org
Fixes: 2bd8d1d5cf89 ("ASoC: sirf: Add audio usp interface driver")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: tegra_alc5632: fix device_node refcounting
Alexey Khoroshilov [Fri, 27 Jul 2018 21:06:59 +0000 (00:06 +0300)]
ASoC: tegra_alc5632: fix device_node refcounting

tegra_alc5632_probe() increments reference count of device nodes
with of_parse_phandle(), but there is no code decrementing them
in the driver.

The patch adds of_node_put() to tegra_alc5632_remove() and
to error handling paths in the probe.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sh: Kconfig: convert to SPDX identifiers
Kuninori Morimoto [Mon, 30 Jul 2018 08:00:22 +0000 (08:00 +0000)]
ASoC: sh: Kconfig: convert to SPDX identifiers

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: ak4613: convert to SPDX identifiers
Kuninori Morimoto [Mon, 30 Jul 2018 07:53:08 +0000 (07:53 +0000)]
ASoC: ak4613: convert to SPDX identifiers

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: da7210: convert to SPDX identifiers
Kuninori Morimoto [Mon, 30 Jul 2018 07:52:46 +0000 (07:52 +0000)]
ASoC: da7210: convert to SPDX identifiers

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: ak4554: convert to SPDX identifiers
Kuninori Morimoto [Mon, 30 Jul 2018 07:52:15 +0000 (07:52 +0000)]
ASoC: ak4554: convert to SPDX identifiers

As original license mentioned, it is GPL-2.0 in SPDX.
Then, MODULE_LICENSE() should be "GPL v2" instead of "GPL".
See ${LINUX}/include/linux/module.h

"GPL"           [GNU Public License v2 or later]
"GPL v2"        [GNU Public License v2]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: ak4642: convert to SPDX identifiers
Kuninori Morimoto [Mon, 30 Jul 2018 07:51:41 +0000 (07:51 +0000)]
ASoC: ak4642: convert to SPDX identifiers

As original license mentioned, it is GPL-2.0 in SPDX.
Then, MODULE_LICENSE() should be "GPL v2" instead of "GPL".
See ${LINUX}/include/linux/module.h

"GPL"           [GNU Public License v2 or later]
"GPL v2"        [GNU Public License v2]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoALSA: memalloc: Fix missing PAGE_SIZE definition
Takashi Iwai [Mon, 30 Jul 2018 06:46:40 +0000 (08:46 +0200)]
ALSA: memalloc: Fix missing PAGE_SIZE definition

The recent fix moved the inline snd_sgbuf_aligned_pages() outside the
ifdef, and this triggered a build error on some architectures due to
the undefined PAGE_SIZE, as spotted by 0day bot.
Fix it by adding the missing header inclusion.

Fixes: 4cae99d9b530 ("ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dmaengine: Use standard pcm_format_to_bits() macro
Takashi Iwai [Wed, 25 Jul 2018 21:17:22 +0000 (23:17 +0200)]
ASoC: dmaengine: Use standard pcm_format_to_bits() macro

The conversion from PCM format type to bits needs an explicit cast,
and it'll be uglier.  Since we have a standard macro for that, let's
use it instead.

This patch fixes the sparse warning:
  sound/soc/soc-generic-dmaengine-pcm.c:200:63: warning: restricted snd_pcm_format_t degrades to integer

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pcm186x: Declare PCM format with snd_pcm_format_t
Takashi Iwai [Wed, 25 Jul 2018 21:17:21 +0000 (23:17 +0200)]
ASoC: pcm186x: Declare PCM format with snd_pcm_format_t

The PCM format type is with __bitwise, so we should use the dedicated
snd_pcm_format_t instead of int.

This fixes the sparse warning like:
  sound/soc/codecs/pcm186x.c:268:44: warning: incorrect type in initializer (different base types)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl: Use snd_mask_set_format()
Takashi Iwai [Wed, 25 Jul 2018 21:17:20 +0000 (23:17 +0200)]
ASoC: fsl: Use snd_mask_set_format()

Use the new helper function snd_mask_set_format() for avoiding the
ugly cast with __force prefix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: intel: Fix snd_pcm_format_t handling
Takashi Iwai [Wed, 25 Jul 2018 21:17:19 +0000 (23:17 +0200)]
ASoC: intel: Fix snd_pcm_format_t handling

As sparse warns, the PCM format type can't be dealt as integer as
found in Intel SST driver codes.

Fix them in the following two ways:

- The open code with snd_mask_set() and params->masks reference is
  replaced with params_set_format()

- The rest codes with snd_mask_set(fmt, SNDRV_PCM_FORMAT_XXX) are
  replaced with the new helper, snd_mask_set_format().

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: doc: Replace open code with params_set_format()
Takashi Iwai [Wed, 25 Jul 2018 21:17:18 +0000 (23:17 +0200)]
ASoC: doc: Replace open code with params_set_format()

The example code in dpcm.rst contains an open code calling
snd_mask_set(), and this can be better represented with
params_set_format() instead.  This automatically fixes the sparse
warning about snd_pcm_format_t handling, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoALSA: pcm: Add snd_mask_set_format() helper for standard usages
Takashi Iwai [Wed, 25 Jul 2018 21:17:17 +0000 (23:17 +0200)]
ALSA: pcm: Add snd_mask_set_format() helper for standard usages

Many drivers calling snd_mask_set() need to do ugly cast with __force
for shutting up the sparse warnings.  Actually almost all of them are
about setting the format, so it's far better to provide a common
helper snd_mask_set_format() to pass SNDRV_PCM_FORMAT_* directly
without the cast.

There are a few other calls of snd_mask_set(), but they are in the PCM
core code, so we leave them for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge tag 'alsa-add-snd-sgbuf-aligned-pages' of https://git.kernel.org/pub/scm/linux...
Mark Brown [Thu, 26 Jul 2018 16:08:39 +0000 (17:08 +0100)]
Merge tag 'alsa-add-snd-sgbuf-aligned-pages' of https://git./linux/kernel/git/broonie/sound into asoc-4.19

ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally

Make this helper inline function available for all platforms. This
helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not
defined.

6 years agoALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally
Pierre-Louis Bossart [Wed, 25 Jul 2018 20:15:56 +0000 (15:15 -0500)]
ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally

Make this helper inline function available for all platforms. This
helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not
defined.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dapm: Use int for format bit position
Takashi Iwai [Wed, 25 Jul 2018 20:43:26 +0000 (22:43 +0200)]
ASoC: dapm: Use int for format bit position

fmt in snd_soc_dai_link_event() contains the format bit position, not
the format bit itself.  Hence it can be a simple integer instead of
the explicit u64.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dmaengine: Fix missing __user prefix in copy_user callback
Takashi Iwai [Wed, 25 Jul 2018 20:42:08 +0000 (22:42 +0200)]
ASoC: dmaengine: Fix missing __user prefix in copy_user callback

It seems that __user prefix was forgotten to be added to
dmaengine_copy_user callback while we refactored the user-copy PCM
core.

This patch adds the missing prefix, remove the superfluous cast, and
add the needed cast (__force is needed for downgrading from user
pointer to kernel pointer), too.

Spotted by a sparse warning like:
  sound/soc/soc-generic-dmaengine-pcm.c:397:27: warning: incorrect type in initializer (incompatible argument 4 (different address spaces))

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: zte: Fix incorrect PCM format bit usages
Takashi Iwai [Wed, 25 Jul 2018 20:40:49 +0000 (22:40 +0200)]
ASoC: zte: Fix incorrect PCM format bit usages

zx-tdm driver sets the DAI driver definitions with the format bits
wrongly set with SNDRV_PCM_FORMAT_*, instead of SNDRV_PCM_FMTBIT_*.

This patch corrects the definitions.

Spotted by a sparse warning:
  sound/soc/zte/zx-tdm.c:363:35: warning: restricted snd_pcm_format_t degrades to integer

Fixes: 870e0ddc4345 ("ASoC: zx-tdm: add zte's tdm controller driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rsnd: Document R-Car M3-N support
Hiroyuki Yokoyama [Wed, 25 Jul 2018 20:40:15 +0000 (05:40 +0900)]
ASoC: rsnd: Document R-Car M3-N support

Document support for the sound modules in the Renesas M3-N (r8a77965)
SoC.

No driver update is needed.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: align axg card driver with DT bindings documentation
Jerome Brunet [Thu, 26 Jul 2018 12:45:44 +0000 (14:45 +0200)]
ASoC: meson: align axg card driver with DT bindings documentation

Drop amlogic prefix in front of the generic DT properties and change
property "name" to "model".

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: update axg sound card bindings
Jerome Brunet [Thu, 26 Jul 2018 12:45:43 +0000 (14:45 +0200)]
ASoC: meson: update axg sound card bindings

Remove the amlogic prefix in front of the generic properties and change
the card 'name' property to 'model'

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: use IRQ_RETVAL in the fifo irq handler
Jerome Brunet [Thu, 26 Jul 2018 12:45:42 +0000 (14:45 +0200)]
ASoC: meson: use IRQ_RETVAL in the fifo irq handler

Use IRQ_RETVAL instead of the open coded ternary operation.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Fix build warning
Akshu Agrawal [Thu, 26 Jul 2018 06:04:08 +0000 (14:04 +0800)]
ASoC: AMD: Fix build warning

Fixes
sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_probe':
sound/soc/amd/acp-da7219-max98357a.c:367:3: warning: 'ret' may
be used uninitialized in this function [-Wmaybe-uninitialized]
   dev_err(&pdev->dev, "Failed to register regulator: %d\n",
ret);

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002
Akshu Agrawal [Wed, 25 Jul 2018 09:00:59 +0000 (17:00 +0800)]
ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002

DA7219 for our platform need to be configured for 1.8V.
Hence, we add a volatge regulator with supplies
of 1.8V in the machine driver.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: fix widget handling
Rakesh Ughreja [Wed, 25 Jul 2018 00:50:48 +0000 (19:50 -0500)]
ASoC: Intel: Skylake: fix widget handling

include DAPM Mux and output widgets into the list.

Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Atom: fix inversion between __iowrite32 and __ioread32
Pierre-Louis Bossart [Tue, 24 Jul 2018 21:12:48 +0000 (16:12 -0500)]
ASoC: Intel: Atom: fix inversion between __iowrite32 and __ioread32

This looks like a copy/paste issue, but clearly there is an inversion
that is obvious when checking the arguments.

Detected with Sparse - now that we have fewer warnings this one was
easy to find.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Atom: simplify iomem address and casts
Pierre-Louis Bossart [Tue, 24 Jul 2018 21:12:47 +0000 (16:12 -0500)]
ASoC: Intel: Atom: simplify iomem address and casts

Simplify code and add relevant casts to make Sparse warnings go away

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: common: make sst_dma functions static
Pierre-Louis Bossart [Tue, 24 Jul 2018 21:12:46 +0000 (16:12 -0500)]
ASoC: Intel: common: make sst_dma functions static

sst_dma_new and sst_dma_free are not used in any other file and don't
have a prototype. Move to static functions and remove
EXPORT_SYMBOL_GPL statement.

Reported by sparse warnings.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Skylake: BDL definitions should be __le32
Pierre-Louis Bossart [Tue, 24 Jul 2018 21:12:45 +0000 (16:12 -0500)]
ASoC: Intel: Skylake: BDL definitions should be __le32

Make sure definitions are consistent with usage.
Detected with Sparse.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Haswell: fix endianness handling
Pierre-Louis Bossart [Tue, 24 Jul 2018 21:12:44 +0000 (16:12 -0500)]
ASoC: Intel: Haswell: fix endianness handling

Make all Sparse warnings go away by using le16/32_to_cpu.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt5631: add Volume to the name of volume control
Bard Liao [Fri, 20 Jul 2018 01:48:20 +0000 (09:48 +0800)]
ASoC: rt5631: add Volume to the name of volume control

add Volume to the name of volume control.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: imx-sgtl5000: Switch to SPDX identifier
Fabio Estevam [Tue, 24 Jul 2018 12:48:33 +0000 (09:48 -0300)]
ASoC: imx-sgtl5000: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_utils: Switch to SPDX identifier
Fabio Estevam [Tue, 24 Jul 2018 12:48:32 +0000 (09:48 -0300)]
ASoC: fsl_utils: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_asrc: Switch to SPDX identifier
Fabio Estevam [Tue, 24 Jul 2018 12:48:31 +0000 (09:48 -0300)]
ASoC: fsl_asrc: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl-asoc-card: Switch to SPDX identifier
Fabio Estevam [Tue, 24 Jul 2018 12:48:30 +0000 (09:48 -0300)]
ASoC: fsl-asoc-card: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: core: add support to snd_soc_dai_get_channel_map()
Srinivas Kandagatla [Mon, 23 Jul 2018 15:54:03 +0000 (16:54 +0100)]
ASoC: core: add support to snd_soc_dai_get_channel_map()

On Qualcomm platforms, specifically with SLIMbus interfaced codecs,
the codec slim channel numbers are passed to DSP while configuring
the slim audio path. Having get_channel_map() would allow dais to
share such information across multiple dais.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: axg-spdifout: select SND_PCM_IEC958
Arnd Bergmann [Tue, 24 Jul 2018 09:36:45 +0000 (11:36 +0200)]
ASoC: meson: axg-spdifout: select SND_PCM_IEC958

When CONFIG_SND_PCM_IEC958 is disabled, we get a link error for the
new driver:

sound/soc/meson/axg-spdifout.o: In function `axg_spdifout_hw_params':
axg-spdifout.c:(.text+0x650): undefined reference to `snd_pcm_create_iec958_consumer_hw_params'

The other users use 'select', so we should do the same here.

Fixes: 53eb4b7aaa04 ("ASoC: meson: add axg spdif output")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rockchip-i2s: add description for px30
Liang Chen [Mon, 23 Jul 2018 09:25:21 +0000 (17:25 +0800)]
ASoC: rockchip-i2s: add description for px30

Add "rockchip,px30-i2s", "rockchip,rk3066-i2s" for i2s on px30 platform.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: remove clock divider and pll setup from zylonite and magician
Daniel Mack [Mon, 16 Jul 2018 06:24:45 +0000 (08:24 +0200)]
ASoC: pxa: remove clock divider and pll setup from zylonite and magician

The SSP DAI now handles the clocking setup itself, all it needs is the
master clock frequency. Remove the code from Zylonite and Magician
platforms.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg sound card support
Jerome Brunet [Tue, 17 Jul 2018 15:43:04 +0000 (17:43 +0200)]
ASoC: meson: add axg sound card support

Add the axg sound card to handle the specifities of the axg audio
sub system.

This card is required to:
 * setup the dpcm links specific to the AXG (with a cpu sound dai)
 * handle the 4 lanes masks of the tdm interfaces
 * add the loopback link when a tdm pad interface has a playback
   stream
 * handle multi-codec links

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg sound card DT bindings documentation
Jerome Brunet [Tue, 17 Jul 2018 15:43:03 +0000 (17:43 +0200)]
ASoC: meson: add axg sound card DT bindings documentation

Add the DT bindings documentation for axg sound card

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: export snd_soc_of_get_slot_mask
Jerome Brunet [Tue, 17 Jul 2018 15:43:02 +0000 (17:43 +0200)]
ASoC: export snd_soc_of_get_slot_mask

Amlogic's axg card driver can't use snd_soc_of_parse_tdm_slot()
directly because it needs to handle 4 mask for each direction.
Yet the parsing of each mask is the same, so export
snd_soc_of_get_slot_mask() to reuse the the existing code.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add tdm input driver
Jerome Brunet [Tue, 17 Jul 2018 15:43:01 +0000 (17:43 +0200)]
ASoC: meson: add tdm input driver

Add Amlogic's axg TDM input driver which take the TDM signal of 4 input
lanes and push the decoded audio samples to TODDR fifo

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add tdm output driver
Jerome Brunet [Tue, 17 Jul 2018 15:43:00 +0000 (17:43 +0200)]
ASoC: meson: add tdm output driver

Add Amlogic's axg tdm output driver which pulls data from FRDDR fifo
and produce the TDM signals for 4 output lanes.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add tdm interface driver
Jerome Brunet [Tue, 17 Jul 2018 15:42:59 +0000 (17:42 +0200)]
ASoC: meson: add tdm interface driver

Add Amlogic's axg TDM interface driver. This driver manages the format
and clocks provided on the pads.

On this SoC, each stream direction provides 4 serial lanes. This makes
a maximum of 8 channels in i2s modes and 128 channels in DSP modes.

While each lanes operate on the same slot number (same bit clock), they
may have different TDM masks. This requires to provide a function to let
the card set the 4 masks, in lieu of the usual set_tdm_slots() callback
of the dai driver.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add tdm formatter base driver
Jerome Brunet [Tue, 17 Jul 2018 15:42:58 +0000 (17:42 +0200)]
ASoC: meson: add tdm formatter base driver

Add Amlogic's axg TDM core driver. On this SoC, tdm is bit more
complex than usual, mainly because the different TDM input decoders can
be attached to any of TDM pad interface, including the output pads.

For the this, TDM on this SoC is modeled like this:
- TDM interface provides the DAIs the codecs will be attached to.
  The main responsibility of this driver is to manage the pad format
  and the TDM clock rates.
- TDM Formatters: These are the entities which are actually dealing with
  the TDM signal. TDMOUT produce a TDM signal from the audio sample
  provided by FRDDR using the clocks provided the TDM interface. TDMIN
  feeds TODDR with audio sample using the clocks and TDM signal provided
  by the TDM Interface.
- TDM Streams: This provides the link between 1 DAI stream of the TDM
  interface and one (or more) TDM formatters.

This driver provides the TDM formatter and TDM stream operations.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg tdm interface DT bindings documentation
Jerome Brunet [Tue, 17 Jul 2018 15:42:57 +0000 (17:42 +0200)]
ASoC: meson: add axg tdm interface DT bindings documentation

Add the DT bindings documentation for axg's TDM interfaces

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: tegra: improve goto error label
Marcel Ziswiler [Fri, 20 Jul 2018 08:04:23 +0000 (10:04 +0200)]
ASoC: tegra: improve goto error label

While the two error labels "err" and "err_clk_put" goto the same place
it is rather confusing that the earlier one is certainly used later
again.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMAINTAINERS: add entry for STM32 audio drivers
Arnaud Pouliquen [Fri, 20 Jul 2018 08:02:51 +0000 (10:02 +0200)]
MAINTAINERS: add entry for STM32 audio drivers

Add sound/soc/stm drivers entry for STM32 audio drivers from
ST Microelectronics.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMAINTAINERS: add entry for STI audio drivers
Arnaud Pouliquen [Fri, 20 Jul 2018 08:02:50 +0000 (10:02 +0200)]
MAINTAINERS: add entry for STI audio drivers

Add sound/soc/sti drivers entry for STI audio drivers from
ST Microelectronics.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sgtl5000: fix spelling in devicetree binding document
Marcel Ziswiler [Fri, 20 Jul 2018 07:53:02 +0000 (09:53 +0200)]
ASoC: sgtl5000: fix spelling in devicetree binding document

This fixes a spelling mistake.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5640: Add quirk for the "Connect Tablet 9" tablet
Hans de Goede [Sun, 1 Jul 2018 09:30:23 +0000 (11:30 +0200)]
ASoC: Intel: bytcr_rt5640: Add quirk for the "Connect Tablet 9" tablet

Add a quirk for the "Connect Tablet 9" tablet, this tablet has a
mono-speaker. Otherwise it works fine with the defaults.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices
Hans de Goede [Wed, 18 Jul 2018 20:55:42 +0000 (22:55 +0200)]
ASoC: Intel: bytcr_rt5651: Add quirk table entries for various devices

Add quirk table entries for the following tablets:

ITWorks TW701
Ployer Momo7w
Trekstor win7
Yours 8"

These all use the default settings, except that they only have a single
speaker and thus need the mono-speaker quirk.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Add mono speaker quirk
Hans de Goede [Wed, 18 Jul 2018 20:55:41 +0000 (22:55 +0200)]
ASoC: Intel: bytcr_rt5651: Add mono speaker quirk

During my initial round of bytcr_rt5651 long-name patches I did not include
a difference for mono vs stereo speaker setups in the longname because it
seems that all 5651 devices with only a single speaker do some mixing of
left + right on the PCB.

However further testing has shown that while this works great when only
playing audio on the left or right channel, the output becomes garbled
when using both channels at once. Something which does not happen when
using the Stereo DAC MIXL / MIXR switches to mix the channels together
inside the codec and then only outputting on a single channel.

So we need to have separate UCM profiles and thus separate long-names
for devices with a mono speaker vs stereo speakers. Just as we already
have for the bytcr_rt5640 case.

This commit adds a new BYT_RT5651_MONO_SPEAKER quirk and adds "stereo-spk"
or "mono-spk" to the long-name based on this and enables this mapping on
devices with a mono speaker.

Changing the long-name like this is ok for now, since I'm still working
on the UCM profiles, so they are not in upstream alsa-lib yet.

This brings the long-name naming scheme fully in sync with the bytcr_rt5640
case, which is good from a consistency pov.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Add IN2 input mapping
Hans de Goede [Wed, 18 Jul 2018 20:55:40 +0000 (22:55 +0200)]
ASoC: Intel: bytcr_rt5651: Add IN2 input mapping

During the recent cleanup series 3 of the 6 input mappings where removed
from the bytcr_rt5651 machine driver because testing showed that none of
them were used.

However some devices do actually have their internal mic on IN2 (and
only IN2, not IN1 and IN2), this did not show during previous tests
due to a bug in the userspace UCM input device switching code.

This commit re-adds the IN2 mapping for devices with the internal mic.
on IN2 and the headser mic on IN3 and enables this mapping on devices
with their internal mic on IN2.

This commit also changes the default internal mic input to IN2, because
all my 7 test devices have their mic there.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA
Hans de Goede [Wed, 18 Jul 2018 20:55:39 +0000 (22:55 +0200)]
ASoC: Intel: bytcr_rt5651: Set OVCD limit for VIOS LTH17 to 2000uA

With the default over current detect limit of 1500uA headsets on often
get detected as headphones on the VIOS LTH17 and even when detected as
headset the OVCD current triggers often while plugged in, resulting in
false-positive button press detection.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards
Hans de Goede [Wed, 18 Jul 2018 20:55:38 +0000 (22:55 +0200)]
ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards

Some boards have I2cSerialBusV2, GpioIo, GpioInt as ACPI resources, other
boards may  have I2cSerialBusV2, GpioInt, GpioIo instead. We want the
GpioIo one for the ext-amp-enable-gpio.

So far we've been assuming that the GpioIo one always comes first, this
commit adds code to detect which one comes first and to add the right
gpio-mapping.

This fixes sound not working on the Vios LTH17 laptop.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt5651: Add IN3 Boost volume control
Hans de Goede [Wed, 18 Jul 2018 20:55:37 +0000 (22:55 +0200)]
ASoC: rt5651: Add IN3 Boost volume control

Add a mixer control for the IN3 Boost volume, IN3 is used for the headset
mic on most devices, so this is necessary to control the headset mic
volume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wm_adsp: Parse HOST_BUFFER controls
Richard Fitzgerald [Thu, 19 Jul 2018 10:50:39 +0000 (11:50 +0100)]
ASoC: wm_adsp: Parse HOST_BUFFER controls

Currently the compressed streams in DSP firmwares are
identified essentially by looking at a fixed location inside
the firmware. This is fragile and also limits things to a
single compressed stream.

Here a new form of firmware parameter is added, the HOST_BUFFER
which identifies a compressed stream from meta-data in the
firmware file. This is more robust and allows for the possiblity
of using multiple streams per core in the future. Currently the
implementation is still limited to a single stream and will
use the first HOST_BUFFER parameter encountered. If there aren't
any HOST_BUFFER parameters it will fall back to the legacy way
of finding the host buffer.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wm_adsp: Allow up to 8 channels for voice control
Richard Fitzgerald [Thu, 19 Jul 2018 10:50:38 +0000 (11:50 +0100)]
ASoC: wm_adsp: Allow up to 8 channels for voice control

Newer voice control firmwares can capture multiple audio channels.
Allow up to 8 channels for future-proofing.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wm_adsp: Take prefix into account in control name length
Charles Keepax [Thu, 19 Jul 2018 10:50:36 +0000 (11:50 +0100)]
ASoC: wm_adsp: Take prefix into account in control name length

Currently when creating ALSA control names for the DSP the length of any
prefix applied to the CODEC is not taken into account. Whilst this is
mostly harmless it does result in ALSA doing the truncation of the
control names and printing a warning. It is better to have the driver do
the truncation so it can truncate from the start of parameter name
itself to give a greater chance of the result maintain a unique name.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: wm_adsp: Correct algorithm list allocation size
Charles Keepax [Thu, 19 Jul 2018 10:50:35 +0000 (11:50 +0100)]
ASoC: wm_adsp: Correct algorithm list allocation size

Commit 6396bb221514 ("treewide: kzalloc() -> kcalloc()") was
overlooked when doing some refactoring to the algorithm list
handling, which lead to twice as much buffer being allocated
as required for reading the algorithm list. A kcalloc is no
longer appropriate since the allocation size is now in bytes
not registers, as such change back to kzalloc.

Fixes: 7f7cca08abf4 ("ASoC: wm_adsp: Simplify handling of alg offset and length")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg tdm formatters DT bindings documentation
Jerome Brunet [Tue, 17 Jul 2018 15:42:56 +0000 (17:42 +0200)]
ASoC: meson: add axg tdm formatters DT bindings documentation

Add the DT bindings documentation for axg's TDM formatters: TDMIN
and TDMOUT.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg spdif output
Jerome Brunet [Tue, 17 Jul 2018 15:42:55 +0000 (17:42 +0200)]
ASoC: meson: add axg spdif output

Add support for the spdif output serializer of the axg SoC family

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg spdif output DT bindings documentation
Jerome Brunet [Tue, 17 Jul 2018 15:42:54 +0000 (17:42 +0200)]
ASoC: meson: add axg spdif output DT bindings documentation

Add the DT bindings documentation for axg's SPDIF output.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg toddr driver
Jerome Brunet [Tue, 17 Jul 2018 15:42:53 +0000 (17:42 +0200)]
ASoC: meson: add axg toddr driver

Add the capture memory interface of Amlogic's axg SoCs.
TDM, SPDIF or PDM input devices place audio samples inside this FIFO.
The FIFO content is then pushed to DDR

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg frddr driver
Jerome Brunet [Tue, 17 Jul 2018 15:42:52 +0000 (17:42 +0200)]
ASoC: meson: add axg frddr driver

Add the playback memory interface of Amlogic's axg SoCs.
This device pulls data from DDR to an internal FIFO.
This FIFO is then used to feed TDM and SPDIF Output devices.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg fifo base driver
Jerome Brunet [Tue, 17 Jul 2018 15:42:51 +0000 (17:42 +0200)]
ASoC: meson: add axg fifo base driver

Amlogic's axg SoCs have two types of fifos which are the memory
interfaces of the audio subsystem. FRDDR provides the playback
interface while TODDR provides the capture interface.

The way these fifos operate is very similar. Only a few settings
are specific to each.

They implement the same pcm driver here and the specifics of each
will be dealt with the related DAI driver.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: meson: add axg fifos DT binding documentation
Jerome Brunet [Tue, 17 Jul 2018 15:42:50 +0000 (17:42 +0200)]
ASoC: meson: add axg fifos DT binding documentation

Add the DT bindings documentation for axg's FIFOs: TODDR and FRDDR.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: hdac_hdmi: Add documentation for power management
Sriram Periyasamy [Mon, 16 Jul 2018 10:02:34 +0000 (15:32 +0530)]
ASoC: hdac_hdmi: Add documentation for power management

Add documentation for power management of HDAC HDMI codec device for
various scenarios such as S0/S3, probe and playback use case.

Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qcom: apq8096: remove component framework related code
Srinivas Kandagatla [Fri, 13 Jul 2018 15:36:32 +0000 (16:36 +0100)]
ASoC: qcom: apq8096: remove component framework related code

Now that the component framework is integrated into the ASoC core,
remove any redundant code in this driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6routing: remove component framework related code
Srinivas Kandagatla [Fri, 13 Jul 2018 15:36:31 +0000 (16:36 +0100)]
ASoC: qdsp6: q6routing: remove component framework related code

Now that the component framework is integrated into the ASoC core,
remove any redundant code in this driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6asm-dai: remove component framework related code
Srinivas Kandagatla [Fri, 13 Jul 2018 15:36:30 +0000 (16:36 +0100)]
ASoC: qdsp6: q6asm-dai: remove component framework related code

Now that the component framework is integrated into the ASoC core,
remove any redundant code in this driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6afe-dai: remove component fw related code
Srinivas Kandagatla [Fri, 13 Jul 2018 15:36:29 +0000 (16:36 +0100)]
ASoC: qdsp6: q6afe-dai: remove component fw related code

Now that the component framework is integrated into the ASoC core,
remove any redundant code in this driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: core: add support to card re-bind using component framework
Srinivas Kandagatla [Fri, 13 Jul 2018 15:36:28 +0000 (16:36 +0100)]
ASoC: core: add support to card re-bind using component framework

This patch aims at achieving dynamic behaviour of audio card when
the dependent components disappear and reappear.

With this patch the card is removed if any of the dependent component
is removed and card is added back if the dependent component comes back.
All this is done using component framework and matching based on
component name.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoALSA: hda: Make audio component support more generic
Takashi Iwai [Wed, 11 Jul 2018 14:23:16 +0000 (16:23 +0200)]
ALSA: hda: Make audio component support more generic

This is the final step for more generic support of DRM audio
component.  The generic audio component code is now moved to its own
file, and the symbols are renamed from snd_hac_i915_* to
snd_hdac_acomp_*, respectively.  The generic code is enabled via the
new kconfig, CONFIG_SND_HDA_COMPONENT, while CONFIG_SND_HDA_I915 is
kept as the super-class.

Along with the split, three new callbacks are added to audio_ops:
pin2port is for providing the conversion between the pin number and
the widget id, and master_bind/master_unbin are called at binding /
unbinding the master component, respectively.  All these are optional,
but used in i915 implementation and also other later implementations.

A note about the new snd_hdac_acomp_init() function: there is a slight
difference between this and the old snd_hdac_i915_init().  The latter
(still) synchronizes with the master component binding, i.e. it
assures that the relevant DRM component gets bound when it returns, or
gives a negative error.  Meanwhile the new function doesn't
synchronize but just leaves as is.  It's the responsibility by the
caller's side to synchronize, or the caller may accept the
asynchronous binding on the fly.

v1->v2: Fix missing NULL check in master_bind/unbind

Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoALSA: hda/i915: Associate audio component with devres
Takashi Iwai [Wed, 11 Jul 2018 13:48:18 +0000 (15:48 +0200)]
ALSA: hda/i915: Associate audio component with devres

The HD-audio i915 binding code contains a single pointer, hdac_acomp,
for allowing the access to audio component from the master bind/unbind
callbacks.  This was needed because the callbacks pass only the device
pointer and we can't guarantee the object type assigned to the drvdata
(which is free for each controller driver implementation).
And this implementation will be a problem if we support multiple
components for different DRM drivers, not only i915.

As a solution, allocate the audio component object via devres and
associate it with the given device, so that the component callbacks
can refer to it via devres_find().

The removal of the object is still done half-manually via
devres_destroy() to make the code consistent (although it may work
without the explicit call).

Also, the snd_hda_i915_register_notifier() had the reference to
hdac_acomp as well.  In this patch, the corresponding code is removed
by passing hdac_bus object to the function, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agodrm/i915: Split audio component to a generic type
Takashi Iwai [Wed, 11 Jul 2018 13:17:22 +0000 (15:17 +0200)]
drm/i915: Split audio component to a generic type

For allowing other drivers to use the DRM audio component, rename the
i915_audio_component_* with drm_audio_component_*, and split the
generic part into drm_audio_component.h.  The i915 specific stuff
remains in struct i915_audio_component, which contains
drm_audio_component as the base.

The license of drm_audio_component.h is kept to MIT as same as the the
original i915_component.h.

This is a preliminary change for further development, and no
functional changes by this patch itself, merely code-split and
renames.

v1->v2: Use SPDX for drm_audio_component.h, fix remaining i915
        argument in drm_audio_component.h

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoASoC: AMD: For capture have interrupts on I2S->ACP channel
Agrawal, Akshu [Mon, 16 Jul 2018 07:02:41 +0000 (15:02 +0800)]
ASoC: AMD: For capture have interrupts on I2S->ACP channel

Having interrupts enabled for ACP<->SYSMEM DMA transfer, we are in
for an interrupt storm.
For both playback and capture interrupts should be enabled for
I2S<->ACP DMA.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Send correct channel for configuring DMA descriptors
Agrawal, Akshu [Mon, 16 Jul 2018 07:02:40 +0000 (15:02 +0800)]
ASoC: AMD: Send correct channel for configuring DMA descriptors

Earlier, ch1 was used to define ACP-SYSMEM transfer and ch2 for
ACP-I2S transfer. With recent patches ch1 is used to define channel
order number 1 and ch2 as channel order number 2. Thus,
Playback:
ch1:SYSMEM->ACP
ch2:ACP->I2S
Capture:
ch1:I2S->ACP
ch1:ACP->SYSMEM

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: Boards: Add GLK Realtek Maxim I2S machine driver
Naveen Manohar [Wed, 11 Jul 2018 10:35:36 +0000 (16:05 +0530)]
ASoC: Intel: Boards: Add GLK Realtek Maxim I2S machine driver

Patch adds Geminilake I2S machine driver which uses following codecs:
RT5682 and MAX98357A.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: allow soc-core to pick up name prefixes from component nodes
Jerome Brunet [Fri, 13 Jul 2018 12:50:43 +0000 (14:50 +0200)]
ASoC: allow soc-core to pick up name prefixes from component nodes

When the component does not match the configuration table provided
by the card, let soc-core check the component node for a name prefix

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: add DT documentation for the sound-name-prefix property
Jerome Brunet [Fri, 13 Jul 2018 12:50:42 +0000 (14:50 +0200)]
ASoC: add DT documentation for the sound-name-prefix property

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge branch 'topic/hda-core-intel' into topic/hda-acomp
Takashi Iwai [Thu, 12 Jul 2018 11:58:07 +0000 (13:58 +0200)]
Merge branch 'topic/hda-core-intel' into topic/hda-acomp

6 years agoALSA: hda/ca0132: Update a pci quirk device name
Alastair Bridgewater [Wed, 11 Jul 2018 22:09:46 +0000 (18:09 -0400)]
ALSA: hda/ca0132: Update a pci quirk device name

The PCI subsystem in question for this quirk rule has been
identified as a Gigabyte GA-Z170X-Gaming 7 motherboard.  Set the
device name appropriately.

Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Reviewed-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoALSA: hda/ca0132: Add Recon3Di quirk for Gigabyte G1.Sniper Z97
Alastair Bridgewater [Wed, 11 Jul 2018 22:09:45 +0000 (18:09 -0400)]
ALSA: hda/ca0132: Add Recon3Di quirk for Gigabyte G1.Sniper Z97

These motherboards have Sound Core3D and apparently "support"
Recon3Di.  Added to the quirk list as QUIRK_R3DI.

Issue report, PCI Subsystem ID, and testing by a contributor on
IRC who wished to remain anonymous.

Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Reviewed-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 years agoASoC: dpcm: add rate merge to the BE stream merge
Jerome Brunet [Thu, 5 Jul 2018 10:13:49 +0000 (12:13 +0200)]
ASoC: dpcm: add rate merge to the BE stream merge

As done for format and channels, add the possibility to merge
the backend rates on the frontend rates.

This useful if the backend does not support all rates supported by the
frontend, or if several backends (cpu and codecs) with different
capabilities are connected to the same frontend.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dpcm: rework runtime stream merge
Jerome Brunet [Thu, 5 Jul 2018 10:13:48 +0000 (12:13 +0200)]
ASoC: dpcm: rework runtime stream merge

The goal of this patch is to simplify a bit dpcm runtime stream merge
by removing several local variables.

ATM, merge functions return the BE 'filter' values which should then be
filtered against the FE stream values. This create a lot of local
variable and unnecessary init of min and max.

Instead of this, we can pass the FE stream values directly and let the
BE filtering functions perform the merge 'in-place'

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Reporting button presses
Hans de Goede [Wed, 4 Jul 2018 22:59:35 +0000 (00:59 +0200)]
ASoC: Intel: bytcr_rt5651: Reporting button presses

Enable reporting of button presses now that the codec driver recently has
gotten support for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>