Re: BDA driver, question about get properties from node
- From: "Patrick" <Patrick@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Aug 2005 19:08:04 -0700
Sorry about my poor English,
I type wrong, return code is 80004002 is for fail case.
For the get function, we didn't return anything, because get function never
be called when utility call get_Bandwidth. (We debug it from WinDbg, no
message output). We guess that KsProxy didn't call it.
For the topology joints , we write the driver based on the DDK sample, below
is our code in driver.
const
KSTOPOLOGY_CONNECTION TemplateFilterConnections[] =
{ // KSFILTER_NODE is defined as ((ULONG)-1) in ks.h
{ KSFILTER_NODE, 0, BDA_TUNER_NODE, 0},
{ BDA_TUNER_NODE, 1, BDA_DEMODULATOR_NODE, 0},
{ BDA_DEMODULATOR_NODE, 1, KSFILTER_NODE, 1}
};
const
ULONG AntennaTransportJoints[] =
{
1 // joint occurs between the two node types (second element in array)
// indicates that 1st node is controlled by input pin and 2nd node by
output pin
};
const
BDA_PIN_PAIRING TemplatePinPairings[] =
{
// Input pin to Output pin Topology Joints
//
{
0, // ulInputPin; 0 element in the TemplatePinDescriptors array.
1, // ulOutputPin; 1 element in the TemplatePinDescriptors array.
1, // ulcMaxInputsPerOutput
1, // ulcMinInputsPerOutput
1, // ulcMaxOutputsPerInput
1, // ulcMinOutputsPerInput
SIZEOF_ARRAY(AntennaTransportJoints), // ulcTopologyJoints
AntennaTransportJoints // pTopologyJoints; array of joints
}
};
"Max Paklin" wrote:
> I don't get it.
> You said that your "get" function fail and then you said that "set"
> succeeded and the return code is 80004002, which is a failure code.
> So which is it?
> Both of them fail?
>
> In the driver "get" function I don't see where you return something from it.
> Is it complete code of the "get" routine? If yes, then obviously it won't
> work.
>
> On the side note I assume that your topology joints are constructed the same
> way as it is for the DDK sample. Correct?
>
> -- Max.
>
>
>
> "Patrick" <Patrick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:2ADB2DA7-BC4B-450C-9631-72883A142E4D@xxxxxxxxxxxxxxxx
> > Plaease see the code about IBDA_FrequencyFilter,
> >
> > ========================
> > // Code in utility
> > CComPtr <IBDA_FrequencyFilter> m_pIFrequency;
> >
> > m_pTunerDevice->QueryInterface(IID_IBDA_Topology,
> > reinterpret_cast<void**>(&pITopology) );
> >
> > pITopology->GetNodeTypes(&nNodesTypeNum, 10, NodesType);
> >
> > CComPtr <IUnknown> pIUknow;
> >
> > // NodesType[0] is Tuner node
> > hr = pITopology->GetControlNode(0, 1, NodesType[0], &pIUknow);
> > hr = pIUknow->QueryInterface(IID_IBDA_FrequencyFilter, (void
> > **)&m_pIFrequency);
> >
> > // below 3 line fail
> > m_pIFrequency->get_Bandwidth(&m_BandWidth);
> > m_pIFrequency->get_Frequency(&m_Frequency);
> > m_pIFrequency->get_FrequencyMultiplier(&m_FreMultiplier);
> >
> > // below success, return code 0x80004002
> > m_pIFrequency->put_Bandwidth(m_BandWidth);
> > m_pIFrequency->put_Frequency(m_Frequency);
> > m_pIFrequency->put_FrequencyMultiplier(m_FreMultiplier);
> >
> > ==============================
> > // code in driver
> >
> > DEFINE_KSPROPERTY_TABLE(TunerNodeFrequencyProperties)
> > {
> > DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY(
> > CAntennaPin::GetCenterFrequency,
> > CAntennaPin::PutCenterFrequency
> > ),
> > DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY_MULTIPLIER(
> > CAntennaPin::GetMultiplerFrequency,
> > CAntennaPin::PutMultiplerFrequency
> > ),
> > DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_BANDWIDTH(
> > CAntennaPin::GetBandwidth,
> > CAntennaPin::PutBandwidth
> > )
> > };
> >
> > DEFINE_KSPROPERTY_SET_TABLE(TunerNodePropertySets)
> > {
> > DEFINE_KSPROPERTY_SET
> > (
> > &KSPROPSETID_BdaFrequencyFilter, // Property Set defined
> > elsewhere
> > SIZEOF_ARRAY(TunerNodeFrequencyProperties), // Number of
> > properties
> > in the array
> > TunerNodeFrequencyProperties, // Property set array
> > 0, // FastIoCount, reserve for system
> > NULL // FastIoTable, reserve for system
> > ),
> > ....
> > };
> >
> > DEFINE_KSAUTOMATION_TABLE(TunerNodeAutomation) {
> > DEFINE_KSAUTOMATION_PROPERTIES(TunerNodePropertySets),
> > DEFINE_KSAUTOMATION_METHODS_NULL,
> > DEFINE_KSAUTOMATION_EVENTS_NULL
> > };
> >
> > const
> > KSNODE_DESCRIPTOR
> > NodeDescriptors[] =
> > {
> > {
> > &TunerNodeAutomation, // Point to KSAUTOMATION_TABLE structure for
> > the node's automation table
> > &KSNODE_BDA_RF_TUNER, // Point to the guid that defines function of
> > the node
> > NULL // Point to the guid that represents the name of the topology
> > node
> > },
> > ....
> > };
> >
> > DEFINE_KSFILTER_DESCRIPTOR(TemplateFilterDescriptor)
> > {
> > &FilterDispatch, // Dispatch
> > &FilterAutomation, // AutomationTable
> > KSFILTER_DESCRIPTOR_VERSION, // Version
> > 0, // Flags
> > &KSNAME_Filter, // ReferenceGuid
> > DEFINE_KSFILTER_PIN_DESCRIPTORS(TemplatePinDescriptors),
> > // PinDescriptorsCount; exposes all
> > template pins
> > // PinDescriptorSize; size of each
> > item
> > // PinDescriptors; table of pin
> > descriptors
> > DEFINE_KSFILTER_CATEGORIES(Categories),
> > // CategoriesCount; number of
> > categories in the table
> > // Categories; table of categories
> > DEFINE_KSFILTER_NODE_DESCRIPTORS(NodeDescriptors),
> > // NodeDescriptorsCount; exposes all
> > template nodes
> > // NodeDescriptorSize; size of each
> > item
> > // NodeDescriptors; table of node
> > descriptors
> > DEFINE_KSFILTER_CONNECTIONS(TemplateFilterConnections),
> > // ConnectionsCount; number of
> > connections in the table
> > // Connections; table of connections
> > NULL // ComponentId; in this case, no ID is
> > provided
> > };
> >
> > NTSTATUS
> > CAntennaPin::PutBandwidth(
> > IN PIRP pIrp,
> > IN PKSPROPERTY pKSProperty,
> > IN PULONG pulProperty
> > )
> > {
> > NTSTATUS Status = STATUS_SUCCESS;
> > CAntennaPin * pPin;
> > CFilter* pFilter;
> >
> > _DbgPrintF(DEBUGLVL_VERBOSE,("CAntennaPin::PutBandwidth"));
> >
> > Status = BdaValidateNodeProperty( pIrp, pKSProperty);
> > if (NT_SUCCESS( Status))
> > {
> > pPin = reinterpret_cast<CAntennaPin
> > *>(KsGetPinFromIrp(pIrp)->Context);
> > pFilter = pPin->m_pFilter;
> > .
> > .
> > }
> >
> > return Status;
> > }
> >
> > NTSTATUS
> > CAntennaPin::GetBandwidth(
> > IN PIRP pIrp,
> > IN PKSPROPERTY pKSProperty,
> > IN PULONG pulProperty
> > )
> > {
> > NTSTATUS Status = STATUS_SUCCESS;
> > CAntennaPin * pPin;
> > CFilter* pFilter;
> >
> > _DbgPrintF(DEBUGLVL_VERBOSE,("CAntennaPin::GetBandwidth"));
> >
> > Status = BdaValidateNodeProperty( pIrp, pKSProperty);
> > if (NT_SUCCESS( Status))
> > {
> > pPin = reinterpret_cast<CAntennaPin
> > *>(KsGetPinFromIrp(pIrp)->Context);
> > pFilter = pPin->m_pFilter;
> > .
> > .
> > }
> >
> > return Status;
> > }
> >
> >
> > "Max Paklin" wrote:
> >
> >> See below.
> >>
> >>
> >> "Patrick" <Patrick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:F5697CB5-A358-4738-BD78-FEEEBD02AA94@xxxxxxxxxxxxxxxx
> >> > Thanks for reply,
> >> >
> >> > For case #1 , the return code 0x80004002, and my driver is for DVB-T.
> >>
> >> 80004002 = E_NOINTERFACE.
> >> Hmm... this looks like a bug to me.
> >> First, for DVB-T it is always COFDM, so the whole auto-demodulate is
> >> meaningless. Maybe that's why it isn't really implemented.
> >> I'd guess that the NP always returns this interface as supported on demod
> >> node, which is a mistake.
> >> File a bug.
> >>
> >>
> >> > For case #2,
> >> > You are right, there are some bugs in our driver, we have fix it. But
> >> > we
> >> > still have some questions, we can call get_SignalPresent( )
> >> > successfully
> >> > now,
> >> > but call put_SignalPresent ( put_SignalLocked, put_SignalQuality
> >> > ...)still
> >> > fail (return code 0x80004002). Only put_SampleTime will success. This
> >> > problem
> >> > also happen in IBDA_DigitalDemodulator & IBDA_FrequencyFilter, all set
> >> > function will success but all get function will fail.
> >>
> >> 80004002? I'd expect 80004001 = E_NOTIMPL for those.
> >> They obviously fail by design as signal lock or quality is read-only
> >> property, which you can't set on the device.
> >>
> >> About IBDA_FrequencyFilter. You say here that all set functions succeed
> >> while all get ones fail. SHouldn't it be vice versa?
> >> In either case you are doing something wrong. Post your code.
> >>
> >> -- Max.
> >>
> >>
> >>
> >> > "Max Paklin" wrote:
> >> >
> >> >> For your case #1.
> >> >> The code looks OK. What is the failure code?
> >> >>
> >> >> Case #2.
> >> >> It must be your driver not implementing those or not implementing them
> >> >> correctly? What the error code?
> >> >>
> >> >> -- Max.
> >> >>
> >> >>
> >> >>
> >> >> "Patrick" <Patrick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> >> news:97056B0A-A7D9-4997-83F1-29FC94E66E91@xxxxxxxxxxxxxxxx
> >> >> > Thanks to reply,
> >> >> >
> >> >> > My source code list below
> >> >> > Code 1 show that we can't get IBDA_AutoDemodulate from our Demode
> >> >> > node,
> >> >> > but
> >> >> > we have define it in BDA driver.
> >> >> > Code 2 show that call get_SignalPresent( ) on Demod node but fail,
> >> >> > if
> >> >> > we
> >> >> > do
> >> >> > the same thing on Tuner node , it success. We sure that we define
> >> >> > the
> >> >> > corresponding function in BDA driver.
> >> >> >
> >> >> > =================================================
> >> >> > Code 1:
> >> >> >
> >> >> > CComPtr <IBDA_Topology> pITopology;
> >> >> > CComPtr <IBDA_AutoDemodulate> m_pIAutoDemod;
> >> >> > CComPtr <IBDA_DigitalDemodulator> m_pIDigiDemod;
> >> >> >
> >> >> > hr = m_pTunerDevice->QueryInterface(IID_IBDA_Topology,
> >> >> > reinterpret_cast<void**>(&pITopology) );
> >> >> >
> >> >> > ULONG nNodesTypeNum = 0;
> >> >> > ULONG NodesType[10];
> >> >> >
> >> >> > hr = pITopology->GetNodeTypes(&nNodesTypeNum, 10, NodesType);
> >> >> >
> >> >> > CComPtr <IUnknown> pIUknow;
> >> >> >
> >> >> > // NodesType[1] is the Demod node
> >> >> > hr = pITopology->GetControlNode(0, 1, NodesType[1], &pIUknow);
> >> >> >
> >> >> > ULONG nInterfacesNum = 0;
> >> >> > GUID InterfacesGUID[10];
> >> >> >
> >> >> > // After this call, we sure that InerfacesGUID[0] ==
> >> >> > IID_IBDA_AutoDemodulate
> >> >> > // and InerfacesGUID[1] == IID_IBDA_DigitalDemodulator
> >> >> > hr = pITopology->GetNodeInterfaces(NodesType[1], &nInterfacesNum,
> >> >> > 10,
> >> >> > InerfacesGUID);
> >> >> >
> >> >> > // Call this fail
> >> >> > hr = pIUknow->QueryInterface(IID_IBDA_AutoDemodulate, (void
> >> >> > **)&m_pIAutoDemod);
> >> >> >
> >> >> > // Call this success
> >> >> > hr = pIUknow->QueryInterface(IID_IBDA_DigitalDemodulator, (void
.
- Follow-Ups:
- Re: BDA driver, question about get properties from node
- From: Max Paklin
- Re: BDA driver, question about get properties from node
- References:
- Re: BDA driver, question about get properties from node
- From: Max Paklin
- Re: BDA driver, question about get properties from node
- From: Patrick
- Re: BDA driver, question about get properties from node
- From: Max Paklin
- Re: BDA driver, question about get properties from node
- From: Patrick
- Re: BDA driver, question about get properties from node
- From: Max Paklin
- Re: BDA driver, question about get properties from node
- From: Patrick
- Re: BDA driver, question about get properties from node
- From: Max Paklin
- Re: BDA driver, question about get properties from node
- Prev by Date: Re: How to know if the last boot was successfull
- Next by Date: Re: USBD support for Interrupt OUT transactions
- Previous by thread: Re: BDA driver, question about get properties from node
- Next by thread: Re: BDA driver, question about get properties from node
- Index(es):
Relevant Pages
|