Commit Graph

48315 Commits

Author SHA1 Message Date
Jerome Brunet
5ad992c71b
ASoC: meson: t9015: fix function pointer type mismatch
clang-16 warns about casting functions to incompatible types, as is done
here to call clk_disable_unprepare:

sound/soc/meson/t9015.c:274:4: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  274 |                         (void(*)(void *))clk_disable_unprepare,

The pattern of getting, enabling and setting a disable callback for a
clock can be replaced with devm_clk_get_enabled(), which also fixes
this warning.

Fixes: 33901f5b9b ("ASoC: meson: add t9015 internal DAC driver")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://msgid.link/r/20240213215807.3326688-3-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-14 00:43:31 +00:00
Jerome Brunet
98ac85a00f
ASoC: meson: aiu: fix function pointer type mismatch
clang-16 warns about casting functions to incompatible types, as is done
here to call clk_disable_unprepare:

sound/soc/meson/aiu.c:243:12: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  243 |                                        (void(*)(void *))clk_disable_unprepare,

The pattern of getting, enabling and setting a disable callback for a
clock can be replaced with devm_clk_get_enabled(), which also fixes
this warning.

Fixes: 6ae9ca9ce9 ("ASoC: meson: aiu: add i2s and spdif support")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://msgid.link/r/20240213215807.3326688-2-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-14 00:43:30 +00:00
Bard Liao
e49676a5fc
ASoC: SOF: ipc4-topology: set config_length based on device_count
Set ipc4_copier->data.gtw_cfg.config_length dynamically based on
blob->alh_cfg.device_count to align with the other OS.

Signed-off-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://msgid.link/r/20240213123007.29956-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-13 14:23:00 +00:00
Peter Ujfalusi
b30289e7fa
ASoC: SOF: Fix runtime pm usage counter balance after fw exception
If the retain context is enabled we will unconditionally increment the
device's pm use count on each exception and when the drivers are unloaded
we do not correct this (as we don't know how many times we 'prevented
d3 entry').
Introduce a flag to make sure that we do not increment the use count more
than once and on module unload decrement the use count if needed to
balance it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240213114729.7055-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-13 14:22:57 +00:00
Yinchuan Guo
00933c4993
ASoC: codecs: fix TYPO 'reguest' to 'request' in error log
This patch corrects a common misspelling of "request" as "reguest" found
in error log across multiple files within sound/soc/codecs.

Signed-off-by: Yinchuan Guo <guoych37@mail2.sysu.edu.cn>
Link: https://msgid.link/r/20240212144247.43744-1-guoych37@mail2.sysu.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-12 16:34:22 +00:00
Daniel Baluta
2b9cdef136
ASoC: SOF: imx: Add devicetree support to select topologies
We describe tplg_file_name and drv_name using snd_sof_of_mach
array and select correct machine description based on dts compatible
string.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://msgid.link/r/20240212125258.420265-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-12 13:42:22 +00:00
Cezary Rojewski
f7fc624be3
ASoC: Intel: avs: Expose FW version with sysfs
Add functionality to read version of loaded FW from sysfs.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240209085256.121261-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-09 14:32:51 +00:00
Gergo Koteles
4089d82e67
ASoC: tas2781: remove unused acpi_subysystem_id
The acpi_subysystem_id is only written and freed, not read, so
unnecessary.

Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/454639336be28d2b50343e9c8366a56b0975e31d.1707456753.git.soyer@irl.hu
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-09 14:32:51 +00:00
Bard Liao
6b4c7d4d82
ASoC: Intel: sof_sdw: starts non sdw BE id with the highest sdw BE id
The soundwire links do not have their IDs as consecutive numbers, thus
the last link might have lower be_id than the previous one and this
leads to id collision with non SDW links.

For example,
create dai link SDW0-Playback-SimpleJack, id 0
create dai link SDW0-Capture-SmartMic, id 4
create dai link SDW0-Capture-SimpleJack, id 1
create dai link SDW2-Playback-SmartAmp, id 2
create dai link SDW2-Capture-SmartAmp, id 3
create dai link iDisp1, id 4
create dai link iDisp2, id 5
create dai link iDisp3, id 6

Reviewed-by: Chao Song <chao.song@linux.intel.com>
Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-25-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:26 +00:00
Chao Song
7fa43af5b4
ASoC: Intel: soc-acpi-intel-lnl-match: Add rt722 support
This patch adds match table for rt722 multiple
function codec on link 0.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-24-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:25 +00:00
Chao Song
0bbb0136b4
ASoC: Intel: soc-acpi: add RT712 support for LNL
This patch adds RT712 support for LNL.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-23-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:23 +00:00
Charles Keepax
36fe7a495e
ASoC: Intel: sof_sdw: Remove unused function prototypes
Recent commits remove a lot of init functions remove their function
prototypes as well.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:22 +00:00
Charles Keepax
c1469c3a8a
ASoC: Intel: ssp-common: Add stub for sof_ssp_get_codec_name
As this function is now used in sof_board_helpers it requires a build
stub for the case SSP_COMMON is not built in.

Fixes: ba0c7c3287 ("ASoC: Intel: board_helpers: support amp link initialization")
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-21-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:21 +00:00
mosomate
c13e03126a
ASoC: Intel: common: DMI remap for rebranded Intel NUC M15 (LAPRC710) laptops
Added DMI quirk to handle the rebranded variants of Intel NUC M15
(LAPRC710) laptops. The DMI matching is based on motherboard
attributes.

Link: https://github.com/thesofproject/linux/issues/4218
Signed-off-by: Máté Mosonyi <mosomate@gmail.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:19 +00:00
Bard Liao
579d6596eb
ASoC: Intel: sof_sdw: remove .init callbacks
Some codec .init callbacks are empty after removing dai_links->init =
xxx_rtd_init;. Remove those callbacks.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:18 +00:00
Bard Liao
8266c73126
ASoC: Intel: sof_sdw: add common sdw dai link init
Currently, we set sdw dai link .init callback in the codec_info_list's
dais.init function. This works fine if all codecs in the dai link are
the same. However, we need to do all the .init stuff for all different
codecs in the dai link if not all codecs in the dai link are the same.
Use a common dai link .init callback to call the new rtd_init callback
in sof_sdw_dai_info{} to do rtd_init for each dai.
Some codec init callback will become empty after this change. They will
be removed in the follow up patch.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:17 +00:00
Bard Liao
7bc6ceba7d
ASoC: Intel: sof_sdw_rt5682: use helper to get codec dai by name
Use helper to get codec dai by name.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:15 +00:00
Bard Liao
5e052fba62
ASoC: Intel: sof_sdw_cs42l42: use helper to get codec dai by name
Use helper to get codec dai by name.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:14 +00:00
Bard Liao
3e522c9852
ASoC: Intel: sof_sdw_rt700: use helper to get codec dai by name
Use helper to get codec dai by name.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:13 +00:00
Bard Liao
c44f69bbcc
ASoC: Intel: sof_sdw_rt712_sdca: use helper to get codec dai by name
Use helper to get codec dai by name.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:12 +00:00
Bard Liao
91a959d891
ASoC: Intel: sof_sdw_rt711: use helper to get codec dai by name
Use helper to get codec dai by name.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:11 +00:00
Bard Liao
49f679a175
ASoC: Intel: sof_sdw_rt_sdca_jack_common: use helper to get codec dai by name
Use helper to get codec dai by name.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:10 +00:00
Bard Liao
4ca5ba58f1
ASoC: Intel: add get_codec_dai_by_name helper function
Currently, we assume the codecs in a dai link are all the same.
So that we get codec dai with snd_soc_rtd_to_codec(rtd, 0) in dai_links
->init callback. However, a link can include different codecs.
For example, a 4 speakers link can consist of rt712 and rt1316.
Therefore, we need to select the codec dai by name in the dai link.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:09 +00:00
Bard Liao
9f3763b362
ASoC: Intel: sof_sdw: use single rtd_init for rt_amps
2 amps can be in the same or different dai links. To handle this, the
existing code implements different spk_init functions to add dapm routes
for different amps. However, sof_sdw.c doesn't support non-aggregated
amp any more since it used pre-defined BE id.
With that assumption, combine the spk_init functions together.
This is a preparation of putting different types amps in a single dai
link.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208165545.93811-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:08 +00:00
Brent Lu
1ad55ee7b5
ASoC: Intel: sof_cs42l42: use common module for DAI link generation
Use intel_board module to generate DAI link array and update num_links
field in snd_soc_card structure.

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/20240208165545.93811-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:07 +00:00
Brent Lu
fff04329ac
ASoC: Intel: board_helpers: support DAI link order customization
Add an new field link_order_overwrite to sof_card_private structure to
support machine drivers which DAI link order is different from the
order used in sof_rt5682 (i.e. GLK boards or no-codec boards).

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/20240208165545.93811-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:06 +00:00
Brent Lu
7a2a8730d5
ASoC: Intel: sof_rt5682: dmi quirk cleanup for mtl boards
Some dmi quirks are duplicated since codec and amplifier type are
removed from board quirk. Remove redundant quirks.

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/20240208165545.93811-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:05 +00:00
Brent Lu
922edacfad
ASoC: Intel: sof_rt5682: board id cleanup for mtl boards
Many board configs are duplicated since codec and amplifier type are
removed from board quirk. Introduce "mtl_rt5682_def" board to reduce
the number of mtl board configs.

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/20240208165545.93811-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:04 +00:00
Brent Lu
19ec6b2ef8
ASoC: Intel: sof_rt5682: board id cleanup for rpl boards
Many board configs are duplicated since codec and amplifier type are
removed from board quirk. Introduce "rpl_rt5682_def" board to reduce
the number of rpl board configs.

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/20240208165545.93811-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:03 +00:00
Brent Lu
41333c351d
ASoC: Intel: sof_rt5682: board id cleanup for adl boards
Many board configs are duplicated since codec and amplifier type are
removed from board quirk. Introduce "adl_rt5682_def" board to reduce
the number of adl board configs.

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/20240208165545.93811-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:01 +00:00
Brent Lu
dbda8647fb
ASoC: Intel: sof_rt5682: board id cleanup for tgl boards
Many board configs are duplicated since codec and amplifier type are
removed from board quirk. Introduce "tgl_rt5682_def" board to reduce
the number of tgl board configs.

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/20240208165545.93811-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:23:00 +00:00
Brent Lu
9be229ffc7
ASoC: Intel: sof_rt5682: board id cleanup for jsl boards
Many board configs are duplicated since codec and amplifier type are
removed from board quirk. Introduce "jsl_rt5682_def" board to reduce
the number of jsl board configs.

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/20240208165545.93811-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 21:22:59 +00:00
Mark Brown
15d97222c8
ASoC: Intel: avs: Add support for sending initial
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

In some cases it may be desirable to provide default initial
configuration for FW module using payload. To facilitate such solution
extend topology to contain initial config information, parse it and then
send data to FW if present.

Amadeusz Sławiński (3):
  ASoC: Intel: avs: UAPI: Add tokens for initial config feature
  ASoC: Intel: avs: Add topology parsing support for initial config
  ASoC: Intel: avs: Send initial config to module if present

 include/uapi/sound/intel/avs/tokens.h |   9 ++
 sound/soc/intel/avs/path.c            |  33 ++++++
 sound/soc/intel/avs/topology.c        | 164 +++++++++++++++++++++++++-
 sound/soc/intel/avs/topology.h        |  13 ++
 4 files changed, 217 insertions(+), 2 deletions(-)

--
2.34.1
2024-02-08 16:56:56 +00:00
Krzysztof Kozlowski
fd38b4e410
ASoC: codecs: constify static sdw_slave_ops struct
The struct sdw_slave_ops is not modified and sdw_driver takes pointer to
const, so make it a const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240208105011.128294-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 11:54:13 +00:00
Amadeusz Sławiński
8a49ef789b
ASoC: Intel: avs: Send initial config to module if present
If there are initial configs to send to module on init do send them.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240208102400.2497791-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 11:53:44 +00:00
Amadeusz Sławiński
1b4217ebbb
ASoC: Intel: avs: Add topology parsing support for initial config
Add topology parsing for initial config.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240208102400.2497791-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 11:53:43 +00:00
Masahiro Yamada
8f501d29c7
ASoC: pxa: remove duplicated CONFIG_SND_PXA2XX_AC97 entry
'config SND_PXA2XX_AC97' is already present in sound/arm/Kconfig with
a prompt.

Commit 734c2d4bb7 ("[ALSA] ASoC pxa2xx build support") redundantly
added the second one to sound/soc/pxa/Kconfig.

Remove it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20240204091424.38306-1-masahiroy@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05 14:32:29 +00:00
Arnd Bergmann
b4956275bf
ASoC: fix SND_SOC_WCD939X dependencies
SND_SOC_WCD939X has an optional dependency on TYPEC, so the newly added
SND_SOC_WCD939X_SDW option that selects it needs the same dependency, otherwise
it can fail randconfig builds like:

WARNING: unmet direct dependencies detected for SND_SOC_WCD939X
  Depends on [m]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SND_SOC_WCD939X_SDW [=y] && (SOUNDWIRE [=y] || !SOUNDWIRE [=y]) && (TYPEC [=m]
 || !TYPEC [=m])
  Selected by [y]:
  - SND_SOC_WCD939X_SDW [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=y]
arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_soc_codec_remove':
wcd939x.c:(.text+0x1950): undefined reference to `wcd_clsh_ctrl_free'
arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_codec_ear_dac_event':
wcd939x.c:(.text+0x35d8): undefined reference to `wcd_clsh_ctrl_set_state'
arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_codec_enable_hphr_pa':
wcd939x.c:(.text+0x39b0): undefined reference to `wcd_clsh_ctrl_set_state'
arm-linux-gnueabi-ld: wcd939x.c:(.text+0x39dc): undefined reference to `wcd_clsh_set_hph_mode'
arm-linux-gnueabi-ld: wcd939x.c:(.text+0x3bc0): undefined reference to `wcd_clsh_ctrl_set_state'

Fixes: be2af391ce ("ASoC: codecs: Add WCD939x Soundwire devices driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240204212207.3158914-2-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05 14:32:28 +00:00
Arnd Bergmann
69f8336e29
ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies
The snd-amd-sdw-acpi.ko module is under CONFIG_SND_SOC_AMD_ACP_COMMON but
selected from SoF, which causes build failures in some randconfig builds
that enable SOF but not ACP:

WARNING: unmet direct dependencies detected for SND_AMD_SOUNDWIRE_ACPI
  Depends on [n]: SOUND [=m] && SND [=m] && SND_SOC [=m] && SND_SOC_AMD_ACP_COMMON [=n] && ACPI [=y]
  Selected by [m]:
  - SND_SOC_SOF_AMD_SOUNDWIRE_LINK_BASELINE [=m] && SOUND [=m] && SND [=m] && SND_SOC [=m] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_AMD_TOPLEVEL [=m] && ACPI [=y]
ERROR: modpost: "amd_sdw_scan_controller" [sound/soc/sof/amd/snd-sof-amd-acp.ko] undefined!

Change the Makefile and Kconfig to allow it to get built regardless
of CONFIG_SND_SOC_AMD_ACP_COMMON.

Fixes: d948218424 ("ASoC: SOF: amd: add code for invoking soundwire manager helper functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240204212207.3158914-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05 14:32:28 +00:00
Charles Keepax
3ef9f445dd
ASoC: cs42l43: Shut down jack detection on component remove
Disable the jack detection and sync in any currently running work when
the component is removed.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240202140619.1068560-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05 14:32:26 +00:00
Charles Keepax
7fa1a01ba6
ASoC: cs42l43: Sync the hp ilimit works when removing the component
Synchronise the headphone ilimit work functions when removing the
component. These can only trigger whilst the headphone is enabled which
shouldn't be possible once the component is removed but the works rely
on the stashed component pointer so they should be shut down before the
code moves on from component remove.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240202140619.1068560-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05 14:32:25 +00:00
Charles Keepax
cd2a238861
ASoC: cs42l43: Add clear of stashed pointer on component remove
If the component is removed the stashed component pointer in the
CODECs private struct should also be cleared to prevent use of a stale
pointer.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240202140619.1068560-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05 14:32:24 +00:00
Mark Brown
b25c4e5684
soundwire/SOF: add SoundWire Interface support for
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

This patch series is to redesign existing platform device creation logic
for SoundWire managers and Implement generic functions for SoundWire
manager probe, start and exit sequence which are common for both Legacy
(NO DSP enabled) and SOF stack, and add SoundWire Interface support for
AMD SOF stack (ACP 6.3 based platform).

The patch series was reviewed in
https://github.com/thesofproject/linux/pull/4699
2024-01-31 13:17:06 +00:00
Vijendar Mukunda
260b08aed4
ASoC: SOF: amd: refactor acp driver pm ops
Refactor acp driver pm ops to support SoundWire interface.

When SoundWire configuration is enabled, In case of ClockStopMode,
DSP soft reset should be applied and for rest of the scenarios
acp init/deinit sequence should be invoked.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240129055147.1493853-14-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-30 16:06:43 +00:00
Vijendar Mukunda
2188c2cfaa
ASoC: SOF: amd: select soundwire dependency flag for acp6.3 based platform
Select SoundWire dependency flag for acp6.3 based platform for SoundWire
configuration.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240129055147.1493853-13-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-30 16:06:42 +00:00
Vijendar Mukunda
8af5c7e9cc
ASoC: SOF: amd: update descriptor fields for acp6.3 based platform
Update acp descriptor fields for acp6.3 version based platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240129055147.1493853-12-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-30 16:06:41 +00:00
Vijendar Mukunda
5f97c59a77
ASoC: SOF: amd: add machine select logic for soundwire based platforms
Add machine select logic for soundwire endpoints for AMD platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240129055147.1493853-11-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-30 16:06:40 +00:00
Vijendar Mukunda
14d89e55de
ASoC: SOF: amd: Add Soundwire DAI configuration support for AMD platforms
Add support for configuring AMD Soundwire DAI from topology.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240129055147.1493853-10-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-30 16:06:39 +00:00
Vijendar Mukunda
96eb818510
ASoC: SOF: amd: add interrupt handling for SoundWire manager devices
Add support for interrupt handling for soundwire manager platform
devices.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240129055147.1493853-9-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-30 16:06:38 +00:00
Vijendar Mukunda
d948218424
ASoC: SOF: amd: add code for invoking soundwire manager helper functions
Add code for invoking Soundwire manager helper functions
when SoundWire configuration is selected.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240129055147.1493853-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-30 16:06:37 +00:00