[pulseaudio-commits] Branch 'next' - src/pulse src/pulsecore
Arun Raghavan
arun at kemper.freedesktop.org
Fri May 4 17:12:07 UTC 2018
src/pulse/format.c | 2 ++
src/pulse/format.h | 8 ++++++++
src/pulsecore/core-format.c | 6 +++++-
3 files changed, 15 insertions(+), 1 deletion(-)
New commits:
commit ea05b348aefe0ff6a8f28011150dcddb1c026863
Author: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Date: Tue Aug 15 12:24:12 2017 -0500
format: Add support for Dolby TrueHD and DTS-HD HBR passthrough
Add definitions and fixups for channel count
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
diff --git a/src/pulse/format.c b/src/pulse/format.c
index 8474978d..07b4420e 100644
--- a/src/pulse/format.c
+++ b/src/pulse/format.c
@@ -47,6 +47,8 @@ static const char* const _encoding_str_table[]= {
[PA_ENCODING_MPEG_IEC61937] = "mpeg-iec61937",
[PA_ENCODING_DTS_IEC61937] = "dts-iec61937",
[PA_ENCODING_MPEG2_AAC_IEC61937] = "mpeg2-aac-iec61937",
+ [PA_ENCODING_TRUEHD_IEC61937] = "truehd-iec61937",
+ [PA_ENCODING_DTSHD_IEC61937] = "dtshd-iec61937",
[PA_ENCODING_ANY] = "any",
};
diff --git a/src/pulse/format.h b/src/pulse/format.h
index 2143bb51..584032fb 100644
--- a/src/pulse/format.h
+++ b/src/pulse/format.h
@@ -56,6 +56,12 @@ typedef enum pa_encoding {
PA_ENCODING_MPEG2_AAC_IEC61937,
/**< MPEG-2 AAC data encapsulated in IEC 61937 header/padding. \since 4.0 */
+ PA_ENCODING_TRUEHD_IEC61937,
+ /**< Dolby TrueHD data encapsulated in IEC 61937 header/padding. \since 13.0 */
+
+ PA_ENCODING_DTSHD_IEC61937,
+ /**< DTS-HD Master Audio encapsulated in IEC 61937 header/padding. \since 13.0 */
+
PA_ENCODING_MAX,
/**< Valid encoding types must be less than this value */
@@ -71,6 +77,8 @@ typedef enum pa_encoding {
#define PA_ENCODING_MPEG_IEC61937 PA_ENCODING_MPEG_IEC61937
#define PA_ENCODING_DTS_IEC61937 PA_ENCODING_DTS_IEC61937
#define PA_ENCODING_MPEG2_AAC_IEC61937 PA_ENCODING_MPEG2_AAC_IEC61937
+#define PA_ENCODING_TRUEHD_IEC61937 PA_ENCODING_TRUEHD_IEC61937
+#define PA_ENCODING_DTSHD_IEC61937 PA_ENCODING_DTSHD_IEC61937
#define PA_ENCODING_MAX PA_ENCODING_MAX
#define PA_ENCODING_INVALID PA_ENCODING_INVALID
/** \endcond */
diff --git a/src/pulsecore/core-format.c b/src/pulsecore/core-format.c
index 9d3c8d60..c3db2678 100644
--- a/src/pulsecore/core-format.c
+++ b/src/pulsecore/core-format.c
@@ -226,7 +226,11 @@ int pa_format_info_to_sample_spec_fake(const pa_format_info *f, pa_sample_spec *
* formats, this function should return a non-zero values for these. */
ss->format = PA_SAMPLE_S16LE;
- ss->channels = 2;
+ if ((f->encoding == PA_ENCODING_TRUEHD_IEC61937) ||
+ (f->encoding == PA_ENCODING_DTSHD_IEC61937))
+ ss->channels = 8;
+ else
+ ss->channels = 2;
if (map)
pa_channel_map_init_stereo(map);
More information about the pulseaudio-commits
mailing list