summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom/qdsp6
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: qdsp6: q6asm-dai: constify copied structureJulia Lawall2020-01-011-1/+1
| | | | | | | | | | | The q6asm_dai_hardware_capture structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/1577864614-5543-11-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: Drop superfluous ioctl PCM opsTakashi Iwai2019-12-111-1/+0
| | | | | | | | | | | ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Patrick Lai <plai@codeaurora.org> Cc: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20191210145406.21419-13-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6asm-dai: add support to flac decoderVinod Koul2019-11-181-1/+34
| | | | | | | | | | | Qualcomm DSPs also support the flac decoder, so add support for FLAC decoder and convert the snd_dec_flac params to qdsp format. Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20191115102705.649976-4-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6asm: add support to flac configSrinivas Kandagatla2019-11-182-0/+70
| | | | | | | | | | Qualcomm DSPs expect flac config to be set for flac decoders, so add the API to program the flac config to the DSP Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20191115102705.649976-3-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6asm-dai: remove snd_pcm_opsKuninori Morimoto2019-10-081-36/+35
| | | | | | | | | snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r23v90ek.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: q6routing: remove snd_pcm_opsKuninori Morimoto2019-10-081-9/+5
| | | | | | | | | snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87sgob90ep.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* kernel: fix typos and some coding style in commentsWeitao Hou2019-07-161-1/+1
| | | | | | | | | | | fix lenght to length Link: http://lkml.kernel.org/r/20190521050937.4370-1-houweitaoo@gmail.com Signed-off-by: Weitao Hou <houweitaoo@gmail.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Colin Ian King <colin.king@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ASoC: qdsp6: q6afe-dai: Add missing Slimbus0 audio routeSrinivas Kandagatla2019-07-041-0/+1
| | | | | | | | | For some reason SLIMBus RX0 playback is not added to audio routes. This patch adds the missing route. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190703123102.12626-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'v5.2-rc6' into asoc-5.3Mark Brown2019-06-261-0/+1
|\ | | | | | | Linux 5.2-rc6
| * treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | ASoC: qdsp6: q6core: Use struct_size() in kmemdup()Gustavo A. R. Silva2019-05-241-8/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*fwk) + fwk->num_services * sizeof(fwk->svc_api_info[0]); with: struct_size(fwk, svc_api_info, fwk->num_services) and so on... Notice that variables bytes and len are unnecessary, hence they are removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm-dai: Fix a small memory leakDan Carpenter2019-01-031-3/+9
| | | | | | | | | We can't return directly if snd_dma_alloc_pages() fails; we first need to free prtd->audio_client and prtd. Fixes: 22930c79ac5c ("ASoC: qdsp6: q6asm-dai: Add support to compress offload") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm-dai: Fix a NULL vs IS_ERR() bugDan Carpenter2019-01-031-2/+3
| | | | | | | | | The q6asm_audio_client_alloc() doesn't return NULL, it returns error pointers. Fixes: 22930c79ac5c ("ASoC: qdsp6: q6asm-dai: Add support to compress offload") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm-dai: Off by one in of_q6asm_parse_dai_data()Dan Carpenter2019-01-031-1/+1
| | | | | | | | | | The q6asm_fe_dais[] array has MAX_SESSIONS (8) elements so the > comparison should be >= or we access one element beyond the end of the array. Fixes: 22930c79ac5c ("ASoC: qdsp6: q6asm-dai: Add support to compress offload") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6routing: add display_port_rx port routingRohit kumar2018-12-141-0/+9
| | | | | | | | | This patch add support to Display_port_rx mixers required to select path between ASM stream and AFE ports. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6afe-dai: add support to Display port RX daisRohit kumar2018-12-141-0/+22
| | | | | | | | This patch adds support of AFE DAI for Display_port_rx port. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: qdafe: add support for display_port_rxRohit kumar2018-12-141-0/+4
| | | | | | | | | This patch adds support for Display_Port_Rx port in AFE. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm-dai: Add support to compress offloadSrinivas Kandagatla2018-12-141-1/+371
| | | | | | | | | This patch adds MP3 playback support in q6asm dais, adding other codec support should be pretty trivial. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm: add support to MP3 formatSrinivas Kandagatla2018-12-141-0/+5
| | | | | | | | This patch adds support to mp3 format in ASM module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'for-4.20' of ↵Mark Brown2018-12-134-145/+131
|\ | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.21 intel dep
| * ASoC: qdsp6: q6afe-dai: Fix the dai widgetsSrinivas Kandagatla2018-11-061-104/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | For some reason the dapm widgets are incorrectly defined from the start, Not sure how we ended up with such thing. Fix them now! Without this fix the backend dais are always powered up even if there is no active stream. Reported-by: Jimmy Cheng-Yi Chiang <cychiang@google.com> Reported-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qdsp6: q6asm-dai: Only add routing once.Srinivas Kandagatla2018-11-062-33/+19
| | | | | | | | | | | | | | | | | | q6asm routing gets added multiple times as part of dai probe. Move this to q6routing routes which has those widgets defined, this also fixes the issue where these are added each time at dai probe. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qdsp6: q6afe: Fix wrong MI2S SD line maskRohit kumar2018-11-051-8/+8
| | | | | | | | | | | | | | | | SD line mask for MI2S starts from BIT 0 instead of BIT 1. Fix all bit mask for MI2S SD lines. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6afe-dai: constify snd_soc_dai_ops structuresJulia Lawall2018-11-051-4/+4
|/ | | | | | | | | | | The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm-dai: checking NULL vs IS_ERR()Dan Carpenter2018-10-041-2/+3
| | | | | | | | | The q6asm_audio_client_alloc() doesn't return NULL, it returns error pointers. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: qdsp6: remove duplicated includeYueHaibing2018-09-272-2/+0
| | | | | | | | Remove duplicated includes linux/of_platform.h and linux/wait.h Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: qdsp6: remove duplicated include from q6adm.czhong jiang2018-09-211-9/+8
| | | | | | | | We include wait.h twice in q6adm.c. it is unnecessary. hence remove it. Further, order the include files as alphabet. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm-dai: remove duplicated include from q6asm-dai.cYueHaibing2018-09-171-1/+0
| | | | | | | | Remove duplicated include. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6core: Use kmemdup to replace kzalloc + memcpyzhong jiang2018-09-101-6/+2
| | | | | | | | kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to use the kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qdsp6: q6asm-dai: clean up a returnDan Carpenter2018-09-101-1/+1
| | | | | | | | | | Smatch complains that if both "psubstream" and "csubstream" are NULL then "ret" is uninitialized. That probably can't happen, but it's cleaner to just return zero anyway so let's do that. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: q6routing: initialize data correctlySrinivas Kandagatla2018-09-031-1/+3
| | | | | | | | | | | | | Some of the router data fields are left as default zeros which are valid dai ids, so initialize these to invalid value of -1. Without intializing these correctly get_session_from_id() can return incorrect session resulting in not closing the opened copp and messing up with the copp ref count. Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'asoc-4.18' into asoc-4.19 wmadsp depMark Brown2018-08-083-3/+8
|\
| * ASoC: qdsp6: q6routing: off by one in routing_hw_params()Dan Carpenter2018-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | The data->port_data[] array has AFE_MAX_PORTS elements so the check should be >= instead of > or we write one element beyond the end of the array. Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qdsp6: q6afe-dai: fix a range check in of_q6afe_parse_dai_data()Dan Carpenter2018-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | The main thing is that the data->priv[] array has AFE_PORT_MAX elements so the > condition should be >=. But we may as well check for negative values as well just to be safe. Fixes: 24c4cbcfac09 ("ASoC: qdsp6: q6afe: Add q6afe dai driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qdsp6: q6asm-dai: do not close port if its not openedSrinivas Kandagatla2018-07-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | asm ports are open as part of prepare, so for use cases like "aplay sample.wav" were sample.wav is not present. This would call port close eventhough port was never opened. DSP would return errors for such use cases. Avoid doing this by checking the port state. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qdsp6: q6afe-dai: do not close port if its not openedSrinivas Kandagatla2018-07-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | afe ports are open as part of prepare, so for use cases like "aplay sample.wav" were sample.wav is not present. This would call port close eventhough port was never opened. DSP would return errors for such use cases. Avoid doing this by checking the port state. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6afe-dai: add SLIM tx AIF_IN dapmSrinivas Kandagatla2018-08-061-0/+7
| | | | | | | | | | | | | | Add missing AIF_IN dapm for slim tx ports. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6routing: remove component framework related codeSrinivas Kandagatla2018-07-181-26/+6
| | | | | | | | | | | | | | | | | | Now that the component framework is integrated into the ASoC core, remove any redundant code in this driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6asm-dai: remove component framework related codeSrinivas Kandagatla2018-07-181-31/+4
| | | | | | | | | | | | | | | | | | Now that the component framework is integrated into the ASoC core, remove any redundant code in this driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6afe-dai: remove component fw related codeSrinivas Kandagatla2018-07-181-30/+4
| | | | | | | | | | | | | | | | | | Now that the component framework is integrated into the ASoC core, remove any redundant code in this driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6afe-dai: Do not overwrite slim dai num_channelsSrinivas Kandagatla2018-07-041-1/+0
| | | | | | | | | | | | | | | | num_channels for slim dais are aready set int set_channel_map, do not overwrite them in hw_params. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6routing: add slim rx routingsSrinivas Kandagatla2018-07-041-0/+28
| | | | | | | | | | | | | | This patch add routings mixer controls for slim rx ports. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6afe-dai: add support to slim tx daisSrinivas Kandagatla2018-07-041-14/+161
| | | | | | | | | | | | | | This patch adds support to SLIMbus TX dais in AFE module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6afe: Add missing slimbus capture portsSrinivas Kandagatla2018-07-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | Existing code already has support for SLIMbus TX and RX, only thing that was missing from TX side was mapping between virtual to actual DSP port ids. This patch adds those mappings. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: qdafe: fix some off by one bugsDan Carpenter2018-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | The > should be >= or we could read one element beyond the end of the port_maps[] array. Fixes: 7fa2d70f9766 ("ASoC: qdsp6: q6afe: Add q6afe driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6asm: remove unused struct q6asm memberSrinivas Kandagatla2018-06-261-1/+0
| | | | | | | | | | | | | | | | pcmdev in struct q6asm seems be left over and unused, so just remove it. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6routing: add proper error checkSrinivas Kandagatla2018-06-261-1/+1
| | | | | | | | | | | | | | | | | | q6adm_open can return error pointer or a null in error cases. Fix the return handling. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6routing: support dt based module loadingSrinivas Kandagatla2018-06-261-0/+7
| | | | | | | | | | | | | | | | This patch uses new compatible string to make DT based module loading work. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6asm-dai: support dt based module loadingSrinivas Kandagatla2018-06-261-0/+7
| | | | | | | | | | | | | | | | This patch uses new compatible string to make DT based module loading work. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: qdsp6: q6afe-dai: support dt based module loadingSrinivas Kandagatla2018-06-261-0/+7
| | | | | | | | | | | | | | | | This patch uses new compatible string to make DT based module loading work. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud