]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/log
mirror_ubuntu-hirsute-kernel.git
5 years agoASoC: adau171x1: Connect playback DAI to the DSP
Lars-Peter Clausen [Fri, 6 Jul 2018 13:19:14 +0000 (16:19 +0300)]
ASoC: adau171x1: Connect playback DAI to the DSP

The playback DAI is connected to the DSP and the DSP might be sourcing
signals from the playback stream. Add a DAPM route between the two to make
sure that the playback DAI is powered up, when the DSP is active.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: pxa: make SND_PXA_SOC_SSP depend on PLAT_PXA
Arnd Bergmann [Fri, 6 Jul 2018 13:30:48 +0000 (15:30 +0200)]
ASoC: pxa: make SND_PXA_SOC_SSP depend on PLAT_PXA

For the moment, we can't enable CONFIG_SND_PXA_SOC_SSP unless we are
building for ARM PXA or MMP:

WARNING: unmet direct dependencies detected for PXA_SSP
  Depends on [n]: PLAT_PXA [=n]
  Selected by [y]:
  - SND_PXA_SOC_SSP [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y]

This adds an explicit dependency for it.

Fixes: 0a94cf345740 ("ASoC: pxa: make SND_PXA2XX_SOC_I2S selectable")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: stm32: replace "%p" with "%pK"
benjamin.gaignard@linaro.org [Fri, 6 Jul 2018 13:07:03 +0000 (15:07 +0200)]
ASoC: stm32: replace "%p" with "%pK"

The format specifier "%p" can leak kernel addresses.
Use "%pK" instead.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: nau8824: use 64-bit arithmetic instead of 32-bit
Gustavo A. R. Silva [Thu, 5 Jul 2018 13:06:17 +0000 (08:06 -0500)]
ASoC: nau8824: use 64-bit arithmetic instead of 32-bit

Add suffix ULL to constant 256 in order to give the compiler complete
information about the proper arithmetic to use.

Notice that such constant is used in a context that expects an
expression of type u64 (64 bits, unsigned) and the following
expression is currently being evaluated using 32-bit arithmetic:

256 * fs * 2 * mclk_src_scaling[i].param

Addresses-Coverity-ID: 1432039 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa-ssp: add support for an external clock in devicetree
Daniel Mack [Mon, 2 Jul 2018 15:11:00 +0000 (17:11 +0200)]
ASoC: pxa-ssp: add support for an external clock in devicetree

Allow setting a clock called 'extclk' in the device of the ssp-dai
device. If specified, this clock will be set to the mclk rate from the
DAI's .set_sysclk() callback. The DAI will also configure itself to
use that external clock.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rsnd: cmd: Add missing newline to debug message
Andrew Gabbasov [Thu, 5 Jul 2018 02:20:04 +0000 (11:20 +0900)]
ASoC: rsnd: cmd: Add missing newline to debug message

To comply with the style of all kernel messages, add newline
to the end of every message.

Fixes: 70fb10529f61 ("ASoC: rsnd: add MIX (Mixer) support")
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fsl_spdif: Use 64-bit arithmetic instead of 32-bit
Gustavo A. R. Silva [Wed, 4 Jul 2018 14:18:33 +0000 (09:18 -0500)]
ASoC: fsl_spdif: Use 64-bit arithmetic instead of 32-bit

Add suffix ULL to constant 64 in order to give the compiler complete
information about the proper arithmetic to use.

Notice that such constant is used in a context that expects an
expression of type u64 (64 bits, unsigned) and the following
expression is currently being evaluated using 32-bit arithmetic:

rate[index] * txclk_df * 64

Addresses-Coverity-ID: 1222129 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6afe-dai: Do not overwrite slim dai num_channels
Srinivas Kandagatla [Wed, 4 Jul 2018 09:49:42 +0000 (10:49 +0100)]
ASoC: qdsp6: q6afe-dai: Do not overwrite slim dai num_channels

num_channels for slim dais are aready set int set_channel_map,
do not overwrite them in hw_params.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6routing: add slim rx routings
Srinivas Kandagatla [Wed, 4 Jul 2018 09:49:41 +0000 (10:49 +0100)]
ASoC: qdsp6: q6routing: add slim rx routings

This patch add routings mixer controls for slim rx ports.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6afe-dai: add support to slim tx dais
Srinivas Kandagatla [Wed, 4 Jul 2018 09:49:40 +0000 (10:49 +0100)]
ASoC: qdsp6: q6afe-dai: add support to slim tx dais

