Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * mtk-dsp-sof-common.h  --  MediaTek dsp sof common definition
0004  *
0005  * Copyright (c) 2022 MediaTek Inc.
0006  * Author: Chunxu Li <chunxu.li@mediatek.com>
0007  */
0008 
0009 #ifndef _MTK_DSP_SOF_COMMON_H_
0010 #define _MTK_DSP_SOF_COMMON_H_
0011 
0012 #include <sound/soc.h>
0013 
0014 struct sof_conn_stream {
0015     const char *normal_link;
0016     const char *sof_link;
0017     const char *sof_dma;
0018     int stream_dir;
0019 };
0020 
0021 struct mtk_sof_priv {
0022     const struct sof_conn_stream *conn_streams;
0023     int num_streams;
0024     int (*sof_dai_link_fixup)(struct snd_soc_pcm_runtime *rtd,
0025                   struct snd_pcm_hw_params *params);
0026 };
0027 
0028 int mtk_sof_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
0029                struct snd_pcm_hw_params *params);
0030 int mtk_sof_card_probe(struct snd_soc_card *card);
0031 int mtk_sof_card_late_probe(struct snd_soc_card *card);
0032 int mtk_sof_dailink_parse_of(struct snd_soc_card *card, struct device_node *np,
0033                  const char *propname, struct snd_soc_dai_link *pre_dai_links,
0034                  int pre_num_links);
0035 
0036 #endif