Background: JDS Labs Element & Audeze LCD-2 2016

Background

I spend a lot of time at work and wanted a reference quality headphone rig to match my home system. Technology is constantly improving, reducing the price of reference quality audio every year. I still love my LCD-2 headphones, so they were at the top of my list yet I was open to trying any new headphones released since then. I wasn’t going to get another Oppo HA-1, which I used in my home system. It’s too bulky and has way more features than I need, and at work I use the computer as an audio source. I have a great computer audio system at home too, using a Juli@ sound card and Corda Jazz amp. I’d consider getting another just like it, but first wanted to check out what alternatives might have recently appeared.

If you’re using a computer as the audio source, you need two things:

  • A high quality D-A converter to get a line level analog signal.
  • A high quality headphone amp to amplify that signal and drive headphones.

A sound card does the first – but it’s not portable and only works with desktops (not laptops). Now, all computers can stream audio files out a USB port to an external DAC. This is portable and works with any computer – desktop or laptop. With the right configuration (adaptive or async), the external DAC clocks the bits and jitter is not an issue.

Given my preference for no-nonsense engineering over audiophile mystique, I quickly found JDS Labs, aka some guys in Illinois building well-engineered and built headphone audio gear on a budget. They started by producing a little amp called the O2, an open source design released into the wild by NwAvGuy. Prior to JDS, this was only available as a kit, and lots of headphone audiophiles don’t have the skills to build it. Perhaps they should – no Jedi’s training is complete until he builds his own light sabre – but that’s a different subject.

A few years ago, JDS started building their own designs, which took the O2 to another level in performance and higher power output enabling them to be used with a wider variety of inefficient power hungry headphones like the HiFi Man HE-6. Yet even JDS’s new gear was built to solid engineering specifications without any audiophile nonsense and reasonably priced.

Long story short, I got a second pair of LCD-2 headphones and a JDS Element to drive them, which is a headphone amp combined with a USB DAC. I compared this amp to my HA-1 and Corda Jazz, which is stiff competition.

I posted my reviews of the Element and 2016 LCD-2 separately.

HRTF

HRTF is Head Related Transfer Function. It describes how you perceive sound. Every person perceives sound differently because the individual shape of your head, ears, nasal & mouth cavity, etc. all affect how the sound reaches your ears. In short: different people listening to the same thing, hear it differently.

What most HRTFs have in common is the range from 2 – 5 kHz is amplified by 15 dB or more. The ear’s resonance is typically +17 dB at 2.7 kHz. That is a huge non-linearity. Here is a typical HRTF curve from Tyll Herstens at Inner Fidelity.

Another way to think about this: Suppose you’re standing at the seashore listening to waves crashing on the beach. That sound is similar to white noise: it has roughly equal energy across a wide frequency range. The sound you actually perceive, however, is 10 – 20 dB louder in the 2 -5 kHz range because those frequencies were amplified (or frequencies outside that range attenuated) by your head, ears, ear canals before it hit your eardrums.

You can easily test how the size & shape of your head & ears affects sound. While listening to music on speakers, gently push your ears forward or open your mouth really wide. The sound changes. And that only gives a small taste of what the real differences are – imagine how much more different it might be if you could change the size & shape of your head, ears, etc.! That different sound you hear would be what another person hears normally.

The astute reader will wonder – if this variation is due to individual variance in body size & shape, how can it be measured? The answer is simple. Take 2 tiny microphones small enough to fit inside your ear canal. Position them in the open air and use them to record sound. Now build a fake life-size human head using materials that approximate the density & reflectivity of human tissue and skin, and insert these same mics deep into the ear canals, facing outward. Now measure the same sound again. The difference between the two recordings is the HRTF of your dummy head.

Every person has an individual HRTF and the variance from person to person is significant. Since headphones bypass the HRTF, in order to sound natural they must have a frequency response that matches the HRTF. Put differently, a headphone with flat frequency response would sound quite dull, down 15+ db in the 2 – 5 kHz range.

This doesn’t apply to loudspeakers. If a speaker has objectively flat FR, every person will perceive that however they perceive natural sounds. Speakers don’t have to reproduce the HRTF because the sound comes from a distant source and your HRTF transforms it when it hits your body. Headphones play sounds directly into your ears, bypassing your body, head and HRTF.

This means there is an absolute reference FR for speakers: perfectly flat. But there is no absolute reference FR for headphones. A headphone has to mimic the HRTF which is different for every person. The best a well-engineered headphone can do is mimic the most common or average HRTF across the population. Each individual will be a little different.

Thus, different people will disagree on what headphone has the most natural FR reproducing sounds most realistically. For example, the Sennheiser HD-800 has a big response rise around 5 – 7 kHz. For me personally, it’s artificially bright, almost skull-jarring. But for others it may sound natural. At the opposite end of the spectrum, the Audeze LCD-2 has a dip from 2 – 9 kHz (its raw response has a rise, but it rises a bit less than the typical HRTF does). For me personally, it sounds natural and realistic. My HRTF probably lifts this frequency range less than average. But for others this headphone sounds dull.

LineageOS is Alive!

Last night I installed LineageOS 14.1 on my Galaxy Note 8 tablet.

I’ve been running CM 13 on this tablet for the past year or so and it works great – stability, performance, battery life. But the last build was Christmas Eve 2016, then Cyanogenmod died. I’ve been watching CM relaunch as LineageOS. They now have a home site and are running weekly builds for many devices. The Galaxy Note 8 happens to be one of these devices – with more to come.

The installation procedure is the same as CM. First, install TWRP recovery. You should do this no matter what build you’re running, even stock, because it has great features like full backup & restore. There are plenty of install guides. I had it installed already. Then, install LineageOS:

  • LineageOS Zip
  • Open Gapps Zip – use version 7.1 for LineageOS 14.1.
  • SuperSU Zip (if you want root)

The root ZIP provided by LineageOS did not work – TWRP had an error trying to install it. I used SuperSU instead, and it worked perfectly.

I’m still restoring backups & such, but first impression is that LineageOS 14.1 seems solid and fast. I’ll report back later after I get some time to use it.

Thoughts on the Dark Forest

I recently read Cixin Liu’s Three Body Problem and Dark Forest. This blog entry is a spoiler, so you may want to stop reading this if you plan to read these books.

Fermi’s Paradox is a key concept and plot element, particularly one explanation for it called the Dark Forest, tied to character Luo Ji’s axioms of life in the universe:

  1. Life’s goal is to survive
  2. Resources (matter & energy) in the universe are finite
  3. We can never be sure of alien life’s true intentions
  4. Distances between stars impair communication

Conclusion: (3) and (4) create a chain of suspicion making conflict inevitable.

I am not convinced. This is fixed-mindset, zero-sum thinking, similar to the flawed economic thinking behind Malthusian doomsday predictions and protectionist trade policies here on Earth. The above rules are not unique to outer space. The same could be said of different cultures here on Earth – every man presents a threat to all others as they must compete to secure the limited means of survival, leading to inevitable conflict. During some historical periods – primarily in pre-agricultural tribal societies – this was true. Yet today it is false. We have Human societies of size, complexity and interdependency that would be unimaginable to prior generations. Why?

Two key factors. First, the increased productivity of division of labor. Second (and a part of the first), Ricardo’s theory of Comparative Advantage. It was not love or enlightenment that caused Humans to stop fighting each other over the limited resources Nature provided (as animals do), and instead cooperate to create new resources making everyone better off. It was recognition of these fundamental economic facts.

The same applies to space exploration, even more so. Cixin Liu misses this point entirely and falls for the simplistic zero-sum thinking that has duped many before him. Items 1-4 are true, yet the conclusion does not necessarily follow. He’s missing an important 5th axiom: The potential benefits of cooperating with alien life are so tremendous they cannot be measured. When balanced against risks (3) and (4), conflict is no longer inevitable. The result may end in conflict or cooperation, depending on the situation.

Infinite Numbers

ℵ0 (Aleph zero, null or naught) is the smallest infinity, the size of the natural numbers. It is countably infinite, which means there exists some method of counting that will eventually reach each item in the set.

The rational numbers – all fractions of the form p/q where p and q are natural numbers, is also of size ℵ0. One way to prove this is to demonstrate a method for pairing each natural number with a rational number, and show that every rational number will have a pair. The classic proof draws a table of rational numbers and walks through it starting in a corner and marching along diagonals.

So we have the intuitive result that you can pair off the elements of 2 sets with each other, if and only if the sets are the same size.

To me it seems counterintuitive that the rational numbers are the same size as the natural numbers, even though this fact follows logically from the very simple and intuitive above proposition. It seems like there are a lot more rational numbers. However, what follows seems even stranger to me.

The irrational numbers – π, e, and myriad others, are more numerous. Their size is a bigger infinity called ℵ1. They are uncountable – which means there doesn’t exist any method of counting that will reach all of them. Every method you come up with will skip some. There is no way to pair them off with the rational or natural numbers – no matter how you do it, there will always be irrational numbers left over without a pair.

