Jun 23, 2009

ISA PnP soundblaster on xubuntu 9.4

I've installed fresh xubuntu on old PC (celeron 400MHz) and failed to setup my ISAPnP soundblaster 16 easily...

Background:
ISAPnP allows ISA card to be jumpered by software, "jumperless".
My card is not recognized by module "snd-sb16" automatically.

Howto:
  1. Fetch tools
    • ISA PnP tools
      http://www.roestock.demon.co.uk/isapnptools/#latest

      Program is simple and can be compiled even on fresh xubuntu (no dependencies to install).
      It's plain "configure && make && make install"

    • Alsaconf (optional, but recommended)
      Download latest alsa-utils: ftp://ftp.alsa-project.org/pub/utils/
      (alsa-utils-1.0.19.tar.bz2 is current today)

      extract one file: (achive)/alsaconf/alsaconf.in

      use your favorite packing program.

      make it executable

      chmod a+x alsaconf.in

      run it with "-R" (resources) parameter do dump free resources

      ./alsaconf.in -R

      available IRQ + DMA values are listed at the bottom
      I/O ports must be checked in the list of used ports.

  2. "Jumper" your card
    • generate configuration file

      pnpdump >/etc/isapnp.conf

    • enable your soundcard in configuration file

      edit /etc/isapnp.conf in favorite text editor

      uncommend requested configuration (mine was similar to what BIOS proposes when booting my PC)

      avoid using resources that were not listed in "alsaconf.in -R" output !!!

      Editing howto is already in the file, please read it first.

      my .conf files (orig.conf = original one, edit.conf = result)
      http://elektromaniak.wz.cz/sb16/howtofiles.html

    • Apply your settings (actual "jumpering")

      /usr/local/sbin/isapnp /etc/isapnp.conf

      just run this command

  3. Load "snd-sb16" and tell it.

    modprobe snd_sb16 isapnp=0 port=0x220 irq=5 dma8=1 dma16=5 mpu_port=0x330

    Use your own values if they differ !

  4. Put steps 2.-3. somewhere into a startup script

    I've choosed separate one in /etc/init.d/soundblaster

    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides: soundblaster
    # Required-Start:
    # Required-Stop:
    # Default-Start: 2
    # Default-Stop:
    # Short-Description: Setup my soundblaster
    ### END INIT INFO


    PATH=/sbin:/usr/sbin:/bin:/usr/bin

    do_start() {
    if [ -x /etc/rc.local ]; then
    [ "$VERBOSE" != no ] && log_begin_msg "Setting up SoundBlaster 16"

    /usr/local/sbin/isapnp /etc/isapnp.conf
    modprobe snd_sb16 isapnp=0 port=0x220 irq=5 dma8=1 dma16=5 mpu_port=0x330

    ES=$?
    [ "$VERBOSE" != no ] && log_end_msg $ES
    return $ES
    fi
    }

    case "$1" in
    start)
    do_start
    ;;
    restart|reload|force-reload)
    echo "Error: argument '$1' not supported" >&2
    exit 3
    ;;
    stop)
    ;;
    *)
    echo "Usage: $0 start|stop" >&2
    exit 3
    ;;
    esac


    Edit the values where necessary.
    Add a symlink to appropriate runlevel (rc.2 in xubuntu)

    cd /etc/rc2.d
    ln -s ../init.d/soundblaster S32soundblaster

This howto should work for all ISAPnP Sound Blasters (with their correct modules).

Jun 20, 2009

Fluxbuntu theme with fluxbox 1.1.1

Fluxbuntu (http://www.fluxbuntu.org) is a linux distribution.

*buntu uses new version of fluxbox (1.1.1) and there are some issues with Fluxbuntu fluxbox theme.
Window buttons on iconbar("taskbar") are not styled correctly and there's no difference between active and inactive one..

Latest version is "7.10RC" => There are two possibilities:
a) Project is dead
b) Project concentrates on LTS versions

Here is the patch for /usr/share/fluxbox/styles/Fluxbuntu:

----------- cut here --------- :)

--- Fluxbuntu 2009-06-20 16:04:28.000000000 +0200
+++ Fluxbuntu 2009-06-20 17:32:49.000000000 +0200
@@ -12,11 +12,6 @@ toolbar:
toolbar.label: parentrelative
toolbar.label.textColor: #86615f

-toolbar.windowLabel: sunken gradient crossdiagonal
- toolbar.windowLabel.color: #9ed7d7
- toolbar.windowLabel.colorTo: #bb8e80
- toolbar.windowLabel.textColor: #86615f
-
toolbar.clock: parentrelative
toolbar.clock.textColor: #86615f

@@ -27,6 +22,21 @@ toolbar.button.pressed:
toolbar.button.pressed.color: #7eb75c
toolbar.button.pressed.colorTo: #cdd00a

+toolbar.iconbar.empty: sunken gradient crossdiagonal
+ toolbar.iconbar.empty.color: #9ed7d7
+ toolbar.iconbar.empty.colorTo: #bb8e80
+
+toolbar.iconbar.unfocused: sunken gradient crossdiagonal
+ toolbar.iconbar.unfocused.color: #9ed7d7
+ toolbar.iconbar.unfocused.colorTo: #bb8e80
+ toolbar.iconbar.unfocused.justify: left
+ toolbar.iconbar.unfocused.textColor:#86615f
+
+toolbar.iconbar.focused: sunken gradient vertical
+ toolbar.iconbar.focused.color: #7eb75c
+ toolbar.iconbar.focused.colorTo: #cdd00a
+ toolbar.iconbar.focused.justify: left
+

! ***** menu *****
menu.title: raised gradient crossdiagonal

----------- cut here --------- :)

This may come handy, if you've installed Fluxbuntu 7.10RC and upgraded it several times and now you're stuck with broken toolbar style in Jaunty Jackalope

The patch may be partially malformed, but still obvious.

NOTE: Patched theme can be used with fluxbox 1.0.0 and up
(because original theme used obsolete syntax)