[wdmaudiodev] Re: AW: Re: AW: Re: AW: Re: set the default audio format dynamically during/after driver installation

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 14 Aug 2018 16:27:14 +0000

Don’t know. How exactly are you installing the updated version? Can you share 
C:\windows\inf\setupapi.dev.log?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Johannes Freyberger <jfreyberger@xxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, August 14, 2018 4:58:46 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] AW: Re: AW: Re: AW: Re: set the default audio format 
dynamically during/after driver installation

I’m not changing the ID by intention. So when I’m doing a new version the inf 
is completely the same, just the line DriverVer=… inside [Version] is changed. 
And also the code is sometimes only a minor change in the executed code but no 
changed defines or settings. Where is the ID taken from in a virtual driver?

Yes, I’m sending a UDP network stream.

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Dienstag, 14. August 2018 13:34
An: wdmaudiodev@xxxxxxxxxxxxx
Betreff: [wdmaudiodev] Re: AW: Re: AW: Re: set the default audio format 
dynamically during/after driver installation

There is no way to transfer settings between instances; the best thing is to 
ensure the instance ID doesn’t change.

What do you mean by a “stream”? Are you sending it out over the network?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx<mailto:jfreyberger@xxxxxxxxxxxxxxxxxxxx>>
Sent: Tuesday, August 14, 2018 4:23:41 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] AW: Re: AW: Re: set the default audio format dynamically 
during/after driver installation

The audio data is transferred to user mode and from there it’s sent to a stream.

Yes, my driver supports KSPROPERTY_AUDIO_VOLUMELEVEL.

I think, best thing for me would be to transfer settings between instances. Is 
there a way to do this?

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Dienstag, 14. August 2018 13:10
An: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Betreff: [wdmaudiodev] Re: AW: Re: set the default audio format dynamically 
during/after driver installation

If you install a second instance of your driver it will have a new instance id 
and new settings.

If you upgrade a given instance to the new version of your driver it will keep 
the same instance ID and SHOULD keep the same settings, though from your 
earlier email this isn’t working for volume for some reason. Does your virtual 
driver emulate a hardware amplifier via KSPROPERTY_AUDIO_VOLUMELEVEL?

What does your driver do with audio that is sent to it?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx<mailto:jfreyberger@xxxxxxxxxxxxxxxxxxxx>>
Sent: Tuesday, August 14, 2018 3:48:42 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] AW: Re: set the default audio format dynamically 
during/after driver installation

OK, thanks … and the per-instance-ID changes for pure virtual drivers? So 
that’s why I see my driver twice when I don’t remove the old one? Is there a 
way to transfer the settings from one instance to another?

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Dienstag, 14. August 2018 12:42
An: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Betreff: [wdmaudiodev] Re: set the default audio format dynamically 
during/after driver installation

Settings are stored per-instance-ID. If your instance ID changes, your settings 
are wiped out.

The easiest way to prevent your instance ID from changing is to use real 
hardware.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx<mailto:jfreyberger@xxxxxxxxxxxxxxxxxxxx>>
Sent: Tuesday, August 14, 2018 3:37:28 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: set the default audio format dynamically 
during/after driver installation

It’s a pure virtual driver without real hardware. Would there be a different 
answer depending from this? A different way to set the format for virtual or 
real hardware drivers?

Thanks and best regards,
Johannes

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Dienstag, 14. August 2018 12:29
An: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Betreff: [wdmaudiodev] Re: AW: Re: set the default audio format dynamically 
during/after driver installation

Is your driver installed on real hardware, or are you creating a virtual 
root-enumerated node?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx<mailto:jfreyberger@xxxxxxxxxxxxxxxxxxxx>>
Sent: Tuesday, August 14, 2018 2:17:28 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] AW: Re: set the default audio format dynamically 
during/after driver installation

I’m installing my drivers using devcon and normally I’m removing the old 
drivers before this by using devcon remove. So probably the driver is 
completely removed and no settings will persist. Now I did a test without 
calling devcon remove. This results in two instances of my driver. In device 
manager both instances show the new version of the driver, in the sound 
properties the old version keeps the sample format (44.1 kHz, 16 Bit) while the 
new version is set to 48kHz, 24 Bits according to my inf. But the volume 
doesn’t persist for the old driver and is set to 100 for both instances.

The way to remove the old driver seems the better way to me and so I’d like to 
know if there’s a way to set the default format only via the signed inf file or 
also after the driver installation but still inside my installer i.e. by 
setting the corresponding registry entries?

Thanks and best regards,
Johannes

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Montag, 13. August 2018 16:35
An: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Betreff: [wdmaudiodev] Re: set the default audio format dynamically 
during/after driver installation

Do other settings persist across driver version upgrade, e.g. volume?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx<mailto:jfreyberger@xxxxxxxxxxxxxxxxxxxx>>
Sent: Monday, August 13, 2018 1:49:19 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] set the default audio format dynamically during/after 
driver installation

Hi all,

I’ve written a virtual audio driver and during the installation I’m setting the 
default format by defining the registry entry PKEY_AudioEngine_OEMFormat in my 
inf file to 48kHz, 24 Bits. Some of our customers switch this to 44.1kHz, 24 
Bits which is also supported by the driver and it works correct. Now when I 
provide a new version of the driver the format is set back to 48kHz, 24 Bits 
according to the inf file. But from a registry entry I’ve written before, I’d 
know that the previous format was 44.1kHz. Is there a way to switch back to 
44.1 kHz automatically after the driver update so the customer doesn’t have to 
go to the drivers properties and do this manually? I thought about doing this 
by finding the corresponding registry i.e. in 
SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render and set the 
values as I can watch it when I do this manually. But this doesn’t seem to 
work. Modifying the inf file probably also is no option as this has to be 
signed and thus cannot be modified at runtime.

Thanks and best regards,
Johannes


Other related posts: