Unverified Commit 626a3dfb authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: SOF: Add support for Mediatek MT8195

Merge series from Daniel Baluta <daniel.baluta@oss.nxp.com>:

This adds sound open firmware driver support for MT8915 platform.
parents b38892b5 163fa3a5
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
 * Copyright(c) 2021 Mediatek Corporation. All rights reserved.
 *
 * Author: Bo Pan <bo.pan@mediatek.com>
 */

#ifndef __INCLUDE_SOUND_SOF_DAI_MEDIATEK_H__
#define __INCLUDE_SOUND_SOF_DAI_MEDIATEK_H__

#include <sound/sof/header.h>

struct sof_ipc_dai_mtk_afe_params {
	struct sof_ipc_hdr hdr;
	u32 channels;
	u32 rate;
	u32 format;
	u32 stream_id;
	u32 reserved[4]; /* reserve for future */
} __packed;

#endif
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <sound/sof/dai-intel.h>
#include <sound/sof/dai-imx.h>
#include <sound/sof/dai-amd.h>
#include <sound/sof/dai-mediatek.h>

/*
 * DAI Configuration.
@@ -70,6 +71,7 @@ enum sof_ipc_dai_type {
	SOF_DAI_AMD_BT,			/**< AMD ACP BT*/
	SOF_DAI_AMD_SP,			/**< AMD ACP SP */
	SOF_DAI_AMD_DMIC,		/**< AMD ACP DMIC */
	SOF_DAI_MEDIATEK_AFE,		/**< Mediatek AFE */
};

/* general purpose DAI configuration */
@@ -97,6 +99,7 @@ struct sof_ipc_dai_config {
		struct sof_ipc_dai_acp_params acpbt;
		struct sof_ipc_dai_acp_params acpsp;
		struct sof_ipc_dai_acp_params acpdmic;
		struct sof_ipc_dai_mtk_afe_params afe;
	};
} __packed;

+5 −0
Original line number Diff line number Diff line
@@ -140,4 +140,9 @@
#define SOF_TKN_INTEL_HDA_RATE			1500
#define SOF_TKN_INTEL_HDA_CH			1501

/* AFE */
#define SOF_TKN_MEDIATEK_AFE_RATE		1600
#define SOF_TKN_MEDIATEK_AFE_CH			1601
#define SOF_TKN_MEDIATEK_AFE_FORMAT		1602

#endif
+2 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ config SND_SOC_SOF_OF
	depends on OF || COMPILE_TEST
	help
	  This adds support for Device Tree enumeration. This option is
	  required to enable i.MX8 devices.
	  required to enable i.MX8 or Mediatek devices.
	  Say Y if you need this option. If unsure select "N".

config SND_SOC_SOF_OF_DEV
@@ -236,6 +236,7 @@ config SND_SOC_SOF_PROBE_WORK_QUEUE
source "sound/soc/sof/amd/Kconfig"
source "sound/soc/sof/imx/Kconfig"
source "sound/soc/sof/intel/Kconfig"
source "sound/soc/sof/mediatek/Kconfig"
source "sound/soc/sof/xtensa/Kconfig"

endif
+1 −0
Original line number Diff line number Diff line
@@ -24,3 +24,4 @@ obj-$(CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL) += intel/
obj-$(CONFIG_SND_SOC_SOF_IMX_TOPLEVEL) += imx/
obj-$(CONFIG_SND_SOC_SOF_AMD_TOPLEVEL) += amd/
obj-$(CONFIG_SND_SOC_SOF_XTENSA) += xtensa/
obj-$(CONFIG_SND_SOC_SOF_MTK_TOPLEVEL) += mediatek/
Loading