summaryrefslogtreecommitdiff
path: root/sound/soc/qcom
AgeCommit message (Collapse)Author
2019-03-11ASoC: qcom: add i2c dependency for SND_SOC_SDM845Arnd Bergmann
We must not select SND_SOC_MAX98927 unless CONFIG_I2C is also enabled: WARNING: unmet direct dependencies detected for SND_SOC_MAX98927 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=n] Selected by [y]: - SND_SOC_SDM845 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && QCOM_APR [=y] && MFD_CROS_EC [=y] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26ASoC: qcom: Kconfig: fix dependency for sdm845Cheng-Yi Chiang
SND_SOC_CROS_EC_CODEC depends on MFD_CROS_EC. Add that dependency to SND_SOC_SDM845 to fix unmet direct dependencies warning. Fixes: 74c6ecf4194e (ASoC: qcom: Kconfig: select dmic for sdm845) Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-20ASoC: qcom: Fix of-node refcount unbalance in qcom_snd_parse_of()Takashi Iwai
Although qcom_snd_parse_of() tries to manage the of-node refcount, there are still a few places that lead to the unblanced refcount in the error code path. Namely, - for_each_child_of_node() needs to unreference the iterator node if aborting the loop in the middle, - cpu, codec and platform node objects have to be unreferenced at each iteration, - platform and codec node objects have to be referred before jumping to the error handling code that unreference them unconditionally. This patch tries to address these by moving the assignment of platform and codec node objects to the beginning of the loop and adding the of_node_put() calls adequately. Fixes: c25e295cd77b ("ASoC: qcom: Add support to parse common audio device nodes") Cc: Patrick Lai <plai@codeaurora.org> Cc: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-20ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()Takashi Iwai
The apq8016 driver leaves the of-node refcount at aborting from the loop of for_each_child_of_node() in the error path. Not only the iterator node of for_each_child_of_node(), the children nodes referred from it for codec and cpu have to be properly unreferenced. Fixes: bdb052e81f62 ("ASoC: qcom: add apq8016 sound card support") Cc: Patrick Lai <plai@codeaurora.org> Cc: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: qcom: Kconfig: select dmic for sdm845Cheng-Yi Chiang
sdm845 uses dmic on EC so it should select CROS_EC_CODEC. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-28ASoC: apq8096: add slim supportSrinivas Kandagatla
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-16ASoC: sdm845: Set DAI format for dmic codecCheng-Yi Chiang
Set codec DAI format for dmic codec in startup. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-15ASoC: qcom: Kconfig: select max98927 for sdm845Cheng-Yi Chiang
Select SND_SOC_MAX98927 for SND_SOC_SDM845. Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-03ASoC: qdsp6: q6asm-dai: Fix a small memory leakDan Carpenter
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>
2019-01-03ASoC: qdsp6: q6asm-dai: Fix a NULL vs IS_ERR() bugDan Carpenter
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>
2019-01-03ASoC: qdsp6: q6asm-dai: Off by one in of_q6asm_parse_dai_data()Dan Carpenter
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>
2019-01-03ASoC: sdm845: set jack only for a specific backendRohit kumar
Headset codec is connected over PRIMARY_MI2S interface. Call set_jack for codec associated with Primary Mi2s interface. Also, set_jack to NULL when jack is freed. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-14ASoC: qdsp6: q6routing: add display_port_rx port routingRohit kumar
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>
2018-12-14ASoC: qdsp6: q6afe-dai: add support to Display port RX daisRohit kumar
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>
2018-12-14ASoC: qdsp6: qdafe: add support for display_port_rxRohit kumar
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>
2018-12-14ASoC: qdsp6: q6asm-dai: Add support to compress offloadSrinivas Kandagatla
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>
2018-12-14ASoC: qdsp6: q6asm: add support to MP3 formatSrinivas Kandagatla
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>
2018-12-13Merge branch 'for-4.20' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.21 intel dep
2018-12-11ASoC: sdm845: add rt5663 codec selectArnd Bergmann
Calling into the codec driver adds a dependency on that being reachable from the module: ERROR: "rt5663_sel_asrc_clk_src" [sound/soc/qcom/snd-soc-sdm845.ko] undefined! Add the corresponding select statement, as it is done in the other user (Intel). Fixes: f7485875a687 ("ASoC: sdm845: Add configuration for headset codec") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-07ASoC: sdm845: Add configuration for headset codecCheng-Yi Chiang
Set DAI format and sysclk for headset codec. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-07ASoC: sdm845: Add TDM configuration for speakerCheng-Yi Chiang
Set TDM time slots and DAI format for speaker codec. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-28ASoC: qcom: sdm845: Create and setup jack in init callbackCheng-Yi Chiang
Add a callback for init ops on dai_link to create and setup jack. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-28ASoC: qcom: sdm845: Add board specific dapm widgetsCheng-Yi Chiang
Add board specific dapm widgets so these widgets can be used in the route. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-21ASoC: sdm845: Add support for Secondary MI2S interfaceRohit kumar
Add support to configure bit clock for secondary MI2S TX interface. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-21ASoC: sdm845: Update slot_width for Quaternary TDM portRohit kumar
Change slot_width for quaternary TDM port to 16 and update bclk rate for TDM and MI2S interfaces accordingly. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-16ASoC: qcom: clean up indentation, remove extraneous tabColin Ian King
The return statement is indented too much by one level, fix this by removing the extraneous tab. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-13ASoC: qcom: Set dai_link id to each dai_linkRohit kumar
Frontend dai_link id is used for closing ADM sessions. During concurrent usecase when one session is closed, it closes other ADM session associated with other usecase too. Dai_link->id should always point to Frontend dai id. Set cpu_dai id as dai_link id to fix the issue. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-06ASoC: qdsp6: q6afe-dai: Fix the dai widgetsSrinivas Kandagatla
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>
2018-11-06ASoC: qdsp6: q6asm-dai: Only add routing once.Srinivas Kandagatla
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>
2018-11-05ASoC: qdsp6: q6afe: Fix wrong MI2S SD line maskRohit kumar
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>
2018-11-05ASoC: qdsp6: q6afe-dai: constify snd_soc_dai_ops structuresJulia Lawall
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>
2018-11-05ASoC: smd845: constify snd_soc_ops structureJulia Lawall
The snd_soc_ops structure can be const as it is only stored in the ops field of a snd_soc_dai_link structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-04ASoC: qdsp6: q6asm-dai: checking NULL vs IS_ERR()Dan Carpenter
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>
2018-09-27ASoC: qcom: qdsp6: remove duplicated includeYueHaibing
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>
2018-09-21ASoC: qcom: qdsp6: remove duplicated include from q6adm.czhong jiang
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>
2018-09-20ASoC: add for_each_card_prelinks() macroKuninori Morimoto
To be more readable code, this patch adds new for_each_card_prelinks() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-17ASoC: qdsp6: q6asm-dai: remove duplicated include from q6asm-dai.cYueHaibing
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>
2018-09-10ASoC: q6core: Use kmemdup to replace kzalloc + memcpyzhong jiang
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>
2018-09-10ASoC: qdsp6: q6asm-dai: clean up a returnDan Carpenter
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>
2018-09-03ASoC: q6routing: initialize data correctlySrinivas Kandagatla
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>
2018-08-08Merge branch 'asoc-4.18' into asoc-4.19 wmadsp depMark Brown
2018-08-06ASoC: qdsp6: q6afe-dai: add SLIM tx AIF_IN dapmSrinivas Kandagatla
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>
2018-08-06ASoC: qcom: remove unused header files from common.hSrinivas Kandagatla
This patch removes unused header files from common.h. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-06ASoC: sdm845: remove unused header filesSrinivas Kandagatla
This patch removes unused header files from the driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-06ASoC: apq8096: remove unused header filesSrinivas Kandagatla
This patch removes unused header files from the driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-06ASoC: qcom: make common.c as proper moduleSrinivas Kandagatla
This patch converts common helper functions in to proper module and also fixes below warning. WARNING: sound/soc/qcom/snd-soc-sdm845: 'qcom_snd_parse_of' exported twice. Previous export was in sound/soc/qcom/snd-soc-apq8096.ko Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-03ASoC: smd845: fix memory leakGustavo A. R. Silva
In case memory resources for *card* were allocated, release them before return. Addresses-Coverity-ID: 1472244 ("Resource leak") Fixes: 6b1687bf76ef ("ASoC: qcom: add sdm845 sound card support") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-02ASoC: smd845: remove auto rebindingSrinivas Kandagatla
Remove auto rebinding support, as component framework can deadlock in few usecases if we are trying to add new/remove component within a bind/unbind callbacks. Card rebinding is ASoC core feature so all the previous component framework stuff in q6dsp remains removed. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-02ASoC: apq8096: remove auto rebindingSrinivas Kandagatla
Remove auto rebinding support, as component framework can deadlock in few usecases if we are trying to add new/remove component within a bind/unbind callbacks. Card rebinding is ASoC core feature so all the previous component framework stuff in q6dsp remains removed. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-02ASoC: qcom: Fix unmet dependency warning for SND_SOC_SDM845Rohit kumar
Add DEPENDS_ON QCOM_APR for SND_SOC_SDM845 to fix the warning: unmet direct dependencies detected for SND_SOC_QDSP6. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>