Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef XONAR_H_INCLUDED
0003 #define XONAR_H_INCLUDED
0004 
0005 #include "oxygen.h"
0006 
0007 struct xonar_generic {
0008     unsigned int anti_pop_delay;
0009     u16 output_enable_bit;
0010     u8 ext_power_reg;
0011     u8 ext_power_int_reg;
0012     u8 ext_power_bit;
0013     u8 has_power;
0014 };
0015 
0016 struct xonar_hdmi {
0017     u8 params[5];
0018 };
0019 
0020 /* generic helper functions */
0021 
0022 void xonar_enable_output(struct oxygen *chip);
0023 void xonar_disable_output(struct oxygen *chip);
0024 void xonar_init_ext_power(struct oxygen *chip);
0025 void xonar_init_cs53x1(struct oxygen *chip);
0026 void xonar_set_cs53x1_params(struct oxygen *chip,
0027                  struct snd_pcm_hw_params *params);
0028 
0029 #define XONAR_GPIO_BIT_INVERT   (1 << 16)
0030 int xonar_gpio_bit_switch_get(struct snd_kcontrol *ctl,
0031                   struct snd_ctl_elem_value *value);
0032 int xonar_gpio_bit_switch_put(struct snd_kcontrol *ctl,
0033                   struct snd_ctl_elem_value *value);
0034 
0035 /* model-specific card drivers */
0036 
0037 int get_xonar_pcm179x_model(struct oxygen *chip,
0038                 const struct pci_device_id *id);
0039 int get_xonar_cs43xx_model(struct oxygen *chip,
0040                const struct pci_device_id *id);
0041 int get_xonar_wm87x6_model(struct oxygen *chip,
0042                const struct pci_device_id *id);
0043 
0044 /* HDMI helper functions */
0045 
0046 void xonar_hdmi_init(struct oxygen *chip, struct xonar_hdmi *data);
0047 void xonar_hdmi_cleanup(struct oxygen *chip);
0048 void xonar_hdmi_resume(struct oxygen *chip, struct xonar_hdmi *hdmi);
0049 void xonar_hdmi_pcm_hardware_filter(unsigned int channel,
0050                     struct snd_pcm_hardware *hardware);
0051 void xonar_set_hdmi_params(struct oxygen *chip, struct xonar_hdmi *hdmi,
0052                struct snd_pcm_hw_params *params);
0053 void xonar_hdmi_uart_input(struct oxygen *chip);
0054 
0055 #endif