linux/sound/soc/codecs/max9850.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * max9850.c  --  codec driver for max9850
 *
 * Copyright (C) 2011 taskit GmbH
 *
 * Author: Christian Glindkamp <[email protected]>
 *
 * Initial development of this code was funded by
 * MICRONIC Computer Systeme GmbH, https://www.mcsberlin.de/
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>

#include "max9850.h"

struct max9850_priv {};

/* these registers are not used at the moment but provided for the sake of
 * completeness */
static bool max9850_volatile_register(struct device *dev, unsigned int reg)
{}

static const struct regmap_config max9850_regmap =;

static const DECLARE_TLV_DB_RANGE(max9850_tlv,
	0x18, 0x1f, TLV_DB_SCALE_ITEM(-7450, 400, 0),
	0x20, 0x33, TLV_DB_SCALE_ITEM(-4150, 200, 0),
	0x34, 0x37, TLV_DB_SCALE_ITEM(-150, 100, 0),
	0x38, 0x3f, TLV_DB_SCALE_ITEM(250, 50, 0)
);

static const struct snd_kcontrol_new max9850_controls[] =;

static const struct snd_kcontrol_new max9850_mixer_controls[] =;

static const struct snd_soc_dapm_widget max9850_dapm_widgets[] =;

static const struct snd_soc_dapm_route max9850_dapm_routes[] =;

static int max9850_hw_params(struct snd_pcm_substream *substream,
			     struct snd_pcm_hw_params *params,
			     struct snd_soc_dai *dai)
{}

static int max9850_set_dai_sysclk(struct snd_soc_dai *codec_dai,
		int clk_id, unsigned int freq, int dir)
{}

static int max9850_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{}

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

#define MAX9850_RATES

#define MAX9850_FORMATS

static const struct snd_soc_dai_ops max9850_dai_ops =;

static struct snd_soc_dai_driver max9850_dai =;

static int max9850_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_max9850 =;

static int max9850_i2c_probe(struct i2c_client *i2c)
{}

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

static struct i2c_driver max9850_i2c_driver =;

module_i2c_driver();

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