diff options
author | Jiaxin Yu <jiaxin.yu@mediatek.com> | 2020-11-03 10:59:31 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-11-04 20:51:47 +0300 |
commit | 125ab5d588b0b3b842064c4d53a666ca74521ae8 (patch) | |
tree | a97cf45e70391dfab324c548b7338e54f719706c /sound/soc/mediatek/common/mtk-afe-fe-dai.c | |
parent | 682c5a72a2bb0745da73211bed5f47ccccd84025 (diff) | |
download | linux-125ab5d588b0b3b842064c4d53a666ca74521ae8.tar.xz |
ASoC: mediatek: mt8192: add platform driver
This patch adds mt8192 platform and affiliated drivers.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-3-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek/common/mtk-afe-fe-dai.c')
-rw-r--r-- | sound/soc/mediatek/common/mtk-afe-fe-dai.c | 13 |
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; } |