diff options
author | Alex Iacobucci <alexiacobucci@google.com> | 2023-09-13 19:22:30 +0000 |
---|---|---|
committer | Alex Iacobucci <alexiacobucci@google.com> | 2023-10-06 16:57:47 +0000 |
commit | 75ada36a0c96d6b028786b0ed9c61f0a7a82fd4f (patch) | |
tree | f95c8cd275914d61f963ae15953cfcd8bda16af5 /alsa/aoc_alsa_card.c | |
parent | cf1ea7b7acb7db1ef24aafde7edaba9b751ea98f (diff) | |
download | aoc-75ada36a0c96d6b028786b0ed9c61f0a7a82fd4f.tar.gz |
aoc: major refactor
Test: on device
Bug: 297923758
Change-Id: I9cf221a8673fd87884043d4c6472c07ef90e11d5
Signed-off-by: Alex Iacobucci <alexiacobucci@google.com>
Diffstat (limited to 'alsa/aoc_alsa_card.c')
-rw-r--r-- | alsa/aoc_alsa_card.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/alsa/aoc_alsa_card.c b/alsa/aoc_alsa_card.c index 09be87e..0ba6b6b 100644 --- a/alsa/aoc_alsa_card.c +++ b/alsa/aoc_alsa_card.c @@ -1806,6 +1806,7 @@ static int aoc_card_late_probe(struct snd_soc_card *card) static int snd_aoc_init(struct aoc_chip *chip) { int i; + struct device_node *aoc_node; chip->mic_loopback_enabled = 0; @@ -1852,6 +1853,14 @@ static int snd_aoc_init(struct aoc_chip *chip) mutex_init(&chip->audio_cmd_chan_mutex); spin_lock_init(&chip->audio_lock); + aoc_node = of_find_compatible_node(NULL, NULL, "google,aoc"); + if (!aoc_node) + pr_err("Cannot find aoc device node\n"); + + chip->hotword_supported = of_property_read_bool(aoc_node, "hotword-supported"); + chip->chre_supported = of_property_read_bool(aoc_node, "chre-supported"); + + of_node_put(aoc_node); return 0; } |