platform/kernel/linux-starfive.git
14 months agoASoC: do not include pm_runtime.h if not used
Claudiu Beznea [Wed, 17 May 2023 09:49:02 +0000 (12:49 +0300)]
ASoC: do not include pm_runtime.h if not used

Do not include pm_runtime.h header in files where APIs exported by
pm_runtime.h are not used.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> # for omap-mcbsp-st.c
Link: https://lore.kernel.org/r/20230517094903.2895238-2-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: topology: Clean up error messages handling
Mark Brown [Mon, 22 May 2023 15:32:40 +0000 (16:32 +0100)]
ASoC: topology: Clean up error messages handling

Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

Series of patches cleaning up error messages when loading topology. In
few places instead of logging in place of failure message is logged in
caller. Additionally there are places where both caller and failing
function log error, leading to unnecessary logs. Clean all of the above
up.

14 months agoASoC: SOF: ipc4: Querry CPC value from firmware's
Mark Brown [Mon, 22 May 2023 14:48:54 +0000 (15:48 +0100)]
ASoC: SOF: ipc4: Querry CPC value from firmware's

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The MOD_INIT_INSTANCE message contains a CPC (Cycles Per Chunk/processing unit)
parameter.
This CPC value is used by the firmware to calculate the total cycles needed by
the enabled module instances and based on this it can decide to set the
frequency of the DSP core(s).

The manifest section of the firmware image contains a module configuration
section, where a per module table of configurations are listed with measured
CPC values as triplet of IBS/IBS/CPC (Input/Output buffer size - corresponding
to the selected audio format).

In case the CPC value is 0 (missing from the manifest or the
configuration cannot be matched) the firmware will force the DSP cores
to maximum speed to avoid audio glitches due to starvation.  In these
cases the kernel will print a warning message to let the SOF developers
know about the gap and provide information to correct it with a firmware
update.

14 months agoASoC: rt5682s: Use the devm_clk_get_optional() helper
Christophe JAILLET [Sat, 20 May 2023 14:58:24 +0000 (16:58 +0200)]
ASoC: rt5682s: Use the devm_clk_get_optional() helper

Use devm_clk_get_optional() instead of hand writing it.
This saves some LoC and improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f538c24ad7b1926478347a03b5b7f0432e195e3b.1684594691.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: cs53l30: Use the devm_clk_get_optional() helper
Christophe JAILLET [Sat, 20 May 2023 14:54:06 +0000 (16:54 +0200)]
ASoC: cs53l30: Use the devm_clk_get_optional() helper

Use devm_clk_get_optional() instead of hand writing it.
This saves some LoC and improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/3219effee5c7f190530bdb1ef8ec35cb142e3611.1684594433.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: stm32: sai: Use the devm_clk_get_optional() helper
Christophe JAILLET [Sat, 20 May 2023 15:00:50 +0000 (17:00 +0200)]
ASoC: stm32: sai: Use the devm_clk_get_optional() helper

Use devm_clk_get_optional() instead of hand writing it.
This saves some LoC and improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f7987f18dadf77bfa09969fd4c82d5a0f4e4e3b7.1684594838.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: rt5659: Use the devm_clk_get_optional() helper
Christophe JAILLET [Sat, 20 May 2023 14:56:00 +0000 (16:56 +0200)]
ASoC: rt5659: Use the devm_clk_get_optional() helper

Use devm_clk_get_optional() instead of hand writing it.
This saves some LoC and improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5b44b2fddd8973e949e4ae2132971b147cfd1ec1.1684594544.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: cs42l51: Use the devm_clk_get_optional() helper
Christophe JAILLET [Sat, 20 May 2023 14:50:54 +0000 (16:50 +0200)]
ASoC: cs42l51: Use the devm_clk_get_optional() helper

Use devm_clk_get_optional() instead of hand writing it.
This saves some LoC and improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/3debf3bb7ea504ee9ca2d8eb0f948a426681cbdd.1684594240.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: atmel: sam9g20_wm8731: Remove the unneeded include <linux/i2c.h>
Christophe JAILLET [Sat, 20 May 2023 10:21:58 +0000 (12:21 +0200)]
ASoC: atmel: sam9g20_wm8731: Remove the unneeded include <linux/i2c.h>

This driver does not use i2c, so there is no point in including
<linux/i2c.h>

Remove it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/9b39a59f5829d200d7d1fac4e993dbf8ce05836d.1684578051.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: adau1761: Use the devm_clk_get_optional() helper
Christophe JAILLET [Sat, 20 May 2023 14:48:19 +0000 (16:48 +0200)]
ASoC: adau1761: Use the devm_clk_get_optional() helper

Use devm_clk_get_optional() instead of hand writing it.
This saves some LoC and improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/ab0fe7e7ecf965df84b9516ba65428af9b3805c1.1684594081.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: topology: Remove redundant log
Amadeusz Sławiński [Fri, 19 May 2023 19:56:11 +0000 (21:56 +0200)]
ASoC: topology: Remove redundant log

soc_tplg_valid_header() logs all the failures in detail already.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230519195611.4068853-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: topology: Remove redundant log
Amadeusz Sławiński [Fri, 19 May 2023 19:56:10 +0000 (21:56 +0200)]
ASoC: topology: Remove redundant log

soc_tplg_dapm_complete() logs all the failures in detail already.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230519195611.4068853-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: topology: Do not split message string on multiple lines
Amadeusz Sławiński [Fri, 19 May 2023 19:56:09 +0000 (21:56 +0200)]
ASoC: topology: Do not split message string on multiple lines

Kernel coding guidelines recommend to not split string unnecessarily.
While at it adapt the other print present in the function to 100
characters line limit.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230519195611.4068853-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: topology: Remove redundant logs
Amadeusz Sławiński [Fri, 19 May 2023 19:56:08 +0000 (21:56 +0200)]
ASoC: topology: Remove redundant logs

soc_tplg_add_kcontrol() logs all the failures in detail already.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230519195611.4068853-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: topology: Log control load errors in soc_tplg_control_load()
Amadeusz Sławiński [Fri, 19 May 2023 19:56:07 +0000 (21:56 +0200)]
ASoC: topology: Log control load errors in soc_tplg_control_load()

Simplify code by logging any errors in function that does the actual
work instead of doing so in its callers.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230519195611.4068853-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: SOF: ipc4-loader/topology: Query the CPC value from manifest
Peter Ujfalusi [Mon, 22 May 2023 10:13:13 +0000 (13:13 +0300)]
ASoC: SOF: ipc4-loader/topology: Query the CPC value from manifest

The manifest's firmware module configuration section contains the measured
CPC values along with a matching IBS/OBS values.

The CPC can be looked up by looking for a matching IBS/OBS entry.
In case of multiple matches we will use the highest CPC value.

If there is no mod_cfg or no CPC value (all 0) or no match was found then
print warning message and use 0 as CPC value.

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/20230522101313.12519-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: SOF: ipc4-topology: Do not use the CPC value from topology
Peter Ujfalusi [Mon, 22 May 2023 10:13:12 +0000 (13:13 +0300)]
ASoC: SOF: ipc4-topology: Do not use the CPC value from topology

Stop parsing the CPC value from topology to module_base_cfg.
The CPC value is only set for few modules in topology which makes the CPC
handling inconsistent.

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/20230522101313.12519-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: SOF: ipc4-topology: Rename sof_ipc4_update_pipeline_mem_usage() to be generic
Peter Ujfalusi [Mon, 22 May 2023 10:13:11 +0000 (13:13 +0300)]
ASoC: SOF: ipc4-topology: Rename sof_ipc4_update_pipeline_mem_usage() to be generic

Rename sof_ipc4_update_pipeline_mem_usage() to
sof_ipc4_update_resource_usage() in order to be re-usable for generic
resource storage, calculation of a module, like CPC adjustment.

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/20230522101313.12519-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: SOF: ipc4-loader: Save a pointer to fm_config in sof_ipc4_fw_module
Peter Ujfalusi [Mon, 22 May 2023 10:13:10 +0000 (13:13 +0300)]
ASoC: SOF: ipc4-loader: Save a pointer to fm_config in sof_ipc4_fw_module

Save a pointer to the firmware module configuration area in
sof_ipc4_fw_module struct for later use.

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/20230522101313.12519-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: SOF: ipc4-loader: Drop unused bss_size from struct sof_ipc4_fw_module
Peter Ujfalusi [Mon, 22 May 2023 10:13:09 +0000 (13:13 +0300)]
ASoC: SOF: ipc4-loader: Drop unused bss_size from struct sof_ipc4_fw_module

