chrontel: control audio to allow built-in speakers when external display does
not support audio.

Chrontel daemon can determine whether external display provides audio
capabilities via its EDID.  Previously the audio codec driver managed the audio
sink without this knowledge making it impossible to use the built-in speakers if
the display didn't support audio.

This change and related CL's allows the chrontel daemon to manage audio sink
when external display is attached such that built-in speakers can be utilized.
Headphones/line out still have highest priority.

Related CL's:
-------------
http://gerrit.chromium.org/gerrit/4786
http://gerrit.chromium.org/gerrit/4789

BUG=chrome-os-partner:3719
TEST=manual,

- installing
  USE="use_alsa_control" emerge-<dut>
  gmerge -n chrontel

- testing (make sure audio sent correctly during)
  - start/stop daemon
  - insert/remove headphones
  - change /etc/init/chrontel.conf's ch7036_monitor invocation to include switch
    -M9 which forces DVI ( no external audio support )

Change-Id: I563785b83dc3b519cd8c5ffd653c80cd116bd43a
Reviewed-on: http://gerrit.chromium.org/gerrit/4788
Reviewed-by: Mark Hayter <mdhayter@chromium.org>
Tested-by: Mark Hayter <mdhayter@chromium.org>
5 files changed