啊啊,好鳥啊,usb null-packet 竟然不發,害我 debug 好幾天(也才兩天啦)。另外,程式要用 sudo 才可以 access usb device 相關的東西,這點也很機車,因為根本就搞不清楚為甚麼啊。然後又接了一個爛 hub,結果 bulk-in 可以,可是 bulk-out 就 timeout,一定要插拔 hub 才可以,這是怎樣....。
Wednesday, November 28, 2007
Monday, November 19, 2007
在 Testcap 內新增 Audio Capture Pin,並且讓 Windows 的音效裝置可以選擇它[2]
這個還要搭配 inf 啦。參考一下 MSVAD 的寫法:
;======================================================
; COMMON
;======================================================
[MSVAD.I.Wave]
AddReg=MSVAD.I.Wave.AddReg
[MSVAD.I.Wave.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%MSVAD.Wave.szPname%
[MSVAD.I.Topo]
AddReg=MSVAD.I.Topo.AddReg
[MSVAD.I.Topo.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%MSVAD.Topo.szPname%
;======================================================
; MSVAD_SIMPLE
;======================================================
[MSVAD_Simple.NT]
Include=ks.inf,wdmaudio.inf
Needs=KS.Registration, WDMAUDIO.Registration
CopyFiles=MSVAD_Simple.CopyList
AddReg=MSVAD_Simple.AddReg
[MSVAD_Simple.NT.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,MSVAD.I.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,MSVAD.I.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,MSVAD.I.Wave
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,MSVAD.I.Topo
[MSVAD_Simple.NT.Services]
AddService=msvad_simple,0x00000002,msvad_Simple_Service_Inst
[msvad_Simple_Service_Inst]
DisplayName=%msvad_simple.SvcDesc%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%10%\system32\drivers\vadSimpl.sys
;======================================================
; COMMON
;======================================================
[Strings]
MSFT="Microsoft"
MfgName="Microsoft Audio DDK"
MSVAD_Simple.DeviceDesc="Microsoft Virtual Audio Device (Simple) (WDM)"
MSVAD.Wave.szPname="MSVAD Wave"
MSVAD.Topo.szPname="MSVAD Topology"
Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
KSCATEGORY_AUDIO="{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSNAME_Wave="Wave"
KSNAME_Topology="Topology"
msvad_simple.SvcDesc="Microsoft Virtual Audio Device (Simple) (WDM)"
MediaCategories="SYSTEM\CurrentControlSet\Control\MediaCategories"
Simple.NameGuid="{946A7B1A-EBBC-422a-A81F-F07C8D40D3B4}"
Simple.Name="MSVAD (Simple)"
把藍色字改一下加到 Testcap 的 inf 內即可。之前以為不用是因為,亂 try 的時候已經把這些東西寫到 registry 內部了。