Hi All,
How to support S/PDIF support in the adapter driver? How can user select
S/PDIF as output for rendering audio data.
I started to develop the WDM audio adapter driver with the help of the
example given in the DDK. When the driver is loaded the volume settings
does not show Digital speakers, how to get the digital speakers option?
Sounds and Multimedia conrol panel application allows to select 2 speakers
or 5.1 speakers but where to select S/PDIF.
Any information will be helpful.
Regards,
Kedar.
“kedar” wrote in message news:xxxxx@ntdev…
>
> Hi All,
>
> How to support S/PDIF support in the adapter driver? How can user select
> S/PDIF as output for rendering audio data.
>
This is not usually a “selectable” option. You usuall can select the
adapter itself, and characteristics thereof. But, in my experience, the
data typically always goes to the S/PDIF connector regardless of what you
select.
If you have a different setup, you might consider a custom control panel app
(or property sheet) that allows device-specific settings to be chosen.
Peter
OSR
Some time ago, kedar wrote…
How to support S/PDIF support in the adapter driver? How can user select
S/PDIF as output for rendering audio data. <…> When the driver is loaded
the volume settings does not show Digital speakers,
I gather that you want S/PDIF to appear as a separate slider in the mixer
UI (sndvol32), right?
Then, more information about your hardware is necessary. If you mix all
streams and inputs together and have separate master volume control for
analog and S/PDIF but essentially sends the same MUX to the 2 sliders,
then just add another DATAFLOW_OUT pin to the topo filter, with volume
and mute nodes to match your hardware control capabilities. The nodes
will be mapped to mixer controls automagically (read about “split”
topology, however).
There is a list of WDM audio developers, http://www.wdmaudiodev.de/ is
the homepage and the list is hosted at freelists.org
HTH,
-kkm
Hi Peter and KKM,
Thanks for the information.
My hardware supports SPDIF output and the codec is ac97 compatible codec
which has codec registers for spdif support. The codec also supports
multichannel support.
I want to have the support for applications to render spdif data. I have
developed my driver using the WDM audio sample driver given in the DDK,
now I want to add the SPDIF support for that driver. So I need help in
doing this.
Any information is helpful.
Regards,
Kedar.
Some time ago, kedar wrote…
>How to support S/PDIF support in the adapter driver? How can user select
>S/PDIF as output for rendering audio data. <…> When the driver is loaded
>the volume settings does not show Digital speakers,
I gather that you want S/PDIF to appear as a separate slider in the mixer
UI (sndvol32), right?
Then, more information about your hardware is necessary. If you mix all
streams and inputs together and have separate master volume control for
analog and S/PDIF but essentially sends the same MUX to the 2 sliders,
then just add another DATAFLOW_OUT pin to the topo filter, with volume
and mute nodes to match your hardware control capabilities. The nodes
will be mapped to mixer controls automagically (read about “split”
topology, however).
There is a list of WDM audio developers, http://www.wdmaudiodev.de/ is
the homepage and the list is hosted at freelists.org
HTH,
-kkm
Kedar,
Either me or you must be royally misunderstanding something.
My hardware supports SPDIF output and the codec is ac97 compatible codec
which has codec registers for spdif support. The codec also supports
multichannel support.
That makes sense. Your hardware has registers, and you write this bit
into that register, and the S/PDIF connector comes alive.
I want to have the support for applications to render spdif data.
That does not make sense to me. There is no such thing as “S/PDIF data”.
S/PDIF is a pretty much low-level hardware protocol for digital audio
transmission. An application may render an audio stream, which can be
PCM audio, or DTC encoded stream, or MP3. DirectShow will insert appropriate
filters if hardware cannot accept stream format directly.
If you want an analogy, an application may use API calls to connect to
a server using TCP/IP via an Ethernet card, but the application is not
said to “render Ethernet data” on an Ethernet card: While it always renders
Ethernet data, you never think in this terms.
I have developed my driver using the WDM audio sample driver given in the DDK,
You mean you *compiled* the sample driver from the DDK? 
Kernel streaming is a tricky business - the port class (what a misnomer!)
provides abstractions that are completely different from anything else
in the DDK. Read the docs and the archive of the wdmaudiodev list. Microsoft
audio guys are very actively participating there.
-kkm
> >I want to have the support for applications to render spdif data.
That does not make sense to me. There is no such thing as “S/PDIF data”.
Not quite true. I don’t think this is what the original poster is asking
for (I think he just wants to route audio to the S/PDIF connector). But
S/PDIF, like the professional AES data format, is frame-based, and has both
audio and control data in the frame events. There are a number of bits of
control data, such as the copyright protection flag, the digital format
indicators, and similar things. There are various ways these fields can be
set, but they generally require either a dedicated hardware filter in the
stream, or some form of sideband control to set the values.
Loren
Hi KKM,
I am new to this audio drivers world and I might be cause for the
misunderstanding.
What I want to know is
When an application plays an audio file the output is given to line out
pin. I want to know how to give the same dato on S/PDIF output channel. As
I can think, I have to somewhere tell my hardware to give the data to
S/PDIF output channel insted of giving it to line out.
I am also thinking that user should know whethere the data is being given
to S/PDIF or lineout.
If this is not the general perception please correct me.
Regards,
Kedar.
Kedar,
Either me or you must be royally misunderstanding something.
>My hardware supports SPDIF output and the codec is ac97 compatible codec
>which has codec registers for spdif support. The codec also supports
>multichannel support.
That makes sense. Your hardware has registers, and you write this bit
into that register, and the S/PDIF connector comes alive.
>I want to have the support for applications to render spdif data.
That does not make sense to me. There is no such thing as “S/PDIF data”.
S/PDIF is a pretty much low-level hardware protocol for digital audio
transmission. An application may render an audio stream, which can be
PCM audio, or DTC encoded stream, or MP3. DirectShow will insert appropriate
filters if hardware cannot accept stream format directly.
If you want an analogy, an application may use API calls to connect to
a server using TCP/IP via an Ethernet card, but the application is not
said to “render Ethernet data” on an Ethernet card: While it always renders
Ethernet data, you never think in this terms.
>I have developed my driver using the WDM audio sample driver given in the DDK,
You mean you *compiled* the sample driver from the DDK? 
Kernel streaming is a tricky business - the port class (what a misnomer!)
provides abstractions that are completely different from anything else
in the DDK. Read the docs and the archive of the wdmaudiodev list. Microsoft
audio guys are very actively participating there.
-kkm
Hi Loren,
Yes, I just want to route the audio to the S/PDIF connector. Should I add
any node/PIN to my existing driver or should I support any data formats.
Could please tell me whether to write dedicated hardware filter or some
form of sideband control to set the values and where to implement and get
information on them.
Regards,
Kedar.
> >I want to have the support for applications to render spdif data.
>
> That does not make sense to me. There is no such thing as “S/PDIF data”.
Not quite true. I don’t think this is what the original poster is asking
for (I think he just wants to route audio to the S/PDIF connector). But
S/PDIF, like the professional AES data format, is frame-based, and has both
audio and control data in the frame events. There are a number of bits of
control data, such as the copyright protection flag, the digital format
indicators, and similar things. There are various ways these fields can be
set, but they generally require either a dedicated hardware filter in the
stream, or some form of sideband control to set the values.
Loren
Hi KKM,
I used the sample driver from the DDK and changed the Bus master registers
to mine.
Regards,
Kedar.
Kedar,
Either me or you must be royally misunderstanding something.
>My hardware supports SPDIF output and the codec is ac97 compatible codec
>which has codec registers for spdif support. The codec also supports
>multichannel support.
That makes sense. Your hardware has registers, and you write this bit
into that register, and the S/PDIF connector comes alive.
>I want to have the support for applications to render spdif data.
That does not make sense to me. There is no such thing as “S/PDIF data”.
S/PDIF is a pretty much low-level hardware protocol for digital audio
transmission. An application may render an audio stream, which can be
PCM audio, or DTC encoded stream, or MP3. DirectShow will insert appropriate
filters if hardware cannot accept stream format directly.
If you want an analogy, an application may use API calls to connect to
a server using TCP/IP via an Ethernet card, but the application is not
said to “render Ethernet data” on an Ethernet card: While it always renders
Ethernet data, you never think in this terms.
>I have developed my driver using the WDM audio sample driver given in the DDK,
You mean you *compiled* the sample driver from the DDK? 
Kernel streaming is a tricky business - the port class (what a misnomer!)
provides abstractions that are completely different from anything else
in the DDK. Read the docs and the archive of the wdmaudiodev list. Microsoft
audio guys are very actively participating there.
-kkm
> Yes, I just want to route the audio to the S/PDIF connector. Should I add
any node/PIN to my existing driver or should I support any data formats.
I haven’t had much experience with WDM audio (only made some MIDI drivers,
not actual audio drivers). However, as best I understand how it is supposed
to work, you should declare nodes/pins for all of the inputs and outputs you
have separate audio streams for. These will probably then appear in either
the audio device selections or in the mixer as control objects.
I know this is possible, since I have a Delta-1010 10 channel interface
sitting here, and it shows 5 stereo pairs as selectable devices for the
various ports, with appropriate device names. Perhaps you will need to make
some separate miniports in your driver to represent the various outputs. I
wish I knew a good book on WDM audio driver design.
Loren
Some time ago, Loren Wilton wrote…
Perhaps you will need to make some separate miniports in your driver to
represent the various outputs.
No, that’s wrong.
Kedar - I already told you how to support it - just add another
output pin to the topology filter, and enable digital output in hardware.
*If* you want to add enable/disable control, add a mute node. If your
hardware supports separate gain control in S/PDIF tract, then add a volume
node, and so on - if there is balance, you may add it too, if there is
an equalizer, add tone nodes etc etc etc. In a topo property handler,
when a user mode client changes values, set the changes to hardware.
Like if you have
mux—volume—mute—analog out
make it
mux—volume—mute—analog out
|
±–volume*–mute*–digital out*
(add nodes and the pin are marked with *. This assumes that you have
separate volume control in hardware)
I do not know how to help you - you know nothing and developing a
commercial driver? You should read the docs. Unfortunately, there
is no book on KS. I cannot design a driver for you.
If everything else fails, just enable s/pdif output at full volume
once upon hardware init and forget about controlling it. I am
not kidding, this is not a bad solution at all - most devices do
not attenuate digital signal at the source.
-kkm
Hi KKM,
Thanks for the information.
Can you please give me rough idea of defining and adding the pins and
nodes for the digital out.
Regards,
Kedar.
Some time ago, Loren Wilton wrote…
>Perhaps you will need to make some separate miniports in your driver to
>represent the various outputs.
No, that’s wrong.
Kedar - I already told you how to support it - just add another
output pin to the topology filter, and enable digital output in hardware.
*If* you want to add enable/disable control, add a mute node. If your
hardware supports separate gain control in S/PDIF tract, then add a volume
node, and so on - if there is balance, you may add it too, if there is
an equalizer, add tone nodes etc etc etc. In a topo property handler,
when a user mode client changes values, set the changes to hardware.
Like if you have
mux—volume—mute—analog out
make it
mux—volume—mute—analog out
|
±–volume*–mute*–digital out*
(add nodes and the pin are marked with *. This assumes that you have
separate volume control in hardware)
I do not know how to help you - you know nothing and developing a
commercial driver? You should read the docs. Unfortunately, there
is no book on KS. I cannot design a driver for you.
If everything else fails, just enable s/pdif output at full volume
once upon hardware init and forget about controlling it. I am
not kidding, this is not a bad solution at all - most devices do
not attenuate digital signal at the source.
-kkm