Sound on Thinkpad T41 with Fedora Core 4

I have Linux running on an IBM ThinkPad T41 laptop. I recently upgrade from Fedora Core 1 to Fedora Core 4. Several things broke from upgrading, including sound.

A number of people have had sound problems with FC4, requiring various solutions such as disabling the soft modem.

Some people had problems where their mixer settings were muted. Mine was similar. I am familiar with the Linux OSS sound system used in kernel 2.4, but I am unfamiliar with the ALSA sound system used in kernel 2.6.

I verified that my sound hardware was detected, using various utilities like system-config-soundcard, lspci, and lsmod. Under KDE, I used kmix to set the volume and unmute the sound channels. The artscontrol display showed me that all of the software believed it was pumping sound to the soundcard when playing a song in xmms. It was starting to look to me like my hardware and sound module setting were good, but I was somehow muted.

I discovered that in addition to volume levels and mute settings for input and output in the sound mixer, ALSA also has some additional on/off switch settings. I do not recall seeing these with the earlier OSS sound drivers. In the case of this T41 laptop, I found a mixer switch called “Headphone Jack Sense”. Turning this off gave me working sound immediately.

KVM Custom Power Supply

Custom KVM power supply I acquired an older Connect-Tek KVM (PC keyboard/video/mouse) switch. I got it for free because it was missing the power supply. I decided to make one. KVM front KVM back


I sent an email to the company and received a very helpful reply about the specifications of the power supply.

The Complete Idiot’s Guide to Electrical Repair
cover
Amazon | Powells
IndieBound

Following are the specification of the power supply it used: Output: 12V AC center tap, 1.2 amp Pinout of 5 pin din: the 2 extreme outside pins are VAC Center pin is center tap Shell is grounded. It may be available from: Condor Electronics, 408-745-7141 Part# WP573512CG-5DIN: verify the specifications before you order.

I decided for fun to build my own power supply to these specifications. This is not a project that one would undertake to save time or money. Rather, this is a project to do simply for the enjoyment of creating something and seeing it work and be useful.

Safety: Working with electricity can be dangerous. The 120V electrical input is hazardous, and can possibly injure or kill you. If you don’t know what you are doing, ask an expert and learn about it. Observe and follow all proper safety precautions.

Looking at the specs, this is a very simple power supply. The input and output are both alternating current, so it only requires a simple transformer, and no electronics to convert AC to DC. The only term I was not familiar with was “center tap”. This means that there are 3 output wires: two “outer” and one “center”. Between the two outer wires it is 12 volts, but from either outer wire to the center it is 6 volts. (This works the same as U.S. 240V split-phase household electrical wiring.)

How to Test Almost Anything Electronic
cover
Amazon | Powells
IndieBound

The current rating of 1.2 amps is somewhat large compared to your average little power adapter. It is important that your wire is large enough to carry the current without overheating. Wire size is a function of amperage, regardless of voltage. I consulted a wire gauge chart to find the minimum wire size required to carry 1.2 amps. Looks like I need at least 21 gauge wire (smaller gauge number is larger wire). I had some 24 gauge wire and 18 gauge, so I used the 18.

The power connector on the box is called a 5-pin DIN connector. It is the same connector used on the older, larger AT-style PC keyboard connector. Since I had a dead keyboard in my junk pile, I decided to reuse the connector from it for this. When I compared the wires in the keyboard cable with other wire I had, I decided they were too small for the amperage required. I cut off the cover from the connector with a hack saw, and soldered on the 18 gauge wire. Then I covered it with silicone sealer, which you can get from your local hardware or home-improvement store. I wrapped it around with masking tape while the silicone dried overnight. Masking tape DIN connector DIN connector DIN connector


Then when it dried, I removed the masking tape, leaving an insulated but flexible connection.

I ordered a 12V center-tap transformer from All-Electronics, part number TX-122. Then I tested it to see if it worked. Voltage check, KVM off Voltage check, KVM on


Fortunately, it worked! You can see in the pictures that the power supply said it produced 14 volts with no load, when the KVM was off. It then dropped to 13 volts when the KVM was powered on. This is normal.

It is important to encase the transformer in a box for safety reasons. You can’t leave the electrical wires out and exposed because the 120V input is hazardous, and if any metal shorted out the pins you could damage your equipment. A small plastic box is ideal. I found a small plastic truck of about the right size and shape, so I decided it was the perfect case for my transformer. TruckTruck gutsTruck base


It contained a small friction motor, the kind where you push it forward along a surface to wind up the flywheel and then let go. I removed the friction motor and the other axle. I then used screws to hold the wheels to the base, leaving room for the transformer in the middle. I drilled a 1/4-inch hole in each end for the wires, and soldered them to the transformer. Note the ground wires: since the power supply specification said the DIN shield is grounded, it will be connected with the transformer mount to the 120V ground. WiringWiring in base


