LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-15-2005, 01:39 PM   #1
TimmyP
Member
 
Registered: Dec 2003
Location: Newark, DE
Distribution: Debian "sarge"
Posts: 50

Rep: Reputation: 15
changing what item Kmix controlls


hello all,

i recently switched back from gnome to kde, and have run into a problem. in the kde 3.3 kmix volume controll panel icon thing (wow...how technical) i can only controll the master sound output volume without opening the mixer. changing the master does nothing for my sound, only changing VIA DSX

does anyone know how to make it so that when i click on the kmix icon, i can controll the VIA DSX instead of master?
 
Old 01-15-2005, 02:32 PM   #2
Qwindelzorf
LQ Newbie
 
Registered: Jan 2005
Posts: 13

Rep: Reputation: 0
I have the same issue. The master volume control does nothing whatsoever. PCM can be muted/unmuted to turn sound on and off, and VIA DSX actually controls volume. I have yet to find a good solution. My current plan is to whip up a couple of bash scripts to control the volume of the VIA DSX channel, and then use xbindkeys to bind the buttons on my keyboard to said scripts. This won't fix the problem, but will work around it.

- Stephen
 
Old 01-15-2005, 03:11 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
I don't think you can't controll that without messing with the source code
look at kmixdockwidget.cpp
and there is a line
Code:
 MixDevice *masterDevice = (*mixer)[mixer->masterDevice()];
then in mixer.h i see
Code:
 /// Returns the number of the master volume device */
      int masterDevice() { return m_masterDevice; };
so if you play with that return code you might be able to get what you want
m_masterDevice = 0; is in mixer.cpp

you can see what the mixer device numbers are by looking at ~/.kde/share/config/kmixctrlrc

once you do configure in the top dir of kdemultimedia you can move into kmix directory and do makes and make installs from there
 
Old 01-15-2005, 04:13 PM   #4
Qwindelzorf
LQ Newbie
 
Registered: Jan 2005
Posts: 13

Rep: Reputation: 0
OK. I have finished the aforementioned script, and have a solution of sorts. Fiddling around with the innards of Kmix didn't work too well, so I whipped up a quick perl script that changes the volume of a specified channel by a specified increment. Not too nice, but it works. This script is then bound to the little volume spinner on my Logitech iTouch keyboard using xbindkyes. Hopefully this will be helpful to someone else as well.

- Stephen


volch.pl:
Code:
#!/usr/bin/perl

# volch.pl: volume changing script
#  Uses amixer to get the current volume, then uses amixer again to 
#  change the volume by a specified increment

use strict;

my $curr_vol;
my $target_vol;
my $increment;
my $channel;

if($#ARGV+1 != 2) {
    print "Usage: volch.pl <channel> <increment/decrement>\n";
    print "  ex: volch.pl \"PCM\" +3\n";
    exit;
}

$channel=$ARGV[0];
$increment=$ARGV[1];

$_=`amixer get '$channel' `;
/\[(\d{3}|\d{2}|\d)%\]/;
$curr_vol = $1;

$target_vol=$curr_vol+$increment;
`amixer set '$channel' $target_vol% `;
.xbindkeysrc:
Code:
# "Volume Up" on spinner
"volch.pl 'VIA DXS' +3"
  c:176
# "Volume Down" on spinner
"volch.pl 'VIA DXS' -3"
  c:174
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot delete item as root!! provkitir Linux - Newbie 10 03-25-2007 01:58 AM
removing item from array niteshadw Programming 1 08-01-2005 06:06 PM
mozilla xpm kmenu item desktop item cjae Linux - Newbie 3 04-06-2005 07:11 AM
Menu item in Madrake 9.2 Veli Mandriva 2 07-11-2004 06:24 AM
kmix not changing volume Moebius Linux - Software 0 02-15-2004 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration