Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [OT] Re: What netbook to you run NetBSD on? (-> netbook.xml)



On Thu, Oct 23, 2008 at 02:04:40PM +1100, Malcolm Herbert wrote:
 > personally I'm happy with the mixerctl approach, 

The issue isn't mixerctl so much as the backend representation that
mixerctl talks to.

 > but perhaps modify it
 > to allow the user to specify aliases for most commonly used parameters?

There are two ways that this could be done: (1) in the backend mixer
stuff, which would have the advantage that the aliases could be made
to show up across all mixer tools, but has the same problem that the
backend representation isn't powerful enough; or (2) just inside
mixerctl. The latter wouldn't be that hard. The catch is that there
are a lot of assorted *ctl programs and they all intentionally have
the same mib-type interface. Adding alias support to all of them is
probably not so trivial. I'm not sure to what extent they share code.

But under the circumstances, it's probably a good idea.

In the meantime, if you want a quick hack, you might try something
like this:

  --- /usr/local/bin/mixerctl ---

   #!/bin/sh
   /usr/bin/mixerctl `echo "$@" | sed -f /usr/local/etc/mixeraliases`

  ------

and populate mixeraliases with e.g.

   s/my\.volume/inputs.dac02/

which would then let you do "mixerctl my.volume" or "mixerctl -w
my.volume=128,128".

But it's a hack.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index