Commit Graph

1138491 Commits

Author SHA1 Message Date
Mark Brown 9472382db3
Add SOF panic dump support for AMD platform.
Merge series from V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>:

Fix an issue with starting the ACP DSP and support debug dumps to aid
maintainability.
2022-12-05 17:28:07 +00:00
Krzysztof Kozlowski 1cd7de447c
ASoC: dt-bindings: Correct Alexandre Belloni email
Correct domain name in Alexandre Belloni's email address.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221203162144.99225-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:46 +00:00
Krzysztof Kozlowski 715f45854f
ASoC: dt-bindings: maxim,max98504: Convert to DT schema
Convert the Maxim Integrated MAX98504 amplifier bindings to DT schema.
Few properties are made optional:
1. interrupts: current Linux driver implementation does not use them,
2. supplies: on some boards these might be wired to battery, for which
   no regulator is provided.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221204113621.151303-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:45 +00:00
Krzysztof Kozlowski 8a5a05583a
ASoC: dt-bindings: maxim,max98357a: Convert to DT schema
Convert the Maxim Integrated MAX98357A/MAX98360A amplifier bindings to
DT schema.  Add missing properties ('#sound-dai-cells' and
'sound-name-prefix' from common DAI properties).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221203160442.69594-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:44 +00:00
Krzysztof Kozlowski 58ae9a2aca
ASoC: dt-bindings: Reference common DAI properties
Reference in all sound components which have '#sound-dai-cells' the
dai-common.yaml schema, which allows to use 'sound-name-prefix'
property.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Acked-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Link: https://lore.kernel.org/r/20221203160442.69594-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:43 +00:00
Krzysztof Kozlowski 3fda85324b
ASoC: dt-bindings: Extend name-prefix.yaml into common DAI properties
Rename name-prefix.yaml into common DAI schema and document
'#sound-dai-cells' for completeness.  The '#sound-dai-cells' cannot be
really constrained, as there are users with value of 0, 1 and 2, but at
least it brings definition to one common place.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221203160442.69594-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:42 +00:00
Colin Ian King b5d5051971
ASoC: rt715: Make read-only arrays capture_reg_H and capture_reg_L static const
Don't populate the read-only arrays capture_reg_H and capture_reg_L
on the stack but instead make them static const. Also makes the
object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221202171450.1815346-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:41 +00:00
Colin Ian King cb870fdcf1
ASoC: uniphier: aio-core: Make some read-only arrays static const
Don't populate the read-only arrays slotsel_2ch, slotsel_multi, v_pll
and v_div on the stack but instead make them static const. Also makes
the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221202164156.1812971-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:40 +00:00
Colin Ian King e110ede8c3
ASoC: wcd938x: Make read-only array minCode_param static const
Don't populate the read-only array minCode_param on the stack but
instead make it static const. Also makes the object code a little
smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221202170644.1814720-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:39 +00:00
Srinivasa Rao Mandadapu ab148b461c
ASoC: qcom: lpass-sc7280: Add maybe_unused tag for system PM ops
Add __maybe_unused tag for system PM ops suspend and resume.
This is required to fix allmodconfig compilation issue.

Fixes: a3a96e93cc ("ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops")

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/1670219333-32526-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:38 +00:00
V sujith kumar Reddy 41cfad23b5
ASoC : SOF: amd: Add support for IPC and DSP dumps
Add support for IPC and DSP dumps for AMD platforms.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20221205120649.1950576-3-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:37 +00:00
Ajye Huang 2a2f5f2384
ASoC: SOF: amd: Use poll function instead to read ACP_SHA_DSP_FW_QUALIFIER
The Skyrim project and Whiterun met error when DSP
loading during device boot.
Ex, error in kernel log,
ERR kernel: [   16.124537] snd_sof_amd_rembrandt
0000:04:00.5: PSP validation failed.

Use the snd_sof_dsp_read_poll_timeout function to successfully
read the FW_QUALIFIER register

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20221205120649.1950576-2-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05 14:05:36 +00:00
Mark Brown f19a2caaab
ASoC/tda998x: Fix reporting of nonexistent capture streams
Merge series from Mark Brown <broonie@kernel.org>:

The recently added pcm-test selftest has pointed out that systems with
the tda998x driver end up advertising that they support capture when in
reality as far as I can see the tda998x devices are transmit only.  The
DAIs registered through hdmi-codec are bidirectional, meaning that for
I2S systems when combined with a typical bidrectional CPU DAI the
overall capability of the PCM is bidirectional.  In most cases the I2S
links will clock OK but no useful audio will be returned which isn't so
bad but we should still not advertise the useless capability, and some
systems may notice problems for example due to pinmux management.

