BruteFIR on a USB memory stick
From DRC
Contents |
Mini-BruteFIR with USB-memorystick
By Uli Brüggemann
This page is intended to show how simply a system can be built by using a memorystick. What's the reason for: BruteFIR is running on a Linux system. I'm an absolute beginner to Linux myself. And to me Linux looks like a cryptic system designed for hackers. Especially when you leave the KDE or Gnome GUI. On the opposite I also know that Linux is running today in embedded systems where the user even never recognizes that the system is running with Linux.
So my idea is to get a Linux installation where everything is installed, including BruteFIR. And that the PC boots from this USB-memorystick and automatically starts BruteFIR.
Another advantage is that you can take the memorystick to another computer where you just have created some filters. So I do on a Windows based PC. You copy the new filters to the stick, take it back to the convolution PC and ... ready to start.
After I managed to install BruteFIR with SUSE-Linux I followed the goal to get a downsized system, user-friendly and not complicated (size of SPB-Linux incl. BruteFIR without filters 4.62 MByte).
The system here described now is based on SPB-Linux. It is available in different sizes, based on a 2.6.x kernel and you can do a lot if you like. For BruteFIR only a minimal sytem is required and the best: it is available. Think e.g. of stripping down your Linux system. I guess it is rather complicated for a normal user.
Advantages:
- Linux with BruteFIR on a memorystick = no harddisk = no noise
- easy to setup
- no installation on your system required
- expandable
- kernel 2.6.x
- user-friendly, e.g. copy your filter files simply onto the stick
- automatic BruteFIR start
- no cryptic Linux-handling required
Getting Started
Where to find SPB-Linux:
http://spblinux.sourceforge.net/ Here you get a lot of informations and the packages
http://www.8ung.at/spblinux/ Here you find descriptions for the single available modules and addons
http://www.spblinux.de/spb2/b12/ resume services Here are the downloads of the latest compilations
http://www.spblinux.de/wiki/wakka.php?wakka=SpbWikiHome Recommended Wiki-page
By the way many thanks to Christian Ostheimer, author of SPB-Linux, who assisted a lot with the system setup (especially for the preparation of the ALSA-Package).
First step: Install basic SPB-Linux on a USB-memorystick
I like to explain the procedure based on my experiences with my Windows XP system. The procedure is easy and can be done within 10 minutes.
1) Please go to http://sourceforge.net/project/showfiles.php?group_id=91767 dissertation and download the zip-package spb2.1-usbboot1_b12-r1.zip. It is the latest package with the smallest size.
2) Take a standard USB-memorystick, connect it and format the stick with a FAT-filesystem (Explorer, right-click on drive, Format). For further explanations lets assume the drive is E:\
3) Unzip the package and copy the contents including directories to the stick.
4) Open a DOS-window by Start - Execute - cmd - Enter.
5) Command-sequence:
- e:
- cd spbsetup
- cd winnt2kxp (or win9xme or linux, depending on your system)
- syslinux e:
This will install a first boot record. See also readme.txt in this directory. I use syslinux.exe because install.bat fails with my system.
First boot from USB-stick
After successful end of the steps in 5) you should be able to boot from the stick already. Please make sure that the BIOS settings of your computer are prepared for an USB-stick as the first boot device.
Now reboot the computer.
You get a first screen with different possibilities to select. Please select
- 4a - Enter
With this selection the computer should already boot and start at the end with the Midnight Commander. The basic installation is finished.
You can play around to discover SPB-Linux or switch the computer off and start your system again without USB-memorystick for the next steps.
Next step: Installation of BruteFIR
Remark: the next examples assume that the USB-Memorystick is located at E:\
Please download the following files for the further installation of BruteFIR (use mouse right-click and Save under ... with the following links):
Copy the two *.bz2 files to the memorystick into the directory E:\spblinux\basics
Unzip the file BeeSoundFiles.zip and copy
- syslinux.cfg to E:\
- correction44 + crossover44 to E:\brutefir (create this directory before copying)
- spbcfg to E:\spblinux
- init6.gz to E:\spblinux
Delete the unnecessary files/directories (recommended):
- E:\boot
- E:\spbsetup
- spbcfg0 ... spbcfg7 in E:\spblinux
- grub.raw in E:\
- cdboot.raw in E:\
- all bz2-files in E:\spblinux\basics with exception acpi.bz2, beesound.bz2, modules.bz2, snd_alsa.bz2
This will reduce the required size downto 4.62 MByte.
Finally create the directories E:\brutefir\filter and E:\brutefir\filter\xo. In the \filter directory my standard filters (=room correction + crossover in 1 filter) are stored, whereas in the \filter\xo directory the pure crossover filters are located. The BruteFIR configuartion files e.g. correction44 refer to these directories.
So if you reboot the USB-memorystick you should be able to see that BruteFIR already starts up. Of course it will not work directly because you have to do some initial configuration first and to load filter data. You can stop the running script by Ctrl-c/Strg-c.
Configuration of your BruteFIR application
This chapter describes how to customize the memory-stick for your own needs. The installed files show my system configuration and I bet that your system looks a little different. It is assumed that all the necessary modifications are carried out when the system has been booted by the stick and SPB-Linux is running.
Keyboard:
Edit the file spbcfg in /beesound/spblinux with Midnight Commander - Edit and change keys= / lng= to your needs, eg. keys=en
Your soundcard:
It can be assumed that you may use a different soundcard. Actually a RME Digi9652 soundcard is installed. To modifiy this you have to make some changes.
Get familiar with the changebz2 command. It is used to configure the *.bz2 modules in /beesound/spblinux/basics dir. So for the soundcard enter: changebz2 /beesound/spblinux/basics/snd_alsa.bz2
Confirm with y-Enter and a mc-window is opened. In the right window you find the file structure of the bz2-content.
Edit /ram_tmp/etc/modprobe.conf.alsa and change the line
alias snd-card-0 snd-rme9652
to your requirements. Now you have to add your soundcard to the directory /ram_tmp/lib/modules/2.6.9/kernel/sound/pci. This is a file with an extension *.ko and you may find it with your already running installation or inside the file spb2.1-modules-2.6.9.tar.bz2 that you can download from http://www.spblinux.de/spb2/b12/ - Extract your soundcard.ko and insert it in snd_alsa.bz2.
When you leave mc by the F10-key you have to confirm changes by entering several times y - Enter.
Finally edit spbcfg and change the actual line snd=snd-rme9652 to snd=your_soundcard. This line will tell SPB-Linux to start immediately with the desired soundcard.
If you have successfully installed the soundcard then during the next boot sequence SPB-Linux will show a message about your soundcard. You can also check with lsmod.
BruteFIR configuration
BruteFIR can simply be configured by editing the files correction44 and crossover44 in /beesound/brutefir. 44 means 44.1 kHz filtering. I tired to keep my system as simple as possible but I guess more advanced users will change these files anyway.
changebz2 /beesound/spblinux/basics/beesound.bz2 allows you to edit the startfile go in /tmp_ram. It is a simple script so far but shows that some unneeded tasks like inetd, syslogd... are killed and that BruteFIR is started in an endless loop. So it is possible to start BruteFIR with different sample rates (monitor_rate: true in BruteFIR config file). Inside the loop there are some sleep commands to allow the user to interrupt the script).
Hey, that's all! Good luck!
Future modifications of Mini-BruteFIR
As already said I'm still a Linux newbie. Thus I had problems with more sophisticated installations (e.g. I could not install WLAN with my Suse-Linux, hdparm -Y didn't work because of pdflush and I felt uncomfortable with Jack). So actually Jack is not installed with Mini-BruteFIR. AFAIK SPB-Linux currently does not support Jack. But it should be easy for an advanced user. SPB-Linux offers a method to install a gentoo stage2 for compilation of other programs and there is a module empty.bz2 that can be used to install a program like Jack in a module. I managed the BruteFIR installation with SPB-Linux in a very simple way. I copied simply the necessary files (compiled with Suse) into beesound.bz2 :-)
At http://www.spblinux.de/spb2/b12/ you also find a ready to use mplayer.bz2 module.
Please see also the SPB-Linux wiki pages for further information.
Tweaks and Experiences
I noticed that I had to change my filtersize with the BruteFIR configuration file from 2048,32 to 4096,16. It maybe that SPB-Linux is a little bit different configured than my SUSE. SPB-Linux runs cpudynd to switch between CPU clock frequencies depending on the load. You can switch to fix maximum clock frequency by inserting the command
killall -USR1 cpudynd
in the startfile go. Use changebz2 /beesound/spblinux/basics/beesound.bz2 for modification.
05/01/28
Had some problems to get a booting USB-stick yesterday. I got messages about an 'invalid or damaged boot partition'. Formatting with Windows XP didn't help. Solved the problem by formatting with a Hewlett Packard USB Disk Formatting Tool, you can download from [1]
Recognized that shutting SPB-Linux down often stops with a message 'rm: remove /tmp/halt_1st.tmp.xxx ?'. This is now solved by adding a modified init6.gz to BeeSoundFiles.zip. See description above on piese auto.