The bss_size is only set, but not used by the code, remove it.

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/20230522101313.12519-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: cs35l56: Bugfixes and efficiency improvement
Mark Brown [Fri, 19 May 2023 03:32:36 +0000 (12:32 +0900)]
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.

14 months agoMerge tag 'v6.4-rc2' into asoc-6.5 to get fixes for CI
Mark Brown [Fri, 19 May 2023 03:32:04 +0000 (12:32 +0900)]
Merge tag 'v6.4-rc2' into asoc-6.5 to get fixes for CI

Linux 6.4-rc2

14 months agoASoC: cs35l56: In secure mode skip SHUTDOWN and RESET around fw download
Simon Trimmer [Thu, 18 May 2023 15:02:50 +0000 (16:02 +0100)]
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:
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: cs35l56: sdw_write_no_pm() should be performed under a pm_runtime request
Simon Trimmer [Thu, 18 May 2023 15:02:49 +0000 (16:02 +0100)]
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:
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoASoC: cs35l56: Move DSP part string generation so that it is done only once
Simon Trimmer [Thu, 18 May 2023 15:02:48 +0000 (16:02 +0100)]
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:
Signed-off-by: Mark Brown <broonie@kernel.org>
14 months agoAdd Chameleon v3 ASoC audio
Mark Brown [Thu, 18 May 2023 22:27:08 +0000 (07:27 +0900)]
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.

14 months agoASoC: codecs: do not store status in state containe
Mark Brown [Thu, 18 May 2023 17:11:12 +0000 (02:11 +0900)]
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.

14 months agoASoC: mediatek: mt8192-mt6359: Remove " Jack" from Headphone pin name
AngeloGioacchino Del Regno [Wed, 17 May 2023 15:15:16 +0000 (17:15 +0200)]
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
14 months agoASoC: codecs: rt722-sdca: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:53 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt715: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:52 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt715-sdca: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:51 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt712-sdca: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:50 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt712-sdca-dmic: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:49 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt711: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:48 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt711-sdca: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:47 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt700: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:46 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt5682: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:45 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt1318: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:44 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt1316: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:43 +0000 (09:27 +0200)]
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
14 months agoASoC: codecs: rt1308: do not store status in state container
Krzysztof Kozlowski [Thu, 18 May 2023 07:27:42 +0000 (09:27 +0200)]
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
14 months agoASoC: dt-bindings: nau8810: Convert to dtschema
David Lin [Tue, 16 May 2023 05:44:48 +0000 (13:44 +0800)]
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
14 months agoASoC: tegra: tegra210_adx: fix snd_pcm_format_t type
Min-Hua Chen [Tue, 16 May 2023 22:36:59 +0000 (06:36 +0800)]
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
14 months agoASoC: dt-bindings: nau8315: Convert to dtschema
David Lin [Tue, 16 May 2023 05:49:45 +0000 (13:49 +0800)]
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
14 months agoASoC: dt-bindings: Add Google Chameleon v3 i2s device
Paweł Anikiel [Mon, 8 May 2023 11:30:33 +0000 (13:30 +0200)]
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
14 months agoASoC: dt-bindings: Add Google Chameleon v3 audio codec
Paweł Anikiel [Mon, 8 May 2023 11:30:34 +0000 (13:30 +0200)]
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
14 months agoASoC: Add Google Chameleon v3 codec driver
Paweł Anikiel [Mon, 8 May 2023 11:30:32 +0000 (13:30 +0200)]
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
14 months agoASoC: Add Google Chameleon v3 i2s driver
Paweł Anikiel [Mon, 8 May 2023 11:30:31 +0000 (13:30 +0200)]
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
14 months agoASoC: dt-bindings: nau8824: Convert to dtschema
David Lin [Mon, 15 May 2023 06:55:58 +0000 (14:55 +0800)]
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
14 months agoASoC: dt-bindings: ssm2518: Convert to dtschema
Marek Vasut [Sun, 14 May 2023 22:52:43 +0000 (00:52 +0200)]
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
14 months agoASoC: SOF: ipc4-topology: Improve the audio format
Mark Brown [Mon, 15 May 2023 15:30:14 +0000 (00:30 +0900)]
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.

