Rumblings From Studio Dave

Audio And 64-bit Linux, Part 1

Sorry for the delay, it's been hectic here.

As I mentioned at the end of my last entry I'm preparing myself for my first excursion into the world of 64-bit Linux. After trading some lessons for a motherboard I started collecting parts for a new desktop machine for the studio. 64-bit considerations were new to me so I asked for help on the Linux Audio Users mail list. Some LAU members run 64-bit systems, and I did indeed get the information I needed. I won't detail the engaging traffic that resulted from that thread, you can read it yourself in the LAU list archives (it's titled AMD64 question).

The motherboard is a K8N Neo2 Platinum manufactured by MSI. I installed an AMD64 2.4 GHz Athlon CPU, along with a Zalman CPU fan. I had a moment while working with the fan: MSI sticks a backing plate on the flip side of the motherboard, but the Zalman fan needs its own plate there. A quick search on Google found that other people had run into this problem, some resulting in sad conclusions. I was fortunate to have a new board, the backplate came off cleanly, and the new fan was installed with no further difficulty. For storage I added a gigabyte of memory, a 400 GB Seagate drive, and a Lite-On DVD/CD read/write drive.

I want a very quiet system, which is why I chose the Zalman fan, and I was advised to consider a case from Antec. I looked at their on-line catalog, liked what I saw, and made up my mind to choose the Sonata II. Just when I was ready to make the selection a friend from the LAU list told me about Antec's B-stock catalog. It's not a secret, but the listing varies so you'll just have to check to see if they happen to have what you're looking for. Good luck was with me when I scored a B-stock Sonata II at a great discount.

Thanks to the savings from my case purchase I've decided to invest in a decent video system, at least something better than my ancient GForce2. I don't often work with 3D graphics, but occasionally I like to play with Pd's OpenGL support, and with a 2.4 GHz CPU I can check out some of the more demanding 3D games available for Linux. Unless someone advises otherwise it looks like I'll be buying another nVidia card. I'll use the kernel driver for the bulk of my work, but I intend to check out the binary driver from nVidia too (it supports 64-bit Linux). Of course I'm also looking for a good deal on a new monitor, a 19" flat-screen would be sweet (but the deal has to be sweet too).

Update: The video card selection has narrowed to the nVidia FX 5200 with 256 MB video RAM, it's currently selling for under $50 at Pricewatch and other on-line suppliers. The monitor is still a choice, but I have found some sweet deals on 19" flat screens.

The motherboard includes on-board audio, a Realtek ALC850/AC97. Among its virtues I find support for 7.1 channel output and optical/coaxial S/PDIF digital audio output. Normally I use the machine's BIOS configuration to switch off on-board soundchips, but this one looks interesting enough to tempt me into leaving it intact. A Google search for realtek alc850, alsa turned up a site titled Getting decent sound from built-in audio under Linux. It provides a neat set of instructions for activating, controlling, and using the on-board S/PDIF digital output under a fairly recent version of ALSA.

The real "heavy-lifting" audio functions will be handled by my M-Audio Delta 66 digital audio board. This card has excellent support from ALSA, and the specs on the Delta 66 are more than good enough for my purposes. I've used it extensively on my current box, but I don't know how long I can hold out before I feel the need for more channels. I'm already starting to lust after one of the used Delta 1010 systems listed on eBay.

I plan to check out a variety of distributions and audio-optimized systems, definitely the most recent version of PlanetCCRMA and possibly Gentoo with its audio overlay. The organizers of the 64Studio project will soon release version 0.8 of their Debian-based 64-bit Linux multimedia system, it's also on my definites list. I don't know how much I'll actually work in a pure 64-bit environment, but I'm looking forward to the experience.

I wanted to upgrade my printer along with everything else, so I checked out the recommended printers at linuxprinting.org. The Hewlett-Packard HP 6540 looked like it would suit my purposes perfectly, so I searched eBay, found a good source for the unit, ordered it and waited for its arrival. After a couple of weeks I wondered what happened to my order, so I contacted the seller and asked what was happening. I know that shipping can sometimes take a while, but I learned that my order had somehow been missed. My contact person immediately offered to give me a full refund or to send the unit out with overnight shipping. I opted for the printer, and it arrived as promised (kudos to Sylvia at HP marketplace on eBay).

Now the tale gets curious: The printer connects via USB, there are two USB ports on my machine, so I figured I'd have no problems. The printer works as advertised, which is to say perfectly. The default output is excellent and quickly produced. Alas, all would be perfect except that connecting the printer to my current desktop machine created an awful high-frequency whine from my speakers, even when the printer was turned off. Unplugging the USB or power cable was the only way to stop the noise. I searched Google again, this time for usb noise, hoping to find a way to eliminate or minimize the noise. I wasn't too surprised to learn that others have encountered similar problems with USB devices, but there are few solutions.

I analyzed my system's PCI assignments with lspci and discovered that my main sound device (the Delta 66) was sharing IRQ 5 with the computer's two USB ports. I removed the Delta card, promoted an SBLive to card #0, and rebooted. The lspci utility now reports the SBLive on interrupt 5 and the USB ports on interrupt 3. Huzzah, the noise is dramatically reduced, but not eliminated. I hope I won't have this trouble with the printer when I hook it up to the new machine. For some added protection I've ordered a beefed-up USB cable from Monster that might further reduce noise from electromagnetic interference and radio frequencies. As I said, I'm hoping here.

So that's where things stand here during the studio upgrade. I'll probably get impatient enough to burn some installation disks, cannibalize my current desktop box for its video components, then go ahead and set up the new machine for initial tests. However it happens, I'll be running a 64-bit Linux system when you read my next entry.

Studio Dave vs. Xorg 7.0

I like the apt utilities. I like being able to enter brief commands to update and upgrade my entire Debian system. To be honest, I usually run apt-get update from a terminal window to update the software database, followed by a session with the excellent Synaptic GUI for the apt tools. But when I want the job done quickly I'll skip the Synaptic session and run apt-get dist-upgrade from the terminal prompt. After responding to a few queries I can walk away from the machine and let apt do its thing.

Which is what I did a few weeks ago, only to find that many of my nice applications now suffered terribly from badly-rendered fonts. I complained on the AGNULA/Demudi mail list and got a few tips but no joy. I reinstalled the X font packages, still no joy. A Google search reported some more advice and suggestions that helped me towards the solution. I reinstalled the X base and common packages, and since the affected applications were either GTK 1.2 or Motif I reinstalled the applications. At last, nice fonts again.

But what a pain. Once again I learned a lot more than I bargained for. There's a good chance that my original dist-upgrade was incomplete, but I certainly wasn't the only person on the Web having font difficulties with Xorg 7. Apparently the maintainers at Xorg have gone to great lengths to modularize the old stalwart, and I got the impression that maybe this release was a bit rushed (maybe Debian's fault ?). Hopefully all font issues have been resolved by now.

The Sam Trios

My student Sam likes playing blues guitar, so I wrote a little blues etude for classical guitar. He's learned it as written, but we're also using it as a vehicle for learning basic improvisation techniques, such as how to avoid simplistic repetition and how to vary the given riff for a less predictable performance. The riff itself is nothing special music-wise, but it's a wee bit tricky and a nice challenge for Sam.

Thanks to this little study's success I decided to incorporate it into a larger piece, another trio for Sam and his mother and sister. You can hear a MIDI realization of this Trio #4 in OGG audio format (thanks also to QSynth and Jack Rack) and view a PNG display of the Lilypond score at the same location. Again, there's nothing very special about the music, it's only intended to be playable stuff for a family trio. However, I do like to note that the music was created with the aid of free software, as were the audio and MIDI recordings and the publication-quality score.

Two Other Items You Need To Know About

Just as I was putting this column to bed I received a cool link on the LAU mail list to an interview with Sampo Savolainen. Sampo is a member of the Ardour development team, and a fine candidate for an interview. Thanks to DCZX for the link !

Lots of new music made with Linux at Hans Fugal's LAM pages. If you're looking for Linux-produced music Hans's site is your first stop, but be sure to check out the LAU mail list archives for announcements of music that somehow doesn't make it to LAM.

By now it's starting to feel like it's no unusual event to announce music made with Linux. The platform can be configured for professional demands, hardware and software, and creative people are using it. Yes, some serious usability issues persist, with Linux audio and with Linux itself, but the required efforts are diminishing. Still, the proof is in the pudding, and you can get a healthy serving at LAM, for free. By the way, that's free as in no-cost, libre, without DRM and other industry-sponsored impediments and encumbrances. Such a deal !

______________________

Similis sum folio de quo ludunt venti.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

AMD64, Delta1010, multiple cards etc.

John Rigg's picture

If you do upgrade to a Delta 1010 the next step is multiple 1010s.
I'm doing commercial recording on a dual Opteron PC running amd64 Debian Etch with three Delta 1010s. It took months to get this running due to various AMD64, ALSA and JACK issues, so I put up some web pages which will hopefully save anyone else that tries this a lot of trouble:

http://www.sound-man.co.uk/linuxaudio

AMD x86_64 dual-core & M-Audio Delta 1010

Kevin the Drummer's picture

That's the best info on dual-core AMD 64-bit
machines, with real-time kernel patches and
multiple Delta 1010s that I've seen anywhere.
Nice job!

I built a machine like Dave's last Summer and
I run the Mandriva contrib multi-media kernel
on it. Using Ardour 0.99.X I managed to get
70+ tracks (44.1kHz, 16-bit) to playback at
one time. The weak link in the system is the
ATA Seagate drive, which couldn't keep up --
go figure. ;-) Attempting playback a few
times would be enough that the sound files
eventually cached enough and I got playback
of all those 6 minute tracks.

Has anyone had any trouble with input noise
showing up on their Delta 1010 at about -10dB
with nothing connected? I had this trouble
with one unit, which was replaced (maybe I got
the same unit back?) under warranty. At first
a cycling power would return to a working state.
If the problem wasn't there at power-on, then
it would work just fine until it was powered
off. After a couple weeks like that, cycling
the power wouldn't fix it. Just recently the
unit I have now showed the problem on two
channels. I'm nervous, and wonder if I should
have bought an RME unit, even though it's twice
the price.

Thanks....

Delta 1010 noise

Anonymous's picture

I have had the same problem with noise on the
input channels of the Delta 1010. I am convinced
the problem is the +4 / -10 switches on the back.
I experience distortion and level changes from time
to time, and all tests point to the level switches
being the culprit. The switches are sealed, and
will be difficult to clean (with DeOxit, for example.)
I've considered hard-wiring around the switches to
permanently set them at +4 to eliminate the problem.
Has anyone found a successful way to clean the switches?

An engineer friend suggested pumping a 50 Hz sine wave
at maximum line level output while working the switch
to burn off some oxidation on the switch contacts.
Apparently that's an old trick used to "clean" a dirty
fader back in the day.

Input noise on Delta 1010

John Rigg's picture

Glad you found the web pages useful. I once got input noise like you describe. A warm reboot got rid of it and it hasn't happened again, so I wasn't able to trace the cause.

A few things to try to narrow it down:
Try unplugging and replugging the PCI card and host cable a few times (with power off, obviously) to eliminate bad contacts.
Try the card in a different slot.
If you have a spare computer try your 1010 with that.

If none of the above makes a difference, it's likely you have a faulty 1010. You could try switching the +10/-4dB switches; if the noise level changes,the fault is in the analog input stage. If there's no change, it's somewhere else and will be harder to find.

If you do send it back to M-Audio, make sure you note the serial number on the PCI card first (and on the breakout box if there is one - I can't remember and my units are racked so I can't easily look). Then you can see if they return the same unit, and if it's still wrong you can ask them what they did to fix it. If you get no joy from M-Audio you can drop me an email using the contact form on my web site.

Author's reply

Dave Phillips's picture

Hi John:

Impressive work ! I'll be spending some time around your site soon, thanks so much for the link. At some point soon I'll have to consider a page dedicated to 64-bit resources for Linux audio folks.

The only thing that bums me out is that AMD may soon slash the price I just paid for my CPU. :( Oh well.

Best,

dp

Similis sum folio de quo ludunt venti.

none

pidor's picture

nice blog

resolving your irq problems?

Anonymous's picture

I'm not very knowledgeable in these things, so I hope somebody will jump in and correct what I'm saying where needed.

I think you can avoid IRQ sharing by enabling APIC, usually a BIOS setting, which then provides so many more IRQs that sharing is no longer needed. I'm not sure how a completed installation of Linux will react to such a switch...

The underlying problem, I would think, is poor mainboard design, since IRQ sharing shouldn't cause noise... but then, it seems many mainboards have this particular quirk, so you can't exactly blame MSI either.

Author's reply

Dave Phillips's picture

Just to be clear: The problem is occurring with my current system, not the one I'm building around the MIS board. Hopefully that mobo will have much better shielding. Frankly, the current mobo (I don't even know who made it) is the primary suspect. I'm not even sure if it supports APIC, but I'm pretty sure the MIS does. As I wrote, hopefully this problem will disappear with the new board.

Thanks for your comment ! :)

