aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/qcom
AgeCommit message (Collapse)AuthorFilesLines
2024-06-14ASoC: q6apm-lpass-dai: close graph on prepare errorsGravatar Srinivas Kandagatla 1-12/+20
There is an issue around with error handling and graph management with the exising code, none of the error paths close the graph, which result in leaving the loaded graph in dsp, however the driver thinks otherwise. This can have a nasty side effect specially when we try to load the same graph to dsp, dsp returns error which leaves the board with no sound and requires restart. Fix this by properly closing the graph when we hit errors between open and close. Fixes: 30ad723b93ad ("ASoC: qdsp6: audioreach: add q6apm lpass dai support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # X13s Link: https://lore.kernel.org/r/20240613-q6apm-fixes-v1-1-d88953675ab3@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-06-04ASoC: qcom: add missing MODULE_DESCRIPTION() macroGravatar Jeff Johnson 1-0/+1
make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/qcom/snd-soc-qcom-sdw.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://msgid.link/r/20240603-md-snd-soc-qcom-sdw-v1-1-101ea8bcdd38@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-09ASoC: Add missing module descriptionsGravatar Mark Brown 2-0/+4
Merge series from Takashi Iwai <tiwai@suse.de>: Hi, here is a trivial patch series to add the missing module descriptions to ASoC drivers, as make W=1 starts complaining the lack of MODULE_DESCRIPTION() since recently. The whole sound/soc/sof/* are untouched as there are too many files involved, and I left SOF people to address them. thanks, Takashi === Takashi Iwai (7): ASoC: ab8500: Add missing module description ASoC: sigmadsp: Add missing module description ASoC: qcom: Add missing module descriptions ASoC: dmaengine: Add missing module description ASoC: topology-test: Add missing module description ASoC: ux500: Add missing module description ASoC: xilinx: Add missing module descriptions sound/soc/codecs/ab8500-codec.c | 1 + sound/soc/codecs/sigmadsp.c | 1 + sound/soc/qcom/common.c | 2 ++ sound/soc/qcom/qdsp6/q6dsp-common.c | 2 ++ sound/soc/soc-generic-dmaengine-pcm.c | 1 + sound/soc/soc-topology-test.c | 1 + sound/soc/ux500/ux500_msp_dai.c | 1 + sound/soc/xilinx/xlnx_formatter_pcm.c | 2 ++ sound/soc/xilinx/xlnx_i2s.c | 1 + 9 files changed, 12 insertions(+) -- 2.43.0
2024-05-08ASoC: qcom: Add missing module descriptionsGravatar Takashi Iwai 2-0/+4
Now that make W=1 starts complaining the lack of MODULE_DESCRIPTION(), let's add the missing information. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/ZjpQm-hxLQtpgkUx@smile.fi.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/20240508091909.27062-4-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08ASoC: qcom: Use *-y instead of *-objs in MakefileGravatar Takashi Iwai 2-21/+21
*-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240507155540.24815-21-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07ASoC: Constify static snd_pcm_hardwareGravatar Mark Brown 2-3/+3
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Static 'struct snd_pcm_hardware' is not modified by few drivers and its copy is passed to the core, so it can be made const for increased code safety.
2024-05-07ASoC: Use snd_soc_substream_to_rtd() for accessingGravatar Mark Brown 8-31/+31
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Do not open-code snd_soc_substream_to_rtd() when accessing snd_pcm_substream->private_data. This makes code more consistent with rest of ASoC and allows in the future to move the field to any other place or add additional checks in snd_soc_substream_to_rtd().
2024-05-07ASoC: qcom: q6apm-dai: drop unused 'q6apm_dai_rtd' fieldsGravatar Krzysztof Kozlowski 1-8/+2
Remove few unused fields from 'struct q6apm_dai_rtd'. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240430140954.328127-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07ASoC: qcom: Constify static snd_pcm_hardwareGravatar Krzysztof Kozlowski 2-3/+3
Static 'struct snd_pcm_hardware' is not modified by the driver and its copy is passed to the core, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240429-n-asoc-const-snd-pcm-hardware-v1-1-c6ce60989834@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06ASoC: qcom: Use snd_soc_substream_to_rtd() for accessing private_dataGravatar Krzysztof Kozlowski 8-31/+31
Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-1-6f8a8902b479@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08ASoC: qcom: sc8280xp: Add support for QCM6490 and QCS6490Gravatar Mohammad Rafi Shaik 1-0/+2
Add compatibles for sound card on Qualcomm QCM6490 IDP and QCS6490 RB3Gen2 boards. Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://msgid.link/r/20240408042331.403103-3-quic_mohs@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-11Merge tag 'asoc-v6.9' of ↵Gravatar Takashi Iwai 1-1/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.9 This has been quite a small release, there's a lot of driver specific cleanups and minor enhancements but hardly anything on the core and only one new driver. Highlights include: - SoundWire support for AMD ACP 6.3 systems. - Support for reporting version information for AVS firmware. - Support DSPless mode for Intel Soundwire systems. - Support for configuring CS35L56 amplifiers using EFI calibration data. - Log which component is being operated on as part of power management trace events. - Support for Microchip SAM9x7, NXP i.MX95 and Qualcomm WCD939x
2024-02-21ASoC: qcom: Fix uninitialized pointer dmactlGravatar Colin Ian King 1-1/+1
In the case where __lpass_get_dmactl_handle is called and the driver id dai_id is invalid the pointer dmactl is not being assigned a value, and dmactl contains a garbage value since it has not been initialized and so the null check may not work. Fix this to initialize dmactl to NULL. One could argue that modern compilers will set this to zero, but it is useful to keep this initialized as per the same way in functions __lpass_platform_codec_intf_init and lpass_cdc_dma_daiops_hw_params. Cleans up clang scan build warning: sound/soc/qcom/lpass-cdc-dma.c:275:7: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch] Fixes: b81af585ea54 ("ASoC: qcom: Add lpass CPU driver for codec dma control") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://msgid.link/r/20240221134804.3475989-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-21ASoC: Intel: avs: Fixes and new platforms supportGravatar Mark Brown 1-4/+4
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: The avs-driver continues to be utilized on more recent Intel machines. As TGL-based (cAVS 2.5) e.g.: RPL, inherit most of the functionality from previous platforms: SKL <- APL <- CNL <- ICL <- TGL rather than putting everything into a single file, the platform-specific bits are split into cnl/icl/tgl.c files instead. Makes the division clear and code easier to maintain. Layout of the patchset: First are two changes combined together address the sound-clipping problem, present when only one stream is running - specifically one CAPTURE stream. Follow up is naming-scheme adjustment for some of the existing functions what improves code incohesiveness. As existing IPC/IRQ code operates solely on cAVS 1.5 architecture, it needs no abstraction. The situation changes when newer platforms come into the picture. Thus the next two patches abstract the existing IPC/IRQ handlers so that majority of the common code can be re-used. The ICCMAX change stands out a bit - the AudioDSP firmware loading procedure differs on ICL-based platforms (and onwards) and having a separate commit makes the situation clear to the developers who are going to support the solution from LTS perspective. For that reason I decided not to merge it into the commit introducing the icl.c file.
2024-02-13ASoC: q6dsp: fix event handler prototypeGravatar Arnd Bergmann 1-4/+4
clang-16 points out a mismatch in function types that was hidden by a typecast: sound/soc/qcom/qdsp6/q6apm-dai.c:355:38: error: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 355 | prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler, prtd, graph_id); sound/soc/qcom/qdsp6/q6apm-dai.c:499:38: error: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 499 | prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler_compr, prtd, graph_id); The only difference here is the 'payload' argument, which is not even used in this function, so just fix its type and remove the cast. Fixes: 88b60bf047fd ("ASoC: q6dsp: q6apm-dai: Add open/free compress DAI callbacks") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://msgid.link/r/20240213101105.459402-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-24ASoC: Merge up fixes due to dependency with new changesGravatar Mark Brown 1-5/+7
Future ES8326 changes depend on already applied fixes, merge up the fixes so we can do the new things.
2024-01-22ASoC: qcom: sc8280xp: limit speaker volumesGravatar Johan Hovold 1-5/+7
The UCM configuration for the Lenovo ThinkPad X13s has up until now been setting the speaker PA volume to the minimum -3 dB when enabling the speakers, but this does not prevent the user from increasing the volume further. Limit the digital gain and PA volumes to a combined -3 dB in the machine driver to reduce the risk of speaker damage until we have active speaker protection in place (or higher safe levels have been established). Note that the PA volume limit cannot be set lower than 0 dB or PulseAudio gets confused when the first 16 levels all map to -3 dB. Also note that this will probably need to be generalised using machine-specific limits, but a common limit should do for now. Cc: <stable@vger.kernel.org> # 6.5 Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://msgid.link/r/20240122181819.4038-3-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: qcom: Use devm_kcalloc() instead of devm_kzalloc()Gravatar Erick Archer 1-1/+1
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Erick Archer <erick.archer@gmx.com> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://msgid.link/r/20240106171635.19881-1-erick.archer@gmx.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-08Merge tag 'asoc-v6.8' of ↵Gravatar Takashi Iwai 26-66/+324
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.8 This is a relatively quiet release, there's a lot of driver specific changes and the usual high level of activity in the SOF core but the one big core change was Mormioto-san's work to support more N:M CPU:CODEC mapping cases. Highlights include: - Enhanced support for N:M CPU:CODEC mappings in the core and in audio-graph-card2. - Support for falling back to older SOF IPC versions where firmware for new versions is not available. - Support for notification of control changes generated by SOF firmware with IPC4. - Device tree support for describing parts of the card which can be active over suspend (for very low power playback or wake word use cases). - ACPI parsing support for the ES83xx driver, reducing the number of quirks neede for x86 systems. - Support for more AMD and Intel systems, NXP i.MX8m MICFIL, Qualcomm SM8250, SM8550, SM8650 and X1E80100. - Removal of Freescale MPC8610 support, the SoC is no longer supported by Linux.
2023-12-19ASoC: qcom: add sound card support for SM8650Gravatar Mark Brown 1-0/+1
Merge series from Neil Armstrong <neil.armstrong@linaro.org>: Document the SM8650 sound card using the SM8450 fallback and add the SM8650 compatible to the sc8280xp sound card driver to use the sm8650 card driver_name like SM8450 & SM8550.
2023-12-19GPIO inclusion fixes to misc sound driversGravatar Mark Brown 1-1/+0
Merge series from Linus Walleij <linus.walleij@linaro.org>: Mostly dropping unused headers, and a single driver rewrite.
2023-12-18ASoC: qcom: Fix trivial code style issuesGravatar Krzysztof Kozlowski 20-33/+34
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>
2023-12-18ASoC: qcom: Add x1e80100 sound machine driverGravatar Krzysztof Kozlowski 3-0/+182
Add sound machine driver for the soundcards on Qualcomm X1E80100 SoC, supporting up to four channel audio playback over Soundwire bus. The driver is based on existing sc8280xp.c driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20231204100116.211898-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ASoC: qcom: sc8280xp: Add support for SM8650Gravatar Neil Armstrong 1-0/+1
Add compatibles for sound card on Qualcomm SM8650 boards. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20231212-topic-sm8650-upstream-snd-card-v1-2-fbfc38471204@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ASoC: qcom: sc7180: Drop GPIO includeGravatar Linus Walleij 1-1/+0
This driver is including the legacy GPIO header <linux/gpio.h> but not using any symbols from it. Drop the include. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-2-e3004176bd8b@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-11ASoC: qcom: audioreach: Add 4 channel supportGravatar Krzysztof Kozlowski 1-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>
2023-12-11ASoC: qcom: audioreach: drop duplicate channel definesGravatar Krzysztof Kozlowski 2-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>
2023-12-11ASoC: qcom: audioreach: Commonize setting channel mappingsGravatar Krzysztof Kozlowski 1-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>
2023-12-04ASoC: qcom: sc8280xp: Limit speaker digital volumesGravatar Srinivas Kandagatla 1-0/+17
Limit the speaker digital gains to 0dB so that the users will not damage them. Currently there is a limit in UCM, but this does not stop the user form changing the digital gains from command line. So limit this in driver which makes the speakers more safer without active speaker protection in place. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20231204124736.132185-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-01ASoC: qcom: sc8280xp: Add support for SM8450 and SM8550Gravatar Krzysztof Kozlowski 1-0/+2
Add compatibles for sound card on Qualcomm SM8450 and SM8550 boards. The compatibles were already documented. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231201135332.154017-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-01ASoC: qcom: sc8280xp: set card driver name from match dataGravatar Krzysztof Kozlowski 1-4/+2
Sound machine drivers for all newer Qualcomm SoC platforms are the exactly same, therefore it makes sense to use same machine driver for newer platforms as well. Choice of sound topology and user-space Alsa UCM files depends however on card driver name, which must be customized per each board. Allow such customization by using driver match data as sound card driver name. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231201135332.154017-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-29ASoC: qcom: Move Soundwire runtime stream alloc to soundcardsGravatar Krzysztof Kozlowski 2-1/+27
Currently the Qualcomm Soundwire controller in its DAI startup op allocates the Soundwire stream runtime. This works fine for existing designs, but has limitations for stream runtimes with multiple controllers, like upcoming Qualcomm X1E80100 SoC with four WSA8840 speakers on two Soundwire controllers. When two Soundwire controllers are added to sound card codecs, Soundwire startup() is called twice, one for each Soundwire controller, and second execution overwrites what was set before. During shutdown() this causes double free. It is expected to have only one Soundwire stream runtime, thus it should be allocated from SoC soundcard context startup(), not from each Soundwire startup(). Such way will properly handle both cases: one and two Soundwire controllers in the stream runtime. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231128165638.757665-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-29ASoC: qcom: Add helper for allocating Soundwire stream runtimeGravatar Krzysztof Kozlowski 2-1/+45
Newer Qualcomm SoC soundcards will need to allocate Soundwire stream runtime in their startup op. The code will be exactly the same for all soundcards, so add a helper for that. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231128165638.757665-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26sc7180: Add qdsp based soundcardGravatar Mark Brown 1-22/+173
Merge series from Nikita Travkin <nikita@trvn.ru>: Some devices, such as Acer Aspire 1, can't use lpass dirrectly, but instead must use adsp core to play sound. Since otherwise the hardware is, usually, very similar across the devices on the same platform, it makes sense to reuse the same boardfile. This series refactors the sc7180.c slightly and adds the functions to control clocks via adsp instead of controlling the hardware directly.
2023-10-25ASoC: qcom: q6apm-lpass-dais: pass max number of channels to AudioreachGravatar Krzysztof Kozlowski 1-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>
2023-10-25ASoC: qcom: sc7180: Add support for qdsp6 baked soundGravatar Nikita Travkin 1-22/+173
Some sc7180 devices use audio adsp to play sound. The setup for this adsp is similar to the dirrect lpass usage but requires the use of different link ids and clocks. This commit adds support for the qdsp based audio, reusing the common parts like audio codec setup and jack creation. Since the setup is mostly generic and codec specific setup is guarded behind a check, a generic compatible is added, similar to other platforms. Even though those changes target Acer Aspire 1 as the only user of the adsp audio on this platform present upstream at the moment of the commit, those changes should be either dirrectly compatible or trivially expandable to the other devices that will be added in the future. Signed-off-by: Nikita Travkin <nikita@trvn.ru> Link: https://lore.kernel.org/r/20231020-sc7180-qdsp-sndcard-v1-2-157706b7d06f@trvn.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-23ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return voidGravatar Uwe Kleine-König 6-9/+6
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. asoc_qcom_lpass_cpu_platform_remove() returned zero unconditionally. Make it return void instead and convert all users to struct platform_device::remove_new(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231013221945.1489203-15-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: DT matching and header cleanupsGravatar Mark Brown 18-65/+55
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.
2023-10-09ASoC: qcom: reduce number of binding headers includesGravatar Krzysztof Kozlowski 19-8/+16
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>
2023-10-09ASoC: qcom: explicitly include binding headers when usedGravatar Krzysztof Kozlowski 4-0/+4
Few units use qcom,lpass.h binding headers but they rely on them being included through a different header. Make the usage explicit which allows easier to find the users of a header. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231005075250.88159-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: Use device_get_match_data()Gravatar Rob Herring 1-10/+5
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-5-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: qcom/lpass: Constify struct lpass_variantGravatar Rob Herring 8-44/+44
'struct lpass_variant' is used for driver match data which is supposed to be constant. It's not modified anywhere, so it's just a matter of adding 'const' everywhere. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-4-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: Explicitly include correct DT includesGravatar Rob Herring 10-11/+9
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>
2023-09-25ASoC: qcom: convert not to use asoc_xxx()Gravatar Kuninori Morimoto 15-107/+107
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>
2023-08-28Merge tag 'asoc-v6.6' of ↵Gravatar Takashi Iwai 14-103/+195
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.6 The rest of the updates for v6.6, some of the highlights include: - A big API cleanup from Morimoto-san, rationalising the places we put functions. - Lots of work on the SOF framework, AMD and Intel drivers, including a lot of cleanup and new device support. - Standardisation of the presentation of jacks from drivers. - Provision of some generic sound card DT properties. - Conversion oof more drivers to the maple tree register cache. - New drivers for AMD Van Gogh, AWInic AW88261, Cirrus Logic cs42l43, various Intel platforms, Mediatek MT7986, RealTek RT1017 and StarFive JH7110.
2023-08-18ASoC: qcom: Convert to generic PCM copy opsGravatar Takashi Iwai 1-6/+7
This patch converts the qcom lpass driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Banajit Goswami <bgoswami@quicinc.com> Link: https://lore.kernel.org/r/20230815190136.8987-21-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-14ASoC: qcom: merge DAI call back functions into opsGravatar Kuninori Morimoto 9-73/+80
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>
2023-08-13ASoC: q6dsp: Remove unused declarationGravatar Yue Haibing 1-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
2023-08-07ASoC: qcom: sdm845: Map missing jack kcontrolsGravatar Alper Nebi Yasak 1-6/+26
This driver does not properly map jack pins to kcontrols that PulseAudio and PipeWire need to handle jack detection events. The RT5663 codec used here can detect Headphone and Headset Mic connections. Expose each to userspace as a kcontrol. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-23-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: qcom: sc7280: Map missing jack kcontrolsGravatar Alper Nebi Yasak 1-7/+27
This driver does not properly map jack pins to kcontrols that PulseAudio and PipeWire need to handle jack detection events. The RT5682 and RT5682s codecs used here can detect Headphone and Headset Mic connections. Expose each to userspace as a kcontrol. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-22-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>