This patch adds support to SLIMbus TX dais in AFE module.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6afe: Add missing slimbus capture ports
Srinivas Kandagatla [Wed, 4 Jul 2018 09:49:39 +0000 (10:49 +0100)]
ASoC: qdsp6: q6afe: Add missing slimbus capture ports

Existing code already has support for SLIMbus TX and RX, only thing
that was missing from TX side was mapping between virtual to actual
DSP port ids.

This patch adds those mappings.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: stm32: Use snd_pcm_stop_xrun() helper
Takashi Iwai [Wed, 4 Jul 2018 14:01:46 +0000 (16:01 +0200)]
ASoC: stm32: Use snd_pcm_stop_xrun() helper

The XRUN trigger from the driver should be done via
snd_pcm_stop_xrun().  It simplifies the locking as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: sti: Use snd_pcm_stop_xrun() helper
Takashi Iwai [Wed, 4 Jul 2018 14:01:45 +0000 (16:01 +0200)]
ASoC: sti: Use snd_pcm_stop_xrun() helper

The XRUN trigger from the driver should be done via
snd_pcm_stop_xrun().  It fixes the missing stream locking as a gratis,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qcom: Use snd_pcm_stop_xrun() helper
Takashi Iwai [Wed, 4 Jul 2018 14:01:44 +0000 (16:01 +0200)]
ASoC: qcom: Use snd_pcm_stop_xrun() helper

The XRUN trigger from the driver should be done via
snd_pcm_stop_xrun().  It fixes the missing stream locking as a gratis,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: davinci: Use snd_pcm_stop_xrun() helper
Takashi Iwai [Wed, 4 Jul 2018 14:01:43 +0000 (16:01 +0200)]
ASoC: davinci: Use snd_pcm_stop_xrun() helper

Replace open-codes with the standard snd_pcm_stop_xrun() helper.
It simplifies codes a lot.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: nau8825: use 64-bit arithmetic instead of 32-bit
Gustavo A. R. Silva [Wed, 4 Jul 2018 14:28:28 +0000 (09:28 -0500)]
ASoC: nau8825: use 64-bit arithmetic instead of 32-bit

Add suffix ULL to constant 256 in order to give the compiler complete
information about the proper arithmetic to use.

Notice that such constant is used in a context that expects an
expression of type u64 (64 bits, unsigned) and the following
expression is currently being evaluated using 32-bit arithmetic:

256 * fs * 2 * mclk_src_scaling[i].param

Addresses-Coverity-ID: 1339616 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: core: Allow topology to override machine driver FE DAI link config.
Liam Girdwood [Mon, 2 Jul 2018 15:59:54 +0000 (16:59 +0100)]
ASoC: core: Allow topology to override machine driver FE DAI link config.

Machine drivers statically define a number of DAI links that currently
cannot be changed or removed by topology. This means PCMs and platform
components cannot be changed by topology at runtime AND machine drivers
are tightly coupled to topology.

This patch allows topology to override the machine driver DAI link config
in order to reuse machine drivers with different topologies and platform
components. The patch supports :-

1) create new FE PCMs with a topology defined PCM ID.
2) destroy existing static FE PCMs
3) change the platform component driver.
4) assign any new HW params fixups.
5) assign a new card name prefix to differentiate this topology to userspace.

The patch requires no changes to the machine drivers, but does add some
platform component flags that the platform component driver can assign
before loading topologies.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: atmel-i2s: dt-bindings: Remove unnecessary phandle to aclk
Codrin Ciubotariu [Tue, 3 Jul 2018 14:56:31 +0000 (17:56 +0300)]
ASoC: atmel-i2s: dt-bindings: Remove unnecessary phandle to aclk

The optional clock phandle to aclk (Audio PLL clock) is no longer needed
by the driver.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: atmel-i2s: Remove unnecessary audio PLL clock (aclk)
Codrin Ciubotariu [Tue, 3 Jul 2018 14:56:30 +0000 (17:56 +0300)]
ASoC: atmel-i2s: Remove unnecessary audio PLL clock (aclk)

The generated clock (gclk) driver is able to set aclk as its parent and
change its rate alone, if needed. This means that our driver no longer
needs to configure aclk and we can let gclk select and configure its
clock source.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7134: add support for the es7154
Jerome Brunet [Tue, 3 Jul 2018 15:06:00 +0000 (17:06 +0200)]
ASoC: es7134: add support for the es7154

