linux/sound/pci/hda/patch_cs8409.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * HD audio interface patch for Cirrus Logic CS8409 HDA bridge chip
 *
 * Copyright (C) 2021 Cirrus Logic, Inc. and
 *                    Cirrus Logic International Semiconductor Ltd.
 */

#ifndef __CS8409_PATCH_H
#define __CS8409_PATCH_H

#include <linux/pci.h>
#include <sound/tlv.h>
#include <linux/workqueue.h>
#include <sound/cs42l42.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_auto_parser.h"
#include "hda_jack.h"
#include "hda_generic.h"

/* CS8409 Specific Definitions */

enum cs8409_pins {};

enum cs8409_coefficient_index_registers {};

/* CS42L42 Specific Definitions */

#define CS8409_MAX_CODECS
#define CS42L42_VOLUMES
#define CS42L42_HP_VOL_REAL_MIN
#define CS42L42_HP_VOL_REAL_MAX
#define CS42L42_AMIC_VOL_REAL_MIN
#define CS42L42_AMIC_VOL_REAL_MAX
#define CS42L42_REG_AMIC_VOL_MASK
#define CS42L42_HSTYPE_MASK
#define CS42L42_I2C_TIMEOUT_US
#define CS42L42_I2C_SLEEP_US
#define CS42L42_PDN_TIMEOUT_US
#define CS42L42_PDN_SLEEP_US
#define CS42L42_INIT_TIMEOUT_MS
#define CS42L42_FULL_SCALE_VOL_MASK
#define CS42L42_FULL_SCALE_VOL_0DB
#define CS42L42_FULL_SCALE_VOL_MINUS6DB

/* Dell BULLSEYE / WARLOCK / CYBORG Specific Definitions */

#define CS42L42_I2C_ADDR
#define CS8409_CS42L42_RESET
#define CS8409_CS42L42_INT
#define CS8409_CYBORG_SPEAKER_PDN
#define CS8409_WARLOCK_SPEAKER_PDN
#define CS8409_CS42L42_HP_PIN_NID
#define CS8409_CS42L42_SPK_PIN_NID
#define CS8409_CS42L42_AMIC_PIN_NID
#define CS8409_CS42L42_DMIC_PIN_NID
#define CS8409_CS42L42_DMIC_ADC_PIN_NID

/* Dolphin */

#define DOLPHIN_C0_I2C_ADDR
#define DOLPHIN_C1_I2C_ADDR
#define DOLPHIN_HP_PIN_NID
#define DOLPHIN_LO_PIN_NID
#define DOLPHIN_AMIC_PIN_NID

#define DOLPHIN_C0_INT
#define DOLPHIN_C1_INT
#define DOLPHIN_C0_RESET
#define DOLPHIN_C1_RESET
#define DOLPHIN_WAKE

enum {};

enum {};

enum {};

#define CS42L42_ADC_VOL_OFFSET
#define CS42L42_DAC_CH0_VOL_OFFSET
#define CS42L42_DAC_CH1_VOL_OFFSET

struct cs8409_i2c_param {};

struct cs8409_cir_param {};

struct sub_codec {};

struct cs8409_spec {};

extern const struct snd_kcontrol_new cs42l42_dac_volume_mixer;
extern const struct snd_kcontrol_new cs42l42_adc_volume_mixer;

int cs42l42_volume_info(struct snd_kcontrol *kctrl, struct snd_ctl_elem_info *uinfo);
int cs42l42_volume_get(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uctrl);
int cs42l42_volume_put(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uctrl);

extern const struct hda_pcm_stream cs42l42_48k_pcm_analog_playback;
extern const struct hda_pcm_stream cs42l42_48k_pcm_analog_capture;
extern const struct snd_pci_quirk cs8409_fixup_tbl[];
extern const struct hda_model_fixup cs8409_models[];
extern const struct hda_fixup cs8409_fixups[];
extern const struct hda_verb cs8409_cs42l42_init_verbs[];
extern const struct cs8409_cir_param cs8409_cs42l42_hw_cfg[];
extern const struct cs8409_cir_param cs8409_cs42l42_bullseye_atn[];
extern struct sub_codec cs8409_cs42l42_codec;

extern const struct hda_verb dolphin_init_verbs[];
extern const struct cs8409_cir_param dolphin_hw_cfg[];
extern struct sub_codec dolphin_cs42l42_0;
extern struct sub_codec dolphin_cs42l42_1;

void cs8409_cs42l42_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int action);
void dolphin_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int action);

#endif