linux/sound/soc/codecs/tlv320aic26.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Texas Instruments TLV320AIC26 low power audio CODEC
 * ALSA SoC CODEC driver
 *
 * Copyright (C) 2008 Secret Lab Technologies Ltd.
 */

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>

#include "tlv320aic26.h"

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

/* AIC26 driver private data */
struct aic26 {};

static const struct snd_soc_dapm_widget tlv320aic26_dapm_widgets[] =;

static const struct snd_soc_dapm_route tlv320aic26_dapm_routes[] =;

/* ---------------------------------------------------------------------
 * Digital Audio Interface Operations
 */
static int aic26_hw_params(struct snd_pcm_substream *substream,
			   struct snd_pcm_hw_params *params,
			   struct snd_soc_dai *dai)
{}

/*
 * aic26_mute - Mute control to reduce noise when changing audio format
 */
static int aic26_mute(struct snd_soc_dai *dai, int mute, int direction)
{}

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

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

/* ---------------------------------------------------------------------
 * Digital Audio Interface Definition
 */
#define AIC26_RATES
#define AIC26_FORMATS

static const struct snd_soc_dai_ops aic26_dai_ops =;

static struct snd_soc_dai_driver aic26_dai =;

/* ---------------------------------------------------------------------
 * ALSA controls
 */
static const char *aic26_capture_src_text[] =;
static SOC_ENUM_SINGLE_DECL(aic26_capture_src_enum,
			    AIC26_REG_AUDIO_CTRL1, 12,
			    aic26_capture_src_text);

static const struct snd_kcontrol_new aic26_snd_controls[] =;

/* ---------------------------------------------------------------------
 * SPI device portion of driver: sysfs files for debugging
 */

static ssize_t keyclick_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}

/* Any write to the keyclick attribute will trigger the keyclick event */
static ssize_t keyclick_store(struct device *dev,
			      struct device_attribute *attr,
			      const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(keyclick);

/* ---------------------------------------------------------------------
 * SoC CODEC portion of driver: probe and release routines
 */
static int aic26_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver aic26_soc_component_dev =;

static const struct regmap_config aic26_regmap =;

/* ---------------------------------------------------------------------
 * SPI device portion of driver: probe and release routines and SPI
 * 				 driver registration.
 */
static int aic26_spi_probe(struct spi_device *spi)
{}

static struct spi_driver aic26_spi =;

module_spi_driver();