wsa881x.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
  3. */
  4. #ifndef _WSA881X_H
  5. #define _WSA881X_H
  6. #include <linux/regmap.h>
  7. #include <sound/soc.h>
  8. #include <sound/info.h>
  9. #include "wsa881x-registers.h"
  10. #define WSA881X_MAX_SWR_PORTS 4
  11. #if IS_ENABLED(CONFIG_SND_SOC_WSA881X)
  12. extern int wsa881x_set_channel_map(struct snd_soc_component *component,
  13. u8 *port, u8 num_port, unsigned int *ch_mask,
  14. unsigned int *ch_rate, u8 *port_type);
  15. extern const u8 wsa881x_reg_readable[WSA881X_CACHE_SIZE];
  16. extern struct regmap_config wsa881x_regmap_config;
  17. extern int wsa881x_codec_info_create_codec_entry(
  18. struct snd_info_entry *codec_root,
  19. struct snd_soc_component *component);
  20. void wsa881x_regmap_defaults(struct regmap *regmap, u8 version);
  21. #else
  22. extern int wsa881x_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. extern int wsa881x_codec_info_create_codec_entry(
  29. struct snd_info_entry *codec_root,
  30. struct snd_soc_component *component)
  31. {
  32. return 0;
  33. }
  34. void wsa881x_regmap_defaults(struct regmap *regmap, u8 version)
  35. {
  36. }
  37. #endif
  38. #endif /* _WSA881X_H */