Commit Graph

22075 Commits

Author SHA1 Message Date
Alexandre Belloni
adc7d56180
ASoC: adau1372: add missing dependencies
SND_SOC_ADAU1372_I2C and SND_SOC_ADAU1372_SPI prpoerly select the REGMAP
config they need but forget to depend on the underlying bus.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201130215626.2400999-1-alexandre.belloni@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02 15:19:08 +00:00
Dan Carpenter
4d638b9cc7
ASoC: codecs: lpass-va-macro: remove some dead code
The "decimator" variable is in the 0-7 range and it's unsigned so there
is no need to check for negative values.

Fixes: 908e6b1df2 ("ASoC: codecs: lpass-va-macro: Add support to VA Macro")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X8c5gjZO7YN/CFsq@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02 15:18:23 +00:00
Jack Yu
569c167ce3
ASoC: rt715: remove unused parameter
Remove unused parameter in rt715.h.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/20201202021336.3591-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02 15:18:22 +00:00
Mark Brown
55a901f028
Merge branch '20201104_yung_chuan_liao_regmap_soundwire_asoc_add_soundwire_sdca_support' (early part) into asoc-5.11 2020-12-02 13:56:48 +00:00
Mark Brown
e5879d9882
Merge branch 'for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.11 2020-11-30 16:05:07 +00:00
Mark Brown
645be01d7b
Merge series "ASoC: SOF: Intel: fix ICL boot sequence" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:
Series introducing a modified boot sequence for the Intel Ice Lake
platform. While no bugs are currently open for this, the current
DSP boot implementation does not follow the full programming sequence.

This patchset is the first instance where SOF driver uses data in
the extended manifest (part of the firmware binary), to influence
the boot process. IPC cannot be used to get this information, as it
is already needed for early boot.

This change is backwards compatible with old firmware versions,
where extended manifest is not available.

Fred Oh (5):
  ASoC: SOF: ops: add parse_platform_ext_manifest() op
  ASoC: SOF: Intel: hda: define parse_platform_ext_manifest op
  ASoC: SOF: ext_manifest: parse cavs extra config data elem
  ASoC: SOF: ops: modify the signature of stall op
  ASoC: SOF: Intel: hda: add sof_icl_ops for ICL platforms

 include/sound/sof/ext_manifest.h   |   1 +
 sound/soc/sof/intel/Makefile       |   2 +-
 sound/soc/sof/intel/apl.c          |   3 +
 sound/soc/sof/intel/cnl.c          |  19 +---
 sound/soc/sof/intel/ext_manifest.h |  35 +++++++
 sound/soc/sof/intel/hda-loader.c   | 100 ++++++++++++++++++++
 sound/soc/sof/intel/hda.h          |  11 +++
 sound/soc/sof/intel/icl.c          | 145 +++++++++++++++++++++++++++++
 sound/soc/sof/intel/tgl.c          |   3 +
 sound/soc/sof/loader.c             |   3 +
 sound/soc/sof/ops.h                |  14 ++-
 sound/soc/sof/sof-pci-dev.c        |   2 +-
 sound/soc/sof/sof-priv.h           |   7 +-
 13 files changed, 324 insertions(+), 21 deletions(-)
 create mode 100644 sound/soc/sof/intel/ext_manifest.h
 create mode 100644 sound/soc/sof/intel/icl.c

--
2.28.0
2020-11-30 15:59:13 +00:00
Mark Brown
853c15b124
Merge series "ASoC: tidyup for jack.h" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

These are jack.h related tidyup.

Kuninori Morimoto (2):
  ASoC: soc-core: tidyup jack.h
  ASoC: add soc-jack.h

 include/sound/soc-jack.h    | 132 ++++++++++++++++++++++++++++++++++++
 include/sound/soc.h         | 122 +--------------------------------
 include/trace/events/asoc.h |   1 +
 sound/soc/soc-core.c        |   1 -
 4 files changed, 134 insertions(+), 122 deletions(-)
 create mode 100644 include/sound/soc-jack.h