Despite being countable, the rational numbers are infinitely dense. Between any two of them lie infinitely many more. The irrational numbers are also infinitely dense. What is more, between any two rational numbers lie infinitely many irrational numbers. But we’d expect that, given there are more irrational numbers. Furthermore, and most strangely, between any 2 irrational numbers lie infinitely many rational numbers. How can that be, if irrationals outnumber rationals?

The proof is simple. Pick any two irrational numbers, n1 and n2. Take the absolute value of their difference, d = | n1 – n2 |. There are infinitely many irrational numbers smaller than d. If that’s not obvious, pick some natural number ε greater than both d and 1/d. Then 1/ε is a rational number smaller than d.

It seems strange that 2 sets, each infinitely dense, both in itself and in each other, can be of different sizes. But they’re both infinite,so this is probably just a manifestation of the intuitive difficulty conceptualizing different sizes of infinity.

Cyanogenmod Camera Bug and Fix

Good news: you’re running Cyanogenmod, the most popular open source version of Android. Pure Android, no bloatware crapplets from the carrier or manufacturer, and better device performance and battery life.

Bad news: Cyanogenmod has a bug in the camera driver. This is a well known bug; if you Google “cyanogenmod camera bug” you will find lots of info on it. Occasionally the camera won’t work and you have to reboot the phone to get it working again. There is no real fix to this bug.

Good news: there is a simple workaround that fixes it in a few seconds, no reboot needed.

Explanation

Android has a background process called mediaserver. It is always running and one of the many things it does is control access to the camera. This process has a bug in which it locks or hangs the camera driver, making the camera inaccessible.

This mediaserver process is part of Android and starts automatically during boot. The neat thing is, if mediaserver is ever killed, Android detects this and immediately starts a new instance. When this happens, it clears the camera lock and the camera works again.

So, to fix this problem all you have to do is kill the mediaserver process. Android is Linux, so you could simply open a terminal and run the command killall mediaserver. But it’s not quite that simple. Since mediaserver is a system process, you must have root privileges to kill it. Fortunately, that’s easy with Cyanogenmod.

Enabling Root

Rooting Cyanogenmod is easy – root is already built in, you only need to enable it.

Go to Settings, About Tablet, and tap Build Number repeatedly. A toast will pop up saying, “X more presses to enable developer mode”. Keep tapping until Developer mode is enabled.

Hit back (to Settings) and you’ll see a new option: Developer options. Tap it. Scroll down to Root access, and enable it.

Reset in a Terminal

Now you can open a terminal and run the command su (to become root). A popup will appear asking whether grant root access to the terminal. Allow it – you’ll only have to do this the first time. Then (back at the terminal command prompt) run the command killall mediaserver. Alternately, you can do it all in a single command: su – c “killall mediaserver”. If the camera was stuck, it’s now working again. It only takes Android a couple of seconds to detect that mediaserver has been killed and restart it.

NOTE: if the terminal doesn’t have a killall command, install BusyBox. It installs a bunch of standard Linux command line tools, including killall and many others.

Reset the Easy Way

Opening a terminal and entering a couple of commands only takes a few seconds, but you might want an even quicker and easier way to reset the camera driver. How about an app that you simply touch, and it instantly kills mediaserver in the background? There are several versions of this app available if you google for them. I built one myself using Tasker. It runs standalone on any Cyanogenmod device – doesn’t need Tasker to run.

This app is an APK that you will be side loading. For security reasons, side loading is disabled by default in Cyanogenmod. To install this app (or any other APK) you need to go to Settings, Security, and enable Unknown Sources.

Now download this APK file and copy it to your device, for example in the “Downloads” folder. Just like you would for any other file like a JPG photo or MP3 song. Use the Cyanogenmod file manager to navigate to the Downloads folder and touch the APK file. This will install it.

After you’ve installed it, if you want to you can disable Unknown Sources. The app will continue working since it’s already installed.

The first time you run this app it will ask for root privileges (needed to kill the system mediaserver process). Grant them. It won’t ask again. When the app runs it will pop up a message saying “Camera Reset”, which will disappear in about 1 second.

NOTE: I built and shared this APK only to help Cyanogenmod users – it has no ads, no telemetry, no viruses, and is legal and free. However, it has no warranty. Know what you’re doing and don’t blame me if it doesn’t work, breaks your device, or makes your hair fall out. If you don’t trust me or this source, use a different app from somewhere else or write your own.

Galaxy Note 4

