Commit graph

1185475 commits

Author SHA1 Message Date
Mark Brown
83b3432fc5
ASoC: cs35l56: Bugfixes and efficiency improvement
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

First two patches are bugfixes.
Third patch skips the overhead of rebooting the amp after applying
firmware files when we know that it isn't necessary.
2023-05-19 12:32:36 +09:00
Mark Brown
af53b00fa3 Linux 6.4-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmRhO8weHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGscUH/3T3ofuhSxphqi0F
 kBsfuZ2mFD9G0JrYZmN6jcAv5+NFPe10+oZsayPlVqdY+CbTqLvkBTxQWm3VnjDT
 wJ2spqhQuVb7gNYqKO+AYlNdjpC5ckFJLc0xHMcFioTocob3E4sVPMZ7ff1n9+LX
 0L+V+T3Dwn7XzT9h5RLhPHQKtTEOfuu2uOSUxYeoS1ChSsbh7Ok8RfdNDW+LHVck
 B0QuuOmxf1nsob8AOU26A3ZBdeFxCzr6fa9NblYTu3ul5kzpJs4Fv3LzFCd80mH6
 lq4d4LlMnCdAPIqgZfb1k+V9CgILE8JQH6ajfrMcpveD67T5/2qZIEFoMRCcsuca
 f/vIcfM=
 =os13
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmRm7cATHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0CMdB/wPtzv9SU+fO61GWdqPaDa4f53qEiM4
 jWLuhPgxON4glIAqm4RJqPwb2FzF28V1UzlmDRD5dQczCSBgWsFpaxOpC9APhxNW
 TRaKmJzNPqpCIvHShQ6UWbMOqvp+GPJRu+tXBl/rZaUYums4u1Sp5GJLxvlHP//B
 /9gfiiqoaqgXrNbLTpzOumBcZLFUO3hNQH5SAVr9Y0BbmNK2okV1ZyWO0AUREvn8
 tUNjDNLzPwWGgZyrmgQHSBiNREevM1WM9/uNbX6PcyZapTPLGeIKclJfNj7sSFpH
 Ua6vZSsqUhBbeFyuZ8nGqPYawuO3AJvlnfdy1xZIgO4eA8772DhMw38+
 =iaNV
 -----END PGP SIGNATURE-----

Merge tag 'v6.4-rc2' into asoc-6.5 to get fixes for CI

Linux 6.4-rc2
2023-05-19 12:32:04 +09:00
Simon Trimmer
1a8edfcffa
ASoC: cs35l56: In secure mode skip SHUTDOWN and RESET around fw download
If the device is in secure mode it's unnecessary to send a SHUTDOWN and
SYSTEM_RESET around the firmware download. It could only be patching
insecure tunings. A tuning patch doesn't need a SHUTDOWN and only needs
a REINIT afterwards. This will reduce the overhead of exiting system
suspend in secure mode.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/Message-Id: <20230518150250.1121006-4-rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-19 11:32:13 +09:00
Simon Trimmer
c9001a2754
ASoC: cs35l56: sdw_write_no_pm() should be performed under a pm_runtime request
SoundWire bus accesses must be performed under the guard of a pm_runtime
request, in this case the write was being performed just after the
request had been put() and so the bus could not be guaranteed to be
available.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/Message-Id: <20230518150250.1121006-3-rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-19 11:32:12 +09:00
Simon Trimmer
608f1b0dbd
ASoC: cs35l56: Move DSP part string generation so that it is done only once
Each time we go through dsp_work() it does a devm_kasprintf() to
allocate memory to hold the part name string. It's not strictly a memory
leak because devm will free it all if the driver is removed. But we keep
allocating more and more memory to hold the same string.

Move the allocation so that it is performed after the version and
secured state information is gathered and handle allocation errors.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/Message-Id: <20230518150250.1121006-2-rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-19 11:32:11 +09:00
Mark Brown
98be58f2b5
Add Chameleon v3 ASoC audio
Merge series from Paweł Anikiel <pan@semihalf.com>:

