audio: Make CVD version retrieval nonfatal with ACDB v1

This information is only needed at the initialization of ACDB v[23].

Change-Id: I5bbd99d661c55ca623cbe8fb56b54f29888de47c
Signed-off-by: D. Andrei Măceș <andrei@unlegacy-android.org>
diff --git a/hal/acdb.c b/hal/acdb.c
index 58f219a..0c008e1 100644
--- a/hal/acdb.c
+++ b/hal/acdb.c
@@ -99,7 +99,13 @@
         ctl = mixer_get_ctl_by_name(mixer, CVD_VERSION_MIXER_CTL);
         if (!ctl) {
             ALOGE("%s: Could not get ctl for mixer cmd - %s",  __func__, CVD_VERSION_MIXER_CTL);
-            goto cleanup;
+            /* CVD is required for ACDB v2/3, so fail fully there.
+             * For ACDB v1, the CVD version code can be skipped.
+             */
+            if (my_data->acdb_init_v2 || my_data->acdb_init_v3)
+                goto cleanup;
+            else
+                goto card_name;
         }
         mixer_ctl_update(ctl);
 
@@ -114,6 +120,7 @@
         }
     }
 
+card_name:
     /* Get Sound card name */
     snd_card_name = strdup(mixer_get_name(mixer));
     if (!snd_card_name) {