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

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright(c) 2020 Intel Corporation
#include <linux/module.h>
#include <linux/string.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 "../common/soc-intel-quirks.h"
#include "sof_maxim_common.h"

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

static const struct snd_soc_dapm_widget maxim_2spk_widgets[] =;

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

/*
 * Maxim MAX98373
 */
#define MAX_98373_PIN_NAME

static const struct snd_soc_dapm_route max_98373_dapm_routes[] =;

static struct snd_soc_codec_conf max_98373_codec_conf[] =;

static struct snd_soc_dai_link_component max_98373_components[] =;

/*
 * According to the definition of 'DAI Sel Mux' mixer in max98373.c, rx mask
 * should choose two channels from TDM slots, the LSB of rx mask is left channel
 * and the other one is right channel.
 */
static const struct {} max_98373_tdm_mask[] =;

/*
 * The tx mask indicates which channel(s) contains output IV-sense data and
 * others should set to Hi-Z. Here we get the channel number from codec's ACPI
 * device property "maxim,vmon-slot-no" and "maxim,imon-slot-no" to generate the
 * mask. Refer to the max98373_slot_config() function in max98373.c codec driver.
 */
static unsigned int max_98373_get_tx_mask(struct device *dev)
{}

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

static int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
{}

static const struct snd_soc_ops max_98373_ops =;

static int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
{}

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

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

/*
 * Maxim MAX98390
 */
static const struct snd_soc_dapm_route max_98390_dapm_routes[] =;

static const struct snd_kcontrol_new max_98390_tt_kcontrols[] =;

static const struct snd_soc_dapm_widget max_98390_tt_dapm_widgets[] =;

static const struct snd_soc_dapm_route max_98390_tt_dapm_routes[] =;

static struct snd_soc_codec_conf max_98390_cml_codec_conf[] =;

static struct snd_soc_codec_conf max_98390_codec_conf[] =;

static struct snd_soc_dai_link_component max_98390_components[] =;

static const struct {} max_98390_tdm_mask[] =;

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

static int max_98390_init(struct snd_soc_pcm_runtime *rtd)
{}

static const struct snd_soc_ops max_98390_ops =;

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

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

/*
 * Maxim MAX98357A/MAX98360A
 */
static const struct snd_kcontrol_new max_98357a_kcontrols[] =;

static const struct snd_soc_dapm_widget max_98357a_dapm_widgets[] =;

static const struct snd_soc_dapm_route max_98357a_dapm_routes[] =;

static struct snd_soc_dai_link_component max_98357a_components[] =;

static struct snd_soc_dai_link_component max_98360a_components[] =;

static int max_98357a_init(struct snd_soc_pcm_runtime *rtd)
{}

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

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

MODULE_DESCRIPTION();
MODULE_LICENSE();