Commit graph

915690 commits

Author SHA1 Message Date
Kuninori Morimoto
7cf3c5b4a0
ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx()
"rtd" can be created from "substream".
Let's cleanup snd_soc_link_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87y2pg3k78.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-25 14:22:10 +01:00
Kuninori Morimoto
a5e6c10900
ASoC: soc-link: move soc_rtd_xxx()
dai_link related function should be implemented at
soc-link.c.
This patch moves soc-pcm soc_rtd_xxx()
to soc-link as snd_soc_link_xxx()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87zh9w3k7k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-25 14:22:09 +01:00
Kuninori Morimoto
02e756363f
ASoC: add soc-link.c
Current ALSA SoC has many dai_link->xxx() functions.
But, it is implemented randomly at random place.

This patch creats new soc-link.c and collect dai_link related
operation into it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/871rn84ys5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-25 14:22:08 +01:00
Pavel Dobias
29c859df7b
ASoC: max9867: keep ADCs and DACs always on
Updating power management register requires toggling the shutdown
bit otherwise it causes unexpected behavior of the codec.
However, toggling the shutdown bit results in loud speaker crackling.
Setup the power management register only at startup to avoid that.

Signed-off-by: Pavel Dobias <dobias@2n.cz>
Link: https://lore.kernel.org/r/20200522142957.18364-3-dobias@2n.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-22 19:14:08 +01:00
Pavel Dobias
980b63f8d0
ASoC: max9867: add digital microphone controls
MAX9867 codec has a possibility of connecting digital microphones.
Add DAPM controls to be able to enable them.

Signed-off-by: Pavel Dobias <dobias@2n.cz>
Link: https://lore.kernel.org/r/20200522142957.18364-2-dobias@2n.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-22 19:14:07 +01:00
Robert Jarzmik
168aac9de0
ASoC: pxa: remove Compulab pxa2xx boards
As these boards have been removed from the pxa tree, amend accordingly
the sound subsystem.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Mike Rapoport <rppt@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200521185140.27276-3-robert.jarzmik@free.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-22 12:46:42 +01:00
Pavel Dobias
80b9fa4dea
ASoC: max9867: add mono playback switch
Add Mono Playback switch to codec controls which enables codec's
capability of mixing left and right channel at the DAC output.

Signed-off-by: Pavel Dobias <dobias@2n.cz>
Link: https://lore.kernel.org/r/20200520071904.15801-5-dobias@2n.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-20 15:48:19 +01:00
Pavel Dobias
af53d5738c
ASoC: max9867: add filter controls
Adding missing codec controls - ADC/DAC IIR filter selection.

Signed-off-by: Pavel Dobias <dobias@2n.cz>
Link: https://lore.kernel.org/r/20200520071904.15801-3-dobias@2n.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-20 15:48:18 +01:00
Pavel Dobias
d0de8c69f9
ASoC: max9867: don't use regmap defaults
MAX9867 codec doesn't have reset pin, so the registers don't
have default values in the case of reboot without powering off.
Remove the reg_defaults struct and let the regmap read initial
state of the registers at startup instead of taking them from
reg_defaults struct.

Signed-off-by: Pavel Dobias <dobias@2n.cz>
Link: https://lore.kernel.org/r/20200520071904.15801-2-dobias@2n.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-20 15:48:17 +01:00
Lubomir Rintel
6ea460d522
ASoC: mmp-sspa: Fix the error handling in probe()
If we fail after pm_runtime_enable(), we fail to undo it. Same with
clk_prepare_enable(). Let's order them after all things that can fail.

