blob: 5dbfb176fb7d2ba4ff5af6b968d52429cc76d629 [file] [log] [blame]
// Copyright 2018 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 ddk.protocol.intelhda.dsp;
using zx;
const string MD_KEY_NHLT = "NHLT";
struct ZxPcieDeviceInfo {
};
[Layout = "ddk-callback"]
interface IhdaDspIrq {
Callback() -> ();
};
[Layout = "ddk-protocol"]
interface IhdaDsp {
/// Fetch the parent HDA controller's PCI device info.
GetDevInfo() -> (ZxPcieDeviceInfo out);
/// Fetch a VMO that represents the BAR holding the Audio DSP registers.
GetMmio() -> (zx.status s, handle<vmo> vmo, usize size);
/// Fetch a handle to our bus transaction initiator.
GetBti() -> (zx.status s, handle<bti> bti);
/// Enables DSP
Enable() -> ();
/// Disable DSP
Disable() -> ();
/// Enables DSP interrupts and set a callback to be invoked when an interrupt is
/// raised.
/// Returns `ZX_ERR_ALREADY_EXISTS` if a callback is already set.
IrqEnable(IhdaDspIrq callback) -> (zx.status s);
/// Disable DSP interrupts and clears the callback.
IrqDisable() -> ();
};