The Google Chameleon v3 is a device made for testing audio and video
paths of other devices. This patchset adds support for ASoC audio on
this device. It has two audio sources: HDMI audio from the it68051 chip
(RX only), and analog audio from the ssm2603 chip (RX and TX).

The patchset adds the ASoC platform and codec drivers.
2023-05-19 07:27:08 +09:00
Mark Brown
9b6d1b0cb0
ASoC: codecs: do not store status in state containe
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Many SoundWire CODEC drivers store the device status in a member
variable in the driver data but never reference this, and in any case
the SoundWire core stores this information for drivers so it would be
redundant even if used.
2023-05-19 02:11:12 +09:00
AngeloGioacchino Del Regno
cbbc0ec6de
ASoC: mediatek: mt8192-mt6359: Remove " Jack" from Headphone pin name
Function jack_kctl_name_gen() will remove the redundant " Jack" from
the name, if present, and then it will add it back, so that all of
the controls are named "(pin-name) Jack".

Remove " Jack" from the Headphone pin name to spare some CPU cycles.

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com
Link: https://lore.kernel.org/r/20230517151516.343037-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:26:30 +09:00
Krzysztof Kozlowski
b932f21f66
ASoC: codecs: rt722-sdca: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-13-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:25 +09:00
Krzysztof Kozlowski
0315dac540
ASoC: codecs: rt715: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-12-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:24 +09:00
Krzysztof Kozlowski
cda72c89d0
ASoC: codecs: rt715-sdca: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:23 +09:00
Krzysztof Kozlowski
5cd02f96f4
ASoC: codecs: rt712-sdca: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:22 +09:00
Krzysztof Kozlowski
d7a79616fc
ASoC: codecs: rt712-sdca-dmic: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:22 +09:00
Krzysztof Kozlowski
22e15c18b4
ASoC: codecs: rt711: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:21 +09:00
Krzysztof Kozlowski
8322947e92
ASoC: codecs: rt711-sdca: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:20 +09:00
Krzysztof Kozlowski
9564c9f691
ASoC: codecs: rt700: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:19 +09:00
Krzysztof Kozlowski
758665b15a
ASoC: codecs: rt5682: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:18 +09:00
Krzysztof Kozlowski
28eb1e4224
ASoC: codecs: rt1318: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:18 +09:00
Krzysztof Kozlowski
70207b95b2
ASoC: codecs: rt1316: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:17 +09:00
Krzysztof Kozlowski
cc3ff544a2
ASoC: codecs: rt1308: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:16 +09:00
David Lin
bc8c537bd6
ASoC: dt-bindings: nau8810: Convert to dtschema
Convert the NAU8810 audio CODEC bindings to DT schema.

Signed-off-by: David Lin <CTLIN0@nuvoton.com
Link: https://lore.kernel.org/r/20230516054447.1081404-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-17 10:37:44 +09:00
Min-Hua Chen
35f8a9d87c
ASoC: tegra: tegra210_adx: fix snd_pcm_format_t type
use snd_pcm_format_t instead of unsigned int to fix
the following sparse warnings:

sound/soc/tegra/tegra210_adx.c:125:14: sparse: warning: restricted snd_pcm_format_t degrades to integer
sound/soc/tegra/tegra210_adx.c:128:14: sparse: warning: restricted snd_pcm_format_t degrades to integer
sound/soc/tegra/tegra210_adx.c:131:14: sparse: warning: restricted snd_pcm_format_t degrades to integer

Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com
Link: https://lore.kernel.org/r/20230516223700.185569-1-minhuadotchen@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-17 10:37:43 +09:00
David Lin
268777caf0
ASoC: dt-bindings: nau8315: Convert to dtschema
Convert the NAU8315 audio CODEC bindings to DT schema.