My Galaxy Note 2 is a fantastic phone; I’ve had it for 5 1/2 years. T-Mobile abandoned it years ago to Android 4.3, so I replaced the bootloader & ROM with TWRP and Cyanogenmod, going through versions 11, 12 and 13. I would keep using this phone, but for 1 problem. It doesn’t support 700 MHz Band 12 for LTE, which T-Mobile has been using to expand their coverage. Because of this, my 4G/LTE data coverage on this phone is not that great. It’s not bad, but it could be a lot better. That’s hardware, so to fix it I had to get a different phone.

But what I’d like in a phone isn’t readily available:

  • Support for all T-Mobile 4G/LTE bands (especially Band 12)
  • 5.5″ screen (+/- 0.25″)
  • Extra long battery life
  • SD card
  • Removable battery
  • Supported by LineageOS (aka Cyanogenmod)

Some phones came close: Moto X Play, Oneplus 2, Nexus 6P. But none met all requirements – except the Galaxy Note 4. But the Note 4’s CM support was abandoned at 12.1 (Android 5). But since CM died and was reborn as LineageOS, the Note 4 is on the list of devices planned for official support. So I got one on eBay, cost about $240. It’s in near-new condition, appears to be a demo model. There is some slight screen burn-in near the top edge – this is a common problem with the Note 4. In mine, it’s non-obtrusive and I’ve seen worse. I wouldn’t have noticed except for running apps with screen patterns designed to detect it.

I wouldn’t want the Note 5 – battery was not removable. The Note 7 was a disaster. The Note 4 is definitely the peak of the Samsung Note line.

Differences from the Note 2:

  • Better mobile data coverage: supports all T-Mobile bands.
  • Screen: higher res, brighter, wider gamut
  • Speed: at least twice as fast
  • Better camera: dynamic range, color, with image stabilization
  • bug fixed: Evernote pen input
  • bug fixed: MMS texting (multiple people or with attachments)
  • Dimensions & weight: about the same (within a few mm and grams)

Setup:

  • Update: the phone came with Android 5. After 4 updates totalling over 2 GB of downloads, I had the latest 6.0.1.
  • Root: Chainfire has an easy root for the Note 4, works with Samsung’s latest 6.0.1 ROM. Push it to the phone using Odin, reboot and it’s automatic.
  • GMD SPen: Samsung’s built-in pen support sucks. Configuration is a hot mess and it can’t do the things I want. GMD SPen works seamlessly on top of TouchWiz, or can replace it.
  • Titanium Backup: My go-to backup app, does it all as well as letting you freeze or uninstall “unremovable” crapplets.
  • Nova Launcher: Samsung’s home screen is not very configurable. You can’t even set how many rows & columns! Nova Launcher is similar to CM’s Trebuchet launcher with all those options plus more.
  • Stylus Beta: the best handwriting keyboard I have found. Better than Samsung’s built-in or Google’s. Plus an easy clean interface.
  • Solid Explorer: the best file manager, supports root and includes LAN, FTP connections. Not free, but better than Astro or ES File Explorer. It also has a really nice photo viewer (better than the standard Android gallery app) and built-in text editor. If you go to root mode and edit a system file, when you save the file it automatically mounts system read-write, saves it, then remounts read-only.
  • Folder Sync: the best cloud folder sync utility. If you want your Box, Dropbox, etc. accounts to sync to your device like they do on a real computer, and your device has the storage capacity to support it, this is the only way to fly.
  • Tasker: for all those random little tasks you want to do, like run a command at boot, kill/restart the mediaserver process if your camera dies, whatever. This does it all.
  • Jota: Jota+, the best all-around Android text editor. I’ve tried many over the years and this is the one. It also has a root connector.
  • GPS Status: the best GPS status utility, also keeps your AGPS data up-to-date for quick position locks in all apps.
  • Sygic Maps: does much (though not all) of what Google Maps does – search, map, route, dynamic re-routing as you drive. But does it all on-device, in-memory, so it works even in places that have no mobile network.
  • MX Player: the best Android video player. Better than any built-in player or VLC. I love VLC on Linux desktops, but the Android version is not as good.
  • Power Amp: the best Android music player. Better than any built-in player or VLC. VLC doesn’t do gapless playback of MP3 files and it intermittently gets noise in the playback.
  • Office Suite: the best Android office app for viewing & editing MS Office docs. I’ve tried  many office suites over the years; this one is the best.
  • Textra: the best Android SMS/MMS experience. Beautiful and seamless to use, supports several emoji sets – iOS, FB and others. Sure you can hack the iOS emojis into your rooted Android phone by replacing the system ttf file, but with Textra you don’t need to.
  • View Ranger: the best outdoor hiking/biking tracking/routing/navigating GPS app. Doesn’t have Strava’s social features, but it has a ton of far more useful features Strava doesn’t have. Besides, I hate social.

