msm-audio-event-notify.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Copyright (c) 2018, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #ifndef __MSM_AUDIO_EVENT_NOTIFY_H_
  14. #define __MSM_AUDIO_EVENT_NOTIFY_H_
  15. #include <linux/notifier.h>
  16. #if IS_ENABLED(CONFIG_SND_SOC_MSM_QDSP6V2_INTF)
  17. int msm_aud_evt_register_client(struct notifier_block *nb);
  18. int msm_aud_evt_unregister_client(struct notifier_block *nb);
  19. int msm_aud_evt_notifier_call_chain(unsigned long val, void *v);
  20. int msm_aud_evt_blocking_register_client(struct notifier_block *nb);
  21. int msm_aud_evt_blocking_unregister_client(struct notifier_block *nb);
  22. int msm_aud_evt_blocking_notifier_call_chain(unsigned long val, void *v);
  23. #else
  24. static inline int msm_aud_evt_register_client(struct notifier_block *nb)
  25. {
  26. return -ENOSYS;
  27. }
  28. static inline int msm_aud_evt_unregister_client(struct notifier_block *nb)
  29. {
  30. return -ENOSYS;
  31. }
  32. static inline int msm_aud_evt_notifier_call_chain(unsigned long val, void *v)
  33. {
  34. return -ENOSYS;
  35. }
  36. static inline int msm_aud_evt_blocking_register_client(
  37. struct notifier_block *nb)
  38. {
  39. return -ENOSYS;
  40. }
  41. static inline int msm_aud_evt_blocking_unregister_client(
  42. struct notifier_block *nb)
  43. {
  44. return -ENOSYS;
  45. }
  46. static inline int msm_aud_evt_blocking_notifier_call_chain(
  47. unsigned long val, void *v)
  48. {
  49. return -ENOSYS;
  50. }
  51. #endif
  52. enum {
  53. MSM_AUD_DC_EVENT = 1,
  54. SWR_WAKE_IRQ_REGISTER,
  55. SWR_WAKE_IRQ_DEREGISTER,
  56. SWR_WAKE_IRQ_EVENT,
  57. };
  58. #endif