linux/sound/soc/intel/boards/bdw-rt5677.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * ASoC machine driver for Intel Broadwell platforms with RT5677 codec
 *
 * Copyright (c) 2014, The Chromium OS Authors.  All rights reserved.
 */

#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#include <sound/pcm_params.h>
#include <sound/jack.h>
#include <sound/soc-acpi.h>

#include "../../codecs/rt5677.h"

struct bdw_rt5677_priv {};

static int bdw_rt5677_event_hp(struct snd_soc_dapm_widget *w,
			struct snd_kcontrol *k, int event)
{}

static const struct snd_soc_dapm_widget bdw_rt5677_widgets[] =;

static const struct snd_soc_dapm_route bdw_rt5677_map[] =;

static const struct snd_kcontrol_new bdw_rt5677_controls[] =;


static struct snd_soc_jack headphone_jack;
static struct snd_soc_jack mic_jack;

static struct snd_soc_jack_pin headphone_jack_pin =;

static struct snd_soc_jack_pin mic_jack_pin =;

static struct snd_soc_jack_gpio headphone_jack_gpio =;

static struct snd_soc_jack_gpio mic_jack_gpio =;

/* GPIO indexes defined by ACPI */
enum {};

static const struct acpi_gpio_params plug_det_gpio =;
static const struct acpi_gpio_params mic_present_gpio =;
static const struct acpi_gpio_params headphone_enable_gpio =;

static const struct acpi_gpio_mapping bdw_rt5677_gpios[] =;

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

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

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

static const struct snd_soc_ops bdw_rt5677_ops =;

static const struct snd_soc_ops bdw_rt5677_dsp_ops =;

static const unsigned int channels[] =;

static const struct snd_pcm_hw_constraint_list constraints_channels =;

static int bdw_rt5677_fe_startup(struct snd_pcm_substream *substream)
{}

static const struct snd_soc_ops bdw_rt5677_fe_ops =;

static int bdw_rt5677_init(struct snd_soc_pcm_runtime *rtd)
{}

static void bdw_rt5677_exit(struct snd_soc_pcm_runtime *rtd)
{}

/* broadwell digital audio interface glue - connects codec <--> CPU */
SND_SOC_DAILINK_DEF(dummy,
	DAILINK_COMP_ARRAY(COMP_DUMMY()));

SND_SOC_DAILINK_DEF(fe,
	DAILINK_COMP_ARRAY(COMP_CPU("System Pin")));

SND_SOC_DAILINK_DEF(platform,
	DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio")));

SND_SOC_DAILINK_DEF(be,
	DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-aif1")));

SND_SOC_DAILINK_DEF(ssp0_port,
	    DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port")));

/* Wake on voice interface */
SND_SOC_DAILINK_DEFS();

static struct snd_soc_dai_link bdw_rt5677_dais[] =;

static int bdw_rt5677_suspend_pre(struct snd_soc_card *card)
{}

static int bdw_rt5677_resume_post(struct snd_soc_card *card)
{}

/* 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

/* ASoC machine driver for Broadwell DSP + RT5677 */
static struct snd_soc_card bdw_rt5677_card =;

static int bdw_rt5677_probe(struct platform_device *pdev)
{}

static struct platform_driver bdw_rt5677_audio =;

module_platform_driver()

/* Module information */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();