aboutsummaryrefslogtreecommitdiff
path: root/include/linux/firmware/mediatek
AgeCommit message (Collapse)AuthorFilesLines
2024-06-17ASoC: SOF: mediatek: Constify struct mtk_adsp_ipc_opsChristophe JAILLET1-1/+1
'struct mtk_adsp_ipc_ops' is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct mtk_adsp_ipc" also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 15533 2383 0 17916 45fc sound/soc/sof/mediatek/mt8195/mt8195.o After: ===== text data bss dec hex filename 15557 2367 0 17924 4604 sound/soc/sof/mediatek/mt8195/mt8195.o Signed-off-by: Christophe JAILLET <[email protected]> Link: https://msgid.link/r/a45d6b2b5ec040ea0fc78fca662c2dca3f13a49f.1718312321.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <[email protected]>
2023-07-31ASoC: SOF: mediatek: remove error checks on NULL ipcPierre-Louis Bossart1-6/+0
mtk_adsp_ipc_get_data() can return NULL, but the value is not checked before being used, leading to static analysis warnings. sound/soc/sof/mediatek/mt8195/mt8195.c:90:32: error: dereference of NULL ‘0’ [CWE-476] [-Werror=analyzer-null-dereference] 90 | spin_lock_irqsave(&priv->sdev->ipc_lock, flags); | ~~~~^~~~~~ It appears this is not really a possible problem, so remove those checks. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Yaochun Hung <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-05-16firmware: mediatek: Add adsp ipc protocol interfaceTingHan Shen1-0/+65
Some of mediatek processors contain the Tensilica HiFix DSP for audio processing. The communication between Host CPU and DSP firmware is taking place using a shared memory area for message passing. ADSP IPC protocol offers (send/recv) interfaces using mediatek-mailbox APIs. We use two mbox channels to implement a request-reply protocol. Signed-off-by: Allen-KH Cheng <[email protected]> Signed-off-by: TingHan Shen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Curtis Malainey <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Reviewed-by: YC Hung <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>