blob: c40c2dc3d77f2757d8ff8512e00f08bceedfbc62 [file] [log] [blame]
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.hardware.dsp;
using zx;
// The discoverable annotation is required, otherwise the protocol bindings
// will not have a name string generated.
@discoverable
closed protocol DspDevice {
/// Load DSP firmware.
/// |fw_name| : The name of the firmware to load.
/// error a zx_status value indicating failure. One of the following:
/// `ZX_ERR_NOT_FOUND` if the firmware does not exist.
strict LoadFirmware(struct {
fw_name string:zx.MAX_NAME_LEN;
}) -> () error zx.Status;
/// Start DSP.
/// error a zx_status value indicating failure. Two of the following:
/// `ZX_ERR_BAD_STATE` if the DSP firmware fails to load, execute the DSP start command.
/// `ZX_ERR_OUT_OF_RANGE` if the execution of the smcc command started by the DSP fails.
strict Start() -> () error zx.Status;
/// Stop DSP.
/// error a zx_status value indicating failure. Two of the following:
/// `ZX_ERR_BAD_STATE` if DSP is not started, execute DSP stop.
/// `ZX_ERR_OUT_OF_RANGE` if the execution of the smcc command stopped by the DSP fails.
strict Stop() -> () error zx.Status;
};
service Service {
device client_end:DspDevice;
};