// Copyright 2017 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. #pragma once #include #include #include "intel_hda_codec.h" #include "intel_hda_device.h" namespace audio { namespace intel_hda { class IntelHDAController : public IntelHDADevice, public fbl::WAVLTreeContainable> { public: using ControllerTree = fbl::WAVLTree>; zx_status_t DumpRegs(int argc, const char** argv); uint32_t id() const { return id_; } uint32_t GetKey() const { return id(); } static zx_status_t Enumerate(); static ControllerTree& controllers() { return controllers_; } private: friend class fbl::unique_ptr; IntelHDAController(uint32_t id, const char* const dev_name) : IntelHDADevice(dev_name), id_(id) { } ~IntelHDAController() { } const uint32_t id_; static ControllerTree controllers_; }; } // namespace audio } // namespace intel_hda