struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id];
int hd_audio = 0;
+ int hd_align = 1;
/* set hd mode */
switch (substream->runtime->format) {
break;
case SNDRV_PCM_FORMAT_S32_LE:
hd_audio = 1;
+ hd_align = 1;
break;
case SNDRV_PCM_FORMAT_S24_LE:
hd_audio = 1;
+ hd_align = 0;
break;
default:
dev_err(afe->dev, "%s() error: unsupported format %d\n",
mtk_regmap_update_bits(afe->regmap, memif->data->hd_reg,
1, hd_audio, memif->data->hd_shift);
+ mtk_regmap_update_bits(afe->regmap, memif->data->hd_align_reg,
+ memif->data->hd_align_mshift,
+ hd_align ? memif->data->hd_align_mshift : 0);
+
return 0;
}
EXPORT_SYMBOL_GPL(mtk_afe_fe_prepare);