distribution/projects/Amlogic/packages/linux/patches/S922X/004.06-digital-volume-is-limited-to.patch

17 lines
753 B
Diff

diff -rupN linux.orig/sound/soc/meson/axg-card.c linux/sound/soc/meson/axg-card.c
--- linux.orig/sound/soc/meson/axg-card.c 2023-09-12 12:02:59.597661952 +0000
+++ linux/sound/soc/meson/axg-card.c 2023-09-12 12:03:27.490291628 +0000
@@ -59,6 +59,13 @@ static int axg_card_tdm_dai_init(struct
(struct axg_dai_link_tdm_data *)priv->link_data[rtd->num];
struct snd_soc_dai *codec_dai;
int ret, i;
+ struct snd_soc_card *card = rtd->card;
+
+ /* Go-Ultra : Digital volume is limited to -2dB */
+ ret = snd_soc_limit_volume(card, "Master Playback Volume", 252);
+ if (ret < 0)
+ dev_dbg(codec_dai->dev,
+ "Not found mixer : 'Master Playback Volume'\n");
for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_set_tdm_slot(codec_dai,