CRAS: Add a property disable_emphasis to disable emphasis/deemphasis

Emphasis/Deemphasis is going to be removed in Chrome. In order to
align the behavior of dsp and chrome, we need to enable
emphasis/deemphasis if user is using an old chrome version to
calibrate config files, and disable it if user is using a new chrome
version to calibrate config files.
This patch adds a property disable_emphasis to drc to disable
emphasis/deemphasis.

CQ-DEPEND=CL:186340
BUG=chromium:340870
TEST=1. Prepare a audio raw file sweeping from 10Hz to 22000Hz.
     2. Modify parameters in drc_test so three drc filters will clip
       audio that is larger than 0dB. Specifically, modify RATIO to
       999, KNEE and THRESHOLD to 0, POST_GAIN to 0. Also, add
       drc->emphasis_disabled = 1;
     3. run drc_test and check the waveform of output. The magnitude
       at high frequency remains roughly the same if
       drc->emphasis_disabled = 1. The magnitude at high frequency
       will be lowered if drc->emphasis_disabled = 0.

Change-Id: I98ff15a88fd198d0239fe1fa3f324eb0875642ba
Reviewed-on: https://chromium-review.googlesource.com/186073
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
CRAS: Modify dsp.ini config files which use [drc]

This patch adds a switch emphasis_disabled at input_4 port of [drc] in dsp.ini files
of boards that use drc.

CQ-DEPEND=CL:186073
BUG=chromium:340870
TEST=Check audio playback is normal on daisy_spring board.

Change-Id: Ibed84ca85115ab0d601bc65db7303e5d0ed08919
Reviewed-on: https://chromium-review.googlesource.com/186340
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Add ucm and cras config for daisy_skate

It still needs device specific tuning but it's a good start

BUG=chrome-os-partner:25737
TEST=AudioJack test

Change-Id: If353dbf8448204fa4a10ce500052e56acf70a2c3
Reviewed-on: https://chromium-review.googlesource.com/185810
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Commit-Queue: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
UCM config: Add UCM config for zako

Set two flags for Zako: NoCreateDefaultOutputNode
and NoCreateDefaultInputNode to '1'.
Note that UCM parser requires at least one section of device,
the empty 'Headphone' device is put for that reason.

BUG=chrome-os-partner:25066
TEST=manual on zako

Change-Id: I3fbe81b8b9f1d662b09b7f1eb9263d10551b7224
Original-Change-Id: I8edd62e35a95c185ab4fa66682024120ef911abe
Reviewed-on: https://chromium-review.googlesource.com/183340
Reviewed-by: Mohammed Habibulla <moch@google.com>
Commit-Queue: Gediminas Ramanauskas <gedis@chromium.org>
Tested-by: Gediminas Ramanauskas <gedis@chromium.org>
CRAS: audio_thread - move message definitions to c file

These aren't used outside of audio_thread.c.

BUG=none
TEST=still compiles.

Change-Id: I226ac57ca924d55f539b27a99df36ad5c586c17d
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: dump audio debug info from client.

Instead of dumping audio thread debug info to syslog, pass it back to
the client through shared memory.  The extra data in shared memory isn't
protected or synchronized, but only one client at a time should ever
access it.

Change-Id: Ie5864b1a3f82a079ed1182b119b05c86976aadda
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: audio_thread - Add an event log.

Log certain interesting events that happen in the audio thread, add this
log to audio debug info.  Change the test client to print this log when
dumping audio info.

Change-Id: I1b93cfd36731f2ee8b6700faba44fb36ead161e6
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: audio_thread - Handle EINTR when waiting for streams.

If there select call in interrupted, retry it.  If there is an error
other than EINTR, break out of the waiting loop.

BUG=none
TEST=none

Change-Id: I3762ee6dca039a24236222dd6cb7df2f3bef44d7
Signed-off-by: Dylan Reid <dgreid@chromium.org>