| # Copyright 2019 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. |
| |
| import("//build/bind/bind.gni") |
| import("//build/config/fuchsia/rules.gni") |
| |
| bind_rules("aml-g12-tdm-bind") { |
| rules = "aml_tdm.bind" |
| output = "aml_tdm-bind.h" |
| tests = "tests-stream.json" |
| deps = [ "//src/devices/bind/amlogic.platform" ] |
| } |
| |
| driver_module("aml-g12-tdm") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| "//build/unification/config:zircon-migrated", |
| ] |
| sources = [ |
| "aml-tdm-config-device.cc", |
| "audio-stream.cc", |
| ] |
| |
| deps = [ |
| ":aml-g12-tdm-bind", |
| "//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.i2c", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/media/audio/lib/simple-audio-stream", |
| "//src/media/audio/lib/simple-codec", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/audio-driver-proto", |
| "//zircon/system/ulib/audio-proto-utils", |
| "//zircon/system/ulib/fzl", |
| ] |
| } |
| |
| bind_rules("aml-g12-tdm-dai-bind") { |
| rules = "aml_tdm_dai.bind" |
| output = "aml_tdm_dai_bind.h" |
| tests = "tests-dai.json" |
| deps = [ |
| "//src/devices/bind/amlogic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_module("aml-g12-tdm-dai") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| "//build/unification/config:zircon-migrated", |
| ] |
| sources = [ |
| "aml-tdm-config-device.cc", |
| "dai.cc", |
| ] |
| |
| deps = [ |
| ":aml-g12-tdm-dai-bind", |
| "//sdk/banjo/fuchsia.hardware.audio", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/fidl/fuchsia.hardware.audio", |
| "//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_llcpp", |
| "//sdk/lib/fit-promise", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fzl", |
| |
| # TODO(andresoportus): Remove depedency on TLS (maybe done by C++ bindings unification). |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":aml-g12-tdm-bind_test", |
| ":aml-g12-tdm-dai-bind_test", |
| "test:dai-test-package", |
| "test:stream-test-package", |
| ] |
| } |