linux/sound/soc/sdw_utils/soc_sdw_rt_amp.c

// SPDX-License-Identifier: GPL-2.0-only
// This file incorporates work covered by the following copyright notice:
// Copyright (c) 2022 Intel Corporation
// Copyright (c) 2024 Advanced Micro Devices, Inc.

/*
 *  soc_sdw_rt_amp - Helpers to handle RT1308/RT1316/RT1318 from generic machine driver
 */

#include <linux/device.h>
#include <linux/errno.h>
#include <sound/control.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include <sound/soc-dapm.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_type.h>
#include <linux/dmi.h>
#include <sound/soc_sdw_utils.h>
#include "soc_sdw_rt_amp_coeff_tables.h"
#include "../codecs/rt1308.h"

#define CODEC_NAME_SIZE

/* choose a larger value to resolve compatibility issues */
#define RT_AMP_MAX_BQ_REG

struct rt_amp_platform_data {};

static const struct rt_amp_platform_data dell_0a5d_platform_data =;

static const struct rt_amp_platform_data dell_0b00_platform_data =;

static const struct dmi_system_id dmi_platform_data[] =;

static int rt_amp_add_device_props(struct device *sdw_dev)
{}

/*
 * dapm routes for rt1308/rt1316/rt1318 will be registered dynamically
 * according to the number of rt1308/rt1316/rt1318 used. The first two
 * entries will be registered for one codec case, and the last two entries
 * are also registered if two 1308s/1316s/1318s are used.
 */
static const struct snd_soc_dapm_route rt1308_map[] =;

static const struct snd_soc_dapm_route rt1316_map[] =;

static const struct snd_soc_dapm_route rt1318_map[] =;

static const struct snd_soc_dapm_route rt1320_map[] =;

static const struct snd_soc_dapm_route *get_codec_name_and_route(struct snd_soc_dai *dai,
								 char *codec_name)
{}

int asoc_sdw_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)
{}
EXPORT_SYMBOL_NS();

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

/* machine stream operations */
const struct snd_soc_ops soc_sdw_rt1308_i2s_ops =;
EXPORT_SYMBOL_NS();

int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link)
{}
EXPORT_SYMBOL_NS();

int asoc_sdw_rt_amp_init(struct snd_soc_card *card,
			 struct snd_soc_dai_link *dai_links,
			 struct asoc_sdw_codec_info *info,
			 bool playback)
{}
EXPORT_SYMBOL_NS();