Signed-off-by: David Lin <CTLIN0@nuvoton.com
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Link: https://lore.kernel.org/r/20230516054944.1081808-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-17 10:37:43 +09:00
Paweł Anikiel
6f2c1e7c25
ASoC: dt-bindings: Add Google Chameleon v3 i2s device
Add binding for google,chv3-i2s device.

Signed-off-by: Paweł Anikiel <pan@semihalf.com
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Link: https://lore.kernel.org/r/20230508113037.137627-4-pan@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-17 10:37:09 +09:00
Paweł Anikiel
580bac2a2c
ASoC: dt-bindings: Add Google Chameleon v3 audio codec
Add binding for google,chv3-codec device.

Signed-off-by: Paweł Anikiel <pan@semihalf.com
Link: https://lore.kernel.org/r/20230508113037.137627-5-pan@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-17 10:37:09 +09:00
Paweł Anikiel
61ed303496
ASoC: Add Google Chameleon v3 codec driver
Add driver for the codec IP present on Google Chameleon v3

Signed-off-by: Paweł Anikiel <pan@semihalf.com
Link: https://lore.kernel.org/r/20230508113037.137627-3-pan@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-17 10:37:08 +09:00
Paweł Anikiel
702648721d
ASoC: Add Google Chameleon v3 i2s driver
Add driver for the i2s IP present on Google Chameleon v3

Signed-off-by: Paweł Anikiel <pan@semihalf.com
Link: https://lore.kernel.org/r/20230508113037.137627-2-pan@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-17 10:37:07 +09:00
David Lin
518a1742f4
ASoC: dt-bindings: nau8824: Convert to dtschema
Convert the NAU8824 audio CODEC bindings to DT schema.

Signed-off-by: David Lin <CTLIN0@nuvoton.com
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Link: https://lore.kernel.org/r/20230515065557.614125-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-16 10:15:13 +09:00
Marek Vasut
20ef7f2139
ASoC: dt-bindings: ssm2518: Convert to dtschema
Convert the ADI SSM2518 audio CODEC bindings to DT schema.

Signed-off-by: Marek Vasut <marex@denx.de
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Link: https://lore.kernel.org/r/20230514225243.777504-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-16 10:15:12 +09:00
Mark Brown
fc1d62b358
ASoC: SOF: ipc4-topology: Improve the audio format
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Improve the logic to account for the current restrictions in topology while
making it extensible for future topology modifications.

The current topology definitions assume that input/output formats come in pairs.
For example even if there's only 1 output format for a module, we add 3 output
formats to match that of the input format count with the same parameters.
This is unnecessary but we have to deal with it until the topologies are
modified. Additionally, choosing the input/output audio format should
depend only on the pipeline params or the runtime FE hw_params depending
on where the module is in the pipeline.

This series modifies the logic for selection based on this and removes
unnecessary dependencies between the input and output formats.
2023-05-16 00:30:14 +09:00
Mark Brown
25428a9da7
ASoC: mediatek: mt8188: revise AFE driver
Merge series from Trevor Wu <trevor.wu@mediatek.com>:

The series of patches consists of four major changes.
First, remove redundant supply for ADDA DAI dirver. Second, revise ETDM
control including APLL dynamic switch via DAPM, so APLL can be enabled
when it is really required. Third, update AFE probe function. Bus
protection change was dropped at the previous patch because the dependent
change was not accepted at that time. Finally, correct some binding errors
and add required clocks.
2023-05-16 00:30:08 +09:00
Mark Brown
fe0d5b9a4d
ASoC: Factor out control notification support
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

This series introduces and uses a helper for notifying control changes
to userspace.
2023-05-16 00:17:58 +09:00
Mark Brown
8d7c1a5775
ASoC: SOF: Intel/ipc4: Do not reset BE DAI pipeline
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Do not reset pipelines during the stop/suspend triggers in the BE DAI
ops as the BE DAI pipeline needs to be left in the PAUSED state. It should
only be reset during hw_free. This simplification is already done for
the FE pipelines and the DAI trigger only toggles the states between
PAUSED and RUNNING.
2023-05-16 00:17:51 +09:00
Mark Brown
3959cd3dcb
ASoC: SOF: Intel: hda-dai: prepare LNL support
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