Fixes: 7d98cc6482 ("ASoC: mmp-sspa: Add support for the runtime power management")
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Link: https://lore.kernel.org/r/20200520083516.2120802-1-lkundrak@v3.sk
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-20 15:48:16 +01:00
Lubomir Rintel
d81bb8726c
ASoC: Add Marvell MMP SSPA binding
Add binding documentation for the audio serial port interface (I2S) on
Marvell MMP SoCs.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200511210134.1224532-11-lkundrak@v3.sk
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 20:52:50 +01:00
Lubomir Rintel
a97e384ba7
ASoC: mmp-sspa: Add Device Tree support
This makes it possible to select CONFIG_SND_MMP_SOC_SSPA directly, as
opposed to via CONFIG_SND_MMP_SOC, and for the driver to bind to a device
tree node. That makes the driver useful on Device Tree based systems,
with audio-graph-card or simple-card.

The aforementioned card drivers control the master clock themselves and
don't call the set_dai_sysclk() or set_dai_pll(), thus the respective
handlers don't serve any purpose anymore. Instead, they return early and
the hw_params() handler sets the appropriate bitclk itself.

The register range is split into two -- for the RX block and for the TX
block. On a MMP2 there are two pairs of them; the first one has the
clock controller in the middle, while the second just has a hole:

  0xd42a0c00 - 0xd42a0c30 RX1
  0xd42a0c30 - 0xd42a0c40 Clocks
  0xd42a0c80 - 0xd42a0cb0 TX1
  0xd42a0d00 - 0xd42a0d30 RX2
  0xd42a0d80 - 0xd42a0cb0 TX2

For this reason, mmp_sspa_write_reg() and mmp_sspa_read_reg() are
replaced with direct calls to I/O routines.

Tested on a MMP2-based OLPC XO-1.75 laptop with rt5631 coded, mmp_tdma DMA
engine and MMP2 clock controller glued together with audio-graph-card.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Link: https://lore.kernel.org/r/20200511210134.1224532-12-lkundrak@v3.sk
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 20:52:49 +01:00
Vijendar Mukunda
ce5955866d
ASoC: amd: return error when acp de-init fails
Return error when acp de-init fails during suspend.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20200519143422.18255-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 19:49:55 +01:00
Vijendar Mukunda
19cc20bd64
ASoC: amd: refactoring dai_hw_params() callback
Removed api config_pdm_stream_params().
Modified switch case for channel check.
Default case should return -EINVAL.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20200519143422.18255-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 19:49:54 +01:00
Vijendar Mukunda
fdae433e51
ASoC: amd: fix kernel warning
Removed unused variable from code to fix the kernel warning.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20200519143422.18255-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 19:49:53 +01:00
Mark Brown
95325ab34c
Merge series "Add Renoir ACP driver" from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:
This adds an ASoC driver for the ACP (Audio CoProcessor)
block on AMD Renoir APUs.

V3:
- Changed PCI driver PM runtime sequence
- Removed redundant code in Renoir machine driver

V2:
- Removed empty declaration of dai_ops
- Removed SNDRV_PCM_INFO_BATCH flag
- Defined Macros for delay and counter and corrected dma stop sequence.
- Changed PCI driver pm runtime sequence
- Removed redundant code

Vijendar Mukunda (14):
  ASoC: amd: add Renoir ACP3x IP register header
  ASoC: amd: add Renoir ACP PCI driver
  ASoC: amd: add acp init/de-init functions
  ASoC: amd: create acp3x pdm platform device
  ASoC: amd: add ACP3x PDM platform driver
  ASoC: amd: irq handler changes for ACP3x PDM dma driver
  ASoC: amd: add acp3x pdm driver dma ops
  ASoC: amd: add ACP PDM DMA driver dai ops
  ASoC: amd: add Renoir ACP PCI driver PM ops
  ASoC: amd: add ACP PDM DMA driver pm ops
  ASoC: amd: enable Renoir acp3x drivers build
  ASoC: amd: create platform devices for Renoir
  ASoC: amd: RN machine driver using dmic
  ASoC: amd: enable build for RN machine driver

 sound/soc/amd/Kconfig                      |  13 +
 sound/soc/amd/Makefile                     |   1 +
 sound/soc/amd/renoir/Makefile              |   7 +
 sound/soc/amd/renoir/acp3x-pdm-dma.c       | 530 +++++++++++++++++++++
 sound/soc/amd/renoir/acp3x-rn.c            |  77 +++
 sound/soc/amd/renoir/rn-pci-acp3x.c        | 344 +++++++++++++
 sound/soc/amd/renoir/rn_acp3x.h            |  88 ++++
 sound/soc/amd/renoir/rn_chip_offset_byte.h | 349 ++++++++++++++
 8 files changed, 1409 insertions(+)
 create mode 100644 sound/soc/amd/renoir/Makefile
 create mode 100644 sound/soc/amd/renoir/acp3x-pdm-dma.c
 create mode 100644 sound/soc/amd/renoir/acp3x-rn.c
 create mode 100644 sound/soc/amd/renoir/rn-pci-acp3x.c
 create mode 100644 sound/soc/amd/renoir/rn_acp3x.h
 create mode 100644 sound/soc/amd/renoir/rn_chip_offset_byte.h

