dsp: add audio event notifier support

Add support for audio event notifier framework to
send/receive events across audio drivers.

CRs-Fixed: 2244131
Change-Id: I1e36703a91625cd52333596d66dc21a0e8876738
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
This commit is contained in:
Vidyakumar Athota
2018-03-01 13:38:39 -08:00
committed by Gerrit - the friendly Code Review server
parent 45e64b92bb
commit f1cba4d4b2
3 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef __MSM_AUDIO_EVENT_NOTIFY_H_
#define __MSM_AUDIO_EVENT_NOTIFY_H_
#include <linux/notifier.h>
#if IS_ENABLED(CONFIG_SND_SOC_MSM_QDSP6V2_INTF)
int msm_aud_evt_register_client(struct notifier_block *nb);
int msm_aud_evt_unregister_client(struct notifier_block *nb);
int msm_aud_evt_notifier_call_chain(unsigned long val, void *v);
#else
static inline int msm_aud_evt_register_client(struct notifier_block *nb)
{
return -ENOSYS;
}
static inline int msm_aud_evt_unregister_client(struct notifier_block *nb)
{
return -ENOSYS;
}
static inline int msm_aud_evt_notifier_call_chain(unsigned long val, void *v)
{
return -ENOSYS;
}
#endif
enum {
MSM_AUD_DC_EVENT = 1,
};
#endif