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

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

/*
 * Intel SOF Machine Driver for Intel platforms with TI PCM512x codec,
 * e.g. Up or Up2 with Hifiberry DAC+ HAT
 */
#include <linux/clk.h>
#include <linux/dmi.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include "../../codecs/pcm512x.h"
#include "../common/soc-intel-quirks.h"
#include "hda_dsp_common.h"

#define NAME_SIZE

#define SOF_PCM512X_SSP_CODEC(quirk)
#define SOF_PCM512X_SSP_CODEC_MASK
#define SOF_PCM512X_ENABLE_SSP_CAPTURE
#define SOF_PCM512X_ENABLE_DMIC

#define IDISP_CODEC_MASK

/* Default: SSP5 */
static unsigned long sof_pcm512x_quirk =;

static bool is_legacy_cpu;

struct sof_hdmi_pcm {};

struct sof_card_private {};

static int sof_pcm512x_quirk_cb(const struct dmi_system_id *id)
{}

static const struct dmi_system_id sof_pcm512x_quirk_table[] =;

static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd)
{}

static int sof_pcm512x_codec_init(struct snd_soc_pcm_runtime *rtd)
{}

static int aif1_startup(struct snd_pcm_substream *substream)
{}

static void aif1_shutdown(struct snd_pcm_substream *substream)
{}

static const struct snd_soc_ops sof_pcm512x_ops =;

static struct snd_soc_dai_link_component platform_component[] =;

static int sof_card_late_probe(struct snd_soc_card *card)
{}

static const struct snd_kcontrol_new sof_controls[] =;

static const struct snd_soc_dapm_widget sof_widgets[] =;

static const struct snd_soc_dapm_widget dmic_widgets[] =;

static const struct snd_soc_dapm_route sof_map[] =;

static const struct snd_soc_dapm_route dmic_map[] =;

static int dmic_init(struct snd_soc_pcm_runtime *rtd)
{}

/* sof audio machine driver for pcm512x codec */
static struct snd_soc_card sof_audio_card_pcm512x =;

SND_SOC_DAILINK_DEF(pcm512x_component,
	DAILINK_COMP_ARRAY(COMP_CODEC("i2c-104C5122:00", "pcm512x-hifi")));
SND_SOC_DAILINK_DEF(dmic_component,
	DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));

static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
							  int ssp_codec,
							  int dmic_be_num,
							  int hdmi_num,
							  bool idisp_codec)
{}

static int sof_audio_probe(struct platform_device *pdev)
{}

static void sof_pcm512x_remove(struct platform_device *pdev)
{}

static struct platform_driver sof_audio =;
module_platform_driver()

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_ALIAS();
MODULE_IMPORT_NS();