1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright(c) 2023 Intel Corporation. 4 */ 5 6 #ifndef __SOF_INTEL_BOARD_HELPERS_H 7 #define __SOF_INTEL_BOARD_HELPERS_H 8 9 #include <sound/soc.h> 10 #include "sof_hdmi_common.h" 11 #include "sof_ssp_common.h" 12 13 /* 14 * sof_rt5682_private: private data for rt5682 machine driver 15 * 16 * @mclk: mclk clock data 17 * @is_legacy_cpu: true for BYT/CHT boards 18 */ 19 struct sof_rt5682_private { 20 struct clk *mclk; 21 bool is_legacy_cpu; 22 }; 23 24 /* 25 * sof_card_private: common data for machine drivers 26 * 27 * @headset_jack: headset jack data 28 * @hdmi: init data for hdmi dai link 29 * @codec_type: type of headset codec 30 * @amp_type: type of speaker amplifier 31 * @dmic_be_num: number of Intel PCH DMIC BE link 32 * @hdmi_num: number of Intel HDMI BE link 33 * @rt5682: private data for rt5682 machine driver 34 */ 35 struct sof_card_private { 36 struct snd_soc_jack headset_jack; 37 struct sof_hdmi_private hdmi; 38 39 enum sof_ssp_codec codec_type; 40 enum sof_ssp_codec amp_type; 41 42 int dmic_be_num; 43 int hdmi_num; 44 45 union { 46 struct sof_rt5682_private rt5682; 47 }; 48 }; 49 50 enum sof_dmic_be_type { 51 SOF_DMIC_01, 52 SOF_DMIC_16K, 53 }; 54 55 int sof_intel_board_card_late_probe(struct snd_soc_card *card); 56 57 int sof_intel_board_set_dmic_link(struct device *dev, 58 struct snd_soc_dai_link *link, int be_id, 59 enum sof_dmic_be_type be_type); 60 int sof_intel_board_set_intel_hdmi_link(struct device *dev, 61 struct snd_soc_dai_link *link, int be_id, 62 int hdmi_id, bool idisp_codec); 63 64 #endif /* __SOF_INTEL_BOARD_HELPERS_H */ 65