Commit graph

24940 commits

Author SHA1 Message Date
Peter Ujfalusi
edca0623f6
ASoC: SOF: amd: acp-pcm: Take buffer information directly from runtime
Instead of using the values from ipc_params, take them directly from
substream->runtime.

This is in preparation of making the platform hw_params callback to be
IPC agnostic.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220304205733.62233-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-07 13:12:46 +00:00
Gongjun Song
d66c57c5ff
ASoC: SOF: Intel: pci-tgl: add RPL-S support
Add PCI DID for Intel Raptor Lake S.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220304205733.62233-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-07 13:12:44 +00:00
Jiaxin Yu
8f2b025abc
ASoC: bt-sco: fix bt-sco-pcm-wb dai widget don't connect to the endpoint
This patch fix the second dai driver's dai widget can't connect to the
endpoint. Because "bt-sco-pcm" and "bt-sco-pcm-wb" dai driver have the
same stream_name, so it will cause they have the same widget name.
Therefor it will just create only one route when do snd_soc_dapm_add_route
that only find the widget through the widget name.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220302013533.29068-1-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-03 12:48:37 +00:00
Meng Tang
e94769900f
ASoC: hdac_hda: Avoid unexpected match when pcm_name is "Analog"
pcm name can be "Analog" and "Alt Analog", cpcm->name can be
"Analog Codec DAI" and "Alt Analog Codec DAI". When pcm_name
is "Analog", "Analog Codec DAI" and "Alt Analog Codec DAI" are
both satisfy the 'if (strstr(cpcm->name, pcm_name))' condition,
which may cause the returned cpcm to be "Alt Analog Codec DAI".

Even if we get the pcm name by id, and "Analog Codec DAI" goes
into the loop before "Alt Analog Codec DAI", but I still think
we'd better have multiple insurances against unexpected return
values. After, we can correctly return the expected result
even if other relevant places are changed.

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Link: https://lore.kernel.org/r/20220302094351.3487-1-tangmeng@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-03 12:48:36 +00:00
Mark Brown
227178d238
ASoC: Intel: machine driver updates for 5.18
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Two cleanups to remove an unused filename and typos, and one addition
of an ACPI matching table for a Dell SoundWire SKU without local
microphones.

The main change is the addition of a common 'sof-ssp-amp' machine
driver for devices with amplifiers only (no headset codec) and
different connections using I2S links (Bluetooth offload, HDMI
receiver). It's likely that the amplifier will be swapped out by OEMs,
this machine driver provides a relatively generic solution to avoid
copy-paste of similar solutions.
2022-03-02 16:58:51 +00:00
Dan Carpenter
d5dd781bcc
ASoC: qcom: Fix error code in lpass_platform_copy()
The copy_to/from_user() functions return the number of bytes remaining
to be copied.  This function needs to return negative error codes
because snd_soc_pcm_component_copy_user() treats positive returns as
success in soc_component_ret().

