linux/sound/soc/codecs/wm9712.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * wm9712.c  --  ALSA Soc WM9712 codec support
 *
 * Copyright 2006-12 Wolfson Microelectronics PLC.
 * Author: Liam Girdwood <[email protected]>
 */

#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mfd/wm97xx.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/ac97_codec.h>
#include <sound/ac97/codec.h>
#include <sound/ac97/compat.h>
#include <sound/initval.h>
#include <sound/soc.h>
#include <sound/tlv.h>

#define WM9712_VENDOR_ID
#define WM9712_VENDOR_ID_MASK

struct wm9712_priv {};

static const struct reg_default wm9712_reg_defaults[] =;

static bool wm9712_volatile_reg(struct device *dev, unsigned int reg)
{}

static const struct regmap_config wm9712_regmap_config =;

#define HPL_MIXER
#define HPR_MIXER

static const char *wm9712_alc_select[] =;
static const char *wm9712_alc_mux[] =;
static const char *wm9712_out3_src[] =;
static const char *wm9712_spk_src[] =;
static const char *wm9712_rec_adc[] =;
static const char *wm9712_base[] =;
static const char *wm9712_rec_gain[] =;
static const char *wm9712_mic[] =;
static const char *wm9712_rec_sel[] =;
static const char *wm9712_ng_type[] =;
static const char *wm9712_diff_sel[] =;

static const DECLARE_TLV_DB_SCALE(main_tlv, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(boost_tlv, 0, 2000, 0);

static const struct soc_enum wm9712_enum[] =;

static const struct snd_kcontrol_new wm9712_snd_ac97_controls[] =;

static const unsigned int wm9712_mixer_mute_regs[] =;

/* We have to create a fake left and right HP mixers because
 * the codec only has a single control that is shared by both channels.
 * This makes it impossible to determine the audio path.
 */
static int wm9712_hp_mixer_put(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{}

static int wm9712_hp_mixer_get(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{}

#define WM9712_HP_MIXER_CTRL(xname, xmixer, xshift)

/* Left Headphone Mixers */
static const struct snd_kcontrol_new wm9712_hpl_mixer_controls[] =;

/* Right Headphone Mixers */
static const struct snd_kcontrol_new wm9712_hpr_mixer_controls[] =;

/* Speaker Mixer */
static const struct snd_kcontrol_new wm9712_speaker_mixer_controls[] =;

/* Phone Mixer */
static const struct snd_kcontrol_new wm9712_phone_mixer_controls[] =;

/* ALC headphone mux */
static const struct snd_kcontrol_new wm9712_alc_mux_controls =;

/* out 3 mux */
static const struct snd_kcontrol_new wm9712_out3_mux_controls =;

/* spk mux */
static const struct snd_kcontrol_new wm9712_spk_mux_controls =;

/* Capture to Phone mux */
static const struct snd_kcontrol_new wm9712_capture_phone_mux_controls =;

/* Capture left select */
static const struct snd_kcontrol_new wm9712_capture_selectl_controls =;

/* Capture right select */
static const struct snd_kcontrol_new wm9712_capture_selectr_controls =;

/* Mic select */
static const struct snd_kcontrol_new wm9712_mic_src_controls =;

/* diff select */
static const struct snd_kcontrol_new wm9712_diff_sel_controls =;

static const struct snd_soc_dapm_widget wm9712_dapm_widgets[] =;

static const struct snd_soc_dapm_route wm9712_audio_map[] =;

static int ac97_prepare(struct snd_pcm_substream *substream,
			struct snd_soc_dai *dai)
{}

static int ac97_aux_prepare(struct snd_pcm_substream *substream,
			    struct snd_soc_dai *dai)
{}

#define WM9712_AC97_RATES

static const struct snd_soc_dai_ops wm9712_dai_ops_hifi =;

static const struct snd_soc_dai_ops wm9712_dai_ops_aux =;

static struct snd_soc_dai_driver wm9712_dai[] =;

static int wm9712_set_bias_level(struct snd_soc_component *component,
				 enum snd_soc_bias_level level)
{}

static int wm9712_soc_resume(struct snd_soc_component *component)
{}

static int wm9712_soc_probe(struct snd_soc_component *component)
{}

static void wm9712_soc_remove(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_wm9712 =;

static int wm9712_probe(struct platform_device *pdev)
{}

static struct platform_driver wm9712_component_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();