Best,

dp

Similis sum folio de quo ludunt venti.

64 bit audio

Mike Taht's picture

Some comments:

in 1GB I start to swap while running ardour, rosegarden, and linuxsampler (Admittedly with a HUGE bosendorfer piano sample). Take whatever memory size was reasonable in 32 bit mode, and add at least 40% for 64 bit.

I ran into all sorts of problems with USB devices generating noise on the internal sound card. In the end I just plugged in a multiface and have been happy ever since.

With recent kernels (2.6.17.1rt at present), trying to use midi has been hanging my 64 bit box.

The only advantage to going 64 bits, is that floating point (sse) ops appear to be 25% better than in 32 bit mode in some of the benchmarks I've run.

I would argue that 64 bits isn't worth the hassle, still, and I would downgrade to 32 bits if I had the time.

"I analyzed my system's PCI

haley's picture

"I analyzed my system's PCI assignments with lspci and discovered that my main sound device (the Delta 66) was sharing IRQ 5 with the computer's two USB ports. I removed the Delta card, promoted an SBLive to card #0, and rebooted. The lspci utility now reports the SBLive on interrupt 5 and the USB ports on interrupt 3. Huzzah, the noise is dramatically reduced, but not eliminated. I hope I won't have this trouble with the printer when I hook it up to the new machine. For some added protection I've ordered a beefed-up USB cable from Monster that might further reduce noise from electromagnetic interference and radio frequencies. As I said, I'm hoping here."

I had that same problem half a year ago. If I'd read that article sooner .. hmm
paruresis

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState