@@ -37,6 +37,8 @@ static void log_quirks(struct device *dev)
SOF_SSP_GET_PORT(sof_sdw_quirk));
if (sof_sdw_quirk & SOF_SDW_NO_AGGREGATION)
dev_err(dev, "quirk SOF_SDW_NO_AGGREGATION enabled but no longer supported\n");
+ if (sof_sdw_quirk & SOF_CODEC_SPKR)
+ dev_dbg(dev, "quirk SOF_CODEC_SPKR enabled\n");
}
static int sof_sdw_quirk_cb(const struct dmi_system_id *id)
@@ -1382,6 +1384,9 @@ static int parse_sdw_endpoints(struct snd_soc_card *card,
dai_info = &codec_info->dais[adr_end->num];
sof_dai = find_dailink(sof_dais, adr_end);
+ if (dai_info->quirk && !(dai_info->quirk & sof_sdw_quirk))
+ continue;
+
dev_dbg(dev,
"Add dev: %d, 0x%llx end: %d, %s, %c/%c to %s: %d\n",
ffs(adr_link->mask) - 1, adr_dev->adr,
@@ -52,6 +52,8 @@ enum {
#define SOF_SSP_GET_PORT(quirk) (((quirk) >> 7) & GENMASK(5, 0))
/* Deprecated and no longer supported by the code */
#define SOF_SDW_NO_AGGREGATION BIT(14)
+/* If a CODEC has an optional speaker output, this quirk will enable it */
+#define SOF_CODEC_SPKR BIT(15)
/* BT audio offload: reserve 3 bits for future */
#define SOF_BT_OFFLOAD_SSP_SHIFT 15
@@ -80,6 +82,7 @@ struct sof_sdw_dai_info {
int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);
int (*rtd_init)(struct snd_soc_pcm_runtime *rtd);
bool rtd_init_done; /* Indicate that the rtd_init callback is done */
+ unsigned long quirk;
};
struct sof_sdw_codec_info {