1// Copyright 2018 The Fuchsia Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5library ddk.protocol.intelhda.dsp; 6 7using zx; 8 9const string MD_KEY_NHLT = "NHLT"; 10 11struct ZxPcieDeviceInfo { 12}; 13 14[Layout = "ddk-callback"] 15interface IhdaDspIrq { 16 Callback() -> (); 17}; 18 19[Layout = "ddk-protocol"] 20interface IhdaDsp { 21 /// Fetch the parent HDA controller's PCI device info. 22 GetDevInfo() -> (ZxPcieDeviceInfo out); 23 24 /// Fetch a VMO that represents the BAR holding the Audio DSP registers. 25 GetMmio() -> (zx.status s, handle<vmo> vmo, usize size); 26 27 /// Fetch a handle to our bus transaction initiator. 28 GetBti() -> (zx.status s, handle<bti> bti); 29 30 /// Enables DSP 31 Enable() -> (); 32 33 /// Disable DSP 34 Disable() -> (); 35 36 /// Enables DSP interrupts and set a callback to be invoked when an interrupt is 37 /// raised. 38 /// Returns `ZX_ERR_ALREADY_EXISTS` if a callback is already set. 39 IrqEnable(IhdaDspIrq callback) -> (zx.status s); 40 41 /// Disable DSP interrupts and clears the callback. 42 IrqDisable() -> (); 43}; 44