Path: blob/master/sound/soc/intel/boards/sof_sdw_common.h
26493 views
/* SPDX-License-Identifier: GPL-2.0-only1* Copyright (c) 2020 Intel Corporation2*/34/*5* sof_sdw_common.h - prototypes for common helpers6*/78#ifndef SND_SOC_SOF_SDW_COMMON_H9#define SND_SOC_SOF_SDW_COMMON_H1011#include <linux/bits.h>12#include <linux/types.h>13#include <sound/soc.h>14#include <sound/soc_sdw_utils.h>15#include "sof_hdmi_common.h"1617#define MAX_HDMI_NUM 418#define SOC_SDW_MAX_CPU_DAIS 1619#define SOC_SDW_INTEL_BIDIR_PDI_BASE 22021/* 8 combinations with 4 links + unused group 0 */22#define SDW_MAX_GROUPS 92324enum {25SOF_PRE_TGL_HDMI_COUNT = 3,26SOF_TGL_HDMI_COUNT = 4,27};2829enum {30SOF_I2S_SSP0 = BIT(0),31SOF_I2S_SSP1 = BIT(1),32SOF_I2S_SSP2 = BIT(2),33SOF_I2S_SSP3 = BIT(3),34SOF_I2S_SSP4 = BIT(4),35SOF_I2S_SSP5 = BIT(5),36};3738/* Deprecated and no longer supported by the code */39#define SOC_SDW_FOUR_SPK BIT(4)40#define SOF_SDW_TGL_HDMI BIT(5)41#define SOC_SDW_PCH_DMIC BIT(6)42#define SOF_SSP_PORT(x) (((x) & GENMASK(5, 0)) << 7)43#define SOF_SSP_GET_PORT(quirk) (((quirk) >> 7) & GENMASK(5, 0))44/* Deprecated and no longer supported by the code */45#define SOC_SDW_NO_AGGREGATION BIT(14)4647/* BT audio offload: reserve 3 bits for future */48#define SOF_BT_OFFLOAD_SSP_SHIFT 1549#define SOF_BT_OFFLOAD_SSP_MASK (GENMASK(17, 15))50#define SOF_BT_OFFLOAD_SSP(quirk) \51(((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)52#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(18)5354struct intel_mc_ctx {55struct sof_hdmi_private hdmi;56/* To store SDW Pin index for each SoundWire link */57unsigned int sdw_pin_index[SDW_INTEL_MAX_LINKS];58};5960/* generic HDMI support */61int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd);6263int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card);6465#endif666768