xref: /linux/sound/soc/intel/boards/sof_maxim_common.h (revision 02a204dd4e627900fad66b4362f6c4fb6a0a7a26)
1e149ca29SPierre-Louis Bossart /* SPDX-License-Identifier: GPL-2.0-only */
2e2e404a6SSathyanarayana Nujella /*
3e2e404a6SSathyanarayana Nujella  * Copyright(c) 2020 Intel Corporation.
4e2e404a6SSathyanarayana Nujella  */
5e2e404a6SSathyanarayana Nujella 
6e2e404a6SSathyanarayana Nujella /*
7e2e404a6SSathyanarayana Nujella  * This file defines data structures used in Machine Driver for Intel
8e2e404a6SSathyanarayana Nujella  * platforms with Maxim Codecs.
9e2e404a6SSathyanarayana Nujella  */
10e2e404a6SSathyanarayana Nujella #ifndef __SOF_MAXIM_COMMON_H
11e2e404a6SSathyanarayana Nujella #define __SOF_MAXIM_COMMON_H
12e2e404a6SSathyanarayana Nujella 
13e2e404a6SSathyanarayana Nujella #include <sound/soc.h>
14*02a204ddSBrent Lu #include "sof_ssp_common.h"
15e2e404a6SSathyanarayana Nujella 
16*02a204ddSBrent Lu /*
17*02a204ddSBrent Lu  * Maxim MAX98373
18*02a204ddSBrent Lu  */
19e2e404a6SSathyanarayana Nujella #define MAX_98373_CODEC_DAI	"max98373-aif1"
20*02a204ddSBrent Lu #define MAX_98373_DEV0_NAME	"i2c-" MAX_98373_ACPI_HID ":00"
21*02a204ddSBrent Lu #define MAX_98373_DEV1_NAME	"i2c-" MAX_98373_ACPI_HID ":01"
22e2e404a6SSathyanarayana Nujella 
23e2e404a6SSathyanarayana Nujella extern struct snd_soc_dai_link_component max_98373_components[2];
24e2e404a6SSathyanarayana Nujella extern struct snd_soc_ops max_98373_ops;
25be82e888SNaveen Manohar extern const struct snd_soc_dapm_route max_98373_dapm_routes[];
26e2e404a6SSathyanarayana Nujella 
279c5046e4SPierre-Louis Bossart int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
289c5046e4SPierre-Louis Bossart void max_98373_set_codec_conf(struct snd_soc_card *card);
299c5046e4SPierre-Louis Bossart int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);
30be82e888SNaveen Manohar 
31a21515b5SBrent Lu /*
32f316c9d9SMac Chiang  * Maxim MAX98390
33f316c9d9SMac Chiang  */
34f316c9d9SMac Chiang #define MAX_98390_CODEC_DAI	"max98390-aif1"
3536eb9868SBrent Lu #define MAX_98390_DEV0_NAME	"i2c-" MAX_98390_ACPI_HID ":00"
3636eb9868SBrent Lu #define MAX_98390_DEV1_NAME	"i2c-" MAX_98390_ACPI_HID ":01"
3736eb9868SBrent Lu #define MAX_98390_DEV2_NAME	"i2c-" MAX_98390_ACPI_HID ":02"
3836eb9868SBrent Lu #define MAX_98390_DEV3_NAME	"i2c-" MAX_98390_ACPI_HID ":03"
39f316c9d9SMac Chiang 
4036eb9868SBrent Lu void max_98390_dai_link(struct device *dev, struct snd_soc_dai_link *link);
4136eb9868SBrent Lu void max_98390_set_codec_conf(struct device *dev, struct snd_soc_card *card);
42f316c9d9SMac Chiang 
43f316c9d9SMac Chiang /*
4407acee58SBrent Lu  * Maxim MAX98357A/MAX98360A
45a21515b5SBrent Lu  */
46a21515b5SBrent Lu #define MAX_98357A_CODEC_DAI	"HiFi"
47*02a204ddSBrent Lu #define MAX_98357A_DEV0_NAME	MAX_98357A_ACPI_HID ":00"
48*02a204ddSBrent Lu #define MAX_98360A_DEV0_NAME	MAX_98360A_ACPI_HID ":00"
49a21515b5SBrent Lu 
50a21515b5SBrent Lu void max_98357a_dai_link(struct snd_soc_dai_link *link);
5107acee58SBrent Lu void max_98360a_dai_link(struct snd_soc_dai_link *link);
52a21515b5SBrent Lu 
53e2e404a6SSathyanarayana Nujella #endif /* __SOF_MAXIM_COMMON_H */
54