1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Copyright(c) 2020 Intel Corporation. 4 */ 5 6/* 7 * This file defines data structures used in Machine Driver for Intel 8 * platforms with Maxim Codecs. 9 */ 10#ifndef __SOF_MAXIM_COMMON_H 11#define __SOF_MAXIM_COMMON_H 12 13#include <sound/soc.h> 14 15#define MAX_98373_CODEC_DAI "max98373-aif1" 16#define MAX_98373_DEV0_NAME "i2c-MX98373:00" 17#define MAX_98373_DEV1_NAME "i2c-MX98373:01" 18 19extern struct snd_soc_dai_link_component max_98373_components[2]; 20extern struct snd_soc_ops max_98373_ops; 21extern const struct snd_soc_dapm_route max_98373_dapm_routes[]; 22 23int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd); 24void max_98373_set_codec_conf(struct snd_soc_card *card); 25int max_98373_trigger(struct snd_pcm_substream *substream, int cmd); 26 27/* 28 * Maxim MAX98390 29 */ 30#define MAX_98390_ACPI_HID "MX98390" 31#define MAX_98390_CODEC_DAI "max98390-aif1" 32#define MAX_98390_DEV0_NAME "i2c-" MAX_98390_ACPI_HID ":00" 33#define MAX_98390_DEV1_NAME "i2c-" MAX_98390_ACPI_HID ":01" 34#define MAX_98390_DEV2_NAME "i2c-" MAX_98390_ACPI_HID ":02" 35#define MAX_98390_DEV3_NAME "i2c-" MAX_98390_ACPI_HID ":03" 36 37void max_98390_dai_link(struct device *dev, struct snd_soc_dai_link *link); 38void max_98390_set_codec_conf(struct device *dev, struct snd_soc_card *card); 39 40/* 41 * Maxim MAX98357A/MAX98360A 42 */ 43#define MAX_98357A_CODEC_DAI "HiFi" 44#define MAX_98357A_DEV0_NAME "MX98357A:00" 45#define MAX_98360A_DEV0_NAME "MX98360A:00" 46 47void max_98357a_dai_link(struct snd_soc_dai_link *link); 48void max_98360a_dai_link(struct snd_soc_dai_link *link); 49 50#endif /* __SOF_MAXIM_COMMON_H */ 51