The HDAudio support has not changed much since CometLake/2019: the
code was reshuffled for IPC4 support and we used hdac_hda for external
and Display Audio codec, but the hda-dai code was only used for
HDAudio codecs.

In the LunarLake architecture, all endpoints (HDaudio, SSP, DMIC,
SoundWire) are handled with the HDaudio DMA, which requires us to
revisit the definitions of HDA_LINK, and remove the mutual exclusion
between NOCODEC and HDA_LINK: we do want the ability to test SSP/DMIC
in NOCODEC mode even with an HDA DMA.

This code change exposed a number of issues, with a useless .prepare
callback, a DAI number mismatch and the need to support SoundWire
which is handled by a different component in
drivers/soundwire/intel_ace2.c.
2023-05-16 00:17:44 +09:00
Mark Brown
6f59901832
ASoC: Intel: machine driver updates
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Several updates for RPL/MTL/LNL, and one fix for SoundWire TGL device.
2023-05-16 00:17:37 +09:00
Ranjani Sridharan
225f37b578
ASoC: SOF: ipc4-pcm: reset all pipelines during FE DAI hw_free
Do not reset pipelines during the stop/suspend triggers in the BE DAI
ops as the BE DAI pipeline needs to be left in the PAUSED state. It should
only be reset during hw_free. This simplification is already done for
the FE pipelines and the DAI trigger only toggles the states between
PAUSED and RUNNING.

But because the FE DAI hw_free is invoked first and all the pipelines are
freed during this op, we need to make sure that the BE DAI pipeline also
gets reset before it is freed. So do not skip the pipelines that have the
skip_during_fe_trigger flag set when resetting pipelines.

Also, because the pipeline state changes are split between the FE and BE
DAI ops now, protect the BE DAI pipeline state changes with the
pipeline_state_mutex as well.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Link: https://lore.kernel.org/r/20230515112022.30297-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:25:37 +09:00
Ranjani Sridharan
81a5d69921
ASoC: SOF: Intel: hda-dai-ops: Split the get_hext_stream() op for IPC4
Introduce a separate op implementation for get_hext_stream() for IPC4.
This op will also be used to set the skip_during_fe_trigger flag for the
BE DAI pipeline. With this change, we can remove the flag setting in
sof_ipc4_dai_config() which will further simplify support for
DMIC/SSP/Soundwire in the LunarLake platform.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Link: https://lore.kernel.org/r/20230515112022.30297-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:25:37 +09:00
Jiapeng Chong
d904942aea
ASoC: SOF: Simplify the calculation of variables
./sound/soc/sof/pcm.c:372:27-29: WARNING !A || A && B is equivalent to !A || B.

Reported-by: Abaci Robot <abaci@linux.alibaba.com
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4938
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Link: https://lore.kernel.org/r/20230512064225.75358-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:34 +09:00
Peter Ujfalusi
7a975e9b3c
ASoC: SOF: ipc4-topology: Use set_get_data() to send LARGE_CONFIG message
Instead of open coding the sending of sink format of the copier with
LARGE_CONFIG_SET message, use the proper function to do so.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Link: https://lore.kernel.org/r/20230512105642.23437-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:33 +09:00
Pierre-Louis Bossart
fdecd4aaf8
ASoC: SOF: Intel: remove mutual exclusion between NOCODEC and HDA_LINK
The nocodec mode served two purposes so far
a) generate a test driver for DMIC/SSP without any codec connected
b) make sure the use of snd_hdac_ libraries was contained

