Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright(c) 2020 Intel Corporation.
0004  */
0005 
0006 /*
0007  * This file defines data structures used in Machine Driver for Intel
0008  * platforms with Maxim Codecs.
0009  */
0010 #ifndef __SOF_MAXIM_COMMON_H
0011 #define __SOF_MAXIM_COMMON_H
0012 
0013 #include <sound/soc.h>
0014 
0015 #define MAX_98373_CODEC_DAI "max98373-aif1"
0016 #define MAX_98373_DEV0_NAME "i2c-MX98373:00"
0017 #define MAX_98373_DEV1_NAME "i2c-MX98373:01"
0018 
0019 extern struct snd_soc_dai_link_component max_98373_components[2];
0020 extern struct snd_soc_ops max_98373_ops;
0021 extern const struct snd_soc_dapm_route max_98373_dapm_routes[];
0022 
0023 int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
0024 void max_98373_set_codec_conf(struct snd_soc_card *card);
0025 int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);
0026 
0027 /*
0028  * Maxim MAX98390
0029  */
0030 #define MAX_98390_CODEC_DAI     "max98390-aif1"
0031 #define MAX_98390_DEV0_NAME     "i2c-MX98390:00"
0032 #define MAX_98390_DEV1_NAME     "i2c-MX98390:01"
0033 #define MAX_98390_DEV2_NAME     "i2c-MX98390:02"
0034 #define MAX_98390_DEV3_NAME     "i2c-MX98390:03"
0035 
0036 extern struct snd_soc_dai_link_component max_98390_components[2];
0037 extern struct snd_soc_dai_link_component max_98390_4spk_components[4];
0038 extern const struct snd_soc_ops max_98390_ops;
0039 
0040 void max_98390_set_codec_conf(struct snd_soc_card *card, int ch);
0041 int max_98390_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
0042 
0043 /*
0044  * Maxim MAX98357A/MAX98360A
0045  */
0046 #define MAX_98357A_CODEC_DAI    "HiFi"
0047 #define MAX_98357A_DEV0_NAME    "MX98357A:00"
0048 #define MAX_98360A_DEV0_NAME    "MX98360A:00"
0049 
0050 void max_98357a_dai_link(struct snd_soc_dai_link *link);
0051 void max_98360a_dai_link(struct snd_soc_dai_link *link);
0052 
0053 #endif /* __SOF_MAXIM_COMMON_H */