Zmixer

Raspberry Zmixer ALSA Sound Control Tutorial

by Lewis Loflin

This is part of my project to construct a fast and fully functional Linux system for the Raspberry Pi. While I've used the official Raspbian Wheezy and PiBang Debian type systems. I've also used this with Slackware Linux. I'm using both the Openbox and JWM window managers here.

This will work on most regular Linux distributions

The goal here is to produce a fast low-resource volume control and learn some basics of how Linux does things.

Here we will compile and install a simple ALSA (Advanced Linux Sound Architecture) volume control called Zmixer. This is often used in versions of Puppy Linux and is fast and easy to setup.

The Zmixer website is very lacking in information so here I'll walk the novice Linux user through the process on how to install Zmixer.

Make sure you are type root "sudo su" (enter) and (if in a regular Linux distribution) give your root password. You will need the following if not already installed:

~ $ apt-get install gtk+-2 libasound2-dev

Gtk+-2 gives one the tools to write and compile binary packages while libasound-dev has a needed file for Zmixer.

I assume you are working from Linux. Download the Zmixer binary zmixer-0.2.0.tar.gz from my website (www.bristolwatch.com/rpi) or from the Zmixer website (http://zwin.org/zmixer/) and save in your Downloads (or whatever) directory.

Open a terminal program such as LXterminal in that directory. Type "ls" (list in Linux) and you should see the package. I'll assume you are using Raspberry Pi or other Debian type system.

Compile your first binary package

(See the short section on tarballs below) Get the file from my website using wget then follow the sequence below.

We will do the following with the sequence below:
1) became root with sudo su;
2) downloaded the binary package from my website;
3) "tar" broke the single file back into multiple files and stored them in directory zmixer-0.2.0;
4) "cd zmixer-0.2.0" moved us into the new directory;
5) "make" assembled our binary zmixer - you should get a message.;
6) "cp" copied zmixer to /usr/local/bin;
7) changed directory to /usr/local/bin;
8) chmod made the binary executable;
9) typing "zmixer" anywhere will call the program.

~ $ sudo su
~ $ wget http://www.bristolwatch.com/rpi/dl/zmixer-0.2.0.tar
~ $ tar -xvf zmixer-0.2.0.tar
~ $ cd zmixer-0.2.0
~ $ make
~ $ cp zmixer /usr/local/bin/
~ $ cd /usr/local/bin
~ $ chmod +x zmixer
~ $ zmixer

This works with most binary packages with the correct Linux system. This was configured for Raspberry Pi (an ARM processor) and this version of zmixer won't work on a regular PC running Debian Linux - but will work if the process was followed on the PC itself.

Add to your Openbox menu (assuming you are user pi) in /home/pi/.config/openbox/menu.xml:

$ leafpad ~/.config/openbox/menu.xml

Note that "~" replaced "/home/pi". Typing for example "cd ~" will return one to their home directory as opposed to "cd /home/pi".

Look at how the programs in the Openbox menu are arranged and add this between them at the position you want.

<item icon="/usr/icons/apps/gnome-mixer.png" label="Zmixer">
<action name="Execute">
<execute>zmixer</execute>
</action>
</item>

Or your JWM menu:

<Program icon="/usr/icons/apps/gnome-mixer.png"
 label="Zmixer">zmixer</Program>

Any other icon will or work or still work without an icon.

Quick Look at Tar Files

Many files in Linux come as compressed files often called tarballs. One can use Xarchiver that comes stock with Raspberry Pi and Pibang in your window manager.

But that requires that Openbox, JWM, LXDE, etc. are working and Xarchiver won't work easily from a command line. Let's learn to use the terminal and command line. Note the following examples:

tar -xvf myfile.tar
tar -xzvf myfile.tar.gz
tar -xjvf myfile.tar.bz2

Where,
-x : Extract a tar ball.
-v : Verbose output or show progress while extracting files.
-f : Specify an archive or a tarball filename.
-j : Decompress and extract the contents of the compressed archive created by bzip2 program (tar.bz2 extension).
-z : Decompress and extract the contents of the compressed archive created by gzip program (tar.gz extension).

Thus as you saw for Zmixer this created a new folder zmixer-0.2.0 with a dozen or so small separate files.

$tar -xvf zmixer-0.2.0.tar



Loading

Videos:
Raspberry Pi, Arduino, and Learning Linux
Raspberry PI Arduino Advanced Interface
Tkinter with Raspberry Pi and PCF8591 AD-DA Sensor

Linux Videos

Live Linux Distro for Using Printer Port with Electronics
Using the powerful Rox-Filer system in Linux
Use FEH under Linux for a Wallpaper Setter
How to create Symbolic links in Linux

 


donate