--
2.25.1
2020-11-30 15:59:12 +00:00
Mark Brown
f9d8ae0b91
Merge series "ASoC: amd: Minor fixes for error handling" from Takashi Iwai <tiwai@suse.de>:
Hi,

this is a set of patches to address the errors appearing on the
machine that has no I2S DMIC on AMD machine but probed.

Takashi

===

Takashi Iwai (2):
  ASoC: amd: Downgrade print level for invalid ACP mode
  ASoC: amd: Return -ENODEV for non-existing ACPI call

 sound/soc/amd/raven/pci-acp3x.c     | 2 +-
 sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
2.26.2
2020-11-30 15:59:10 +00:00
Lars-Peter Clausen
6cd4c6459e
ASoC: Add ADAU1372 audio CODEC support
Add support for the Analog Devices ADAU1372 audio CODEC.

[Alexandre Belloni: allow 32kHz for TDM4 in slave mode]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201127123030.1610574-2-alexandre.belloni@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30 12:56:33 +00:00
Kuninori Morimoto
9e8434a008
ASoC: soc-core: tidyup jack.h
soc-core.c don't need sound/jack.h anymore, but asoc.h needs it.
This patch fixup header magic.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2iju3zm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30 12:54:01 +00:00
Lumi Lee
bbe1f69dce
ASoC: mediatek: btcvsd fix tx stream assign
Fix tx/rx stream assign in write.
Write should use tx instead of rx.

Signed-off-by: Lumi Lee <lumi.lee@mediatek.com>
Link: https://lore.kernel.org/r/1606705875-1940-1-git-send-email-Lumi.Lee@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30 12:52:48 +00:00
Takashi Iwai
ab5893fdc0
ASoC: amd: Return -ENODEV for non-existing ACPI call
AMD Renoir driver tries to identify the presence of DMIC by evaluating
ACPI _WOV entry, and it returns -EINVAL when the ACPI call failed.
This ended up an error message like
  snd_rn_pci_acp3x: probe of 0000:04:00.5 failed with error -22
although the system is correctly set up.

For avoiding such a superfluous error message, change the return value
to -ENODEV.  Then the driver core just skips to the next one without
complaining.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20201127143200.16272-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30 12:52:46 +00:00
Takashi Iwai
2509bb342e
ASoC: amd: Downgrade print level for invalid ACP mode
The acp3x raven driver skips the probing when the given device isn't
connected with I2S.  This skip behavior itself is fine, but the driver
also emits an error message "Invalid ACP audio mode" with KERN_ERR.
This isn't nice since it appears on the boot screen even if a boot
splash is running, although this itself is no real error.

Downgrade the print level to KERN_INFO so that this message won't
appear on the console unnecessarily.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20201127143200.16272-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30 12:52:45 +00:00
Fred Oh
0cde3e9f02
ASoC: SOF: Intel: hda: add sof_icl_ops for ICL platforms
Separate the dsp ops for ICL ops to specify the use of ICCMAX
FW boot sequence in the run op. All other ops are identical with TGL
except post_fw_run. The recommended HW programming sequence for ICL
is to power up core 3 and keep it in stall if HPRO is enabled.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201127164022.2498406-6-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 17:23:07 +00:00
Fred Oh
a70eb70827
ASoC: SOF: ops: modify the signature of stall op
Modify the signature of stall op to specify core_mask to stall cores.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201127164022.2498406-5-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 17:23:06 +00:00
Fred Oh
e3a85dbe30
ASoC: SOF: ext_manifest: parse cavs extra config data elem
OUTBOX_SIZE, INBOX_SIZE are defined but not being used yet. Handle
these elements to avoid warning about unknown token type.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201127164022.2498406-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 17:23:05 +00:00
Fred Oh
edbaaada5c
ASoC: SOF: Intel: hda: define parse_platform_ext_manifest op
Define the parse_platform_ext_manifest() op for HDA platforms to parse
the SOF_EXT_MAN_CAVS_CONFIG_CAVS_LPRO config item to determine if the FW
is configured for LPRO. The default clock configuration is assumed to be
HPRO in the absence of this item in the extended manifest.
New member clk_config_lpro is added to struct sof_intel_hda_dev to store
the FW clock config information and that this will be used later to perform
platform-specific operations in the post_fw_run op.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201127164022.2498406-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 17:23:04 +00:00
Fred Oh
e984f3ef3d
ASoC: SOF: ops: add parse_platform_ext_manifest() op
Add parse_platform_ext_manifest() op to parse platform-specific config
data in the extended manifest.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201127164022.2498406-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 17:23:03 +00:00
xuyuqing
7f2c63d6ae
ASoC: qcom: sc7180: fix 32 bit format for adau7002
the microphone is attached to external codec(adau7002)
instead of rt5682.We need to always use 32 bit format on sc7180
to meet the clock requirement of adau7002:
The ADAU7002 requires a BCLK rate
that is a minimum of 64× the LRCLK sample rate

