aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-07-03ASoC: cs35l56: Set correct upper volume limitMark Brown2-2/+6
Merge series from Richard Fitzgerald <[email protected]>: 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.
2024-07-03ASoC: fsl_xcvr: Improve suspend/resume flow in fsl_xcvr_trigger()Chancel Liu1-20/+23
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 <[email protected]> Acked-by: Shengjiu Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-03ASoC: cs35l56: Limit Speaker Volume to +12dB maximumRichard Fitzgerald1-1/+1
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-03ASoC: cs35l56: Use header defines for Speaker Volume control definitionRichard Fitzgerald1-1/+5
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: tas2781: Use of_property_read_reg()Rob Herring (Arm)1-23/+11
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) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: PCM6240: Use of_property_read_reg()Rob Herring (Arm)1-21/+10
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) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: kcontrol registration cleanupMark Brown1-374/+194
Merge series from Amadeusz Sławiński <[email protected]>: 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.
2024-07-02Add master clock handling for nau8824Mark Brown3-2/+28
Merge series from Maxim Kochetkov <[email protected]>: nau8824 has external MCLK pin. So add enable/disable external clock management.
2024-07-02ASoC: dt-bindings: realtek,rt5645: Convert to dtschemaAnimesh Agarwal2-82/+131
Convert the RT5650/RT5645 audio CODEC bindings to DT schema. Reviewed-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Animesh Agarwal <[email protected]> Cc: Daniel Baluta <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Unify code for creating standalone and widget enum controlAmadeusz Sławiński1-77/+9
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Unify code for creating standalone and widget mixer controlAmadeusz Sławiński1-57/+9
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Unify code for creating standalone and widget bytes controlAmadeusz Sławiński1-42/+9
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Reshuffle function placementAmadeusz Sławiński1-233/+233
In preparation for following cleanups move functions around. Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Rename function creating widget kcontrolAmadeusz Sławiński1-6/+6
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Align dynamic object initialization for controlsAmadeusz Sławiński1-5/+9
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Correctly set shift_r in soc_tplg_denum_create()Amadeusz Sławiński1-1/+1
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Cleanup soc_tplg_dapm_widget_denum_createAmadeusz Sławiński1-21/+10
Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Cleanup soc_tplg_dapm_widget_dmixer_createAmadeusz Sławiński1-23/+12
Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Cleanup soc_tplg_dapm_widget_dbytes_createAmadeusz Sławiński1-12/+5
Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Properly initialize soc_enum valuesAmadeusz Sławiński1-0/+2
soc_tplg_denum_create_values() should properly set its values field. Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Do not do unnecessary dobj managementAmadeusz Sławiński1-4/+0
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: topology: Simplify codeAmadeusz Sławiński1-7/+3
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02firmware: cs_dsp: Don't allow writes to read-only controlsRichard Fitzgerald1-0/+3
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: codecs: nau8824: Add master clock handlingMaxim Kochetkov2-2/+20
Use master clock "mclk" if provided through device tree. Signed-off-by: Maxim Kochetkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: dt-bindings: nau8824: Add master clock handlingMaxim Kochetkov1-0/+8
Use master clock "mclk" if provided through device tree. Signed-off-by: Maxim Kochetkov <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-02ASoC: simple-audio-mux: add state-labelsMark Brown2-15/+46
Merge series from Kuninori Morimoto <[email protected]>: 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"
2024-07-02ASoC: cs35l56: Remove obsolete and redundant codeMark Brown5-370/+45
Merge series from Richard Fitzgerald <[email protected]>: These commits remove various code that is either no longer needed, or is redundant.
2024-07-02ASoC: codecs: wsa88xx: add support for static portMark Brown4-0/+32
Merge series from [email protected]: 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.
2024-07-02ALSA: pcm: optimize and clarify stream synchronization ID APIJaroslav Kysela3-26/+56
Optimize the memory usage in struct snd_pcm_runtime - use boolean value for the standard sync ID scheme. Introduce snd_pcm_set_sync_per_card function to build synchronization IDs. Signed-off-by: Jaroslav Kysela <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
2024-07-02ALSA: pcm: reinvent the stream synchronization ID APIJaroslav Kysela5-13/+39
Until the commit e11f0f90a626 ("ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command"), there was a possibility to pass information about the synchronized streams to the user space. The mentioned commit removed blindly the appropriate code with an irrelevant comment. The revert may be appropriate, but since this API was lost for several years without any complains, it's time to improve it. The hardware parameters may change the used stream clock source (e.g. USB hardware) so move this synchronization ID to hw_params as read-only field. It seems that pipewire can benefit from this API (disable adaptive resampling for perfectly synchronized PCM streams) now. Note that the contents of ID is not supposed to be used for direct comparison with a specific byte sequence. The "empty" case is when all bytes are zero (driver does not offer this information) and all other cases must be only used for equal comparison among PCM streams (including different sound cards) if they are using identical hardware clock. Cc: Takashi Sakamoto <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
2024-07-02ALSA: hda/realtek: add quirk for Clevo V5[46]0TUMichał Kopeć1-0/+1
Apply quirk to fix combo jack detection on a new Clevo model: V5[46]0TU Signed-off-by: Michał Kopeć <[email protected]> Cc: <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2024-07-01ASoC: codecs: lpass-wsa-macro: Fix using NULL pointer in probe() dev_errKrzysztof Kozlowski1-1/+1
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: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version") Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_errKrzysztof Kozlowski1-1/+1
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: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: fsl: lpc3xxx-i2s: Include bitfield.h for FIELD_PREPNathan Chancellor1-0/+1
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: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs") Signed-off-by: Nathan Chancellor <[email protected]> Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-include-for-field_prep-v1-1-0c5d7f71921b@kernel.org Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: fsl: lpc3xxx-i2s: Avoid using ret uninitialized in lpc32xx_i2s_probe()Nathan Chancellor1-1/+1
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: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs") Signed-off-by: Nathan Chancellor <[email protected]> Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-uninitialized-ret-v1-1-985d86189739@kernel.org Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: dt-bindings: realtek,rt5677: Convert to dtschemaAnimesh Agarwal2-78/+135
Convert the RT5677 audio CODEC bindings to DT schema. Signed-off-by: Animesh Agarwal <[email protected]> Cc: Daniel Baluta <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoc: tas2781: Add name_prefix as the prefix name of DSP firmwares and ↵Shenghao Ding1-4/+15
calibrated data files Add name_prefix as the prefix name of DSP firmwares and calibrated data files which stored speaker calibrated impedance. Signed-off-by: Shenghao Ding <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: codecs: wsa884x: parse port-mapping informationSrinivas Kandagatla1-0/+8
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 <[email protected]> Tested-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: dt-bindings: wsa8840: Document port mapping propertySrinivas Kandagatla1-0/+8
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 <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: codecs: wsa883x: parse port-mapping informationSrinivas Kandagatla1-0/+8
Add support to parse static master port map information from device tree. Reviewed-by: Krzysztof Kozlowski <[email protected]> Tested-by: Krzysztof Kozlowski <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: dt-bindings: wsa883x: Document port mapping propertyManikantan R1-0/+8
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 <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8650-HDK Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: dt-bindings: simple-audio-mux: add state-labels propertyKuninori Morimoto1-0/+6
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 <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: simple-audio-mux: enable to select MUX namesKuninori Morimoto1-15/+40
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headersRichard Fitzgerald1-31/+113
Check that all fields of a V2 algorithm header fit into the available firmware data buffer. The wmfw V2 format introduced variable-length strings in the algorithm block header. This means the overall header length is variable, and the position of most fields varies depending on the length of the string fields. Each field must be checked to ensure that it does not overflow the firmware data buffer. As this ia bugfix patch, the fixes avoid making any significant change to the existing code. This makes it easier to review and less likely to introduce new bugs. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: f6bc909e7673 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs") Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01firmware: cs_dsp: Validate payload length before processing blockRichard Fitzgerald1-21/+15
Move the payload length check in cs_dsp_load() and cs_dsp_coeff_load() to be done before the block is processed. The check that the length of a block payload does not exceed the number of remaining bytes in the firwmware file buffer was being done near the end of the loop iteration. However, some code before that check used the length field without validating it. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: f6bc909e7673 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs") Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01firmware: cs_dsp: Return error if block header overflows fileRichard Fitzgerald1-4/+14
Return an error from cs_dsp_power_up() if a block header is longer than the amount of data left in the file. The previous code in cs_dsp_load() and cs_dsp_load_coeff() would loop while there was enough data left in the file for a valid region. This protected against overrunning the end of the file data, but it didn't abort the file processing with an error. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: f6bc909e7673 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs") Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01firmware: cs_dsp: Fix overflow checking of wmfw headerRichard Fitzgerald1-7/+18
Fix the checking that firmware file buffer is large enough for the wmfw header, to prevent overrunning the buffer. The original code tested that the firmware data buffer contained enough bytes for the sums of the size of the structs wmfw_header + wmfw_adsp1_sizes + wmfw_footer But wmfw_adsp1_sizes is only used on ADSP1 firmware. For ADSP2 and Halo Core the equivalent struct is wmfw_adsp2_sizes, which is 4 bytes longer. So the length check didn't guarantee that there are enough bytes in the firmware buffer for a header with wmfw_adsp2_sizes. This patch splits the length check into three separate parts. Each of the wmfw_header, wmfw_adsp?_sizes and wmfw_footer are checked separately before they are used. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: f6bc909e7673 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs") Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: dt-bindings: realtek,rt5659: Convert to dtschemaAnimesh Agarwal2-89/+129
Convert the RT5659/RT5658 audio CODEC bindings to DT schema. Signed-off-by: Animesh Agarwal <[email protected]> Cc: Daniel Baluta <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: fsl_rpmsg: Add support for i.MX95 platformChancel Liu1-0/+9
Add compatible string and specific soc data to support rpmsg sound card on i.MX95 platform. Signed-off-by: Chancel Liu <[email protected]> Acked-by: Shengjiu Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-07-01ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX95Chancel Liu1-0/+1
Add compatible string for i.MX95 platform which supports audio function through rpmsg channel between Cortex-A and Cortex-M core. Signed-off-by: Chancel Liu <[email protected]> Acked-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>