# The &kmix; Handbook

Matt
Johnston

    mattj@flashmail.com

Christian
Esken

    esken@kde.org

Developer
Helio
Chissini de Castro

    helio@kde.org

Developer
Stefan
Schimanski

    1Stein@gmx.de

Developer
Lauri
Watts

    lauri@kde.org

Reviewer
1996
2003
Christian Esken & Matt Johnston
&FDLNotice;
2003-04-24
1.91.00

&kmix; is an application to allow you to change the volume of your sound card.

KDE
KMix
kdemultimedia
sound
volume
mixer

## Introduction

&kmix; is &kde;'s soundcard mixer program. Though small, it is full-featured. The program should give controls for each of your soundcards.

&kmix; supports several platforms and sound drivers. Version 1.91 works with:

- All Open Sound System platforms. Explicitly tested are &Linux;, FreeBSD, NetBSD and BSDI.

- &Solaris; based machines.

- &IRIX; based machines.

- The ALSA soundcard driver.

- &HP-UX; based machines.

## Working with &kmix;

&kmix; usage is straightforward. Every mixer device that your soundcard provides is represented by a volume slider. Mono devices have a single slider, stereo devices can have either one or two sliders, depending on your choice. Additionally there is a panning slider at the bottom of the &kmix; window. If you have multiple soundcards, they will each have their own tab.

### Volume sliders

The volume sliders have a context menu, accessible by right clicking on the slider or device icon (at the top). Several entries are possible, but only those applicable are shown.

Split Channels

  Show either one or two sliders. This is only applicable to stereo devices. The right slider controls right side volume, and the left controls left side volume.

Muted

  Mute or unmute the device

Hide

  If you are not interested in regulating this device you can hide it with this option. If you want to show it again, you can only do this by selecting the Show All option (see below)

Define Keys

  You can control a device with your keyboard. Use this menu option to show the KDE Configure Shortcuts dialog. Here you can define keys for increasing and decreasing volume and for muting the device. The keys are global and operate also when &kmix; is iconified or docked.

Show All

  If you have hidden devices via the Hide option (see above), you can show them all again with this option.

Show Menubar

  This option is not device specific, but affects the mixer window. You can hide and show the menu bar with this option. You can also do this by pressing the Shortcut (usually CTRL-m)

### Panning slider

With this slider you can control the volume distribution between left and right speaker. This slider is an overall regulator, which affects all stereo devices (Mono devices are ignored). The middle position is the default. Dragging the slider to the left lowers the volume of the right speaker, dragging it to the right vice versa. Of course, these might be swapped if your speakers aren't positioned correctly.

### Configuration options

If the &kmix; icon is docked into the system tray, you can right click it to choose preferences. These items are:

Dock into panel

  minimize to an icon in the system tray

Enable system tray volume control

  If checked, &kmix; will dock in the systray when pressing the window close button. If not checked, &kmix; will quit on pressing the window close button. Attention: After quitting you will not be able to control the volume if you have assigned keys for this.

Show tickmarks

  Show lines to mark positions on the sliders.

Show labels

  Display labels for each of the sound devices. Wether this item is checked or not, by holding the mouse over the icon for each device, you can see this information.

## The &kmix; panel applet

The &kmix; panel applet is an alternative interface to &kmix;. You can add it to the KDE panel by using the panel menu (Panel Menu -> Add -> Applet -> KMix Applet).

You can work with the &kmix; applet as described for the main window - including the context menu. Due to the limited space in the panel there are differences:

- No main menu available.
- If you have multiple soundcards, you cannot change the selected mixer after the initial selection.
- No dock icon. If you want to use the dock item you must additionally start &kmix; from the K-Menu (usually installed under K-Menu -> Multimedia -> Sound Mixer).
- Icons only available when panel is big enough.
- No device name labels available.
- Configuration is done via panel menu - you can configure colors and slider direction there.

## &kcontrol; Settings

### Configuration options

In the Mixer item, under Sound in &kcontrol;, you can set various options for &kmix;:

Save current volumes

  Save the current sound settings to load later.

Load volumes

  Load sound settings which were previously saved.

Load volumes on login

  Automatically load the previous settings when you start &kde;.

Maximum number of probed mixers

  How many different soundcards &kmix; should look for when starting. Set this low to speed up &kmix;'s startup time.

