SOF_DAI_AMD_BT, /**< AMD ACP BT*/
SOF_DAI_AMD_SP, /**< AMD ACP SP */
SOF_DAI_AMD_DMIC, /**< AMD ACP DMIC */
+ SOF_DAI_AMD_HS, /**< Amd HS */
SOF_DAI_MEDIATEK_AFE, /**< Mediatek AFE */
};
struct sof_ipc_dai_acp_params acpbt;
struct sof_ipc_dai_acp_params acpsp;
struct sof_ipc_dai_acpdmic_params acpdmic;
+ struct sof_ipc_dai_acp_params acphs;
struct sof_ipc_dai_mtk_afe_params afe;
};
} __packed;
dev_dbg(component->dev, "AMD_SP channels_min: %d channels_max: %d\n",
channels->min, channels->max);
break;
+ case SOF_DAI_AMD_HS:
+ rate->min = private->dai_config->acphs.fsync_rate;
+ rate->max = private->dai_config->acphs.fsync_rate;
+ channels->min = private->dai_config->acphs.tdm_slots;
+ channels->max = private->dai_config->acphs.tdm_slots;
+
+ dev_dbg(component->dev,
+ "AMD_HS channel_max: %d rate_max: %d\n", channels->max, rate->max);
+ break;
case SOF_DAI_AMD_DMIC:
rate->min = private->dai_config->acpdmic.pdm_rate;
rate->max = private->dai_config->acpdmic.pdm_rate;
return 0;
}
+static int sof_link_acp_hs_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink,
+ struct sof_ipc_dai_config *config, struct snd_sof_dai *dai)
+{
+ struct snd_soc_tplg_hw_config *hw_config = slink->hw_configs;
+ struct sof_dai_private_data *private = dai->private;
+ u32 size = sizeof(*config);
+
+ /* Configures the DAI hardware format and inverted clocks */
+ sof_dai_set_format(hw_config, config);
+
+ /* init IPC */
+ memset(&config->acphs, 0, sizeof(config->acphs));
+ config->hdr.size = size;
+
+ config->acphs.fsync_rate = le32_to_cpu(hw_config->fsync_rate);
+ config->acphs.tdm_slots = le32_to_cpu(hw_config->tdm_slots);
+
+ dev_info(scomp->dev, "ACP_HS config ACP%d channel %d rate %d\n",
+ config->dai_index, config->acphs.tdm_slots,
+ config->acphs.fsync_rate);
+
+ dai->number_configs = 1;
+ dai->current_config = 0;
+ private->dai_config = kmemdup(config, size, GFP_KERNEL);
+ if (!private->dai_config)
+ return -ENOMEM;
+
+ return 0;
+}
+
static int sof_link_afe_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink,
struct sof_ipc_dai_config *config, struct snd_sof_dai *dai)
{
case SOF_DAI_AMD_SP:
ret = sof_link_acp_sp_load(scomp, slink, config, dai);
break;
+ case SOF_DAI_AMD_HS:
+ ret = sof_link_acp_hs_load(scomp, slink, config, dai);
+ break;
case SOF_DAI_AMD_DMIC:
ret = sof_link_acp_dmic_load(scomp, slink, config, dai);
break;
{"ACP", SOF_DAI_AMD_BT},
{"ACPSP", SOF_DAI_AMD_SP},
{"ACPDMIC", SOF_DAI_AMD_DMIC},
+ {"ACPHS", SOF_DAI_AMD_HS},
{"AFE", SOF_DAI_MEDIATEK_AFE},
};