--
2.26.2
2020-05-19 14:18:53 +01:00
Fabio Estevam
a62ed9606a
ASoC: fsl_micfil: Do not pass irq numbers in comments
The IRQ numbers may change depending on the SoC, so do not pass the IRQ
numbers in the comments.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20200518185448.6116-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 14:18:52 +01:00
Fabio Estevam
1a90a65986
ASoC: fsl_micfil: Remove unneeded ifdef's
There is no need to use ifdef's around the power managament
related functions, as they are already using the __maybe_unused
notation.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20200518185448.6116-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 14:18:51 +01:00
Shengjiu Wang
f8953043e6
ASoC: fsl_asrc: Set ASR76K and ASR56K based on processing clock
The processing clock is different for platforms, so it is better
to set ASR76K and ASR56K based on processing clock, rather than
hard coding the value for them.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Link: https://lore.kernel.org/r/1589278979-31008-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 14:18:51 +01:00
Vijendar Mukunda
1d37766693
ASoC: amd: enable build for RN machine driver
This patch enables build for RN machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-15-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:37 +01:00
Vijendar Mukunda
7ca448a518
ASoC: amd: RN machine driver using dmic
This patch adds Renoir Machine driver for dmic support.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-14-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:36 +01:00
Vijendar Mukunda
b208c3bc33
ASoC: amd: create platform devices for Renoir
Create platform devices for generic dmic codec driver
and machine driver.
These platform devices required for creation of sound card.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-13-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:35 +01:00
Vijendar Mukunda
c15f258e67
ASoC: amd: enable Renoir acp3x drivers build
Renoir ACP3x drivers can be built by selecting necessary
kernel config option.
The patch enables build support of the same.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-12-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:34 +01:00
Vijendar Mukunda
35e4be1136
ASoC: amd: add ACP PDM DMA driver pm ops
Add ACP PDM DMA driver pm ops.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-11-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:33 +01:00
Vijendar Mukunda
c346e768f9
ASoC: amd: add Renoir ACP PCI driver PM ops
Add Renoir ACP Pci driver pm ops.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-10-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:33 +01:00
Vijendar Mukunda
370e7dde5b
ASoC: amd: add ACP PDM DMA driver dai ops
This patch adds ACP3x PDM DMA driver DAI operations.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-9-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:32 +01:00
Vijendar Mukunda
4a767b1d03
ASoC: amd: add acp3x pdm driver dma ops
This patch adds PDM driver DMA operations.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:31 +01:00
Vijendar Mukunda
b9901654a9
ASoC: amd: irq handler changes for ACP3x PDM dma driver
Whenever audio data equal to the PDM watermark level
are consumed, interrupt is generated.
Acknowledge the interrupt.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:30 +01:00
Vijendar Mukunda
f621a3676d
ASoC: amd: add ACP3x PDM platform driver
PDM platform driver binds to the platform device created by
ACP3x PCI device. PDM driver registers ALSA DMA and CPU DAI
components with ASoC framework.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:29 +01:00
Vijendar Mukunda
66c4f558aa
ASoC: amd: create acp3x pdm platform device
ACP 3x IP has PDM decoder as one of IP blocks.
Create a platform device for it, so that the PDM platform driver
can be bound to this device.
Pass PCI resources like MMIO, irq to this platform device.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:28 +01:00
Vijendar Mukunda
85ded49564
ASoC: amd: add acp init/de-init functions
Add Renoir ACP PCI driver init/deinit functions.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:27 +01:00
Vijendar Mukunda
1eb2852efe
ASoC: amd: add Renoir ACP PCI driver
ACP is a PCI audio device.
This patch adds PCI driver to bind to this device and get
PCI resources.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:26 +01:00
Vijendar Mukunda
9b5e98e214
ASoC: amd: add Renoir ACP3x IP register header
Add register header for ACP3x IP in Renoir platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518171704.24999-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-19 13:45:25 +01:00
Hans de Goede
0e0e10fde0
ASoC: Intel: bytcr_rt5640: Add quirk for Toshiba Encore WT8-A tablet
The Toshiba Encore WT8-A tablet almost fully works with the default
settings for non-CR Bay Trail devices. The only problem is that its
jack-detect switch is not inverted (it is active high instead of
the normal active low).