This is happening due to the hdmi-codec helpers not providing any
mechanism for indicating unidirectional audio so add one and use it in
the tda998x driver.  It is likely other hdmi-codec users are also
affected but I don't have those systems to hand.

Mark Brown (2):
  ASoC: hdmi-codec: Allow playback and capture to be disabled
  drm: tda99x: Don't advertise non-existent capture support

 drivers/gpu/drm/i2c/tda998x_drv.c |  2 ++
 include/sound/hdmi-codec.h        |  4 ++++
 sound/soc/codecs/hdmi-codec.c     | 30 +++++++++++++++++++++++++-----
 3 files changed, 31 insertions(+), 5 deletions(-)

base-commit: f0c4d9fc9c
--
2.30.2
2022-12-04 17:01:50 +00:00
Mark Brown a04f1c8131
drm: tda99x: Don't advertise non-existent capture support
As far as I can tell none of the tda998x devices support audio capture so
don't advertise support for it, ensuring that we don't confuse userspace.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20221130184644.464820-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-02 14:07:19 +00:00
Mark Brown f77a066f4e
ASoC: hdmi-codec: Allow playback and capture to be disabled
Currently the hdmi-codec driver always registers both playback and capture
capabilities but for most systems there's no actual capture capability,
usually HDMI is transmit only. Provide platform data which allows the users
to indicate what is supported so that we don't end up advertising things
to userspace that we can't actually support.

In order to avoid breaking existing users the flags in platform data are
a bit awkward and specify what should be disabled rather than doing the
perhaps more expected thing and defaulting to not supporting capture.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20221130184644.464820-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-02 14:07:12 +00:00
David Rau 969357ec94
ASoC: da7219: Fix pole orientation detection on OMTP headsets when playing music
The OMTP pin define headsets can be mis-detected as line out
instead of OMTP, causing obvious issues with audio quality.
This patch is to put increased resistances within
the device at a suitable point.

To solve this issue better, the new mechanism setup
ground switches with conditional delay control
and these allow for more stabile detection process
to operate as intended. This conditional delay control
will not impact the hardware process
but use extra system resource.

This commit improves control of ground switches in the AAD logic.

Signed-off-by: David Rau <david.rau.zg@renesas.com>
Link: https://lore.kernel.org/r/20221121050744.2278-1-david.rau.zg@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-01 11:22:13 +00:00
Artem Lukyanov c1dd6bf619
ASoC: amd: yc: Add Xiaomi Redmi Book Pro 14 2022 into DMI table
This model requires an additional detection quirk to enable the
internal microphone - BIOS doesn't seem to support AcpDmicConnected
(nothing in acpidump output).

Signed-off-by: Artem Lukyanov <dukzcry@ya.ru>
Link: https://lore.kernel.org/r/20221130085247.85126-1-dukzcry@ya.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-30 11:36:18 +00:00
Ricardo Ribalda e063330a77
ASoC: SOF: mediatek: add shutdown callback
If we do not shutdown the peripheral properly at shutdown, the whole system
crashes after kexec() on the first io access.

Let's implement the appropriate callback.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221127-mtk-snd-v1-0-b7886faa612b@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-30 11:35:43 +00:00
Mark Brown 93d519a12a
ASoC: Intel: avs: rt5682: Refactor jack handling
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Leftover from recent series [1].
Following changes are proposed for the rt5682 sound card driver:

1) Move jack unassignment from platform_device->remove() to
   dai_link->exit(). This is done to make jack init and deinit flows
   symmetric
2) Remove platform_device->remove() function
3) Simplify card->suspend_pre() and card->resume_post() by making use of
   snd_soc_card_get_codec_dai() helper
2022-11-29 19:29:05 +00:00
Amadeusz Sławiński a9d8723c72
ASoC: Intel: avs: rt5682: Refactor jack handling
Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221129180738.2866290-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 18:10:03 +00:00
Amadeusz Sławiński 19bb7c3053
ASoC: Intel: avs: rt5682: Add define for codec DAI name
Following commits will make use of it to find codec DAI, define it
first.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221129180738.2866290-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 18:10:02 +00:00
Zhang Qilong 97b801be6f
ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by going to
err_pm instead of err_clk.

Fixes:f086ba9d5389c ("ASoC: pcm512x: Support mastering BCLK/LRCLK using the PLL")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160402.126140-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 17:31:43 +00:00
Mark Brown f4f473f839
ASoC: Intel: avs: Refactor jack handling
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

For all the boards included in this patchset, a similar set of changes
is proposed:

1) Move jack unassignment from platform_device->remove() to
   dai_link->exit(). This is done to make jack init and deinit flows
   symmetric
