- 03 Jul, 2024 4 commits
-
-
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 24 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>
-
Mark Brown authored
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: simple-audio-mux is designed to be used generally, thus "Input 1" or "Input 2" are used to selecting MUX input. This numbered inputs would work, but might be not user friendly in some case, for example in case of system hardware design has some clear labels. Adds new "state-labels" property and enable to select MUX by own state names. Original > amixer set "MUX" "Input 1" > amixer set "MUX" "Input 2" Use mux-names sound_mux: mux { compatible = "simple-audio-mux"; mux-gpios = <...>; => state-labels = "Label_A", "Label_B"; }; > amixer set "MUX" "Label_A" > amixer set "MUX" "Label_B"
-
Mark Brown authored
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: These commits remove various code that is either no longer needed, or is redundant.
-
Mark Brown authored
Merge series from srinivas.kandagatla@linaro.org: Existing way of allocating soundwire master ports on Qualcommm platforms is dynamic, and in linear order starting from 1 to MAX_PORTS. This will work as long as soundwire device ports are 1:1 mapped linearly. However on most Qcom SoCs like SM8550, SM8650, x1e80100, these are NOT mapped in that order. The result of this is that only one speaker among the pair of speakers is always silent, With recent changes for WSA codec to support codec versions and along with these patches we are able to get all speakers working on these SoCs.
-
- 01 Jul, 2024 12 commits
-
-
Krzysztof Kozlowski authored
The 'wsa->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: 727de4fb ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patch.msgid.link/20240628095831.207942-2-krzysztof.kozlowski@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
The 'rx->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: dbacef05 ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patch.msgid.link/20240628095831.207942-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Nathan Chancellor authored
bitfield.h is not explicitly included but it is required for FIELD_PREP to be expanded by the preprocessor. If it is not implicitly included, there will be a compiler error (as seen with ARCH=hexagon allmodconfig): sound/soc/fsl/lpc3xxx-i2s.c:169:10: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 169 | tmp |= LPC3XXX_I2S_WW8 | LPC3XXX_I2S_WS_HP(LPC3XXX_I2S_WW8_HP); | ^ sound/soc/fsl/lpc3xxx-i2s.h:42:30: note: expanded from macro 'LPC3XXX_I2S_WW8' 42 | #define LPC3XXX_I2S_WW8 FIELD_PREP(0x3, 0) /* Word width is 8bit */ | ^ sound/soc/fsl/lpc3xxx-i2s.c:205:34: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 205 | LPC3XXX_I2S_DMA1_TX_EN | LPC3XXX_I2S_DMA0_TX_DEPTH(4)); | ^ sound/soc/fsl/lpc3xxx-i2s.h:65:38: note: expanded from macro 'LPC3XXX_I2S_DMA0_TX_DEPTH' 65 | #define LPC3XXX_I2S_DMA0_TX_DEPTH(s) FIELD_PREP(0xF0000, s) /* Set the DMA1 TX Request level */ | ^ sound/soc/fsl/lpc3xxx-i2s.c:210:34: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 210 | LPC3XXX_I2S_DMA0_RX_EN | LPC3XXX_I2S_DMA1_RX_DEPTH(4)); | ^ sound/soc/fsl/lpc3xxx-i2s.h:70:38: note: expanded from macro 'LPC3XXX_I2S_DMA1_RX_DEPTH' 70 | #define LPC3XXX_I2S_DMA1_RX_DEPTH(s) FIELD_PREP(0x700, s) /* Set the DMA1 RX Request level */ | ^ Include bitfield.h explicitly, so that FIELD_PREP is always expanded, clearing up the compiler error. Fixes: 0959de65 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-include-for-field_prep-v1-1-0c5d7f71921b@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Nathan Chancellor authored
clang points out that ret may be used uninitialized in lpc32xx_i2s_probe() in an error pointer path (which becomes fatal with CONFIG_WERROR): sound/soc/fsl/lpc3xxx-i2s.c:326:47: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] 326 | "failed to init register map: %d\n", ret); | ^~~ sound/soc/fsl/lpc3xxx-i2s.c:310:9: note: initialize the variable 'ret' to silence this warning 310 | int ret; | ^ | = 0 1 error generated. One solution would be a small refactoring of the second parameter in dev_err_probe(), PTR_ERR(i2s_info_p->regs), to be the value of ret in the if statement. However, a nicer solution for debugging purposes, which is the point of this statement, would be to use the '%pe' specifier to symbolically print the error pointer value. Do so, which eliminates the uninitialized use of ret, clearing up the warning. Fixes: 0959de65 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-uninitialized-ret-v1-1-985d86189739@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Animesh Agarwal authored
Convert the RT5677 audio CODEC bindings to DT schema. Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com> Cc: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240627105030.14360-1-animeshagarwal28@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shenghao Ding authored
Add name_prefix as the prefix name of DSP firmwares and calibrated data files which stored speaker calibrated impedance. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240629101112.628-1-shenghao-ding@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
Add support to parse static master port map information from device tree. This is required for correct port mapping between soundwire device and master ports. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patch.msgid.link/20240626-port-map-v2-4-6cc1c5608cdd@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
Document port mapping property for wsa884x. Port mapping is required to be able map correct master ports. All the device ports are not mapped in same order as master ports, so there is a need for having static port mapping for WSA codecs. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://patch.msgid.link/20240626-port-map-v2-3-6cc1c5608cdd@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
Add support to parse static master port map information from device tree. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patch.msgid.link/20240626-port-map-v2-2-6cc1c5608cdd@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Manikantan R authored
Document port mapping property for wsa883x. Port mapping is required to be able map correct master ports for VI feedback. All the device ports are not mapped in same order as master ports, so there is a need for having static port mapping for WSA codecs. Signed-off-by: Manikantan R <quic_manrav@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://patch.msgid.link/20240626-port-map-v2-1-6cc1c5608cdd@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
simple-audio-mux is designed to be used generally, thus "Input 1" or "Input 2" are used to selecting MUX input. This numbered inputs would work, but might be not user friendly in some case, for example in case of system hardware design has some clear labels. Adds new "state-labels" property and enable to select MUX by own state names. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/87le2m7xp8.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
simple-audio-mux is designed to be used generally, thus "Input 1" or "Input 2" are used to selecting MUX input. This numbered inputs would work, but might be not user friendly in some case, for example in case of system hardware design has some clear labels. Adds new "state-labels" property and enable to select MUX by own state names. Original > amixer set "MUX" "Input 1" Use mux-names sound_mux: mux { compatible = "simple-audio-mux"; mux-gpios = <...>; state-labels = "Label_A", "Label_B"; }; > amixer set "MUX" "Label_A" Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87msn27xpg.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-