Add a quirk for this model using the default settings +
BYT_RT5640_JD_NOT_INV.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200518072416.5348-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 18:48:26 +01:00
Mark Brown
4ace9a0ec7
Merge series "ASoC: SOF: Intel and IMX updates for 5.8" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:
Hi,

here's a series of minor fixes and improvements to SOF. Add support
for smart amplifier component type. Cover more systems by relaxing
match rules for the generic Soundwire machine driver. Fix issues with
driver unload and address a few compiler warnings.

Daniel Baluta (2):
  ASoC: SOF: Do nothing when DSP PM callbacks are not set
  ASoC: SOF: define INFO_ flags in dsp_ops

Keyon Jie (1):
  ASoC: SOF: topology: add support to smart amplifier

Marcin Rajwa (2):
  ASoC: SOF: add a power_down_notify method
  ASoC: SOF: inform DSP that driver is going to be removed

Pierre-Louis Bossart (2):
  ASoC: SOF: imx: make dsp_ops static
  ASoC: SOF: imx: make imx8m_dsp_ops static

randerwang (1):
  ASoC: SOF: Intel: sdw: relax sdw machine select constraints

 include/sound/sof/topology.h |  2 ++
 sound/soc/sof/core.c         |  6 ++++++
 sound/soc/sof/imx/imx8.c     |  2 +-
 sound/soc/sof/imx/imx8m.c    |  8 +++++++-
 sound/soc/sof/intel/hda.c    | 10 +++++++++-
 sound/soc/sof/pm.c           | 19 +++++++++++++++++--
 sound/soc/sof/sof-priv.h     |  1 +
 sound/soc/sof/topology.c     |  1 +
 8 files changed, 44 insertions(+), 5 deletions(-)

--
2.26.0
2020-05-18 16:43:50 +01:00
Mark Brown
9bb93a40d9
Merge series "ASoC: cleanup DAI/Component activity" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

These are v3 of DAI/Component activity cleanup.

This patch-set exchanges soc-dapm.c :: snd_soc_dai_link_event_xxx()
behavior which updates dai->active but not cares other actives.
But I think original code was wrong.
So, I believe these works correctly, but maybe need some tests or deep review.

v1 -> v2
	- function naming "activity" -> "active"

v2 -> v3
	- macro -> inline function
	- added Reviewed-by from Ranjani, Acked-by from Peter

