OXBLOG

… because I forget simple little things too soon …

21 Oct

Touch Adapter Voice 2, silenced for good

Volkswagen Polo 2012 model
That’s not me driving. I drive in the real world!

We have a Volkswagen Polo that is a few years old. The bluetooth setup on this car is a disaster.

The car itself has bluetooth and it can play music over A2DP profile, make and receive phone calls over HFP profile and it can even download your phonebook and some more. Enter Touch Adapter Voice 2, a cell phone size device that sits in a dock on the passenger side. Without it, the car refuses to connect to any bluetooth device. So you’d think leaving it in the dock is all that’s needed. Errrr. Wrong. The Touch Adapter also has bluetooth, and just like a phone, it tries to connect to the car over bluetooth. But of course only one device can be connected at a time, so getting one’s phone connected is a gamble. I hear you ask: why the hell does the Touch Adapter need to talk to car over bluetooth? Hear me say: !@#$%!@! Who knows?!! It acts like a relay between the phone and the car. What? Relay bluetooth? Yep! Folks at Volkswagen are on something heavy. Did I mention that in the relay configuration, music playback is gone? Yep. I’m not even sure if it’s legal to advertise the car as A2DP capable when that functionality works only sometimes.

Touch Adapter in its dock

19 Oct

The Birthday Song

Happy Happy Birthday
Eat all you can, off the tray
Get tad funky, get all cray
Is this too much, we say nay

Happy Happy Birthday
Should you want us, we will stay
Until dawn, till the next day
but tonight, wish you the best lay

9 Oct

Show me

Show me a watch that counts the breaths
that you wasted clinging to this flesh

Show me a get away car
that can race through the narrow corridor

Show me a half lit room in the attic
that would shield us from the world

Show me a sign, I’m about to resign
unless I see you bleeding from the same cuts as mine

Show me your face, pick up this pace
we need a titanium strength will to displace

Show me your wrist, bare it, I insist
My bet is on your strong pulse
that beats despite your fierce fist

Show me your grace, lace up the case
We need to hide it away from the eyes of the saints

Show me courage, don’t be shy about it
Stay and fight, save the wings for the nightfall instead

Show me no more, we made it
Let’s not shake hands, let’s not say “see you later”
I know, I’ve been told I’m cruel that way

4 Oct

Sunny days

Sunny days aren’t all the same
Once it rained while the sun was still pouring
Rays wrestle with the clouds sometimes on their way
Maybe happy thoughts are kept for the soft shadow days
Even pain slides its curtain in the shining
Waited for a blue sky and it’s gotten late

Sunny days aren’t all the same
She left on one of those days
He wasn’t back when the dawn came
and it shined later just the same
Steel rails are glowing to a flame
My seat is but cold, on this old and rusty train

30 Sep

Near the end

You gotta believe me when I say
This isn’t a sight I see everyday
The greatest work of art in history
standing tall and heavy in my way

Purple lanterns and flashy patterns
have nothing on these sandstones and curves
Fireworks and flickering lights
could never scratch the surface of these tiles

Friday nights aren’t always this bright
with ideas and rhymes that surface while
I wait in the corner side of the mall
while you run late and then walk tall

Mark this night, we’re getting to the end
Dramatic as it sounds, drama is what it entails
Remember the remark about the chandelier
Remember this night, the end’s getting near

17 Sep

Wary Wishes

I have a thousand wishes for you
Some are only for me to know
The rest I’m willing to share with you

For starters I wish you ignorance
I wish you recurrent trips to France
Waking up to knocks on the door
To smell of freshly baked baguettes
Staying in all afternoon with your buddies
playing twister on the floor

I wish you a little airtight jar
that you can fill with assorted stars
So you can have starry nights
whether inside or riding in cars

I wish you wishes that come true
The kind that mean something to you
I wish you silly things on a whim
I wish you the heroine part in a film

30 Aug

Decrypt /data partition under Cyanogenmod Recovery

