Is there any guy who can control the volume in a driver?

We have a filter driver which catch a data from the stream and process the
data then put it back to original stream. I found some problems in dealing
with the audio data so I want to set the volume, especially microphone
volume. In case of Master Volume, I can get this information from KSPROPERTY,
KSPROPERTY_AUDIO_VOLUMELEVEL, but I can't get any information about
microphone volume from this.

So question is that How can I get the volume level of Microphone or Line-in?

Thank you.

SAM

Re: [Audio Driver] - Volume Control by Igor

Igor
Mon Jul 04 05:24:33 CDT 2005

Parse audio device topology, find microphone volume node, and send IOCTL
directly to it;
usually this works
WBR
Igor

"SAM" <SAM@discussions.microsoft.com> wrote in message
news:0BA7EBE9-7B70-4B24-A1F4-E03D4678B01E@microsoft.com...
> Is there any guy who can control the volume in a driver?
>
> We have a filter driver which catch a data from the stream and process the
> data then put it back to original stream. I found some problems in dealing
> with the audio data so I want to set the volume, especially microphone
> volume. In case of Master Volume, I can get this information from
> KSPROPERTY,
> KSPROPERTY_AUDIO_VOLUMELEVEL, but I can't get any information about
> microphone volume from this.
>
> So question is that How can I get the volume level of Microphone or
> Line-in?
>
> Thank you.
>
> SAM



Re: [Audio Driver] - Volume Control by SAM

SAM
Tue Jul 05 21:31:03 CDT 2005

Thank you for your kind answer. Is there a sample source code how to find a
topology and a volume node? It would be a great help for me.

Thank you so much.

"Igor Slewsarev" wrote:

> Parse audio device topology, find microphone volume node, and send IOCTL
> directly to it;
> usually this works
> WBR
> Igor
>
> "SAM" <SAM@discussions.microsoft.com> wrote in message
> news:0BA7EBE9-7B70-4B24-A1F4-E03D4678B01E@microsoft.com...
> > Is there any guy who can control the volume in a driver?
> >
> > We have a filter driver which catch a data from the stream and process the
> > data then put it back to original stream. I found some problems in dealing
> > with the audio data so I want to set the volume, especially microphone
> > volume. In case of Master Volume, I can get this information from
> > KSPROPERTY,
> > KSPROPERTY_AUDIO_VOLUMELEVEL, but I can't get any information about
> > microphone volume from this.
> >
> > So question is that How can I get the volume level of Microphone or
> > Line-in?
> >
> > Thank you.
> >
> > SAM
>
>
>

Re: [Audio Driver] - Volume Control by Igor

Igor
Wed Jul 06 11:04:47 CDT 2005

"SAM" <SAM@discussions.microsoft.com> wrote in message
news:C3565FF3-E89B-4172-B6CB-CE9F9987BFFA@microsoft.com...
> Thank you for your kind answer. Is there a sample source code how to find
> a
> topology and a volume node? It would be a great help for me.
Download DirectKS sample. Though it's written to Win32 target
the logic is the same.
http://www.microsoft.com/whdc/device/audio/DirectKS.mspx

WBR
Igor



Re: [Audio Driver] - Volume Control by SAM

SAM
Thu Jul 07 11:25:03 CDT 2005

Thank you for your advice. So I am looking into the DirectKS application but
still it is from the Application. So far, I understand how I can get the
topology and node. After that How can I get the volume level of Mic-In and
Line-In in a driver. Driver doesn't have a such function as the application
has. ( FYI, I am a newbie in a driver model).
A little bit different question.
If I have a KSPROPERTY object in a driver from IRP, How can I get/set the
mic-in or line-in audio level with this object?

Thank you.

"Igor Slewsarev" wrote:

> "SAM" <SAM@discussions.microsoft.com> wrote in message
> news:C3565FF3-E89B-4172-B6CB-CE9F9987BFFA@microsoft.com...
> > Thank you for your kind answer. Is there a sample source code how to find
> > a
> > topology and a volume node? It would be a great help for me.
> Download DirectKS sample. Though it's written to Win32 target
> the logic is the same.
> http://www.microsoft.com/whdc/device/audio/DirectKS.mspx
>
> WBR
> Igor
>
>
>

Re: [Audio Driver] - Volume Control by Igor

Igor
Fri Jul 08 04:20:12 CDT 2005

> After that How can I get the volume level of Mic-In and
> Line-In in a driver. Driver doesn't have a such function as the
> application
> has. ( FYI, I am a newbie in a driver model).

Send IOCTL_KS_PROPERTY with KSPROPETRY_AUDIO_VOLUMELEVEL for channel 0;
You need a filter handle and a mic vloumelevel node ID;
Try to use KsSynchronousIoControlDevice function exported by ks.sys;

> A little bit different question.
> If I have a KSPROPERTY object in a driver from IRP, How can I get/set the
> mic-in or line-in audio level with this object?
I don't understand. You intercept IRP from user mode? If so modify
KSNODEPROPERTY
and frowrad IRP to functional driver (try KsForwardIrp)

WBR
Igor