Shengjiu Wang [Wed, 18 Aug 2021 06:03:34 +0000 (14:03 +0800)]
ASoC: fsl_rpmsg: Check -EPROBE_DEFER for getting clocks
The devm_clk_get() may return -EPROBE_DEFER, then clocks
will be assigned to NULL wrongly. As the clocks are
optional so we can use devm_clk_get_optional() instead of
devm_clk_get().
Fixes:
b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1629266614-6942-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 17 Aug 2021 14:14:06 +0000 (15:14 +0100)]
Merge series "ASoC: tegra30: Fix use of of_device_get_match_data" from Aakash Hemadri <aakashhemadri123@gmail.com>:
Hi,
This patchset fixes my previous incorrect patches.
356b94a32a75 ("ASoC: tegra30: i2s: Use of_device_get_match_data")
80165bb80433 ("ASoC: tegra30: ahub: Use of_device_get_match_data")
Aakash Hemadri (2):
ASoC: tegra30: ahub: Fix incorrect usage of of_device_get_match_data
ASoC: tegra30: i2s: Fix incorrect usage of of_device_get_match_data
sound/soc/tegra/tegra30_ahub.c | 6 ++----
sound/soc/tegra/tegra30_i2s.c | 8 ++++----
2 files changed, 6 insertions(+), 8 deletions(-)
--
2.32.0
Hans de Goede [Mon, 16 Aug 2021 11:47:22 +0000 (13:47 +0200)]
ASoC: Intel: bytcr_rt5640: Use cfg-lineout:2 in the components string
Use "cfg-lineout:2" in the components string on boards with a lineout
instead of "cfg-lineout:1", this better mirrors the speaker part of
the components string where we use "cfg-spk:1" for devices with a single
speaker and "cfg-spk:2" for stereo speakers.
The lineout is stereo by default, so using ":2" makes more sense, this
way we keep ":1" reserved in case we ever encounter a device with
a mono lineout.
We can make this change without breaking userspace because no kernel
has shipped with "cfg-lineout:1" in the component-string yet; and there
also are no userspace bits (UCM profiles) checking for this yet.
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/20210816114722.107363-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Biju Das [Mon, 16 Aug 2021 18:23:36 +0000 (19:23 +0100)]
ASoC: sh: rz-ssi: Fix wrong operator used issue
Fix wrong operator used issue reported by Coverity by replacing |
operator with & operator.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reported-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210816182336.29959-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Aakash Hemadri [Mon, 16 Aug 2021 21:14:52 +0000 (02:44 +0530)]
ASoC: tegra30: i2s: Fix incorrect usage of of_device_get_match_data
const struct of_device_id incorrectly assigned "match->data" using
of_device_get_match_data()
Instead assign `const struct tegra30_i2s_soc_data *soc_data` with
const void *of_device_get_match_data(...)
Fixes:
356b94a32a75 ("ASoC: tegra30: i2s: Use of_device_get_match_data")
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Link: https://lore.kernel.org/r/4805c7fcd35c8deada63d41cb34d40de80f85a13.1629148177.git.aakashhemadri123@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Aakash Hemadri [Mon, 16 Aug 2021 21:14:51 +0000 (02:44 +0530)]
ASoC: tegra30: ahub: Fix incorrect usage of of_device_get_match_data
const struct of_device_id incorrectly assigned "match->data" using
of_device_get_match_data()
Instead assign `const struct tegra30_ahub_soc_data *soc_data` with
const void *of_device_get_match_data(...)
Fixes:
80165bb80433 ("ASoC: tegra30: ahub: Use of_device_get_match_data")
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Link: https://lore.kernel.org/r/bb61c41f2ee0cf0d85fecdfea05f23a7205992e6.1629148177.git.aakashhemadri123@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Biju Das [Mon, 16 Aug 2021 13:20:49 +0000 (14:20 +0100)]
ASoC: sh: rz-ssi: Fix dereference of noderef expression warning
Fix following sparse warning:
sound/soc/sh/rz-ssi.c:156:15: sparse: warning: dereference of
noderef expression
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20210816132049.28128-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 16 Aug 2021 14:20:05 +0000 (15:20 +0100)]
Merge series "ASoC: soc-xxx: cleanup cppcheck warning" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
Now I'm posting audio-graph-card2 patch-set, but it seems it needs longer
discussion. Thus I want to post more easy patch first, and reduce my
local patches.
These are cppcheck warning cleanup patches for soc-xxx.
Kuninori Morimoto (9):
ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_hw_params()
ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_new()
ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_copy_user()
ASoC: soc-dai: cleanup cppcheck warning at snd_soc_dai_link_set_capabilities()
ASoC: soc-dai: cleanup cppcheck warning at snd_soc_pcm_dai_new()
ASoC: soc-jack: cleanup cppcheck warning at snd_soc_jack_report()
ASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIB
ASoC: soc-component: cleanup cppcheck warning at snd_soc_pcm_component_pm_runtime_get()
ASoC: soc-ac97: cleanup cppcheck warning
sound/soc/soc-ac97.c | 14 ++++++--------
sound/soc/soc-component.c | 4 ++--
sound/soc/soc-dai.c | 18 ++++++++----------
sound/soc/soc-generic-dmaengine-pcm.c | 9 +++------
sound/soc/soc-jack.c | 15 +++++++--------
5 files changed, 26 insertions(+), 34 deletions(-)
--
2.25.1
Aakash Hemadri [Sat, 14 Aug 2021 20:12:19 +0000 (01:42 +0530)]
ASoC: tegra30: i2s: Use of_device_get_match_data
Prefer `of_device_get_match_data` over `of_match_device`
Retrieve OF match data using `of_device_get_match_data`, this is cleaner
and better expresses intent.
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/f4e632e0023d90c43b2b927e752585142a9d9c26.1628971397.git.aakashhemadri123@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Aakash Hemadri [Sat, 14 Aug 2021 20:12:18 +0000 (01:42 +0530)]
ASoC: tegra30: ahub: Use of_device_get_match_data
Prefer `of_device_get_match_data` over `of_match_device`
Retrieve OF match data using `of_device_get_match_data`, this is cleaner
and better expresses intent.
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/e568d621c9c05ee23732a6a6f9e3606a780b1707.1628971397.git.aakashhemadri123@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:56:23 +0000 (13:56 +0900)]
ASoC: soc-ac97: cleanup cppcheck warning
This patch cleanups below cppcheck warning.
sound/soc/soc-ac97.c:41:15: style: struct member 'snd_ac97_gpio_priv::gpios_set' is never used. [unusedStructMember]
unsigned int gpios_set;
^
sound/soc/soc-ac97.c:42:28: style: struct member 'snd_ac97_gpio_priv::component' is never used. [unusedStructMember]
struct snd_soc_component *component;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1euyolk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:56:19 +0000 (13:56 +0900)]
ASoC: soc-component: cleanup cppcheck warning at snd_soc_pcm_component_pm_runtime_get()
This patch cleanups below cppcheck warning.
sound/soc/soc-component.c:1183:9: style: The scope of the variable 'ret' can be reduced. [variableScope]
int i, ret;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sfzayolo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:56:15 +0000 (13:56 +0900)]
ASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIB
This patch cleanups below cppcheck warning.
sound/soc/soc-jack.c:21:6: style: struct member 'jack_gpio_tbl::count' is never used. [unusedStructMember]
int count;
^
sound/soc/soc-jack.c:23:28: style: struct member 'jack_gpio_tbl::gpios' is never used. [unusedStructMember]
struct snd_soc_jack_gpio *gpios;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tujqyols.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:56:10 +0000 (13:56 +0900)]
ASoC: soc-jack: cleanup cppcheck warning at snd_soc_jack_report()
This patch cleanups below cppcheck warning.
sound/soc/soc-jack.c:45:6: style: The scope of the variable 'enable' can be reduced. [variableScope]
int enable;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v946yolx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:56:06 +0000 (13:56 +0900)]
ASoC: soc-dai: cleanup cppcheck warning at snd_soc_pcm_dai_new()
This patch cleanups below cppcheck warning.
sound/soc/soc-dai.c:553:13: style: Variable 'ret' is assigned a value that is never used. [unreadVariable]
int i, ret = 0;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wnomyom1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:56:01 +0000 (13:56 +0900)]
ASoC: soc-dai: cleanup cppcheck warning at snd_soc_dai_link_set_capabilities()
This patch cleanups below cppcheck warning.
sound/soc/soc-dai.c:454:7: style: The scope of the variable 'supported_cpu' can be reduced. [variableScope]
bool supported_cpu;
^
sound/soc/soc-dai.c:455:7: style: The scope of the variable 'supported_codec' can be reduced. [variableScope]
bool supported_codec;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y292yom6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:55:56 +0000 (13:55 +0900)]
ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_copy_user()
This patch cleanups below cppcheck warning.
sound/soc/soc-generic-dmaengine-pcm.c:310:6: style: The scope of the variable 'ret' can be reduced. [variableScope]
int ret;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgtiyomb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:55:51 +0000 (13:55 +0900)]
ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_new()
This patch cleanups below cppcheck warning.
sound/soc/soc-generic-dmaengine-pcm.c:233:28: style: The scope of the variable 'substream' can be reduced. [variableScope]
struct snd_pcm_substream *substream;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871r6u0yzs.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Mon, 16 Aug 2021 04:55:44 +0000 (13:55 +0900)]
ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_hw_params()
This patch cleanups below cppcheck warning.
sound/soc/soc-generic-dmaengine-pcm.c:82:6: style: The scope of the variable 'ret' can be reduced. [variableScope]
int ret;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735ra0yzz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 13 Aug 2021 16:49:06 +0000 (17:49 +0100)]
Merge series "ASoC: Intel: boards: use software node API" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
This is an update on an earlier contribution from Heikki Krogerus
The function device_add_properties() is going to be removed.
Replacing it with software node API equivalents.
Thanks for Hans de Goede and Andy Shevchenko for their comments,
suggestions and Reviewed-by tags on GitHub. The review thread can be
found at https://github.com/thesofproject/linux/pull/3041)
v3 changes:
Fixed nit-picks from Andy: label, return value, missing commas/periods.
Added Andy's Reviewed-by tag
v2 changes: feedback from Andy and Hans
Better error handling
Codec reference is kept until the .remove callback
Remove bus search to find device
v1 changes from Heikki's patches:
Avoid the use of devm_ routines for Baytrail machine drivers.
Heikki Krogerus (1):
ASoC: Intel: boards: use software node API in Atom boards
Pierre-Louis Bossart (7):
ASoC: Intel: boards: harden codec property handling
ASoC: Intel: boards: handle errors with acpi_dev_get_first_match_dev()
ASoC: Intel: boards: get codec device with ACPI instead of bus search
ASoC: Intel: sof_sdw: pass card information to init/exit functions
ASoC: Intel: sof_sdw_rt711*: keep codec device reference until remove
ASoC: Intel: use software node API in SoundWire machines
ASoC: Intel: remove device_properties for Atom boards
sound/soc/intel/boards/bytcht_es8316.c | 31 ++++++++--
sound/soc/intel/boards/bytcr_rt5640.c | 60 +++++++++++++++-----
sound/soc/intel/boards/bytcr_rt5651.c | 63 ++++++++++++++-------
sound/soc/intel/boards/sof_sdw.c | 20 ++++---
sound/soc/intel/boards/sof_sdw_common.h | 37 +++++++-----
sound/soc/intel/boards/sof_sdw_max98373.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt1308.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt1316.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt5682.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt700.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt711.c | 51 +++++++++--------
sound/soc/intel/boards/sof_sdw_rt711_sdca.c | 52 +++++++++--------
sound/soc/intel/boards/sof_sdw_rt715.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt715_sdca.c | 3 +-
14 files changed, 223 insertions(+), 112 deletions(-)
--
2.25.1
Mark Brown [Fri, 13 Aug 2021 16:49:04 +0000 (17:49 +0100)]
Merge series "Add RZ/G2L Sound support" from Biju Das <biju.das.jz@bp.renesas.com>:
This patch series aims to add ASoC support on RZ/G2L SoC's.
It is based on the work done by Chris Brandt for RZ/A ASoC driver.
v4->v5
* Moved validation of sample bits in hw_params
* Removed validation of frame bits as it is redundant
* split the rz_ssi_start_stop function into rz_ssi_start and rz_ssi_stop.
* remove the spin_lock around rz_ssi_stream_init.
* Updated dmas description and removed fixes as it is an enhancement
now.
* updated ssi_start functions with setting fifo thresholds
and ssi_stop function with cancel all dma txn.
v3->v4:
* Updated the subject line as per style for the subsystem.
* Removed select SND_SIMPLE_CARD from Kconfig
* Added C++ comments for copyright and driver description.
* Moved validation of channels in hw_params
* removed asm issue reported by bot as well as Mark
* replaced master/slave macros with provider/consumer macros
* Improved locking and added more null pointer checks.
v2->v3:
* Fixed the dependency on KCONFIG
* Merged the binding patch with dma feature added
* Updated dt binding example with encoded #dma-cells value.
* Improved Error handling in probe function
* Removed the passing legacy channel configuration parameters from
dmaengine_slave_config function
* started using dma_request_chan instead of deprecated
dma_request_slave_channel
* Removed SoC dtsi and config patches from this series. Will send it later.
v1->v2:
* Rebased to latest rc kernel
Biju Das (3):
ASoC: sh: Add RZ/G2L SSIF-2 driver
ASoC: dt-bindings: renesas,rz-ssi: Update slave dma channel
configuration parameters
ASoC: sh: rz-ssi: Add SSI DMAC support
.../bindings/sound/renesas,rz-ssi.yaml | 22 +-
sound/soc/sh/Kconfig | 6 +
sound/soc/sh/Makefile | 4 +
sound/soc/sh/rz-ssi.c | 1063 +++++++++++++++++
4 files changed, 1093 insertions(+), 2 deletions(-)
create mode 100644 sound/soc/sh/rz-ssi.c
--
2.17.1
Mark Brown [Fri, 13 Aug 2021 16:49:03 +0000 (17:49 +0100)]
Merge series "ASoC: SOF: Intel: DMI L1 power optimization for HDaudio platforms" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
This patchset provides an optimization that result in significant power
savings on Intel HDAudio platforms using SOF (Sound Open Firmware).
We previously prevented the Intel DSP from enabling the DMI_L1
capability to work-around issues with pause on capture streams. It
turns out that this also prevented the platform from entering high C
states in full-duplex usages such as videoconferencing - a rather
basic use case since the start of the pandemic.
The support for pause_push/release was already a bit controversial for
Intel platforms, in theory platforms should only enable PAUSE if they
can resume on the same sample, which is not the case on any Intel
platform.
With this patchset, when the user enables DMI L1 via a kernel
parameter, the PAUSE support is disabled for capture streams. A kernel
parameter is far from ideal but it's a placeholder until we have an
API to negotiate capabilities between applications and driver, and
it's far less confusing than a Kconfig option.
Changes since v1:
Removal of SPIB support since it may conflict with Takashi's memalloc
changes. These SPIB changes will be provided after rebase.
Addition of one cleanup for cppcheck warning
Move all changes to intel/ directory, no changes in shared code
Flipped the logic: the selection of DMI L1 disables PAUSE
Pierre-Louis Bossart (4):
ASoC: SOF: Intel: Kconfig: clarify DMI L1 option description
ASoC: SOF: Intel: hda-stream: remove always true condition
ASoC: SOF: Intel: simplify logic for DMI_L1 handling
ASoC: SOF: Intel: make DMI L1 selection more robust
sound/soc/sof/intel/Kconfig | 10 ----------
sound/soc/sof/intel/hda-pcm.c | 16 ++++++++++++++--
sound/soc/sof/intel/hda-stream.c | 11 +++++------
3 files changed, 19 insertions(+), 18 deletions(-)
--
2.25.1
Heikki Krogerus [Fri, 13 Aug 2021 15:11:16 +0000 (10:11 -0500)]
ASoC: Intel: boards: use software node API in Atom boards
The function device_add_properties() is going to be removed.
Replacing it with software node API equivalents.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Fri, 13 Aug 2021 15:11:15 +0000 (10:11 -0500)]
ASoC: Intel: remove device_properties for Atom boards
Prepare the transition to the software node API by removing device
properties in the probe error handling and .remove callback.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Fri, 13 Aug 2021 15:11:14 +0000 (10:11 -0500)]
ASoC: Intel: use software node API in SoundWire machines
The function device_add_properties() is going to be removed.
Replacing it with software node API equivalents.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Co-developed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Fri, 13 Aug 2021 15:11:13 +0000 (10:11 -0500)]
ASoC: Intel: sof_sdw_rt711*: keep codec device reference until remove
Follow the example of Intel Atom drivers and keep a reference to the
headset codec until the properties are removed.
There is no guarantee that the module for the codec driver is loaded
before the machine driver probe, the use of the deferred probe
mechanism is required.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Fri, 13 Aug 2021 15:11:12 +0000 (10:11 -0500)]
ASoC: Intel: sof_sdw: pass card information to init/exit functions
If we want to handle a context in init/exit function, we have to pass
the card information. This will be necessary to better deal with
device properties in the follow-up commits.
No functional change other than prototype update.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Fri, 13 Aug 2021 15:11:11 +0000 (10:11 -0500)]
ASoC: Intel: boards: get codec device with ACPI instead of bus search
We have an existing 'adev' handle from which we can find the codec
device, no need for an I2C bus search.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Fri, 13 Aug 2021 15:11:10 +0000 (10:11 -0500)]
ASoC: Intel: boards: handle errors with acpi_dev_get_first_match_dev()
acpi_dev_get_first_match_dev() searches for an acpi_handle
instantiated by the ACPI table scanning done early during boot.
Two of three machine drivers using this search don't deal with errors
and the one which does (bytcr_rt5651) returns -ENODEV, which doesn't
make sense here: an alternate driver will not be probed.
Add consistent error handling and report -ENXIO.
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Fri, 13 Aug 2021 15:11:09 +0000 (10:11 -0500)]
ASoC: Intel: boards: harden codec property handling
In current ACPI-based devices, the DSDT does not include any of the
properties required by the codec driver. This is not an ACPI
limitation proper since the _DSD method could be used, as done for
Camera and SoundWire in newer platforms. For legacy devices, there is
unfortunately no other option than using a work-around: we add
properties to the codec device from the machine driver.
To avoid any issues with the codec driver being unbound, we need to
keep a reference to the codec device until the card is removed.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Co-developed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210813151116.23931-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Douglas Anderson [Fri, 13 Aug 2021 14:34:05 +0000 (07:34 -0700)]
ASoC: rt5682: Remove unused variable in rt5682_i2c_remove()
In commit
772d44526e20 ("ASoC: rt5682: Properly turn off regulators if
wrong device ID") I deleted code but forgot to delete a variable
that's now unused. Delete it.
Fixes:
772d44526e20 ("ASoC: rt5682: Properly turn off regulators if wrong device ID")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20210813073402.1.Iaa9425cfab80f5233afa78b32d02b6dc23256eb3@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
Biju Das [Fri, 13 Aug 2021 09:11:56 +0000 (10:11 +0100)]
ASoC: sh: rz-ssi: Add SSI DMAC support
Add SSI DMAC support to RZ/G2L SoC.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20210813091156.10700-4-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Biju Das [Fri, 13 Aug 2021 09:11:55 +0000 (10:11 +0100)]
ASoC: dt-bindings: renesas,rz-ssi: Update slave dma channel configuration parameter
The DMAC on RZ/G2L has specific slave channel configuration
parameters for SSI.
This patch updates the dmas description and example node to include
the encoded slave channel configuration.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20210813091156.10700-3-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Biju Das [Fri, 13 Aug 2021 09:11:54 +0000 (10:11 +0100)]
ASoC: sh: Add RZ/G2L SSIF-2 driver
Add serial sound interface(SSIF-2) driver support for
RZ/G2L SoC.
Based on the work done by Chris Brandt for RZ/A SSI driver.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20210813091156.10700-2-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 12 Aug 2021 23:19:40 +0000 (18:19 -0500)]
ASoC: SOF: Intel: make DMI L1 selection more robust
Exposing the DMI L1 configuration as a kernel Kconfig option was in
hindsight a really bad idea. It led to several errors reported by
distributions which selected it by mistake.
The Kconfig is now replaced with a kernel parameter. Since DMI L1
entry is incompatible with pause on a capture stream, the latter is
disabled when the kernel parameter is set.
Experimental results show an increased residency in higher C states
and a significant decrease of system power consumption for "work from
home" usages such as VoIP calls.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210812231940.172547-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 12 Aug 2021 23:19:39 +0000 (18:19 -0500)]
ASoC: SOF: Intel: simplify logic for DMI_L1 handling
We don't need to test in multiple places if the kconfig
SND_SOC_SOF_HDA_ALWAYS_ENABLE_DMI_L1 is enabled or not, we might as
well set the existing DMI_L1_COMPATIBLE flag.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210812231940.172547-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 12 Aug 2021 23:19:38 +0000 (18:19 -0500)]
ASoC: SOF: Intel: hda-stream: remove always true condition
We test if (!stream) and return and later on re-test for stream.
The second test is always true.
This was detected by cppcheck but only after additional code changes.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210812231940.172547-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 12 Aug 2021 23:19:37 +0000 (18:19 -0500)]
ASoC: SOF: Intel: Kconfig: clarify DMI L1 option description
This option is only valid for HDaudio platforms. This was described in
the help but not explicit in the option description.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210812231940.172547-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Douglas Anderson [Wed, 11 Aug 2021 15:17:56 +0000 (08:17 -0700)]
ASoC: rt5682: Properly turn off regulators if wrong device ID
When I booted up on a board that had a slightly different codec
stuffed on it, I got this message at bootup:
rt5682 9-001a: Device with ID register 6749 is not rt5682
That's normal/expected, but what wasn't normal was the splat that I
got after:
WARNING: CPU: 7 PID: 176 at drivers/regulator/core.c:2151 _regulator_put+0x150/0x158
pc : _regulator_put+0x150/0x158
...
Call trace:
_regulator_put+0x150/0x158
regulator_bulk_free+0x48/0x70
devm_regulator_bulk_release+0x20/0x2c
release_nodes+0x1cc/0x244
devres_release_all+0x44/0x60
really_probe+0x17c/0x378
...
This is because the error paths don't turn off the regulator. Let's
fix that.
Fixes:
0ddce71c21f0 ("ASoC: rt5682: add rt5682 codec driver")
Fixes:
87b42abae99d ("ASoC: rt5682: Implement remove callback")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20210811081751.v2.1.I4a1d9aa5d99e05aeee15c2768db600158d76cab8@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
Jack Yu [Tue, 10 Aug 2021 02:08:34 +0000 (10:08 +0800)]
ASoC: dt-bindings: rt1015p: fix syntax error in dts-binding document
Fix syntax error in dts-binding document.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Fixes:
064478e4877c ("ASoC: dt-bindings: rt1015p: add new compatible id")
Link: https://lore.kernel.org/r/20210810020834.32414-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jack Yu [Mon, 9 Aug 2021 10:27:14 +0000 (10:27 +0000)]
ASoC: dt-bindings: rt1015p: add new compatible id
Add new compatible ID for rt1015p in dt-bindings document.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/ce9e2f298f0c4fc59f756c39736a297a@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jack Yu [Mon, 9 Aug 2021 10:27:05 +0000 (10:27 +0000)]
ASoC: rt1015p: add new acpi id and comapatible id
Add new acpi id and compatible id for rt1015p.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/22be83429956486f9f64b424c26be810@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Steve Lee [Mon, 9 Aug 2021 14:21:40 +0000 (23:21 +0900)]
ASoC: max98390: Add support change dsm param name
In case of using different type of speaker, support
using different dsm parameter bin file for each amp connected.
Signed-off-by: Steve Lee <steves.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20210809142140.9293-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 9 Aug 2021 12:31:37 +0000 (13:31 +0100)]
ASoC: qdsp6: q6adm: fix cppcheck warnings for unnecessary initialization
cppcheck reports below warning.
q6adm.c:475]: (style) Variable 'matrix_map' is reassigned a value before the
old one has been used.
This is due to unnecessary initialization of variable matrix_map, which is
now removed as part of this patch.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210809123137.14456-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 9 Aug 2021 12:31:36 +0000 (13:31 +0100)]
ASoC: qdsp6: q6asm: fix cppcheck warnings for unnecessary initialization
cppcheck reports below warning.
q6asm.c:1631: (style) Variable 'port' is reassigned a value before the
old one has been used.
This is due to unnecessary initialization of variable port, which is
now removed as part of this patch.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210809123137.14456-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Vincent Knecht [Fri, 6 Aug 2021 11:41:16 +0000 (13:41 +0200)]
ASoC: qcom: apq8016_sbc: Add SEC_MI2S support
This patch adds external codec support on secondary mi2s.
It is used for headphones on some devices, eg. alcatel-idol347.
Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210806114116.895473-1-vincent.knecht@mailoo.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 6 Aug 2021 00:46:24 +0000 (01:46 +0100)]
Merge some cs42l42 patches into asoc-5.15
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:11 +0000 (17:11 +0100)]
ASoC: cs42l42: Update module authors
Add the current authors of this module.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210805161111.10410-8-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:10 +0000 (17:11 +0100)]
ASoC: cs42l42: Assume 24-bit samples are in 32-bit slots
If the machine driver doesn't call snd_soc_dai_set_sysclk() the
SCLK is assumed to be sample_rate * sample_bits * 2 (that is, the
rate necessary for a standard I2S frame).
But 24-bit samples can be sent in either a 24-bit slot or a 32-bit
slot. If the PLL is configured for a 24-bit slot, but a 32-bit slot is
used, cs42l42 will be overclocked.
Ultimately it is the machine driver's responsibilty to call
snd_soc_dai_set_sysclk() if SLK will be different from the standard
I2S rate. However, it is convenient to assume 32-bit slots to allow
this common case without needing special machine driver support. The
machine driver then only has to set SCLK if the slots are 24-bit, but
if it fails to do this cs42l42 won't be overclocked.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210805161111.10410-7-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:09 +0000 (17:11 +0100)]
ASoC: cs42l42: Validate dai_set_sysclk() frequency
If the machine driver calls snd_set_sysclk() with an unsupported
SCLK frequency, return an error instead of letting hw_params() fail.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210805161111.10410-6-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:08 +0000 (17:11 +0100)]
ASoC: cs42l42: Add PLL configuration for 44.1kHz/16-bit
44.1kHz 16-bit standard I2S gives a SCLK of 1.4112 MHz. Add
a PLL configuration for this.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210805161111.10410-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Dmitry Osipenko [Mon, 2 Aug 2021 18:52:58 +0000 (21:52 +0300)]
ASoC: rt5640: Silence warning message about missing interrupt
Interrupt is optional for the RT5640 codec. Nexus 7 doesn't use interrupt,
this results in a noisy warning message that looks like a error condition.
Make interrupt explicitly optional to silence the message, use modern
IRQF_NO_AUTOEN flag and correct the reg[q]uest typo in the message.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210802185258.1881-1-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 16 Jul 2021 10:59:18 +0000 (11:59 +0100)]
ASoC: codecs: wcd938x: add Multi Button Headset Control support
WCD938x has Multi Button Headset Control hardware to support Headset
insertion, type detection, 8 headset buttons detection, Over Current
detection and Impedence measurements.
This patch adds support for this using wcd-mbhc apis.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210716105918.7301-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:07 +0000 (17:11 +0100)]
ASoC: cs42l42: Fix mono playback
I2S always has two LRCLK phases and both CH1 and CH2 of the RX
must be enabled (corresponding to the low and high phases of LRCLK.)
The selection of the valid data channels is done by setting the DAC
CHA_SEL and CHB_SEL. CHA_SEL is always the first (left) channel,
CHB_SEL depends on the number of active channels.
Previously for mono ASP CH2 was not enabled, the result was playing
mono data would not produce any audio output.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes:
621d65f3b868 ("ASoC: cs42l42: Provide finer control on playback path")
Link: https://lore.kernel.org/r/20210805161111.10410-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:06 +0000 (17:11 +0100)]
ASoC: cs42l42: Constrain sample rate to prevent illegal SCLK
The lowest valid SCLK corresponds to 44.1 kHz at 16-bit. Sample
rates less than this would produce SCLK below the minimum when using
a normal I2S frame. A constraint must be applied to prevent this.
The constraint is not applied if the machine driver sets SCLK, to
allow setups where the host generates additional bits per LRCLK
phase to increase the SCLK frequency. In these cases the machine
driver would always have to inform this driver of the actual SCLK,
and it must select a legal SCLK.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210805161111.10410-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:05 +0000 (17:11 +0100)]
ASoC: cs42l42: Fix LRCLK frame start edge
An I2S frame starts on the falling edge of LRCLK so ASP_STP must
be 0.
At the same time, move other format settings in the same register
from cs42l42_pll_config() to cs42l42_set_dai_fmt() where you'd
expect to find them, and merge into a single write.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes:
2c394ca79604 ("ASoC: Add support for CS42L42 codec")
Link: https://lore.kernel.org/r/20210805161111.10410-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Thu, 5 Aug 2021 16:11:04 +0000 (17:11 +0100)]
ASoC: cs42l42: PLL must be running when changing MCLK_SRC_SEL
Both SCLK and PLL clocks must be running to drive the glitch-free mux
behind MCLK_SRC_SEL and complete the switchover.
This patch moves the writing of MCLK_SRC_SEL to when the PLL is started
and stopped, so that it only transitions while the PLL is running.
The unconditional write MCLK_SRC_SEL=0 in cs42l42_mute_stream() is safe
because if the PLL is not running MCLK_SRC_SEL is already 0.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes:
43fc357199f9 ("ASoC: cs42l42: Set clock source for both ways of stream")
Link: https://lore.kernel.org/r/20210805161111.10410-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 5 Aug 2021 19:15:53 +0000 (20:15 +0100)]
Merge series "ASoC: codecs: cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Two minor corrections for return values, and one more important one
for max98090 where duplicate reads don't seem necessary.
Pierre-Louis Bossart (3):
ASoC: max98090: remove duplicate status reads and useless assignmment
ASoC: mt6359-accdet.c: remove useless assignments
ASoC: wcd938x: simplify return value
sound/soc/codecs/max98090.c | 4 +---
sound/soc/codecs/mt6359-accdet.c | 8 ++++----
sound/soc/codecs/wcd938x.c | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
--
2.25.1
Mark Brown [Thu, 5 Aug 2021 19:15:52 +0000 (20:15 +0100)]
Merge series "ASoC: soc-dapm: cleanup cppcheck warning" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
Now I'm posting audio-graph-card2 patch-set, but it seems it needs longer
discussion. Thus I want to post more easy patch first, and reduce my
local patches.
These are cppcheck warning cleanup patches for soc-dapm.
Kuninori Morimoto (12):
ASoC: soc-dapm: cleanup cppcheck warning at dapm_wcache_lookup()
ASoC: soc-dapm: cleanup cppcheck warning at dapm_connect_mux()
ASoC: soc-dapm: cleanup cppcheck warning at dapm_set_mixer_path_status()
ASoC: soc-dapm: cleanup cppcheck warning at dapm_new_pga()
ASoC: soc-dapm: cleanup cppcheck warning at dapm_new_dai_link()
ASoC: soc-dapm: cleanup cppcheck warning at dapm_seq_check_event()
ASoC: soc-dapm: cleanup cppcheck warning at dapm_seq_run()
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_del_route()
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_add_routes()
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_weak_routes()
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_new_controls()
ASoC: soc-dapm: cleanup cppcheck warning at soc_dapm_dai_stream_event()
sound/soc/soc-dapm.c | 65 ++++++++++++++++++++++----------------------
1 file changed, 33 insertions(+), 32 deletions(-)
--
2.25.1
Samuel Holland [Thu, 5 Aug 2021 05:07:06 +0000 (00:07 -0500)]
ASoC: simple-card-utils: Avoid over-allocating DLCs
The allocation of the DAI link components (DLCs) passed the wrong
pointer to sizeof. Since simple_dai_props is much larger than
snd_soc_dai_link_component, there was no out of bounds access, only
wasted memory.
Fixes:
f2138aed231c8 ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
Fixes:
050c7950fd706 ("ASoC: simple-card-utils: alloc dai_link information for CPU/Codec/Platform")
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20210805050706.46833-1-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Wed, 4 Aug 2021 19:24:56 +0000 (14:24 -0500)]
ASoC: wcd938x: simplify return value
cppcheck warning:
sound/soc/codecs/wcd938x.c:3701:9: warning: Identical condition and
return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/codecs/wcd938x.c:3691:6: note: If condition 'ret' is true,
the function will return/exit
if (ret)
^
sound/soc/codecs/wcd938x.c:3701:9: note: Returning identical expression 'ret'
return ret;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210804192456.278702-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Wed, 4 Aug 2021 19:24:55 +0000 (14:24 -0500)]
ASoC: mt6359-accdet.c: remove useless assignments
cppcheck warnings (and additional issue found by code inspection)
sound/soc/codecs/mt6359-accdet.c:464:10: style: Variable 'ret' is
assigned a value that is never used. [unreadVariable]
int ret = 0;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210804192456.278702-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Wed, 4 Aug 2021 19:24:54 +0000 (14:24 -0500)]
ASoC: max98090: remove duplicate status reads and useless assignmment
The logic for the jack detection has not changed since the first
commit for this driver. Remove a duplicate read and remove useless
assignment
sound/soc/codecs/max98090.c:2170:6: style: Variable 'reg' is
reassigned a value before the old one has been
used. [redundantAssignment]
reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
^
sound/soc/codecs/max98090.c:2161:7: note: reg is assigned
reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
^
sound/soc/codecs/max98090.c:2170:6: note: reg is overwritten
reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
^
sound/soc/codecs/max98090.c:2170:6: style: Variable 'reg' is
reassigned a value before the old one has been
used. [redundantAssignment]
reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
^
sound/soc/codecs/max98090.c:2167:7: note: reg is assigned
reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
^
sound/soc/codecs/max98090.c:2170:6: note: reg is overwritten
reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210804192456.278702-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:44 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at soc_dapm_dai_stream_event()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:4368:15: style: The scope of the variable 'ep' can be reduced. [variableScope]
unsigned int ep;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im0ku23z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:41 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_new_controls()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:3786:30: style: The scope of the variable 'w' can be reduced. [variableScope]
struct snd_soc_dapm_widget *w;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0l0u242.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:37 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_weak_routes()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:3190:9: style: The scope of the variable 'err' can be reduced. [variableScope]
int i, err;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lf5gu246.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:33 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_add_routes()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:3082:9: style: The scope of the variable 'r' can be reduced. [variableScope]
int i, r, ret = 0;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtpwu24b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:28 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_del_route()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:3007:30: style: The scope of the variable 'wsource' can be reduced. [variableScope]
struct snd_soc_dapm_widget *wsource, *wsink;
^
sound/soc/soc-dapm.c:3007:40: style: The scope of the variable 'wsink' can be reduced. [variableScope]
struct snd_soc_dapm_widget *wsource, *wsink;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8acu24f.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:24 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at dapm_seq_run()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:1648:6: style: The scope of the variable 'ret' can be reduced. [variableScope]
int ret, i;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmusu24j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:20 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at dapm_seq_check_event()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:1531:13: style: The scope of the variable 'ret' can be reduced. [variableScope]
int power, ret;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1f8u24n.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:15 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at dapm_new_dai_link()
This patch cleanups below cppcheck warning, and its related code.
sound/soc/soc-dapm.c:1077:9: style: The scope of the variable 'ret' can be reduced. [variableScope]
int i, ret;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sfzou24s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:10 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at dapm_new_pga()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:1063:9: style: The scope of the variable 'ret' can be reduced. [variableScope]
int i, ret;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tuk4u24x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:05 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at dapm_set_mixer_path_status()
This patch cleanups below cppcheck warning, and its related code.
unsigned int val;
^
sound/soc/soc-dapm.c:789:15: style: The scope of the variable 'val' can be reduced. [variableScope]
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v94ku252.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:11:00 +0000 (10:11 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at dapm_connect_mux()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:751:15: style: The scope of the variable 'val' can be reduced. [variableScope]
unsigned int val, item;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wnp0u257.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Aug 2021 01:10:55 +0000 (10:10 +0900)]
ASoC: soc-dapm: cleanup cppcheck warning at dapm_wcache_lookup()
This patch cleanups below cppcheck warning.
sound/soc/soc-dapm.c:653:20: style: The scope of the variable 'wlist' can be reduced. [variableScope]
struct list_head *wlist;
^
sound/soc/soc-dapm.c:655:6: style: The scope of the variable 'i' can be reduced. [variableScope]
int i = 0;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y29gu25d.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Wed, 4 Aug 2021 07:52:23 +0000 (09:52 +0200)]
ASoC: amd: vangogh: Drop superfluous mmap callback
The mmap callback of vangogh driver just calls the default mmap
handler, and it's superfluous, as the PCM core would call it if not
set. Let's drop the superfluous mmap callback.
Fixes:
361414dc1f07 ("ASoC: amd: add vangogh i2s dma driver pm ops")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210804075223.9823-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Nobuhiro Iwamatsu [Mon, 31 May 2021 05:12:03 +0000 (14:12 +0900)]
ASoC: mediatek: mt6359: convert to use module_platform_driver
Simplify the code by using module_platform_driver macro for
mt6359-accdet.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20210531051203.228567-1-nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 3 Aug 2021 22:27:25 +0000 (23:27 +0100)]
Merge series "ASoC: soc-ops: cleanup cppcheck warning" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
Now I'm posting audio-graph-card2 patch-set, but it seems it needs longer
discussion. Thus I want to post more easy patch first, and reduce my
local patches.
These are cppcheck warning cleanup patches for soc-ops.
Kuninori Morimoto (4):
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_put_volsw_sx()
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_limit_volume()
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_get_xr_sx()
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_put_xr_sx()
sound/soc/soc-ops.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
--
2.25.1
Mark Brown [Tue, 3 Aug 2021 22:27:24 +0000 (23:27 +0100)]
Merge series "ASoC: SOF/Intel: machine driver updates" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Two quirks added for Dell XPS 9710 and Intel reference boards, and two
minor cleanups.
Pierre-Louis Bossart (3):
ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710
ASoC: Intel: update sof_pcm512x quirks
ASoC: Intel: sof_sdw_max98373: remove useless inits
jairaj arava (1):
ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682
variant
sound/soc/intel/boards/sof_pcm512x.c | 13 +++++++++++--
sound/soc/intel/boards/sof_rt5682.c | 14 ++++++++++++++
sound/soc/intel/boards/sof_sdw.c | 12 ++++++++++++
sound/soc/intel/boards/sof_sdw_max98373.c | 4 ++--
sound/soc/sof/sof-pci-dev.c | 9 +++++++++
5 files changed, 48 insertions(+), 4 deletions(-)
--
2.25.1
Colin Ian King [Sun, 1 Aug 2021 06:40:23 +0000 (07:40 +0100)]
ASoC: rt5514: make array div static const, makes object smaller
Don't populate the array div on the stack but instead it
static const. Makes the object code smaller by 48 bytes.
Before:
text data bss dec hex filename
53894 16368 128 70390 112f6 ./sound/soc/codecs/rt5514.o
After:
text data bss dec hex filename
53750 16464 128 70342 112c6 ./sound/soc/codecs/rt5514.o
(gcc version 10.2.0)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210801064023.138359-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Codrin Ciubotariu [Tue, 3 Aug 2021 10:48:25 +0000 (13:48 +0300)]
ASoC: codecs: ad193x: add support for 96kHz and 192kHz playback rates
ad193x devices support 96KHz and 192KHz sampling rates, when PLL/MCLK is
referenced to 48kHz.
Tested on ad1934.
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20210803104825.2198335-1-codrin.ciubotariu@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 3 Aug 2021 05:01:00 +0000 (14:01 +0900)]
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_put_xr_sx()
This patch cleanups below cppcheck warning.
sound/soc/soc-ops.c:859:18: style: The scope of the variable 'regval' can be reduced. [variableScope]
unsigned int i, regval, regmask;
^
sound/soc/soc-ops.c:859:26: style: The scope of the variable 'regmask' can be reduced. [variableScope]
unsigned int i, regval, regmask;
^
sound/soc/soc-ops.c:860:6: style: The scope of the variable 'err' can be reduced. [variableScope]
int err;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgtzunoz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 3 Aug 2021 05:00:55 +0000 (14:00 +0900)]
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_get_xr_sx()
This patch cleanups below cppcheck warning.
sound/soc/soc-ops.c:814:15: style: The scope of the variable 'regval' can be reduced. [variableScope]
unsigned int regval;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871r7bw29k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 3 Aug 2021 05:00:49 +0000 (14:00 +0900)]
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_limit_volume()
This patch cleanups below cppcheck warning.
sound/soc/soc-ops.c:576:28: style: The scope of the variable 'mc' can be reduced. [variableScope]
struct soc_mixer_control *mc;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735rrw29q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 3 Aug 2021 05:00:37 +0000 (14:00 +0900)]
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_put_volsw_sx()
This patch cleanups below cppcheck warning.
sound/soc/soc-ops.c:410:30: style: The scope of the variable 'val2' can be reduced. [variableScope]
unsigned int val, val_mask, val2 = 0;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kc7w2a2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 2 Aug 2021 15:21:51 +0000 (10:21 -0500)]
ASoC: Intel: sof_sdw_max98373: remove useless inits
No need to initialize a variable if the next line overwrites the value.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20210802152151.15832-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 2 Aug 2021 15:21:50 +0000 (10:21 -0500)]
ASoC: Intel: update sof_pcm512x quirks
The default SOF topology enables SSP capture and DMICs, even though
both of these hardware capabilities are not always available in
hardware (specific versions of HiFiberry and DMIC kit needed).
For the SSP capture, this leads to annoying "SP5-Codec: ASoC: no
backend capture" and "streamSSP5-Codec: ASoC: no users capture at
close - state 0" errors.
Update the quirks to match what the topology needs, which also allows
for the ability to remove SSP capture and DMIC support.
BugLink: https://github.com/thesofproject/linux/issues/3061
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210802152151.15832-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
jairaj arava [Mon, 2 Aug 2021 15:21:49 +0000 (10:21 -0500)]
ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant
DMI product name is used to support system variants based on
adl_mx98373_rt5682 in current implementation. Replace this DMI search with
DMI_OEM_STRING and coreboot(BIOS used in these systems) is
setting the needed DMI_OEM_STRING field to uniquely identify these
systems.
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: jairaj arava <jairaj.arava@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210802152151.15832-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 2 Aug 2021 15:21:48 +0000 (10:21 -0500)]
ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710
This device has the same audio subsystem as the 0A5E skew (RT711
headset codec, 2 RT1308 amps and RT715 for mic capture)
BugLink: https://github.com/thesofproject/linux/issues/3057
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: FRED OH <fred.oh@intel.com>
Link: https://lore.kernel.org/r/20210802152151.15832-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Tue, 3 Aug 2021 16:08:34 +0000 (17:08 +0100)]
ASoC: cs42l42: Remove duplicate control for WNF filter frequency
The driver was defining two ALSA controls that both change the same
register field for the wind noise filter corner frequency. The filter
response has two corners, at different frequencies, and the duplicate
controls most likely were an attempt to be able to set the value using
either of the frequencies.
However, having two controls changing the same field can be problematic
and it is unnecessary. Both frequencies are related to each other so
setting one implies exactly what the other would be.
Removing a control affects user-side code, but there is currently no
known use of the removed control so it would be best to remove it now
before it becomes a problem.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes:
2c394ca79604 ("ASoC: Add support for CS42L42 codec")
Link: https://lore.kernel.org/r/20210803160834.9005-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Tue, 3 Aug 2021 16:08:33 +0000 (17:08 +0100)]
ASoC: cs42l42: Fix inversion of ADC Notch Switch control
The underlying register field has inverted sense (0 = enabled) so
the control definition must be marked as inverted.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes:
2c394ca79604 ("ASoC: Add support for CS42L42 codec")
Link: https://lore.kernel.org/r/20210803160834.9005-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Guennadi Liakhovetski [Mon, 2 Aug 2021 15:17:49 +0000 (10:17 -0500)]
ASoC: SOF: Intel: hda-ipc: fix reply size checking
Checking that two values don't have common bits makes no sense,
strict equality is meant.
Fixes:
f3b433e4699f ("ASoC: SOF: Implement Probe IPC API")
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210802151749.15417-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 2 Aug 2021 15:16:28 +0000 (10:16 -0500)]
ASoC: SOF: Intel: Kconfig: fix SoundWire dependencies
The previous Kconfig cleanup added simplifications but also introduced
a new one by moving a boolean to a tristate. This leads to randconfig
problems.
This patch moves the select operations in the SOUNDWIRE_LINK_BASELINE
option. The INTEL_SOUNDWIRE config remains a tristate for backwards
compatibility with older configurations but is essentially an on/off
switch.
Fixes:
cf5807f5f814f ('ASoC: SOF: Intel: SoundWire: simplify Kconfig')
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210802151628.15291-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 2 Aug 2021 20:27:55 +0000 (21:27 +0100)]
Merge series "soundwire/ASoC: abstract platform-dependent bases" from Bard Liao <yung-chuan.liao@linux.intel.com>:
shim base and alh base are platform-dependent. This series suggests
to use variables for those bases. It allows us to use different bases
for new platforms.
v2:
- Update the commit message of "soundwire: move intel sdw register
definitions to sdw_intel.h"
Bard Liao (6):
soundwire: move intel sdw register definitions to sdw_intel.h
ASoC: SOF: intel: add sdw_shim/alh_base to sof_intel_dsp_desc
ASoC: SOF: intel: hda: remove HDA_DSP_REG_SNDW_WAKE_STS definition
ASoC: SOF: intel: move sof_intel_dsp_desc() forward
ASoC: SOF: intel: add snd_sof_dsp_check_sdw_irq ops
soundwire: intel: introduce shim and alh base
drivers/soundwire/intel.c | 74 ------------------------
drivers/soundwire/intel_init.c | 14 ++---
include/linux/soundwire/sdw_intel.h | 87 +++++++++++++++++++++++++++++
sound/soc/sof/intel/cnl.c | 6 ++
sound/soc/sof/intel/hda.c | 39 ++++++++-----
sound/soc/sof/intel/hda.h | 8 ++-
sound/soc/sof/intel/icl.c | 3 +
sound/soc/sof/intel/shim.h | 3 +
sound/soc/sof/intel/tgl.c | 12 ++++
9 files changed, 149 insertions(+), 97 deletions(-)
--
2.17.1
Mark Brown [Mon, 2 Aug 2021 20:27:54 +0000 (21:27 +0100)]
Merge series "ASoC: Intel: bytcr_rt5640: Fix HP ElitePad 1000 G2 audio routing" from Hans de Goede <hdegoede@redhat.com>:
Changes in v2:
- Only set lineout_string if BYT_RT5640_LINEOUT is set, since
BYT_RT5640_LINEOUT_AS_HP2 only works if the lineout is enabled in
the first place
Original cover-letter:
The HP Elitepad 1000 G2 has 2 headset jacks:
1. on the dock which uses the output of the codecs built-in HP-amp +
the standard IN2 input which is always used with the headset-jack.
2. on the tablet itself, this uses the line-out of the codec, combined
with an external HP-amp + IN1 for the headset-mic.
This series adds support for this, resolving:
https://bugzilla.kernel.org/show_bug.cgi?id=213415
Note this series does not add jack-detect support. I plan to add that
with a follow-up series when I can make some time to implement that.
Regards,
Hans
Hans de Goede (6):
ASoC: Intel: bytcr_rt5640: Move "Platform Clock" routes to the maps
for the matching in-/output
ASoC: Intel: bytcr_rt5640: Add line-out support
ASoC: Intel: bytcr_rt5640: Add a byt_rt5640_get_codec_dai() helper
ASoC: Intel: bytcr_rt5640: Add support for a second headphones output
ASoC: Intel: bytcr_rt5640: Add support for a second headset mic input
ASoC: Intel: bytcr_rt5640: Fix HP ElitePad 1000 G2 quirk
sound/soc/intel/boards/bytcr_rt5640.c | 118 ++++++++++++++++++++++----
1 file changed, 102 insertions(+), 16 deletions(-)
--
2.31.1
Colin Ian King [Sun, 1 Aug 2021 06:48:07 +0000 (07:48 +0100)]
ASoC: tlv320aic32x4: make array clocks static, makes object smaller
Don't populate the array clocks on the stack but instead it
static. Makes the object code smaller by 316 bytes.
Before:
text data bss dec hex filename
63668 28264 0 91932 1671c ./sound/soc/codecs/tlv320aic32x4.o
After:
text data bss dec hex filename
62616 29000 0 91616 165e0 ./sound/soc/codecs/tlv320aic32x4.o
(gcc version 10.2.0)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210801064807.138641-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Mon, 2 Aug 2021 14:25:01 +0000 (16:25 +0200)]
ASoC: Intel: bytcr_rt5640: Fix HP ElitePad 1000 G2 quirk
The HP Elitepad 1000 G2 has 2 headset jacks:
1. on the dock which uses the output of the codecs built-in HP-amp +
the standard IN2 input which is always used with the headset-jack.
2. on the tablet itself, this uses the line-out of the codec, combined
with an external HP-amp + IN1 for the headset-mic.
Fix the HP ElitePad 1000 G2 to properly reflect this now that the
machine-driver supports this setup.
Note this also changes the mapping for the internal mic. from
IN1 (which was pointing to the 2nd headset-jack mic) to DMIC2
which is the actual input for the internal mics.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213415
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/20210802142501.991985-7-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Mon, 2 Aug 2021 14:25:00 +0000 (16:25 +0200)]
ASoC: Intel: bytcr_rt5640: Add support for a second headset mic input
Some devices (HP Elitepad 1000 G2) have 2 headset jacks (1 on the dock,
2nd on the tablet itself). The 2nd headset mic input on these is
connected to in1 (the internal mics on the HP Elitepad 1000 G2 use DMIC2).
Add support for this through a new BYT_RT5640_HSMIC2_ON_IN1 quirk.
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/20210802142501.991985-6-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Mon, 2 Aug 2021 14:24:59 +0000 (16:24 +0200)]
ASoC: Intel: bytcr_rt5640: Add support for a second headphones output
Some devices (HP Elitepad 1000 G2) have a second headphones output
(1 on the dock, 2nd on the tablet itself) which is implemented through
the line-out output of the codec combined with an external hp-amp
which gets enabled through the codec's GPIO1 pin.
Add support for this through a new BYT_RT5640_LINEOUT_AS_HP2 quirk,
note users are expected to use this combined with the
BYT_RT5640_LINEOUT quirk. If that quirk is not set the new quirk is
ignored.
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/20210802142501.991985-5-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Mon, 2 Aug 2021 14:24:58 +0000 (16:24 +0200)]
ASoC: Intel: bytcr_rt5640: Add a byt_rt5640_get_codec_dai() helper
Add a byt_rt5640_get_codec_dai() helper, which gets the codec_dai
from a dapm_context.
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/20210802142501.991985-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>