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

  • From: "Johannes Freyberger" <jfreyberger@xxxxxxxxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 14 Aug 2018 12:48:42 +0200

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 <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
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: