ASoC: rt5677: fall back to DT prop names on error
authorFletcher Woodruff <fletcherw@chromium.org>
Fri, 14 Jun 2019 19:48:51 +0000 (13:48 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 17 Jun 2019 15:12:23 +0000 (16:12 +0100)
commit8893cba2fa6994ac8434cbc616eeddcde211ec45
treeeafc4094551e1b05d08c10704ffd08e51d6d1881
parent9de7eaddfa7f47fbb1cd9cdb9aab405599ef414e
ASoC: rt5677: fall back to DT prop names on error

The rt5677 driver uses ACPI-style property names to read from the
device API. However, these do not match the property names in _DSD
used on the Chromebook Pixel 2015, which are closer to the Device Tree
style.  Unify the two functions for reading from the device API so that
they try ACPI-style names first and fall back to the DT names on error.

With this patch, plugging and unplugging the headphone jack switches
between headphones and speakers automatically.

Signed-off-by: Fletcher Woodruff <fletcherw@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5677.c