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> 14e2e404a6SSathyanarayana Nujella 15e2e404a6SSathyanarayana Nujella #define MAX_98373_CODEC_DAI "max98373-aif1" 16e2e404a6SSathyanarayana Nujella #define MAX_98373_DEV0_NAME "i2c-MX98373:00" 17e2e404a6SSathyanarayana Nujella #define MAX_98373_DEV1_NAME "i2c-MX98373:01" 18e2e404a6SSathyanarayana Nujella 19e2e404a6SSathyanarayana Nujella extern struct snd_soc_dai_link_component max_98373_components[2]; 20e2e404a6SSathyanarayana Nujella extern struct snd_soc_ops max_98373_ops; 21be82e888SNaveen Manohar extern const struct snd_soc_dapm_route max_98373_dapm_routes[]; 22e2e404a6SSathyanarayana Nujella 239c5046e4SPierre-Louis Bossart int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd); 249c5046e4SPierre-Louis Bossart void max_98373_set_codec_conf(struct snd_soc_card *card); 259c5046e4SPierre-Louis Bossart int max_98373_trigger(struct snd_pcm_substream *substream, int cmd); 26be82e888SNaveen Manohar 27a21515b5SBrent Lu /* 28*f316c9d9SMac Chiang * Maxim MAX98390 29*f316c9d9SMac Chiang */ 30*f316c9d9SMac Chiang #define MAX_98390_CODEC_DAI "max98390-aif1" 31*f316c9d9SMac Chiang #define MAX_98390_DEV0_NAME "i2c-MX98390:00" 32*f316c9d9SMac Chiang #define MAX_98390_DEV1_NAME "i2c-MX98390:01" 33*f316c9d9SMac Chiang #define MAX_98390_DEV2_NAME "i2c-MX98390:02" 34*f316c9d9SMac Chiang #define MAX_98390_DEV3_NAME "i2c-MX98390:03" 35*f316c9d9SMac Chiang 36*f316c9d9SMac Chiang extern struct snd_soc_dai_link_component max_98390_components[2]; 37*f316c9d9SMac Chiang extern struct snd_soc_dai_link_component max_98390_4spk_components[4]; 38*f316c9d9SMac Chiang extern const struct snd_soc_ops max_98390_ops; 39*f316c9d9SMac Chiang 40*f316c9d9SMac Chiang void max_98390_set_codec_conf(struct snd_soc_card *card, int ch); 41*f316c9d9SMac Chiang int max_98390_spk_codec_init(struct snd_soc_pcm_runtime *rtd); 42*f316c9d9SMac Chiang 43*f316c9d9SMac Chiang /* 4407acee58SBrent Lu * Maxim MAX98357A/MAX98360A 45a21515b5SBrent Lu */ 46a21515b5SBrent Lu #define MAX_98357A_CODEC_DAI "HiFi" 47a21515b5SBrent Lu #define MAX_98357A_DEV0_NAME "MX98357A:00" 4807acee58SBrent Lu #define MAX_98360A_DEV0_NAME "MX98360A: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