summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/common/mtk-afe-fe-dai.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-12-11 20:48:04 +0300
committerMark Brown <broonie@kernel.org>2020-12-11 20:48:04 +0300
commit460aa020f56c974a3e7e5b5378b2355fec6a2c11 (patch)
tree959dc05609eec2a040245f43964ae5738ee741cb /sound/soc/mediatek/common/mtk-afe-fe-dai.c
parent031616c434db05ce766f76c62865f55698e0924f (diff)
parent84de089e770b57280d87dff51be894b6fda18810 (diff)
downloadlinux-460aa020f56c974a3e7e5b5378b2355fec6a2c11.tar.xz
Merge remote-tracking branch 'asoc/for-5.11' into asoc-next
Diffstat (limited to 'sound/soc/mediatek/common/mtk-afe-fe-dai.c')
-rw-r--r--sound/soc/mediatek/common/mtk-afe-fe-dai.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/soc/mediatek/common/mtk-afe-fe-dai.c b/sound/soc/mediatek/common/mtk-afe-fe-dai.c
index 882cdf86c8bf..3cb2adf420bb 100644
--- a/sound/soc/mediatek/common/mtk-afe-fe-dai.c
+++ b/sound/soc/mediatek/common/mtk-afe-fe-dai.c
@@ -542,8 +542,13 @@ int mtk_memif_set_format(struct mtk_base_afe *afe,
break;
case SNDRV_PCM_FORMAT_S32_LE:
case SNDRV_PCM_FORMAT_U32_LE:
- hd_audio = 1;
- hd_align = 1;
+ if (afe->memif_32bit_supported) {
+ hd_audio = 2;
+ hd_align = 0;
+ } else {
+ hd_audio = 1;
+ hd_align = 1;
+ }
break;
case SNDRV_PCM_FORMAT_S24_LE:
case SNDRV_PCM_FORMAT_U24_LE:
@@ -556,10 +561,10 @@ int mtk_memif_set_format(struct mtk_base_afe *afe,
}
mtk_regmap_update_bits(afe->regmap, memif->data->hd_reg,
- 1, hd_audio, memif->data->hd_shift);
+ 0x3, hd_audio, memif->data->hd_shift);
mtk_regmap_update_bits(afe->regmap, memif->data->hd_align_reg,
- 1, hd_align, memif->data->hd_align_mshift);
+ 0x1, hd_align, memif->data->hd_align_mshift);
return 0;
}