mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-03-01 03:21:21 +00:00
46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
From 546929867bf75032dbfa1c94160c4eb417a5efe7 Mon Sep 17 00:00:00 2001
|
|
From: Matthias Reichl <hias@horus.com>
|
|
Date: Sat, 20 Mar 2021 10:48:54 +0100
|
|
Subject: [PATCH 66/88] WIP: ALSA: pcm: ignore formats not supported by kodi in
|
|
ELD constraints
|
|
|
|
Only parse channel info and rates from the PCM SAD. All other SAD
|
|
formats are mapped to basic audio (2ch, 32-48kHz).
|
|
|
|
Signed-off-by: Matthias Reichl <hias@horus.com>
|
|
---
|
|
sound/core/pcm_drm_eld.c | 8 ++++++--
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/sound/core/pcm_drm_eld.c b/sound/core/pcm_drm_eld.c
|
|
index e7ec7a8b9d42..81c1f684daa8 100644
|
|
--- a/sound/core/pcm_drm_eld.c
|
|
+++ b/sound/core/pcm_drm_eld.c
|
|
@@ -33,8 +33,10 @@ static unsigned int sad_max_channels(const u8 *sad)
|
|
case HDMI_AUDIO_CODING_TYPE_DTS_HD:
|
|
case HDMI_AUDIO_CODING_TYPE_MLP:
|
|
return 8;
|
|
- default:
|
|
+ case HDMI_AUDIO_CODING_TYPE_PCM:
|
|
return 1 + (sad[0] & 7);
|
|
+ default:
|
|
+ return 2; // ignore, map to basic audio
|
|
}
|
|
}
|
|
|
|
@@ -49,8 +51,10 @@ static unsigned int sad_rate_mask(const u8 *sad)
|
|
case HDMI_AUDIO_CODING_TYPE_DTS_HD:
|
|
case HDMI_AUDIO_CODING_TYPE_MLP:
|
|
return 0x60; // 176.4, 192kHz
|
|
- default:
|
|
+ case HDMI_AUDIO_CODING_TYPE_PCM:
|
|
return sad[1] & 0x7f;
|
|
+ default:
|
|
+ return 0x07; // ignore, map to basic audio
|
|
}
|
|
}
|
|
|
|
--
|
|
2.17.1
|
|
|