- 08 Jul, 2024 19 commits
-
-
Mark Brown authored
Merge series from Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>: This is a series of patches aiming to make the machine driver `fsl-asoc-card` compatible with S/PDIF controllers on imx boards. The main goal is to allow the use of S/PDIF controllers with ASRC modules. The `imx-spdif` machine driver already has specific support for S/PDIF controllers but doesn't support using an ASRC with it. However, the `fsl-asoc-card` machine driver has the necessary code to create a sound card which can use an ASRC module. It is then possible to extend the support for S/PDIF audio cards by merging the `imx-spdif` driver into `fsl-asoc-card`. The first three patches adapt the `fsl-asoc-card` driver to support multiple codec use cases. The driver can get 2 codec phandles from the device tree, and codec-related variables are doubled. `for_each_codecs` macros are also used when possible to ease adding other multi-codec use cases in the future. It makes possible to use the two S/PDIF dummy codec drivers `spdif_receiver` and `spdif_transmitter` instead of `snd-soc-dummy`, which was used in `imx-spdif`. The fourth patch merges the S/PDIF support from `imx-spdif` to `fsl-asoc-card`. `fsl-asoc-card` offers the same functionalities as `imx-spdif` did, but this merge also extends the S/PDIF support with the possibility of using an ASRC. Compatible "fsl,imx-audio-spdif" is kept, but `fsl-asoc-card` uses different DT properties compared to `imx-spdif`: * The "spdif-controller" property from `imx-spdif` is named "audio-cpu" in `fsl-asoc-card`. * `fsl-asoc-card` uses codecs explicitly declared in DT with "audio-codec". With an S/PDIF, codec drivers `spdif_transmitter` and `spdif_receiver` should be used. Driver `imx-spdif` used instead the dummy codec and a pair of boolean properties, "spdif-in" and "spdif-out". Backward compatibility is therefore implemented in `fsl-asoc-card`. However, it is recommended to use the new properties when needed. Especially, declaring and using S/PDIF transmitter and/or receiver nodes is better than using the dummy codec. The last three patches update the device tree bindings of `fsl-asoc-card` and update all in-tree device trees to use the `fsl-asoc-card` properties. Note that as the old properties are still supported: * previous versions of in-tree device trees are still supported. * out-of-tree device trees are still supported. This series of patches was successfully built for arm64 and x86 on top of the latest "for-next" branch of the ASoC git tree on the 26th of June 2024. These modifications have also been tested on an i.MX8MN evaluation board with a linux kernel RT v6.1.26-rt8.
-
Mark Brown authored
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Allocate the memory with scoped/cleanup.h to reduce error handling (simpler error paths) and make the code a bit smaller.
-
Elinor Montmasson authored
The S/PDIF audio card support with compatible "fsl,imx-audio-spdif" was merged from imx-spdif into the fsl-asoc-card driver. It makes possible to use an S/PDIF with an ASRC. This merge introduces new DT bindings to use with compatible "fsl,imx-audio-spdif" to follow the way fsl-asoc-card works: * the "spdif-controller" property from imx-spdif is named "audio-cpu" in fsl-asoc-card. * fsl-asoc-card uses codecs explicitly declared in DT with "audio-codec". With an SPDIF, codec drivers spdif_transmitter and spdif_receiver should be used. Driver imx-spdif used instead the dummy codec and a pair of boolean properties, "spdif-in" and "spdif-out". In an upcoming commit, in-tree DTs will be modified to follow these new properties: * Property "spdif-controller" will be renamed "audio-cpu". * spdif_transmitter and spdif_receiver nodes will be declared and linked to the fsl-asoc-card node with the property "audio-codec". To keep backward compatibility with other DTs, support for "spdif-controller", "spdif-in" and "spdif-out" properties is kept. However, it is recommended to use the new properties if possible. It is better to declare transmitter and/or receiver in DT than using the dummy codec. DTs using compatible "fsl,imx-audio-spdif" are still supported, and fsl-asoc-card will behave the same as imx-spdif for these DTs. Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240627083104.123357-6-elinor.montmasson@savoirfairelinux.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Elinor Montmasson authored
The imx-spdif machine driver creates audio card to directly use an S/PDIF device. However, it doesn't support interacting with an ASRC. fsl-asoc-card already has the support to create audio card which can use the ASRC. Merge the S/PDIF support from imx-spdif into driver fsl-asoc-card to extend the support of S/PDIF audio card with the use of ASRC devices. fsl-asoc-card uses slightly different DT properties than imx-spdif: * the "spdif-controller" property from imx-spdif is named "audio-cpu" in fsl-asoc-card. * fsl-asoc-card uses codecs explicitly declared in DT with "audio-codec". With an SPDIF, codec drivers spdif_transmitter and spdif_receiver should be used. Driver imx-spdif used instead the dummy codec and a pair of boolean properties, "spdif-in" and "spdif-out". To keep backward compatibility, support for "spdif-controller", "spdif-in" and "spdif-out" is also added to fsl-asoc-card. However, it is recommended to use the new properties if possible. It is better to declare transmitter and/or receiver in DT than using the dummy codec. DTs using compatible "fsl,imx-audio-spdif" are still compatible, and fsl-asoc-card will behave the same as imx-spdif for these DTs. Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com> Link: https://patch.msgid.link/20240627083104.123357-5-elinor.montmasson@savoirfairelinux.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Elinor Montmasson authored
Adapt the driver to work with configurations using two codecs or more. Modify fsl_asoc_card_probe() to handle use cases where 2 codecs are given in the device tree. This will be needed to add support for the SPDIF. Use cases using one codec will ignore any given codecs other than the first. Co-developed-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com> Signed-off-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com> Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com> Link: https://patch.msgid.link/20240627083104.123357-4-elinor.montmasson@savoirfairelinux.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Elinor Montmasson authored
Add a second dai link component for codecs that will be used for use cases with 2 codecs. It is needed for future integration of the SPDIF support, which will use spdif_receiver and spdif_transmitter drivers. To prevent deferring in use cases using only one codec, also set by default the number of codecs to 1 for the relevant dai links. Co-developed-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com> Signed-off-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com> Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com> Link: https://patch.msgid.link/20240627083104.123357-3-elinor.montmasson@savoirfairelinux.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Elinor Montmasson authored
Add support for dai links using multiple codecs for multi-codec use cases. Co-developed-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com> Signed-off-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com> Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com> Link: https://patch.msgid.link/20240627083104.123357-2-elinor.montmasson@savoirfairelinux.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shenghao Ding authored
Use get_unaligned_be16 instead of be16_to_cpup and get_unaligned_be32 instead of be32_to_cpup for potentially broken alignment. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240707083011.98-1-shenghao-ding@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h in snd_soc_dai_link_event_pre_pmu() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-11-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h in dapm_cnew_widget() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-10-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-9-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h, instead of devm interface, to make the code more obvious that memory is not used outside this scope. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-8-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h, instead of devm interface, to make the code more obvious that memory is not used outside this scope. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-7-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h, instead of devm interface, to make the code more obvious that memory is not used outside this scope. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-6-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-5-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-4-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-3-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h in audio_iio_aux_probe() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-2-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Allocate the memory with scoped/cleanup.h in audio_iio_aux_add_dapms() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-1-71219dfd0aef@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 05 Jul, 2024 1 commit
-
-
Shenghao Ding authored
Adding name-prefix for each audio controls is a redundant, because name-prefix will be automatically added behind the control name when creating a new control. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240705064846.1723-1-shenghao-ding@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 04 Jul, 2024 17 commits
-
-
Mark Brown authored
Merge series from Herve Codina <herve.codina@bootlin.com>: The qmc_audio driver supports only audio in interleaved mode. Non-interleaved mode can be easily supported using several QMC channel per DAI. In that case, data related to ch0 are sent to (received from) the first QMC channel, data related to ch1 use the next QMC channel and so on up to the last channel. In terms of constraints and settings, the interleaved and non-interleaved modes are slightly different. In interleaved mode: - The sample size should fit in the number of time-slots available for the QMC channel. - The number of audio channels should fit in the number of time-slots (taking into account the sample size) available for the QMC channel. In non-interleaved mode: - The number of audio channels is the number of available QMC channels. - Each QMC channel should have the same number of time-slots. - The sample size equals the number of time-slots of one QMC channel. This series add support for the non-interleaved mode in the qmc_audio driver and is composed of the following parts: - Patches 1 and 2: Fix some issues in the qmc_audio - Patches 3 to 6: Prepare qmc_audio for the non-interleaved mode - Patches 7 and 8: Extend the QMC driver API - Patches 9 and 10: The support for non-interleaved mode itself Compared to the previous iteration, this v2 series mainly improves qmc_audio_access_is_interleaved().
-
Mark Brown authored
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Improve a bit the Qualcomm LPASS RX macro driver and align similar parts of code with LPASS WSA macro driver for consistency. No external dependencies.
-
Shenghao Ding authored
ASoc: tas2781: Set "Speaker Force Firmware Load" as the common kcontrol for both tas27871 and tas2563 Set "Speaker Force Firmware Load" as the common kcontrol for both tas27871 and tas2563 and move it into newly-created tasdevice_snd_controls, and keep the digital gain and analog gain in tas2781_snd_controls. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240704094939.1824-1-shenghao-ding@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Aleksandr Mishin authored
acpi_get_first_physical_node() can return NULL in several cases (no such device, ACPI table error, reference count drop to 0, etc). Existing check just emit error message, but doesn't perform return. Then this NULL pointer is passed to devm_acpi_dev_add_driver_gpios() where it is dereferenced. Adjust this error handling by adding error code return. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 02527c3f ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru> Link: https://patch.msgid.link/20240703191007.8524-1-amishin@t-argos.ruSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Driver does not unregister typec structures (typec_mux_dev and typec_switch_desc) during removal leading to leaks. Fix this by moving typec registering parts to separate function and using devm interface to release them. This also makes code a bit simpler: - Smaller probe() function with less error paths and no #ifdefs, - No need to store typec_mux_dev and typec_switch_desc in driver state container structure. Cc: stable@vger.kernel.org Fixes: 10f514bd ("ASoC: codecs: Add WCD939x Codec driver") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20240701122616.414158-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shengjiu Wang authored
commit c721f189 ("reset: Instantiate reset GPIO controller for shared reset-gpios") check if there is no "resets" property will fallback to "reset-gpios". So don't need to handle "reset-gpios" separately in the driver, the "reset-gpios" handler is duplicated with "resets" control handler, remove it. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/1720009575-11677-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
There is no need to keep separate token list for dai and 'common' copier token list when the 'common' list is actually the aif list, the SOF_COPIER_DEEP_BUFFER_TOKENS are not applicable for buffers. We could have separate lists for all types but it is probably simpler to just use a single list for all types of copiers. Function specific tokens will be only parsed by function specific code anyways. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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> Link: https://patch.msgid.link/20240704085944.371450-1-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
The current fsl_qmc_audio works in interleaved mode. The audio samples are interleaved and all data are sent to (received from) one QMC channel. Using several QMC channels, non interleaved mode can be easily supported. In that case, data related to ch0 are sent to (received from) the first QMC channel, data related to ch1 use the next QMC channel and so on up to the last channel. In terms of constraints and settings, the two modes are slightly different: - Interleaved mode: - The sample size should fit in the number of time-slots available for the QMC channel. - The number of audio channels should fit in the number of time-slots (taking into account the sample size) available for the QMC channel. - Non-interleaved mode: - The number of audio channels is the number of available QMC channels. - Each QMC channel should have the same number of time-slots. - The sample size equals the number of time-slots of one QMC channel. Add support for the non-interleaved mode allowing multiple QMC channel per DAI. The DAI switches in non-interleaved mode when more that one QMC channel is available. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-11-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
The QMC audio uses one QMC channel per DAI and uses this QMC channel to transmit interleaved audio channel samples. In order to work in non-interleave mode, a QMC audio DAI needs to use multiple QMC channels. In that case, the DAI maps each QMC channel to exactly one audio channel. Allow QMC audio DAIs with multiple QMC channels attached. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240701113038.55144-10-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
No function in the QMC API is available to get the number of phandles present in a phandle list. Fill this lack introducing qmc_chan_count_phandles(). Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-9-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
qmc_chan_get_byphandle() and the resource managed version retrieve a channel from a simple phandle. Extend the API and introduce qmc_chan_get_byphandles_index() and the resource managed version in order to retrieve a channel from a phandle list using the provided index to identify the phandle in the list. Also update qmc_chan_get_byphandle() and the resource managed version to use qmc_chan_get_byphandles_index() and so avoid code duplication. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-8-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
Constraints are set by qmc_dai_startup(). These constraints are specific to the interleaved mode. With the future introduction of support for non-interleaved mode, a new set of constraints will be set. To make the code clear and keep qmc_dai_startup() simple, extract the current interleaved mode constraints settings to a specific function. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-7-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
Submitting data to QMC channels is done in several places: transfer completions and DAI start. The operation done is simple and consist in one function call. With the future introduction of support for non-interleaved mode, submitting data will be more complex. To avoid copy/paste of code in several places, introduce qmc_audio_pcm_{read,write}_submit() whose goal is to handle this data submission. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-6-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
The current QMC audio driver uses only one QMC channel per DAI. The context used by QMC channel transfer (read and write) completion routines does not contains any QMC channel and the only one available per DAI is used to schedule the next transfer. This works pretty well with only one QMC channel per DAI. The future support for non-inlerleave mode will use several QMC channel per DAI. In that case, QMC channel transfer completion routines need to identify the QMC channel related to the completion. In order to fill this lack, even if identifying the current QMC channel among several QMC channels is not needed for the current code, add one indirection level and introduce the qmc_dai_chan data structrure. This structure contains the QMC channel involved in the completion and refererences to the runtime context (capture and playback) used by the DAI. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-5-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
The driver mixes some internal values for channel DMA buffer handling and PCM pointer handling. In the currently supported interleaved mode, this mix does not lead to any issues but in order to prepare the support for the non-interleaved mode, having them clearly separated will ease the support and avoid additional computation to convert values used in channel DMA buffer management in values usable for PCM pointer. Use a specific set of variable for PCM pointer handling and an other set for channel DMA buffer. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-4-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
./scripts/checkpatch.pl --strict --codespell detected several issues when running on the fsl_qmc_audio.c file: - CHECK: spaces preferred around that '*' (ctx:VxV) - CHECK: Alignment should match open parenthesis - CHECK: Comparison to NULL could be written "!prtd" - CHECK: spaces preferred around that '/' (ctx:VxV) - CHECK: Lines should not end with a '(' - CHECK: Please don't use multiple blank lines Some of them are present several times. Fix all of these issues without any functional changes. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-3-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Herve Codina authored
devm_kasprintf() can return a NULL pointer on failure but this returned value is not checked. Fix this lack and check the returned value. Fixes: 075c7125 ("ASoC: fsl: Add support for QMC audio") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20240701113038.55144-2-herve.codina@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 03 Jul, 2024 3 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>
-