From 4484509f642a2ed06fcb0975016850c61f479716 Mon Sep 17 00:00:00 2001 From: Nicolin Chen Date: Mon, 2 Sep 2013 11:01:37 +0800 Subject: ENGR00277299-3 ASoC: fsl: Add dma driver for hdmi audio i.MX HDMI audio uses its own AHB DMA while there's also an extra SDMA channel to update its buffer addresses. Thus add a new driver for HDMI audio. Signed-off-by: Nicolin Chen --- sound/soc/fsl/Kconfig | 5 + sound/soc/fsl/Makefile | 1 + sound/soc/fsl/imx-hdmi-dma.c | 1093 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/imx-hdmi.h | 104 ++++ 4 files changed, 1203 insertions(+) create mode 100644 sound/soc/fsl/imx-hdmi-dma.c create mode 100644 sound/soc/fsl/imx-hdmi.h (limited to 'sound') diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index f9c5ece77fc5..227366e8eb3a 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -125,6 +125,11 @@ config SND_SOC_IMX_PCM_DMA bool select SND_SOC_GENERIC_DMAENGINE_PCM +config SND_SOC_IMX_HDMI_DMA + bool + select SND_SOC_GENERIC_DMAENGINE_PCM + select SND_SOC_IMX_PCM_DMA + config SND_SOC_IMX_AUDMUX tristate diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile index e099dee38f4b..9beaa5214aae 100644 --- a/sound/soc/fsl/Makefile +++ b/sound/soc/fsl/Makefile @@ -43,6 +43,7 @@ obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm-fiq.o obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o +obj-$(CONFIG_SND_SOC_IMX_HDMI_DMA) += imx-hdmi-dma.o # i.MX Machine Support snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c new file mode 100644 index 000000000000..372f48c2951c --- /dev/null +++ b/sound/soc/fsl/imx-hdmi-dma.c @@ -0,0 +1,1093 @@ +/* + * imx-hdmi-dma.c -- HDMI DMA driver for ALSA Soc Audio Layer + * + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. + * + * based on imx-pcm-dma-mx2.c + * Copyright 2009 Sascha Hauer + * + * This code is based on code copyrighted by Freescale, + * Liam Girdwood, Javier Martin and probably others. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include + +#include