/* param handle codec handle. param channel audio codec play channel, can be a value or combine value of _codec_play_channel. param volume volume value, support 0 ~ 100, 0 is mute, 100 is the maximum volume value. return kStatus_Success is success, else configure failed.  */
status_t HAL_CODEC_CS42888_SetVolume(void *handle, uint32_t playChannel, uint32_t volume)
/* param handle codec handle. param channel audio codec play channel, can be a value or combine value of _codec_play_channel. param volume volume value, support 0 ~ 100, 0 is mute, 100 is the maximum volume value. return kStatus_Success is success, else configure failed.  */
status_t HAL_CODEC_CS42888_SetVolume(void *handle, uint32_t playChannel, uint32_t volume)
{
    assert(handle != NULL);
    uint32_t i   = 0U;
    status_t ret = kStatus_Success;
    for (i = 0U; i < kCS42888_AOUT8; i++)
    {
        if ((playChannel & (1U << i)) == 0U)
        {
            continue;
        }
        ret = CS42888_SetAOUTVolume((cs42888_handle_t *)((uint32_t)(((codec_handle_t *)handle)->codecDevHandle)),
                                    i + 1U, volume);
        if (ret != kStatus_Success)
        {
            return ret;
        }
    }
    return kStatus_Success;
}