aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/wcd938x.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-04ASoC: codecs: wcd938x: fix accessing regmap on unattached devicesKrzysztof Kozlowski1-0/+1
The WCD938x comes with three devices on two Linux drivers: 1. RX Soundwire device (wcd938x-sdw.c driver), 2. TX Soundwire device, which is used to access devices via regmap (also wcd938x-sdw.c driver), 3. platform device (wcd938x.c driver) - glue and component master, actually having most of the code using TX Soundwire device regmap. When RX and TX Soundwire devices probe, the component master (platform device) bind tries to write micbias configuration via TX Soundwire regmap. This might happen before TX Soundwire enumerates, so the regmap access fails. On Qualcomm SM8550 board with WCD9385: qcom-soundwire 6d30000.soundwire-controller: Qualcomm Soundwire controller v2.0.0 Registered wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:4 (ops wcd938x_sdw_component_ops) wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:3 (ops wcd938x_sdw_component_ops) qcom-soundwire 6ad0000.soundwire-controller: swrm_wait_for_wr_fifo_avail err write overflow Fix the issue by: 1. Moving the regmap creation from platform device to TX Soundwire device. The regmap settings are moved as-is with one difference: making the wcd938x_regmap_config const. 2. Using regmap in cache only mode till the actual TX Soundwire device enumerates and then sync the regmap cache. Cc: <stable@vger.kernel.org> # v3.14+ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Message-Id: <20230503144102.242240-1-krzysztof.kozlowski@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2021-07-16ASoC: codecs: wcd938x: remove unused port-map referenceSrinivas Kandagatla1-1/+0
port_map field was added prior to adding static port map support in soundwire. This makes port_map array in struct wcd938x_sdw_priv redundant and unused, so remove this. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210716105612.5284-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15ASoC: codecs: wcd938x: remove incorrect module interdependencySrinivas Kandagatla1-3/+1
For some reason we ended up with cyclic dependency between snd_soc_wcd938x and snd_soc_wcd938x_sdw modules. Remove this cyclic dependency by handling them in respective modules. Without this below error is reported during make modules_install depmod: ERROR: Cycle detected: snd_soc_wcd938x -> snd_soc_wcd938x_sdw -> snd_soc_wcd938x depmod: ERROR: Found 2 modules in dependency cycles! Fixes: 045442228868 ("ASoC: codecs: wcd938x: add audio routing and Kconfig") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210615132829.23067-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14ASoC: codecs: wcd938x-sdw: add SoundWire driverSrinivas Kandagatla1-0/+49
This patch adds support to SoundWire devices on WCD9380/WCD9385 Codec Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14ASoC: codecs: wcd938x: add basic driverSrinivas Kandagatla1-0/+671
This patch adds basic SoundWire codec driver to support for WCD938X TX and RX devices. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>