diff options
| author | D. Andrei Măceș <dmaces@nd.edu> | 2018-01-16 21:26:06 +0200 |
|---|---|---|
| committer | D. Andrei Măceș <andrei@unlegacy-android.org> | 2018-03-16 03:30:35 +0200 |
| commit | 6ec0a5e128712d07220efbc68dd556827946b0d0 (patch) | |
| tree | da282e1663d0138866a1c9d508a0d3d43798decc | |
| parent | 4eee695f0069d0ad101c4aaffd55604770d98e33 (diff) | |
| download | android_hardware_qcom_audio-lineage-15.1.tar.gz android_hardware_qcom_audio-lineage-15.1.tar.bz2 android_hardware_qcom_audio-lineage-15.1.zip | |
audio: Make CVD version retrieval nonfatal with ACDB v1lineage-15.1
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>
| -rw-r--r-- | hal/acdb.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -98,7 +98,13 @@ int acdb_init(int snd_card_num) 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); @@ -113,6 +119,7 @@ int acdb_init(int snd_card_num) } } +card_name: /* Get Sound card name */ snd_card_name = strdup(mixer_get_name(mixer)); if (!snd_card_name) { |