14 months agoASoC: mediatek: mt8188: revise AFE driver
Mark Brown [Mon, 15 May 2023 15:30:08 +0000 (00:30 +0900)]
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.

14 months agoASoC: Factor out control notification support
Mark Brown [Mon, 15 May 2023 15:17:58 +0000 (00:17 +0900)]
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.

14 months agoASoC: SOF: Intel/ipc4: Do not reset BE DAI pipeline
Mark Brown [Mon, 15 May 2023 15:17:51 +0000 (00:17 +0900)]
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.

14 months agoASoC: SOF: Intel: hda-dai: prepare LNL support
Mark Brown [Mon, 15 May 2023 15:17:44 +0000 (00:17 +0900)]
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.

14 months agoASoC: Intel: machine driver updates
Mark Brown [Mon, 15 May 2023 15:17:37 +0000 (00:17 +0900)]
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.

14 months agoASoC: SOF: ipc4-pcm: reset all pipelines during FE DAI hw_free
Ranjani Sridharan [Mon, 15 May 2023 11:20:22 +0000 (14:20 +0300)]
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
14 months agoASoC: SOF: Intel: hda-dai-ops: Split the get_hext_stream() op for IPC4
Ranjani Sridharan [Mon, 15 May 2023 11:20:21 +0000 (14:20 +0300)]
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
14 months agoASoC: SOF: Simplify the calculation of variables
Jiapeng Chong [Fri, 12 May 2023 06:42:25 +0000 (14:42 +0800)]
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
14 months agoASoC: SOF: ipc4-topology: Use set_get_data() to send LARGE_CONFIG message
Peter Ujfalusi [Fri, 12 May 2023 10:56:42 +0000 (13:56 +0300)]
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
14 months agoASoC: SOF: Intel: remove mutual exclusion between NOCODEC and HDA_LINK
Pierre-Louis Bossart [Fri, 12 May 2023 18:17:02 +0000 (13:17 -0500)]
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
14 months agoASoC: SOF: Intel: hda-dai: use HDA_LINK instead of HDA_AUDIO_CODEC
Pierre-Louis Bossart [Fri, 12 May 2023 18:17:01 +0000 (13:17 -0500)]
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
14 months agoASoC: SOF: Intel: hda-dai: mark functions as __maybe_unused
Pierre-Louis Bossart [Fri, 12 May 2023 18:17:00 +0000 (13:17 -0500)]
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
14 months agoASoC: SOF: Intel: hda-dai: move hda_dai_prepare() code
Pierre-Louis Bossart [Fri, 12 May 2023 18:16:59 +0000 (13:16 -0500)]
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
14 months agoASoC: SOF: Intel: Kconfig: move selection of PROBE_WORK_QUEUE
Pierre-Louis Bossart [Fri, 12 May 2023 18:16:58 +0000 (13:16 -0500)]
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
14 months agoASoC: SOF: Intel: clarify initialization when HDA_AUDIO_CODEC is not used
Pierre-Louis Bossart [Fri, 12 May 2023 18:16:57 +0000 (13:16 -0500)]
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
14 months agoASoC: SOF: Intel: fix DAI number mismatch
Pierre-Louis Bossart [Fri, 12 May 2023 18:16:56 +0000 (13:16 -0500)]
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
14 months agoASoC: SOF: Intel: hda-dai: remove use of cpu_dai->component drvdata
Pierre-Louis Bossart [Fri, 12 May 2023 18:16:55 +0000 (13:16 -0500)]
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
14 months agoASoC: SOF: Intel: hda-dai: simplify .prepare callback
Pierre-Louis Bossart [Fri, 12 May 2023 18:16:54 +0000 (13:16 -0500)]
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
14 months agoASoC: SOF: ipc4-topology: Modify input audio format selection logic
Ranjani Sridharan [Mon, 15 May 2023 10:33:36 +0000 (13:33 +0300)]
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
14 months agoASoC: SOF: ipc4-topology: New helper to check if all output formats are the same
Ranjani Sridharan [Mon, 15 May 2023 10:33:35 +0000 (13:33 +0300)]
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
14 months agoASoC: SOF: ipc4-topology: Modify the output format selection logic
Ranjani Sridharan [Mon, 15 May 2023 10:33:34 +0000 (13:33 +0300)]
ASoC: SOF: ipc4-topology: Modify the output format selection logic

Modify the output format selection when there are multiple output
formats available to choose the one that matches the reference params.
The reference params depend on the type of module. In the case of
processing modules, the reference params are based on the selected input
audio format. This would be the case when a processing module does not
perform any format conversion during processing.

The only special case is the copier module. The copier module is capable
of format conversion but it is only used in the case when the output
is fixed to a single format. In the case of a module copier, when there are
multiple formats, the reference params is based on the selected input
params and the output format must match that of the selected input
format. In the case of host copier, the reference params should be
based on the input audio format for playback and the FE hw_params for
capture. In the case DAI copier, the reference params should be based on
the input audio format for capture and the FE hw_params for playback
when there is no format conversion in the pipeline from the host to the
DAI.

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-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: SOF: ipc4-topology: Add a new helper function to get the valid bits
Ranjani Sridharan [Mon, 15 May 2023 10:33:33 +0000 (13:33 +0300)]
ASoC: SOF: ipc4-topology: Add a new helper function to get the valid bits

Add a new helper function sof_ipc4_get_valid_bits() to get the valid
bits in the PCM params.

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-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: SOF: ipc4-topology: Handle output format special case
Ranjani Sridharan [Mon, 15 May 2023 10:33:32 +0000 (13:33 +0300)]
ASoC: SOF: ipc4-topology: Handle output format special case

The current topologies have input/output formats in pairs and even
though there are multiple output formats, they are all the same. Handle
this case as if there were only one format in topology. Also, add a check
for the number of output formats and reports errors where applicable.

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-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: SOF: ipc4-topology: Rename sof_ipc4_init_audio_fmt()
Ranjani Sridharan [Mon, 15 May 2023 10:33:31 +0000 (13:33 +0300)]
ASoC: SOF: ipc4-topology: Rename sof_ipc4_init_audio_fmt()

Rename it to sof_ipc4_init_input_audio_fmt() as it only does input
format selection now.

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-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: SOF: ipc4-topology: Move the call to init output format
Ranjani Sridharan [Mon, 15 May 2023 10:33:30 +0000 (13:33 +0300)]
ASoC: SOF: ipc4-topology: Move the call to init output format

In preparation for changing the logic for input/output format selection,
move the call to sof_ipc4_init_output_audio_fmt() into the individual
widget prepare ops.

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-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: SOF: ipc4-topology: Add a helper function for output format selection
Ranjani Sridharan [Mon, 15 May 2023 10:33:29 +0000 (13:33 +0300)]
ASoC: SOF: ipc4-topology: Add a helper function for output format selection

Add a helper function to select the output format.

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-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: SOF: ipc4-topology: Handle input/output audio format special case
Ranjani Sridharan [Mon, 15 May 2023 10:33:28 +0000 (13:33 +0300)]
ASoC: SOF: ipc4-topology: Handle input/output audio format special case

When there is only one input/output format specified in topology, there
is no need to search for a matching format, simply pick the available
one. This is in preparation to modify and split the selection logic for
the input and output audio formats.

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-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: sof_sdw: add quirk for LNL RVP
Peter Ujfalusi [Fri, 12 May 2023 17:33:05 +0000 (12:33 -0500)]
ASoC: Intel: sof_sdw: add quirk for LNL RVP

We should use RT711_JD2_100K for on board rt711

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512173305.65399-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: soc-acpi: add tables for LunarLake
Pierre-Louis Bossart [Fri, 12 May 2023 17:33:04 +0000 (12:33 -0500)]
ASoC: Intel: soc-acpi: add tables for LunarLake

These tables are used for 'nocodec' and SoundWire mockups+RVP tests.
The LNL RVP has a single rt711-sdca SoundWire codec.

Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512173305.65399-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: sof_sdw: add new mapping for HP Spectre x360
Pierre-Louis Bossart [Fri, 12 May 2023 17:33:03 +0000 (12:33 -0500)]
ASoC: Intel: sof_sdw: add new mapping for HP Spectre x360

A BIOS/DMI update seems to have broken some devices, let's add a new
mapping.

Link: https://github.com/thesofproject/linux/issues/4323
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Link: https://lore.kernel.org/r/20230512173305.65399-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: sof_sdw: start set codec init function with an adr index
Bard Liao [Fri, 12 May 2023 17:33:02 +0000 (12:33 -0500)]
ASoC: Intel: sof_sdw: start set codec init function with an adr index

