Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
7.1 KiB

  1. Requirements
  2. --------------------
  3. 1) The SAD client interface needs a simple mechanism for legacy support to
  4. hook up to the "default" or "main" audio renderer/capturer. Redbook, SB
  5. and mpu401 emulation will normally use this mechanism.
  6. 2) The SAD client interface also needs a broader interface that allows
  7. the selection/query of renderer(s)/capturer(s) endpoints and other
  8. properties like h/w vs s/w acceleration, 3D audio, etc to be set. The
  9. mmsystem api and dsound support need this. The clients will have more
  10. choices available regarding endpoints and paths thru the possible graphs.
  11. 3) The SAD client interface provides as many pin instances and data formats
  12. as possible given the current collection of filters. The SAD client
  13. interface changes as filters come and go; it isn't fixed to a predetermined
  14. set of data formats, interfaces, etc. The SAD will insert a mixer into
  15. the output graph before the last instance of renderer's pin is used.
  16. 4) SAD supports multiple renderer/capturer filters.
  17. 5) SAD supports multiple renderers, capturers or converters within
  18. a single filter.
  19. 6) SAD supports h/w "almost arbitrary" renderer/capturer filters. USB, 1394
  20. and other PNP hardware devices can come and go. There will still have
  21. to be some limits.
  22. 7) SAD supports s/w "almost arbitrary" renderer/capturer filters. DirectMusic,
  23. TAPI, and ISVs will want to add special software renderer/capturer.
  24. 8) SAD supports multiple "almost arbitrary" s/w converter filters. ISVs will
  25. to provide support (via filters) other data formats (like OPL2/OPK3 or
  26. ADPCM) not covered by our filters.
  27. 9) SAD supports multiple "almost arbitrary" h/w converter filters. OEMs will
  28. want to provide h/w mixing, SRC, MIDI, etc. converters.
  29. 10) Because h/w filters can come and go, need to support closing a running
  30. graph from SAD down. There is still a question of whether we ignores
  31. the requests from the SAD client or return an error until the h/w returns.
  32. 11) A communication sink to sink converter filter is needed. Streaming class
  33. h/w converters have sink inputs and sink outputs. This filter is needed
  34. to connect to the mixer's sink input. May also need a sink to source
  35. converter for putting a converter in the input graph.
  36. 12) A KSINTERFACE_MEDIA_WAVE_QUEUED to KSINTERFACE_STANDARD_PACKETSTREAMING
  37. interface converter is needed. The mmsystem legacy support needs this
  38. to connect to renderers, mixers or swmidi that only support packet
  39. streaming.
  40. 13) SAD loads s/w filters only when needed by a client. We do not want unused
  41. filters wasting memory.
  42. 14) A user configurable option to disable any filter (h/w or s/w,
  43. renderer/capturer or converter). ISVs program will need exclusive
  44. access (hopefully through ActiveMovie) to certain devices.
  45. 15) Need a property on renderer to get the "preferred" data format (sample rate,
  46. number of channels, bits per sample). SB cards use up more CPU as the
  47. rates/channels/bits increase where for USB speakers don't use more CPU.
  48. 16) User configurable preferences - sound quality vs CPU cycles, default
  49. main endpoint, high quality SRC on/off, etc.
  50. 17) Support an AEC filter on input. This requires inserting a splitter after
  51. the mixer or a reference pin on renderer on the "related" output device.
  52. 18) A stream splitter is needed for AEC. It is basically converts one input
  53. pin instance to multiple output pin instances. The splitter could split
  54. any data format.
  55. 19) Topology SAD pin to support the mmsystem topology api.
  56. 20) Add an arbitrary filter before the mixer on the SAD client's path to mixer.
  57. 21) Add an arbitrary filter after the mixer. Do we need this?
  58. Restrictions
  59. ------------
  60. 1) h/w filters can not change their configuration (number of pins, formats on
  61. the pins, maximum number of instances available on a pin, etc.) between PNP
  62. events.
  63. 2) s/w filters configuration (number of pins, formats on the pins, maximum
  64. number of instances available on a pin, etc.) is fixed. This is so we
  65. can either get this information from the registry without loading the
  66. driver or during initialization loading the driver, query and save the
  67. properties, and then unload the driver.
  68. The PNP software filter enumerator may help in allowing s/w filters to be
  69. more dynamic.
  70. 3) h/w filters must present enough information via the pin properties
  71. (DataRanges, DataRouting, Interfaces, Transform type, etc.) to determine
  72. if is a renderer/capturer or a converter, i.e. can not get any information
  73. from the registry. SIPC.
  74. 4) Filters must have a valid (no invalid node numbers, no loops) topology
  75. for SAD to use in a graph.
  76. 5) Filters must have at least one topology node if any transform is
  77. done. Devices like pass data straight through like MPU401 don't
  78. need a topology node.
  79. 6) SAD only searches for the following device class associations:
  80. KSCATEGORY_BRIDGE
  81. KSCATEGORY_RENDER
  82. KSCATEGORY_CAPTURE
  83. KSCATEGORY_MIXER
  84. KSCATEGORY_DATATRANSFORM
  85. KSCATEGORY_INTERFACETRANSFORM
  86. KSCATEGORY_MEDIUMTRANSFORM
  87. KSCATEGORY_DATACOMPRESSOR
  88. KSCATEGORY_DATADECOMPRESSOR
  89. 7) Renderers and Capturers must have bridge pins.
  90. 8) Sysaudio assumes that properties, etc. can be sent to all nodes through
  91. any sink pin handle. Splitters are not supported.
  92. Rules
  93. -----
  94. 1) Mixers are only inserted into output graphs (to renderers). Kmixer may
  95. be inserted into an input graph for sample rate conversion.
  96. 2) Splitters are only connected between the mixer (output pin) and
  97. renderer (input pin).
  98. 3) Echo cancelers are only connected between the capturer (output pin) and
  99. SAD output pin.
  100. Todo
  101. ----
  102. Replace DLS hack in SWMIDI with something more efficient.
  103. Make more code pageable in SWMIDI.
  104. Wait or cancel pending IRPs on pin close - this can cause gpfs when swmidi is closed.
  105. SWMIDI should not forward IRPs and doesn't need to reserve the extra IRP stack location.
  106. Convert the midi input pin to STREAMING interface (and mmsystem/wdmaud/sbemul will also have to change). The current interface isn't KS correct.
  107. Use the new PNP notifications and class associations.
  108. Use the "data intersection" property in sysaudio driver.
  109. Fix or inspect all the BUGBUG's in sysaudio driver.
  110. The list enumerate functions are being used to destroy nodes with the
  111. assumption that the link in the node (usually leNext) is at the beggining
  112. of the node.
  113. Race conditions getting cPinInstances and doing the pin connect.
  114. Filter instances counts. H/W converters may have limits on number of instances.
  115. Kmixer should tell me that (via topology or some property) that could pre-mix
  116. like sample rates. Maybe it could show up as three different mixers (via the
  117. shingle name): one main 44.1 mixer, one 11k mixer and one 22k mixer.
  118. Questions
  119. ---------
  120. What is KSPRIORITY and how it is used?
  121. Need to define limits on what SAD can handle from a USB, etc. device because
  122. USB is so general (too general for Memphis).
  123. Implement BASIC_SUPPORT and RELATIONS properties?