Add support for the es7154 which is basically an es7134 with an
embedded power amplifier and lower maximum sample rate

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7134: correct required power supplies
Jerome Brunet [Tue, 3 Jul 2018 15:05:59 +0000 (17:05 +0200)]
ASoC: es7134: correct required power supplies

Drop AVDD in favor of PVDD to match the names used in the datasheet
and only claim PVDD on the es7154. The es7134 and es7144 don't have
a separate supply for the digital I/O.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7134: update DT binding with new compatible and supplies
Jerome Brunet [Tue, 3 Jul 2018 15:05:58 +0000 (17:05 +0200)]
ASoC: es7134: update DT binding with new compatible and supplies

Update the documentation to add support for the es7154 and
optional power supplies phandles.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Simplify trigger handler
Daniel Kurtz [Mon, 2 Jul 2018 21:19:55 +0000 (15:19 -0600)]
ASoC: AMD: Simplify trigger handler

Now that the I2S channel names are fixed, and DMA data flow order is
consistent (ch1 then ch2), we can simplify channel start order:
start the upstream channel and then the downstream channel for both
playback and capture cases.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Reset bytescount when starting transaction
Daniel Kurtz [Mon, 2 Jul 2018 21:19:51 +0000 (15:19 -0600)]
ASoC: AMD: Reset bytescount when starting transaction

The pointer() callback gets its value by reading the I2S BYTE_COUNT
register.  This is a 64-bit runnning transaction counter. If a
transaction was aborted in the middle of a sample buffer, the counter will
stop counting on a number divisible by the buffer size.  Since we actually
use it as a pointer into an aligned buffer, however, we do want to ensure
that it always starts at a number divisible by the buffer size when
starting a transaction, hence we reset it whenever starting a transaction.

To accomplish this, it wasn't necessary to zero bytescount at the
termination of each transaction, so remove this unnecessary code.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Do not generate interrups for every captured sample
Daniel Kurtz [Mon, 2 Jul 2018 21:19:54 +0000 (15:19 -0600)]
ASoC: AMD: Do not generate interrups for every captured sample

On capture, audio data is first copied from I2S to ACP memory, and then
from ACP to SYSRAM.  The I2S_TO_ACP_DMA interrupt fires on every sample
transferred from I2S to ACP memory.  That is it fires ~48000 times per
second when capturing @ 48 kHz.  Since we don't do anything on this
interrupt anyway, disable it to save quite a few unnecessary interrupts.
The real "work" (calling snd_pcm_period_elapsed()) is done when transfer
from ACP to SYSRAM is complete.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Fix Capture DMA channel names
Daniel Kurtz [Mon, 2 Jul 2018 21:19:53 +0000 (15:19 -0600)]
ASoC: AMD: Fix Capture DMA channel names

On capture, audio data is first copied from I2S to ACP memory, and then
to SYSRAM.  For each step the channel number increases, so the names in
the driver were wrong.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Always subtract bytescount
Daniel Kurtz [Mon, 2 Jul 2018 21:19:52 +0000 (15:19 -0600)]
ASoC: AMD: Always subtract bytescount

It is always correct to subtract out the starting bytescount value.  Even
in the case of 2^64 byte rollover (292 Million Years in the future
@ 48000 Hz) the math still works out.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: AMD: Always stop ch2 first
Daniel Kurtz [Mon, 2 Jul 2018 21:19:50 +0000 (15:19 -0600)]
ASoC: AMD: Always stop ch2 first

Commit 6b116dfb4633a ("ASoC: AMD: make channel 1 dma as circular") made
both channels circular, so this comment and logic no longer applies.  Always
stop ch2 (the channel closest to the output) before ch1.  This ensures
that the downstream circular DMA channel does not continue to play/capture
repeated samples after the upstream circular DMA channel has already
stopped.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa-ssp: mark expected switch fall-through
Gustavo A. R. Silva [Mon, 2 Jul 2018 12:17:07 +0000 (07:17 -0500)]
ASoC: pxa-ssp: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7241: add es7241 codec support
Jerome Brunet [Tue, 3 Jul 2018 13:28:45 +0000 (15:28 +0200)]
ASoC: es7241: add es7241 codec support

