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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * This file defines data structures and functions used in Machine
 * Driver for Intel platforms with Cirrus Logic Codecs.
 *
 * Copyright 2022 Intel Corporation.
 */
#include <linux/module.h>
#include <sound/sof.h>
#include "../../codecs/cs35l41.h"
#include "sof_cirrus_common.h"

#define CS35L41_HID
#define CS35L41_MAX_AMPS

/*
 * Cirrus Logic CS35L41/CS35L53
 */
static const struct snd_kcontrol_new cs35l41_kcontrols[] =;

static const struct snd_soc_dapm_widget cs35l41_dapm_widgets[] =;

static const struct snd_soc_dapm_route cs35l41_dapm_routes[] =;

static struct snd_soc_dai_link_component cs35l41_components[CS35L41_MAX_AMPS];

/*
 * Mapping between ACPI instance id and speaker position.
 */
static struct snd_soc_codec_conf cs35l41_codec_conf[CS35L41_MAX_AMPS];

static int cs35l41_init(struct snd_soc_pcm_runtime *rtd)
{}

/*
 * Channel map:
 *
 * TL/WL: ASPRX1 on slot 0, ASPRX2 on slot 1 (default)
 * TR/WR: ASPRX1 on slot 1, ASPRX2 on slot 0
 */
static const struct {} cs35l41_channel_map[] =;

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

static const struct snd_soc_ops cs35l41_ops =;

static const char * const cs35l41_name_prefixes[] =;

/*
 * Expected UIDs are integers (stored as strings).
 * UID Mapping is fixed:
 * UID 0x0 -> WL
 * UID 0x1 -> WR
 * UID 0x2 -> TL
 * UID 0x3 -> TR
 * Note: If there are less than 4 Amps, UIDs still map to WL/WR/TL/TR. Dynamic code will only create
 * dai links for UIDs which exist, and ignore non-existant ones. Only 2 or 4 amps are expected.
 * Return number of codecs found.
 */
static int cs35l41_compute_codec_conf(void)
{}

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

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

MODULE_DESCRIPTION();
MODULE_LICENSE();