Menu

Controlling second sound card?

Help
2007-07-19
2013-04-23
  • Toby Thurston

    Toby Thurston - 2007-07-19

    I have gizmod 3.3 installed and working on Ubuntu 7.04 with my Powermate as the input device.

    I can use the powermate to scroll pages in firefox (provided I press the button, doesn't seem to work without the button down) but I can't control the volume...

    I think the problem is that I have two sound cards.  The first one (intel ICH5) is the one built into the PC and has no speakers attached to it, the second is an external USB Griffin Powerwave amplifier that does have the speakers in it.

    Both the Intel card and the Powerwave have "PCM" devices so my guess is that my input events are going to the internal card that I don't use for play back.

    Any suggestions of how to get gizmod to pick the second card?  Or perhaps drive the gnome volume control panel applet?  Thanks Toby

     
    • Tim Burrell

      Tim Burrell - 2007-07-19

      Hey Toby,

      Right now you CAN do this.  You could do something like:

      SoundCard = Gizmod.getSoundCard(1) # this will get the second sound card on the system
      Gizmod.DefaultMixerVolume = SoundCard.getMixer("PCM") $ Replace PCM with the volume mixer on the second sound card
      Gizmod.DefaultMixerSwitch = SoundCard.getMixer("PCM") # Replace PCM with the mute switch on the second sound card

      Then the scripts will work as they should.

      That being said, this is a bit of a dirty hack.  I'm going to think of the best way to do this.  I'm thinking of maybe adding in a variable in GizmoDeviceStrings.py called IGNORE_SOUNDCARDS, or maybe just a command line switch or something.  If you have any thoughts on how you'd prefer it done let me know.  Otherwise gimme a couple days and I should have an update in SVN available.

      Thanks!

      Tim.

       

Log in to post a comment.