audio-graph-card.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. Audio Graph Card:
  2. Audio Graph Card specifies audio DAI connections of SoC <-> codec.
  3. It is based on common bindings for device graphs.
  4. see ${LINUX}/Documentation/devicetree/bindings/graph.txt
  5. Basically, Audio Graph Card property is same as Simple Card.
  6. see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
  7. Below are same as Simple-Card.
  8. - label
  9. - widgets
  10. - routing
  11. - dai-format
  12. - frame-master
  13. - bitclock-master
  14. - bitclock-inversion
  15. - frame-inversion
  16. - mclk-fs
  17. - hp-det-gpio
  18. - mic-det-gpio
  19. - dai-tdm-slot-num
  20. - dai-tdm-slot-width
  21. - clocks / system-clock-frequency
  22. Required properties:
  23. - compatible : "audio-graph-card";
  24. - dais : list of CPU DAI port{s}
  25. Optional properties:
  26. - pa-gpios: GPIO used to control external amplifier.
  27. Example: Single DAI case
  28. sound_card {
  29. compatible = "audio-graph-card";
  30. dais = <&cpu_port>;
  31. };
  32. dai-controller {
  33. ...
  34. cpu_port: port {
  35. cpu_endpoint: endpoint {
  36. remote-endpoint = <&codec_endpoint>;
  37. dai-format = "left_j";
  38. ...
  39. };
  40. };
  41. };
  42. audio-codec {
  43. ...
  44. port {
  45. codec_endpoint: endpoint {
  46. remote-endpoint = <&cpu_endpoint>;
  47. };
  48. };
  49. };
  50. Example: Multi DAI case
  51. sound-card {
  52. compatible = "audio-graph-card";
  53. label = "sound-card";
  54. dais = <&cpu_port0
  55. &cpu_port1
  56. &cpu_port2>;
  57. };
  58. audio-codec@0 {
  59. ...
  60. port {
  61. codec0_endpoint: endpoint {
  62. remote-endpoint = <&cpu_endpoint0>;
  63. };
  64. };
  65. };
  66. audio-codec@1 {
  67. ...
  68. port {
  69. codec1_endpoint: endpoint {
  70. remote-endpoint = <&cpu_endpoint1>;
  71. };
  72. };
  73. };
  74. audio-codec@2 {
  75. ...
  76. port {
  77. codec2_endpoint: endpoint {
  78. remote-endpoint = <&cpu_endpoint2>;
  79. };
  80. };
  81. };
  82. dai-controller {
  83. ...
  84. ports {
  85. cpu_port0: port@0 {
  86. cpu_endpoint0: endpoint {
  87. remote-endpoint = <&codec0_endpoint>;
  88. dai-format = "left_j";
  89. ...
  90. };
  91. };
  92. cpu_port1: port@1 {
  93. cpu_endpoint1: endpoint {
  94. remote-endpoint = <&codec1_endpoint>;
  95. dai-format = "i2s";
  96. ...
  97. };
  98. };
  99. cpu_port2: port@2 {
  100. cpu_endpoint2: endpoint {
  101. remote-endpoint = <&codec2_endpoint>;
  102. dai-format = "i2s";
  103. ...
  104. };
  105. };
  106. };
  107. };