Chrome with libcras on gPrecise

How to build and install cras and tell Chrome to use it on gooBuntu gPrecise.

Install prerequisites.
sudo apt-get install git libasound-dev libspeexdsp-dev libgtest-dev libtool automake libdbus-1-dev libudev-dev g++ ladspa-sdk libsndfile-dev
On Trusty:
apt-get install libsbc-dev
install libsbc 1.1 manually by downloading and compiling the tarball from (I couldn't find a package for Precise). 

ini parser.
git clone
cd iniparser
sudo cp libiniparser.* /usr/local/lib
sudo cp src/dictionary.h src/iniparser.h /usr/local/include
sudo chmod 644 /usr/local/include/dictionary.h /usr/local/include/iniparser.h
sudo chmod 644 /usr/local/lib/libiniparser.a
sudo chmod 755 /usr/local/lib/
cd /usr/src/gtest
sudo apt-get install cmake
sudo cmake .
sudo make
sudo chmod 644 *.a
sudo cp *.a /usr/local/lib
Build/install cras.
git clone
cd adhd/cras
./configure --prefix=/usr
make -j33 check
sudo make install
mkdir /var/run/cras
chown $USER /var/run/cras
If you see some build errors on 'snd_pcm_chmap_query_t', it means that you need newer version of alsa-lib. 1.0.27 or higher is required to build cras.

Confiugre/build Chrome.
Follow instruction on wiki for getting and building chrome.
cd chromium/src
GYP_GENERATORS="ninja" ./build/gyp_chromium -Duse_cras=1
ninja -C out/Release chrome

Start cras and chrome.
cd adhd/cras
cd chromium/src
./out/Release/chrome --use-cras