diff options
Diffstat (limited to 'sound/soc/mediatek/common')
-rw-r--r-- | sound/soc/mediatek/common/mtk-afe-fe-dai.c | 13 | ||||
-rw-r--r-- | sound/soc/mediatek/common/mtk-base-afe.h | 1 | ||||
-rw-r--r-- | sound/soc/mediatek/common/mtk-btcvsd.c | 2 |
3 files changed, 11 insertions, 5 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; } diff --git a/sound/soc/mediatek/common/mtk-base-afe.h b/sound/soc/mediatek/common/mtk-base-afe.h index a8cf44d98244..a6f68c68581c 100644 --- a/sound/soc/mediatek/common/mtk-base-afe.h +++ b/sound/soc/mediatek/common/mtk-base-afe.h @@ -91,6 +91,7 @@ struct mtk_base_afe { int memif_size; struct mtk_base_afe_irq *irqs; int irqs_size; + int memif_32bit_supported; struct list_head sub_dais; struct snd_soc_dai_driver *dai_drivers; diff --git a/sound/soc/mediatek/common/mtk-btcvsd.c b/sound/soc/mediatek/common/mtk-btcvsd.c index 668fef3e319a..a554c57b6460 100644 --- a/sound/soc/mediatek/common/mtk-btcvsd.c +++ b/sound/soc/mediatek/common/mtk-btcvsd.c @@ -808,7 +808,7 @@ static ssize_t mtk_btcvsd_snd_write(struct mtk_btcvsd_snd *bt, spin_unlock_irqrestore(&bt->tx_lock, flags); if (!avail) { - int ret = wait_for_bt_irq(bt, bt->rx); + int ret = wait_for_bt_irq(bt, bt->tx); if (ret) return written_size; |