Signed-off-by: xuyuqing <xuyuqing@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20201118005858.123013-2-xuyuqing@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 14:50:17 +00:00
Kuninori Morimoto
baed393e85
ASoC: soc-core: add soc_dapm_suspend_resume()
snd_soc_suspend() and soc_resume_deferred() are calling
same snd_soc_dapm_stream_event() with same logic with different parameter.
This patch adds new soc_dapm_suspend_resume() and share the code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im9rekfp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 13:50:26 +00:00
Kuninori Morimoto
d4c1d9eb66
ASoC: soc-core: add soc_playback_digital_mute()
snd_soc_suspend() and soc_resume_deferred() are calling
same snd_soc_dai_digital_mute() with same logic with different parameter.
This patch adds new soc_playback_digital_mute() and share the code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0u7ekfv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-27 13:50:25 +00:00
Mark Brown
6d9b4dbf82
Merge series "ASoC: merge soc_compr_open() rollback and soc_compr_free()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

soc_compr_open() does rollback when failed (A),
but, it is almost same as soc_compr_free().

	static int soc_compr_open(xxx)
	{
		...
		if (ret < 0)
			goto xxx_err;
		...
		return 0;

 ^	machine_err:
 |		...
 |	out:
(A)		...
 |	pm_err:
 |		...
 v		return ret;
	}

This kind of duplicated code can be a hotbed of bugs,
thus, this patch-set share soc_compr_free() and rollback.

Kuninori Morimoto (5):
  ASoC: soc-compress: move soc_compr_free() next to soc_compr_open()
  ASoC: soc-dai: add mark for snd_soc_dai_compr_startup/shutdown()
  ASoC: soc-component: add mark for snd_soc_component_compr_open/free()
  ASoC: soc-component: add mark for snd_soc_link_compr_startup/shutdown()
  ASoC: soc-compress: add soc_compr_clean() and call it from soc_compr_open/free()

 include/sound/soc-component.h |   6 +-
 include/sound/soc-dai.h       |   4 +-
 include/sound/soc-link.h      |   3 +-
 include/sound/soc.h           |   1 +
 sound/soc/soc-component.c     |  17 +++--
 sound/soc/soc-compress.c      | 115 +++++++++++++++++-----------------
 sound/soc/soc-dai.c           |  13 +++-
 sound/soc/soc-link.c          |  11 +++-
 8 files changed, 95 insertions(+), 75 deletions(-)

--
2.25.1
2020-11-26 20:03:01 +00:00
Mark Brown
0858fc17b6
Merge series "ASoC: fix !OF compile test warnings" from Krzysztof Kozlowski <krzk@kernel.org>:
Hi,

