From cf6f531ab33b09ffdbaf166f25a7349662e6ec72 Mon Sep 17 00:00:00 2001 From: morph166955 <53797132+morph166955@users.noreply.github.com> Date: Fri, 3 Nov 2023 02:47:55 -0500 Subject: [PATCH] [sonos] Add TrueHD5.1 and normalize Atmos (#15831) * Add TrueHD5.1 and normalize Atmos --------- Signed-off-by: Ben Rosenblum --- .../binding/sonos/internal/handler/ZonePlayerHandler.java | 5 ++++- .../src/main/resources/OH-INF/i18n/sonos.properties | 4 +++- .../src/main/resources/OH-INF/thing/channels.xml | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java index 242fc486c..8f5a0f5e7 100644 --- a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java +++ b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java @@ -1468,7 +1468,7 @@ public class ZonePlayerHandler extends BaseThingHandler implements UpnpIOPartici case "59": case "61": case "63": - codec = "dolbyAtmos"; + codec = "Atmos"; break; case "33554434": case "33554488": @@ -1486,6 +1486,9 @@ public class ZonePlayerHandler extends BaseThingHandler implements UpnpIOPartici case "84934714": codec = "DDPlus51"; break; + case "84934716": + codec = "TrueHD51"; + break; case "84934718": codec = "PCM51"; break; diff --git a/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/i18n/sonos.properties b/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/i18n/sonos.properties index 0e9c06e8e..4335c96d2 100644 --- a/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/i18n/sonos.properties +++ b/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/i18n/sonos.properties @@ -91,11 +91,13 @@ channel-type.sonos.codec.description = Name of codec currently being decoded channel-type.sonos.codec.state.option.noSignal = No Signal channel-type.sonos.codec.state.option.silence = Silence channel-type.sonos.codec.state.option.DTS = DTS -channel-type.sonos.codec.state.option.dolbyAtmos = Dolby Atmos +channel-type.sonos.codec.state.option.Atmos = Dolby Atmos channel-type.sonos.codec.state.option.DD20 = Dolby Digital 2.0 channel-type.sonos.codec.state.option.PCM20 = Dolby Multichannel PCM 2.0 channel-type.sonos.codec.state.option.DD51 = Dolby Digital 5.1 +channel-type.sonos.codec.state.option.DDPlus20 = Dolby Digital Plus 2.0 channel-type.sonos.codec.state.option.DDPlus51 = Dolby Digital Plus 5.1 +channel-type.sonos.codec.state.option.TrueHD51 = Dolby TrueHD 5.1 channel-type.sonos.codec.state.option.PCM51 = Dolby Multichannel PCM 5.1 channel-type.sonos.codec.state.option.DTS51 = DTS Surround 5.1 channel-type.sonos.coordinator.label = Coordinator diff --git a/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/channels.xml index 8eb64d848..d38350d33 100644 --- a/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.sonos/src/main/resources/OH-INF/thing/channels.xml @@ -54,12 +54,13 @@ - + +