linux/sound/soc/intel/boards/sof_realtek_common.c

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright(c) 2020 Intel Corporation

#include <linux/device.h>
#include <linux/kernel.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include <sound/soc-dai.h>
#include <sound/soc-dapm.h>
#include <sound/sof.h>
#include <uapi/sound/asound.h>
#include "../../codecs/rt1011.h"
#include "../../codecs/rt1015.h"
#include "../../codecs/rt1308.h"
#include "../common/soc-intel-quirks.h"
#include "sof_realtek_common.h"

/*
 * Common structures and functions
 */
static const struct snd_kcontrol_new realtek_2spk_kcontrols[] =;

static const struct snd_soc_dapm_widget realtek_2spk_widgets[] =;

static const struct snd_kcontrol_new realtek_4spk_kcontrols[] =;

static const struct snd_soc_dapm_widget realtek_4spk_widgets[] =;

/* helper function to get the number of specific codec */
static unsigned int get_num_codecs(const char *hid)
{}

/*
 * Realtek ALC1011
 */
static const struct snd_soc_dapm_route speaker_map_lr[] =;

static const struct snd_soc_dapm_route rt1011_4spk_routes[] =;

static struct snd_soc_codec_conf rt1011_2spk_codec_confs[] =;

static struct snd_soc_codec_conf rt1011_4spk_codec_confs[] =;

static struct snd_soc_dai_link_component rt1011_dai_link_components[] =;

static const struct {} rt1011_tdm_mask[] =;

static int rt1011_hw_params(struct snd_pcm_substream *substream,
			    struct snd_pcm_hw_params *params)
{}

static const struct snd_soc_ops rt1011_ops =;

static int rt1011_init(struct snd_soc_pcm_runtime *rtd)
{}

void sof_rt1011_dai_link(struct device *dev, struct snd_soc_dai_link *link)
{}
EXPORT_SYMBOL_NS();

void sof_rt1011_codec_conf(struct device *dev, struct snd_soc_card *card)
{}
EXPORT_SYMBOL_NS();

/*
 * rt1015:  i2c mode driver for ALC1015 and ALC1015Q
 * rt1015p: auto-mode driver for ALC1015, ALC1015Q, and ALC1015Q-VB
 *
 * For stereo output, there are always two amplifiers on the board.
 * However, the ACPI implements only one device instance (UID=0) if they
 * are sharing the same enable pin. This is the case of rt1015p.
 */
static const struct snd_soc_dapm_route rt1015p_dapm_routes[] =;

static struct snd_soc_dai_link_component rt1015p_dai_link_components[] =;

static int rt1015p_hw_params(struct snd_pcm_substream *substream,
			     struct snd_pcm_hw_params *params)
{}

static const struct snd_soc_ops rt1015p_ops =;

static int rt1015p_init(struct snd_soc_pcm_runtime *rtd)
{}

void sof_rt1015p_dai_link(struct snd_soc_dai_link *link)
{}
EXPORT_SYMBOL_NS();

void sof_rt1015p_codec_conf(struct snd_soc_card *card)
{}
EXPORT_SYMBOL_NS();

/*
 * RT1015 audio amplifier
 */

static const struct {} rt1015_tdm_mask[] =;

static int rt1015_hw_params(struct snd_pcm_substream *substream,
			    struct snd_pcm_hw_params *params)
{}

static const struct snd_soc_ops rt1015_ops =;

static struct snd_soc_codec_conf rt1015_amp_conf[] =;

static struct snd_soc_dai_link_component rt1015_components[] =;

static int speaker_codec_init_lr(struct snd_soc_pcm_runtime *rtd)
{}

void sof_rt1015_codec_conf(struct snd_soc_card *card)
{}
EXPORT_SYMBOL_NS();

void sof_rt1015_dai_link(struct snd_soc_dai_link *link)
{}
EXPORT_SYMBOL_NS();

/*
 * RT1308 audio amplifier
 */
static const struct snd_kcontrol_new rt1308_kcontrols[] =;

static const struct snd_soc_dapm_widget rt1308_dapm_widgets[] =;

static const struct snd_soc_dapm_route rt1308_dapm_routes[] =;

static struct snd_soc_dai_link_component rt1308_components[] =;

static int rt1308_init(struct snd_soc_pcm_runtime *rtd)
{}

static int rt1308_hw_params(struct snd_pcm_substream *substream,
			    struct snd_pcm_hw_params *params)
{}

static const struct snd_soc_ops rt1308_ops =;

void sof_rt1308_dai_link(struct snd_soc_dai_link *link)
{}
EXPORT_SYMBOL_NS();

/*
 * 2-amp Configuration for RT1019
 */

static const struct snd_soc_dapm_route rt1019p_dapm_routes[] =;

static struct snd_soc_dai_link_component rt1019p_components[] =;

static int rt1019p_init(struct snd_soc_pcm_runtime *rtd)
{}

void sof_rt1019p_dai_link(struct snd_soc_dai_link *link)
{}
EXPORT_SYMBOL_NS();

MODULE_DESCRIPTION();
MODULE_LICENSE();