Changes since v1:
1. New patch 2/39: ASoC: bd28623: mark OF related data as maybe unused,
2. Patches 1-13: add maybe_unused after discussions with Mark,
3. Add Sylwester's review to two patches (one changed so please review
   one more time).

Best regards,
Krzysztof

Krzysztof Kozlowski (39):
  ASoC: ak5558: mark OF related data as maybe unused
  ASoC: bd28623: mark OF related data as maybe unused
  ASoC: gtm601: mark OF related data as maybe unused
  ASoC: inno_rk3036: mark OF related data as maybe unused
  ASoC: rk3328: mark OF related data as maybe unused
  ASoC: tas571x: mark OF related data as maybe unused
  ASoC: kirkwood: armada-370-db: mark OF related data as maybe unused
  ASoC: meson: t9015: mark OF related data as maybe unused
  ASoC: qcom: mark OF related data as maybe unused
  ASoC: samsung: smdk_wm8994: mark OF related data as maybe unused
  ASoC: rockchip: mark OF related data as maybe unused
  ASoC: ti: davinci: mark OF related data as maybe unused
  ASoC: uniphier: mark OF related data as maybe unused
  ASoC: ak4118: skip of_device_id table when !CONFIG_OF
  ASoC: alc5623: skip of_device_id table when !CONFIG_OF
  ASoC: alc5632: skip of_device_id table when !CONFIG_OF
  ASoC: da7218: skip of_device_id table when !CONFIG_OF
  ASoC: da7219: skip of_device_id table when !CONFIG_OF
  ASoC: da9055: skip of_device_id table when !CONFIG_OF
  ASoC: es8316: skip of_device_id table when !CONFIG_OF
  ASoC: max98090: skip of_device_id table when !CONFIG_OF
  ASoC: max98095: skip of_device_id table when !CONFIG_OF
  ASoC: max98371: skip of_device_id table when !CONFIG_OF
  ASoC: max9867: skip of_device_id table when !CONFIG_OF
  ASoC: max98925: skip of_device_id table when !CONFIG_OF
  ASoC: max98926: skip of_device_id table when !CONFIG_OF
  ASoC: pcm1789: skip of_device_id table when !CONFIG_OF
  ASoC: pcm179x: skip of_device_id table when !CONFIG_OF
  ASoC: rt5660: skip of_device_id table when !CONFIG_OF
  ASoC: tas2562: skip of_device_id table when !CONFIG_OF
  ASoC: tlv320: skip of_device_id table when !CONFIG_OF
  ASoC: ts3a227e: skip of_device_id table when !CONFIG_OF
  ASoC: es7134: mark OF related data as maybe unused
  ASoC: es7241: mark OF related data as maybe unused
  ASoC: samsung: i2s: mark OF related data as maybe unused
  ASoC: max98371: drop driver pm=NULL assignment
  ASoC: max98925: drop driver pm=NULL assignment
  ASoC: max98926: drop driver pm=NULL assignment
  ASoC: samsung: smdk_wm8994: remove redundant of_match_ptr()

 sound/soc/codecs/ak4118.c           | 2 ++
 sound/soc/codecs/ak5558.c           | 2 +-
 sound/soc/codecs/alc5623.c          | 2 ++
 sound/soc/codecs/alc5632.c          | 2 ++
 sound/soc/codecs/bd28623.c          | 2 +-
 sound/soc/codecs/da7218.c           | 2 ++
 sound/soc/codecs/da7219.c           | 2 ++
 sound/soc/codecs/da9055.c           | 2 ++
 sound/soc/codecs/es7134.c           | 4 ++--
 sound/soc/codecs/es7241.c           | 2 +-
 sound/soc/codecs/es8316.c           | 2 ++
 sound/soc/codecs/gtm601.c           | 2 +-
 sound/soc/codecs/inno_rk3036.c      | 2 +-
 sound/soc/codecs/max98090.c         | 2 ++
 sound/soc/codecs/max98095.c         | 2 ++
 sound/soc/codecs/max98371.c         | 3 ++-
 sound/soc/codecs/max9867.c          | 2 ++
 sound/soc/codecs/max98925.c         | 3 ++-
 sound/soc/codecs/max98926.c         | 3 ++-
 sound/soc/codecs/pcm1789-i2c.c      | 2 ++
 sound/soc/codecs/pcm179x-i2c.c      | 2 ++
 sound/soc/codecs/rk3328_codec.c     | 2 +-
 sound/soc/codecs/rt5660.c           | 2 ++
 sound/soc/codecs/tas2562.c          | 2 ++
 sound/soc/codecs/tas571x.c          | 4 ++--
 sound/soc/codecs/tlv320adcx140.c    | 2 ++
 sound/soc/codecs/tlv320aic23-i2c.c  | 2 ++
 sound/soc/codecs/ts3a227e.c         | 2 ++
 sound/soc/kirkwood/armada-370-db.c  | 2 +-
 sound/soc/meson/t9015.c             | 2 +-
 sound/soc/qcom/apq8016_sbc.c        | 2 +-
 sound/soc/qcom/lpass-apq8016.c      | 2 +-
 sound/soc/qcom/lpass-ipq806x.c      | 2 +-
 sound/soc/qcom/lpass-sc7180.c       | 2 +-
 sound/soc/rockchip/rockchip_i2s.c   | 2 +-
 sound/soc/rockchip/rockchip_pdm.c   | 2 +-
 sound/soc/rockchip/rockchip_spdif.c | 2 +-
 sound/soc/samsung/i2s.c             | 8 ++++----
 sound/soc/samsung/smdk_wm8994.c     | 4 ++--
 sound/soc/ti/davinci-i2s.c          | 2 +-
 sound/soc/uniphier/aio-ld11.c       | 2 +-
 sound/soc/uniphier/aio-pxs2.c       | 2 +-
 sound/soc/uniphier/evea.c           | 2 +-
 43 files changed, 69 insertions(+), 32 deletions(-)

