patch_cs8409.h (165b81c4ac3062d61e5422c85fcd55e8d0f805da) patch_cs8409.h (636eb9d26f29cd9e195a6bae783315284efa11da)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * HD audio interface patch for Cirrus Logic CS8409 HDA bridge chip
4 *
5 * Copyright (C) 2021 Cirrus Logic, Inc. and
6 * Cirrus Logic International Semiconductor Ltd.
7 */
8

--- 204 unchanged lines hidden (view full) ---

213 CS8409_LOOPBACK_CTRL = 0x80,
214 CS8409_PAD_CFG_SLW_RATE_CTRL = 0x82, /* Pad Config and Slew Rate Control (CIR = 0x0082) */
215};
216
217/* CS42L42 Specific Definitions */
218
219#define CS42L42_VOLUMES (4U)
220
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * HD audio interface patch for Cirrus Logic CS8409 HDA bridge chip
4 *
5 * Copyright (C) 2021 Cirrus Logic, Inc. and
6 * Cirrus Logic International Semiconductor Ltd.
7 */
8

--- 204 unchanged lines hidden (view full) ---

213 CS8409_LOOPBACK_CTRL = 0x80,
214 CS8409_PAD_CFG_SLW_RATE_CTRL = 0x82, /* Pad Config and Slew Rate Control (CIR = 0x0082) */
215};
216
217/* CS42L42 Specific Definitions */
218
219#define CS42L42_VOLUMES (4U)
220
221#define CS8409_CS42L42_HP_VOL_REAL_MIN (-63)
222#define CS8409_CS42L42_HP_VOL_REAL_MAX (0)
223#define CS8409_CS42L42_AMIC_VOL_REAL_MIN (-97)
224#define CS8409_CS42L42_AMIC_VOL_REAL_MAX (12)
225#define CS8409_CS42L42_REG_HS_VOL_CHA (0x2301)
226#define CS8409_CS42L42_REG_HS_VOL_CHB (0x2303)
227#define CS8409_CS42L42_REG_HS_VOL_MASK (0x003F)
228#define CS8409_CS42L42_REG_AMIC_VOL (0x1D03)
229#define CS8409_CS42L42_REG_AMIC_VOL_MASK (0x00FF)
221#define CS42L42_HP_VOL_REAL_MIN (-63)
222#define CS42L42_HP_VOL_REAL_MAX (0)
223#define CS42L42_AMIC_VOL_REAL_MIN (-97)
224#define CS42L42_AMIC_VOL_REAL_MAX (12)
225#define CS42L42_REG_HS_VOL_CHA (0x2301)
226#define CS42L42_REG_HS_VOL_CHB (0x2303)
227#define CS42L42_REG_HS_VOL_MASK (0x003F)
228#define CS42L42_REG_AMIC_VOL (0x1D03)
229#define CS42L42_REG_AMIC_VOL_MASK (0x00FF)
230#define CS42L42_HSDET_AUTO_DONE (0x02)
231#define CS42L42_HSTYPE_MASK (0x03)
232#define CS42L42_JACK_INSERTED (0x0C)
233#define CS42L42_JACK_REMOVED (0x00)
234
235/* Dell BULLSEYE / WARLOCK / CYBORG Specific Definitions */
236
237#define CS42L42_I2C_ADDR (0x48 << 1)

--- 53 unchanged lines hidden (view full) ---

291 /* verb exec op override */
292 int (*exec_verb)(struct hdac_device *dev, unsigned int cmd, unsigned int flags,
293 unsigned int *res);
294};
295
296extern const struct snd_kcontrol_new cs42l42_dac_volume_mixer;
297extern const struct snd_kcontrol_new cs42l42_adc_volume_mixer;
298
230#define CS42L42_HSDET_AUTO_DONE (0x02)
231#define CS42L42_HSTYPE_MASK (0x03)
232#define CS42L42_JACK_INSERTED (0x0C)
233#define CS42L42_JACK_REMOVED (0x00)
234
235/* Dell BULLSEYE / WARLOCK / CYBORG Specific Definitions */
236
237#define CS42L42_I2C_ADDR (0x48 << 1)

--- 53 unchanged lines hidden (view full) ---

291 /* verb exec op override */
292 int (*exec_verb)(struct hdac_device *dev, unsigned int cmd, unsigned int flags,
293 unsigned int *res);
294};
295
296extern const struct snd_kcontrol_new cs42l42_dac_volume_mixer;
297extern const struct snd_kcontrol_new cs42l42_adc_volume_mixer;
298
299int cs8409_cs42l42_volume_info(struct snd_kcontrol *kctrl, struct snd_ctl_elem_info *uinfo);
300int cs8409_cs42l42_volume_get(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uctrl);
301int cs8409_cs42l42_volume_put(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uctrl);
299int cs42l42_volume_info(struct snd_kcontrol *kctrl, struct snd_ctl_elem_info *uinfo);
300int cs42l42_volume_get(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uctrl);
301int cs42l42_volume_put(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uctrl);
302
303extern const struct snd_pci_quirk cs8409_fixup_tbl[];
304extern const struct hda_model_fixup cs8409_models[];
305extern const struct hda_fixup cs8409_fixups[];
306extern const struct hda_verb cs8409_cs42l42_init_verbs[];
307extern const struct hda_pintbl cs8409_cs42l42_pincfgs[];
308extern const struct cs8409_i2c_param cs42l42_init_reg_seq[CS42L42_INIT_REG_SEQ_SIZE];
309extern const struct cs8409_cir_param cs8409_cs42l42_hw_cfg[];
310extern const struct cs8409_cir_param cs8409_cs42l42_bullseye_atn[];
311
312void cs8409_cs42l42_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int action);
313
314#endif
302
303extern const struct snd_pci_quirk cs8409_fixup_tbl[];
304extern const struct hda_model_fixup cs8409_models[];
305extern const struct hda_fixup cs8409_fixups[];
306extern const struct hda_verb cs8409_cs42l42_init_verbs[];
307extern const struct hda_pintbl cs8409_cs42l42_pincfgs[];
308extern const struct cs8409_i2c_param cs42l42_init_reg_seq[CS42L42_INIT_REG_SEQ_SIZE];
309extern const struct cs8409_cir_param cs8409_cs42l42_hw_cfg[];
310extern const struct cs8409_cir_param cs8409_cs42l42_bullseye_atn[];
311
312void cs8409_cs42l42_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int action);
313
314#endif