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

Commit 6402646d authored by Ravi Kumar Alamanda's avatar Ravi Kumar Alamanda Committed by Vineeta Srivastava
Browse files

hal: enable more default logs

Enable minimal default logging to know audio routes and sound
devices being enabled or disabled.

Change-Id: Ia5c67a654fc2f36bcb7cf722706a573b9e6c0a04
parent 4cc4ce1a
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ int enable_audio_route(struct audio_device *adev,

    strcpy(mixer_path, use_case_table[usecase->id]);
    platform_add_backend_name(adev->platform, mixer_path, snd_device);
    ALOGV("%s: apply and update mixer path: %s", __func__, mixer_path);
    ALOGD("%s: apply and update mixer path: %s", __func__, mixer_path);
    audio_route_apply_and_update_path(adev->audio_route, mixer_path);

    ALOGV("%s: exit", __func__);
@@ -263,7 +263,7 @@ int disable_audio_route(struct audio_device *adev,
        snd_device = usecase->out_snd_device;
    strcpy(mixer_path, use_case_table[usecase->id]);
    platform_add_backend_name(adev->platform, mixer_path, snd_device);
    ALOGV("%s: reset and update mixer path: %s", __func__, mixer_path);
    ALOGD("%s: reset and update mixer path: %s", __func__, mixer_path);
    audio_route_reset_and_update_path(adev->audio_route, mixer_path);

    ALOGV("%s: exit", __func__);
@@ -292,7 +292,7 @@ int enable_snd_device(struct audio_device *adev,
    }

    const char * dev_path = platform_get_snd_device_name(snd_device);
    ALOGV("%s: snd_device(%d: %s)", __func__, snd_device, dev_path);
    ALOGD("%s: snd_device(%d: %s)", __func__, snd_device, dev_path);
    audio_route_apply_and_update_path(adev->audio_route, dev_path);

    return 0;
@@ -313,8 +313,7 @@ int disable_snd_device(struct audio_device *adev,
    adev->snd_dev_ref_cnt[snd_device]--;
    if (adev->snd_dev_ref_cnt[snd_device] == 0) {
        const char * dev_path = platform_get_snd_device_name(snd_device);
        ALOGV("%s: snd_device(%d: %s)", __func__,
              snd_device, dev_path);
        ALOGD("%s: snd_device(%d: %s)", __func__, snd_device, dev_path);
        audio_route_reset_and_update_path(adev->audio_route, dev_path);
    }
    return 0;
+1 −1
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ const char *platform_get_snd_device_name(snd_device_t snd_device)
    if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX)
        return device_table[snd_device];
    else
        return "";
        return "none";
}

void platform_add_backend_name(void *platform __unused, char *mixer_path,
+1 −1
Original line number Diff line number Diff line
@@ -794,7 +794,7 @@ const char *platform_get_snd_device_name(snd_device_t snd_device)
    if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX)
        return device_table[snd_device];
    else
        return "";
        return "none";
}

void platform_add_backend_name(void *platform, char *mixer_path,