Atomic I/O letters column #112

Originally published 2010, in Atomic: Maximum Power Computing
Reprinted here February 20, 2011
Last modified 16-Jan-2015.
 

Snap, crackle and pop

I have been meaning to do a massive backup of my CD music collection, but I recently realised the absolutely poor quality of MP3s. My brand new Sony bass-booster earphones revealed a crackling interference sound in every song that I had, even after attempting to mess with settings over numerous music appliances.

I was wondering what the best audio codec is to maximise quality (as storage is cheeeeeep), and what's the best program to rip my music with?

Michael

Cheap USB sound dongle in pieces
Why does this USB "sound card" only cost $2 delivered?

Behold: Aliasing!
Because it does this to a 10kHz sine wave!
(Picture courtesy of Practical Devices.)

Answer:
Whatever your problem is, it's not the codec. There's no MP3 compression artifact that sounds like "crackling interference", and MP3 at high bit rates is almost always indistinguishable from the original lossless audio. The "codec wars" generally have to do with getting high audio quality at lower bit rates (to save storage space and, more importantly, transmission bandwidth), or getting perfect lossless quality with smaller file sizes (using FLAC or Monkey's Audio, for instance).

Different codecs have different legal entanglements, too. Some projects use Vorbis instead of MP3 just because you don't have to pay anyone license fees to use Vorbis.

But none of this has anything to do with your crackling noises.

First, make sure the noise is not simple distortion from turning something up too far.

If you're plugging your headphones straight into the output socket on the back of a standard modern motherboard, then the mobo may not have enough output power to drive decent-sized 'phones to a reasonable volume. Turn the volume way down, listen carefully, and see if the problem goes away.

If it does, that's because you've got one of the many headphone sockets that can't drive larger 'phones very loud. You can solve this problem with a whole new audio adapter that has strong headphone output, or with a headphone amplifier to plug between the computer and the 'phones.

(Similar symptoms can result if somewhere in the internal hardware/software signal path you've got some slider, usually the main volume control, turned all the way up, and another slider, like the old WinXP "Wave", only one notch above zero.)

If this doesn't help, and you ripped the songs yourself, then you may have made a mistake there. Ripping too fast, some other config setting that doesn't work right with the drive you're using (any proper ripping program, like good old CDex, will let you play with a lot of options), or perhaps your optical drive can't rip audio well at any speed, for some reason.

If the files are on a dying hard drive then that could introduce garbage data that makes unpleasant noises. But if all of your music sounds bad, the drive would have to be so sick as to cause very obvious other symptoms.

(The same applies to any data cable that's bad enough to create noticeable effects like audio corruption. Straight bitstream audio connections can occasionally balance on the knife-edge of complete broken-ness, so you still get sound but it's full of noise. But if a general-purpose data connection gets this bad, it should make the computer clearly sick.)

I think the problem is much more likely to lie with some component between the audio data and your headphones. There are lots of sound-driver problems that create pops and crackles, as can half-blown amplifier chips and dodgy electrical contacts on the analogue side. Oh, and probably power-supply problems, too; all sorts of bizarre symptoms can be caused by a sick PSU, though that's definitely not the first place I'd look in this case.

Try copying some of the MP3s to completely different hardware - another computer, a standalone MP3 player, whatever - and see if they're still crackly there. If they are, then it's a data problem of some kind - bad rips, dying hard drive, etc.

If they now sound fine, though, then it's time to start hunting the hardware that's adding the crackles to your perfectly-OK music files.

You can buy little USB "sound cards" on eBay now for only a couple of bucks delivered. They've usually got a description like "3D VIRTUAL 5.1 CHANNEL SURROUND SUPER USB SOUND CARD", but they're all the same USB dongle with two 3.5mm sockets on the end. By their ridiculously low price shall ye know them.

These things don't actually have very good sound quality, but they're a lot better than you'd think for the money, and they work with the standard built-in Windows USB sound drivers. They're great for quickly adding better-than-nothing audio to sound-card-less computers, and for diagnosing problems like this.

If the crackles go away when you're listening through a $2 USB sound dongle, then the problem is probably with your computer's sound hardware. One or another driver update may cure it, or you may need a new sound card.

(If the $2 USB sound doodad sounds good enough to you, then just use that!)

 

Flashing to conclusions

Last week I purchased an 8Gb Corsair Flash Voyager, to replace my aging 1Gb SanDisk Cruzer Micro. All was fine with it for a while, it actually surprised me at how fast it read/wrote. But now I think it is dead.

While I was copying a Uni assignment to it, the drive stopped copying, and the "Delayed Write Failed" error came up. When I tried again, it would not even start to copy. So I removed the drive, only to find when I plugged it back in again that the drive name was back to the original "Removable Disk", it was formatted to some "RAW" filesystem, and it was now read-only.

I tried formatting it by right clicking on the drive in My Computer, and also through Disk Management (in Computer Management), but nothing worked.

I'm not sure what else to do. Should I should keep trying to fix it, or send it back for a replacement?

Stephen

Answer:
The world of Flash-RAM storage is in a sad state, I tell you.

When Stephen sent me this, I assumed that the errors meant that he'd bought himself one of the countless fake Flash devices that're on sale on eBay and other flea-markets at any given time. (It's a classic Market For Lemons situation.)

You may know the drill with these things: The sticker says 8Gb or whatever, and that's the size the device reports itself as too. But there's actually only something like 512Mb of memory in it. When you run off the end of the memory that actually exists, it's Horrible Error Time.

And oh boy, do NOT get me started on what happens if you try to get your money back. (You'd do much better to not even try, and read a Franz Kafka book instead.)

As it turned out, though, Stephen had a genuine Corsair USB drive, bought locally, that was simply and honestly broken. He got a warranty replacement, and all was well.

And boring.

So let's pretend he got scammed. How do you tell if you've got a fake Flash device - thumb drive, memory card or possibly even SSD?

Well, just copying a ton of stuff onto it as soon as you get it will do. Don't wait until you actually need to fill the drive to its sticker capacity - fill it up right away, remember the last files you copied onto it, unplug it and plug it back in again (to reduce the chance that some OS cache will hide a problem, though I've never actually seen that happen), and try to access the last files copied. If they're OK, the device is very probably genuine.

For a more rigorous, automated test, use C't magazine's "H2Testw" (Web-page in German, software bilingual). It's a very handy little utility for this purpose, and also for seeing if that ancient 8Mb thumb drive you dug out of the couch cushions is still functional.

It'll take forever for H2Testw to completely test a fake "8Gb" device, because failed write-and-verify cycles take a lot longer than successful ones. I officially give you permission to abort the test and declare the device fake after only the first few hours of errors.

It's possible to fix the firmware of at least some fake Flash devices so they report their (low) capacity honestly, and work. Here's a blog that talks about this.

The Windows Disk Management interface won't be sufficient for this, though, because neither it nor the command-line Diskpart utility will let you repartition a removable device. A GPartEd liveCD... http://gparted.sourceforge.net/ ...will do the trick. EASEUS Partition Master is supposed to work with removable devices too (with, for some reason, a minimum partition size of 2Gb...), but the free "home" version doesn't install in 64-bit Windows, and when I went to the trouble of installing it both in a 32-bit XP Mode virtual machine on my 64-bit Win7 PC, AND on an old 32-bit WinXP install on another computer, it never saw any removable devices. (This may have changed in the several months between the paper publication of this column and this reprint on the Web.)

I don't know of any other freeware Windows partition-editing options, that'll work with removable devices, and are any easier to use than a GPartEd liveCD.

 

Medium-screen TV

Is it possible to connect a HD Set Top Box to an LCD monitor through an HDMI connection? And would I get sound if the LCD monitor had inbuilt speakers? I was considering a BenQ E2420HD connected to an Olin HVBT-2000B.

Stephen

Answer:
If the STB has an HDMI output and the monitor has an HDMI input, and the monitor can sync to the output resolution (and refresh rate) of the STB - which the spec-sheet for the E2420HD says it can - then it should work. Even with audio!

When HDMI was young, monitors that supported it often didn't support HDTV resolutions, but now that's quite common. (As is proper support for HDCP Copy Control Crap, which used to be another common cause of black screens.)

If you've already got the monitor, you can eliminate doubts if you just tote it to a shop, plug it into a display STB and see what you get. (This sort of thing was less practical when 21-inch monitors weighed 30 kilograms.)

You can also connect a PC monitor to an STB via any analogue outputs and inputs the STB and monitor happen to share, down to mini-DIN "S-Video" and RCA-plug composite video. You won't get even HD-"ish" image quality from anything less than three-wire component video, though.

 

cat /dev/hd5 | google_translate > /dev/hd10

Do you have any idea how to convert a Windows 7 Striped software RAID on 3 disks to a RAID 5 hardware set with 4 disks?

The problem is I have 4Tb worth of data on there that may be extremely difficult to back up.

Any ideas?

Ryan

Answer:
I don't know of any utilities that'll convert a stripeset from software RAID to the format any particular hardware RAID controller uses. (Different hardware RAID controllers have different formats.) I wouldn't be at all surprised if there were several ways to, at least, convert the format of a stripeset while keeping the basic disk number and structure the same - heck, you can probably do at least some variants of this job with a very small shell script in Linux. But I, blessedly, have never needed to learn about it. And converting your 3-disk RAID 0 to 4-disk RAID 5 would be... challenging.

Re your 4Tb of important data, I know I keep saying this over and over, but if that data is important to you, it should already BE backed up.

If you've got it on a RAID-0 stripeset (the only kind of "striped" volume available in non-Server versions of Win7), the death of any of the three disks will hose all of your data.

OK, lecture concludes. A possible solution:

Determine whether you have sufficient computer-owning friends that they'd like to buy a total amount of storage adequate to temporarily store all of your data. Like, three "1.5Tb" drives, formatted capacity about 1400 gigabytes each.

Buy those drives, use them as separate devices or as a temporary striped or spanned volume to hold the data while you convert the original software-RAID drives to hardware RAID with one more disk. Then copy the data back onto the new RAID-5 set.

Now pass on the slightly-used drives to your friends, possibly along with a small fee for drive rental.

And then, back up your data properly, because RAID 5 is not a magical guarantee that more than one drive won't be fried by a lightning strike, nobody will break in and steal your computer, you won't confidently instruct your computer to destroy your valuable data, et cetera.

 

Other letters columns

I/O #1
I/O #2
I/O #3
I/O #4
I/O #5
I/O #6
I/O #7
I/O #8
I/O #9
I/O #10
I/O #11
I/O #12
I/O #13
I/O #14
I/O #15
I/O #16
I/O #17
I/O #18
I/O #19
I/O #20
I/O #21
I/O #22
I/O #23
I/O #24
I/O #25
I/O #26
I/O #27
I/O #28
I/O #29
I/O #30
I/O #31
I/O #32
I/O #33
I/O #34
I/O #35
I/O #36
I/O #37
I/O #38
I/O #39
I/O #40
I/O #41
I/O #42
I/O #43
I/O #44
I/O #45
I/O #46
I/O #47
I/O #48
I/O #49
I/O #50
I/O #51
I/O #52
I/O #53
I/O #54
I/O #55
I/O #56
I/O #57
I/O #58
I/O #59
I/O #60
I/O #61
I/O #62
I/O #63
I/O #64
I/O #65
I/O #66
I/O #67
I/O #68
I/O #69
I/O #70
I/O #71
I/O #72
I/O #73
I/O #74
I/O #75
I/O #76
I/O #77
I/O #78
I/O #79
I/O #80
I/O #81
I/O #82
I/O #83
I/O #84
I/O #85
I/O #86
I/O #87
I/O #88
I/O #89
I/O #90
I/O #91
I/O #92
I/O #93
I/O #94
I/O #95
I/O #96
I/O #97
I/O #98
I/O #99
I/O #100
I/O #101
I/O #102
I/O #103
I/O #104
I/O #105
I/O #106
I/O #107
I/O #108
I/O #109
I/O #109
I/O #110
I/O #111
I/O #112
I/O #113
I/O #114
I/O #115
I/O #116
I/O #117
I/O #118
I/O #119
I/O #120
I/O #121
I/O #122
I/O #123
I/O #124
I/O #125
I/O #126
I/O #127
I/O #128
I/O #129
I/O #130
I/O #131
I/O #132
I/O #133
I/O #134
I/O #135
I/O #136
I/O #137
I/O #138
I/O #139
I/O #140
I/O #141
I/O #142
I/O #143
I/O #144
I/O #145
I/O #146
I/O #147
I/O #148
I/O #149
I/O #150
I/O #151
I/O #152
I/O #153
I/O #154
I/O #155
I/O #156
I/O #157
I/O #158
I/O #159
I/O #160
I/O #161
I/O #162
I/O #163
I/O #164
Dan's Data letters #1
Dan's Data letters #2
Dan's Data letters #3
Dan's Data letters #4
Dan's Data letters #5
Dan's Data letters #6
Dan's Data letters #7
Dan's Data letters #8
Dan's Data letters #9
Dan's Data letters #10
Dan's Data letters #11
Dan's Data letters #12
Dan's Data letters #13
Dan's Data letters #14
Dan's Data letters #15
Dan's Data letters #16
Dan's Data letters #17
Dan's Data letters #18
Dan's Data letters #19
Dan's Data letters #20
Dan's Data letters #21
Dan's Data letters #22
Dan's Data letters #23
Dan's Data letters #24
Dan's Data letters #25
Dan's Data letters #26
Dan's Data letters #27
Dan's Data letters #28
Dan's Data letters #29
Dan's Data letters #30
Dan's Data letters #31
Dan's Data letters #32
Dan's Data letters #33
Dan's Data letters #34
Dan's Data letters #35
Dan's Data letters #36
Dan's Data letters #37
Dan's Data letters #38
Dan's Data letters #39
Dan's Data letters #40
Dan's Data letters #41
Dan's Data letters #42
Dan's Data letters #43
Dan's Data letters #44
Dan's Data letters #45
Dan's Data letters #46
Dan's Data letters #47
Dan's Data letters #48
Dan's Data letters #49
Dan's Data letters #50
Dan's Data letters #51
Dan's Data letters #52
Dan's Data letters #53
Dan's Data letters #54
Dan's Data letters #55
Dan's Data letters #56
Dan's Data letters #57
Dan's Data letters #58
Dan's Data letters #59
Dan's Data letters #60
Dan's Data letters #61
Dan's Data letters #62
Dan's Data letters #63
Dan's Data letters #64
Dan's Data letters #65
Dan's Data letters #66
Dan's Data letters #67
Dan's Data letters #68
Dan's Data letters #69
Dan's Data letters #70
Dan's Data letters #71
Dan's Data letters #72
Dan's Data letters #73
Dan's Data letters #74
Dan's Data letters #75
Dan's Data letters #76
Dan's Data letters #77
Dan's Data letters #78
Dan's Data letters #79
Dan's Data letters #80
Dan's Data letters #81
Dan's Data letters #82
Dan's Data letters #83
Dan's Data letters #84
Dan's Data letters #85
Dan's Data letters #86
Dan's Data letters #87
Dan's Data letters #88
Dan's Data letters #89
Dan's Data letters #90
Dan's Data letters #91
Dan's Data letters #92
Dan's Data letters #93
Dan's Data letters #94
Dan's Data letters #95
Dan's Data letters #96
Dan's Data letters #97
Dan's Data letters #98
Dan's Data letters #99
Dan's Data letters #100
Dan's Data letters #101
Dan's Data letters #102
Dan's Data letters #103
Dan's Data letters #104
Dan's Data letters #105
Dan's Data letters #106
Dan's Data letters #107
Dan's Data letters #108
Dan's Data letters #109
Dan's Data letters #110
Dan's Data letters #111
Dan's Data letters #112
Dan's Data letters #113
Dan's Data letters #114
Dan's Data letters #115
Dan's Data letters #116
Dan's Data letters #117
Dan's Data letters #118
Dan's Data letters #119
Dan's Data letters #120
Dan's Data letters #121
Dan's Data letters #122
Dan's Data letters #123
Dan's Data letters #124
Dan's Data letters #125
Dan's Data letters #126
Dan's Data letters #127
Dan's Data letters #128
Dan's Data letters #129
Dan's Data letters #130
Dan's Data letters #131
Dan's Data letters #132
Dan's Data letters #133
Dan's Data letters #134
Dan's Data letters #135
Dan's Data letters #136
Dan's Data letters #137
Dan's Data letters #138
Dan's Data letters #139
Dan's Data letters #140
Dan's Data letters #141
Dan's Data letters #142
Dan's Data letters #143
Dan's Data letters #144
Dan's Data letters #145
Dan's Data letters #146
Dan's Data letters #147
Dan's Data letters #148
Dan's Data letters #149
Dan's Data letters #150
Dan's Data letters #151
Dan's Data letters #152
Dan's Data letters #153
Dan's Data letters #154
Dan's Data letters #155
Dan's Data letters #156
Dan's Data letters #157
Dan's Data letters #158
Dan's Data letters #159
Dan's Data letters #160
Dan's Data letters #161
Dan's Data letters #162
Dan's Data letters #163
Dan's Data letters #164
Dan's Data letters #165
Dan's Data letters #166
Dan's Data letters #167
Dan's Data letters #168
Dan's Data letters #169
Dan's Data letters #170
Dan's Data letters #171
Dan's Data letters #172
Dan's Data letters #173
Dan's Data letters #174
Dan's Data letters #175
Dan's Data letters #176
Dan's Data letters #177
Dan's Data letters #178
Dan's Data letters #179
Dan's Data letters #180
Dan's Data letters #181
Dan's Data letters #182
Dan's Data letters #183
Dan's Data letters #184
Dan's Data letters #185
Dan's Data letters #186
Dan's Data letters #187
Dan's Data letters #188
Dan's Data letters #189
Dan's Data letters #190
Dan's Data letters #191
Dan's Data letters #192
Dan's Data letters #193
Dan's Data letters #194
Dan's Data letters #195
Dan's Data letters #196
Dan's Data letters #197
Dan's Data letters #198
Dan's Data letters #199
Dan's Data letters #200
Dan's Data letters #201
Dan's Data letters #202
Dan's Data letters #203
Dan's Data letters #204
Dan's Data letters #205
Dan's Data letters #206
Dan's Data letters #207
Dan's Data letters #208
Dan's Data letters #209
Dan's Data letters #210



Give Dan some money!
(and no-one gets hurt)