[AVSM] Fix old attribute name in AVSUM_2_1, enable SPKR and STOR features (#40022)
* Fix old attribute name
Enable SPKR and STOR features
* Have CI know the PICS values
* Include AVSM PICS Codes
* Restyled by whitespace
* Restyled by prettier-yaml
* Handle linter errors
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/examples/camera-app/linux/include/camera-device.h b/examples/camera-app/linux/include/camera-device.h
index 04148ff..837fa9c 100644
--- a/examples/camera-app/linux/include/camera-device.h
+++ b/examples/camera-app/linux/include/camera-device.h
@@ -193,8 +193,8 @@
// Currently, defaulting to not supporting hard privacy switch.
bool HasHardPrivacySwitch() override { return false; }
- // Currently, defaulting to not supporting speaker.
- bool HasSpeaker() override { return false; }
+ // Currently, defaulting to supporting speaker.
+ bool HasSpeaker() override { return true; }
// Mute/Unmute speaker.
CameraError SetSpeakerMuted(bool muteSpeaker) override;
@@ -234,7 +234,7 @@
bool GetImageFlipVertical() override { return mImageFlipVertical; }
// Does camera have local storage
- bool HasLocalStorage() override { return false; }
+ bool HasLocalStorage() override { return true; }
// Set/Get LocalVideoRecordingEnabled
CameraError SetLocalVideoRecordingEnabled(bool localVideoRecordingEnabled) override;
diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml
index fe69fb3..4b82964 100644
--- a/src/app/tests/suites/certification/PICS.yaml
+++ b/src/app/tests/suites/certification/PICS.yaml
@@ -10319,3 +10319,99 @@
"Does the device implement the Wi-Fi Network Management cluster as a
server"
id: WIFINM.S
+
+ #
+ # Camera AV Stream Management Cluster
+ #
+ - label: " Does the device implement the MaxConcurrentEncoders attribute?"
+ id: AVSM.S.A0000
+ - label: " Does the device implement the MaxEncodedPixelRate attribute?"
+ id: AVSM.S.A0001
+ - label: " Does the device implement the VideoSensorParams attribute?"
+ id: AVSM.S.A0002
+ - label: " Does the device implement the NightVisionUsesInfrared attribute?"
+ id: AVSM.S.A0003
+ - label: " Does the device implement the MinViewport attribute?"
+ id: AVSM.S.A0004
+ - label:
+ " Does the device implement the RateDistortionTradeOffPoints
+ attribute?"
+ id: AVSM.S.A0005
+ - label: " Does the device implement the MaxContentBufferSize attribute?"
+ id: AVSM.S.A0006
+ - label: " Does the device implement the MicrophoneCapabilities attribute?"
+ id: AVSM.S.A0007
+ - label: " Does the device implement the SpeakerCapabilities attribute?"
+ id: AVSM.S.A0008
+ - label: " Does the device implement the TwoWayTalkSupport attribute?"
+ id: AVSM.S.A0009
+ - label: " Does the device implement the SnapshotCapabilities attribute?"
+ id: AVSM.S.A000A
+ - label: " Does the device implement the MaxNetworkBandwidth attribute?"
+ id: AVSM.S.A000B
+ - label: " Does the device implement the CurrentFrameRate attribute?"
+ id: AVSM.S.A000C
+ - label: " Does the device implement the HDRModeEnabled attribute?"
+ id: AVSM.S.A000D
+ - label: " Does the device implement the SupportedStreamUsages attribute?"
+ id: AVSM.S.A000E
+ - label: " Does the device implement the AllocatedVideoStreams attribute?"
+ id: AVSM.S.A000F
+ - label: " Does the device implement the AllocatedAudioStreams attribute?"
+ id: AVSM.S.A0010
+ - label:
+ " Does the device implement the AllocatedSnapshotStreams attribute?"
+ id: AVSM.S.A0011
+ - label: " Does the device implement the StreamUsagePriorities attribute?"
+ id: AVSM.S.A0012
+ - label:
+ " Does the device implement the SoftRecordingPrivacyModeEnabled
+ attribute?"
+ id: AVSM.S.A0013
+ - label:
+ " Does the device implement the SoftLivestreamPrivacyModeEnabled
+ attribute?"
+ id: AVSM.S.A0014
+ - label: " Does the device implement the HardPrivacyModeOn attribute?"
+ id: AVSM.S.A0015
+ - label: " Does the device implement the NightVision attribute?"
+ id: AVSM.S.A0016
+ - label: " Does the device implement the NightVisionIllum attribute?"
+ id: AVSM.S.A0017
+ - label: " Does the device implement the Viewport attribute?"
+ id: AVSM.S.A0018
+ - label: " Does the device implement the SpeakerMuted attribute?"
+ id: AVSM.S.A0019
+ - label: " Does the device implement the SpeakerVolumeLevel attribute?"
+ id: AVSM.S.A001A
+ - label: " Does the device implement the SpeakerMaxLevel attribute?"
+ id: AVSM.S.A001B
+ - label: " Does the device implement the SpeakerMinLevel attribute?"
+ id: AVSM.S.A001C
+ - label: " Does the device implement the MicrophoneMuted attribute?"
+ id: AVSM.S.A001D
+ - label: " Does the device implement the MicrophoneVolumeLevel attribute?"
+ id: AVSM.S.A001E
+ - label: " Does the device implement the MicrophoneMaxLevel attribute?"
+ id: AVSM.S.A001F
+ - label: " Does the device implement the MicrophoneMinLevel attribute?"
+ id: AVSM.S.A0020
+ - label: " Does the device implement the MicrophoneAGCEnabled attribute?"
+ id: AVSM.S.A0021
+ - label: " Does the device implement the ImageRotation attribute?"
+ id: AVSM.S.A0022
+ - label: " Does the device implement the ImageFlipHorizontal attribute?"
+ id: AVSM.S.A0023
+ - label: " Does the device implement the ImageFlipVertical attribute?"
+ id: AVSM.S.A0024
+ - label:
+ " Does the device implement the LocalVideoRecordingEnabled attribute?"
+ id: AVSM.S.A0025
+ - label:
+ " Does the device implement the LocalSnapshotRecordingEnabled
+ attribute?"
+ id: AVSM.S.A0026
+ - label: " Does the device implement the StatusLightEnabled attribute?"
+ id: AVSM.S.A0027
+ - label: " Does the device implement the StatusLightBrightnesss attribute?"
+ id: AVSM.S.A0028
diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values
index 66c7902..471be7f 100644
--- a/src/app/tests/suites/certification/ci-pics-values
+++ b/src/app/tests/suites/certification/ci-pics-values
@@ -3022,3 +3022,46 @@
# Wi-Fi Network Management Cluster
WIFINM.S=1
+
+# Camera AV Stream Management Cluster
+AVSM.S.A0000=1
+AVSM.S.A0001=1
+AVSM.S.A0002=1
+AVSM.S.A0003=1
+AVSM.S.A0004=1
+AVSM.S.A0005=1
+AVSM.S.A0006=1
+AVSM.S.A0007=1
+AVSM.S.A0008=1
+AVSM.S.A0009=1
+AVSM.S.A000A=1
+AVSM.S.A000B=1
+AVSM.S.A000C=1
+AVSM.S.A000D=1
+AVSM.S.A000E=1
+AVSM.S.A000F=1
+AVSM.S.A0010=1
+AVSM.S.A0011=1
+AVSM.S.A0012=1
+AVSM.S.A0013=1
+AVSM.S.A0014=1
+AVSM.S.A0015=0
+AVSM.S.A0016=1
+AVSM.S.A0017=1
+AVSM.S.A0018=1
+AVSM.S.A0019=1
+AVSM.S.A001A=1
+AVSM.S.A001B=1
+AVSM.S.A001C=1
+AVSM.S.A001D=1
+AVSM.S.A001E=1
+AVSM.S.A001F=1
+AVSM.S.A0020=1
+AVSM.S.A0021=1
+AVSM.S.A0022=1
+AVSM.S.A0023=1
+AVSM.S.A0024=1
+AVSM.S.A0025=1
+AVSM.S.A0026=1
+AVSM.S.A0027=1
+AVSM.S.A0028=1
diff --git a/src/python_testing/TC_AVSM_2_1.py b/src/python_testing/TC_AVSM_2_1.py
index af11466..2b98a7a 100644
--- a/src/python_testing/TC_AVSM_2_1.py
+++ b/src/python_testing/TC_AVSM_2_1.py
@@ -58,7 +58,7 @@
TestStep(
4, "TH reads VideoSensorParams attribute.", "Verify that the DUT response contains a VideoSensorParamsStruct value."
),
- TestStep(5, "TH reads NightVisionCapable attribute.", "Verify that the DUT response contains a bool value."),
+ TestStep(5, "TH reads NightVisionUsesInfrared attribute.", "Verify that the DUT response contains a bool value."),
TestStep(6, "TH reads MinViewport attribute.", "Verify that the DUT response contains a VideoResolutionStruct value."),
TestStep(
7,
@@ -179,9 +179,9 @@
self.step(5)
if self.pics_guard(self.check_pics("AVSM.S.A0003")):
value = await self.read_single_attribute_check_success(
- endpoint=endpoint, cluster=cluster, attribute=attr.NightVisionCapable
+ endpoint=endpoint, cluster=cluster, attribute=attr.NightVisionUsesInfrared
)
- logger.info(f"Rx'd NightVisionCapable: {value}")
+ logger.info(f"Rx'd NightVisionUsesInfrared: {value}")
self.step(6)
if self.pics_guard(self.check_pics("AVSM.S.A0004")):