linux/sound/soc/intel/boards/sof_board_helpers.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright(c) 2023 Intel Corporation.
 */

#ifndef __SOF_INTEL_BOARD_HELPERS_H
#define __SOF_INTEL_BOARD_HELPERS_H

#include <sound/soc.h>
#include <sound/soc-acpi-intel-ssp-common.h>
#include "sof_hdmi_common.h"

/*
 * Common board quirks: from bit 8 to 31, LSB 8 bits reserved for machine
 *                      drivers
 */

/* SSP port number for headphone codec: 3 bits */
#define SOF_SSP_PORT_CODEC_SHIFT
#define SOF_SSP_PORT_CODEC_MASK
#define SOF_SSP_PORT_CODEC(quirk)

/* SSP port number for speaker amplifier: 3 bits */
#define SOF_SSP_PORT_AMP_SHIFT
#define SOF_SSP_PORT_AMP_MASK
#define SOF_SSP_PORT_AMP(quirk)

/* SSP port number for BT audio offload: 3 bits */
#define SOF_SSP_PORT_BT_OFFLOAD_SHIFT
#define SOF_SSP_PORT_BT_OFFLOAD_MASK
#define SOF_SSP_PORT_BT_OFFLOAD(quirk)

/* SSP port mask for HDMI capture: 6 bits */
#define SOF_SSP_MASK_HDMI_CAPTURE_SHIFT
#define SOF_SSP_MASK_HDMI_CAPTURE_MASK
#define SOF_SSP_MASK_HDMI_CAPTURE(quirk)

/* Number of idisp HDMI BE link: 3 bits */
#define SOF_NUM_IDISP_HDMI_SHIFT
#define SOF_NUM_IDISP_HDMI_MASK
#define SOF_NUM_IDISP_HDMI(quirk)

/* Board uses BT audio offload */
#define SOF_BT_OFFLOAD_PRESENT

enum {};

#define SOF_LINK_ORDER_MASK
#define SOF_LINK_ORDER_SHIFT

#define SOF_LINK_ORDER(k1, k2, k3, k4, k5, k6, k7)

#define SOF_LINK_IDS_MASK
#define SOF_LINK_IDS_SHIFT

#define SOF_LINK_IDS(k1, k2, k3, k4, k5, k6, k7)

/*
 * sof_da7219_private: private data for da7219 machine driver
 *
 * @mclk_en: true for mclk pin is connected
 * @pll_bypass: true for PLL bypass mode
 */
struct sof_da7219_private {};

/*
 * sof_rt5682_private: private data for rt5682 machine driver
 *
 * @mclk: mclk clock data
 * @is_legacy_cpu: true for BYT/CHT boards
 * @mclk_en: true for mclk pin is connected
 */
struct sof_rt5682_private {};

/*
 * sof_card_private: common data for machine drivers
 *
 * @headset_jack: headset jack data
 * @hdmi: init data for hdmi dai link
 * @codec_type: type of headset codec
 * @amp_type: type of speaker amplifier
 * @dmic_be_num: number of Intel PCH DMIC BE link
 * @hdmi_num: number of Intel HDMI BE link
 * @ssp_codec: ssp port number of headphone BE link
 * @ssp_amp: ssp port number of speaker BE link
 * @ssp_bt: ssp port number of BT offload BE link
 * @ssp_mask_hdmi_in: ssp port mask of HDMI-IN BE link
 * @bt_offload_present: true to create BT offload BE link
 * @hda_codec_present: true to create HDA codec BE links
 * @codec_link: pointer to headset codec dai link
 * @amp_link: pointer to speaker amplifier dai link
 * @link_order_overwrite: custom DAI link order
 * @link_id_overwrite: custom DAI link ID
 * @da7219: private data for da7219 machine driver
 * @rt5682: private data for rt5682 machine driver
 */
struct sof_card_private {};

int sof_intel_board_card_late_probe(struct snd_soc_card *card);
int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
				 struct sof_card_private *ctx);
struct sof_card_private *
sof_intel_board_get_ctx(struct device *dev, unsigned long board_quirk);

#endif /* __SOF_INTEL_BOARD_HELPERS_H */