Source code of Windows XP (NT5)
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.

754 lines
28 KiB

  1. /*****************************************************************************
  2. * tables.h - SB16 topology miniport tables
  3. *****************************************************************************
  4. * Copyright (c) 1997-2000 Microsoft Corporation. All Rights Reserved.
  5. */
  6. #ifndef _SB16TOPO_TABLES_H_
  7. #define _SB16TOPO_TABLES_H_
  8. /*****************************************************************************
  9. * The topology
  10. *****************************************************************************
  11. *
  12. * wave>-------VOL---------------------+
  13. * |
  14. * synth>-------VOL--+------------------+
  15. * | |
  16. * +--SWITCH_2X2--+ |
  17. * | |
  18. * cd>-------VOL--+--SWITCH----------+
  19. * | | |
  20. * +--SWITCH_2X2--+ |
  21. * | |
  22. * aux>-------VOL--+--SWITCH----------+
  23. * | | |
  24. * +--SWITCH_2X2--+ |
  25. * | |
  26. * mic>--AGC--VOL--+--SWITCH----------+--VOL--BASS--TREBLE--GAIN-->lineout
  27. * | |
  28. * +--SWITCH_1X2--+-------------------------GAIN-->wavein
  29. *
  30. */
  31. /*****************************************************************************
  32. * PinDataRangesBridge
  33. *****************************************************************************
  34. * Structures indicating range of valid format values for bridge pins.
  35. */
  36. static
  37. KSDATARANGE PinDataRangesBridge[] =
  38. {
  39. {
  40. sizeof(KSDATARANGE),
  41. 0,
  42. 0,
  43. 0,
  44. STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
  45. STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
  46. STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
  47. }
  48. };
  49. /*****************************************************************************
  50. * PinDataRangePointersBridge
  51. *****************************************************************************
  52. * List of pointers to structures indicating range of valid format values
  53. * for audio bridge pins.
  54. */
  55. static
  56. PKSDATARANGE PinDataRangePointersBridge[] =
  57. {
  58. &PinDataRangesBridge[0]
  59. };
  60. /*****************************************************************************
  61. * MiniportPins
  62. *****************************************************************************
  63. * List of pins.
  64. */
  65. static
  66. PCPIN_DESCRIPTOR
  67. MiniportPins[] =
  68. {
  69. // WAVEOUT_SOURCE
  70. {
  71. 0,0,0, // InstanceCount
  72. NULL, // AutomationTable
  73. { // KsPinDescriptor
  74. 0, // InterfacesCount
  75. NULL, // Interfaces
  76. 0, // MediumsCount
  77. NULL, // Mediums
  78. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  79. PinDataRangePointersBridge, // DataRanges
  80. KSPIN_DATAFLOW_IN, // DataFlow
  81. KSPIN_COMMUNICATION_NONE, // Communication
  82. &KSNODETYPE_LEGACY_AUDIO_CONNECTOR, // Category
  83. NULL, // Name
  84. 0 // Reserved
  85. }
  86. },
  87. // SYNTH_SOURCE
  88. {
  89. 0,0,0, // InstanceCount
  90. NULL, // AutomationTable
  91. { // KsPinDescriptor
  92. 0, // InterfacesCount
  93. NULL, // Interfaces
  94. 0, // MediumsCount
  95. NULL, // Mediums
  96. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  97. PinDataRangePointersBridge, // DataRanges
  98. KSPIN_DATAFLOW_IN, // DataFlow
  99. KSPIN_COMMUNICATION_NONE, // Communication
  100. &KSNODETYPE_SYNTHESIZER, // Category
  101. &KSAUDFNAME_MIDI, // Name
  102. 0 // Reserved
  103. }
  104. },
  105. // CD_SOURCE
  106. {
  107. 0,0,0, // InstanceCount
  108. NULL, // AutomationTable
  109. { // KsPinDescriptor
  110. 0, // InterfacesCount
  111. NULL, // Interfaces
  112. 0, // MediumsCount
  113. NULL, // Mediums
  114. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  115. PinDataRangePointersBridge, // DataRanges
  116. KSPIN_DATAFLOW_IN, // DataFlow
  117. KSPIN_COMMUNICATION_NONE, // Communication
  118. &KSNODETYPE_CD_PLAYER, // Category
  119. &KSAUDFNAME_CD_AUDIO, // Name
  120. 0 // Reserved
  121. }
  122. },
  123. // LINEIN_SOURCE
  124. {
  125. 0,0,0, // InstanceCount
  126. NULL, // AutomationTable
  127. { // KsPinDescriptor
  128. 0, // InterfacesCount
  129. NULL, // Interfaces
  130. 0, // MediumsCount
  131. NULL, // Mediums
  132. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  133. PinDataRangePointersBridge, // DataRanges
  134. KSPIN_DATAFLOW_IN, // DataFlow
  135. KSPIN_COMMUNICATION_NONE, // Communication
  136. &KSNODETYPE_LINE_CONNECTOR, // Category
  137. &KSAUDFNAME_LINE_IN, // Name
  138. 0 // Reserved
  139. }
  140. },
  141. // MIC_SOURCE
  142. {
  143. 0,0,0, // InstanceCount
  144. NULL, // AutomationTable
  145. { // KsPinDescriptor
  146. 0, // InterfacesCount
  147. NULL, // Interfaces
  148. 0, // MediumsCount
  149. NULL, // Mediums
  150. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  151. PinDataRangePointersBridge, // DataRanges
  152. KSPIN_DATAFLOW_IN, // DataFlow
  153. KSPIN_COMMUNICATION_NONE, // Communication
  154. &KSNODETYPE_MICROPHONE, // Category
  155. NULL, // Name
  156. 0 // Reserved
  157. }
  158. },
  159. // LINEOUT_DEST
  160. {
  161. 0,0,0, // InstanceCount
  162. NULL, // AutomationTable
  163. { // KsPinDescriptor
  164. 0, // InterfacesCount
  165. NULL, // Interfaces
  166. 0, // MediumsCount
  167. NULL, // Mediums
  168. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  169. PinDataRangePointersBridge, // DataRanges
  170. KSPIN_DATAFLOW_OUT, // DataFlow
  171. KSPIN_COMMUNICATION_NONE, // Communication
  172. &KSNODETYPE_SPEAKER, // Category
  173. &KSAUDFNAME_VOLUME_CONTROL, // Name (this name shows up as
  174. // the playback panel name in SoundVol)
  175. 0 // Reserved
  176. }
  177. },
  178. // WAVEIN_DEST
  179. {
  180. 0,0,0, // InstanceCount
  181. NULL, // AutomationTable
  182. { // KsPinDescriptor
  183. 0, // InterfacesCount
  184. NULL, // Interfaces
  185. 0, // MediumsCount
  186. NULL, // Mediums
  187. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  188. PinDataRangePointersBridge, // DataRanges
  189. KSPIN_DATAFLOW_OUT, // DataFlow
  190. KSPIN_COMMUNICATION_NONE, // Communication
  191. &KSCATEGORY_AUDIO, // Category
  192. NULL, // Name
  193. 0 // Reserved
  194. }
  195. }
  196. };
  197. enum
  198. {
  199. WAVEOUT_SOURCE = 0,
  200. SYNTH_SOURCE,
  201. CD_SOURCE,
  202. LINEIN_SOURCE,
  203. MIC_SOURCE,
  204. LINEOUT_DEST,
  205. WAVEIN_DEST
  206. };
  207. /*****************************************************************************
  208. * PropertiesVolume
  209. *****************************************************************************
  210. * Properties for volume controls.
  211. */
  212. static
  213. PCPROPERTY_ITEM PropertiesVolume[] =
  214. {
  215. {
  216. &KSPROPSETID_Audio,
  217. KSPROPERTY_AUDIO_VOLUMELEVEL,
  218. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  219. PropertyHandler_Level
  220. },
  221. {
  222. &KSPROPSETID_Audio,
  223. KSPROPERTY_AUDIO_CPU_RESOURCES,
  224. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  225. PropertyHandler_CpuResources
  226. }
  227. };
  228. /*****************************************************************************
  229. * AutomationVolume
  230. *****************************************************************************
  231. * Automation table for volume controls.
  232. */
  233. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationVolume,PropertiesVolume);
  234. /*****************************************************************************
  235. * PropertiesAgc
  236. *****************************************************************************
  237. * Properties for AGC controls.
  238. */
  239. static
  240. PCPROPERTY_ITEM PropertiesAgc[] =
  241. {
  242. {
  243. &KSPROPSETID_Audio,
  244. KSPROPERTY_AUDIO_AGC,
  245. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  246. PropertyHandler_OnOff
  247. },
  248. {
  249. &KSPROPSETID_Audio,
  250. KSPROPERTY_AUDIO_CPU_RESOURCES,
  251. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  252. PropertyHandler_CpuResources
  253. }
  254. };
  255. /*****************************************************************************
  256. * AutomationAgc
  257. *****************************************************************************
  258. * Automation table for Agc controls.
  259. */
  260. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationAgc,PropertiesAgc);
  261. /*****************************************************************************
  262. * PropertiesMute
  263. *****************************************************************************
  264. * Properties for mute controls.
  265. */
  266. static
  267. PCPROPERTY_ITEM PropertiesMute[] =
  268. {
  269. {
  270. &KSPROPSETID_Audio,
  271. KSPROPERTY_AUDIO_MUTE,
  272. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  273. PropertyHandler_OnOff
  274. },
  275. {
  276. &KSPROPSETID_Audio,
  277. KSPROPERTY_AUDIO_CPU_RESOURCES,
  278. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  279. PropertyHandler_CpuResources
  280. }
  281. };
  282. /*****************************************************************************
  283. * AutomationMute
  284. *****************************************************************************
  285. * Automation table for mute controls.
  286. */
  287. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMute,PropertiesMute);
  288. /*****************************************************************************
  289. * PropertiesTone
  290. *****************************************************************************
  291. * Properties for tone controls.
  292. */
  293. static
  294. PCPROPERTY_ITEM PropertiesTone[] =
  295. {
  296. {
  297. &KSPROPSETID_Audio,
  298. KSPROPERTY_AUDIO_BASS,
  299. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  300. PropertyHandler_Level
  301. },
  302. {
  303. &KSPROPSETID_Audio,
  304. KSPROPERTY_AUDIO_TREBLE,
  305. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  306. PropertyHandler_Level
  307. },
  308. {
  309. &KSPROPSETID_Audio,
  310. KSPROPERTY_AUDIO_CPU_RESOURCES,
  311. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  312. PropertyHandler_CpuResources
  313. }
  314. };
  315. /*****************************************************************************
  316. * AutomationTone
  317. *****************************************************************************
  318. * Automation table for tone controls.
  319. */
  320. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTone,PropertiesTone);
  321. /*****************************************************************************
  322. * PropertiesSupermix
  323. *****************************************************************************
  324. * Properties for supermix controls.
  325. */
  326. static
  327. PCPROPERTY_ITEM PropertiesSupermix[] =
  328. {
  329. {
  330. &KSPROPSETID_Audio,
  331. KSPROPERTY_AUDIO_MIX_LEVEL_CAPS,
  332. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  333. PropertyHandler_SuperMixCaps
  334. },
  335. {
  336. &KSPROPSETID_Audio,
  337. KSPROPERTY_AUDIO_MIX_LEVEL_TABLE,
  338. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  339. PropertyHandler_SuperMixTable
  340. },
  341. {
  342. &KSPROPSETID_Audio,
  343. KSPROPERTY_AUDIO_CPU_RESOURCES,
  344. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  345. PropertyHandler_CpuResources
  346. }
  347. };
  348. /*****************************************************************************
  349. * AutomationSupermix
  350. *****************************************************************************
  351. * Automation table for supermix controls.
  352. */
  353. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSupermix,PropertiesSupermix);
  354. #ifdef EVENT_SUPPORT
  355. /*****************************************************************************
  356. * The Event for the Master Volume (or other nodes)
  357. *****************************************************************************
  358. * Generic event for nodes.
  359. */
  360. static PCEVENT_ITEM NodeEvent[] =
  361. {
  362. // This is a generic event for nearly every node property.
  363. {
  364. &KSEVENTSETID_AudioControlChange, // Something changed!
  365. KSEVENT_CONTROL_CHANGE, // The only event-property defined.
  366. KSEVENT_TYPE_ENABLE | KSEVENT_TYPE_BASICSUPPORT,
  367. CMiniportTopologySB16::EventHandler
  368. }
  369. };
  370. /*****************************************************************************
  371. * AutomationVolumeWithEvent
  372. *****************************************************************************
  373. * This is the automation table for Volume events.
  374. * You can create Automation tables with event support for any type of nodes
  375. * (e.g. mutes) with just adding the generic event above. The automation table
  376. * then gets added to every node that should have event support.
  377. */
  378. DEFINE_PCAUTOMATION_TABLE_PROP_EVENT (AutomationVolumeWithEvent, PropertiesVolume, NodeEvent);
  379. #endif
  380. /*****************************************************************************
  381. * TopologyNodes
  382. *****************************************************************************
  383. * List of node identifiers.
  384. */
  385. static
  386. PCNODE_DESCRIPTOR TopologyNodes[] =
  387. {
  388. // WAVEOUT_VOLUME
  389. {
  390. 0, // Flags
  391. &AutomationVolume, // AutomationTable
  392. &KSNODETYPE_VOLUME, // Type
  393. &KSAUDFNAME_WAVE_VOLUME // Name
  394. },
  395. // SYNTH_VOLUME
  396. {
  397. 0, // Flags
  398. &AutomationVolume, // AutomationTable
  399. &KSNODETYPE_VOLUME, // Type
  400. &KSAUDFNAME_MIDI_VOLUME // Name
  401. },
  402. // SYNTH_WAVEIN_SUPERMIX
  403. {
  404. 0, // Flags
  405. &AutomationSupermix, // AutomationTable
  406. &KSNODETYPE_SUPERMIX, // Type
  407. &KSAUDFNAME_MIDI_MUTE // Name
  408. },
  409. // CD_VOLUME
  410. {
  411. 0, // Flags
  412. &AutomationVolume, // AutomationTable
  413. &KSNODETYPE_VOLUME, // Type
  414. &KSAUDFNAME_CD_VOLUME // Name
  415. },
  416. // CD_LINEOUT_SUPERMIX
  417. {
  418. 0, // Flags
  419. &AutomationSupermix, // AutomationTable
  420. &KSNODETYPE_SUPERMIX, // Type
  421. &KSAUDFNAME_CD_MUTE // Name
  422. },
  423. // CD_WAVEIN_SUPERMIX
  424. {
  425. 0, // Flags
  426. &AutomationSupermix, // AutomationTable
  427. &KSNODETYPE_SUPERMIX, // Type
  428. &KSAUDFNAME_CD_MUTE // Name
  429. },
  430. // LINEIN_VOLUME
  431. {
  432. 0, // Flags
  433. &AutomationVolume, // AutomationTable
  434. &KSNODETYPE_VOLUME, // Type
  435. &KSAUDFNAME_LINE_VOLUME // Name
  436. },
  437. // LINEIN_LINEOUT_SUPERMIX
  438. {
  439. 0, // Flags
  440. &AutomationSupermix, // AutomationTable
  441. &KSNODETYPE_SUPERMIX, // Type
  442. &KSAUDFNAME_LINE_MUTE // Name
  443. },
  444. // LINEIN_WAVEIN_SUPERMIX
  445. {
  446. 0, // Flags
  447. &AutomationSupermix, // AutomationTable
  448. &KSNODETYPE_SUPERMIX, // Type
  449. &KSAUDFNAME_LINE_MUTE // Name
  450. },
  451. // MIC_AGC
  452. {
  453. 0, // Flags
  454. &AutomationAgc, // AutomationTable
  455. &KSNODETYPE_AGC, // Type
  456. NULL // Name
  457. },
  458. // MIC_VOLUME
  459. {
  460. 0, // Flags
  461. &AutomationVolume, // AutomationTable
  462. &KSNODETYPE_VOLUME, // Type
  463. &KSAUDFNAME_MIC_VOLUME // Name
  464. },
  465. // MIC_LINEOUT_MUTE
  466. {
  467. 0, // Flags
  468. &AutomationMute, // AutomationTable
  469. &KSNODETYPE_MUTE, // Type
  470. &KSAUDFNAME_MIC_MUTE // Name
  471. },
  472. // MIC_WAVEIN_SUPERMIX
  473. {
  474. 0, // Flags
  475. &AutomationSupermix, // AutomationTable
  476. &KSNODETYPE_SUPERMIX, // Type
  477. &KSAUDFNAME_MIC_MUTE // Name
  478. },
  479. // LINEOUT_MIX
  480. {
  481. 0, // Flags
  482. NULL, // AutomationTable
  483. &KSNODETYPE_SUM, // Type
  484. NULL // Name
  485. },
  486. // LINEOUT_VOL
  487. {
  488. 0, // Flags
  489. #ifdef EVENT_SUPPORT
  490. &AutomationVolumeWithEvent, // AutomationTable with event support
  491. #else
  492. &AutomationVolume, // AutomationTable
  493. #endif
  494. &KSNODETYPE_VOLUME, // Type
  495. &KSAUDFNAME_MASTER_VOLUME // Name
  496. },
  497. // LINEOUT_BASS
  498. {
  499. 0, // Flags
  500. &AutomationTone, // AutomationTable
  501. &KSNODETYPE_TONE, // Type
  502. &KSAUDFNAME_BASS // Name
  503. },
  504. // LINEOUT_TREBLE
  505. {
  506. 0, // Flags
  507. &AutomationTone, // AutomationTable
  508. &KSNODETYPE_TONE, // Type
  509. &KSAUDFNAME_TREBLE // Name
  510. },
  511. // LINEOUT_GAIN
  512. {
  513. 0, // Flags
  514. &AutomationVolume, // AutomationTable
  515. &KSNODETYPE_VOLUME, // Type
  516. NULL // Name
  517. },
  518. // WAVEIN_MIX
  519. {
  520. 0, // Flags
  521. NULL, // AutomationTable
  522. &KSNODETYPE_SUM, // Type
  523. &KSAUDFNAME_RECORDING_SOURCE // Name
  524. },
  525. // WAVEIN_GAIN
  526. {
  527. 0, // Flags
  528. &AutomationVolume, // AutomationTable
  529. &KSNODETYPE_VOLUME, // Type
  530. &KSAUDFNAME_WAVE_IN_VOLUME // Name
  531. }
  532. };
  533. /*****************************************************************************
  534. * ControlValueCache
  535. *****************************************************************************
  536. */
  537. static
  538. LONG ControlValueCache[] =
  539. { // Left // Right
  540. 0xFFF9F203, 0xFFF9F203, // WAVEOUT_VOLUME
  541. 0xFFF9F203, 0xFFF9F203, // SYNTH_VOLUME
  542. 0xFFF9F203, 0xFFF9F203, // CD_VOLUME
  543. 0xFFF9F203, 0xFFF9F203, // LINEIN_VOLUME
  544. 0xFFF9F203, 0, // MIC_VOLUME
  545. 0xFFF9F203, 0xFFF9F203, // LINEOUT_VOL
  546. 0x000242A0, 0x000242A0, // LINEOUT_BASS
  547. 0x000242A0, 0x000242A0, // LINEOUT_TREBLE
  548. 0x000C0000, 0x000C0000, // LINEOUT_GAIN
  549. 0x00000000, 0x00000000 // WAVEIN_GAIN
  550. };
  551. typedef struct
  552. {
  553. BYTE BaseRegister; // H/W access parameter
  554. ULONG CacheOffset; // ControlValueCache offset
  555. } ACCESS_PARM,*PACCESS_PARM;
  556. /*****************************************************************************
  557. * AccessParams
  558. *****************************************************************************
  559. * Table of H/W access parameters
  560. */
  561. static
  562. ACCESS_PARM AccessParams[] =
  563. {
  564. { DSP_MIX_VOICEVOLIDX_L, 0 }, // WAVEOUT_VOLUME
  565. { DSP_MIX_FMVOLIDX_L, 2 }, // SYNTH_VOLUME
  566. { MIXBIT_SYNTH_WAVEIN_R, ULONG(-1) }, // SYNTH_WAVEIN_SUPERMIX
  567. { DSP_MIX_CDVOLIDX_L, 4 }, // CD_VOLUME
  568. { MIXBIT_CD_LINEOUT_R, ULONG(-1) }, // CD_LINEOUT_SUPERMIX
  569. { MIXBIT_CD_WAVEIN_R, ULONG(-1) }, // CD_WAVEIN_SUPERMIX
  570. { DSP_MIX_LINEVOLIDX_L, 6 }, // LINEIN_VOLUME
  571. { MIXBIT_LINEIN_LINEOUT_R, ULONG(-1) }, // LINEIN_LINEOUT_SUPERMIX
  572. { MIXBIT_LINEIN_WAVEIN_R, ULONG(-1) }, // LINEIN_WAVEIN_SUPERMIX
  573. { 0, ULONG(-1) }, // MIC_AGC
  574. { DSP_MIX_MICVOLIDX, 8 }, // MIC_VOLUME
  575. { 0, ULONG(-1) }, // MIC_LINEOUT_MUTE
  576. { 0, ULONG(-1) }, // MIC_WAVEIN_SUPERMIX
  577. { 0, ULONG(-1) }, // LINEOUT_MIX
  578. { DSP_MIX_MASTERVOLIDX_L, 10 }, // LINEOUT_VOL
  579. { DSP_MIX_BASSIDX_L, 12 }, // LINEOUT_BASS
  580. { DSP_MIX_TREBLEIDX_L, 14 }, // LINEOUT_TREBLE
  581. { DSP_MIX_OUTGAINIDX_L, 16 }, // LINEOUT_GAIN
  582. { 0, ULONG(-1) }, // WAVEIN_MIX
  583. { DSP_MIX_INGAINIDX_L, 18 } // WAVEIN_GAIN
  584. };
  585. enum
  586. {
  587. WAVEOUT_VOLUME = 0,
  588. SYNTH_VOLUME,
  589. SYNTH_WAVEIN_SUPERMIX,
  590. CD_VOLUME,
  591. CD_LINEOUT_SUPERMIX,
  592. CD_WAVEIN_SUPERMIX,
  593. LINEIN_VOLUME,
  594. LINEIN_LINEOUT_SUPERMIX,
  595. LINEIN_WAVEIN_SUPERMIX,
  596. MIC_AGC,
  597. MIC_VOLUME,
  598. MIC_LINEOUT_MUTE,
  599. MIC_WAVEIN_SUPERMIX,
  600. LINEOUT_MIX,
  601. LINEOUT_VOL,
  602. LINEOUT_BASS,
  603. LINEOUT_TREBLE,
  604. LINEOUT_GAIN,
  605. WAVEIN_MIX,
  606. WAVEIN_GAIN
  607. };
  608. /*****************************************************************************
  609. * ConnectionTable
  610. *****************************************************************************
  611. * Table of topology unit connections.
  612. *
  613. * Pin numbering is technically arbitrary, but the convention established here
  614. * is to number a solitary output pin 0 (looks like an 'o') and a solitary
  615. * input pin 1 (looks like an 'i'). Even destinations, which have no output,
  616. * have an input pin numbered 1 and no pin 0.
  617. *
  618. * Nodes are more likely to have multiple ins than multiple outs, so the more
  619. * general rule would be that inputs are numbered >=1. If a node has multiple
  620. * outs, none of these conventions apply.
  621. *
  622. * Nodes have at most one control value. Mixers are therefore simple summing
  623. * nodes with no per-pin levels. Rather than assigning a unique pin to each
  624. * input to a mixer, all inputs are connected to pin 1. This is acceptable
  625. * because there is no functional distinction between the inputs.
  626. *
  627. * There are no multiplexers in this topology, so there is no opportunity to
  628. * give an example of a multiplexer. A multiplexer should have a single
  629. * output pin (0) and multiple input pins (1..n). Its control value is an
  630. * integer in the range 1..n indicating which input is connected to the
  631. * output.
  632. *
  633. * In the case of connections to pins, as opposed to connections to nodes, the
  634. * node is identified as PCFILTER_NODE and the pin number identifies the
  635. * particular filter pin.
  636. */
  637. static
  638. PCCONNECTION_DESCRIPTOR MiniportConnections[] =
  639. { // FromNode, FromPin, ToNode, ToPin
  640. { PCFILTER_NODE, WAVEOUT_SOURCE, WAVEOUT_VOLUME, 1 },
  641. { WAVEOUT_VOLUME, 0, LINEOUT_MIX, 1 },
  642. { PCFILTER_NODE, SYNTH_SOURCE, SYNTH_VOLUME, 1 },
  643. { SYNTH_VOLUME, 0, LINEOUT_MIX, 2 },
  644. { SYNTH_VOLUME, 0, SYNTH_WAVEIN_SUPERMIX, 1 },
  645. { SYNTH_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 1 },
  646. { PCFILTER_NODE, CD_SOURCE, CD_VOLUME, 1 },
  647. { CD_VOLUME, 0, CD_LINEOUT_SUPERMIX, 1 },
  648. { CD_LINEOUT_SUPERMIX, 0, LINEOUT_MIX, 3 },
  649. { CD_VOLUME, 0, CD_WAVEIN_SUPERMIX, 1 },
  650. { CD_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 2 },
  651. { PCFILTER_NODE, LINEIN_SOURCE, LINEIN_VOLUME, 1 },
  652. { LINEIN_VOLUME, 0, LINEIN_LINEOUT_SUPERMIX,1 },
  653. { LINEIN_LINEOUT_SUPERMIX,0, LINEOUT_MIX, 4 },
  654. { LINEIN_VOLUME, 0, LINEIN_WAVEIN_SUPERMIX, 1 },
  655. { LINEIN_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 3 },
  656. { PCFILTER_NODE, MIC_SOURCE, MIC_AGC, 1 },
  657. { MIC_AGC, 0, MIC_VOLUME, 1 },
  658. { MIC_VOLUME, 0, MIC_LINEOUT_MUTE, 1 },
  659. { MIC_LINEOUT_MUTE, 0, LINEOUT_MIX, 5 },
  660. { MIC_VOLUME, 0, MIC_WAVEIN_SUPERMIX, 1 },
  661. { MIC_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 4 },
  662. { LINEOUT_MIX, 0, LINEOUT_VOL, 1 },
  663. { LINEOUT_VOL, 0, LINEOUT_BASS, 1 },
  664. { LINEOUT_BASS, 0, LINEOUT_TREBLE, 1 },
  665. { LINEOUT_TREBLE, 0, LINEOUT_GAIN, 1 },
  666. { LINEOUT_GAIN, 0, PCFILTER_NODE, LINEOUT_DEST },
  667. { WAVEIN_MIX, 0, WAVEIN_GAIN, 1 },
  668. { WAVEIN_GAIN, 0, PCFILTER_NODE, WAVEIN_DEST }
  669. };
  670. /*****************************************************************************
  671. * MiniportFilterDescription
  672. *****************************************************************************
  673. * Complete miniport description.
  674. */
  675. static
  676. PCFILTER_DESCRIPTOR MiniportFilterDescriptor =
  677. {
  678. 0, // Version
  679. &AutomationFilter, // AutomationTable
  680. sizeof(PCPIN_DESCRIPTOR), // PinSize
  681. SIZEOF_ARRAY(MiniportPins), // PinCount
  682. MiniportPins, // Pins
  683. sizeof(PCNODE_DESCRIPTOR), // NodeSize
  684. SIZEOF_ARRAY(TopologyNodes), // NodeCount
  685. TopologyNodes, // Nodes
  686. SIZEOF_ARRAY(MiniportConnections), // ConnectionCount
  687. MiniportConnections, // Connections
  688. 0, // CategoryCount
  689. NULL // Categories: NULL->use default (audio, render, capture)
  690. };
  691. #endif