2) Remove platform_device->remove() function
3) Simplify card->suspend_pre() and card->resume_post() by making use of
   snd_soc_card_get_codec_dai() helper

While bdw_rt286 board - which is utilized by the catpt-driver - is
definitely not part of "avs", same treatment applies. And thus decided
to make it part of this series instead of sending it separately.
2022-11-29 16:56:44 +00:00
Srinivasa Rao Mandadapu e8679db297
ASoC: qcom: lpass-sc7180: Add maybe_unused tag for system PM ops
Add __maybe_unused tag for system PM ops suspend and resume.
This is required to fix allmodconfig compilation issue.

Fixes: a3a96e93cc ("ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops")
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/1669726428-3140-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 14:44:22 +00:00
V sujith kumar Reddy 75af419919
ASoC: SOF: Add DAI configuration support for AMD platforms.
Add support for configuring sp and hs DAI from topology.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20221129100102.826781-1-vsujithkumar.reddy@amd.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:56:09 +00:00
Mark Brown aeb2e9c4ee
ASoC: Merge up fixes
Merge the fixes branch up so we can apply further AMD work.
2022-11-29 12:55:51 +00:00
Amadeusz Sławiński 28baae9bfc
ASoC: Intel: avs: rt298: Refactor jack handling
Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-10-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:21 +00:00
Amadeusz Sławiński 1fa675a00a
ASoC: Intel: avs: rt298: Add define for codec DAI name
Following commits will make use of it to find codec DAI, define it
first.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:20 +00:00
Amadeusz Sławiński 2f292443b4
ASoC: Intel: avs: rt286: Refactor jack handling
Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:19 +00:00
Amadeusz Sławiński af8ced412d
ASoC: Intel: avs: rt286: Add define for codec DAI name
Following commits will make use of it to find codec DAI, define it
first.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:18 +00:00
Amadeusz Sławiński a08797afc1
ASoC: Intel: avs: rt274: Refactor jack handling
Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:17 +00:00
Amadeusz Sławiński 58391e7ca0
ASoC: Intel: avs: rt274: Refer to DAI name through a constant
There is existing define for codec DAI name, make use of it when setting
codec DAI name.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:16 +00:00
Amadeusz Sławiński 9febcd7a01
ASoC: Intel: avs: nau8825: Refactor jack handling
Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:15 +00:00
Amadeusz Sławiński 833e250ef5
ASoC: Intel: avs: da7219: Refactor jack handling
Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:14 +00:00
Cezary Rojewski d60a197e50
ASoC: Intel: bdw_rt286: Refactor jack handling
Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221125184032.2565979-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 12:13:13 +00:00
Matthias Kaehlcke 863b9179ce
ASoC: qcom: lpass-sc7180: Delete redundant error log from _resume()
sc7180_lpass_dev_resume() logs an error if clk_bulk_prepare_enable()
fails. The clock framework already generates error logs if anything
goes wrong, so the logging in _resume() is redundant, drop it.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20221129001633.v2.1.I8d1993f41f0da1eac0ecba321678ac489f9c0b9b@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 11:32:07 +00:00
Srinivasa Rao Mandadapu a3a96e93cc
ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops
Update lpass sc7280 platform driver with PM ops, such as
system supend and resume callbacks.
This update is required to disable clocks during supend and
avoid XO shutdown issue.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Tested-by: Rahul Ajmeriya <quic_rajmeriy@quicinc.com>
Link: https://lore.kernel.org/r/1669703784-27589-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29 11:32:06 +00:00
Ricardo Ribalda 4cbb264d4e
ASoC: mediatek: mt8173: Enable IRQ when pdata is ready
If the device does not come straight from reset, we might receive an IRQ
before we are ready to handle it.

Fixes:

[    2.334737] Unable to handle kernel read from unreadable memory at virtual address 00000000000001e4
[    2.522601] Call trace:
[    2.525040]  regmap_read+0x1c/0x80
[    2.528434]  mt8173_afe_irq_handler+0x40/0xf0
...
[    2.598921]  start_kernel+0x338/0x42c

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Fixes: ee0bcaff10 ("ASoC: mediatek: Add AFE platform driver")
Link: https://lore.kernel.org/r/20221128-mt8173-afe-v1-0-70728221628f@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 16:40:17 +00:00
Mark Brown cecf8179ad
ASoC: dt-bindings: Rework Qualcomm APR/GPR Sound nodes for SM8450
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Adding sound support for Qualcomm SM8450 SoC (and later for SC8280XP) brought
some changes to APR/GPR services bindings.  These bindings are part of
qcom,apr.yaml:

  apr-or-gpr-device-node <- qcom,apr.yaml
    apr-gpr-service@[0-9] <- qcom,apr.yaml
      service-specific-components <- /schemas/sound/qcom,q6*.yaml

