[wdmaudiodev] Re: AVStream Mixer Problems

  • From: "John D. Farmer" <johndfarmer@xxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 26 Aug 2004 11:28:20 -0700

MessageDJ and Mat,

The ultimate goal is to make available to the end user the ability to easily 
change volume and mute options through the control panel and have connectivity 
with other applications (one example is PowerDVD in which the volume controls 
are not functional unless I have a master volume control, whereas applications 
like Windows Media Player 9 seem to work with the system mixer controls).   I 
understand that applications like PowerDVD probably only query the master 
volume as opposed to the system mixer through DirectX in some way.

The problem is that is there no 'simple' way that I have found to bring up the 
volume controls or link other applications into the system mixers controls.  We 
would like to have the little speaker icon down in the tray so the user can 
double click it and bring up sndvol32.  We would also like to be able to change 
the options in the "Sounds and Audio Devices Properties" control panel under 
the 'Device volume' and 'Speaker settings'  options, but these are disabled 
unless we have a master volume control implemented.  We would also like to 
support these other applications that only support the master volume option.

As I said in my last response it appears that setting to volume on the device 
may not be an option (although I'm still looking into it), so am I basically 
stuck with the system mixer as my only option until the chip supports the 
commands necessary to control volume and mute?

Thanks again,

John
    ----- Original Message ----- 
    From: DJ Sisolak 
    To: wdmaudiodev@xxxxxxxxxxxxx 
    Sent: Thursday, August 26, 2004 9:03 AM
    Subject: [wdmaudiodev] Re: AVStream Mixer Problems


    Hello Mat & John,

     

    You are correct in that the avcaudio driver in XP was not very robust. The 
central reason for that is that the only device available commercially at the 
time of XP release to test against, which was the Sony Lissa system. Therefore 
it was not so much a class driver as it was a Lissa driver. I have since 
re-written the driver but as of yet have not had a release vehicle for it. It 
"should" be part of the Longhorn release as part of UAA. However I do not make 
those decisions. The key to its release, as always, is finding a set of class 
compliant devices to test against. Of course the decision to do anything for 
downlevel support is not mine either. (If anyone is interested in working with 
the class driver please contact me (dsisolak@xxxxxxxxxxxxx) or 
hakons@xxxxxxxxxxxxx on a separate thread. We need as many test platforms as we 
can get J)

     

    As to setting the kmixer volume via the driver, I agree with Mat. If you do 
not want a volume or mute control on the device and only wish to use the volume 
control in the system mixer, simply do not put them in your topology. Connect 
the destination plug in the subunit directly to the source plug. Or am I 
missing the point?

     

    DJ

     

    This posting is provided "AS IS" with no warranties, and confers no rights

     


----------------------------------------------------------------------------

    From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Mathieu Routhier
    Sent: Thursday, August 26, 2004 7:05 AM
    To: wdmaudiodev@xxxxxxxxxxxxx
    Subject: [wdmaudiodev] Re: AVStream Mixer Problems

     

    John and DJ,

     

    The last time I worked on a device including an AVC audio subunit (last 
winter), we faced the same problems as John described.  The avcaudio crashed 
when it loaded.  Using the debugger and correct symbols, we determined that the 
crash occurred while parsing the descriptor.  Even if the error was in the 
descriptor we crafted, I guess the driver shouldn't have crashed.  If I 
remember correctly, we reported that issue to MS and it probably reached you, 
DJ, am I wrong?  In any case, we ended up writing our own avcaudio replacement 
driver for numerous reasons, one of them being the driver for our device had to 
do things that avcaudio was not designed for.  Nevertheless, we used AVC.sys to 
handle avc commands because we had a minimum requirement of Windows XP.

     

    About your master volume question.  Well, one thing you could do is simply 
do not declare a master volume control.  The other lines (midi, wave, CD, etc) 
should still show up.  Alternatively, you could implement your own software 
attenuator.  I am not sure you can "ask" kmixer to add a master volume control.

     

    Mat

     


----------------------------------------------------------------------------

    From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of John D. Farmer
    Sent: Wednesday, August 25, 2004 6:05 PM
    To: wdmaudiodev@xxxxxxxxxxxxx
    Subject: [wdmaudiodev] Re: AVStream Mixer Problems

     

    To answer DJ's question:  My device does Implement the AVC Audio subunit 
spec.  We originally tried to use AVCAudio.sys after modifying the INF and 
trying to install it, it not only crashed our test machine but hosed our 
registry beyond any ability to repair.

    We tried to use 61883.sys and AVC.sys, but there we're quirks in both of 
those drivers that wouldn't allow us to get the card initialized properly.  I 
believe we also had problems sending data down to the bus.  The final problem 
was that we needed support for Windows 2000 (I believe AVC wasn't supported on 
except in MSDV.sys).  The long story short, I ended up crafting my own psuedo 
AVC.sys by sending down raw Isochronous commands to the 1394 bus and getting 
the response back in a allocated address range.  I only included selective AVC 
command specific to our hardware.

     

    Finally this is probably a rather stupid question, but is there any way to 
use my Volume Control to send the volume and mute values to the KMIXER lines so 
that KMIXER can take care of mixing the audio stream instead of having to set 
the hardware to those volume values (it seems the new chip we are working with 
does not yet support the Audio Subunit FUNCTION_BLOCK command, so I don't think 
the hardware can set the volume right now anyway).

     

    Thanks again for your time,

     

    John

     

     

      ----- Original Message ----- 

      From: Mathieu Routhier 

      To: wdmaudiodev@xxxxxxxxxxxxx 

      Sent: Wednesday, August 25, 2004 1:45 PM

      Subject: [wdmaudiodev] Re: AVStream Mixer Problems

       

      Oh.  One more thing:

       

      In my experience, sysaudio will set a volume value and verify it has been 
successfully set by querying the value right afterwards.  If it gets confused 
by seeing that the value is not set as required, after a few tries, it will 
ultimately give up and disable the control.  I don't know the exact algorithm 
but that's what I've witnessed.

       

      Mat

       


--------------------------------------------------------------------------

      From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of DJ Sisolak
      Sent: Wednesday, August 25, 2004 3:50 PM
      To: wdmaudiodev@xxxxxxxxxxxxx
      Subject: [wdmaudiodev] Re: AVStream Mixer Problems

       

      Hi John,

       

      I would like to add to Mathieu's comments that if the support handler 
does not return the expected structures and simply returns success as you say,  
then the control will likely not function as well. 

       

      On a side note, does your device implement the AV/C Audio subunit spec? 

       

      Thx,

      DJ

       

      This posting is provided "AS IS" with no warranties, and confers no rights

       


--------------------------------------------------------------------------

      From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Mathieu Routhier
      Sent: Wednesday, August 25, 2004 11:35 AM
      To: wdmaudiodev@xxxxxxxxxxxxx
      Subject: [wdmaudiodev] Re: AVStream Mixer Problems

       

      John,

       

      Obviously, if your hardware needs a message to change its volume value, 
yes you need to send a message to it.  Maybe I misunderstood the question?

       

      About the second question, yes, these controls are inserted by 
kmixer/sysaudio.  I would suggest you implement volume control on your master 
volume and leave the other controls untouched.  The inputs from those lines are 
mixed directly into your audio device, so you couldn't differentiate these 
feeds even if you wanted to.  And for the balance control, this translates to 
volume commands; so you don't really need to do anything special for this to 
work, other than supporting a stereo volume commands.

       

      Mat

       

       

Other related posts: