Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41c93e46 authored by D. Andrei Măceș's avatar D. Andrei Măceș Committed by Nolen Johnson
Browse files

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: default avatarD. Andrei Măceș <andrei@unlegacy-android.org>
parent 7a094eae
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,13 @@ int acdb_init(int snd_card_num)
        ctl = mixer_get_ctl_by_name(mixer, CVD_VERSION_MIXER_CTL);
        ctl = mixer_get_ctl_by_name(mixer, CVD_VERSION_MIXER_CTL);
        if (!ctl) {
        if (!ctl) {
            ALOGE("%s: Could not get ctl for mixer cmd - %s",  __func__, CVD_VERSION_MIXER_CTL);
            ALOGE("%s: Could not get ctl for mixer cmd - %s",  __func__, CVD_VERSION_MIXER_CTL);
            /* 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;
                goto cleanup;
            else
                goto card_name;
        }
        }
        mixer_ctl_update(ctl);
        mixer_ctl_update(ctl);


@@ -114,6 +120,7 @@ int acdb_init(int snd_card_num)
        }
        }
    }
    }


card_name:
    /* Get Sound card name */
    /* Get Sound card name */
    snd_card_name = strdup(mixer_get_name(mixer));
    snd_card_name = strdup(mixer_get_name(mixer));
    if (!snd_card_name) {
    if (!snd_card_name) {