Sunday, December 25, 2005

RME HDSP 9652

As you can see from the previous section, "numid=5" is responsible for opening up the channels for the convolver PC.

To ensure safety, all channels are closed first and only the required channels are then opened. This can be done with the following script, (courtesy, Hiroshi)

#clear all direct physical connections for safety
for ichannel in $(seq 0 1 25) do amixer -c 0 cset numid=5 $ichannel,$ichannel,0
done
#playback connections
amixer -c 0 cset numid=5 26,0,32768
amixer -c 0 cset numid=5 27,1,32768
amixer -c 0 cset numid=5 28,2,32768
amixer -c 0 cset numid=5 29,3,32768
The above script was commented out in my latest script as it causes some runtime error. I am trying to work out the reason behind....

Initially, I am confused the amixer script with the BruteFIR script. The 4 lines shown above is amixer script. In other words, physical input channels are named as 0,1,2,..., playback channels are 26,27,28,..., physical output channels (which are physically different from the above input channels) are named also as 0,1,2,...

amixer -c 0 cset numid=5 26,0,32768
amixer -c 0 cset numid=5 27,1,32768
amixer -c 0 cset numid=5 28,2,32768
amixer -c 0 cset numid=5 29,3,32768

The above amixer command means software (BruteFIR in our case) outputs to four channels 26,...,29, and they are connected to physical (ADAT) channels 0,...,3 respectively BY the above commands.

However, inside BruteFIR script, channels 26,...,29 are called 26/0,...,3.
So, in BruteFIR, the script should read

#output "llow", "rlow", "lmid", "rmid", "lhigh", "rhigh" { output "llow", "rlow", "lmid", "rmid" {
device: "alsa" { device: "hw:0";}; # ignore_xrun: true; };
sample: "S24_4LE";
channels: 26/0,1,2,3;
delay: 0,3,282,282;
# delay: 0,3,332,332;
dither: true;

Sound Card

The next part I want to talk about is the sound card. Obviously, you need good quality sound card to get the best out of the convolver PC. For me, I think you need an external DAC to get "no compromised" sound quality while keeping all DSP under digital domain. So, after some research, I chose RME HDSP 9652 .

However, running this sound card in Linux is no easy task, especially for a Linux newbie like me! With great help from Uli and Hiroshi, I managed to get some idea. After you have installed the sound card based on the readings on DRC web page, you can type "amixer -c 0 contents" on the command prompt. The PC will show the current settings as folows

Output of amixer controls:


numid=23,iface=HWDEP,name='ADAT Lock Status',index=1
numid=24,iface=HWDEP,name='ADAT Lock Status',index=2
numid=25,iface=HWDEP,name='ADAT Lock Status',index=3
numid=20,iface=HWDEP,name='ADAT Sync Lock Status'
numid=26,iface=HWDEP,name='Analog Extension Board'
numid=14,iface=HWDEP,name='AutoSync Reference'
numid=9,iface=HWDEP,name='IEC958 Emphasis Bit'
numid=10,iface=HWDEP,name='IEC958 Non-audio Bit'
numid=7,iface=HWDEP,name='IEC958 Output also on ADAT1'
numid=8,iface=HWDEP,name='IEC958 Professional Bit'
numid=22,iface=HWDEP,name='Line Out'
numid=5,iface=HWDEP,name='Mixer'
numid=21,iface=HWDEP,name='Passthru'
numid=13,iface=HWDEP,name='Preferred Sync Reference'
numid=19,iface=HWDEP,name='SPDIF Lock Status'
numid=15,iface=HWDEP,name='SPDIF Sample Rate'
numid=12,iface=HWDEP,name='System Clock Mode'
numid=16,iface=HWDEP,name='System Sample Rate'
numid=18,iface=HWDEP,name='Word Clock Lock Status'
numid=3,iface=MIXER,name='IEC958 Playback Con Mask'
numid=4,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=17,iface=PCM,name='External Rate'
numid=6,iface=PCM,name='IEC958 Input Connector'
numid=1,iface=PCM,name='IEC958 Playback Default'
numid=2,iface=PCM,name='IEC958 Playback PCM Stream'
numid=11,iface=PCM,name='Sample Clock Source'



Output of amixer contents:


numid=23,iface=HWDEP,name='ADAT Lock Status',index=1
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=24,iface=HWDEP,name='ADAT Lock Status',index=2
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=25,iface=HWDEP,name='ADAT Lock Status',index=3
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=20,iface=HWDEP,name='ADAT Sync Lock Status'
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=26,iface=HWDEP,name='Analog Extension Board'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=14,iface=HWDEP,name='AutoSync Reference'
; type=ENUMERATED,access=r----,values=1,items=7
; Item #0 'Word'
; Item #1 'ADAT Sync'
; Item #2 'IEC958'
; Item #3 'None'
; Item #4 'ADAT1'
; Item #5 'ADAT2'
; Item #6 'ADAT3'
: values=2
numid=9,iface=HWDEP,name='IEC958 Emphasis Bit'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=10,iface=HWDEP,name='IEC958 Non-audio Bit'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=7,iface=HWDEP,name='IEC958 Output also on ADAT1'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=8,iface=HWDEP,name='IEC958 Professional Bit'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=22,iface=HWDEP,name='Line Out'
; type=BOOLEAN,access=rw---,values=1
: values=on
numid=5,iface=HWDEP,name='Mixer'
; type=INTEGER,access=rw---,values=3,min=0,max=65536,step=1
: values=0,0,0
numid=21,iface=HWDEP,name='Passthru'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=13,iface=HWDEP,name='Preferred Sync Reference'
; type=ENUMERATED,access=rw---,values=1,items=6
; Item #0 'Word'
; Item #1 'IEC958'
; Item #2 'ADAT1'
; Item #3 'ADAT Sync'
; Item #4 'ADAT2'
; Item #5 'ADAT3'
: values=2
numid=19,iface=HWDEP,name='SPDIF Lock Status'
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=15,iface=HWDEP,name='SPDIF Sample Rate'
; type=ENUMERATED,access=r----,values=1,items=7
; Item #0 '32000'
; Item #1 '44100'
; Item #2 '48000'
; Item #3 '64000'
; Item #4 '88200'
; Item #5 '96000'
; Item #6 'None'
: values=6
numid=12,iface=HWDEP,name='System Clock Mode'
; type=ENUMERATED,access=r----,values=1,items=2
; Item #0 'Master'
; Item #1 'Slave'
: values=0
numid=16,iface=HWDEP,name='System Sample Rate'
; type=INTEGER,access=r----,values=1,min=0,max=0,step=0
: values=44100
numid=18,iface=HWDEP,name='Word Clock Lock Status'
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=3,iface=MIXER,name='IEC958 Playback Con Mask'
; type=IEC958,access=r----,values=1
: values=?
numid=4,iface=MIXER,name='IEC958 Playback Pro Mask'
; type=IEC958,access=r----,values=1
: values=?
numid=17,iface=PCM,name='External Rate'
; type=ENUMERATED,access=r----,values=1,items=7
; Item #0 '32000'
; Item #1 '44100'
; Item #2 '48000'
; Item #3 '64000'
; Item #4 '88200'
; Item #5 '96000'
; Item #6 'None'
: values=6
numid=6,iface=PCM,name='IEC958 Input Connector'
; type=ENUMERATED,access=rw---,values=1,items=3
; Item #0 'Optical'
; Item #1 'Coaxial'
; Item #2 'Internal'
: values=1
numid=1,iface=PCM,name='IEC958 Playback Default'
; type=IEC958,access=rw---,values=1
: values=?
numid=2,iface=PCM,name='IEC958 Playback PCM Stream'
; type=IEC958,access=rw---,values=1
: values=?
numid=11,iface=PCM,name='Sample Clock Source'
; type=ENUMERATED,access=rw---,values=1,items=7
; Item #0 'AutoSync'
; Item #1 'Internal 32.0 kHz'
; Item #2 'Internal 44.1 kHz'
; Item #3 'Internal 48.0 kHz'
; Item #4 'Internal 64.0 kHz'
; Item #5 'Internal 88.2 kHz'
; Item #6 'Internal 96.0 kHz'
: values=2


By following the settings you should be able to get somewhere

Thursday, December 01, 2005

BruteFIR in USB

Setting up BruteFIR in USB is no easy task for me! First you have to download SPB-Linux and follow the excellent article in Uli's page. However, I got into trouble right in the first step! It turns out the my WinXP cannot format the USB disk accurately. I eventually need Hewlett Packard USB Disk Storage Formatting Tool to format the USB!

Now time to explore a bit! Plug in your USB and start the convolver PC. (Make sure that the PC is boot from USSB by setting the Bios). You should run the Midnight Commander (similar to the Norton Commander) first by mc - Enter. Then you can now explore the contents of the system and the temporary ramdisk. The content is the unpacked Linux system. But you will also see a directory /beesound. In this directory you find the original content of the USB stick. So the directory /brutefir and there the configuration files, the /start dir with some start scripts and also the /filter dir where later on the filter files have to be copied into.
I recommend that you explore this first. Also that you view the
lcrossover48 configuration file. You should google for BruteFIR and download at least its description. So you will get some understanding what the preprepared configuration file is doing.

The convolver PC

To execute room correction in real time, we need a PC to run the program BruteFIR. However, BruteFIR runs with Linux, so, somehow, thie PC also need to run in Linux. This is the Convolver PC

This is the center for room correction! It is basically a PC running BruteFIR in Linux using Uli's program BruteFIR in USB. To build such a PC, you want a good sound card that can give you all the flexibilities I chose RME HDSP9652. For one thing, it has many input and outputs whick allows me to expand to home theatre room correction once I become more experienced. But most importantly, someone have used this before and it is easier for things to be sorted out if things go wrong!

This PC also need to be dead silent. To achieve this, I have chosed a silent power supply - silverstone ST30NF. The case I chose is an alluminium case and the only thing that needs to be solved is the CPU fan. Oh! AMD CPU works out to be much more cooler than Intel, so I chose AMD as as the CPU for this PC! Zalman CPU fan can also help to make cool down the CPU without making any noise!