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

// SPDX-License-Identifier: GPL-2.0-only
//
// ASoC DPCM Machine driver for Baytrail / Cherrytrail platforms with
// CX2072X codec
//

#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/jack.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include "../../codecs/cx2072x.h"
#include "../atom/sst-atom-controls.h"

static const struct snd_soc_dapm_widget byt_cht_cx2072x_widgets[] =;

static const struct snd_soc_dapm_route byt_cht_cx2072x_audio_map[] =;

static const struct snd_kcontrol_new byt_cht_cx2072x_controls[] =;

static struct snd_soc_jack byt_cht_cx2072x_headset;

/* Headset jack detection DAPM pins */
static struct snd_soc_jack_pin byt_cht_cx2072x_headset_pins[] =;

static const struct acpi_gpio_params byt_cht_cx2072x_headset_gpios;
static const struct acpi_gpio_mapping byt_cht_cx2072x_acpi_gpios[] =;

static int byt_cht_cx2072x_init(struct snd_soc_pcm_runtime *rtd)
{}

static int byt_cht_cx2072x_fixup(struct snd_soc_pcm_runtime *rtd,
				 struct snd_pcm_hw_params *params)
{}

static int byt_cht_cx2072x_aif1_startup(struct snd_pcm_substream *substream)
{}

static const struct snd_soc_ops byt_cht_cx2072x_aif1_ops =;

SND_SOC_DAILINK_DEF(dummy,
	DAILINK_COMP_ARRAY(COMP_DUMMY()));

SND_SOC_DAILINK_DEF(media,
	DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai")));

SND_SOC_DAILINK_DEF(deepbuffer,
	DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai")));

SND_SOC_DAILINK_DEF(ssp2,
	DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port")));

SND_SOC_DAILINK_DEF(cx2072x,
	DAILINK_COMP_ARRAY(COMP_CODEC("i2c-14F10720:00", "cx2072x-hifi")));

SND_SOC_DAILINK_DEF(platform,
	DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));

static struct snd_soc_dai_link byt_cht_cx2072x_dais[] =;

/* use space before codec name to simplify card ID, and simplify driver name */
#define SOF_CARD_NAME
#define SOF_DRIVER_NAME

#define CARD_NAME
#define DRIVER_NAME

/* SoC card */
static struct snd_soc_card byt_cht_cx2072x_card =;

static char codec_name[SND_ACPI_I2C_ID_LEN];

static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev)
{}

static struct platform_driver snd_byt_cht_cx2072x_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();