wsa884x.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #ifndef _WSA884X_H
  6. #define _WSA884X_H
  7. #include <linux/regmap.h>
  8. #include <sound/soc.h>
  9. #include <sound/info.h>
  10. #include "wsa884x-reg-masks.h"
  11. #include "wsa884x-reg-shifts.h"
  12. #define WSA884X_MAX_SWR_PORTS 6
  13. #if IS_ENABLED(CONFIG_SND_SOC_WSA884X)
  14. int wsa884x_set_channel_map(struct snd_soc_component *component,
  15. u8 *port, u8 num_port, unsigned int *ch_mask,
  16. unsigned int *ch_rate, u8 *port_type);
  17. int wsa884x_codec_info_create_codec_entry(
  18. struct snd_info_entry *codec_root,
  19. struct snd_soc_component *component);
  20. int wsa884x_codec_get_dev_num(struct snd_soc_component *component);
  21. #else
  22. static int wsa884x_set_channel_map(struct snd_soc_component *component,
  23. u8 *port, u8 num_port, unsigned int *ch_mask,
  24. unsigned int *ch_rate, u8 *port_type)
  25. {
  26. return 0;
  27. }
  28. static int wsa884x_codec_info_create_codec_entry(
  29. struct snd_info_entry *codec_root,
  30. struct snd_soc_component *component)
  31. {
  32. return 0;
  33. }
  34. static int wsa884x_codec_get_dev_num(struct snd_soc_component *component)
  35. {
  36. return 0;
  37. }
  38. #endif
  39. #endif /* _WSA884X_H */