Once it was done, I put the KVM and power supply on the shelf with my computer equipment. The project was a success. Connected to KVMInstalled


Submitted by amillar on Mon, 2005-08-29 06:49

Linux Digital Picture Frame

Like many people, I have growing number of pictures from my digital camera. I decided that I wanted a digital picture frame to display them in the houseThe purchase price is just too expensive for me to afford (anywhere from US$100 to $900 or more) so instead I am building one.

I acquired an older HP Omnibook 2000 laptop. It has a 2GB hard drive, PCMCIA slots, and an 800×600 TFT LCD display. I am now working on the software setup. After that is working then I will do the hardware frame part.

Submitted by amillar on Fri, 2005-03-18 08:05

Smart BootManager

This Omnibook 2000 is old enough that the BIOS does not support booting off of a CD directly. Many Linux installers have an option to boot from a floppy disk. However, many other software these days comes on a bootable CD but without a floppy option. And those that have a floppy option are often still easier to use with a single CD.

Therefore I decided I needed to be able to boot from CD. After searching around with Google, I found Smart BootManager. It is a small, free program that can boot a PC from a variety of devices, including an IDE/ATAPI CD-Rom drive. It can also be installed onto a floppy or the Master Boot Record of a hard drive.

I put it on a floppy, booted from that floppy, and then I was able to select the CD and boot it. It also installed nicely onto the hard disk MBR, allowing me to boot easily from either the hard drive or the CD, without needing the floppy.

Submitted by amillar on Fri, 2005-03-18 07:54

USB Flash Reader on Linux Fedora Core 1

With digital cameras so popular, the USB multi-format card readers are readily available, inexpensive, and supported on Linux.

The memory cards in the reader show up as SCSI disk devices. The digital camera manufacturers have standardized on the MSDOS FAT filesystem, so you can just read and write to the memory card through the reader as if it were a disk drive.

Many USB card readers show up in Linux as a multi-LUN SCSI device. This means that only the first slot is seen by default. You may see the compact-flash slot but not the SmartMedia or MMC slot. To fix this, your Linux kernel needs to scan for the extra LUNs.

For Fedora Core 1, I added the following line to /etc/modules.conf:

options scsi_mod max_scsi_luns=6

as mentioned on the Fedora mailing list. More information is on the Linux flash readers page, or using a USB card reader in Linux.

You can also recompile your kernel with the option “CONFIG_SCSI_MULTI_LUN=y” enabled, or you can add a “max_scsi_luns=6” option at boot time in Grub.

 

Submitted by amillar on Sat, 2005-01-22 23:48

Polaroid Fun! Flash 640 Digital Camera

Shooting Digital
cover
Amazon
B&N , Powells
BookSense

This camera has 640×480 resolution with built-in memory and a serial interface, holding about 16 pictures. There is no USB nor memory card slot.

This camera was designed as Windows-only, with proprietary TWAIN drivers to talk to the camera over the serial port.

Work was done to reverse-engineer the serial protocol for GPhoto 2. It works, and I was able to get pictures from the camera as PPM files using gtkam and the gphoto command-line tool.

In my testing, the colors are slightly different in the gphoto output, compared to the Windows Twain driver output.

The Fun! Flash 640 is different from the PDC-640 and 640SE models. Web references for the Fun Flash 640 are hard to find in 2005. Most searches turn up information about the PDC model. I recommend GPhoto as the main resource for technical details.

Recording FM Radio

A good audio source is of course your local radio stations. Sometimes, however, I want to listen to shows at a time other than when they are broadcast.

Using an FM radio tuner on the computer, you can capture the audio from the radio signal and save it to a sound file, such as MP3.

I’m using the DLink DSB-R100 tuner. It is a small FM radio which connects to the PC using USB for the tuning commands and the sound card’s line-in connector for the audio.

The DSB-R100 has a driver already included in the Linux 2.4 kernel, using the V4L video-for-Linux system.

I’m using the fmtools software for Linux to select stations, with my own recording script. I created a script combining sox to record and lame to encode to MP3.

Since FM radio is limited in bandwidth to 15Khz, the compression can be improved a little by having the sound software do some filtering to match. This is the –lowpass option in lame.

Links:

  1. Linux radio timeshift how-to by Todd Veldhuizen. My script is similar in structure to the example provided by him.
  2. Gary Burd’s fmcapture with software.
  3. Linux Gazette article

Submitted by amillar on Tue, 2004-10-19 15:41

Latin Language Resources


Latin for Dummies
cover
Amazon | Powells
IndieBound

I’ve acquired an interest lately in learning something about the Latin language, since so much in Western civilization has grown out of it. Here are some Internet web sites which I found useful.

Submitted by amillar on Fri, 2004-05-07 22:35