Currently, set_codec_init_func always start with link->adr_d[0] because
we assumed all adr_d on the same link are the same devices. The
assumption is no longer valid when different devices on the same sdw link
are supported.

Fixes: c8db7b50128b ("ASoC: Intel: sof_sdw: support different devices on the same sdw link")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com
Signed-off-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/20230512173305.65399-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: soc-acpi: add support for MTL SDCA boards
Chao Song [Fri, 12 May 2023 17:33:01 +0000 (12:33 -0500)]
ASoC: Intel: soc-acpi: add support for MTL SDCA boards

The description and board layout is changed and different
from previous ones for CometLake and Tigerlake.

The new codec layout for MTL is:
  SDW0: RT711 Headphone
  SDW1: RT714 DMIC
  SDW2: RT1316 Speaker
  SDW3: RT1316 Speaker

The previous codec layout for CML and TGL is:
  SDW0: RT711 Headphone
  SDW1: RT1316 Speaker
  SDW2: RT1316 Speaker
  SDW3: RT714 DMIC

Signed-off-by: Chao Song <chao.song@linux.intel.com
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
Link: https://lore.kernel.org/r/20230512173305.65399-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: sof_sdw: add quirk for MTL RVP
Bard Liao [Fri, 12 May 2023 17:33:00 +0000 (12:33 -0500)]
ASoC: Intel: sof_sdw: add quirk for MTL RVP

We should use RT711_JD2_100K for on board rt711.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com
Signed-off-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/20230512173305.65399-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: sof_sdw: remove SOF_SDW_TGL_HDMI for MeteorLake devices
Bard Liao [Fri, 12 May 2023 17:32:59 +0000 (12:32 -0500)]
ASoC: Intel: sof_sdw: remove SOF_SDW_TGL_HDMI for MeteorLake devices

Topologies support three HDMI links on MeteorLake devices only.

Fixes: 18489174e4fb ("ASoC: intel: sof_sdw: add RT711 SDCA card for MTL platform")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com
Signed-off-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/20230512173305.65399-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Intel: Add rpl_max98373_8825 driver
Terry Cheong [Fri, 12 May 2023 17:32:58 +0000 (12:32 -0500)]
ASoC: Intel: Add rpl_max98373_8825 driver

Boards were using this in older kernels before adl and rpl ids were
split. Add this back to maintain support.

Signed-off-by: Terry Cheong <htcheong@chromium.org
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512173305.65399-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: wm_adsp: Update to use new component control notify helepr
Charles Keepax [Fri, 12 May 2023 12:28:32 +0000 (13:28 +0100)]
ASoC: wm_adsp: Update to use new component control notify helepr

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com
Link: https://lore.kernel.org/r/20230512122838.243002-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: ak4118: Update to use new component control notify helper
Charles Keepax [Fri, 12 May 2023 12:28:31 +0000 (13:28 +0100)]
ASoC: ak4118: Update to use new component control notify helper

Update the driver to use the new ASoC core control notify helper.
This also fixes a bug where the control would not be found if the
CODEC was given a name prefix.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com
Link: https://lore.kernel.org/r/20230512122838.243002-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: soc-component: Add notify control helper function
Charles Keepax [Fri, 12 May 2023 12:28:30 +0000 (13:28 +0100)]
ASoC: soc-component: Add notify control helper function

Add a function to allow ASoC drivers to easily notify an ALSA control
change. This function will automatically add any component naming
prefix into the control name.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com
Link: https://lore.kernel.org/r/20230512122838.243002-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: dt-bindings: mediatek,mt8188-afe: add audio properties
Trevor Wu [Wed, 10 May 2023 03:55:26 +0000 (11:55 +0800)]
ASoC: dt-bindings: mediatek,mt8188-afe: add audio properties

Add apll1_d4 to clocks for switching the parent of top_a1sys_hp
dynamically and add property "mediatek,infracfg" for bus protection.

Because no mt8188 upstream dts exists, the change won't break anything.
In addition, apll2_d4, apll12_div4, top_a2sys and top_aud_iec are also
included in clocks, because these clocks are possibly used in the future.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Link: https://lore.kernel.org/r/20230510035526.18137-10-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: dt-bindings: mediatek,mt8188-afe: correct clock name
Trevor Wu [Wed, 10 May 2023 03:55:25 +0000 (11:55 +0800)]
ASoC: dt-bindings: mediatek,mt8188-afe: correct clock name

The original clock names are different from the list in driver code.
Correct the mismatched binding names in the patch.

Because no mt8188 upstream dts exists, it doesn't affect the existing
dts file.

Fixes: 692d25b67e10 ("ASoC: dt-bindings: mediatek,mt8188-afe: add audio afe document")
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Link: https://lore.kernel.org/r/20230510035526.18137-9-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: mediatek: mt8188: add required clocks
Trevor Wu [Wed, 10 May 2023 03:55:24 +0000 (11:55 +0800)]
ASoC: mediatek: mt8188: add required clocks

apll2_d4, apll12_div4, top_a2sys and top_aud_iec are possibly used in
the future. To prevent from breaking binding ABI after any mt8188 dts
upstream, add these clocks to clock list in advance.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-8-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: mediatek: mt8188: add bus protection
Trevor Wu [Wed, 10 May 2023 03:55:23 +0000 (11:55 +0800)]
ASoC: mediatek: mt8188: add bus protection

Add bus protection for reset controller.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-7-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: mediatek: mt8188: combine afe component registration
Trevor Wu [Wed, 10 May 2023 03:55:22 +0000 (11:55 +0800)]
ASoC: mediatek: mt8188: combine afe component registration

There is no benefit to separate two components for AFE, so DAI driver
registration is moved to dev_snd_soc_register_component to merge these
two components.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-6-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: mediatek: mt8188: refine APLL control
Trevor Wu [Wed, 10 May 2023 03:55:21 +0000 (11:55 +0800)]
ASoC: mediatek: mt8188: refine APLL control

Currently, APLL is only used in ETDM module, so APLL and APLL tuner
don't need to be enabled when AFE is used. Integrate APLL control into
ETDM DAPM routes, so that APLL can be enabled when it is really required.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-5-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: mediatek: mt8188: revise ETDM control flow
Trevor Wu [Wed, 10 May 2023 03:55:20 +0000 (11:55 +0800)]
ASoC: mediatek: mt8188: revise ETDM control flow

Replace register controls in snd_soc_dai_ops with snd_soc_dapm_widgets.
startup, shutdown and trigger ops are removed, and create DAPM_SUPPLY
to handle mclk, clock gating and etdm enabling. Additionally, mclk setup
sequence is also updated because of new supply enabling sequence.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-4-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: mediatek: mt8188: complete set_tdm_slot function
Trevor Wu [Wed, 10 May 2023 03:55:19 +0000 (11:55 +0800)]
ASoC: mediatek: mt8188: complete set_tdm_slot function

User can configures slot number of TDM mode via set_tdm_slot callback.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230510035526.18137-3-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: mediatek: mt8188: remove supply AUDIO_HIRES
Trevor Wu [Wed, 10 May 2023 03:55:18 +0000 (11:55 +0800)]
ASoC: mediatek: mt8188: remove supply AUDIO_HIRES

AUDIO_HIRES is not required in MT8188. Because top_audio_h is disabled
when hires clock is not used, set_parent is a redundant operation.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com
Link: https://lore.kernel.org/r/20230510035526.18137-2-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
14 months agoASoC: Merge up fixes for CI
Mark Brown [Fri, 12 May 2023 04:14:20 +0000 (13:14 +0900)]
ASoC: Merge up fixes for CI

Avoid tripping over fixed issues in CI.

14 months agoLinux 6.4-rc2
Linus Torvalds [Sun, 14 May 2023 19:51:40 +0000 (12:51 -0700)]
Linux 6.4-rc2

14 months agoMerge tag 'cxl-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Linus Torvalds [Sun, 14 May 2023 19:32:34 +0000 (12:32 -0700)]
Merge tag 'cxl-fixes-6.4-rc2' of git://git./linux/kernel/git/cxl/cxl

Pull compute express link fixes from Dan Williams:

 - Fix a compilation issue with DEFINE_STATIC_SRCU() in the unit tests

 - Fix leaking kernel memory to a root-only sysfs attribute

* tag 'cxl-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
  cxl: Add missing return to cdat read error path
  tools/testing/cxl: Use DEFINE_STATIC_SRCU()