Skip to content

Commit 027dcde

Browse files
enjiamaicarlescufi
authored andcommitted
soc: xtensa: fix the direct usage of log only and loading firmware
The new client-server-based cavstool has broken the SOF CI testing due to not considering that loading firmware and output log directly without daemon is still necessary. Fix that when it is not running as a daemon. Signed-off-by: Enjia Mai <[email protected]>
1 parent 3cf5c3c commit 027dcde

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

soc/xtensa/intel_adsp/tools/cavstool_server.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,19 @@ def get_host_ip():
787787
HOST = get_host_ip()
788788

789789
if __name__ == "__main__":
790+
791+
# When fw_file is assigned or in log_only mode, it will
792+
# not serve as a daemon. That mean it just run load
793+
# firmware or read the log directly.
794+
if args.fw_file or args.log_only:
795+
start_output = True
796+
try:
797+
asyncio.get_event_loop().run_until_complete(_main(None))
798+
except KeyboardInterrupt:
799+
start_output = False
800+
finally:
801+
sys.exit(0)
802+
790803
# Launch the command request service
791804
socketserver.TCPServer.allow_reuse_address = True
792805
req_server = socketserver.TCPServer((HOST, PORT_REQ), adsp_request_handler)

0 commit comments

Comments
 (0)