--
2.25.1
2020-11-26 20:03:00 +00:00
Jack Yu
6f4a038b99
ASoC/SoundWire: rt715-sdca: First version of rt715 sdw sdca codec driver
First version of rt715 sdw sdca codec driver.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20201103172226.4278-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:20:00 +00:00
Kuninori Morimoto
453d32c2f7
ASoC: soc-compress: add soc_compr_clean() and call it from soc_compr_open/free()
soc_compr_open() does rollback when failed (A),
but, it is almost same as soc_compr_free().

	static int soc_compr_open(xxx)
	{
		...
		if (ret < 0)
			goto xxx_err;
		...
		return 0;

 ^	machine_err:
 |		...
 |	out:
(A)		...
 |	pm_err:
 |		...
 v		return ret;
	}

The difference is
soc_compr_free()  is for all dai/component/substream,
rollback          is for succeeded part only.

This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_compr_free() and rollback.

Now, soc_compr_open/free() are handling
	1) snd_soc_dai_compr_startup/shutdown()
	2) snd_soc_component_compr_open/free()
	3) snd_soc_link_compr_startup/shutdown()

Now, 1) to 3) are handled.
This patch adds new soc_compr_clean() and call it from
soc_compr_open() as rollback, and from soc_compr_free_free() as
normal close handler.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ima25iwa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:09:37 +00:00
Kuninori Morimoto
cd7c7d10e8
ASoC: soc-component: add mark for snd_soc_link_compr_startup/shutdown()
soc_compr_open() does rollback when failed (A),
but, it is almost same as soc_compr_free().

	static int soc_compr_open(xxx)
	{
		...
		if (ret < 0)
			goto xxx_err;
		...
		return 0;

 ^	machine_err:
 |		...
 |	out:
(A)		...
 |	pm_err:
 |		...
 v		return ret;
	}

The difference is
soc_compr_free()  is for all dai/component/substream,
rollback          is for succeeded part only.

