[wdmaudiodev] Re: Report a jack state change (plugged/unplugged)

  • From: Eugene Muzychenko <emuzychenko@xxxxxxxxx>
  • To: Mitchell Rundle <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 27 Mar 2007 23:24:36 +0700

Hello Mitchell,

> I agree that device interface registration/unregistration is
> overkill for just changing the state of the plug.  We are looking at
> ways to simplify this for future releases.

Thank you for the support. I think it could be very conveniently
implemented via
IoReportTargetDeviceChange/IoReportTargetDeviceChangeAsynchronous.
These functions accept a GUID so it is easy to introduce as many
events as needed (jack status change, source signal arrival or even
dynamic device topology change).

> 1) toggle the jack "plugged" state
> 2) toggle the device interface state

I already have implemented this technique and it works fine for jack
state reflection. Of course, it requires a kind of hack because of
using IoGetDeviceInterfaces and "manually" find a proper interface by
a reference string but it is acceptable. I think audio device interface
naming conventions won't change in a near future.

Unfortunately, Endpoint Builder definitely behaves incorrectly in
actual device topology detection. If the driver is restarted (for example,
using "devcon restart" command) and registers a topology subdevice
with a different pin set than in its previous load and subdevice
registration, Endpoint Builder sends KSPROPERTY_JACK_DESCRIPTION not
only to currently valid pins but also to ones which were valid for an
old topology, but currently not reported by the driver in
PCFILTER_DESCRIPTOR. For these pins, the driver returns
STATUS_INVALID_PARAMETER but it does not prevent Endpoint Builder from
further querying these pins again. A new topology is properly
reflected only after Vista restart.

It looks like Endpoint Builder does not check actual pin presence but
reads a previously built pin set from the registry. I think it is a bug, isn't 
it?

Regards,
Eugene

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: