linux/sound/soc/codecs/cs42xx8.c

/*
 * Cirrus Logic CS42448/CS42888 Audio CODEC Digital Audio Interface (DAI) driver
 *
 * Copyright (C) 2014 Freescale Semiconductor, Inc.
 *
 * Author: Nicolin Chen <[email protected]>
 *
 * This file is licensed under the terms of the GNU General Public License
 * version 2. This program is licensed "as is" without any warranty of any
 * kind, whether express or implied.
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/gpio/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>

#include "cs42xx8.h"

#define CS42XX8_NUM_SUPPLIES
static const char *const cs42xx8_supply_names[CS42XX8_NUM_SUPPLIES] =;

#define CS42XX8_FORMATS

/* codec private data */
struct cs42xx8_priv {};

/* -127.5dB to 0dB with step of 0.5dB */
static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
/* -64dB to 24dB with step of 0.5dB */
static const DECLARE_TLV_DB_SCALE(adc_tlv, -6400, 50, 0);

static const char *const cs42xx8_adc_single[] =;
static const char *const cs42xx8_szc[] =;

static const struct soc_enum adc1_single_enum =;
static const struct soc_enum adc2_single_enum =;
static const struct soc_enum adc3_single_enum =;
static const struct soc_enum dac_szc_enum =;
static const struct soc_enum adc_szc_enum =;

static const struct snd_kcontrol_new cs42xx8_snd_controls[] =;

static const struct snd_kcontrol_new cs42xx8_adc3_snd_controls[] =;

static const struct snd_soc_dapm_widget cs42xx8_dapm_widgets[] =;

static const struct snd_soc_dapm_widget cs42xx8_adc3_dapm_widgets[] =;

static const struct snd_soc_dapm_route cs42xx8_dapm_routes[] =;

static const struct snd_soc_dapm_route cs42xx8_adc3_dapm_routes[] =;

struct cs42xx8_ratios {};

/*
 * According to reference mannual, define the cs42xx8_ratio struct
 * MFreq2 | MFreq1 | MFreq0 |     Description     | SSM | DSM | QSM |
 * 0      | 0      | 0      |1.029MHz to 12.8MHz  | 256 | 128 |  64 |
 * 0      | 0      | 1      |1.536MHz to 19.2MHz  | 384 | 192 |  96 |
 * 0      | 1      | 0      |2.048MHz to 25.6MHz  | 512 | 256 | 128 |
 * 0      | 1      | 1      |3.072MHz to 38.4MHz  | 768 | 384 | 192 |
 * 1      | x      | x      |4.096MHz to 51.2MHz  |1024 | 512 | 256 |
 */
static const struct cs42xx8_ratios cs42xx8_ratios[] =;

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

static int cs42xx8_set_dai_fmt(struct snd_soc_dai *codec_dai,
			       unsigned int format)
{}

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

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

static int cs42xx8_mute(struct snd_soc_dai *dai, int mute, int direction)
{}

static const struct snd_soc_dai_ops cs42xx8_dai_ops =;

static struct snd_soc_dai_driver cs42xx8_dai =;

static const struct reg_default cs42xx8_reg[] =;

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

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

const struct regmap_config cs42xx8_regmap_config =;
EXPORT_SYMBOL_GPL();

static int cs42xx8_component_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver cs42xx8_driver =;

const struct cs42xx8_driver_data cs42448_data =;
EXPORT_SYMBOL_GPL();

const struct cs42xx8_driver_data cs42888_data =;
EXPORT_SYMBOL_GPL();

int cs42xx8_probe(struct device *dev, struct regmap *regmap, struct cs42xx8_driver_data *drvdata)
{}
EXPORT_SYMBOL_GPL();

#ifdef CONFIG_PM
static int cs42xx8_runtime_resume(struct device *dev)
{}

static int cs42xx8_runtime_suspend(struct device *dev)
{}
#endif

const struct dev_pm_ops cs42xx8_pm =;
EXPORT_SYMBOL_GPL();

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