xonar.h 1.6 KB

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