ASoC: Intel: avs: Do not treat unsupported IPCs as invalid
authorCezary Rojewski <cezary.rojewski@intel.com>
Mon, 10 Oct 2022 12:19:51 +0000 (14:19 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 17 Oct 2022 11:50:13 +0000 (12:50 +0100)
Utilize NOT_SUPPORTED status code to differentiate between unsupported
and invalid requests. Skip over error paths if it is the former that is
communicated by the base firmware.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221010121955.718168-12-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/avs.h
sound/soc/intel/avs/messages.h

index 92e3772..91f78eb 100644 (file)
@@ -220,8 +220,10 @@ static inline void avs_ipc_err(struct avs_dev *adev, struct avs_ipc_msg *tx,
        /*
         * If IPC channel is blocked e.g.: due to ongoing recovery,
         * -EPERM error code is expected and thus it's not an actual error.
+        *
+        * Unsupported IPCs are of no harm either.
         */
-       if (error == -EPERM)
+       if (error == -EPERM || error == AVS_IPC_NOT_SUPPORTED)
                dev_dbg(adev->dev, "%s 0x%08x 0x%08x failed: %d\n", name,
                        tx->glb.primary, tx->glb.ext.val, error);
        else
index c0f90db..02b3b7a 100644 (file)
@@ -150,6 +150,8 @@ union avs_module_msg {
        };
 } __packed;
 
+#define AVS_IPC_NOT_SUPPORTED 15
+
 union avs_reply_msg {
        u64 val;
        struct {