intel-ipu7-camera
This commit is contained in:
19 files changed
+3
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Handle camera service around suspend/resume.
|
||||
#
|
||||
# v4l2-relayd must be stopped before suspend to avoid GStreamer crashes,
|
||||
# then restarted after resume once the camera hardware is ready.
|
||||
#
|
||||
# The post-resume restart uses systemd-run to avoid blocking the
|
||||
# password prompt while waiting for the camera to initialize.
|
||||
|
||||
case "$1" in
|
||||
pre)
|
||||
systemctl stop v4l2-relayd@ipu7.service 2>/dev/null || true
|
||||
;;
|
||||
post)
|
||||
systemd-run --no-block --unit=camera-resume bash -c '
|
||||
systemctl restart camera-init.service 2>/dev/null
|
||||
systemctl reset-failed v4l2-relayd@ipu7.service 2>/dev/null || true
|
||||
systemctl start v4l2-relayd@ipu7.service 2>/dev/null || true
|
||||
'
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
Reference in new issue
Block a user