Files
android_kernel_samsung_sm86…/qcom/opensource/audio-kernel/include/soc/snd_event.h
David Wronek 91a8910061 Add 'qcom/opensource/audio-kernel/' from commit '0ee387dfadf349618494d6f82ec8cec796ebef70'
git-subtree-dir: qcom/opensource/audio-kernel
git-subtree-mainline: 99ab089c55
git-subtree-split: 0ee387dfad
Change-Id:
repo: https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/audio-kernel-ar
tag: AUDIO.LA.9.0.r1-07400-lanai.0
2024-10-06 16:43:49 +02:00

80 linhas
1.9 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
*/
#ifndef _SND_EVENT_H_
#define _SND_EVENT_H_
enum {
SND_EVENT_DOWN = 0,
SND_EVENT_UP,
};
struct snd_event_clients;
struct snd_event_ops {
int (*enable)(struct device *dev, void *data);
void (*disable)(struct device *dev, void *data);
};
#ifdef CONFIG_SND_EVENT
int snd_event_client_register(struct device *dev,
const struct snd_event_ops *snd_ev_ops,
void *data);
int snd_event_client_deregister(struct device *dev);
int snd_event_master_register(struct device *dev,
const struct snd_event_ops *ops,
struct snd_event_clients *clients,
void *data);
int snd_event_master_deregister(struct device *dev);
int snd_event_notify(struct device *dev, unsigned int state);
void snd_event_mstr_add_client(struct snd_event_clients **snd_clients,
int (*compare)(struct device *, void *),
void *data);
static inline bool is_snd_event_fwk_enabled(void)
{
return 1;
}
#else
static inline int snd_event_client_register(struct device *dev,
const struct snd_event_ops *snd_ev_ops,
void *data)
{
return 0;
}
static inline int snd_event_client_deregister(struct device *dev)
{
return 0;
}
static inline int snd_event_master_register(struct device *dev,
const struct snd_event_ops *ops,
struct snd_event_clients *clients,
void *data)
{
return 0;
}
static inline int snd_event_master_deregister(struct device *dev)
{
return 0;
}
static inline int snd_event_notify(struct device *dev, unsigned int state)
{
return 0;
}
static inline void snd_event_mstr_add_client(struct snd_event_clients **snd_clients,
int (*compare)(struct device *, void *),
void *data)
{
return;
}
static inline bool is_snd_event_fwk_enabled(void)
{
return 0;
}
#endif /* CONFIG_SND_EVENT */
#endif /* _SND_EVENT_H_ */