From: Amadeusz Sławiński Date: Mon, 10 Oct 2022 12:19:46 +0000 (+0200) Subject: ASoC: Intel: avs: Support da7219 on both KBL and APL X-Git-Tag: v6.2-rc1~126^2^2~154^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fecc00b448a9b89c858468318bfdddbc5bd9dc6d;p=thirdparty%2Fkernel%2Flinux.git ASoC: Intel: avs: Support da7219 on both KBL and APL KBL and APL devices use same codec but have different clock, so it must be set appropriately depending on device. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c index 02ae542ad7792..503a967a1c3a2 100644 --- a/sound/soc/intel/avs/boards/da7219.c +++ b/sound/soc/intel/avs/boards/da7219.c @@ -6,6 +6,7 @@ // #include +#include #include #include #include @@ -80,7 +81,10 @@ static int avs_da7219_codec_init(struct snd_soc_pcm_runtime *runtime) int ret; jack = snd_soc_card_get_drvdata(card); - clk_freq = 19200000; + if (soc_intel_is_apl()) + clk_freq = 19200000; + else /* kbl */ + clk_freq = 24576000; ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK, clk_freq, SND_SOC_CLOCK_IN); if (ret) {