Skip to content

Commit

Permalink
TV Linux app - Move audio output and media playback cluster to endpoi…
Browse files Browse the repository at this point in the history
…nt 1 (#18710)

* Move Audio and Media Player endpoints

* Add tests fix + minor fixes

* Fix build issues

* Restyle fix

* Add missing file from zap regen

* Restyle fix
  • Loading branch information
lazarkov authored and pull[bot] committed Jun 9, 2022
1 parent ffd140e commit 70d1f8c
Show file tree
Hide file tree
Showing 8 changed files with 259 additions and 69 deletions.
23 changes: 16 additions & 7 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ server cluster AudioOutput = 1291 {

readonly attribute OutputInfo outputList[] = 0;
readonly attribute int8u currentOutput = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down Expand Up @@ -2340,6 +2343,9 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster MediaPlayback {
}

server cluster MediaInput {
callback attribute inputList;
ram attribute currentInput;
Expand All @@ -2364,6 +2370,16 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster AudioOutput {
callback attribute outputList;
ram attribute currentOutput;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0x001;
ram attribute clusterRevision default = 1;
}

server cluster ApplicationLauncher {
callback attribute catalogList;
callback attribute currentApp;
Expand Down Expand Up @@ -2407,13 +2423,6 @@ endpoint 2 {
ram attribute featureMap;
callback attribute clusterRevision default = 1;
}

server cluster AudioOutput {
callback attribute outputList;
ram attribute currentOutput;
ram attribute featureMap default = 0x0001;
ram attribute clusterRevision default = 1;
}
}

endpoint 3 {
Expand Down
189 changes: 180 additions & 9 deletions examples/tv-app/tv-common/tv-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 70,
"featureLevel": 71,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -427,7 +427,7 @@
],
"attributes": [
{
"name": "scene count",
"name": "SceneCount",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -443,7 +443,7 @@
"reportableChange": 0
},
{
"name": "current scene",
"name": "CurrentScene",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -459,11 +459,11 @@
"reportableChange": 0
},
{
"name": "current group",
"name": "CurrentGroup",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int16u",
"type": "group_id",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
Expand All @@ -475,7 +475,7 @@
"reportableChange": 0
},
{
"name": "scene valid",
"name": "SceneValid",
"code": 3,
"mfgCode": null,
"side": "server",
Expand All @@ -491,7 +491,7 @@
"reportableChange": 0
},
{
"name": "name support",
"name": "NameSupport",
"code": 4,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -8370,6 +8370,26 @@
}
]
},
{
"name": "Media Playback",
"code": 1286,
"mfgCode": null,
"define": "MEDIA_PLAYBACK_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Media Playback",
"code": 1286,
"mfgCode": null,
"define": "MEDIA_PLAYBACK_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": []
},
{
"name": "Media Input",
"code": 1287,
Expand Down Expand Up @@ -8935,6 +8955,156 @@
}
]
},
{
"name": "Audio Output",
"code": 1291,
"mfgCode": null,
"define": "AUDIO_OUTPUT_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
{
"name": "SelectOutput",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "RenameOutput",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": []
},
{
"name": "Audio Output",
"code": 1291,
"mfgCode": null,
"define": "AUDIO_OUTPUT_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "OutputList",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CurrentOutput",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x001",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Application Launcher",
"code": 1292,
Expand Down Expand Up @@ -10205,7 +10375,7 @@
"mfgCode": null,
"define": "AUDIO_OUTPUT_CLUSTER",
"side": "server",
"enabled": 1,
"enabled": 0,
"commands": [],
"attributes": [
{
Expand Down Expand Up @@ -12216,5 +12386,6 @@
"endpointVersion": 1,
"deviceIdentifier": 36
}
]
],
"log": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ bool emberAfContentLauncherClusterLaunchContentCallback(CommandHandler * command

VerifyOrExit(isDelegateNull(delegate, endpoint) != true && HasFeature(endpoint, ContentLauncherFeature::kContentSearch),
err = CHIP_ERROR_INCORRECT_STATE);
{
delegate->HandleLaunchContent(responder, decodableParameterList, autoplay, data.HasValue() ? data.Value() : CharSpan());
}

delegate->HandleLaunchContent(responder, decodableParameterList, autoplay, data.HasValue() ? data.Value() : CharSpan());

exit:
if (err != CHIP_NO_ERROR)
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/TV_AudioOutputCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: Audio Output Cluster Tests
config:
nodeId: 0x12344321
cluster: "Audio Output"
endpoint: 2
endpoint: 1

tests:
- label: "Wait for the commissioned device to be retrieved"
Expand Down
10 changes: 5 additions & 5 deletions zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 70d1f8c

Please sign in to comment.