Maximum number of probed devices per mixer

  How many devices to look for per soundcard. Again, set this low to speed up &kmix;.

## Advanced KMix features

This chapter describes &kmix; functionality that is targeted at the experienced user. Most users will never have a need for this functionality, so you can safely skip this chapter

### The DCOP Interface

Sometimes you want to do specialized things. Things like controlling the mixer from another application or muting the master device every day at 10pm. &kmix; has a DCOP interface that allows you to achieve much with minimal work. You can start a shell and type dcop kmix to start exploring the &kmix; DCOP interface. The &kmix; specific interfaces are:

Mixer0

  Allows manipulating the first mixer. You can set volume levels, mute the device, change balance, retrieve the mixer name and much more. Type dcop kmix Mixer0 if you want to explore all the features. There are more entries like Mixer1 in case multiple soundcards are installed.

kmix-mainwindow#1

  The GUI window can be controlled with this command. You can hide and show the window, resize it and much more. Type dcop kmix kmix-mainwindow#1 if you want to explore all the features.

### DCOP Examples

dcop kmix kmix-mainwindow#1 hide

  Hides the GUI window. Use dcop kmix kmix-mainwindow#1 show or the dock icon to show it again.

dcop kmix kmix-mainwindow#1 resize 1 1

  Resizes the GUI window to the smallest size possible. This is the size so that all sliders (and other GUI elements) will fit into the window.

dcop kmix Mixer0 mixerName

  Tells the name of the first Mixer, for example Sound Fusion CS46xx

dcop kmix Mixer1 setVolume 0 10

  Sets the volume on the second mixer, device 0 to 10 percent. Device 0 is often the master device, but not always. If you want to quiet down the (first) master device on your second soundcard, you can use dcop kmix Mixer1 setMasterVolume 0

You can directly execute these commands from a shell that you started from inside KDE. If you need to execute dcop commands from somewhere else, for example from a crontab script, you need to define the DCOPSERVER environment variable (as seen in the first line of your ~/.DCOPserver_hostname_:0 file), for example:

- #!/bin/sh
- DCOPSERVER=`cat /home/yourhome/.DCOPserver_yourhostname_:0 | grep local`
- export DCOPSERVER
- dcop kmix Mixer0 setMasterVolume 0

### Tips and Tricks

Using ALSA and OSS driver at the same time>

  KMix on Linux can use either the ALSA driver or the OSS driver, not both. If you really need to use both drivers at the same time (a very rare situation), you can do it as follows: Quit KMix and add the following line to your kmixrc file in the global configuration section.

  MultiDriver=true

  Start KMix again. If you click Help->Hardware Information you should see "Sound drivers used: ALSA0.9 + OSS" and "Experimental multiple-Driver mode activated"

  Warning: You will probably see all of your mixers doubled.

  There is no support for this kind of configuration.

## Credits and License

Main developers

- Copyright 1996-2000 Christian Esken

- Copyright 2000-2003 Christian Esken & Stefan Schimanski

- Copyright 2003 Christian Esken & Helio Chissini de Castro

Contributors:

- Christian Esken esken@kde.org

- Stefan Schimanski 1Stein@gmx.de

- Paul Kendall paul@orion.co.nz - SGI Port

- Sebestyen Zoltan szoli@digo.inf.elte.hu - FreeBSD Fixes

- Faraut Jean-Louis jlf@essi.fr - Solaris Fixes

- Nick Lopez kimo_sabe@usa.net - ALSA Port

- Helge Deller deller@gmx.de - HP-UX Port

- Lennart Augustsson augustss@cs.chalmers.se - *BSD Fixes

Documentation copyright 2000 Matt Johnston mattj@flashmail.com

Updated 2003 to match &kmix; V1.91 by Christian Esken esken@kde.org

Based on documentation by Christian Esken esken@kde.org

&underFDL; &underGPL;

## Installation

### How to obtain &kmix;

&install.intro.documentation;

### Requirements

Obviously, &kmix; is only of use if you have a soundcard. &kmix; supports several platforms and sound drivers:

- All Open Sound System platforms. Explicitly tested are &Linux;, FreeBSD, NetBSD and BSDI.

- &Solaris; based machines.

- &IRIX; based machines.

- The ALSA soundcard driver.

- &HP-UX; based machines.

### Compilation and Installation

&install.compile.documentation;