aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/hisilicon
AgeCommit message (Collapse)AuthorFilesLines
2023-08-14ASoC: hisilicon: merge DAI call back functions into opsGravatar Kuninori Morimoto 1-1/+1
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/87leel9m5l.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-27ASoC: hisilicon: Migrate to new style legacy DAI naming flagGravatar Charles Keepax 1-0/+1
Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). This driver appears to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-13-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-06ASoC: hisilicon: Rename set_fmt_new back to set_fmtGravatar Charles Keepax 1-1/+1
Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220519154318.2153729-37-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-06ASoC: hisilicon: Update to use set_fmt_new callbackGravatar Charles Keepax 1-10/+10
As part of updating the core to directly tell drivers if they are clock provider or consumer update this CPU side driver to use the new direct callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220519154318.2153729-10-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15ASoC: hisilicon: Use devm_platform_get_and_ioremap_resource()Gravatar Yang Yingliang 1-2/+1
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210615133515.1376290-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-18ASoC: hisilicon: fix missing clk_disable_unprepare() on error in ↵Gravatar Yang Yingliang 1-6/+8
hi6210_i2s_startup() After calling clk_prepare_enable(), clk_disable_unprepare() need be called when calling clk_set_rate() failed. Fixes: 0bf750f4cbe1 ("ASoC: hisilicon: Add hi6210 i2s audio driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210518044514.607010-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-23treewide: Use fallthrough pseudo-keywordGravatar Gustavo A. R. Silva 1-2/+2
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-04-27ASoC: hisilicon: Use the defined variable to clean codeGravatar Tang Bin 1-6/+6
Use the defined variable "dev" to make the code cleaner. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20200427091520.12412-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-27ASoC: hisilicon: Use IS_ERR() instead of IS_ERR_OR_NULL()Gravatar Tang Bin 1-2/+2
In the function hi6210_i2s_probe(), devm_clk_get() doesn't return NULL. Thus use IS_ERR() to validate the return value instead of IS_ERR_OR_NULL(). Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20200427091145.4268-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 340Gravatar Thomas Gleixner 1-12/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 of the license this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 15 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000437.052642892@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285Gravatar Thomas Gleixner 1-9/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 of the license this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 100 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141900.918357685@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigGravatar Thomas Gleixner 2-0/+2
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>
2018-09-17ASoC: hisilicon: fix fall-through annotationsGravatar Gustavo A. R. Silva 1-2/+2
Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-13ASoC: hisilicon: fix spelling mistake: "uknown" -> "unknown"Gravatar Colin Ian King 1-1/+1
Trivial fix to spelling mistake in dev_err message text Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-06ASoC: hisilicon: remove duplicate includesGravatar Pravin Shedge 1-1/+0
These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17ASoC: hisilicon: constify snd_soc_dai_ops structureGravatar Gustavo A. R. Silva 1-1/+1
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14ASoC: hisilicon: localize functions without external linkageGravatar Takashi Sakamoto 1-5/+6
A driver for hi6210 sound interface on hi6220 boards includes some functions which has no external linkage. These functions should have static qualifier. This commit adds the qualifier to localize the functions. This issue is detected by sparse: hi6210-i2s.c:100:5: warning: symbol 'hi6210_i2s_startup' was not declared. Should it be static? hi6210-i2s.c:178:6: warning: symbol 'hi6210_i2s_shutdown' was not declared. Should it be static? hi6210-i2s.c:527:27: warning: symbol 'hi6210_i2s_dai_init' was not declared. Should it be static? Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-11ASoC: hisilicon: Use devm_snd_soc_register_componentGravatar John Stultz 1-16/+2
Per feedback from Mark Brown, this patch updates the hi6210-i2s driver to use devm_snd_soc_register_component which simplifies the logic a bit. Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-11ASoC: hisilicon: Address style nit to use break in final default of switch ↵Gravatar John Stultz 1-0/+2
statement Mark Brown suggested a style change to use break in the final default of a switch statement, so this patch addresses that. Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-11ASoC: hisilicon: Add error returns even for cases that shouldn't happen.Gravatar John Stultz 1-0/+2
This patch addresses feedback from Mark Brown, adding a few extra error returns in cases that shouldn't happen Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-10ASoC: hisilicon: Add hi6210 i2s audio driverGravatar Andy Green 4-0/+910
Add driver for hi6210 i2s controller found on hi6220 boards. Signed-off-by: Andy Green <andy.green@linaro.org> [jstultz: Forward ported to mainline, fairly major rework based on suggestions from Mark Brown] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>