Link: https://lore.kernel.org/r/875zd39frp.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87blmq9alx.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (21):
  ASoC: soc-pcm: replace snd_soc_runtime_activate()/deactivate() to macro
  ASoC: soc-dai: add snd_soc_dai_action()
  ASoC: soc-dapm: use snd_soc_dai_activate()/deactivate()
  ASoC: soc-dai: add snd_soc_dai_active()
  ASoC: soc-component: add snd_soc_component_active()
  ASoC: soc-dai: add snd_soc_dai_stream_active()
  ASoC: use snd_soc_xxx_active()
  ASoC: atomel: use snd_soc_xxx_active()
  ASoC: bcm: use snd_soc_xxx_active()
  ASoC: cirrus: use snd_soc_xxx_active()
  ASoC: codecs: use snd_soc_xxx_active()
  ASoC: fsl: use snd_soc_xxx_active()
  ASoC: intel: use snd_soc_xxx_active()
  ASoC: jz4740: use snd_soc_xxx_active()
  ASoC: mediatek: use snd_soc_xxx_active()
  ASoC: meson: use snd_soc_xxx_active()
  ASoC: pxa: use snd_soc_xxx_active()
  ASoC: ti: use snd_soc_xxx_active()
  ASoC: uniphier: use snd_soc_xxx_active()
  ASoC: dwc: use snd_soc_xxx_active()
  ASoC: cleanup dai / component active code

 include/sound/soc-component.h                |  6 +-
 include/sound/soc-dai.h                      | 21 +++++-
 include/sound/soc.h                          | 15 ++++-
 sound/soc/atmel/atmel_ssc_dai.c              |  4 +-
 sound/soc/bcm/bcm2835-i2s.c                  |  6 +-
 sound/soc/bcm/cygnus-ssp.c                   |  4 +-
 sound/soc/cirrus/ep93xx-i2s.c                |  4 +-
 sound/soc/codecs/adav80x.c                   |  4 +-
 sound/soc/codecs/arizona.c                   |  2 +-
 sound/soc/codecs/cs4271.c                    |  4 +-
 sound/soc/codecs/madera.c                    |  2 +-
 sound/soc/codecs/max98090.c                  |  6 +-
 sound/soc/codecs/tlv320aic23.c               |  2 +-
 sound/soc/codecs/tlv320dac33.c               |  2 +-
 sound/soc/codecs/uda1380.c                   |  2 +-
 sound/soc/codecs/wl1273.c                    |  2 +-
 sound/soc/codecs/wm8711.c                    |  2 +-
 sound/soc/codecs/wm8753.c                    |  4 +-
 sound/soc/dwc/dwc-i2s.c                      |  2 +-
 sound/soc/fsl/fsl_esai.c                     |  2 +-
 sound/soc/fsl/fsl_spdif.c                    |  4 +-
 sound/soc/intel/atom/sst-mfld-platform-pcm.c | 14 ++--
 sound/soc/jz4740/jz4740-i2s.c                |  8 +--
 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c   |  8 +--
 sound/soc/meson/axg-tdm-interface.c          |  2 +-
 sound/soc/pxa/pxa-ssp.c                      |  8 +--
 sound/soc/pxa/pxa2xx-i2s.c                   |  2 +-
 sound/soc/soc-compress.c                     |  4 +-
 sound/soc/soc-core.c                         | 11 +--
 sound/soc/soc-dai.c                          | 23 +++++++
 sound/soc/soc-dapm.c                         |  8 +--
 sound/soc/soc-pcm.c                          | 70 +++++++-------------
 sound/soc/ti/davinci-mcasp.c                 |  2 +-
 sound/soc/ti/omap-dmic.c                     |  4 +-
 sound/soc/ti/omap-mcbsp.c                    |  4 +-
 sound/soc/ti/omap-mcpdm.c                    |  8 +--
 sound/soc/uniphier/aio-cpu.c                 |  4 +-
 37 files changed, 155 insertions(+), 125 deletions(-)

--
2.17.1
2020-05-18 16:43:49 +01:00
Mark Brown
a1c3ec70ee
Merge series "ASoC: codecs: rt*-sdw: memory leaks and simplifications" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
While debugging unrelated memory corruption errors, I detected issues
related to the interaction with the SoundWire and ASoC cores, here are
3 small patches to fix all this.

