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

Commit 56087531 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: add support for pcm_ioctl() api"

parents b155e508 07972cc5
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2913,6 +2913,19 @@ static int adev_open(const hw_module_t *module, const char *name,
    return 0;
}

int pcm_ioctl(struct pcm *pcm, int request, ...)
{
    va_list ap;
    void * arg;
    int pcm_fd = *(int*)pcm;

    va_start(ap, request);
    arg = va_arg(ap, void *);
    va_end(ap);

    return ioctl(pcm_fd, request, arg);
}

static struct hw_module_methods_t hal_module_methods = {
    .open = adev_open,
};
+2 −0
Original line number Diff line number Diff line
@@ -299,6 +299,8 @@ struct audio_usecase *get_usecase_from_list(struct audio_device *adev,

bool is_offload_usecase(audio_usecase_t uc_id);

int pcm_ioctl(struct pcm *pcm, int request, ...);

#define LITERAL_TO_STRING(x) #x
#define CHECK(condition) LOG_ALWAYS_FATAL_IF(!(condition), "%s",\
            __FILE__ ":" LITERAL_TO_STRING(__LINE__)\