Here is a trick I found to allow mounting an encrypted /data partition under Cyanogenmod Recovery. I’m not sure if you can run this on other recoveries due to lack of availability of vdc.

After booting into recovery, open an adb shell using adb shell and run the following:

setprop ro.crypto.state encrypted
vdc cryptfs checkpw 'your password'
mount /dev/block/dm-0 /data

It’s inconvenient but it works. I found this solution in an issue thread on github repo for TWRP. Hope this helps some of you out there.

19 Aug

High Bitrate Playback on Audioengine D1

I own an Audioengine D1 DAC which I love. It’s very Appley in design. Since I bought it two years ago, I have continously learnt to notice ever so subtle differences in quality of music playback, to the point that I can easily tell apart compressed and uncompressed music, and somewhat the difference between new and used equipment. A double blind test is definitely in order to prove the above abilities.

Recently reading over the spec of my D1 DAC, I saw that it resamples everything to 24bit/96Khz for playback. From past knowledge, I knew that resampling is a very complex and resource hungry operation and the small silicon inside the DAC cannot possibly do the best that can be done. So after a bit of searching online, I managed to force Pulseaudio on my Linux machine to always stream 24/96 bitstream to my DAC, and do software resampling on my main CPU. It sure is a power hungry process. The highest quality sampler, src-sinc-best-quality eats up 40% of my one core of a Xeon 3.2Ghz CPU! And that’s per stream, so if I have music playing and watch a youtube video, that’s one CPU core gone. src-sinc-medium-quality drops the usage by more than half, to 13% without any noticable difference.

To force 24/96, edit /etc/pulse/daemon.conf and add/uncomment the following lines:

resample-method = src-sinc-medium-quality
default-sample-format = s24-32le
default-sample-rate = 96000

Then restart Pulseaudio daemon:

$ pulseaudio --kill
$ pulseaudio --start

To verify your changes are in effect, play a some music and find your card under /proc/asound:

$ find /proc/asound -type l

Then see the content of streamN under the relevant directory for your card above:

$ cat /proc/asound/D1/stream0
                  2010 REV 1.7 Audioengine D1 at usb-0000:00:1a.0-1.1, full spe : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 1
    Packet Size = 600
    Momentary freq = 96000 Hz (0x60.0000)
    Feedback Format = 10.14
  Interface 1
    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 96000, 88200, 48000, 44100, 32000
  Interface 1
    Altset 2
    Format: S16_LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 96000, 88200, 48000, 44100, 32000

Note that Status: Running is referencing Interface = 1 and Altset = 1 which is 24/96 according to the rest of the output.

11 Aug

Kite

It starts with a little kite, that you built as a child
You painted it green until that sheep you had in the barn
one night landed on your dinner plate
Hard to follow for an outsider, what trick you pulled to
slide under the farsighted family rules you were brought up under
One wonders, if an intellectual your size, can run to a small room and hide
and wish that her kite would let her fly
out of the second floor over the tiles of the streets she used to play in
that she used to fall on and cry
then why men and grown women who occupy
a much larger volume and consume as much
see themselves boxed in, in hives, waiting for that day to arrive

24 Jul

BPAY QR Code

BPAY is an electronic bill payment system in Australia which enables payments to be made through a financial institution’s online or telephone banking facility to merchants who are registered BPAY billers.”1 To pay for a bill, you need a Biller Code and Reference Code which are numbers with varying number of digits. This information is printed on the paper bills for instance where you can use them when paying for the bill online. It’s only recently that BPAY has rolled out a QR Code standard to ease the entering of these numbers in bank phone apps.

I wanted to know how the BPAY information was encoded so I could transfer my existing Biller and Reference codes to my phone without manual error. Unfortunately I couldn’t find anything online. The easiest way I thought was to figure out how my phone app reads it. The only bank right now that has an app with BPAY QR Code scanning functionality is Commonwealth Bank. So I copied the app out of the phone, disassembled it using apktool and went digging.

besides ranting, you may also find me asking silly questions, write code for the world or just plain showing off. Make sure you read the privacy policy.