Fixes: 7d7209557b ("ASoC: qcom: Add support for codec dma driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220301081104.GB17375@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:45:27 +00:00
Jiasheng Jiang
de2c6f9881
ASoC: soc-compress: prevent the potentially use of null pointer
There is one call trace that snd_soc_register_card()
->snd_soc_bind_card()->soc_init_pcm_runtime()
->snd_soc_dai_compress_new()->snd_soc_new_compress().
In the trace the 'codec_dai' transfers from card->dai_link,
and we can see from the snd_soc_add_pcm_runtime() in
snd_soc_bind_card() that, if value of card->dai_link->num_codecs
is 0, then 'codec_dai' could be null pointer caused
by index out of bound in 'asoc_rtd_to_codec(rtd, 0)'.
And snd_soc_register_card() is called by various platforms.
Therefore, it is better to add the check in the case of misusing.
And because 'cpu_dai' has already checked in soc_init_pcm_runtime(),
there is no need to check again.
Adding the check as follow, then if 'codec_dai' is null,
snd_soc_new_compress() will not pass through the check
'if (playback + capture != 1)', avoiding the leftover use of
'codec_dai'.

Fixes: 467fece ("ASoC: soc-dai: move snd_soc_dai_stream_valid() to soc-dai.c")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1634285633-529368-1-git-send-email-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:45:26 +00:00
Sascha Hauer
300689fb04
ASoC: soc-generic-dmaengine-pcm: set period_bytes_min based on maxburst
In dmaengine_pcm_set_runtime_hwparams() period_bytes_min is hardcoded to
256. For some applications that may be too big. This patch changes that
to calculate the value based on dma_data->maxburst. The correct value
would be maxburst multiplied by the address width of the hardware FIFO.
Unfortunately the address width is dynamically calculated based on the
stream parameters and is not known at open time, so the worst case
is chosen here which is 8 bytes, the maximum that is supported by
dmaengine drivers.
Not all drivers may set a maxburst value, so we fall back to the
previously used hardcoded value of 256 bytes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220301113446.1053171-1-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:45:25 +00:00
Jiasheng Jiang
45ea97d743
ASoC: dwc-i2s: Handle errors for clk_enable
As the potential failure of the clk_enable(),
it should be better to check it, as same as clk_prepare_enable().

Fixes: c9afc1834e ("ASoC: dwc: Disallow building designware_pcm as a module")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220301084742.3751939-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:45:24 +00:00
Zhen Ni
a2253ec7ae
ASoC: amd: use asoc_substream_to_rtd()
Uses asoc_substream_to_rtd() helper.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
Link: https://lore.kernel.org/r/20220302081502.25367-1-nizhen@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:45:23 +00:00
Jiasheng Jiang
f9e2ca0640
ASoC: atmel_ssc_dai: Handle errors for clk_enable
As the potential failure of the clk_enable(),
it should be better to check it and return error if fals.

Fixes: cbaadf0f90 ("ASoC: atmel_ssc_dai: refactor the startup and shutdown")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220301090637.3776558-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:45:22 +00:00
Jiasheng Jiang
2ecf362d22
ASoC: mxs-saif: Handle errors for clk_enable
As the potential failure of the clk_enable(),
it should be better to check it, like mxs_saif_trigger().

Fixes: d0ba4c0149 ("ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220301081717.3727190-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:45:21 +00:00
Libin Yang
c4dcd7100c
ASoC: Intel: soc-acpi: add entries in ADL match table
Support configuration with SoundWire RT1316 amplifiers on link0 and
link1, and RT711 on link2 for headphone/headset. This product does not
support local microphones.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:44 +00:00
Brent Lu
2fe14ff61b
ASoC: Intel: sof_ssp_amp: rename driver and support cs35l41 amplifier
Add support of CS35L41 amplifier to the machine driver, as well as
the support of HDMI playback and BT offload DAI Link.

Rename the driver to a generic name to support different amplifiers
from different vendors.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:43 +00:00
Brent Lu
709ec7bec6
ASoC: Intel: cirrus-common: support cs35l41 amplifier
Implement cs35l41 support code in this common module so it could be
shared between multiple SOF machine drivers.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:42 +00:00
Brent Lu
024979b67b
ASoC: Intel: sof_rt1308: move rt1308 code to common module
Move the code related to rt1308 dai link to the realtek common module.
It creates a clean base to add more amplifier support to this machine
driver in the future.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:41 +00:00
Brent Lu
e1d5e13324
ASoC: Intel: boards: create sof-realtek-common module
Move sof_realtek_common.o to a dedicated module like the module to
support maxim amplifiers.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:40 +00:00
balamurugan.c
da793fb0f5
ASoC: Intel: add RT1308 I2S machine driver and HDMI-in capture via I2S support.
Adding separate I2S machine driver for RT1308.

Adding support for HDMI-In capture via I2S in slave mode configuration.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: balamurugan.c <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:39 +00:00
Pierre-Louis Bossart
f1eebb3bf7
ASoC: Intel: boards: fix spelling in comments
copy/paste spelling issues with platforms and buttons.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: FRED OH <fred.oh@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:38 +00:00
Pierre-Louis Bossart
a6264056b3
ASoC: soc-acpi: remove sof_fw_filename
We've been using a default firmware name for each PCI/ACPI/OF platform
for a while. The machine-specific sof_fw_filename is in practice not
different from the default, and newer devices don't set this field, so
let's remove the redundant definitions.

When OEMs modify the base firmware, they can keep the same firmware
name but store the file in a separate directory.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220301194903.60859-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02 13:43:37 +00:00
Srinivas Kandagatla
8dd5524583
ASoC: codecs: wsa881x: add runtime pm support
WSA SoundWire Controller does not support Clock stop and performs a soft reset
on suspend  resume path. Its recommended that WSA881x codecs connected to this
are also reset using a hard reset during suspend resume.

So this codec driver performs a hard reset during suspend resume cycle.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220228144235.24208-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 22:01:25 +00:00
Mark Brown
46c81702e9
ASoC: Add power domains support for digital macro codecs
Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:

This patch set is to add power domains support for RX, TX and VA macros.
2022-02-28 19:13:38 +00:00
Mark Brown
316cd94126
ASoC: es7241: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the es7241 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222223300.3120298-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:16 +00:00
Mark Brown
677c90bac3
ASoC: max98927: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98927 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-10-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:15 +00:00
Mark Brown
502e1c8d07
ASoC: max98926: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98926 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-9-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:14 +00:00
Mark Brown
02dd4e6ba2
ASoC: max98925: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98925 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-8-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:13 +00:00
Mark Brown
2594d0aaed
ASoC: max9867: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max9867 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-7-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:11 +00:00
Mark Brown
d14c87d8ef
ASoC: max9860: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max9860 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:10 +00:00
Mark Brown
9dcef176c4
ASoC: max9850: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max9850 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-5-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:09 +00:00
Mark Brown
c536d745ad
ASoC: max98390: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98390 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:08 +00:00
Mark Brown
012df28f5e
ASoC: max98371: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98371 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:07 +00:00
Mark Brown
2232314b7d
ASoC: max98095: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98095 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:06 +00:00
Mark Brown
14688a14da
ASoC: max98088: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98088 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:05 +00:00
Mark Brown
6370c4436b
ASoC: uda134x: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the uda134x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003409.1820405-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:04 +00:00
Mark Brown
ca7176f695
ASoC: ml26124: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the ml26124 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223001636.1321505-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:03 +00:00
Mark Brown
e0dab08973
ASoC: pcm512x: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the pcm512x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:02 +00:00
Mark Brown
9231bb1b25
ASoC: pcm3168a: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the pcm3168a driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:01 +00:00
Mark Brown
765e30ac66
ASoC: pcm186x: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the pcm186x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:34:00 +00:00
Mark Brown
1900cb5375
ASoC: pcm1681: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the pcm1681 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:59 +00:00
Mark Brown
3c7d8a3517
ASoC: pcm3060: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the pcm3060 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014731.2765283-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:58 +00:00
Sascha Hauer
9b3ff6378d
ASoC: fsl: Drop unused argument from imx_pcm_dma_init()
Since 70d435ba1c ("ASoC: imx-pcm-dma: simplify pcm_config") the size
argument to imx_pcm_dma_init() is unused, so drop it. Also remove the
now unused defines that the users of imx_pcm_dma_init() used to pass the
size argument

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220223130625.3430589-1-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:57 +00:00
Yang Li
7d642c9c14
ASoC: mediatek: mt8195: Remove unnecessary print function dev_err()
The print function dev_err() is redundant because platform_get_irq()
already prints an error.

Eliminate the follow coccicheck warning:
./sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:3126:2-9: line 3126 is
redundant because platform_get_irq() already prints an error

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220224011046.76904-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:55 +00:00
Jiasheng Jiang
ed7c9fef11
ASoC: ti: davinci-i2s: Add check for clk_enable()
As the potential failure of the clk_enable(),
it should be better to check it and return error
if fails.

Fixes: 5f9a50c3e5 ("ASoC: Davinci: McBSP: add device tree support for McBSP")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20220228031540.3571959-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:54 +00:00
Mark Brown
f948202284
ASoC: mc13783: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the mc13783 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223001416.1235951-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:53 +00:00
Mark Brown
addeb10c95
ASoC: isabelle: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the isabelle driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222225014.3691208-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:52 +00:00
Vijendar Mukunda
6f98980063
ASoC: amd: vangogh: fix uninitialized symbol warning in machine driver
Fixed below smatch static checker warning.
sound/soc/amd/vangogh/acp5x-mach.c:190 acp5x_cs35l41_hw_params()
error: uninitialized symbol 'ret'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:50 +00:00
Vijendar Mukunda
728a592619
ASoC: amd: vg: remove warnings and errors pointed out by checkpatch pl
Fix checkpatch pl errors and warnings in vangogh machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:49 +00:00
Vijendar Mukunda
5363d7304e
ASoC: amd: vg: update DAI link name
Update DAI link name as "acp5x-8821-play".

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:48 +00:00
Vijendar Mukunda
83b713619e
ASoC: amd: vg: fix for pm resume callback sequence
The previous condition is used to cross check only the active
stream status for I2S HS instance playback and capture use cases.

Modified logic to invoke sequence for two i2s controller instances.

This also fixes warnings reported by kernel robot:
"warning: variable 'frmt_val' set but not used"
"warning: variable 'reg_val' set but not used"

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:47 +00:00
Mark Brown
6d2608804e
ASoC: es8328: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the es8328 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222223534.3212743-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:46 +00:00
Mark Brown
58d858ae1c
ASoC: inno_rk3036: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the inno_rk3036 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222224816.3636987-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:45 +00:00
Mark Brown
b6be2012b0
ASoC: es8316: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the es8316 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222223453.3190333-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:44 +00:00
Mark Brown
c9fa2165c0
ASoC: wl1273: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the wl1273 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003810.1947495-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:43 +00:00
Mark Brown
cce15e4818
ASoC: es7134: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the es7134 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222222715.2994339-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:42 +00:00
Mark Brown
7effe2cde9
ASoC: twl4030: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the twl4030 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20220223003046.1697784-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:41 +00:00
Mark Brown
aac21939bb
ASoC: uda1334: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the uda1334 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003207.1748248-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:40 +00:00
Mark Brown
0dc9747259
ASoC: uda1380: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the uda1380 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003707.1903798-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:39 +00:00
Mark Brown
10daafb04d
ASoC: si476x: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the si476x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223001737.1360028-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:37 +00:00
Mark Brown
a325068e2b
ASoC: sti-sas: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the sti-sas driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223002502.1451015-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:36 +00:00
Meng Tang
87d71a1287
ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypassed the hierarchical setup and messed up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Link: https://lore.kernel.org/r/20220227050928.32270-1-tangmeng@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:35 +00:00
Mark Brown
df63fb10a5
ASoC: tscs454: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the tscs454 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223002751.1574345-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:34 +00:00
Mark Brown
7cba0b38c3
ASoC: tscs42xx: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the tscs42xx driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223002751.1574345-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:33 +00:00
Mark Brown
8e08a0c922
ASoC: lm49453: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the lm49453 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222225135.3726158-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:32 +00:00
Srinivasa Rao Mandadapu
9e3d83c528
ASoC: codecs: Add power domains support in digital macro codecs
Add support for enabling required power domains in digital macro codecs.
macro and dcodec power domains are being requested as clocks by HLOS
in ADSP based architectures and ADSP internally handling as powerdomains.
In ADSP bypass case need to handle them as power domains explicitly.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/1645898959-11231-2-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:30:37 +00:00
Mark Brown
0f907c3880
ASoC: codecs: add pm runtime support for Qualcomm codecs
Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

This patchset adds support for runtime pm on tx/rx/wsa/wcd lpass macro,
wsa881x and wcd938x codecs that are wired up on SoundWire bus.  During
pm testing it was also found that soundwire clks enabled by lpass macros
are not enabling all the required clocks correctly, so last 3 patches
corrects them.

Tested this on SM8250 MTP along SoundWire In band Headset Button wakeup
interrupts.
2022-02-25 17:01:44 +00:00
Srinivas Kandagatla
cc4d891f18
ASoC: codecs: wcd-mbhc: add runtime pm support
under low power state a SoundWire Wake IRQ could trigger MBHC interrupts
so make sure that codec is not in suspended state when this happens.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-17-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:14 +00:00
Srinivas Kandagatla
584a6301e1
ASoC: codecs: wcd938x: add simple clk stop support
mark WCD938x as clock stop capable.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-16-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:13 +00:00
Srinivas Kandagatla
1fb83bc5cf
ASoC: codecs: tx-macro: add runtime pm support
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-14-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:11 +00:00
Srinivas Kandagatla
366ff79ed5
ASoC: codecs: rx-macro: add runtime pm support
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-13-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:10 +00:00
Srinivas Kandagatla
c96baa2949
ASoC: codecs: wsa-macro: add runtime pm support
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-12-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:09 +00:00
Srinivas Kandagatla
72ad25eabd
ASoC: codecs: va-macro: add runtime pm support
Add pm runtime support to VA Macro.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-11-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:08 +00:00
Srinivas Kandagatla
eaba113430
ASoC: codecs: rx-macro: setup soundwire clks correctly
For SoundWire Frame sync to be generated correctly we need both MCLK
and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on,
however after adding pm runtime support its possible that NPl clock could be
turned off even when SoundWire controller is active.

Fix this by enabling mclk and npl clk when SoundWire clks are enabled.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:07 +00:00
Srinivas Kandagatla
31bd0db84c
ASoC: codecs: tx-macro: setup soundwire clks correctly
For SoundWire Frame sync to be generated correctly we need both MCLK
and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on,
however after adding pm runtime support its possible that NPl clock could be
turned off even when SoundWire controller is active.

Fix this by enabling mclk and npl clk when SoundWire clks are enabled.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-9-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:06 +00:00
Srinivas Kandagatla
05a41340e5
ASoC: codecs: wsa-macro: setup soundwire clks correctly
For SoundWire Frame sync to be generated correctly we need both MCLK
and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on,
however after adding pm runtime support its possible that NPl clock could be
turned off even when SoundWire controller is active.

Fix this by enabling mclk and npl clk when SoundWire clks are enabled.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:05 +00:00
Srinivas Kandagatla
e252801deb
ASoC: codecs: wsa-macro: move to individual clks from bulk
Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-7-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:04 +00:00
Srinivas Kandagatla
512864c4ff
ASoC: codecs: tx-macro: move to individual clks from bulk
Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:03 +00:00
Srinivas Kandagatla
43b647d994
ASoC: codecs: rx-macro: move to individual clks from bulk
Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:01 +00:00
Srinivas Kandagatla
db8665a3e9
ASoC: codecs: tx-macro: move clk provider to managed variants
move clk provider registration to managed api variants, this should help
with some code tidyup.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:51:00 +00:00
Srinivas Kandagatla
70a5e96bad
ASoC: codecs: rx-macro: move clk provider to managed variants
move clk provider registration to managed api variants, this should help
with some code tidyup.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:50:59 +00:00
Srinivas Kandagatla
bed1775752
ASoC: codecs: va-macro: move to individual clks from bulk
Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:50:58 +00:00
Srinivasa Rao Mandadapu
5a5d2316a5
ASoC: qcom: lpass-platform: Update warning print to control excess logging
Update dev_warn to dev_warn_ratelimit to control excess xrun logging
in lpass platform driver.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1645792943-24845-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:45:42 +00:00
Jia-Ju Bai
431f9a77a4
ASoC: acp: check the return value of devm_kzalloc() in acp_legacy_dai_links_create()
The function devm_kzalloc() in acp_legacy_dai_links_create() can fail,
so its return value should be checked.

Fixes: d4c750f2c7 ("ASoC: amd: acp: Add generic machine driver support for ACP cards")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20220225131645.27556-1-baijiaju1990@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:45:41 +00:00
Jia-Ju Bai
4d06f92f38
ASoC: rt5663: check the return value of devm_kzalloc() in rt5663_parse_dp()
The function devm_kzalloc() in rt5663_parse_dp() can fail, so its return
value should be checked.

Fixes: 457c25efc5 ("ASoC: rt5663: Add the function of impedance sensing")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20220225131030.27248-1-baijiaju1990@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:45:39 +00:00
Peter Ujfalusi
c8775fb16b
ASoC: SOF: sof-priv: Drop duplicate sof_compressed_ops declaration
Other commit added the declaration of the sof_compressed_ops, drop the
instance which added it as Platform specific ops, which the
sof_compressed_ops is not.

76cdd90b27 ("ASoC: SOF: pcm: Add compress_ops for SOF platform component driver")

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220225120034.11028-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:45:38 +00:00
Meng Tang
3304a242f4
ASoC: amd: Use platform_get_irq_byname() to get the interrupt
platform_get_resource_byname(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_byname().

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Link: https://lore.kernel.org/r/20220225112358.19403-1-tangmeng@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25 13:45:37 +00:00
Mark Brown
6e1dda5fcd
Add support for audio on SC7280 based targets
Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:

This patch set is to add support for Audio over wcd codec,
digital mics, through digital codecs and without ADSP.

Changes Since V15:
    -- Bisect patches to avoid build failure in other architectures.
    -- Remove redundant variables lpass variant structure.
Changes Since V14:
    -- Split common wrapper function to separate wrapper for each handle in platform driver.
    -- Update cdc dma buffer handling with memremap with ioremap.
    -- Remove redundant error prints.
    -- Update irq flag.
Changes Since V13:
    -- Change bulk cdc clock voting to individual clock voting.
    -- Remove redundant code, conditional check and prints.
    -- Fix typo errors.
Changes Since V12:
    -- Fix arguments type mismatch.
Changes Since V11:
    -- Fix kernel robot issue on arguments type mismatch.
Changes Since V10:
    -- Split bulk clock voting to individual clock voting as per use case in cdc-dma driver.
    -- Add missing codec dma clocks.
    -- Update rxtx lpm buffer size.
Changes Since V9:
    -- Change individual clock voting to bulk clock voting of lpass-sc7280 platform driver.
    -- Remove redundant clocks in lpass variant structure.
    -- Add mclk for MI2S based headset path.
    -- Remove unused lpass variant structure members in lpass header.
Changes Since V8:
    -- Fix errors in sc7280 lpass cpu dt-bindings.
    -- Move to quicinc domain email id's.
Changes Since V7:
    -- Fix indentation errors.
    -- Bisect patches to avoid interdependency.
Changes Since V6:
    -- Split cdc dma regmap config macros.
    -- Add write dma reg fields for i2s path.
    -- Add helper function to distinguish rxtx and va dma ports.
    -- Optimizing clock and reg name in cpu dt-bindings.
    -- Update buffer management for cdc dma path.
    -- Remove Kconfig fields of machine driver.
Changes Since V5:
    -- Include MI2S primary node to snd_soc_dai_driver in lpass-sc7280 platform driver.
    -- Move dependency patch list to corresponding patch.
    -- Add support for missing cdc-dma ports.
    -- Change if/else conditional statements to switch cases.
    -- Add missing error handlings.
    -- Typo errors fix.
Changes Since V4:
    -- Remove unused variable in lpass-sc7280 platform driver.
Changes Since V3:
    -- Remove redundant power domain controls. As power domains can be configured from dtsi.
Changes Since V2:
    -- Split lpass sc7280 cpu driver patch and create regmap config patch.
    -- Create patches based on latest kernel tip.
    -- Add helper function to get dma control and lpaif handle.
    -- Remove unused variables.
Changes Since V1:
    -- Typo errors fix
    -- CPU driver readable/writable apis optimization.
    -- Add Missing config patch
    -- Add Common api for repeated dmactl initialization.
Srinivasa Rao Mandadapu (9):
  ASoC: qcom: Move lpass_pcm_data structure to lpass header
  ASoC: qcom: lpass: Add dma fields for codec dma lpass interface
  ASoC: qcom: Add helper function to get dma control and lpaif handle
  ASoC: qcom: Add register definition for codec rddma and wrdma
  ASoC: qcom: Add regmap config support for codec dma driver
  ASoC: qcom: Add support for codec dma driver
  ASoC: qcom: Add lpass CPU driver for codec dma control
  ASoC: dt-bindings: Add SC7280 lpass cpu bindings
  ASoC: qcom: lpass-sc7280: Add platform driver for lpass audio

 .../devicetree/bindings/sound/qcom,lpass-cpu.yaml  |  75 ++-
 sound/soc/qcom/Kconfig                             |  11 +
 sound/soc/qcom/Makefile                            |   4 +
 sound/soc/qcom/lpass-cdc-dma.c                     | 301 ++++++++++
 sound/soc/qcom/lpass-cpu.c                         | 253 ++++++++-
 sound/soc/qcom/lpass-lpaif-reg.h                   | 127 ++++-
 sound/soc/qcom/lpass-platform.c                    | 628 ++++++++++++++++++---
 sound/soc/qcom/lpass-sc7280.c                      | 438 ++++++++++++++
 sound/soc/qcom/lpass.h                             | 141 +++++
 9 files changed, 1890 insertions(+), 88 deletions(-)
 create mode 100644 sound/soc/qcom/lpass-cdc-dma.c
 create mode 100644 sound/soc/qcom/lpass-sc7280.c

--
2.7.4
2022-02-24 22:55:41 +00:00
Peter Ujfalusi
299905881e
ASoC: SOF: Declare sof_compress_ops in sof-priv.h
Fix the following sparse error:
sound/soc/sof/compress.c:310:25: error: symbol 'sof_compressed_ops' was not declared. Should it be static?

Do not enable set the pd->compress_ops yet as it is not a valid assumption
that real compress support really works when CONFIG_SND_SOC_SOF_COMPRESS
is set as the HDA Probes support also selects it, but compressed audio
is not supported (yet) on Intel platforms.

Fixes: 6324cf901e ("ASoC: SOF: compr: Add compress ops implementation")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220224172324.17976-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:50 +00:00
Srinivasa Rao Mandadapu
b62c4e5fba
ASoC: qcom: lpass-sc7280: Add platform driver for lpass audio
Add platform driver for configuring sc7280 lpass core I2S and
DMA configuration to support playback & capture to external codecs
connected over secondary MI2S interface and soundwire interface.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-10-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:48 +00:00
Srinivasa Rao Mandadapu
b81af585ea
ASoC: qcom: Add lpass CPU driver for codec dma control
Add lpass cpu driver to support audio over codec dma for
ADSP bypass usecase.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-8-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:46 +00:00
Srinivasa Rao Mandadapu
7d7209557b
ASoC: qcom: Add support for codec dma driver
Upadate lpass cpu and platform driver to support audio over codec dma
in ADSP bypass use case.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/1645716828-15305-7-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:45 +00:00
Srinivasa Rao Mandadapu
b138706225
ASoC: qcom: Add regmap config support for codec dma driver
Update regmap configuration for supporting headset playback and
capture and DMIC capture using codec dma interface

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-6-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:44 +00:00
Srinivasa Rao Mandadapu
dc8d9766bc
ASoC: qcom: Add register definition for codec rddma and wrdma
Add register definitions for codec read dma and write dma
lpass interface.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-5-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:42 +00:00
Srinivasa Rao Mandadapu
16413d5c5a
ASoC: qcom: Add helper function to get dma control and lpaif handle
Add support function to get dma control and lpaif handle to avoid
repeated code in platform driver

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-4-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:41 +00:00
Srinivasa Rao Mandadapu
ddd60045ca
ASoC: qcom: lpass: Add dma fields for codec dma lpass interface
Add lpass interface memebers to support audio path over codec dma.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-3-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:40 +00:00
Srinivasa Rao Mandadapu
74190d7cd3
ASoC: qcom: Move lpass_pcm_data structure to lpass header
Declare lpass_pcm_data structure in lpass header file instead of
platform source file to make common use of it by other drivers

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-2-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 20:21:39 +00:00
Ajit Kumar Pandey
1f197351b3
ASoC: amd: acp: Add DMIC machine driver ops
Add dmic ops and startup callback to add snd_pcm_hw_constraint for
pdm related device node.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220222124213.721224-4-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 17:44:01 +00:00
Ajit Kumar Pandey
eee33bac9e
ASoC: amd: acp-legacy: Add legacy card support for new machines
We have newer renoir platforms with different codecs combinations.
Add struct in legacy machine driver and add to list of supported
renoir machine to support sound card registration on platform with
rt5682s as primary headset codec and max98360 and rt1019 as speaker
amp codec.

This also fixes error reported by kernel robot:
"error: 'EN_SPKR_GPIO_DW' undeclared here"

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220222124213.721224-3-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 17:44:00 +00:00
Ajit Kumar Pandey
abdcf7282f
ASoC: amd: acp: Change card name for Guybrush Machine
Change sound card name for guybrush machine with rt5682 as primary
codec and rt1019 amp to align with names given in UCM config.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220222124213.721224-2-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 17:43:59 +00:00
Daniel Baluta
76cdd90b27
ASoC: SOF: pcm: Add compress_ops for SOF platform component driver
Now that sof_compressed_ops initial implementation was merged
we can enable it in SOF platform component driver.

This partially reverts commit
8a72072458 ("ASoC: SOF: pcm: Remove non existent CONFIG_SND_SOC_SOF_COMPRESS reference")

Reported-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220223153849.84471-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24 02:04:39 +00:00
Mark Brown
b83eb8be4f
ASoC: sc7280: Really depends on SOUNDWIRE
The sc7280 driver really does depend on SOUNDWIRE since it calls various
sdw_ functions (eg, sdw_enable_stream(), sdw_prepare_stream()) which do
not have stubs when that is disabled so we can't build with COMPILE_TEST.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223011913.2753938-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-23 02:04:14 +00:00
Trevor Wu
ff5a90173d
ASoC: mediatek: mt8195: enable apll tuner
Normally, the clock source of audio module is either 26M or APLL1/APLL2,
but APLL1/APLL2 are not the multiple of 26M.

In the patch, APLL1 and APLL2 tuners are enabled to handle sample rate
mismatch when the data path crosses two different clock domains.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220221055716.18580-1-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-21 13:24:56 +00:00
Ajye Huang
b9afe038b1
ASoC: SOF: Intel: Add topology overwrite for Felwinter
The Felwinter uses four max98360a amplifiers on corresponding CH0~CH3.
There are four amps on the board connecting to headphone to SSP0 port,
amp to SSP1,and the DAI format would be DSP_A,8-slots, 32 bit slot-width.

CH0: L(Woofer), CH1:R(Woofer), CH2:L(Tweeter), CH3:R(Tweeter)

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220218082741.1707209-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-21 13:24:53 +00:00
Mauro Carvalho Chehab
ce6a70bfce
ASoC: Intel: sof_es8336: add quirk for Huawei D15 2021
Huawei D15 uses SSP_CODEC(0).

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/d560a1c76edb633c37acf04a9a82518b6233a719.1640351150.git.mchehab@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-18 13:57:10 +00:00
Stephen Kitt
4fe6a63077
ASoC: SOF: Replace zero-length array with flexible-array member
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use "flexible array members"[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
Link: https://github.com/KSPP/linux/issues/180
Suggested-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Stephen Kitt <steve@sk2.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20220217132755.1786130-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-17 17:13:36 +00:00
Pierre-Louis Bossart
83bfc7e793
ASoC: SOF: core: unregister clients and machine drivers in .shutdown
On a platform shutdown, the expectation for most drivers is that
userspace tasks will release all resources. When those sequences do
not complete, it can be the case that PCM devices exposed by ALSA
cards are used *after* the DSP shutdown completes, leading to a
platform hang.

When the clients and machine drivers provide an _unregister callback,
let's invoke it in the shutdown sequence.

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>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220216133241.3990281-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-16 16:34:22 +00:00
Srinivasa Rao Mandadapu
db0b4aedfa
ASoC: codec: wcd938x: Update CTIA/OMTP switch control
Convert gpio api's to gpio descriptor api's in CTIA/OMTP switch control.
Remove redundant NULL checks in swap_gnd_mic function.

Fixes: 013cc2aea0 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1645017892-12522-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-16 16:34:21 +00:00
Shengjiu Wang
f7d344a2bd
ASoC: soc-core: skip zero num_dai component in searching dai name
In the case like dmaengine which's not a dai but as a component, the
num_dai is zero, dmaengine component has the same component_of_node
as cpu dai, when cpu dai component is not ready, but dmaengine component
is ready, try to get cpu dai name, the snd_soc_get_dai_name() return
-EINVAL, not -EPROBE_DEFER, that cause below error:

asoc-simple-card <card name>: parse error -22
asoc-simple-card: probe of <card name> failed with error -22

The sound card failed to probe.

So this patch fixes the issue above by skipping the zero num_dai
component in searching dai name.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1644491952-7457-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-15 12:52:45 +00:00
Colin Ian King
83a1bed1f4
ASoC: tegra20: spdif: make const array rates static
Don't populate the read-only const array rates on the stack but
instead it static. 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/20220214213223.65780-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-15 12:52:44 +00:00
Peter Ujfalusi
4965e38fa0
ASoC: SOF: Makefile: Fix randconfig sof-client build when SND_SOC_SOF=y
Intel's kernel test robot found the following randconfig combination:
SND_SOC_SOF=y
SND_SOC_SOF_CLIENT=m

In this the sof-client object is not going to be built into the snd-sof.o
and we will have undefined references to the sof-client functions.

Fixes: 6955d9512d ("ASoC: SOF: Introduce IPC SOF client support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peter Ujfalusi <Peter Ujfalusi <peter.ujfalusi@linux.intel.com>>
Link: https://lore.kernel.org/r/20220214071330.22151-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 18:30:51 +00:00
Mark Brown
0191899db4
ASoC: Add Euro Headset support for wcd938x codec
Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:

This patch set is to add switch control for selecting CTIA/OMTP Headset
2022-02-14 16:26:29 +00:00
Mark Brown
9fe0c0128d
ASoC: pcm3168a: code cleanup
Merge series from Nikita Yushchenko <nikita.yoush@cogentembedded.com>:

These patches clean up pcm3168a driver, without introducing any
functional change.
2022-02-14 14:54:00 +00:00
Srinivasa Rao Mandadapu
013cc2aea0
ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset
Add switch control for selecting CTIA or OMTP Headset by swapping
gnd and mic with the help of GPIO.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1644668672-29790-2-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 14:52:29 +00:00
Viorel Suman
3c7a4c24bd
ASoC: codec: wm8960: complete discharge on BIAS OFF->STANDBY
On BIAS STANDBY->OFF transition the current implementation sleeps
600ms on suspend in order to discharge the chip. The suspend is
propagated from "snd_soc_suspend" call for all audio cards in a
serial fashion, thus in case of boards like i.MX8DXL EVK which has
3 distinct WM8960 codecs the total cumulated sleep on suspend is 1.8
seconds.

On the other hand the BIAS OFF->STANDBY transition happens
asynchronously with regard to "snd_soc_resume" - the call is
propagated from "soc_resume_deferred" which is just scheduled
from "snd_soc_resume", each card having its own work scheduled to
execute "soc_resume_deferred" call.

The patch performs discharge completion on BIAS OFF->STANDBY transition
so that the cumulated effect on suspend described above is avoided
and discharge is completed in paralel in case of multiple WM8960
codecs on the board.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Link: https://lore.kernel.org/r/20220208121727.4461-1-viorel.suman@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 12:52:58 +00:00
Mark Brown
0b88a65900
ASoC: wm8731: Delete empty remove() function
The I2C remove function is empty for the wm8731 driver, it can just be
deleted.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220211165811.1176005-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 12:52:57 +00:00
Nikita Yushchenko
3e63d3c1a2
ASoC: pcm3168a: remove numeric PCM3168A_NUM_SUPPLIES
Just use ARRAY_SIZE() instead.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-5-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 12:52:55 +00:00
Nikita Yushchenko
6bfc1242ee
ASoC: pcm3168a: refactor format handling
- drop incomplete (not tdm-aware) calculation/setting of hardware
  fmt value from pcm3168a_set_dai_fmt(); instead, store original
  SND_SOC_DAIFMT* setting in io_params

- in pcm3168a_hw_params(), do all checks in terms of SND_SOC_DAIFMT*,
  and convert that to register bitfield values only to write to
  hardware

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-4-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 12:52:54 +00:00
Nikita Yushchenko
c7270209fc
ASoC: pcm3168a: refactor hw_params routine
- group together code lines that calculate value for msad/msda field

- rename variables to better match their meaning:
    val -> ms,
    max_ratio -> num_scki_ratios

- update variable types to match exactly parameters or return types
  of the calls where those variables are used

- write two fields of the same register in a single regmap call

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-3-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 12:52:53 +00:00
Nikita Yushchenko
0c483a07e9
ASoC: pcm3168a: cleanup unintuitive mask usage
When checking if the requested parameters are supported, the driver uses
PCM3168A_FMT_DSP_MASK to check for PCM3168A_FMT_DSP_* values.

However, formally not only PCM3168A_FMT_DSP_* values match that
condition, PCM3168A_FMT_I2S_TDM and PCM3168A_FMT_LEFT_J_TDM also do.

The check still gives correct result because those extra values can't
be in 'fmt' at the check location. Still, to make the code less cryptic,
better to compare 'fmt' with PCM3168A_FMT_DSP_* values explicitly.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-2-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14 12:52:52 +00:00
Daniel Baluta
e7c799e76f
ASoC: SOF: compr: Mark snd_compress_ops static
Functions won't be directly used outside of compress.c file
so mark them as static.

This will also fix warnings reported by kernel test robot:

>> sound/soc/sof/compress.c:91:5: warning: no previous prototype for
function 'sof_compr_open' [-Wmissing-prototypes]
   int sof_compr_open(struct snd_soc_component *component,
       ^
   sound/soc/sof/compress.c:91:1: note: declare 'static' if the function
is not intended to be used outside of this translation unit
   int sof_compr_open(struct snd_soc_component *component,

Fixes: 6324cf901e ("SoC: SOF: compr: Add compress ops implementation")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220211082631.179735-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-11 10:31:26 +00:00
Julia Lawall
695c105933
ASoC: Intel: bytcr_wm5102: use GFP_KERNEL
Platform_driver probe functions aren't called with locks held
and thus don't need GFP_ATOMIC. Use GFP_KERNEL instead.

Problem found with Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220210204223.104181-4-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-11 10:31:25 +00:00
Vlad Karpovich
c55b3e46cb
ASoC: wm_adsp: Add trace caps to speaker protection FW
Enable access to the speaker protection firmware debug stream
using compress stream API and lower minimum fragment size to
16 words.

Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220210172053.22782-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-11 10:31:24 +00:00
Charles Keepax
0f1d41a85b
ASoC: wm_adsp: Make compressed buffers optional
Newer firmwares will support compressed buffers that may or may not
exist, for example debugging streams. Update the driver to make a
compressed stream optional. A warning will still be generated at DSP
boot time and opening the stream will fail if the compressed buffer in
question does not exist, however the DSP can still be booted and other
features used.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220210172053.22782-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-11 10:31:23 +00:00
Ricard Wanderlof
9193bc0558
ASoC: tlv320adc3xxx: Add IIR filter configuration
The TLV320ADC3001/3101 have an internal DSP, which can either be
used in various preset configurations (called "Processing Blocks"
in the data sheet), or as a freely programmable (using the
"PurePath Studio" graphical programming tool from TI) but rather
small DSP ("miniDSP").

Using the default configuration (PRB_R1) it's possible to set up
filtering using a first-order IIR, which can be useful for adding
a digital high pass filter to the signal chain, for instance.

This patch adds support for configuring the IIR filter coefficients.
The filter itself is always enabled; the default coefficients
implement a pass-through function.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2202101805360.7068@lnxricardw1.se.axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 19:48:57 +00:00
Mark Brown
54f5bae0b7
ASoC: SOF: IPC client infrastructure
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The Linux SOF implementation is historically monolithic in a sense that all
features accessible in the firmware can be used via the snd_sof_dev struct in
one way or another.

Support for features can not be added or removed runtime and with the current
way of things it is hard if not impossible to implement support for dynamic
feature support when based on the firmware manifest we can easily enable/access
independent modules with the SOF.

In order to be able to support such modularity this series introduces a small
framework within SOF for client support using the Auxiliary bus.

Client drivers can be removed runtime and later re-loaded if needed without
affecting the core's behaviour, but it is the core's and the platform's duty
to create the Auxiliary devices usable in the platform and via the firmware.

There is still a need for SOF manifest update to convey information about
features to really make the full dynamic client device creation.

The series will introduce the core SOF client support and converts the generic
ipc flood test, ipc message injector and the probes (Intel HDA only) to a client
driver.
2022-02-10 18:16:07 +00:00
Mark Brown
b0d0e85f14
Machine driver to support LPASS SC7280 sound card registration
Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:

This patch set is to add support for SC7280 sound card registration and
to add dt-bindings documentation file.
2022-02-10 16:52:05 +00:00
Peter Ujfalusi
3dc0d70917
ASoC: SOF: Convert the generic probe support to SOF client
Add a new client driver for probes support and move
all the probes-related code from the core to the
client driver.

The probes client driver registers a component driver
with one CPU DAI driver for extraction and creates a
new sound card with one DUMMY DAI link with a dummy codec
that will be used for extracting audio data from specific
points in the audio pipeline.

The probes debugfs ops are based on the initial
implementation by Cezary Rojewski and have been moved
out of the SOF core into the client driver making it
easier to maintain. This change will make it easier
for the probes functionality to be added for all platforms
without having the need to modify the existing(15+) machine
drivers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:12 +00:00
Peter Ujfalusi
cac0b0887e
ASoC: SOF: Convert the generic IPC message injector into SOF client
Move the IPC message injection code out from the debug file as separate
SOF client driver.

Based on the kernel configuration, the device registration for the new IPC
message injector is going to happen in the core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:10 +00:00
Ranjani Sridharan
6e9548cdb3
ASoC: SOF: Convert the generic IPC flood test into SOF client
Move the IPC flood test code out from the debug file as separate SOF client
driver.

Based on the kernel configuration, the device registration for the new IPC
flood test is going to happen in the core.
With the separate client driver it is going to be possible to run multiple
flood tests in parallel to increase the stress, the new Kconfig option can
be used to select this (defaults to 1).
In order to preserve backward compatibility with existing SW/scripts, the
first IPC flood test's debugfs files have been linked to the old files.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Co-developed-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:09 +00:00
Peter Ujfalusi
1069967afe
ASoC: SOF: sof-client: Add support for clients not managed by pm framework
Some SOF client can be of 'passive' type, meaning that they do not handle
PM framework callbacks by themselves but rely on the auxiliary driver's
suspend and resume callbacks to be notified about the core's suspend or
resume event.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:07 +00:00
Peter Ujfalusi
6955d9512d
ASoC: SOF: Introduce IPC SOF client support
A client in the SOF (Sound Open Firmware) context is a driver that needs
to communicate with the DSP via IPC messages. The SOF core is responsible
for serializing the IPC messages to the DSP from the different clients.

One example of an SOF client would be an IPC test client that floods the
DSP with test IPC messages to validate if the serialization works as
expected.

Multi-client support will also add the ability to split the existing audio
cards into multiple ones, so as to e.g. to deal with HDMI with a dedicated
client instead of adding HDMI to all cards.

This patch introduces descriptors for SOF client driver and SOF client
device along with APIs for registering and unregistering a SOF client
driver, sending IPCs from a client device and accessing the SOF core
debugfs root entry.

Along with this, add a couple of new members to struct snd_sof_dev that
will be used for maintaining the list of clients.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Co-developed-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:06 +00:00
Peter Ujfalusi
ee8443050b
ASoC: SOF: Split up utils.c into sof-utils and iomem-utils
The utils.c contains wrappers and implementation for accessing iomem mapped
regions and a single unrelated function to create a compressed page table
from snd_dma_buffer for firmware use.

The latter is used by the PCM and the dma trace code and it needs to be
moved to a generic source/header for the client conversion to be possible.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:04 +00:00
Peter Ujfalusi
ab3a2189a3
ASoC: SOF: ipc: Read and pass the whole message to handlers for IPC events
Change the parameter list for the firmware initiated message (IPC event)
handler functions to:
handler(struct snd_sof_dev *sdev, void *full_msg);

Allocate memory and read the whole message in snd_sof_ipc_msgs_rx() then
pass the pointer to the function handling the message.
Do this only if we actually have a function which is tasked to process the
given type.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:03 +00:00
Peter Ujfalusi
5fdc124245
ASoC: SOF: Move the definition of enum sof_dsp_power_states to global header
Move the enum sof_dsp_power_states to include/sound/sof.h
to be accessible outside of the core SOF stack.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:01 +00:00
Peter Ujfalusi
2439a35508
ASoC: SOF: Drop unused DSP power states: D3_HOT and D3_COLD
The only reference to D3_HOT and D3_COLD DSP power state is in
intel/hda-dsp.c in form of a dev_dbg() print.

Remove them as they are not used and even if they are they could be
re-added via the substate.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 15:19:00 +00:00
Oder Chiou
d9c5996ab3
ASoC: rt5640: Remove the sysclk and sysclk_src checking
Remove the sysclk and sysclk_src checking in the function set_sysclk() to
prevent the PLL power off. It is not getting re-programmed during
subsequent runs after the first run (in BIAS_OFF stage).

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20220210071900.17287-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 13:15:03 +00:00
Srinivasa Rao Mandadapu
57350bd41c
ASoC: qcom: SC7280: Add machine driver
Add new machine driver to register sound card on sc7280 based targets and
do the required configuration for lpass cpu dai and external codecs
connected over MI2S and soundwire interfaces.
Add support for audio jack detection, soundwire init and MBHC.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1644497415-25291-4-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 13:14:49 +00:00
Srinivasa Rao Mandadapu
77d0ffef79
ASoC: qcom: Add macro for lpass DAI id's max limit
Add macro for lpass DAI id's max limit to create static arrays
and for array boundary checks.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1644497415-25291-3-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-10 13:14:48 +00:00
Pierre-Louis Bossart
7d88b96081
ASoC: SOF: Intel: hdac_ext_stream: consistent prefixes for variables/members
The existing code maximizes confusion by using 'stream' and 'hstream'
variables of different types, e.g:

struct hdac_stream *stream;
struct hdac_ext_stream *stream;
struct hdac_stream *hstream;
struct hdac_ext_stream *hstream;

This confusion is partly inherited from legacy code but SOF
contributors added their own creative spin, e.g.

struct hdac_ext_stream *link_dev;
struct hdac_ext_stream *dsp_stream;
struct hdac_ext_stream hda_stream;

and my personal favorite:

stream = &hda_stream->hda_stream;

This patch suggests a consistent naming across all Intel code related
to HDAudio stream management. The convention is - by hierarchical
order:

struct sof_intel_hda_stream *hda_stream;
struct hdac_ext_stream *hext_stream;
struct hdac_stream *hstream;

No functionality change - just renaming of variables/members.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220209063104.9971-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-09 14:36:14 +00:00
Mark Brown
960a89045e
ASoC: SOF: dma-trace: Change trace_init() ops parameter list
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

the DMA trace implementation on AMD platform assumes that the stream_tag pointer
is pointing the stream_tag member of struct sof_ipc_dma_trace_params_ext, which
is true at the moment, but it can not be guarantied and a change in the dtrace
core can cause out of bound accesses for AMD.

For this reason, change the API to pass the struct itself which will remove the
assumption and makes it clear from both sides what is expected to be sent via the
parameter list.

This opens up a window to clean up the intel and AMD implementation at the same
time.

Regards,
Peter
---

Peter Ujfalusi (2):
  ASoC: SOF: intel: hda-trace: Pass the dma buffer pointer to
    hda_dsp_trace_prepare
  ASoC: SOF: dma-trace: Pass pointer to params_ext struct in
    trace_init()

 sound/soc/sof/amd/acp-trace.c   | 38 ++++++++-------------------------
 sound/soc/sof/amd/acp.h         |  3 ++-
 sound/soc/sof/intel/hda-trace.c | 17 ++++++++-------
 sound/soc/sof/intel/hda.h       |  3 ++-
 sound/soc/sof/ops.h             |  4 ++--
 sound/soc/sof/sof-priv.h        |  2 +-
 sound/soc/sof/trace.c           |  2 +-
 7 files changed, 26 insertions(+), 43 deletions(-)

--
2.35.0
2022-02-08 18:58:10 +00:00
Mark Brown
dcc2c012c7
ASoC: Fix gpiolib dependencies
Merge series from Mark Brown <broonie@kernel.org>:

This series removes a bunch of spurious selects of gpiolib that were
causing noise in randconfig build tests.

Mark Brown (6):
  ASoC: dmic: Remove spurious gpiolib select
  ASoC: rt9120: Remove spurious gpiolib select
  ASoC: simple-amplifier: Remove spurious gpiolib select
  ASoC: max9759: Remove spurious gpiolib select
  ASoC: zl38060: Remove spurious gpiolib select
  ASoC: simple-mux: Depend on gpiolib rather than selecting it

 sound/soc/codecs/Kconfig | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

base-commit: e783362eb5
--
2.30.2
2022-02-08 18:58:08 +00:00
Sascha Hauer
eba0f00775
ASoC: fsl_sai: Enable combine mode soft
The fsl_sai driver calculates the number of pins used and enables
multiple channels if necessary. This means the SAI expects data in
one FIFO per pin. The SDMA engine only services a single FIFO, so
multi pin support doesn't work at all.

This patch enables the software combine mode in chips that support
it. With this the SAI presents only a single FIFO to the outside
and distributes the data into the different FIFOs internally.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220111081518.982437-1-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:38:06 +00:00
Daniel Baluta
6324cf901e
ASoC: SOF: compr: Add compress ops implementation
Implement snd_compress_ops. There are a lot of similarities with
PCM implementation.

For now we use sof_ipc_pcm_params to transfer compress parameters to SOF
firmware.

This will be changed in the future once we either add new compress
parameters to SOF or enhance existing sof_ipc_pcm_params structure
to support all native compress params.

Note that get_caps and get_codec_caps are missing and will be added
later. This is because we need to find a way to advertise DSP
capabilities depending on supported platforms.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220120143741.492634-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:38:05 +00:00
Peter Ujfalusi
bab05b508e
ASoC: SOF: dma-trace: Pass pointer to params_ext struct in trace_init()
Instead of passing a pointer to the stream_tag within the
struct sof_ipc_dma_trace_params_ext, pass the pointer to the containing
struct.

AMD needs to update buffer.phy_addr (and don't really use the stream_tag)
for the trace implementation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220128123623.23569-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:38:04 +00:00
Peter Ujfalusi
91e716b2a4
ASoC: SOF: intel: hda-trace: Pass the dma buffer pointer to hda_dsp_trace_prepare
Pass the snd_dma_buffer pointer as parameter to hda_dsp_trace_prepare()
function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220128123623.23569-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:38:03 +00:00
Mark Brown
805fff7501
ASoC: simple-mux: Depend on gpiolib rather than selecting it
The simple-mux driver requires gpiolib. Currently it selects GPIOLIB but
since the use of select can lead to issues with randconfig let's instead
depend on GPIOLIB, select is more idiomatically used for Kconfig symbols
that are not user selectable but GPIOLIB is user selectable.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220202192333.3655269-7-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:38:00 +00:00
Mark Brown
8e70aaae32
ASoC: zl38060: Remove spurious gpiolib select
The usage of GPIOs is optional in the code so don't force on gpiolib when
building it, avoiding warnings in randconfigs.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220202192333.3655269-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:37:59 +00:00
Mark Brown
c297448760
ASoC: max9759: Remove spurious gpiolib select
The usage of GPIOs is optional in the code so don't force on gpiolib when
building it, avoiding warnings in randconfigs.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220202192333.3655269-5-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:37:58 +00:00
Mark Brown
44bd27c42a
ASoC: simple-amplifier: Remove spurious gpiolib select
The usage of GPIOs is optional in the code so don't force on gpiolib when
building it, avoiding warnings in randconfigs.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220202192333.3655269-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:37:57 +00:00
Mark Brown
2cc12ef489
ASoC: rt9120: Remove spurious gpiolib select
The usage of GPIOs is optional in the code so don't force on gpiolib when
building it, avoiding warnings in randconfigs.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220202192333.3655269-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:37:56 +00:00
Mark Brown
823868f59f
ASoC: dmic: Remove spurious gpiolib select
The usage of GPIOs is optional in the code so don't force on gpiolib when
building it, avoiding warnings in randconfigs.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220202192333.3655269-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-08 13:37:55 +00:00