- May 24, 2021
-
-
Stephan Gerhold authored
NXP's TFA98xx (now part of Goodix) are fairly popular speaker amplifiers used in many smartphones and tablets. Most of them are sold as "smart amplifiers" with built-in "CoolFlux DSP" that is used for volume control, plus a "sophisticated speaker-boost and protection algorithm". Unfortunately, they are also almost entirely undocumented. The short datasheets (e.g. [1] for TFA9897) describe the available features, but do not provide any information about the registers or how to use the "CoolFlux DSP". The amplifiers are most often configured through proprietary userspace libraries. There are also some (rather complex) kernel drivers (e.g. [2]) but even those rely on obscure firmware blobs for configuration (so-called "containers"). They seem to contain different "profiles" with tuned speaker settings, sample rates and volume steps (which would be better exposed as separate ALSA mixers). The format of the firmware files seems to have changed a lot over the time, so it's not even possible to simply re-use the firmware originally provided by the vendor. Overall, it seems close to impossible to develop a proper mainline driver for these amplifiers that could make proper use of the built-in DSP. This commit implements a compromise: At least the TFA1 family of the TFA98xx amplifiers (usually called TFA989x) provide a way to *bypass* the DSP using a special register sequence. The register sequence can be found in similar variations in the kernel drivers from lots of vendors e.g. in [3] and was probably mainly used for factory testing. With the DSP bypassed, the amplifier acts mostly like a dumb standard speaker amplifier, without (hardware) volume control. However, the setup is much simpler and it works without any obscure firmware. This driver implements the DSP bypass combined with chip-specific initialization sequences adapted from [2]. Only TFA9895 is supported in this initial commit. Except for the lack of volume control I can not hear any difference with or without the DSP, it works just fine. This driver allows the speaker to work on mainline Linux running on the Samsung Galaxy A3/A5 (2015) [TFA9895] and Alcatel Idol 3 [TFA9897]. TFA9897 support will be added in separate patch set later. [1]: https://product.goodix.com/en/docview/TFA9897%20SDS_Rev.3.1?objectId=47&objectType=document&version=78 [2]: https://source.codeaurora.org/external/mas/tfa98xx [3]: https://github.com/sonyxperiadev/kernel/blob/57b5050e340f40a88e1ddb8d16fd9adb44418923/sound/soc/codecs/tfa98xx.c#L1422-L1462 Signed-off-by:
Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20210513104129.36583-2-stephan@gerhold.net Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 21, 2021
-
-
Vamshi Krishna Gopal authored
Brya is another ADL-P product. AlderLake has support for Bluetooth audio offload capability. Enable the BT-offload quirk for ADL-P Brya and the Intel RVP. Signed-off-by:
Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com> Signed-off-by:
Yong Zhi <yong.zhi@intel.com> Reviewed-by:
Bard Liao <bard.liao@intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521155632.3736393-2-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Vamshi Krishna Gopal authored
RT5682 and Max98373 are added with SDW0,SDW2 links respectively. Signed-off-by:
Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com> Reviewed-by:
Bard Liao <bard.liao@intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521155632.3736393-1-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
The HDA support can only be compiled when SND_SOC_SOF_PCI is enabled which depends on CONFIG_PCI. This makes the IS_ENABLED(CONFIG_PCI) checks redundant in the code, they will resolve to true all the time. Signed-off-by:
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-8-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Sparse throws the following warning: sound/soc/sof/ops.h:247:17: error: returning void-valued expression Remove the useless returns. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by:
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by:
Rander Wang <rander.wang@intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-7-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Jaska Uimonen authored
Fix sparse warning by using le32_to_cpu. Signed-off-by:
Jaska Uimonen <jaska.uimonen@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:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-6-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
SOF core should use the IO functions via callbacks and not directly to ensure that it remains platform independent. Fixes: 83ee7ab1 ("ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation") Signed-off-by:
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by:
Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-5-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Keyon Jie authored
Print the register offset out to provide more useful information for the register polling debugging. Signed-off-by:
Keyon Jie <yang.jie@linux.intel.com> Reviewed-by:
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-4-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
At the start of the function we already have the desc, no need to cast it again from pci_id->driver_data to save it to sof_pdata. Signed-off-by:
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by:
Rander Wang <rander.wang@intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-3-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
We can check for the desc->ops directly in the probe functions, the ops is not used directly in the functions. Signed-off-by:
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by:
Rander Wang <rander.wang@intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-2-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 20, 2021
-
-
Shengjiu Wang authored
Add machine driver for i.MX boards, which supports AK4458/AK5558/AK4497/AK5552 DAC/ADC attached to SAI interface currently, but these DAC/ADCs are not only supported codecs. This machine driver is designed to be a more common machine driver for i.MX platform, it can support widely cpu dai interface and codec dai interface. Signed-off-by:
Shengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by:
Mihai Serban <mihai.serban@nxp.com> Signed-off-by:
Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Signed-off-by:
Viorel Suman <viorel.suman@nxp.com> Signed-off-by:
Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by:
Adrian Alonso <adrian.alonso@nxp.com> Link: https://lore.kernel.org/r/1621247488-21412-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Jaska Uimonen authored
The original patch changed kcontrol_type to a pointer. In some goto cases the pointer is assigned into a struct member as uninitialized and this will cause a runtime error with UBSan even if it isn't a real bug. So initialize the pointer to NULL. Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Fixes: d29d41e2 ("ASoC: topology: Add support for multiple kcontrol types to a widget") Signed-off-by:
Jaska Uimonen <jaska.uimonen@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210519100713.879958-1-jaska.uimonen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 19, 2021
-
-
Gyeongtaek Lee authored
If fixed hw params won't be used, fixing up isn't needed also. Signed-off-by:
Gyeongtaek Lee <gt82.lee@samsung.com> Link: https://lore.kernel.org/r/000401d748bc$fa466d50$eed347f0$@samsung.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Neil Armstrong authored
This adds support for the TOACODEC found in Amlogic SM1 SoCs. The bits are shifted for more selection of clock sources, so this only maps the same support for G12A to the SM1 bits. Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20210511074829.4110036-3-narmstrong@baylibre.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Neil Armstrong authored
Switch usage to regmap field for bits handled by the g12a_toacodec_mux_put_enum() function to avoid uselesss code duplication when adding SM1 variant support. Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20210511074829.4110036-2-narmstrong@baylibre.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 18, 2021
-
-
Yang Yingliang authored
After calling clk_prepare_enable(), clk_disable_unprepare() need be called when calling clk_set_rate() failed. Fixes: 0bf750f4 ("ASoC: hisilicon: Add hi6210 i2s audio driver") Reported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210518044514.607010-1-yangyingliang@huawei.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
YueHaibing authored
Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by:
YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20210514081100.16196-1-yuehaibing@huawei.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Fix the missing clk_disable_unprepare() before return from rk3328_platform_probe() in the error handling case. Fixes: c3275903 ("ASoC: rockchip: support ACODEC for rk3328") Reported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210518075847.1116983-1-yangyingliang@huawei.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 14, 2021
-
-
Jaska Uimonen authored
Current dapm widget has a single variable to describe its kcontrol's type. As there can be many kcontrols in one widget it is inherently presumed that the types are the same. Lately there has been use cases where different types of kcontrols would be needed for a single widget. Thus add pointer to dapm widget to hold an array for different kcontrol types and modify the kcontrol creation to operate in a loop based on individual kcontrol type. Change control creation and deletion to use individual kcontrol types in SOF driver. This is done in the same patch for not breaking bisect. SOF driver is also currently the only one using the dapm widget kcontrol_type. Signed-off-by:
Jaska Uimonen <jaska.uimonen@linux.intel.com> Reviewed-by:
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210507070246.404446-1-jaska.uimonen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Zou Wei authored
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Zou Wei <zou_wei@huawei.com> Link: https://lore.kernel.org/r/1620791647-16024-1-git-send-email-zou_wei@huawei.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 12, 2021
-
-
Vitaly Rodionov authored
HSBIAS_SENSE_EN configures HSBIAS output current sense through the external 2.21-k resistor. HSBIAS_SENSE is hardware feature to reduce the potential pop noise during the headset plug out slowly. But on some platforms ESD voltage will affect it causing test to fail, especially with CTIA headset type. For different hardware setups, a designer might want to tweak default behavior. Signed-off-by:
Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210511145220.125760-1-vitalyr@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Nathan Chancellor authored
This reverts commit 5f1b95d0. The warnings that commit 5f1b95d0 ("ASoC: q6dsp: q6afe: remove unneeded dead-store initialization") was trying to fix were already fixed in commit 12900bac ("ASoC: qcom: q6afe: remove useless assignments"). With both commits in the tree, port_id is uninitialized, as pointed out by clang: sound/soc/qcom/qdsp6/q6afe.c:1213:18: warning: variable 'port_id' is uninitialized when used here [-Wuninitialized] stop->port_id = port_id; ^~~~~~~ sound/soc/qcom/qdsp6/q6afe.c:1186:13: note: initialize the variable 'port_id' to silence this warning int port_id; ^ = 0 1 warning generated. Bring back the initialization so that everything works as intended. Fixes: 5f1b95d0 ("ASoC: q6dsp: q6afe: remove unneeded dead-store initialization") Reported-by:
kernel test robot <lkp@intel.com> Signed-off-by:
Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20210511190306.2418917-1-nathan@kernel.org Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Simon Trimmer authored
We want all wm_adsp clients to use the wm_adsp.h header as they shouldn't need to include internal sub-headers. Signed-off-by:
Simon Trimmer <simont@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210511171514.270219-1-simont@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Simon Trimmer authored
The callback structures and memory region type table can be marked as const as they will not change during use. Fix checkpatch warning against wm_adsp_find_region function by moving const keyword to form the 'static const struct' pattern. Signed-off-by:
Simon Trimmer <simont@opensource.cirrus.com> Acked-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210511171459.270169-1-simont@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Sparse throwns the following warnings: sound/soc/intel/boards/bxt_da7219_max98357a.c:843:19: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/bxt_da7219_max98357a.c:844:19: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/bxt_da7219_max98357a.c:845:19: error: too long initializer-string for array of char(no space for nul char) Fix by using the 'mx' acronyn for Maxim Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by:
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by:
Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20210511213707.32958-5-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The platform_id is too long and is flagged by a sparse warning: sound/soc/intel/boards/sof_cs42l42.c:483:25: error: too long initializer-string for array of char(no space for nul char) fix by using the 'mx' acronym for Maxim Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by:
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by:
Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20210511213707.32958-4-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
With more warnings than the default, Sparse throws the following warning: sound/soc/sof/intel/hda.c:1127:49: error: self-comparison always evaluates to true sound/soc/sof/intel/hda.c:1128:49: error: self-comparison always evaluates to true sound/soc/sof/intel/hda.c:1129:48: error: self-comparison always evaluates to true This looks like an obvious error, with a likely copy-pasted line leading to the use of the wrong index in an inner loop. One of the worst single-character bugs in a long time. This problem was not detected in our tests since in practice SoundWire platforms only have identical devices per link and the index mistake did not change the results. Fixes: 6f5d506d7ff1dq ('ASoC: SOF: Intel: SoundWire: refine ACPI match') Reviewed-by:
Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by:
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by:
Rander Wang <rander.wang@intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210511213707.32958-2-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 11, 2021
-
-
Charles Keepax authored
Fixup a needlessly initialised variable and an unchecked return value. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210511101051.17726-3-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Fixup a needlessly initialised variable and an unchecked return value. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210511101051.17726-2-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210511101051.17726-1-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- May 10, 2021
-
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-11-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-10-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-9-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-8-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Currently the check of errata_chk will always evaluate to false since the values tested don't come under the mask used. A shift of the field is missing, add this. Also there is an error in the values tested, they don't match the comment and the value 0x3 is not a valid value for the field in question. Update the value to match the comment. Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-7-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-6-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-5-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-4-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-3-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Many of the older Cirrus devices share very similar code for reading the device ID, and frequently this code is generating cppcheck warnings such as: sound/soc/codecs/cs42l42.c:1886:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_CD, ®); Add a small helper function that older Cirrus devices can use to read the device ID, which should help correct these issues. Reported-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210510131357.17170-2-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-