Add support for the everest es7241 which is a simple 2 channels
analog to digital converter.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7241: add dt-bindings documentation for the es7241 adc
Jerome Brunet [Tue, 3 Jul 2018 13:28:44 +0000 (15:28 +0200)]
ASoC: es7241: add dt-bindings documentation for the es7241 adc

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: rt5682: add button detection mode control
Bard Liao [Tue, 3 Jul 2018 05:07:25 +0000 (13:07 +0800)]
ASoC: rt5682: add button detection mode control

We are currently using power saving mode for button detection.
However, it will impact the headset recording performance.
This patch will switch button detection to normal mode in capture
and switch to power saving mode in the end of capture.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7134: Add VDD and AVDD power supplies
Jerome Brunet [Fri, 29 Jun 2018 15:09:23 +0000 (17:09 +0200)]
ASoC: es7134: Add VDD and AVDD power supplies

Add the VDD and AVDD power supplies to the DAPM graph as some board may
need to enable a regulator to turn them on.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7134: check if mclk rate is valid
Jerome Brunet [Fri, 29 Jun 2018 15:09:21 +0000 (17:09 +0200)]
ASoC: es7134: check if mclk rate is valid

For each supported sample rate, the es7134 can work with several
mclk / sample rate ratio. Check if ratio we get is actually OK.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: es7134: remove 64kHz rate from the supported rates
Jerome Brunet [Fri, 29 Jun 2018 15:09:20 +0000 (17:09 +0200)]
ASoC: es7134: remove 64kHz rate from the supported rates

64Khz is actually not supported by the es7134 according to the datasheet

Fixes: 9000b59d7a12 ("ASoC: es7134: add es7134 DAC driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa-ssp: remove .set_pll() and .set_clkdiv() callbacks
Daniel Mack [Fri, 29 Jun 2018 12:59:40 +0000 (14:59 +0200)]
ASoC: pxa-ssp: remove .set_pll() and .set_clkdiv() callbacks

The .set_pll() and .set_clkdiv() callbacks are considered legacy and should
not be used anymore. In order to support PXA boards on DT platforms, remove
them and let the code figure out the correct dividers and PLL base
frequencies itself.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: select SND_PXA2XX_LIB for drivers that depend on it
Daniel Mack [Sat, 30 Jun 2018 20:24:33 +0000 (22:24 +0200)]
ASoC: pxa: select SND_PXA2XX_LIB for drivers that depend on it

Commit d767d3ce5c48b ("ASoC: pxa: provide PCM ops for ssp, i2s and ac97
components") created a build-time dependency to SND_PXA2XX_LIB but
missed to reflect that in Kconfig.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: ac97: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:26:27 +0000 (06:26 +0000)]
ASoC: ac97: 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: soc-generic-dmaengine-pcm: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:25:11 +0000 (06:25 +0000)]
ASoC: soc-generic-dmaengine-pcm: 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: soc-compress: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:24:57 +0000 (06:24 +0000)]
ASoC: soc-compress: 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: soc-topology: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:24:45 +0000 (06:24 +0000)]
ASoC: soc-topology: 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: soc-dapm: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:24:31 +0000 (06:24 +0000)]
ASoC: soc-dapm: 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: soc-core: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:24:18 +0000 (06:24 +0000)]
ASoC: soc-core: 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: soc-acpi: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:24:04 +0000 (06:24 +0000)]
ASoC: soc-acpi: 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: soc-devres.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:23:45 +0000 (06:23 +0000)]
ASoC: soc-devres.c: 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: soc-utils.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:23:30 +0000 (06:23 +0000)]
ASoC: soc-utils.c: 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: soc-jack.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:23:16 +0000 (06:23 +0000)]
ASoC: soc-jack.c: 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: soc-dpcm.h: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:22:58 +0000 (06:22 +0000)]
ASoC: soc-dpcm.h: 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: soc-pcm.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:22:44 +0000 (06:22 +0000)]
ASoC: soc-pcm.c: 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: soc-ops.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:22:30 +0000 (06:22 +0000)]
ASoC: soc-ops.c: 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: soc-dai.h: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:22:15 +0000 (06:22 +0000)]
ASoC: soc-dai.h: 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: soc-io.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:21:54 +0000 (06:21 +0000)]
ASoC: soc-io.c: 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: audio-graph-scu-card.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:31:33 +0000 (06:31 +0000)]
ASoC: audio-graph-scu-card.c: 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: audio-graph-card.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:31:16 +0000 (06:31 +0000)]
ASoC: audio-graph-card.c: 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: simple-scu-card.c: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:30:58 +0000 (06:30 +0000)]
ASoC: simple-scu-card.c: 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: simple-card-utils: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:30:44 +0000 (06:30 +0000)]
ASoC: simple-card-utils: 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: simple-card: convert to SPDX identifiers
Kuninori Morimoto [Mon, 2 Jul 2018 06:30:28 +0000 (06:30 +0000)]
ASoC: simple-card: 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: mt6797: sub dai use list_head
KaiChieh Chuang [Fri, 29 Jun 2018 12:29:45 +0000 (20:29 +0800)]
ASoC: mt6797: sub dai use list_head

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: mediatek: sub dai use list_head
KaiChieh Chuang [Fri, 29 Jun 2018 12:29:44 +0000 (20:29 +0800)]
ASoC: mediatek: sub dai use list_head

