Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**
Showing posts with label audio. Show all posts
Showing posts with label audio. Show all posts

Wednesday, May 24, 2023

The trouble with alsa

The trouble with alsa-plugins could be unique to me, which seems too often to be the case when I do choose to submit a bug report.  I have decided to play Veloren a bit more often in lieu of minetest.  In ports now is games/veloren-weekly which means this game client/server combo install will be updated by the maintainer on a 7-day cycle.  I adjusted a copy of the Makefile in my personal Ported_Software directory after copying everything else from /usr/ports/games/veloren-weekly.  My only change being to revise the commit hash and date.  This is one of the few ports that I know of which would follow the most recent git repo commit hash in a similar fashion as my own.  My revised veloren port got through all of its build and then the install of it discovered that alsa was incomplete, alsa-plugins being one of the dependencies, and it failed to install.

Instead of alsa-plugins getting installed, it stops with an error from pkg-static:

mkdir -p /usr/ports/audio/alsa-plugins/work/stage/usr/local/etc/alsa/conf.d
cd /usr/ports/audio/alsa-plugins/work/stage/usr/local/etc/alsa/conf.d
/bin/rm -f 60-speex.conf; ln -s /usr/local/share/alsa/alsa.conf.d/60-speex.conf .
cd /usr/ports/audio/alsa-plugins/work/stage/usr/local/etc/alsa/conf.d && for i in [0-9][0-9]-*.conf ; do  /bin/ln -sf ../../../share/alsa/alsa.conf.d/$i .  ; done
====> Compressing man pages (compress-man)
===>   Installing ldconfig configuration file
===>  Installing for alsa-plugins-1.2.2_9
===>  Checking if alsa-plugins is already installed
===>   Registering installation for alsa-plugins-1.2.2_9
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/etc/alsa/conf.d/10-rate-lav.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/etc/alsa/conf.d/60-a52-encoder.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_pcm_a52.la:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_pcm_a52.so:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_rate_lavrate.la:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_rate_lavrate.so:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_rate_lavrate_fast.so:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_rate_lavrate_faster.so:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_rate_lavrate_high.so:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/lib/alsa-lib/libasound_module_rate_lavrate_higher.so:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/share/alsa/alsa.conf.d/10-rate-lav.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/audio/alsa-plugins/work/stage/usr/local/share/alsa/alsa.conf.d/60-a52-encoder.conf:No such file or directory
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/audio/alsa-plugins
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/audio/alsa-plugins
*** Error code 1

Stop.
make: stopped in /usr/ports/audio/alsa-plugins
root@ichigo:/usr/ports/audio/alsa-plugins #

Since I have handled numerous updates to my unofficial ports, from time to time I see a similar message.  What this means is that something about the install has changed but the pkg-plist no longer matches what was built.  Just as when updating minetest-dev or some other of my unofficial ports, what needs to be done is to set aside the pkg-plist by renaming it pkg-plist-old, and then re-creating one.  This is a quick and easy task, simply make makeplist > pkg-plist and edit the result to remove one line.  I assume that what gets built with my present alsa-plugins configuration is what would satisfy Veloren, I will just replace the pkg-plist to solve the pkg-static error messages.  The result of creating the new pkg-plist when I do a diff between them, just to show you how they are not identical, is below.  The one line I had to remove is: /you/have/to/check/what/makeplist/gives/you

root@ichigo:/usr/ports/audio/alsa-plugins # diff -y -W 120 pkg-plist pkg-plist-old | more
etc/alsa/conf.d/10-samplerate.conf                         |    %%FFMPEG%%etc/alsa/conf.d/10-rate-lav.conf
etc/alsa/conf.d/10-speexrate.conf                          |    %%SAMPLERATE%%etc/alsa/conf.d/10-samplerate.conf
etc/alsa/conf.d/50-arcam-av-ctl.conf                       |    %%FFMPEG%%etc/alsa/conf.d/60-a52-encoder.conf
etc/alsa/conf.d/50-oss.conf                                |    @comment etc/alsa/conf.d/50-arcam-av-ctl.conf
etc/alsa/conf.d/60-speex.conf                              |    @comment etc/alsa/conf.d/50-oss.conf
etc/alsa/conf.d/60-upmix.conf                              |    @comment etc/alsa/conf.d/50-pulseaudio.conf
etc/alsa/conf.d/60-vdownmix.conf                           |    %%SPEEX%%etc/alsa/conf.d/60-speex.conf
etc/alsa/conf.d/98-usb-stream.conf                         |    @comment etc/alsa/conf.d/60-upmix.conf
                                                           >    @comment etc/alsa/conf.d/60-vdownmix.conf
                                                           >    @comment etc/alsa/conf.d/98-usb-stream.conf
                                                           >    @comment etc/alsa/conf.d/99-pulseaudio-default.conf.exa
                                                           >    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_conf_pulse.
                                                           >    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_conf_pulse.
lib/alsa-lib/libasound_module_ctl_arcam_av.la                   lib/alsa-lib/libasound_module_ctl_arcam_av.la
lib/alsa-lib/libasound_module_ctl_arcam_av.so                   lib/alsa-lib/libasound_module_ctl_arcam_av.so
lib/alsa-lib/libasound_module_ctl_oss.la                        lib/alsa-lib/libasound_module_ctl_oss.la
lib/alsa-lib/libasound_module_ctl_oss.so                        lib/alsa-lib/libasound_module_ctl_oss.so
                                                           >    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_ctl_pulse.l
                                                           >    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_ctl_pulse.s
                                                           >    %%FFMPEG%%lib/alsa-lib/libasound_module_pcm_a52.la
                                                           >    %%FFMPEG%%lib/alsa-lib/libasound_module_pcm_a52.so
                                                           >    %%JACK%%lib/alsa-lib/libasound_module_pcm_jack.la
                                                           >    %%JACK%%lib/alsa-lib/libasound_module_pcm_jack.so
lib/alsa-lib/libasound_module_pcm_oss.la                        lib/alsa-lib/libasound_module_pcm_oss.la
lib/alsa-lib/libasound_module_pcm_oss.so                        lib/alsa-lib/libasound_module_pcm_oss.so
lib/alsa-lib/libasound_module_pcm_speex.la                 |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_pcm_pulse.l
lib/alsa-lib/libasound_module_pcm_speex.so                 |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_pcm_pulse.s
                                                           >    %%SPEEX%%lib/alsa-lib/libasound_module_pcm_speex.la
                                                           >    %%SPEEX%%lib/alsa-lib/libasound_module_pcm_speex.so
lib/alsa-lib/libasound_module_pcm_upmix.la                      lib/alsa-lib/libasound_module_pcm_upmix.la
lib/alsa-lib/libasound_module_pcm_upmix.so                      lib/alsa-lib/libasound_module_pcm_upmix.so
lib/alsa-lib/libasound_module_pcm_usb_stream.la                 lib/alsa-lib/libasound_module_pcm_usb_stream.la
lib/alsa-lib/libasound_module_pcm_usb_stream.so                 lib/alsa-lib/libasound_module_pcm_usb_stream.so
lib/alsa-lib/libasound_module_pcm_vdownmix.la                   lib/alsa-lib/libasound_module_pcm_vdownmix.la
lib/alsa-lib/libasound_module_pcm_vdownmix.so                   lib/alsa-lib/libasound_module_pcm_vdownmix.so
lib/alsa-lib/libasound_module_rate_samplerate.la           |    %%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavrate.la
lib/alsa-lib/libasound_module_rate_samplerate.so           |    %%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavrate.so
lib/alsa-lib/libasound_module_rate_samplerate_best.so      |    %%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavrate_fa
lib/alsa-lib/libasound_module_rate_samplerate_linear.so    |    %%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavrate_fa
lib/alsa-lib/libasound_module_rate_samplerate_medium.so    |    %%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavrate_hi
lib/alsa-lib/libasound_module_rate_samplerate_order.so     |    %%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavrate_hi
lib/alsa-lib/libasound_module_rate_speexrate.la            |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_speexrate.so            |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_speexrate_best.so       |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_speexrate_medium.so     |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
libdata/ldconfig/alsa-plugins                              |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
share/alsa/alsa.conf.d/10-samplerate.conf                  |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
share/alsa/alsa.conf.d/10-speexrate.conf                   |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate.l
share/alsa/alsa.conf.d/50-arcam-av-ctl.conf                |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate.s
share/alsa/alsa.conf.d/50-oss.conf                         |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_b
share/alsa/alsa.conf.d/60-speex.conf                       |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_m
share/alsa/alsa.conf.d/60-upmix.conf                       |    %%FFMPEG%%share/alsa/alsa.conf.d/10-rate-lav.conf
share/alsa/alsa.conf.d/60-vdownmix.conf                    |    %%SAMPLERATE%%share/alsa/alsa.conf.d/10-samplerate.conf
share/alsa/alsa.conf.d/98-usb-stream.conf                  |    @comment share/alsa/alsa.conf.d/50-arcam-av-ctl.conf
                                                           >    @comment share/alsa/alsa.conf.d/50-oss.conf
                                                           >    %%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
                                                           >    %%FFMPEG%%share/alsa/alsa.conf.d/60-a52-encoder.conf
                                                           >    %%SPEEX%%share/alsa/alsa.conf.d/60-speex.conf
                                                           >    @comment share/alsa/alsa.conf.d/60-upmix.conf
                                                           >    @comment share/alsa/alsa.conf.d/60-vdownmix.conf
                                                           >    @comment share/alsa/alsa.conf.d/98-usb-stream.conf

You may notice those items which are in the error messages from install are omitted from the new pkg-plist on the left or have changed to reflect what is now installed.  Of course, because I am doing this sort of 'quick and dirty' solve for installing this dependency for games/veloren, there are a number of other differences.  The old pkg-plist includes all options ticked which have conditional pkg include tags related to each config option, such as %%SPEEX%% and %%FFMPEG%% which I may not have ticked in this recent install.

After this cure for the pkg-plist issue I had when installing alsa-plugins to satisfy the dependency for veloren-weekly, it can be successfully installed (because the pkg-plist will now match what will get installed) and I can then install veloren-weekly as initially desired.  This sort of fix is fairly simple and could apply to nearly any port which strangely has a pkg-plist issue like this one.  With regard to my veloren-weekly install, I would need to re-generate the distinfo file in order to begin the reinstall process with the updated upstream commit source.

Should this pkg-plist disparity linger for any significant period of time, it would be a good candidate for a bugzilla report to help its maintainer to recognize an adjustment needs to be made for the pkg-plist.  However, I intend to assume that my system, my install, my build methods, and anything else which could affect the legitimacy of such a bug report are suspect or different or incorrect or flawed, and so I will not be making a report.  It may also already be the case that this has been updated within the time it has taken me to write this blog post.

Addendum

Whoops, a more proper less quick or dirty fix for alsa-plugins means I have to revise the pkg-plist correctly.  I had hoped that my less pretty solution would have worked but I lacked audio even though veloren was satisfied by the dependencies and successfully built.  This meant I did a much more careful comparison (diff) and modification of the generated pkg-plist to match what had been built.

The diff that I ended with is below.  If you compare the fixed one with the unedited pkg-plist in the above blog post, there are still oddities of things missing or present or renamed.  Even though it seems odd, the fixed pkg-plist did result with audio in veloren.

root@ichigo:/usr/ports/audio/alsa-plugins # diff -y -W 120 pkg-plist pkg-plist-fixed | more
etc/alsa/conf.d/10-samplerate.conf                         |    %%SAMPLERATE%%etc/alsa/conf.d/10-samplerate.conf
etc/alsa/conf.d/10-speexrate.conf                          |    %%SPEEX%%etc/alsa/conf.d/10-speexrate.conf
etc/alsa/conf.d/50-arcam-av-ctl.conf                       |    @comment etc/alsa/conf.d/50-arcam-av-ctl.conf
etc/alsa/conf.d/50-jack.conf                               |    @comment etc/alsa/conf.d/50-jack.conf
etc/alsa/conf.d/50-oss.conf                                |    @comment etc/alsa/conf.d/50-oss.conf
etc/alsa/conf.d/50-pulseaudio.conf                         |    @comment etc/alsa/conf.d/50-pulseaudio.conf
etc/alsa/conf.d/60-speex.conf                              |    %%SPEEX%%etc/alsa/conf.d/60-speex.conf
etc/alsa/conf.d/60-upmix.conf                              |    @comment etc/alsa/conf.d/60-upmix.conf
etc/alsa/conf.d/60-vdownmix.conf                           |    @comment etc/alsa/conf.d/60-vdownmix.conf
etc/alsa/conf.d/98-usb-stream.conf                         |    @comment etc/alsa/conf.d/98-usb-stream.conf
etc/alsa/conf.d/99-pulseaudio-default.conf.example         |    @comment etc/alsa/conf.d/99-pulseaudio-default.conf.exa
lib/alsa-lib/libasound_module_conf_pulse.la                |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_conf_pulse.
lib/alsa-lib/libasound_module_conf_pulse.so                |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_conf_pulse.
lib/alsa-lib/libasound_module_ctl_arcam_av.la                   lib/alsa-lib/libasound_module_ctl_arcam_av.la
lib/alsa-lib/libasound_module_ctl_arcam_av.so                   lib/alsa-lib/libasound_module_ctl_arcam_av.so
lib/alsa-lib/libasound_module_ctl_oss.la                        lib/alsa-lib/libasound_module_ctl_oss.la
lib/alsa-lib/libasound_module_ctl_oss.so                        lib/alsa-lib/libasound_module_ctl_oss.so
lib/alsa-lib/libasound_module_ctl_pulse.la                 |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_ctl_pulse.l
lib/alsa-lib/libasound_module_ctl_pulse.so                 |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_ctl_pulse.s
lib/alsa-lib/libasound_module_pcm_jack.la                  |    %%JACK%%lib/alsa-lib/libasound_module_pcm_jack.la
lib/alsa-lib/libasound_module_pcm_jack.so                  |    %%JACK%%lib/alsa-lib/libasound_module_pcm_jack.so
lib/alsa-lib/libasound_module_pcm_oss.la                        lib/alsa-lib/libasound_module_pcm_oss.la
lib/alsa-lib/libasound_module_pcm_oss.so                        lib/alsa-lib/libasound_module_pcm_oss.so
lib/alsa-lib/libasound_module_pcm_pulse.la                 |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_pcm_pulse.l
lib/alsa-lib/libasound_module_pcm_pulse.so                 |    %%PULSEAUDIO%%lib/alsa-lib/libasound_module_pcm_pulse.s
lib/alsa-lib/libasound_module_pcm_speex.la                 |    %%SPEEX%%lib/alsa-lib/libasound_module_pcm_speex.la
lib/alsa-lib/libasound_module_pcm_speex.so                 |    %%SPEEX%%lib/alsa-lib/libasound_module_pcm_speex.so
lib/alsa-lib/libasound_module_pcm_upmix.la                      lib/alsa-lib/libasound_module_pcm_upmix.la
lib/alsa-lib/libasound_module_pcm_upmix.so                      lib/alsa-lib/libasound_module_pcm_upmix.so
lib/alsa-lib/libasound_module_pcm_usb_stream.la                 lib/alsa-lib/libasound_module_pcm_usb_stream.la
lib/alsa-lib/libasound_module_pcm_usb_stream.so                 lib/alsa-lib/libasound_module_pcm_usb_stream.so
lib/alsa-lib/libasound_module_pcm_vdownmix.la                   lib/alsa-lib/libasound_module_pcm_vdownmix.la
lib/alsa-lib/libasound_module_pcm_vdownmix.so                   lib/alsa-lib/libasound_module_pcm_vdownmix.so
lib/alsa-lib/libasound_module_rate_samplerate.la           |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_samplerate.so           |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_samplerate_best.so      |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_samplerate_linear.so    |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_samplerate_medium.so    |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_samplerate_order.so     |    %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_sample
lib/alsa-lib/libasound_module_rate_speexrate.la            |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate.l
lib/alsa-lib/libasound_module_rate_speexrate.so            |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate.s
lib/alsa-lib/libasound_module_rate_speexrate_best.so       |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_b
lib/alsa-lib/libasound_module_rate_speexrate_medium.so     |    %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_m
libdata/ldconfig/alsa-plugins                                   libdata/ldconfig/alsa-plugins
share/alsa/alsa.conf.d/10-samplerate.conf                  |    %%SAMPLERATE%%share/alsa/alsa.conf.d/10-samplerate.conf
share/alsa/alsa.conf.d/10-speexrate.conf                   |    %%SPEEX%%share/alsa/alsa.conf.d/10-speexrate.conf
share/alsa/alsa.conf.d/50-arcam-av-ctl.conf                |    @comment share/alsa/alsa.conf.d/50-arcam-av-ctl.conf
share/alsa/alsa.conf.d/50-jack.conf                        |    %%JACK%%share/alsa/alsa.conf.d/50-jack.conf
share/alsa/alsa.conf.d/50-oss.conf                         |    @comment share/alsa/alsa.conf.d/50-oss.conf
share/alsa/alsa.conf.d/50-pulseaudio.conf                  |    %%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
share/alsa/alsa.conf.d/60-speex.conf                       |    %%SPEEX%%share/alsa/alsa.conf.d/60-speex.conf
share/alsa/alsa.conf.d/60-upmix.conf                       |    @comment share/alsa/alsa.conf.d/60-upmix.conf
share/alsa/alsa.conf.d/60-vdownmix.conf                    |    @comment share/alsa/alsa.conf.d/60-vdownmix.conf
share/alsa/alsa.conf.d/98-usb-stream.conf                  |    @comment share/alsa/alsa.conf.d/98-usb-stream.conf

Sunday, March 28, 2021

umix for TV volume control

I use a separate miccus bluetooth transmitter connected by a headphone cable and RCA adapter so that I can listen to my television or pc.  Presently I have adapted a bit of magic that modified my original setup which had two outputs reaching the transmitter but that had a side-effect (60-cycle?) hum and was a mild hassle in general.

Instead of connecting the output of the headphone jack of my 4k PiP-capable monitor to the transmitter, I attach it to the mic port on my PC.  The line out port of my motherboard remains attached to the transmitter by way of an RCA adapter as it had originally. The final piece of the puzzle is a very cool utility called umix which is a simple non-graphical audio mixer.

The manual page gives the necessary information on how to use this application, including what I used as the mute toggle key (x).
UMIX(1)                         Sound Utilities                        UMIX(1)

NAME
       umix - adjust soundcard mixers

SYNOPSIS
       umix [channel volume|left:right][R|P][+|-] device] [-r driver] [-f
       configpath] [-ghilqsv]

DESCRIPTION
       umix is a program for adjusting soundcard mixers.  With it you can
       adjust your soundcard volumes, balances and recording sources.  It can
       be used flexibly from the command-line, or from an interactive user
       interface.

       You can save your soundcard volumes to a file, and load them
       afterwards, for example when when booting the machine.

       Channel names are used to specify the volume you want to adjust. You
       can check what channels are supported with the -q option. Channel names
       can also be shortened if they have enough distinctive letters to
       identify the channel, eg. 'volume' can be shortened to 'vol'. If
       channel name is specified as all , all available channels are set to
       the specified value.

       For each channel specified, volume is the volume you want to set, with
       both left and right specified as the same, or in left:right format.

       You can also specify optional + or - after the volume for increasing or
       decreasing the volume for channel, with amount volume.  The optional
       R or P at the end of the channel argument sets the channel as a current
       recording source or normal play, respectively.  You can use both upper-
       and lowercase letters.

       You can slide volumes smoothly in steps from one point to another.  The
       format is following: startvol,endvol,steps,delay.  Here startvol is the
       volume you want to slide the volume from, and endvol is the volume you
       want to increase or decrease in steps to.  Optional parameter steps
       specifies the number of steps between the two volumes, and delay the
       delay between two steps. Default values for steps is 20, and 20ms for
       delay.  The optional + or - have no effect when sliding volumes.

       The delay can be between 0 and 5 seconds, specified in milliseconds.
       Maximum value for steps is the difference between the starting and
       destination volume, so that the minimum raise or decrease in one step
       is always 1.

       All volume settings are parsed the same, so you can use sliding in your
       config file too, you just have to edit the config manually.  For
       example the line

       pcm 0,100,25,50

       in your config file would slide the volume of 'pcm' from 0 to 100 in 25
       steps and with a 50 ms delay when loading settings.

       Umix needs read and write permissions to the mixer device. I suggest
       that you create a group for this and change permissions so that group
       has write and read access to the devices, then add necessary users to
       that group.

OPTIONS
       -q, --query
              Query and print all active channel volumes and stats from all
              available devices. Interactive UI is not started.

       -l, --load
              Load previously saved settings from configpath.  If configpath
              is specified as '-', settings are loaded from standard input.
              Clears the -i option.

       -s, --save
              Save current mixer settings to configpath.  If configpath is
              specified as '-', settings are printed to standard output.
              Clears the -i option.

       -f configpath, --file=configpath
              Specify the file used to read and save settings.  Defaults to
              /etc/umixrc.  Sets the -i option.

       -d device, --device=device
              Specify the device used. Defaults to /dev/mixer.  Sets the -i
              option.

       -r driver, --driver=driver
              Specify the driver used. Defaults to OSS.  Sets the -i option.

       -i, --interactive
              Start interactive user interface after processing non-
              interactive command-line options.

       -g, --globals
              Print current global options. This is useful for finding out
              what is the default device etc.

       -h, --help
              Display help and exit.

       -v, --version
              Display version information and exit.

EXAMPLES
       umix -q
              Prints all volumes of active channels and their stats.  The
              output should be self-explanatory.

       umix volume 100 bass 88 treble 80 pcm 94
              Sets the volume to 100, bass to 88, treble to 80 and PCM to 94.

       umix vol 100:80 syn 90:30
              Here channel names are shortened and stereo settings are used.
              Sets volume`s left to 100, right to 80 and synth`s left to 90
              and right to 30.

       umix bass 20- pcm 20:10+ ogain 40:45-
              Here volumes are incremented or decremented from their original
              values. Decreases bass by 20, increases PCM`s left by 20 and
              right by 10 and the last one decreases output gain`s left by 40
              and right by 45.

       umix mic R synth 20P line 10p-
              This sets the mic as a recording source, synth as normal play
              with volume 20 and line as normal play with volume decreased by
              10.

       umix pcm 0,60,30,25 vol 100,70 synth 50:50,25:50
              Here sliding is demonstrated. The first slides pcm from 0 to 60
              with 30 steps and a 25 ms delay, then slides vol from 100 to 70
              with default steps and delay and the last one slides synth from
              50:50 to 25:50.

       umix -f /some/path/umixrc -l
              Here the config path is specified as /some/path/umixrc and
              settings are loaded from that file.

       umix -d /dev/mixer2 -f /somepath/umsettings
              The device that is used for mixing is specified as /dev/mixer2,
              config path is set as /somepath/umsettings and the interactive
              user interface is automatically started, because.  -f and -d set
              the -i option.

NCURSES USER INTERFACE
       The (n)curses based user interface. Designed to be used from a console
       or x-terminal.

   USAGE
       On the left side is the channel menu, which consists of channel names,
       stats and volumes.  On the right side is the balance menu.  The
       currently chosen channel is indicated with highlighting its name and
       drawing arrows around the chosen menu.  You can move around with
       default vi/emacs/arrow keys.

       Moving up and down selects the current channel, moving left and right
       adjusts the volume or balance, depending on which menu you are in.  Tab
       toggles between volume and balance menus.

       If the channel does not support stereo mixing (it`s left and right
       values cannot differ), then a '|' at center of the balance is drawn.

   KEY BINDINGS
       j / ^n / arrow down
              Move down.

       k / ^p / arrow up
              Move up.

       h / ^b / arrow left
              Decrease volume / balance left.

       l / ^f / arrow right
              Increase volume / balance right.

       ] / .  Increase volume by fifth of maximum amount.

       [ / ,  Decrease volume by fifth of maximum amount.

       Tab    Toggle between volume and balance menus.

       Space  Toggle play / record source.

       L      Load settings.

       S      Save settings.

       f      Specify the config path. This presents a dialog in the lower
              border. If no string is given, the path remains unchanged.

       e      Enter channel volume manually for the current channel.  Same
              rules apply as with command-line channel settings, so you can
              set balances and recording sources too.

       n      Cycles through available mixer devices. You can see the
              currently active mixer and the total number of initialized
              mixers in the top border.

       m      Mutes all those channels that are not already mute. If pressed
              again, returns volumes back to the state before muting.

       x      Excludes the current channel. Same as m but only with the
              current channel.

       H      Displays the help.

       q      Exit the program.

       ^l     Refresh the screen.

CONFIG FILE
       The config consists of global options and mixer settings.  Global
       options come after the keyword [global].  Global options are read
       before loading any mixer settings or parsing command-line options.
       Global options are the defaults to use if no command-line options are
       given.

       Mixer settings come after the keyword [mixers].  The mixer device that
       settings are loaded for is specified with the keyword mixer.  The
       string after mixer= is the path of the mixer device. Then comes the
       settings for that mixer. These are parsed like command-line options.

       Comments and all other characters are ignored.

FILES
       /etc/umixrc
              The default configuration file.

       $HOME/.umixrc
              Used as the config file if exists.

BUGS
       When used with terminals that have columns below 35, the output is not
       optimal with the ncurses UI.

       If the number of channels is greater than number of lines on screen,
       you cannot adjust channels that exceed the number of lines in the
       ncurses UI (rare, but to be fixed soon)

AUTHOR
       Sakari Lehtonen <sakari@ionstream.fi>

                                  08 Jun 2002                          UMIX(1)

Now if I switch sources entirely on my monitor, or use the picture-in-picture function to watch a TV show (or hockey game) in the smaller window, I can hear both the TV and my PC if I so choose, as long as I set the audio source of my monitor properly such as to tell it to use the source port for the small picture as audio source.  This also allows me a much easier method to silence (or adjust the volume) of the television program while in a commercial break by use of the mixer application instead of needing to toggle it on the monitor itself which I might move slightly out of reach.  Additionally, I can easily mute all of my application sound when I choose to only view a TV program.

Frequently viewed this week