[wdmaudiodev] Re: PortClass audio driver: device initiated change of audio device default format properties

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 19 Oct 2018 17:56:02 +0000

I see… you want the user to be able to choose their format either on the device 
or in the sound control panel.



When the format is changed from the device, set the 
KSEVENT_PINCAPS_FORMATCHANGE event. Windows will requery format support. Relay 
your preferred format via KSPROPERTY_PIN_PROPOSEDATAFORMAT2.



Be aware that some applications will ignore the preferred format and just use 
whatever they see fit. So you will have to explain to the user why they chose 
44.1 kHz on the device, but their application is still sending 48 kHz.



________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of noise@xxxxxxxx <noise@xxxxxxxx>
Sent: Friday, October 19, 2018 10:50:59 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: PortClass audio driver: device initiated change of 
audio device default format properties

There are two directions:
* you should be able to set the sample rate from the device, and
* you should be able to set the sample rate from Windows.

Viele Grüße/Cheers,
Hagen.


On 19.10.2018, at 18:40, Matthew van Eerde (Redacted sender 
"Matthew.van.Eerde" for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

Right. So how is that different from what you want?

From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of noise@xxxxxxxx <noise@xxxxxxxx>
Sent: Friday, October 19, 2018 9:38:44 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: PortClass audio driver: device initiated change of 
audio device default format properties

If the portclass only announce the current device sample rate as the only 
supported format - then the OS can't tell the portclass driver anymore to 
choose any other sample rate.

Viele Grüße/Cheers,
Hagen.

On 19.10.2018, at 18:32, Matthew van Eerde (Redacted sender 
"Matthew.van.Eerde" for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

       • but then the portclass can't control the devices sample rate 
anymore

I don’t follow. What do you mean?

From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> 
on behalf of noise@xxxxxxxx <noise@xxxxxxxx>
Sent: Thursday, October 18, 2018 10:22:18 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: PortClass audio driver: device initiated change 
of audio device default format properties

Mhhh, thanks again, I thought about that, but then the portclass can't 
control the devices sample rate anymore...
The device has a sample rate selector, controllable from the device's own 
UI and from the host (here portclass, but further also ASIO).

What I think it should do, if possible, is only switching the default 
format.
If thats not possible then the above approach is OK and we let control the 
sample rate only from the device and the ASIO control panel.
(portclass anyway is only an addition for the user to use the audio device 
as a youtube player. The device itself is a multichannel pro audio 
interface which primarily is used via ASIO.)

Viele Grüße/Cheers,
Hagen.

On 18.10.2018, at 22:16, Matthew van Eerde (Redacted sender 
"Matthew.van.Eerde" for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

Yes.

And if the external sound device has a particular sample rate selected – 
say, 44.1 – it is your audio driver’s job to tell Windows that it ONLY 
supports 44.1.

From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> 
on behalf of noise@xxxxxxxx <noise@xxxxxxxx>
Sent: Thursday, October 18, 2018 1:14:24 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: PortClass audio driver: device initiated change 
of audio device default format properties

Thanks Matthew, I am having a look at this!

But wouldn't this only retrieve the entire set of formats my device 
supports?

Viele Grüße/Cheers,
Hagen.

On 18.10.2018, at 22:00, Matthew van Eerde (Redacted sender 
"Matthew.van.Eerde" for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

If your format support changes, raise a KSEVENT_PINCAPS_FORMATCHANGE 
event. Windows will invalidate all currently running streams and requery 
format support.

From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> 
on behalf of noise@xxxxxxxx <noise@xxxxxxxx>
Sent: Thursday, October 18, 2018 12:01:29 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] PortClass audio driver: device initiated change of 
audio device default format properties

Hi,

I have an external sound device which - beneath others - can control the 
sample rate.
To support Windows audio we are using a portclass driver.
Is it possible to promote a sample rate change from the device switching 
our portclass drivers current "default" format? (at least when the device 
is streaming...?!)

Thanks, for any suggestion where to look!

Viele Grüße/Cheers,
Hagen.

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

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:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C63b76b8f3f6b478b57b408d635eb8135%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636755683099838701&amp;sdata=lcLo7Nore4cffcoKj%2FFb5VNAdLwDwEB5cZTU5PgLiS0%3D&amp;reserved=0


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

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:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C63b76b8f3f6b478b57b408d635eb8135%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636755683099838701&amp;sdata=lcLo7Nore4cffcoKj%2FFb5VNAdLwDwEB5cZTU5PgLiS0%3D&amp;reserved=0





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

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:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C63b76b8f3f6b478b57b408d635eb8135%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636755683099838701&amp;sdata=lcLo7Nore4cffcoKj%2FFb5VNAdLwDwEB5cZTU5PgLiS0%3D&amp;reserved=0

Other related posts: