xonar.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef XONAR_H_INCLUDED
  3. #define XONAR_H_INCLUDED
  4. #include "oxygen.h"
  5. struct xonar_generic {
  6. unsigned int anti_pop_delay;
  7. u16 output_enable_bit;
  8. u8 ext_power_reg;
  9. u8 ext_power_int_reg;
  10. u8 ext_power_bit;
  11. u8 has_power;
  12. };
  13. struct xonar_hdmi {
  14. u8 params[5];
  15. };
  16. /* generic helper functions */
  17. void xonar_enable_output(struct oxygen *chip);
  18. void xonar_disable_output(struct oxygen *chip);
  19. void xonar_init_ext_power(struct oxygen *chip);
  20. void xonar_init_cs53x1(struct oxygen *chip);
  21. void xonar_set_cs53x1_params(struct oxygen *chip,
  22. struct snd_pcm_hw_params *params);
  23. #define XONAR_GPIO_BIT_INVERT (1 << 16)
  24. int xonar_gpio_bit_switch_get(struct snd_kcontrol *ctl,
  25. struct snd_ctl_elem_value *value);
  26. int xonar_gpio_bit_switch_put(struct snd_kcontrol *ctl,
  27. struct snd_ctl_elem_value *value);
  28. /* model-specific card drivers */
  29. int get_xonar_pcm179x_model(struct oxygen *chip,
  30. const struct pci_device_id *id);
  31. int get_xonar_cs43xx_model(struct oxygen *chip,
  32. const struct pci_device_id *id);
  33. int get_xonar_wm87x6_model(struct oxygen *chip,
  34. const struct pci_device_id *id);
  35. /* HDMI helper functions */
  36. void xonar_hdmi_init(struct oxygen *chip, struct xonar_hdmi *data);
  37. void xonar_hdmi_cleanup(struct oxygen *chip);
  38. void xonar_hdmi_resume(struct oxygen *chip, struct xonar_hdmi *hdmi);
  39. void xonar_hdmi_pcm_hardware_filter(unsigned int channel,
  40. struct snd_pcm_hardware *hardware);
  41. void xonar_set_hdmi_params(struct oxygen *chip, struct xonar_hdmi *hdmi,
  42. struct snd_pcm_hw_params *params);
  43. void xonar_hdmi_uart_input(struct oxygen *chip);
  44. #endif