Friday, July 19, 2013

Going Carless

Who needs a car anyway? My neighborhood is ranked as "very walkable" with a walkability score of 75. Meaning most of the errands that I should need to run can be accomplished on foot. There shouldn't be much reason for needing a car.

So when my lease expired, I turned in my Jetta and started my journey as a person without a car.

Why? You might ask yourself. Several reasons:

  • I don't feel like I really need a car. I don't do that much driving and most of the driving I do can be serviced by other options. 
  • Cars are expensive, especially if you don't use it often. Who needs that expense? I have better things to spend my money on. Well that is the theory anyway. 
  • Maybe i can reduce my carbon footprint this way. 
There are other reasons, you may be able to think of, but those are the main ones for me.

How? You also might be asking. I plan to try to use these replacements, in this order.:

  • Walk
  • Bike
  • Bus
  • Carshare
    • Car2Go
    • Lyft
    • Sidecar
  • Motorcycle
I'm certainly not without options here. These are basically in order of cost, then how long it would take me. This is kind of an ideal preference, but lately it has been more like this: 
  • Motorcycle
  • Carshare
    • Lyft
    • Sidecar
    • Car2Go
  • Bus
It has been a week or so, a week of no rain (easier to ride) and not a lot going on, maybe my opinion will change as time goes on? I'll try to keep this blog updated regarding my progress.

Play audio output to multiple devices via pulse audio, or more pulse audio woes.

I've since moved past Ubuntu 12.04 to 13.04 and have run into more troubles with pulseaudio. This is unrelated to my previous issues.

Admittedly this is a fairly fringe case that most people would not run into but that seems to be my experience with Linux in general. Usually a quick google search fixes me up, but this one was a bit trickier.

I have a media center setup with xbmc on a full desktop install of Ubuntu 13.04. It works great, I use the desktop for various things that xbmc has yet to integrate with  or doesn't yet have a great experience with. (e.g. Google Play Music, songza, youtube), and use xbmc to play my movie and TV content.

From my media center to my PC since I'm often playing high quality content I tend to prefer using HDMI to connect the two. It is easy and provides a very high level of quality. Unfortunately for me (and apparently for most modern receivers) my receiver will only output analog audio to my speakers on my patio (Zone 2) and HDMI is a digital signal. And thanks to the copyright issues with converting a digital HDMI signal (hard to copy) to an analog signal (easy to copy) the capability to convert to analog is stripped out of the HDMI connections.

So what this means practically is I have to connect an analog cable from my media center to my receiver as well as the digital HDMI connection. This gives me the best of both worlds, the reciever basically selects the highest quality signal that it can deliver. The trick is that I have to broadcast the signal to more than one device, which is not something pulse audio is setup to do out of the box in Ubuntu 13.04.

What is the fix? I did some googling and found a suggestion to use the paprefs package to control the Pulse Audio Preferences. Unfortunately for me this didn't work, despite an indication that it should from the information in paprefs. Essentially you enable simultaneous output and pulse audio is supposed to broadcast the signal to all your output devices. It never output to my analog out.

Back to google and I found this info:

Relevant sections copy/pasted below.

Simultaneous HDMI and Analog Output

PulseAudio allows for simultaneous output to multiple sources. In this example, some applications are configured to use HDMI while others are configured to use analog. Multiple applications are able to receive audio at the same time.
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC889A Analog [ALC889A Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC889A Digital [ALC889A Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
The key to a configuration like this is to understand that whatever is selected in pavucontrol under Configuration>Internal AUdio is the default device. Load pavucontrol>Configuration and select HDMI as the profile.
Add the following to /etc/pulse/ to setup the analog as a secondary source:
### Load analog device
load-module module-alsa-sink device=hw:0,0
load-module module-combine-sink sink_name=combined
set-default-sink combined
Restart PulseAudio, run pavucontrol and select the "Output Devices" tab. Three settings should be displayed:
  1. Internal Audio Digital Stereo (HDMI)
  2. Internal Audio
  3. Simultaneous output to Internal Audio Digital Stereo (HDMI), Internal Audio
Now start a program that will use pulseaudio such as mplayer, vlc, mpd, etc. and switch to the "Playback" tab. A pulldown should be available for the running program to select one of the three sources.
This did work! YAY, now I'm able to listen to audio on my patio without much trouble. Rad!