summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom/qdsp6
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: qcom: Fix trivial code style issuesKrzysztof Kozlowski2023-12-184-17/+18
| | | | | | | | | | | | | | | | Fix few trivial code style issues, pointed out by checkpatch, so they do not get copied to new code (when old code is used as template): WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") WARNING: function definition argument 'struct platform_device *' should also have an identifier name ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line WARNING: Missing a blank line after declarations WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20231204100048.211800-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: audioreach: Add 4 channel supportKrzysztof Kozlowski2023-12-111-2/+12
| | | | | | | | | | Add support four channel streams. Map channel 3 and 4 to left/right surround ("quad(side)" from ffmpeg standard channel list) to match what is in qdsp6/q6dsp-common.c driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20231130180758.212172-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: audioreach: drop duplicate channel definesKrzysztof Kozlowski2023-12-112-8/+6
| | | | | | | | | q6apm.h header already defines channel mapping values, so drop duplicated devices from audioreach.h. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20231130180758.212172-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: audioreach: Commonize setting channel mappingsKrzysztof Kozlowski2023-12-111-19/+16
| | | | | | | | | | Move code assigning channel mapping values to a common helper function. This simplifies three out of four cases, with the last case using incompatible type (uint16_t array instead of uint8_t array). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20231130180758.212172-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6apm-lpass-dais: pass max number of channels to AudioreachKrzysztof Kozlowski2023-10-251-2/+2
| | | | | | | | | | | | | | Using the params_channels() helper when setting hw_params, results in passing to Audioreach minimum number of channels valid for given hardware. This is not valid for any hardware which sets minimum channels to two and maximum to something bigger, like four channels. Instead pass the maximum number of supported channels to allow playback of multi-channel formats. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231017161429.431663-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: DT matching and header cleanupsMark Brown2023-10-094-5/+3
|\ | | | | | | | | | | | | | | | | | | | | Merge series from Rob Herring <robh@kernel.org>: This is a series is part of ongoing clean-ups related to device matching and DT related implicit includes. Essentially of_device.h has a bunch of implicit includes and generally isn't needed any nore except for of_match_device(). As we also generally want to get rid of of_match_device() as well, I've done that so we're not updating the includes twice.
| * ASoC: Explicitly include correct DT includesRob Herring2023-10-094-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91 Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qcom: reduce number of binding headers includesKrzysztof Kozlowski2023-10-0911-5/+9
|/ | | | | | | | | | | Move the includes of binding headers from Qualcomm SoC sound drivers headers to unit files actually using these bindings. This reduces the amount of work for C preprocessor and makes usage of bindings easier to follow. No impact expected on the final binaries. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231005075250.88159-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: convert not to use asoc_xxx()Kuninori Morimoto2023-09-253-9/+9
| | | | | | | | | ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v8cgqnjc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: merge DAI call back functions into opsKuninori Morimoto2023-08-143-44/+53
| | | | | | | | | ALSA SoC merges DAI call backs into .ops. This patch merge these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a5v1b0ta.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: Remove unused declarationYue Haibing2023-08-131-2/+0
| | | | | | | | | Commit 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support") declared but never implemented these. Signed-off-by: Yue Haibing <yuehaibing@huawei.com Link: https://lore.kernel.org/r/20230811100130.36664-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org
* ASoC: q6dsp: q6apm: make g_apm staticMin-Hua Chen2023-07-131-1/+1
| | | | | | | | | | | | This patch fixes the following sprse warning: sound/soc/qcom/qdsp6/q6apm.c:30:14: sparse: warning: symbol 'g_apm' was not declared. Should it be static? No functional change intended Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com> Link: https://lore.kernel.org/r/20230713151744.86072-1-minhuadotchen@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC/soundwire/qdsp6/wcd: fix leaks and probe deferralMark Brown2023-07-061-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Johan Hovold <johan+linaro@kernel.org>: I've been hitting a race during boot which breaks probe of the sound card on the Lenovo ThinkPad X13s as I've previously reported here: https://lore.kernel.org/all/ZIHMMFtuDtvdpFAZ@hovoldconsulting.com/ The immediate issue appeared to be a probe deferral that was turned into a hard failure, but addressing that in itself only made things worse as it exposed further bugs. I was hoping someone more familiar with the code in question would look into this, but as this affects users of the X13s and breaks audio on my machine every fifth boot or so, I decided to investigate it myself. As expected, the Qualcomm codec drivers are broken and specifically leak resources on component remove, which in turn breaks sound card probe deferrals. The source of the deferral itself appears to be legitimate and was simply due to some audio component not yet having been registered due to random changes in timing during boot. These issues can most easily be reproduced by simply blacklisting the q6apm_dai module and loading it manually after boot. Included are also two patches that suppresses error messages on component probe deferral to avoid spamming the logs during boot.
| * ASoC: qdsp6: audioreach: fix topology probe deferralJohan Hovold2023-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Propagate errors when failing to load the topology component so that probe deferrals can be handled. Fixes: 36ad9bf1d93d ("ASoC: qdsp6: audioreach: add topology support") Cc: stable@vger.kernel.org # 5.17 Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230705123018.30903-3-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qcom: q6apm: do not close GPR port before closing graphSrinivas Kandagatla2023-07-061-1/+6
|/ | | | | | | | | | | | | Closing GPR port before graph close can result in un handled notifications from DSP, this results in spam of errors from GPR driver as there is no one to handle these notification at that point in time. Fix this by closing GPR port after graph close is finished. Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230705131842.41584-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6afe-dai: fix Display Port Playback stream nameSrinivas Kandagatla2023-07-051-1/+1
| | | | | | | | | | | | | | | With recent changes to add more display ports did not change the Stream name in q6afe-dai. This results in below error "ASoC: Failed to add route DISPLAY_PORT_RX -> Display Port Playback(*)" and sound card fails to probe. Fix this by adding correct stream name. Fixes: 90848a2557fe ("ASoC: qcom: q6dsp: add support to more display ports") Reported-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230705124850.40069-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6apm: use dai link pcm id as pcm device numberSrinivas Kandagatla2023-06-301-0/+1
| | | | | | | | | | | | | | | | | | | For some reason we ended up with a setup without this flag. This resulted in inconsistent sound card devices numbers which are also not starting as expected at dai_link->id. (Ex: MultiMedia1 pcm ended up with device number 4 instead of 0) With this patch patch now the MultiMedia1 PCM ends up with device number 0 as expected. [This is causing unstable numbering in userspace as other changes go in, which in turn gets noticed by some userspace. There's been multiple values so we can't simply pick one and revert to it. Do not backport since it will introduce a change. -- broonie] Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230628092404.13927-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: q6apm-dai: Add mmap and copy compress DAI callbacksSrinivas Kandagatla2023-06-191-0/+81
| | | | | | | | | | | Add q6apm mmap and copy compress DAI callbacks to support compress offload playback. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-12-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: q6apm-dai: Add compress set params and metadata DAI callbacksSrinivas Kandagatla2023-06-191-0/+107
| | | | | | | | | | | Add q6apm compress DAI callbacks for setting params and metadata to support compress offload playback. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-11-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: q6apm-dai: Add trigger/pointer compress DAI callbacksSrinivas Kandagatla2023-06-192-0/+68
| | | | | | | | | | | Add q6apm trigger and pointer compress DAI callbacks to support compress offload playback. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: q6apm-dai: Add compress DAI and codec caps get callbacksSrinivas Kandagatla2023-06-191-0/+53
| | | | | | | | | | | Add q6apm get compress DAI capabilities and codec capabilities callbacks to support compress offload playback. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: q6apm-dai: Add open/free compress DAI callbacksSrinivas Kandagatla2023-06-192-0/+137
| | | | | | | | | | | | Add q6apm open and free compress DAI callbacks to support compress offload playback. Include compress event handler callback also. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: audioreach: Add gapless feature supportMohammad Rafi Shaik2023-06-192-0/+18
| | | | | | | | | | | | Add support for setting EOS delay command and receive the EOS response from ADSP, for seamless compress offload playback feature. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: audioreach: Add support to set compress format paramsMohammad Rafi Shaik2023-06-193-19/+149
| | | | | | | | | | Add function for setting compress params. Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: audioreach: Add placeholder decoder for compress playbackSrinivas Kandagatla2023-06-194-0/+85
| | | | | | | | | | Add placeholder decoder graph module for compressed playback feature. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: audioreach: add helper function to set u32 paramSrinivas Kandagatla2023-06-192-76/+26
| | | | | | | | | | | | Some of the Audioreach commands take a u32 value, ex: PARAM_ID_MODULE_ENABLE. It makes more sense to provide a helper function so that other new commands can reuse this. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6dsp: q6apm: add end of stream eventsMohammad Rafi Shaik2023-06-191-0/+3
| | | | | | | | | | EOS event from dsp is currently not sent to the dai drivers, add the missing callback. Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6apm: add support to display ports in lpass daisSrinivas Kandagatla2023-05-111-0/+39
| | | | | | | | | This patch adds support to q6apm lpass display port dais. This support is required to get DP audio on x13s. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org Link: https://lore.kernel.org/r/20230509112202.21471-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
* ASoC: qcom: q6dsp: add support to more display portsSrinivas Kandagatla2023-05-111-16/+27
| | | | | | | | | | | Existing code base only supports one display port, this patch adds support upto 8 display ports. This support is required to allow platforms like X13s which have 3 display ports, and some of the Qualcomm SoCs there are upto 7 Display ports. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org Link: https://lore.kernel.org/r/20230509112202.21471-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
* ASoC: qcom: audioreach: add support for DISPLAY PORT SINK moduleSrinivas Kandagatla2023-05-112-0/+87
| | | | | | | | Add support for DISPLAY PORT SINK module and associated configuration. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org Link: https://lore.kernel.org/r/20230509112202.21471-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
* ASoC: qcom: q6dsp-common: move channel allocation to commonSrinivas Kandagatla2023-05-113-27/+43
| | | | | | | | | | move hdmi/dp channel allocation to a common function q6dsp_get_channel_allocation() so that we can reuse this across q6afe and q6apm drivers. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org Link: https://lore.kernel.org/r/20230509112202.21471-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
* ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new oneSrinivas Kandagatla2023-04-061-0/+3
| | | | | | | | | | | On multiple prepare calls, its possible that the playback graphs are not unloaded from the DSP, which can have some wierd side-effects, one of them is that the data not consumed without any errors. Fixes: c2ac3aec474d("ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230323164403.6654-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: audioreach: drop stray 'get' from error messageJohan Hovold2023-03-281-1/+1
| | | | | | | | | Drop the stray 'get', which appears to be a copy-paste error, from the registration-failure error message. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20230327145555.19351-1-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: qdsp6: Convert to platform remove callback returning voidUwe Kleine-König2023-03-201-4/+2
| | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-119-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6prm: fix incorrect clk_root passed to ADSPKrzysztof Kozlowski2023-03-051-2/+2
| | | | | | | | | | | | | | | | | The second to last argument is clk_root (root of the clock), however the code called q6prm_request_lpass_clock() with clk_attr instead (copy-paste error). This effectively was passing value of 1 as root clock which worked on some of the SoCs (e.g. SM8450) but fails on others, depending on the ADSP. For example on SM8550 this "1" as root clock is not accepted and results in errors coming from ADSP. Fixes: 2f20640491ed ("ASoC: qdsp6: qdsp6: q6prm: handle clk disable correctly") Cc: <stable@vger.kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230302122908.221398-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'soc-drivers-6.3' of ↵Linus Torvalds2023-02-271-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "As usual, there are lots of minor driver changes across SoC platforms from NXP, Amlogic, AMD Zynq, Mediatek, Qualcomm, Apple and Samsung. These usually add support for additional chip variations in existing drivers, but also add features or bugfixes. The SCMI firmware subsystem gains a unified raw userspace interface through debugfs, which can be used for validation purposes. Newly added drivers include: - New power management drivers for StarFive JH7110, Allwinner D1 and Renesas RZ/V2M - A driver for Qualcomm battery and power supply status - A SoC device driver for identifying Nuvoton WPCM450 chips - A regulator coupler driver for Mediatek MT81xxv" * tag 'soc-drivers-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (165 commits) power: supply: Introduce Qualcomm PMIC GLINK power supply soc: apple: rtkit: Do not copy the reg state structure to the stack soc: sunxi: SUN20I_PPU should depend on PM memory: renesas-rpc-if: Remove redundant division of dummy soc: qcom: socinfo: Add IDs for IPQ5332 and its variant dt-bindings: arm: qcom,ids: Add IDs for IPQ5332 and its variant dt-bindings: power: qcom,rpmpd: add RPMH_REGULATOR_LEVEL_LOW_SVS_L1 firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ MAINTAINERS: Update qcom CPR maintainer entry dt-bindings: firmware: document Qualcomm SM8550 SCM dt-bindings: firmware: qcom,scm: add qcom,scm-sa8775p compatible soc: qcom: socinfo: Add Soc IDs for IPQ8064 and variants dt-bindings: arm: qcom,ids: Add Soc IDs for IPQ8064 and variants soc: qcom: socinfo: Add support for new field in revision 17 soc: qcom: smd-rpm: Add IPQ9574 compatible soc: qcom: pmic_glink: remove redundant calculation of svid soc: qcom: stats: Populate all subsystem debugfs files dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes soc: qcom: pmic_glink: add CONFIG_NET/CONFIG_OF dependencies soc: qcom: pmic_glink: Introduce altmode support ...
| * soc: qcom: apr: make remove callback of apr driver void returnedDawei Li2023-01-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. As such, change the remove function for apr bus based drivers to return void. Signed-off-by: Dawei Li <set_pte_at@outlook.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/TYCP286MB23232B7968D34DB8323B0F16CAFB9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
* | ASoC: qcom: audioreach: fix ADSP ready checkSrinivas Kandagatla2023-02-091-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | currently q6apm_is_adsp_ready() will only return the cached value of previous result. If we are unlucky and previous result is not-ready then the caller will always get not-ready flag. This is not correct, we should query the dsp of its current state in irrespective of previous reported state. Fixes: 47bc8cf60e92 ("ASoC: qdsp6: audioreach: Add ADSP ready check") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230209122806.18923-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qcom: q6apm-dai: Add SNDRV_PCM_INFO_BATCH flagSrinivas Kandagatla2023-02-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, playing audio with PulseAudio with the qdsp6 driver results in distorted sound. It seems like its timer-based scheduling does not work properly with qdsp6 since setting tsched=0 in the PulseAudio configuration avoids the issue. Apparently this happens when the pointer() callback is not accurate enough. There is a SNDRV_PCM_INFO_BATCH flag that can be used to stop PulseAudio from using timer-based scheduling by default. According to https://www.alsa-project.org/pipermail/alsa-devel/2014-March/073816.html: The flag is being used in the sense explained in the previous audio meeting -- the data transfer granularity isn't fine enough but aligned to the period size (or less). q6apm-dai reports the position as multiple of prtd->pcm_count = snd_pcm_lib_period_bytes(substream) so it indeed just a multiple of the period size. Therefore adding the flag here seems appropriate and makes audio work out of the box. Comment log inspired by Stephan Gerhold sent for q6asm-dai.c few years back. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230209122806.18923-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qcom: q6apm-dai: fix race condition while updating the position pointerSrinivas Kandagatla2023-02-091-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | It is noticed that the position pointer value seems to get a get corrupted due to missing locking between updating and reading. Fix this by adding a spinlock around the position pointer. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230209122806.18923-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already preparedSrinivas Kandagatla2023-02-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | prepare callback can be called multiple times, so unprepare the stream if its already prepared. Without this DSP is not happy to setting the params on a already prepared graph. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230209122806.18923-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: audioreach: Add ADSP ready checkSrinivasa Rao Mandadapu2023-01-233-0/+19
|/ | | | | | | | | | | | Check for SPF readiness in prm driver probe to avoid race conditions during ADSP pil loading. This patch is to avoid, sending requests to ADSP before it's power domains are up and ready. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Tested-by: Ratna Deepthi Kudaravalli <rkudarav@qti.qualcomm.com> Link: https://lore.kernel.org/r/1673508617-27410-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6prm: Correct module descriptionKrzysztof Kozlowski2022-11-111-1/+1
| | | | | | | | The description was copied from APM driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20221111091328.31549-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: audioreach: add support to enable module commandSrinivas Kandagatla2022-10-282-1/+44
| | | | | | | | | Add support to enable Module command which is required for logging module to be able to debug. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: audioreach: add support for MFC ModuleSrinivas Kandagatla2022-10-282-1/+53
| | | | | | | | Add support to enable and configure Media Format Converter (MFC) Module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: audioreach: add support to enable SAL ModuleSrinivas Kandagatla2022-10-282-0/+88
| | | | | | | | Add support to Simple Accumulator-Limiter module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: audioreach: add support for more port connectionsSrinivas Kandagatla2022-10-283-39/+117
| | | | | | | | | | | | | | AudioReach Modules can connect to other modules using source and destination port, and each module in theory can support up to 255 port connections. But in practice this limit is at max 8 ports at a time. So add support for allowing multiple port connections. This support is needed for more detailed graphs like ECNS, speaker protection and so. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: audioreach: simplify module_list sz calculationSrinivas Kandagatla2022-10-281-4/+6
| | | | | | | | Simplify module_list size calculation by doing inside modules loop. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: audioreach: Simplify handing FE and BE graph connectionsSrinivas Kandagatla2022-10-285-174/+127
| | | | | | | | | | | | Current AudioReach design of connecting FE and BE graph is very complicated and not reliable. Instead used the virtual damp widgets private data to help identify the modules that needs connection at runtime. Also maintain a inter-graph connection info in the graph info, which can be used to both determine if the graphs are connected and at graph build time. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: audioreach: update dapm kcontrol private dataSrinivas Kandagatla2022-10-283-1/+20
| | | | | | | | | | | Update kcontrol private date to include more information like graph id and module instance id which its connected to. Also maintain this virtual dapm mixer widget in a list so that we could lookup while FE and BE connection are added. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>