Skip to contentSkip to conversation

ASoC: mt8183: change supported formats of DL2 and UL1

PATCH In review Tzung-Bi Shih 2 participants 3 messages Mar 27, 2019 – Mar 28, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: mt8183: change supported formats of DL2 and UL1

DL2 and UL1 should only provide 16-bit, mono, 8kHz and 16kHz to userspace. Change the formats accordingly.

---
 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +6 -6
index 43be51bf0329..ad42da1b948c 100644
@@ -195,9 +195,9 @@ static struct snd_soc_dai_driver mt8183_memif_dai_driver[] = {
 		.playback = {
 			.stream_name = "DL2",
 			.channels_min = 1,
-			.channels_max = 2,
-			.rates = MTK_PCM_RATES,
-			.formats = MTK_PCM_FORMATS,
+			.channels_max = 1,
+			.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
+			.formats = SNDRV_PCM_FMTBIT_S16_LE,
 		},
 		.ops = &mtk_afe_fe_ops,
 	},
@@ -219,9 +219,9 @@ static struct snd_soc_dai_driver mt8183_memif_dai_driver[] = {
 		.capture = {
 			.stream_name = "UL1",
 			.channels_min = 1,
-			.channels_max = 2,
-			.rates = MTK_PCM_RATES,
-			.formats = MTK_PCM_FORMATS,
+			.channels_max = 1,
+			.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
+			.formats = SNDRV_PCM_FMTBIT_S16_LE,
 		},
 		.ops = &mtk_afe_fe_ops,
 	},
Signature · 1 line
2.21.0.392.gf8f6787159e-goog
#1 lore raw
Quoted 4 lines · Tzung-Bi Shih

DL2 and UL1 should only provide 16-bit, mono, 8kHz and 16kHz to userspace. Change the formats accordingly.

Hi,
i thought we should report hardware capabilities, not user space's
intention?

#2 lore raw

Hi,

I see. This is common code for all 8183 platform and indeed a wrong place to confine the formats.

Please ignore this patch.

Quoted 11 lines · KaiChieh Chuang
Quoted 4 lines · Tzung-Bi Shih

DL2 and UL1 should only provide 16-bit, mono, 8kHz and 16kHz to userspace. Change the formats accordingly.

Hi,
i thought we should report hardware capabilities, not user space's
intention?