Pierre-Louis Bossart (3):
  ASoC: codecs: rt*-sdw: don't assign slave_ops
  ASoC: codecs: rt*-sdw: fix memory leak in set_sdw_stream()
  ASoC: codecs: rt1308-sdw: remove duplicate allocation

 sound/soc/codecs/rt1308-sdw.c | 11 +++--------
 sound/soc/codecs/rt5682-sdw.c |  3 ---
 sound/soc/codecs/rt5682.c     |  3 +++
 sound/soc/codecs/rt700-sdw.c  |  3 ---
 sound/soc/codecs/rt700.c      |  3 +++
 sound/soc/codecs/rt711-sdw.c  |  3 ---
 sound/soc/codecs/rt711.c      |  3 +++
 sound/soc/codecs/rt715-sdw.c  |  3 ---
 sound/soc/codecs/rt715.c      |  3 +++
 9 files changed, 15 insertions(+), 20 deletions(-)

base-commit: d731c1a0f9
--
2.20.1
2020-05-18 16:43:48 +01:00
Mark Brown
3cd4de03c7
Merge series "ASoC: Intel: minor fixes to machine drivers" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Minor button remap changes, inspired by recent Chromebook patches,
typo in component string reported by Jaroslav and driver name change
not submitted in last wm8804 contribution.

Pierre-Louis Bossart (5):
  ASoC: Intel: soc-acpi: change machine driver name for WM8804 platforms
  ASoC: Intel: sof_sdw: fix typo in components string
  ASoC: Intel: sof_sdw_rt711: remap buttons
  ASoC: Intel: sof_sdw_rt700: remap buttons
  ASoC: Intel: cht_bsw_nau8824: remap BTN_0 as KEY_PLAYPAUSE

 sound/soc/intel/boards/cht_bsw_nau8824.c          | 4 ++--
 sound/soc/intel/boards/sof_sdw.c                  | 2 +-
 sound/soc/intel/boards/sof_sdw_rt700.c            | 8 ++++----
 sound/soc/intel/boards/sof_sdw_rt711.c            | 8 ++++----
 sound/soc/intel/common/soc-acpi-intel-bxt-match.c | 2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)

base-commit: d731c1a0f9
--
2.20.1
2020-05-18 16:43:46 +01:00
Mark Brown
949531d9b8
Merge series "ASoC: da7213: support for usage with simple-card" from Sebastian Reichel <sebastian.reichel@collabora.com>:
Hi,

This extends the da7213 driver to be used with simple-audio-card in
combination with a fixed clock. Here is a snippet of the downstream
board's DT, that is supposed to be supported by this patchset.

---------------------------------------------------------------------
/ {
	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "audio-card";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&dailink_master>;
		simple-audio-card,frame-master = <&dailink_master>;

		simple-audio-card,widgets = "Speaker", "Ext Spk";
		simple-audio-card,audio-routing = "Ext Spk", "LINE";

		simple-audio-card,cpu {
			sound-dai = <&ssi1>;
		};

		dailink_master: simple-audio-card,codec {
			sound-dai = <&codec>;
		};
	};

	clk_ext_audio_codec: clock-codec {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <12288000>;
	};
};

&i2c1 {
	codec: audio-codec@1a {
		compatible = "dlg,da7212";
		reg = <0x1a>;
		#sound-dai-cells = <0>;
		VDDA-supply = <&reg_2v5_audio>;
		VDDSP-supply = <&reg_5v0_audio>;
		VDDMIC-supply = <&reg_3v3_audio>;
		VDDIO-supply = <&reg_3v3_audio>;
		clocks = <&clk_ext_audio_codec>;
		clock-names = "mclk";
	};
};
---------------------------------------------------------------------