use list_head for sub_dais,
since original sub_dais array is sparsely occupied

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: make SND_PXA2XX_SOC_I2S selectable
Daniel Mack [Wed, 27 Jun 2018 19:33:59 +0000 (21:33 +0200)]
ASoC: pxa: make SND_PXA2XX_SOC_I2S selectable

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: remove bindings from pxa2xx-pcm
Daniel Mack [Wed, 27 Jun 2018 19:33:58 +0000 (21:33 +0200)]
ASoC: pxa: remove bindings from pxa2xx-pcm

This platform is no longer needed on DT boards, so let's remove them to
avoid confusion. DT bindings should use the CPU DAIs (I2S/SSP/AC97)
directly.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: provide PCM ops for ssp, i2s and ac97 components
Daniel Mack [Wed, 27 Jun 2018 19:33:57 +0000 (21:33 +0200)]
ASoC: pxa: provide PCM ops for ssp, i2s and ac97 components

Now that the functions are now available through pxa2xx-lib, hook them up
to pxa-sspi, pxa-ac97 and pxa-i2s. This allows DT platforms to use the DAIs
without a platform driver.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa2xx-pcm-lib: fix indenting
Daniel Mack [Wed, 27 Jun 2018 19:33:56 +0000 (21:33 +0200)]
ASoC: pxa2xx-pcm-lib: fix indenting

While at it, also fix some indenting.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: move some functions to pxa2xx-lib
Daniel Mack [Wed, 27 Jun 2018 19:33:55 +0000 (21:33 +0200)]
ASoC: pxa: move some functions to pxa2xx-lib

To get rid of some intermediate platform layers, move pxa2xx_soc_pcm_new()
and pxa2xx_pcm_ops in pxa2xx-lib.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: clean up function names in pxa2xx-lib
Daniel Mack [Wed, 27 Jun 2018 19:33:54 +0000 (21:33 +0200)]
ASoC: pxa: clean up function names in pxa2xx-lib

Clean up the namespace a bit and drop the __ prefix of all functions
exported by pxa2xx-lib. This improves the readability of the code.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: fold pxa2xx-pcm into its only user, pxa2xx-ac97
Daniel Mack [Wed, 27 Jun 2018 19:33:53 +0000 (21:33 +0200)]
ASoC: fold pxa2xx-pcm into its only user, pxa2xx-ac97

Now that the PXA SSP bits are ported over to generic DMA, the pxa2xx-pcm
code only has a single user left. This patch folds the remaining bits into
its only user and removes the unnecessary glue layer along with its header
file.

The include dependency to linux/dma/pxa-dma.h is also gone now.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: pxa: remove the dmaengine compat need
Robert Jarzmik [Thu, 28 Jun 2018 20:08:37 +0000 (22:08 +0200)]
ASoC: pxa: remove the dmaengine compat need

As the pxa architecture switched towards the dmaengine slave map, the
old compatibility mechanism to acquire the dma requestor line number and
priority are not needed anymore.

This patch simplifies the dma resource acquisition, using the more
generic function dma_request_slave_channel().

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dpcm: extend channel merging to the backend cpu dai
Jerome Brunet [Wed, 27 Jun 2018 09:48:18 +0000 (11:48 +0200)]
ASoC: dpcm: extend channel merging to the backend cpu dai

Extend dpcm_merge_chan to also check backend cpu dai channels
capabilities. Apply the same policy as soc_pcm_init_runtime_hw() for
multicodec links and only check cpu dai in this case.

Cc: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: qdafe: fix some off by one bugs
Dan Carpenter [Wed, 27 Jun 2018 08:56:53 +0000 (11:56 +0300)]
ASoC: qdsp6: qdafe: fix some off by one bugs

