blob: 3e373880c1878eea64da61490b2b7af759e9cb0f [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Clemens Ladisch65c3ac82009-09-28 11:11:27 +02002#ifndef XONAR_H_INCLUDED
3#define XONAR_H_INCLUDED
4
5#include "oxygen.h"
6
7struct xonar_generic {
8 unsigned int anti_pop_delay;
9 u16 output_enable_bit;
10 u8 ext_power_reg;
11 u8 ext_power_int_reg;
12 u8 ext_power_bit;
13 u8 has_power;
14};
15
16struct xonar_hdmi {
17 u8 params[5];
18};
19
20/* generic helper functions */
21
22void xonar_enable_output(struct oxygen *chip);
23void xonar_disable_output(struct oxygen *chip);
24void xonar_init_ext_power(struct oxygen *chip);
25void xonar_init_cs53x1(struct oxygen *chip);
26void xonar_set_cs53x1_params(struct oxygen *chip,
27 struct snd_pcm_hw_params *params);
Clemens Ladisch2509ec62010-12-02 11:38:06 +010028
29#define XONAR_GPIO_BIT_INVERT (1 << 16)
Clemens Ladisch65c3ac82009-09-28 11:11:27 +020030int xonar_gpio_bit_switch_get(struct snd_kcontrol *ctl,
31 struct snd_ctl_elem_value *value);
32int xonar_gpio_bit_switch_put(struct snd_kcontrol *ctl,
33 struct snd_ctl_elem_value *value);
34
35/* model-specific card drivers */
36
37int get_xonar_pcm179x_model(struct oxygen *chip,
38 const struct pci_device_id *id);
39int get_xonar_cs43xx_model(struct oxygen *chip,
40 const struct pci_device_id *id);
Clemens Ladischd1db38c2010-01-18 15:44:04 +010041int get_xonar_wm87x6_model(struct oxygen *chip,
42 const struct pci_device_id *id);
Clemens Ladisch65c3ac82009-09-28 11:11:27 +020043
44/* HDMI helper functions */
45
46void xonar_hdmi_init(struct oxygen *chip, struct xonar_hdmi *data);
47void xonar_hdmi_cleanup(struct oxygen *chip);
48void xonar_hdmi_resume(struct oxygen *chip, struct xonar_hdmi *hdmi);
49void xonar_hdmi_pcm_hardware_filter(unsigned int channel,
50 struct snd_pcm_hardware *hardware);
51void xonar_set_hdmi_params(struct oxygen *chip, struct xonar_hdmi *hdmi,
52 struct snd_pcm_hw_params *params);
53void xonar_hdmi_uart_input(struct oxygen *chip);
54
55#endif