summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | ASoC: wm_adsp: Move sys_config_size to wm_adspCharles Keepax2021-09-272-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys_config_size is part of the compressed stream support, move it from what will become generic DSP code so that it remains in ASoC. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-10-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Split DSP power operations into helper functionsSimon Trimmer2021-09-271-222/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is preparation for moving the generic DSP support out of ASoC. This change separates the generic handling of power and state transitions from the DAPM API wrapper. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-9-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Separate some ASoC and generic functionsSimon Trimmer2021-09-271-31/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split some functions into ASoC and generic portions so that existing interfaces can be retained whilst allowing the implementation to be moved out of ASoC. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-8-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Introduce cs_dsp logging macrosSimon Trimmer2021-09-271-227/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for moving the generic DSP support out of ASoC, add some new logging macros that will be used from the generic code. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-7-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Rename generic DSP supportSimon Trimmer2021-09-2711-473/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rename is preparation for moving the generic DSP support out of ASoC, generic code named wm_* will be renamed to cs_*. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-6-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Cancel ongoing work when removing controlsSimon Trimmer2021-09-271-25/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes wm_adsp_ctl_work and integrates the work_struct into wm_coeff_ctl so it may be referenced. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-5-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Switch to using wm_coeff_read_ctrl for compressed buffersCharles Keepax2021-09-271-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing a compressed buffer from the firmware the driver currently open codes reading the firmware coefficient containing the buffer description. Improve this slightly by using the coefficient read functions already provided by the wm_adsp driver. It is worth noting this change requires the running variable to be set before wm_adsp_buffer_init is called, however this is safe, since its all still under the power lock and nothing in the compressed code gates itself on running. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-4-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Move check for control existenceCharles Keepax2021-09-271-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking earlier in the function if a control already exists avoids superfluous string construction and also prepares for future refactoring. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-3-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm_adsp: Remove use of snd_ctl_elem_type_tSimon Trimmer2021-09-272-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for moving the generic DSP support out of ASoC, remove the use of the ALSA specific types for the control type. The use of an ALSA type was unnecessary, the simplified code is easier to read and avoids Sparse warnings. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-2-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ak4458: Use modern ASoC DAI format terminologyMark Brown2021-09-271-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ak4458 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210920163817.16490-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ak5558: Use modern ASoC DAI format terminologyMark Brown2021-09-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ak5558 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210920164753.17030-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ak4671: Use modern ASoC DAI format terminologyMark Brown2021-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ak4671 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210920164211.16718-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: alc5623: Use modern ASoC DAI format terminologyMark Brown2021-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the alc5623 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210920165036.17142-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: cpcap: Use modern ASoC DAI format terminologyMark Brown2021-09-271-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the cpcap driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210921213034.31427-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: codecs: Fix spelling mistake "Unsupport" -> "Unsupported"Colin Ian King2021-09-2718-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are spelling mistakes in dev_err error messages. Fix them. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210924231003.144502-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ad193x: Update to modern clocking terminologyMark Brown2021-09-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ad193x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916142232.33914-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: cs42l42: Use two thresholds and increased wait time for manual type ↵Stefan Binding2021-09-272-23/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detection Some headsets require very different comparator thresholds for type detection, as well as longer settling times. In order to detect a larger number of headsets, use 2 thresholds to give maximum coverage (1.25V and 1.75V), as well as a longer settling time of 100ms. This will not affect default audotodetect mode and applies to manual mode type detection only. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210927111437.18113-1-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: adav80x: Update to modern clocking terminologyMark Brown2021-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the adav80x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916151806.20756-6-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: adau1977: Update to modern clocking terminologyMark Brown2021-09-271-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the adau1977 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916151806.20756-5-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: adau17x1: Update to modern clocking terminologyMark Brown2021-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the adau17x1 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916151806.20756-4-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: adau1701: Update to modern clocking terminologyMark Brown2021-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the adau1701 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916151806.20756-3-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: adau1373: Update to modern clocking terminologyMark Brown2021-09-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the adau1373 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916151806.20756-2-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: adau1372: Update to modern clocking terminologyMark Brown2021-09-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the adau1372 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916151806.20756-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ad1836: Update to modern clocking terminologyMark Brown2021-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ad1836 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916142125.7226-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ak4642: Use modern ASoC DAI format terminologyMark Brown2021-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ak4642 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210920164042.16624-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: wcd9335: Use correct version to initialize Class HYassine Oudjana2021-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The versioning scheme was changed in an earlier patch, which caused the version being used to initialize WCD9335 to be interpreted as if it was WCD937X, which changed code paths causing broken headphones output. Pass WCD9335 instead of WCD9335_VERSION_2_0 to wcd_clsh_ctrl_alloc to fix it. Fixes: 19c5d1f6a0c3 ("ASoC: codecs: wcd-clsh: add new version support") Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210925022339.786296-1-y.oudjana@protonmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: alc5632: Use modern ASoC DAI format terminologyMark Brown2021-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the alc5632 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210920165128.17224-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ak4104: Update to modern clocking terminologyMark Brown2021-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ak4104 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916150922.20183-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: ak4118: Update to modern clocking terminologyMark Brown2021-09-271-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ak4118 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916150804.20058-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: zl38060: Update to modern clocking terminologyMark Brown2021-09-271-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the zl38060 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210921205117.4393-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cros_ec_codec: Use modern ASoC DAI format terminologyMark Brown2021-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the cros_ec_codec driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20210920170414.17903-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: codecs: max98390: simplify getting the adapter of a clientWolfram Sang2021-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20210918213553.14514-2-wsa+renesas@sang-engineering.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: ab8500: Update to modern clocking terminologyMark Brown2021-09-201-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the ab8500 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210916141335.43818-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5682s: make rt5682s_aif2_dai_ops and rt5682s_soc_component_devJiapeng Chong2021-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This symbol is not used outside of rt5682s.c, so marks it static. Fix the following sparse warning: sound/soc/codecs/rt5682s.c:2848:39: warning: symbol 'rt5682s_soc_component_dev' was not declared. Should it be static? sound/soc/codecs/rt5682s.c:2842:30: warning: symbol 'rt5682s_aif2_dai_ops' was not declared. Should it be static? Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/1631955726-77693-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: 88pm860x: Update to modern clocking terminologyMark Brown2021-09-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the 88pm860x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210916140847.50900-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "ASoC: cs42l42: Implement Manual Type detection as fallback" ↵Mark Brown2021-09-162-12/+146
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from Vitaly Rodionov <vitalyr@opensource.cirrus.com>: For some headsets CS42L42 autodetect mode is not working correctly. They will be detected as unknown types or as headphones. According to the CS42L42 datasheet, if the headset autodetect failed, then the driver should switch to manual mode and perform a manual steps sequence. These steps were missing in the current driver code. This patch will add manual mode fallback steps in case autodetect failed. The default behavior is not affected, manual mode runs only when autodetect failed. Tested for regression with autodetect with all known headsets - no regression. Tested with all headsets customers reported as false detected: Gumdrop DropTech B1 - detected as headset OK HUAWEI AM115 - detected as headset OK UGREEN EP103 - detected as headset OK HONOR AM116 - detected as headset OK Stefan Binding (1): ASoC: cs42l42: Implement Manual Type detection as fallback sound/soc/codecs/cs42l42.c | 104 ++++++++++++++++++++++++++++++++----- sound/soc/codecs/cs42l42.h | 54 +++++++++++++++++++ 2 files changed, 146 insertions(+), 12 deletions(-) -- 2.25.1
| * | | ASoC: cs42l42: Implement Manual Type detection as fallbackStefan Binding2021-09-162-12/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some headsets are not detected correctly by Automatic Type Detection on cs42l42. Instead, Manual Type Detection can be used to give a more accurate value. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210916102750.9212-2-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | misc: cs35l41: Remove unused pdn variableCharles Keepax2021-09-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove pdn variable that was made redundant in an earlier patch. Fixes: c2f14cc2bcdd ("ASoC: cs35l41: Fix use of an uninitialised variable") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210916082346.12001-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: cs42l42: Minor fix all errors reported by checkpatch.pl scriptVitaly Rodionov2021-09-161-5/+5
|/ / / | | | | | | | | | | | | | | | Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210916110932.10293-1-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs35l41: Fix a bunch of trivial code formating/style issuesCharles Keepax2021-09-155-496/+467
| | | | | | | | | | | | | | | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs35l41: Fixup the error messagesCharles Keepax2021-09-151-29/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not idiomatic for ASoC to print the function name in the error messages, however it is expected to show the return code. Update the error messages to follow these conventions. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs35l41: Don't overwrite returned error codeCharles Keepax2021-09-151-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In multiple places the driver overwrites the error code returned with a static error code, this is not helpful for debugging. Update to pass the error codes straight through. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs35l41: Combine adjacent register writesCharles Keepax2021-09-152-98/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cs35l41 is often connected over I2C which is a very slow bus, as such timings can be greatly improved combining writes where acceptable. Update several points where the driver does multiple register writes when a single one would suffice. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs35l41: Use regmap_read_poll_timeout to wait for OTP bootCharles Keepax2021-09-151-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Just clean up the code a little by using the helper rather than open coding waiting for OTP_BOOT_DONE. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs35l41: Fix use of an uninitialised variableCharles Keepax2021-09-151-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop checking PDN_DONE doesn't check the return value from regmap_read, nor does it initialise val. This means if regmap_read fails val will be checked for the PDN_DONE bit whilst being uninitialised. Fix this up by switching to regmap_read_poll_timeout which tidies up the code and avoids the uninitialised variable. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: mediatek: mt6359: Fix unexpected error in bind/unbind flowTrevor Wu2021-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mt6359-sound is a MFD driver. Because its regmap is retrieved from its parent, it shouldn't be freed in mt6359-sound driver. snd_soc_component_exit_regmap() will do regmap_exit(), this results in unexpected results if sound card unregister flow is invoked when users try to bind/unbind audio codec. Remove the usage of snd_soc_component_exit_regmap(). Instead, set component->regmap = NULL in the component remove function. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210915034659.25044-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "Cirrus Logic CS35L41 Amplifier" from David Rhodes ↵Mark Brown2021-09-137-0/+3190
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <drhodes@opensource.cirrus.com>: ASoC driver and devicetree documentation for a new Cirrus Logic amplifier CS35L41 v7 changes: Remove property 'classh-bst-max-limit' David Rhodes (2): ASoC: cs35l41: CS35L41 Boosted Smart Amplifier ASoC: cs35l41: Add bindings for CS35L41 .../devicetree/bindings/sound/cs35l41.yaml | 151 ++ include/sound/cs35l41.h | 34 + sound/soc/codecs/Kconfig | 12 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/cs35l41-i2c.c | 114 ++ sound/soc/codecs/cs35l41-spi.c | 143 ++ sound/soc/codecs/cs35l41-tables.c | 597 +++++++ sound/soc/codecs/cs35l41.c | 1545 +++++++++++++++++ sound/soc/codecs/cs35l41.h | 775 +++++++++ 9 files changed, 3375 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cs35l41.yaml create mode 100644 include/sound/cs35l41.h create mode 100644 sound/soc/codecs/cs35l41-i2c.c create mode 100644 sound/soc/codecs/cs35l41-spi.c create mode 100644 sound/soc/codecs/cs35l41-tables.c create mode 100644 sound/soc/codecs/cs35l41.c create mode 100644 sound/soc/codecs/cs35l41.h -- 2.25.1
| * | | ASoC: cs35l41: CS35L41 Boosted Smart AmplifierDavid Rhodes2021-09-137-0/+3190
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | SoC Audio driver for the Cirrus Logic CS35L41 amplifier Signed-off-by: David Rhodes <drhodes@opensource.cirrus.com> Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210907225719.2018115-2-drhodes@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: pcm5102a: increase rate from 192k to 384kgearhead2021-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | the pcm5102a is capable of 384k, but the current code limits it to 192k. This commit extends to 384k Signed-off-by: gearhead <ys3al35l@gmail.com> Link: https://lore.kernel.org/r/20210907210130.116769-1-ys3al35l@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt1011: add i2s reference control for rt1011Jack Yu2021-09-132-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | Add i2s reference control for rt1011 amp. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20210906101208.11585-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>