b) is no longer an option for LunarLake, the HDaudio DMA is used for
DMIC/SSP and the HDA_LINK option needs to be enabled.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:04 +09:00
Pierre-Louis Bossart
746a78c286
ASoC: SOF: Intel: hda-dai: use HDA_LINK instead of HDA_AUDIO_CODEC
For LunarLake support, we will have to use HDAudio DMA-based DAIs even
for SSP/DMIC/SoundWire. That's completely different to the
HDA_AUDIO_CODEC, the DAI ops deal with DMA configuration and that can
happen in the absence of any HDAudio codec.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:03 +09:00
Pierre-Louis Bossart
b7b71b8cbd
ASoC: SOF: Intel: hda-dai: mark functions as __maybe_unused
hda_dai_hw_params, hda_dai_trigger(), hda_dai_hw_free are currently
only used for HDaudio codec support, but will be reused for
SSP/DMIC/SoundWire in the LunarLake/ACE2.x case. To avoid 'defined but
not used' errors or added complexity in Kconfig, mark all these
functions as __maybe_used.

When SSP/DMIC/SoundWire are added, some of these changes may be
reverted. For now this avoids compilation warnings.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:02 +09:00
Pierre-Louis Bossart
caf7ad845e
ASoC: SOF: Intel: hda-dai: move hda_dai_prepare() code
Before we change the Kconfig support, move code around. No
functionality change with this commit in isolation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:01 +09:00
Pierre-Louis Bossart
2dddff71e9
ASoC: SOF: Intel: Kconfig: move selection of PROBE_WORK_QUEUE
The probe workqueue is only needed if we have a Display Audio codec.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:00 +09:00
Pierre-Louis Bossart
fb0bdfe2a0
ASoC: SOF: Intel: clarify initialization when HDA_AUDIO_CODEC is not used
For LunarLake support, we need to enable HDA_LINK but we also want the
ability to remove HDaudio codec support, e.g. for 'nocodec'
tests. This requires a small change in the bus initialization without
any codec-specific callbacks provided.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:14:00 +09:00
Pierre-Louis Bossart
45f3c2f83a
ASoC: SOF: Intel: fix DAI number mismatch
The number of DAIs was based on a Kconfig option and the declaration
on another. Fix before changing the dependencies.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:13:59 +09:00
Pierre-Louis Bossart
de8e2d5d80
ASoC: SOF: Intel: hda-dai: remove use of cpu_dai->component drvdata
The existing code relies on conversions from cpu_dai to the sdev
structure pointer based on the cpu_dai component. This works fine for
HDaudio but will not work for SoundWire DAIs which are registered by a
different component. That's a problem preventing reuse of the HDaudio
DMA stream allocation for SoundWire DAIs starting with the LunarLake
platform.

This patch introduces a set of helpers to perform the conversion, and
an indirect way of retrieving the sdev pointer based on the
swidget->comp intermediate pointer.

Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:13:58 +09:00
Pierre-Louis Bossart
3886518fdb
ASoC: SOF: Intel: hda-dai: simplify .prepare callback
The code has been cleaned-up multiple times, but while adding the new
abstractions for DMIC/SSP/SoundWire it appears that we don't really
need a specific sequence for .prepare, and we can reuse what
.hw_params already does.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:13:57 +09:00
Ranjani Sridharan
5a56c5335d
ASoC: SOF: ipc4-topology: Modify input audio format selection logic
The current selection logic assumes that input and output formats always
come in pairs in topology. Handle this special case by checking if all
input formats are the same. And for the case where there are multiple
supported input audio formats, modify the selection logic to pick the
audio formats based on the reference params which is either the FE
hw_params or the pipeline params based on the type of module.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Link: https://lore.kernel.org/r/20230515103336.16132-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:12:56 +09:00
Ranjani Sridharan
f37b702cb6
ASoC: SOF: ipc4-topology: New helper to check if all output formats are the same
Add a helper function to check if all formats are identical.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Link: https://lore.kernel.org/r/20230515103336.16132-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-15 20:12:56 +09:00