linux/sound/soc/codecs/tas6424.c

// SPDX-License-Identifier: GPL-2.0
/*
 * ALSA SoC Texas Instruments TAS6424 Quad-Channel Audio Amplifier
 *
 * Copyright (C) 2016-2017 Texas Instruments Incorporated - https://www.ti.com/
 *	Author: Andreas Dannenberg <[email protected]>
 *	Andrew F. Davis <[email protected]>
 */

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/regulator/consumer.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>

#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>

#include "tas6424.h"

/* Define how often to check (and clear) the fault status register (in ms) */
#define TAS6424_FAULT_CHECK_INTERVAL

static const char * const tas6424_supply_names[] =;
#define TAS6424_NUM_SUPPLIES

struct tas6424_data {};

/*
 * DAC digital volumes. From -103.5 to 24 dB in 0.5 dB steps. Note that
 * setting the gain below -100 dB (register value <0x7) is effectively a MUTE
 * as per device datasheet.
 */
static DECLARE_TLV_DB_SCALE(dac_tlv, -10350, 50, 0);

static const struct snd_kcontrol_new tas6424_snd_controls[] =;

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

static const struct snd_soc_dapm_widget tas6424_dapm_widgets[] =;

static const struct snd_soc_dapm_route tas6424_audio_map[] =;

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

static int tas6424_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{}

static int tas6424_set_dai_tdm_slot(struct snd_soc_dai *dai,
				    unsigned int tx_mask, unsigned int rx_mask,
				    int slots, int slot_width)
{}

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

static int tas6424_power_off(struct snd_soc_component *component)
{}

static int tas6424_power_on(struct snd_soc_component *component)
{}

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

static struct snd_soc_component_driver soc_codec_dev_tas6424 =;

static const struct snd_soc_dai_ops tas6424_speaker_dai_ops =;

static struct snd_soc_dai_driver tas6424_dai[] =;

static void tas6424_fault_check_work(struct work_struct *work)
{}

static const struct reg_default tas6424_reg_defaults[] =;

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

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

static const struct regmap_config tas6424_regmap_config =;

#if IS_ENABLED(CONFIG_OF)
static const struct of_device_id tas6424_of_ids[] =;
MODULE_DEVICE_TABLE(of, tas6424_of_ids);
#endif

static int tas6424_i2c_probe(struct i2c_client *client)
{}

static void tas6424_i2c_remove(struct i2c_client *client)
{}

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

static struct i2c_driver tas6424_i2c_driver =;
module_i2c_driver();

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