This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_compr_free() and rollback.
	1) snd_soc_dai_compr_startup/shutdown()
	2) snd_soc_component_compr_open/free()
=>	3) snd_soc_link_compr_startup/shutdown()

This patch is for 3) snd_soc_link_compr_startup/shutdown()
and adds new cstream mark.
It will mark cstream when startup() was suceeded.
If rollback happen *after* that, it will check rollback flag
and marked cstream.

It cares *previous* startup() only now,
but we might want to check *whole* marked cstream in the future.
This patch is using macro so that it can be easily adjust to it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0ui5iwf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:09:36 +00:00
Kuninori Morimoto
f94ba9ac20
ASoC: soc-component: add mark for snd_soc_component_compr_open/free()
soc_compr_open() does rollback when failed (A),
but, it is almost same as soc_compr_free().

	static int soc_compr_open(xxx)
	{
		...
		if (ret < 0)
			goto xxx_err;
		...
		return 0;

 ^	machine_err:
 |		...
 |	out:
(A)		...
 |	pm_err:
 |		...
 v		return ret;
	}

The difference is
soc_compr_free()  is for all dai/component/substream,
rollback          is for succeeded part only.

This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_compr_free() and rollback.
	1) snd_soc_dai_compr_startup/shutdown()
=>	2) snd_soc_component_compr_open/free()
	3) snd_soc_link_compr_startup/shutdown()

This patch is for 2) snd_soc_component_compr_open/free(),
and adds new cstream mark.
It will mark cstream when startup() was suceeded.
If rollback happen *after* that, it will check rollback flag
and marked cstream.

It cares *previous* startup() only now,
but we might want to check *whole* marked cstream in the future.
This patch is using macro so that it can be easily adjust to it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfey5iwk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:09:35 +00:00
Kuninori Morimoto
1e6a93cf74
ASoC: soc-dai: add mark for snd_soc_dai_compr_startup/shutdown()
soc_compr_open() does rollback when failed (A),
but, it is almost same as soc_compr_free().

	static int soc_compr_open(xxx)
	{
		...
		if (ret < 0)
			goto xxx_err;
		...
		return 0;

 ^	machine_err:
 |		...
 |	out:
(A)		...
 |	pm_err:
 |		...
 v		return ret;
	}

The difference is
soc_compr_free()  is for all dai/component/substream,
rollback          is for succeeded part only.

This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_compr_free() and rollback.
=>	1) snd_soc_dai_compr_startup/shutdown()
	2) snd_soc_component_compr_open/free()
	3) snd_soc_link_compr_startup/shutdown()

This patch is for 1) snd_soc_dai_compr_startup/shutdown(),
and adds new cstream mark.
It will mark cstream when startup() was suceeded.
If rollback happen *after* that, it will check rollback flag
and marked cstream.

It cares *previous* startup() only now,
but we might want to check *whole* marked cstream in the future.
This patch is using macro so that it can be easily adjust to it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtze5iwp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:09:34 +00:00
Kuninori Morimoto
15a7b8c136
ASoC: soc-compress: move soc_compr_free() next to soc_compr_open()
This patch moves soc_compr_free() next to soc_compr_open().
This is prepare for soc_compr_open() cleanup.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8ju5iwv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:09:33 +00:00
Shengjiu Wang
c61d1142cf
ASoC: fsl: Fix config name of CONFIG_ARCH_MXC
CONFIG_ARCH_MXC should be ARCH_MXC