The > should be >= or we could read one element beyond the end of the
port_maps[] array.

Fixes: 7fa2d70f9766 ("ASoC: qdsp6: q6afe: Add q6afe driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: dpcm: improve runtime update predictability
Jerome Brunet [Tue, 26 Jun 2018 10:07:25 +0000 (12:07 +0200)]
ASoC: dpcm: improve runtime update predictability

As it is, dpcm_runtime_update() performs the old path and new path
update of a frontend before going on to the next frontend DAI.
Depending the order of the FEs within the rtd list, the result of
the update might be different.

For example:
 * Frontend A connected to backend C, with a 48kHz playback
 * Frontend B connected to backend D, with a 44.1kHz playback
 * FE A appears before FE B in the rtd list of the card.

If we reparent BE C to FE B (disconnecting BE D):
* old path update of FE A will run first, and BE C will get hw_free()
  and shutdown()
* new path update of FE B will run after and BE C, which is stopped,
  so it will be configured at 44.1kHz, as expected

If we reparent BE D to FE A (disconnecting BE C):
* new path update of FE A will run first but since BE D is still running
  at 44.1kHz, it won't be reconfigured (no call to startup() or
  hw_params())
* old path update of FE B runs after, nothing happens
* In this case, we end up with a BE playing at 44.1kHz a stream which is
  supposed to be played at 48Khz (too slow)

To improve this situation, this patch performs all the FE old paths update
before going on to update the new paths. With this, the result should
no longer depend on the order of the FE within the card rtd list.

Please note that there might be a small performance penalty since
dpcm_process_paths() is called twice per stream direction.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: tas517x: add tas5707 support
Jerome Brunet [Wed, 27 Jun 2018 07:39:37 +0000 (09:39 +0200)]
ASoC: tas517x: add tas5707 support

Add support for the tas5707 audio power amplifier.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: tas571x: add tas5707 compatible
Jerome Brunet [Wed, 27 Jun 2018 07:39:36 +0000 (09:39 +0200)]
ASoC: tas571x: add tas5707 compatible

Add the tas5707 to the available compatibles of the tas571x driver

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: simple-amplifer: add simple-amplifier compatible
Jerome Brunet [Tue, 26 Jun 2018 12:11:28 +0000 (14:11 +0200)]
ASoC: simple-amplifer: add simple-amplifier compatible

Add simple-audio-amplifier to the list of available compatible

Suggested-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: simple-amplifier: rename dio2125 to simple-amplifer
Jerome Brunet [Tue, 26 Jun 2018 12:11:27 +0000 (14:11 +0200)]
ASoC: simple-amplifier: rename dio2125 to simple-amplifer

The dio2125 is simple enough that we can make it a generic component.
Just rename and sed the dio2125 amplifier driver to simple_amplifier.

Suggested-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: simple-amplifier: remame dio2125 documentation
Jerome Brunet [Tue, 26 Jun 2018 12:11:26 +0000 (14:11 +0200)]
ASoC: simple-amplifier: remame dio2125 documentation

The dio2125 is simple enough that we can make it a generic component.
Rename the the dio2125 documentation to simple-amplifier to
prepare this change.

