.num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_dai_links),
};
+static struct snd_soc_card mt8183_mt6358_ts3a227_max98357b_card = {
+ .name = "mt8183_mt6358_ts3a227_max98357b",
+ .owner = THIS_MODULE,
+ .dai_link = mt8183_mt6358_ts3a227_dai_links,
+ .num_links = ARRAY_SIZE(mt8183_mt6358_ts3a227_dai_links),
+};
+
static struct snd_soc_codec_conf mt8183_mt6358_ts3a227_rt1015_amp_conf[] = {
{
.dlc = COMP_CODEC_CONF(RT1015_DEV0_NAME),
}
if (strcmp(dai_link->name, "I2S3") == 0) {
- if (card == &mt8183_mt6358_ts3a227_max98357_card) {
+ if (card == &mt8183_mt6358_ts3a227_max98357_card ||
+ card == &mt8183_mt6358_ts3a227_max98357b_card) {
dai_link->be_hw_params_fixup =
mt8183_i2s_hw_params_fixup;
dai_link->ops = &mt8183_mt6358_i2s_ops;
}
}
+ if (card == &mt8183_mt6358_ts3a227_max98357b_card) {
+ if (strcmp(dai_link->name, "I2S2") == 0 ||
+ strcmp(dai_link->name, "I2S3") == 0)
+ dai_link->dai_fmt = SND_SOC_DAIFMT_LEFT_J |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM;
+ }
+
if (hdmi_codec && strcmp(dai_link->name, "TDM") == 0)
dai_link->codecs->of_node = hdmi_codec;
.compatible = "mediatek,mt8183_mt6358_ts3a227_max98357",
.data = &mt8183_mt6358_ts3a227_max98357_card,
},
+ {
+ .compatible = "mediatek,mt8183_mt6358_ts3a227_max98357b",
+ .data = &mt8183_mt6358_ts3a227_max98357b_card,
+ },
{
.compatible = "mediatek,mt8183_mt6358_ts3a227_rt1015",
.data = &mt8183_mt6358_ts3a227_rt1015_card,