History log of /linux-master/sound/soc/mediatek/mt8195/mt8195-dai-adda.c
Revision Date Author Comments
# ff728899 06-Mar-2023 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8195: add dai id check before accessing array

Coverity shows "afe_priv->dai_priv[dai_id] evaluates to an address that
could be at negative offset of an array.". Add dai id check before
accessing the array element. This ensures that the offset of an array must
be a valid index.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20230307040938.7484-2-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# ce3f9357 15-Sep-2021 Colin Ian King <colin.king@canonical.com>

ASoC: mediatek: mt8195: make array adda_dai_list static const

Don't populate the array adda_dai_list on the stack but instead it
static const. Also makes the object code smaller by 33 bytes:

Before:
text data bss dec hex filename
28271 11640 0 39911 9be7 mt8195/mt8195-dai-adda.o

After:
text data bss dec hex filename
28142 11736 0 39878 9bc6 mt8195/mt8195-dai-adda.o

(gcc version 11.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210915105027.10805-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3de3eba5 19-Aug-2021 Trevor Wu <trevor.wu@mediatek.com>

ASoC: mediatek: mt8195: support adda in platform driver

This patch adds mt8195 adda dai driver.

audio_h clock is used by ADSP bus and ADDA module.
When ADDA requires audio_h clock, it is switched to APLL1, otherwise
it is switched to Xtal_26m so that APLL1 can be turned off when audio
feature is not used.
ADSP bus only requires that the clock is on, so dynamic reparenting
is used for the purpose of lowering power consumption.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20210819084144.18483-5-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>