- 03 Jul, 2024 19 commits
-
-
Krzysztof Kozlowski authored
Driver's probe() has two allocations which are needed only within the probe() itself - for devm_regmap_init_mmio(). Usage of devm interface is a bit misleading here, because these can be freed right after each scope finishes. This makes the code a bit more obvious and self documenting. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-6-6d98d4dd1ef5@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Driver uses ARRAY_SIZE() to get number of widgets later passed to snd_soc_dapm_new_controls(), which is an 'unsigned int'. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-5-6d98d4dd1ef5@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Number of widgets in array passed to snd_soc_dapm_new_controls() cannot be negative, so make it explicit by using 'unsigned int', just like snd_soc_add_component_controls() is doing. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-4-6d98d4dd1ef5@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
The driver has static 'struct regmap_config', which is then customized depending on device version. This works fine, because there should not be two devices in a system simultaneously and even less likely that such two devices would have different versions, thus different regmap config. However code is cleaner and more obvious when static data in the driver is also const - it serves as a template. Mark the 'struct regmap_config' as const and duplicate it in the probe() with kmemdup to allow customizing per detected device variant. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-3-6d98d4dd1ef5@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the default register values array with scoped/cleanup.h to reduce number of error paths and make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-2-6d98d4dd1ef5@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Eliminate PDS cleanup by using devm_add_action_or_reset() which results in one less error path and smaller cleanup in remove(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-1-6d98d4dd1ef5@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`wsa884x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-9-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`wsa883x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-8-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`wsa881x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-7-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`jz4760_codec_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-6-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`jz4760_codec_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-5-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`cs53l30_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-4-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`cs35l36_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-3-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`cs35l35_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-2-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Javier Carrasco authored
`cs35l34_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-1-2e379b0446a7@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: These two commits set the upper limit of the Speaker Volume control to +12dB instead of +100dB. This should have been a simple 1-line change to the #define in the header file, but only the HDA cs35l56 driver is using this define. The ASoC cs35l56 driver was using hardcoded numbers instead of the header defines. So the first commit changes the ASoC driver to use the #defined constants. The second commit corrects the value of the constant.
-
Chancel Liu authored
In the current flow all interrupts are disabled in runtime suspend phase. However interrupts enablement only exists in fsl_xcvr_prepare(). After resume fsl_xcvr_prepare() may not be called so it will cause all interrupts still disabled even if resume from suspend. Interrupts should be explictily enabled after resume. Also, DPATH reset setting only exists in fsl_xcvr_prepare(). After resume from suspend DPATH should be reset otherwise there'll be channel swap issue. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://patch.msgid.link/20240628094354.780720-1-chancel.liu@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Change CS35L56_MAIN_RENDER_USER_VOLUME_MAX to 48, to limit the maximum value of the Speaker Volume control to +12dB. The minimum value is unchanged so that the default 0dB has the same integer control value. The original maximum of 400 (+100dB) was the largest value that can be mathematically handled by the DSP. The actual maximum amplification is +12dB. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20240703095517.208077-3-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
The "Speaker Volume" control was being defined using four hardcoded magic numbers. There are #defines in the cs35l56.h header for these numbers, so change the code to use the defined constants. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20240703095517.208077-2-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 02 Jul, 2024 21 commits
-
-
Rob Herring (Arm) authored
Replace the open-coded parsing of "reg" with of_property_read_reg(). The #ifdef is also easily replaced with IS_ENABLED(). Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240702215402.839673-1-robh@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Rob Herring (Arm) authored
Replace the open-coded parsing of "reg" with of_property_read_reg(). The #ifdef is also easily replaced with IS_ENABLED(). Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240702215349.839350-1-robh@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>: Code used to create standalone and widget controls is mostly same, with with exception that in standalone case dynamic object needs to be registered and control created directly. Following patches clean up and unify kcontrol creation code in topology code.
-
Mark Brown authored
Merge series from Maxim Kochetkov <fido_max@inbox.ru>: nau8824 has external MCLK pin. So add enable/disable external clock management.
-
Animesh Agarwal authored
Convert the RT5650/RT5645 audio CODEC bindings to DT schema. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com> Cc: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20240702120106.17100-1-animeshagarwal28@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Code used to create standalone and widget enum control is same, with exception that in standalone case dynamic object needs to be registered and control created directly. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-14-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Code used to create standalone and widget mixer control is same, with exception that in standalone case dynamic object needs to be registered and control created directly. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-13-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Code used to create standalone and widget bytes control is same, with exception that in standalone case dynamic object needs to be registered and control created directly. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-12-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
In preparation for following cleanups move functions around. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-11-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
In following patches it will be reused to also create standalone kcontrol, so it makes sense to name it in more generic way. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-10-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
soc_tplg_dbytes_create() missed se->dobj.index initialization, so add it there. Additionally separate dynamic object initialization into separate logical block code. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-9-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
This aligns soc_tplg_denum_create() with soc_tplg_dapm_widget_denum_create(), as there is no reason for difference in behavior. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-8-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-7-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-6-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-5-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
soc_tplg_denum_create_values() should properly set its values field. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-4-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Widget kcontrols do not need to be managed as topology dynamic objects with an index and a linked list. As they are always associated with a widget which is already a topology dynamic object, thus all addition/removals of a widget will by design manage the kcontrol. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-3-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Amadeusz Sławiński authored
Instead of using goto, when there is no controls, just do a loop when there are. Overall the check seems to be a bit redundant as num_kcontrols will only be above 0 if kcontrols are set anyway, but let's keep it, while simplifying code. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20240627101850.2191513-2-amadeuszx.slawinski@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Add a check to cs_dsp_coeff_write_ctrl() to abort if the control is not writeable. The cs_dsp code originated as an ASoC driver (wm_adsp) where all controls were exported as ALSA controls. It relied on ALSA to enforce the read-only permission. Now that the code has been separated from ALSA/ASoC it must perform its own permission check. This isn't currently causing any problems so there shouldn't be any need to backport this. If the client of cs_dsp exposes the control as an ALSA control, it should set permissions on that ALSA control to protect it. The few uses of cs_dsp_coeff_write_ctrl() inside drivers are for writable controls. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20240702110809.16836-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Maxim Kochetkov authored
Use master clock "mclk" if provided through device tree. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Link: https://patch.msgid.link/20240701211631.92384-3-fido_max@inbox.ruSigned-off-by: Mark Brown <broonie@kernel.org>
-
Maxim Kochetkov authored
Use master clock "mclk" if provided through device tree. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240701211631.92384-2-fido_max@inbox.ruSigned-off-by: Mark Brown <broonie@kernel.org>
-