CRAS: alsa_jack - Monitor UAC2 jack controls

With commit 5a222e849452 ("ALSA: usb-audio: UAC2 jack detection"),
the usb card for a supported UAC2 device will have boolean kcontrols
named "* - Input Jack" and "* - Output Jack" exposing jack status,
where * is the usb terminal name.

If the device provides a string in iTerminal, it'll be used as the
terminal name. Otherwise a standard name is given based on wTerminalType.
See sound/usb/mixer.c get_term_name for the complete list.
Common ones we are interested in are "Headset", "Headphone", "Mic",
"Speaker".

This patch adds the jack names so CRAS can watch the kcontrols for
plug/unplug event.

BUG=b:74149899
TEST=Test dongle with UAC2 jack detect with various headsets on meowth.
Unplug headset but keep usb dongle attached, cras_test_client --dump_s
shows the correct ionode plug status for the usb card.
Test dongles without UAC2 jack detect and verify ionode is set to
plugged by default.

Change-Id: Iba19612841dad5d764b08715a791d1ad64f9e541
Signed-off-by: Ben Zhang <benzh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1237315
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2 files changed