This is not only the best phone I’ve owned, it’s one the best phones available on the market today. It has a brilliant AMOLED screen, not only bright but also with wide, accurate gamut. It’s very fast (even on the stock Touchwiz ROM – LineageOS will be even faster), great camera, lots of storage, excellent battery life, and great mobile data coverage.

VFAT, UUID, SD Cards, Android Mount

Last night I was setting up a new Android tablet to match an old one. Both have SD cards with apps that store data on it. To make things easier, I wanted the SD card to mount to the same point in the filesystem. But Android 6 mounts the SD card to a directory whose name is the card’s serial number (UUID). That is: /storage/XXXX-XXXX. We’re talking about the serial number, not the volume label – so it’s not easy to change – tune2fs can’t do it because it’s fvat, not ext.

Eventually I succeeded but there were a few twists along the way.

Ubuntu help forums online have a procedure to do this with dd commands, but I want to avoid performing block level I/O on the filesystem. I found a simpler, cleaner, safer way to do this:

First, install mtools. It’s in Ubuntu’s standard repos: sudo apt-get install mtools

Next, connect the SD card and check which device it is – in my case /dev/sdc1 but this will vary. Make sure it’s unmounted, but not ejected.

Next use mlabel to set the UUID: sudo mlabel -i /dev/sdc1 -N XXXXXXXX ::VOL-LABEL

NOTE: mlabel’s -i param is undocumented. It’s how you specify the device. You can omit the VOL-LABEL, but leave the :: in place.

NOTE: after doing this if you check the UUID using blkid or other commands, they will report it unchanged – even if you remove and reinstall the SD card. This is incorrect; the UUID did actually change. Apparently, you must reboot before Linux will recognize a changed UUID for a filesystem.

President Trump

There really wasn’t that much difference between Clinton and Trump. They differ vastly in demeanor and experience, but if you take their words at face value, both are statists who believe in bigger government. I could not vote for either – my belief in the US Constitution and liberty is too strong. I voted libertarian, as I usually do. And the libertarians got about 3% of the vote, which is the best they have ever done!

In my view, a Clinton administration would be professionally run but totally corrupt. A Trump administration would be … who knows? … but little good comes to mind.

However, despite the many obvious problems with someone like Trump being president, I see a few bright sides:

  • We’re likely to get a Supreme Court justice who believes the US Constitution means what it says.
  • We’re likely to see the unpopular disaster known as Obamacare repealed.

Don’t Pay Your Mortgage Early

It’s common for people to want to pay off their mortgage early, and for financial advisors to recommend this. I think it’s a bad idea. Here’s why:

You either have the cash to buy a house or you don’t.

If you do: if you invest your cash, a diversified long-term portfolio will return around 7% CAGR. You can get a 30-year fixed mortgage at less than 4%, and it’s tax deductible so it’s really less than 3%. Every dollar you pay for the house, is not being invested. So you lose 7% in order to save less than 3%. Don’t do that!

If you don’t: you can’t pay cash for a house, so you either rent or buy with a mortgage. If you buy with a mortgage, get a 30-year fixed and don’t pay it off early. Why? Consider the opportunity cost. That is: suppose you have an extra dollar – what should you do with it? Whatever gives you the highest return. Every financial situation is different, but a typical greatest benefit ranking looks something like this:

  • If you have credit card debt, you save 18% or more.
  • If you invest it, it will earn 6-7%.
  • If you put it into the mortgage, you save less than 3%.

Here’s a specific example: suppose you borrow $500k at 3% for 30 years. You decide to pay an extra $100 per month. You’ll pay off the loan about 2 years early saving about $21,000 in interest. If instead you invested $100 every month earning 7% annually, you’d have $122,000. That’s $36,000 in principal and $86,000 in earnings.

By paying off your mortgage early, you gave up $86,000 in order to save $21,000.

Addendum

The astute reader might say, “When you pay off the mortgage 2 years early, you can invest the entire payment over that 2 year period, which increases the value.” So let’s look at this.

The standard mortgage payment is $2,387 and you’ve been adding $100 so your payment is $2,487 per month. If you invest that for 2 years at 7% it earns $63,871. Add this to the $21,000 you saved and you’re at $84,871. This is still less than the $122,000 you would have earned if you invested that $100.