linux/sound/soc/codecs/wm9090.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * ALSA SoC WM9090 driver
 *
 * Copyright 2009-12 Wolfson Microelectronics
 *
 * Author: Mark Brown <[email protected]>
 */

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/initval.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <sound/wm9090.h>

#include "wm9090.h"

static const struct reg_default wm9090_reg_defaults[] =;

/* This struct is used to save the context */
struct wm9090_priv {};

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

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

static void wait_for_dc_servo(struct snd_soc_component *component)
{}

static const DECLARE_TLV_DB_RANGE(in_tlv,
	0, 0, TLV_DB_SCALE_ITEM(-600, 0, 0),
	1, 3, TLV_DB_SCALE_ITEM(-350, 350, 0),
	4, 6, TLV_DB_SCALE_ITEM(600, 600, 0)
);
static const DECLARE_TLV_DB_RANGE(mix_tlv,
	0, 2, TLV_DB_SCALE_ITEM(-1200, 300, 0),
	3, 3, TLV_DB_SCALE_ITEM(0, 0, 0)
);
static const DECLARE_TLV_DB_SCALE(out_tlv, -5700, 100, 0);
static const DECLARE_TLV_DB_RANGE(spkboost_tlv,
	0, 6, TLV_DB_SCALE_ITEM(0, 150, 0),
	7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0)
);

static const struct snd_kcontrol_new wm9090_controls[] =;

static const struct snd_kcontrol_new wm9090_in1_se_controls[] =;

static const struct snd_kcontrol_new wm9090_in2_se_controls[] =;

static int hp_ev(struct snd_soc_dapm_widget *w,
		 struct snd_kcontrol *kcontrol, int event)
{}

static const struct snd_kcontrol_new spkmix[] =;

static const struct snd_kcontrol_new spkout[] =;

static const struct snd_kcontrol_new mixoutl[] =;

static const struct snd_kcontrol_new mixoutr[] =;

static const struct snd_soc_dapm_widget wm9090_dapm_widgets[] =;

static const struct snd_soc_dapm_route audio_map[] =;

static const struct snd_soc_dapm_route audio_map_in1_se[] =;

static const struct snd_soc_dapm_route audio_map_in1_diff[] =;

static const struct snd_soc_dapm_route audio_map_in2_se[] =;

static const struct snd_soc_dapm_route audio_map_in2_diff[] =;

static int wm9090_add_controls(struct snd_soc_component *component)
{}

/*
 * The machine driver should call this from their set_bias_level; if there
 * isn't one then this can just be set as the set_bias_level function.
 */
static int wm9090_set_bias_level(struct snd_soc_component *component,
				 enum snd_soc_bias_level level)
{}

static int wm9090_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_wm9090 =;

static const struct regmap_config wm9090_regmap =;


static int wm9090_i2c_probe(struct i2c_client *i2c)
{}

static const struct i2c_device_id wm9090_id[] =;
MODULE_DEVICE_TABLE(i2c, wm9090_id);

static struct i2c_driver wm9090_i2c_driver =;

module_i2c_driver();

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