Suggested-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Sort DMI table entries alphabetically
Hans de Goede [Sun, 24 Jun 2018 14:06:34 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Sort DMI table entries alphabetically

As we get more entries in the DMI quirk table it is nice to have some
sort of ordering in the table, sort it alphabetically.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-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 BYT_RT5651_HP_LR_SWAPPED quirk
Hans de Goede [Sun, 24 Jun 2018 14:06:33 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Add BYT_RT5651_HP_LR_SWAPPED quirk

One some models (Chuwi Vi8 Plus, Chuwi Hi8 Pro) the headphone output has
left and right swapped. This can be fixed in with special mixer settings
in the UCM profile, bit this requires these devices loading a different
UCM profile.

This commit adds a BYT_RT5651_HP_LR_SWAPPED quirk for this and postfixes
the longname with "-hp-swapped" if set, so that a different UCM profile
will be loaded.

We can safely do this without causing regressions (UCM profile not found
due to the longname change) as the UCM profiles are not in upstream
alsa-lib yet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Simplify card long-name
Hans de Goede [Sun, 24 Jun 2018 14:06:32 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Simplify card long-name

Now that the headset-mic is always IN3 there is no reason to have
the headset-mic mapping in the long-name.

This commit simplifies the long name to "bytcr-rt5651-<intmic-map>-mic".

We can safely do this without causing regressions (UCM profile not found
due to the longname change) as the UCM profiles are not in upstream
alsa-lib yet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-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 DMIC map headsetmic mapping
Hans de Goede [Sun, 24 Jun 2018 14:06:31 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Fix DMIC map headsetmic mapping

The initial bytcr_rt5651 machine driver commit mapped IN2 as the headset
mic. In retrospect this is not correct as all known boards have the headset
mic on IN3.

This commit fixes the original DMIC mapping to correctly have the headset
mic on IN3.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-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 IN1 map headsetmic mapping
Hans de Goede [Sun, 24 Jun 2018 14:06:30 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Fix IN1 map headsetmic mapping

The initial bytcr_rt5651 machine driver commit mapped IN2 as the headset
mic. In retrospect this is not correct as all known boards have the headset
mic on IN3. To workaround this special IN?_HS_IN3 mappings were added.

This commit fixes the original IN1 mapping to correctly have the headset
mic on IN3, moves all users of the IN1_HS_IN3 mapping over to the fixed
IN1_MAP and drops the now no longer needed IN1_HS_IN3 mapping.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Remove IN2 input mappings
Hans de Goede [Sun, 24 Jun 2018 14:06:29 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Remove IN2 input mappings

BYT_RT5651_IN2_MAP was introduced in commit 39712db878a4 ("SoC: intel: byt:
Introduce new custom IN2 map"), uses in commit 2fe30129b0a6 ("ASoC: intel:
byt: Enable IN2 map quirk for a KIANO laptop"), only to be replaced by a
new BYT_RT5651_IN1_IN2_MAP quirk in commit ea261bd02a67 ("ASoC: intel:
byt: Introduce new map for dual mics") quickly afterwards, because the
KIANO laptop has 2 internal mics on IN1 and IN2 and the headset mic is
not in IN1 where the BYT_RT5651_IN2_MAP maps it, but on IN3.

Now that the KIANO quirk entry uses BYT_RT5651_IN1_IN2_MAP, there are no
users of BYT_RT5651_IN2_MAP left. This makes sense since the headset mic
seems to always be connected to IN3, so BYT_RT5651_IN2_MAP is not useful.

To deal with BYT_RT5651_IN2_MAP wrongly mapping the headset mic to IN1,
BYT_RT5651_IN2_HS_IN3_MAP was added in commit f026e0631780 ("ASoC: Intel:
bytcr_rt5651: Add new IN2_HS_IN3 input map and a quirk using it"). This
was based on the assumption then some devices have the internal mic
connected to IN2 only. Further testing has shown that this is wrong and the
internal mic is always connected to IN1 and sometimes to both IN1 and IN2.

TL;DR: Both BYT_RT5651_IN2_MAP and BYT_RT5651_IN2_HS_IN3_MAP are based on
on wrong assumptions from the past and are no longer useful now, so they
can both be removed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-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 IN1_IN2_MAP quirk not being logged
Hans de Goede [Sun, 24 Jun 2018 14:06:28 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Fix IN1_IN2_MAP quirk not being logged

Fix the quirk logging code not logging the IN1_IN2_MAP quirk.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: Intel: bytcr_rt5651: Change default input map from in2 to in1
Hans de Goede [Sun, 24 Jun 2018 14:06:27 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Change default input map from in2 to in1

Further testing on all 6 model x86 tablets with a rt5651 which I have
access to for testing has shown that their single (mono) microphone is
connected to both IN1 *and* IN2.

The previous default mapping of IN2 was based on testing on the same 6
tablets, where the internal mic works fine with a mapping of IN2. But it
works fine too with a mapping of IN1.

This commit changes the default input mapping to to use IN1 instead of
IN2, to match the mapping used for the other mono devices in the DMI quirk
table. So that we need less different mappings.

The same change is made to the Chuwi Vi8 Plus quirks, which is one of the
6 models tested.

This is a preparation patch for simplifying the maps in a follow-up commit.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-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 BYT_RT5651_DEFAULT_QUIRKS define
Hans de Goede [Sun, 24 Jun 2018 14:06:26 +0000 (16:06 +0200)]
ASoC: Intel: bytcr_rt5651: Add BYT_RT5651_DEFAULT_QUIRKS define

Almost all boards use the mclk and use the same jack-detect settings, add
a BYT_RT5651_DEFAULT_QUIRKS define for this.

This shaves of some lines and makes it easier to see which settings are
unique to a certain model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6asm: remove unused struct q6asm member
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:16 +0000 (10:20 +0100)]
ASoC: qdsp6: q6asm: remove unused struct q6asm member

pcmdev in struct q6asm seems be left over and unused, so just remove it.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6routing: add proper error check
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:15 +0000 (10:20 +0100)]
ASoC: qdsp6: q6routing: add proper error check

q6adm_open can return error pointer or a null in error cases.
Fix the return handling.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qcom: apq8096: remove redundant owner assignment
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:14 +0000 (10:20 +0100)]
ASoC: qcom: apq8096: remove redundant owner assignment

module owner is already set in platform_driver_register(), so remove this
redundant assignment.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6routing: support dt based module loading
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:13 +0000 (10:20 +0100)]
ASoC: qdsp6: q6routing: support dt based module loading

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6asm-dai: support dt based module loading
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:12 +0000 (10:20 +0100)]
ASoC: qdsp6: q6asm-dai: support dt based module loading

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6afe-dai: support dt based module loading
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:11 +0000 (10:20 +0100)]
ASoC: qdsp6: q6afe-dai: support dt based module loading

This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6afe: use of_platform_populate/depopulate()
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:10 +0000 (10:20 +0100)]
ASoC: qdsp6: q6afe: use of_platform_populate/depopulate()

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6asm: use of_platform_populate/depopulate()
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:09 +0000 (10:20 +0100)]
ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: qdsp6: q6adm: use of_platform_populate/depopulate()
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:08 +0000 (10:20 +0100)]
ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()

Now that the child nodes have there own compatible strings,
Use of_platform_populate/depopulate() instead of less common
of_platform_device_create()/destroy().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: q6afe: dt-bindings: add compatible string to dais
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:07 +0000 (10:20 +0100)]
ASoC: q6afe: dt-bindings: add compatible string to dais

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: q6asm: dt-bindings: add compatible string to dais
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:06 +0000 (10:20 +0100)]
ASoC: q6asm: dt-bindings: add compatible string to dais