The schema for services (apr-gpr-service@[0-9]) was not complete and is still
quite not specific.  It allows several incorrect combinations, like adding a
clock-controller to a APM device.  Restricting it would complicate the schema
even more.  Bringing new support for sound on Qualcomm SM8450 and SC8280XP SoC
would grow it as well.

Refactor the bindings before extending them for Qualcomm SM8450 SoC.
2022-11-28 16:38:18 +00:00
Srinivasa Rao Mandadapu 2d68148f8f
ASoC: qcom: lpass-sc7180: Add system suspend/resume PM ops
Update lpass sc7180 platform driver with PM ops, such as
system supend and resume callbacks.
This update is required to disable clocks during supend and
avoid XO shutdown issue.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Tested-by: Rahul Ajmeriya <quic_rajmeriy@quicinc.com>
Link: https://lore.kernel.org/r/1669621742-28524-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:37 +00:00
Oder Chiou 5fabcc90e7
ASoC: rt5640: Fix Jack work after system suspend
We found an corner case in RT5640 codec driver which schedules jack work
after system suspend as IRQ was enabled. Due to this, hitting the error
as register access happening after suspend as jack worker thread getting
scheduled in irq handler. The patch disables the irq during the suspend
to prevent the corner case happening.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Reported-by: Mohan Kumar D <mkumard@nvidia.com>
Link: https://lore.kernel.org/r/20221128070825.91215-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:36 +00:00
Jean Delvare 11e87890da
ASoC: SOF: Drop obsolete dependency on COMPILE_TEST
Since commit 0166dc11be ("of: make CONFIG_OF user selectable"), it
is possible to test-build any driver which depends on OF on any
architecture by explicitly selecting OF. Therefore depending on
COMPILE_TEST as an alternative is no longer needed.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: https://lore.kernel.org/r/20221127193549.211bf8f7@endymion.delvare
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:35 +00:00
Pavel Dobias 082d3c998c
ASoC: max9867: Implement exact integer mode
For 8kHz and 16kHz sample rates and certain PCLK values
the codec can be programmed to operate in exact integer
mode. If available, use it to achieve the exact sample rate.

Signed-off-by: Pavel Dobias <dobias@2n.com>
Link: https://lore.kernel.org/r/20221123153818.24650-1-dobias@2n.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:34 +00:00
Kuninori Morimoto 7aa6d95d7f
ASoC: rsnd: adg: use __clk_get_name() instead of local clk_name[]
Current rsnd_adg_clk_dbg_info() is using locak clk_name[] to ndicating
clk name, but we don't want to use local clk_name[] everywhere when we
support R-Car Gen4 sound to handling non compatible clk naming.

This patch uses __clk_get_name() instead of local clk_name[] for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v8mz8wcs.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:33 +00:00
Charles Keepax c5f81301d0
ASoC: sdw-mockup: Switch to new snd_sdw_params_to_config helper
The conversion from hw_params to SoundWire config is pretty
standard as such most of the conversion can be handled by the new
snd_sdw_params_to_config helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221123165432.594972-9-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:32 +00:00
Charles Keepax 99ae8cf0a0
ASoC: rt715: Switch to new snd_sdw_params_to_config helper
The conversion from hw_params to SoundWire config is pretty
standard as such most of the conversion can be handled by the new
snd_sdw_params_to_config helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221123165432.594972-8-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:31 +00:00
Charles Keepax 754bef6752
ASoC: rt711: Switch to new snd_sdw_params_to_config helper
The conversion from hw_params to SoundWire config is pretty
standard as such most of the conversion can be handled by the new
snd_sdw_params_to_config helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221123165432.594972-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:30 +00:00
Charles Keepax ae7ad90e7c
ASoC: rt700: Switch to new snd_sdw_params_to_config helper
The conversion from hw_params to SoundWire config is pretty
standard as such most of the conversion can be handled by the new
snd_sdw_params_to_config helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221123165432.594972-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:29 +00:00
Charles Keepax 5b75bc7fc2
ASoC: rt5682-sdw: Switch to new snd_sdw_params_to_config helper
The conversion from hw_params to SoundWire config is pretty
standard as such most of the conversion can be handled by the new
snd_sdw_params_to_config helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221123165432.594972-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:28 +00:00
Charles Keepax 0725dd0461
ASoC: rt1316-sdw: Switch to new snd_sdw_params_to_config helper
The conversion from hw_params to SoundWire config is pretty
standard as such most of the conversion can be handled by the new
snd_sdw_params_to_config helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221123165432.594972-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28 13:04:27 +00:00