def METHOD_NAME(cls, ctrl_connection, is_tx: bool):
    logger.debug("SDRPLAY: closing device")
    ret = sdrplay.close_stream()
    ctrl_connection.send("CLOSE STREAM:" + str(ret))
    if cls.sdrplay_device_index is not None:
        ret = sdrplay.release_device_index()
        ctrl_connection.send("RELEASE DEVICE:" + str(ret))