# 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
2005
Christian Esken & Matt Johnston
&FDLNotice;
2005-02-08
2.2

&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:

- The ALSA soundcard driver.

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

- &Solaris; based machines.

- &IRIX; based machines.

- &HP-UX; based machines.

If you have both ALSA and Open Sound System drivers installed, KMix will use the ALSA driver.

## Working with &kmix;

### Basics

&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 more than one soundcard, a list will be displayed on the top of the window, where you can choose between your soundcards.

The &kmix; Main Window The &kmix; Main Window

The Window has three sections with soundcard controls:

- Output: This holds the controls that are most likely playback related, like the "Master" volume control.
- Input: This holds all controls that are most likely record related, like "Capture".
- Switches: This holds all controls, that allows only to switch some functionality ON or OFF (like "Mic Boost (+20dB)"), and multiple-choice controls (like "Microphone Select: Mic1 or Mic2").

Besides volumes controls, KMix also features LED's. The general coloring rule is:

- Green: A LED dealing with playback
- Red: A LED dealing with recording
- Yellow: A LED dealing with special soundcard capabilities

### Volume controls

The volume controls in section "Output" and "Input" consist of (top to bottom): Volume control ("Input" Section) Volume control ("Input" Section)

- An icon, representing the function of the control.
- A Green Mute LED, that allows you to mute a control (light goes off/gets dark) or unmute it again (light goes on/gets bright).
- A slider, for volume control (Hint: You can hide the label on the slider, for example if the mixer takes too much of your screen space).
- If a control supports recording, there will be a red Record LED. If the LED is lit (bright red), the control is selected for recording. If it is not lit (dark red), the control is NOT selected for recording.

Volume control with Recording Switchi ("Output"Section) Volume control with Recording Switchi ("Output"Section)

The controls in section "Switches" consist of a LED and a short label describing the function. Please remember, red LED's are for recording issues, yellow LED's are for special soundcard features. If you are uncertain about the meaning of a control, please ask your soundcard driver supplier (for most current Linux distributions this is ALSA from http://www.alsa-project.org).

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 Channels option (see below)

Configure Shortcuts

  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.

Channels

  You will get a dialog box where you can configure per section (Output, Input, Switches), which channels you want to see.

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 the Master Volume. 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.

For Surround Systems please be aware that the Master device often regulates only the Front Speakers. This is a limitation of your Soundcard driver. if your soundcard has

If your soundcard has no Master device, some other device might get picked by KMix - for most people this is the Wave (or PCM) control.

### Configuration options

Use Menubar -> Settings -> Configure KMix... to choose preferences. These items are:

Dock into panel

  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.

Enable system tray volume control

  If enabled, a left-clicking the KMix dock icon will show a popup window with a volume control for the preferred device (Hint: currently you cannot change this device - it is selected by KMix instead). If the option is disabled, the KMix Main Window will be shown on a left-click on the KMix dock icon.

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.

Restore volumes on login

  Let KDE restore the volumes when you Login: This restores your personal volume levels, stored when you last logged out. If your Operating System saves the volume levels, you might not need this option (but on a computer with multiple users it is still needed).

## 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.
- No automatic volume saving. If you want your volumes saved when you logout for later restauration, you must also start KMix from the K-Menu.

## 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-2005 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

Updated 2005 to match &kmix; V2.2 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;