linux/sound/soc/amd/acp-es8336.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Machine driver for AMD Stoney platform using ES8336 Codec
 *
 * Copyright 2022 Advanced Micro Devices, Inc.
 */

#include <sound/core.h>
#include <sound/soc.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc-dapm.h>
#include <sound/jack.h>
#include <linux/gpio.h>
#include <linux/device.h>
#include <linux/dmi.h>
#include <linux/gpio/consumer.h>
#include <linux/gpio/machine.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/acpi.h>

#include "acp.h"

#define DUAL_CHANNEL
#define DRV_NAME
#define ST_JADEITE
#define ES8336_PLL_FREQ

static unsigned long acp2x_machine_id;
static struct snd_soc_jack st_jack;
static struct device *codec_dev;
static struct gpio_desc *gpio_pa;

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

static struct snd_soc_jack_pin st_es8316_jack_pins[] =;

static int st_es8336_init(struct snd_soc_pcm_runtime *rtd)
{}

static const unsigned int st_channels[] =;

static const unsigned int st_rates[] =;

static const struct snd_pcm_hw_constraint_list st_constraints_rates =;

static const struct snd_pcm_hw_constraint_list st_constraints_channels =;

static int st_es8336_codec_startup(struct snd_pcm_substream *substream)
{}

static const struct snd_soc_ops st_es8336_ops =;

SND_SOC_DAILINK_DEF(designware1,
		    DAILINK_COMP_ARRAY(COMP_CPU("designware-i2s.2.auto")));
SND_SOC_DAILINK_DEF(codec,
		    DAILINK_COMP_ARRAY(COMP_CODEC("i2c-ESSX8336:00", "ES8316 HiFi")));
SND_SOC_DAILINK_DEF(platform,
		    DAILINK_COMP_ARRAY(COMP_PLATFORM("acp_audio_dma.1.auto")));

static struct snd_soc_dai_link st_dai_es8336[] =;

static const struct snd_soc_dapm_widget st_widgets[] =;

static const struct snd_soc_dapm_route st_audio_route[] =;

static const struct snd_kcontrol_new st_mc_controls[] =;

static const struct acpi_gpio_params pa_enable_gpio =;
static const struct acpi_gpio_mapping acpi_es8336_gpios[] =;

static int st_es8336_late_probe(struct snd_soc_card *card)
{}

static struct snd_soc_card st_card =;

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

static const struct dmi_system_id st_es8336_quirk_table[] =;

static int st_es8336_probe(struct platform_device *pdev)
{}

#ifdef CONFIG_ACPI
static const struct acpi_device_id st_audio_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, st_audio_acpi_match);
#endif

static struct platform_driver st_mach_driver =;

module_platform_driver();

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