This is mostly a resend of PATCHv2. There was quite a bit of discussion
for the last patch. As far as I can see no better solution was found and
the patch is fine as is. Sorry for the delay in sending another revision.

Changes since PATCHv2:
 * https://lore.kernel.org/alsa-devel/20191120152406.2744-1-sebastian.reichel@collabora.com/
 * dropped patch converting DA7213 into selectable Kconfig option (merged)
 * fix compatible string in patch 1 (DT binding) as pointed out by Adam Thomson
 * collected Reviewed-by from Adam Thomson for patch 2-4

Changes since PATCHv1:
 * https://lore.kernel.org/alsa-devel/20191108174843.11227-1-sebastian.reichel@collabora.com/
 * add patch adding da7212 compatible to DT bindings
 * update regulator patch, so that VDDA is enabled together with VDDIO
   while the device is enabled to avoid device reset
 * update clock patch, so that automatic PLL handling is not enabled
   when PLL is configured manually
 * update clock patch, so that automatic PLL is disabled when the device
   is suspended
 * update clock patch, so that automatic PLL is configured into bypass
   mode when possible

-- Sebastian

Sebastian Reichel (5):
  ASoC: da7213: Add da7212 DT compatible
  ASoC: da7213: Add regulator support
  ASoC: da7213: move set_sysclk to codec level
  ASoC: da7213: move set_pll to codec level
  ASoC: da7213: add default clock handling

 .../devicetree/bindings/sound/da7213.txt      |   8 +-
 sound/soc/codecs/da7213.c                     | 172 ++++++++++++++++--
 sound/soc/codecs/da7213.h                     |  11 ++
 3 files changed, 175 insertions(+), 16 deletions(-)

--
2.26.2
2020-05-18 16:43:45 +01:00
Tang Bin
15b5c496ff
ASoC: fsl_micfil: Fix unused assignment in fsl_set_clock_params()
Delete unused initialized value of 'ret', because it will
be assigned by the function fsl_micfil_set_mclk_rate().

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20200518110040.18036-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:43:44 +01:00
Akshu Agrawal
f0a77d2b0e
ASoC: amd: raven: Make the driver name consistent across files
This fixes the issue of driver not getting auto loaded with
MODULE_ALIAS.

With this patch:
$find /sys/devices -name modalias -print0 | xargs -0 grep -i acp3x
/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_i2s_playcap.2/
modalias:platform:acp3x_i2s_playcap
/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_i2s_playcap.0/
modalias:platform:acp3x_i2s_playcap
/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_rv_i2s_dma.0/
modalias:platform:acp3x_rv_i2s_dma
/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_i2s_playcap.1/
modalias:platform:acp3x_i2s_playcap

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200518043913.40646-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:43:43 +01:00
Tang Bin
11106cb37a
ASoC: fsl_micfil: Fix indentation to put on one line affected code
In the function fsl_micfil_startup(), the two lines of dev_err()
can be shortened to one line.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20200518105951.19200-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:43:42 +01:00
Kuninori Morimoto
0812a08ac8
ASoC: cleanup dai / component active code
No one is using dai->active, snd_soc_component_is_active().
Let's remove these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87imgy58hp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:16 +01:00
Kuninori Morimoto
8db4f94fb3
ASoC: dwc: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87k11e58hu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:15 +01:00
Kuninori Morimoto
25d6755213
ASoC: uniphier: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87lflu58hy.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:14 +01:00
Kuninori Morimoto
36ad1a8710
ASoC: ti: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87mu6a58i3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:13 +01:00
Kuninori Morimoto
aaeb5fb599
ASoC: pxa: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87o8qq58ia.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:12 +01:00
Kuninori Morimoto
1f79aab5a4
ASoC: meson: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87pnb658if.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:11 +01:00
Kuninori Morimoto
7995981bcf
ASoC: mediatek: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87r1vm58ik.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:11 +01:00
Kuninori Morimoto
48afb28785
ASoC: jz4740: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87sgg258io.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18 16:15:10 +01:00