162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef XONAR_H_INCLUDED 362306a36Sopenharmony_ci#define XONAR_H_INCLUDED 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include "oxygen.h" 662306a36Sopenharmony_ci 762306a36Sopenharmony_cistruct xonar_generic { 862306a36Sopenharmony_ci unsigned int anti_pop_delay; 962306a36Sopenharmony_ci u16 output_enable_bit; 1062306a36Sopenharmony_ci u8 ext_power_reg; 1162306a36Sopenharmony_ci u8 ext_power_int_reg; 1262306a36Sopenharmony_ci u8 ext_power_bit; 1362306a36Sopenharmony_ci u8 has_power; 1462306a36Sopenharmony_ci}; 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_cistruct xonar_hdmi { 1762306a36Sopenharmony_ci u8 params[5]; 1862306a36Sopenharmony_ci}; 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci/* generic helper functions */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_civoid xonar_enable_output(struct oxygen *chip); 2362306a36Sopenharmony_civoid xonar_disable_output(struct oxygen *chip); 2462306a36Sopenharmony_civoid xonar_init_ext_power(struct oxygen *chip); 2562306a36Sopenharmony_civoid xonar_init_cs53x1(struct oxygen *chip); 2662306a36Sopenharmony_civoid xonar_set_cs53x1_params(struct oxygen *chip, 2762306a36Sopenharmony_ci struct snd_pcm_hw_params *params); 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#define XONAR_GPIO_BIT_INVERT (1 << 16) 3062306a36Sopenharmony_ciint xonar_gpio_bit_switch_get(struct snd_kcontrol *ctl, 3162306a36Sopenharmony_ci struct snd_ctl_elem_value *value); 3262306a36Sopenharmony_ciint xonar_gpio_bit_switch_put(struct snd_kcontrol *ctl, 3362306a36Sopenharmony_ci struct snd_ctl_elem_value *value); 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci/* model-specific card drivers */ 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciint get_xonar_pcm179x_model(struct oxygen *chip, 3862306a36Sopenharmony_ci const struct pci_device_id *id); 3962306a36Sopenharmony_ciint get_xonar_cs43xx_model(struct oxygen *chip, 4062306a36Sopenharmony_ci const struct pci_device_id *id); 4162306a36Sopenharmony_ciint get_xonar_wm87x6_model(struct oxygen *chip, 4262306a36Sopenharmony_ci const struct pci_device_id *id); 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci/* HDMI helper functions */ 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_civoid xonar_hdmi_init(struct oxygen *chip, struct xonar_hdmi *data); 4762306a36Sopenharmony_civoid xonar_hdmi_cleanup(struct oxygen *chip); 4862306a36Sopenharmony_civoid xonar_hdmi_resume(struct oxygen *chip, struct xonar_hdmi *hdmi); 4962306a36Sopenharmony_civoid xonar_hdmi_pcm_hardware_filter(unsigned int channel, 5062306a36Sopenharmony_ci struct snd_pcm_hardware *hardware); 5162306a36Sopenharmony_civoid xonar_set_hdmi_params(struct oxygen *chip, struct xonar_hdmi *hdmi, 5262306a36Sopenharmony_ci struct snd_pcm_hw_params *params); 5362306a36Sopenharmony_civoid xonar_hdmi_uart_input(struct oxygen *chip); 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#endif 56