Add compatible string to dais so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: q6adm: dt-bindings: add compatible string to routing
Srinivas Kandagatla [Tue, 26 Jun 2018 09:20:05 +0000 (10:20 +0100)]
ASoC: q6adm: dt-bindings: add compatible string to routing

Add compatible string to routing so that it can support DT based module
autoloading.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoMerge tag 'pxa-for-4.19-dma_slave_map' of
Mark Brown [Mon, 25 Jun 2018 13:05:18 +0000 (14:05 +0100)]
Merge tag 'pxa-for-4.19-dma_slave_map' of
https://github.com/rjarzmik/linux into asoc-4.19 for ac'97 deps

6 years agoASoC: cx20442: Don't ignore regulator_get() errors.
Janusz Krzysztofik [Sun, 24 Jun 2018 18:14:41 +0000 (20:14 +0200)]
ASoC: cx20442: Don't ignore regulator_get() errors.

In its current shape, the driver just ignores errors returned by
regulator_get() at component_probe().  This doesn't hurt on Amstrad
Delta board as long as it registers the codec device at late_initcall,
when the regulator which depends on basic-mmio-gpio device (probed as
late as at dev_initcall) is already available.  Otherwise the driver
may end up trying to control a codec which is not powered up.

Remove that dependency on initialization order by handling the error.
If the regulator is not yet available and -ENODEV is returned, convert
it to -EPROBE_DEFER to get another chance.

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: soc-pcm: DPCM cares BE channel constraint
Jiada Wang [Wed, 20 Jun 2018 09:25:20 +0000 (18:25 +0900)]
ASoC: soc-pcm: DPCM cares BE channel constraint

Current DPCM is caring only FE channel configuration. Sometimes
it will be trouble if user selects channel which isn't supported
by BE.

This patch adds new .dpcm_merged_chan on struct snd_soc_dai_link.
DPCM will use FE / BE merged channel if struct snd_soc_dai_link
has it.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 years agoASoC: add hp-det-gpio and mic-det-gpio to audio graph card binding
Katsuhiro Suzuki [Wed, 20 Jun 2018 01:59:59 +0000 (10:59 +0900)]
ASoC: add hp-det-gpio and mic-det-gpio to audio graph card binding

Add headphone and microphone detection GPIO support to audio graph
card same as supported in simple card.

Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>