Skip to content

Commit 9a9134f

Browse files
cujomalaineybroonie
authored andcommitted
ASoC: SOF: Add FW state to debugfs
Allow system health detection mechanisms to check the FW state, this will allow them to check if the FW is in its "crashed" state going forward to help automatically diagnose driver state. Signed-off-by: Curtis Malainey <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent d185e06 commit 9a9134f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sound/soc/sof/debug.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ int snd_sof_dbg_init(struct snd_sof_dev *sdev)
353353
return err;
354354
}
355355

356-
return 0;
356+
return snd_sof_debugfs_buf_item(sdev, &sdev->fw_state,
357+
sizeof(sdev->fw_state),
358+
"fw_state", 0444);
357359
}
358360
EXPORT_SYMBOL_GPL(snd_sof_dbg_init);
359361

0 commit comments

Comments
 (0)