Fixes: 674226db62 ("ASoC: fsl: SND_SOC_FSL_AUD2HTX should depend on ARCH_MXC")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1606371293-29099-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:08:12 +00:00
Shengjiu Wang
144f836646
ASoC: hdmi-codec: Add RX support
HDMI interface can also be used as receiver, this patch is to
add such support. The most difference compare with TX is that RX
don't need to get edid information.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1606372608-2329-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:08:11 +00:00
Krzysztof Kozlowski
0670c9a723
ASoC: samsung: smdk_wm8994: remove redundant of_match_ptr()
of_match_device() already handles properly !CONFIG_OF case, so passing
the argument via of_match_ptr() is not needed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <snawrocki@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-40-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:33 +00:00
Krzysztof Kozlowski
c37de70121
ASoC: max98926: drop driver pm=NULL assignment
There is no point to explicitly set driver .pm field to NULL.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-39-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:32 +00:00
Krzysztof Kozlowski
0eb97389cc
ASoC: max98925: drop driver pm=NULL assignment
There is no point to explicitly set driver .pm field to NULL.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-38-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:31 +00:00
Krzysztof Kozlowski
fe4b501e56
ASoC: max98371: drop driver pm=NULL assignment
There is no point to explicitly set driver .pm field to NULL.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-37-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:30 +00:00
Krzysztof Kozlowski
da773b2b45
ASoC: samsung: i2s: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  sound/soc/samsung/i2s.c:1646:42: warning: ‘i2sv5_dai_type_i2s1’ defined but not used [-Wunused-const-variable=]
  sound/soc/samsung/i2s.c:1639:42: warning: ‘i2sv7_dai_type’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <snawrocki@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-36-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:29 +00:00
Krzysztof Kozlowski
55c259bf06
ASoC: es7241: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  sound/soc/codecs/es7241.c:206:33: warning: ‘es7241_chip’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-35-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:28 +00:00
Krzysztof Kozlowski
418fb63003
ASoC: es7134: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  sound/soc/codecs/es7134.c:264:33: warning: ‘es7154_chip’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-34-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:27 +00:00
Krzysztof Kozlowski
62bd3054af
ASoC: ts3a227e: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/ts3a227e.c:369:34: warning: ‘ts3a227e_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-33-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:26 +00:00
Krzysztof Kozlowski
762e0b8baf
ASoC: tlv320: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/tlv320aic23-i2c.c:38:34: warning: ‘tlv320aic23_of_match’ defined but not used [-Wunused-const-variable=]
  sound/soc/codecs/tlv320adcx140.c:1076:34: warning: ‘tlv320adcx140_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-32-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:25 +00:00
Krzysztof Kozlowski
68591e8aa1
ASoC: tas2562: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/tas2562.c:805:34: warning: ‘tas2562_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-31-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:25 +00:00
Krzysztof Kozlowski
c7bfb25333
ASoC: rt5660: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/rt5660.c:1238:34: warning: ‘rt5660_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-30-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:24 +00:00
Krzysztof Kozlowski
e2baf7fa3e
ASoC: pcm179x: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/pcm179x-i2c.c:33:34: warning: ‘pcm179x_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-29-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:23 +00:00
Krzysztof Kozlowski
36cbbf009f
ASoC: pcm1789: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/pcm1789-i2c.c:36:34: warning: ‘pcm1789_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-28-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:22 +00:00
Krzysztof Kozlowski
fff68ff651
ASoC: max98926: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/max98926.c:574:34: warning: ‘max98926_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-27-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:21 +00:00
Krzysztof Kozlowski
d39d9cb5a2
ASoC: max98925: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/max98925.c:630:34: warning: ‘max98925_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-26-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:20 +00:00
Krzysztof Kozlowski
682e221931
ASoC: max9867: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/max9867.c:652:34: warning: ‘max9867_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-25-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:19 +00:00
Krzysztof Kozlowski
e77332c3e7
ASoC: max98371: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/max98371.c:411:34: warning: ‘max98371_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-24-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:18 +00:00
Krzysztof Kozlowski
a5a196bf0a
ASoC: max98095: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/max98095.c:2151:34: warning: ‘max98095_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-23-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:17 +00:00
Krzysztof Kozlowski
ac792c0ab3
ASoC: max98090: skip of_device_id table when !CONFIG_OF
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/max98090.c:2671:34: warning: ‘max98090_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-22-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:16 +00:00