/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * at91-pcm.h - ALSA PCM interface for the Atmel AT91 SoC. * * Copyright (C) 2005 SAN People * Copyright (C) 2008 Atmel * * Authors: Sedji Gaouaou <[email protected]> * * Based on at91-pcm. by: * Frank Mandarino <[email protected]> * Copyright 2006 Endrelia Technologies Inc. * * Based on pxa2xx-pcm.c by: * * Author: Nicolas Pitre * Created: Nov 30, 2004 * Copyright: (C) 2004 MontaVista Software, Inc. */ #ifndef _ATMEL_PCM_H #define _ATMEL_PCM_H #include <linux/atmel-ssc.h> #define ATMEL_SSC_DMABUF_SIZE … /* * Registers and status bits that are required by the PCM driver. */ struct atmel_pdc_regs { … }; struct atmel_ssc_mask { … }; /* * This structure, shared between the PCM driver and the interface, * contains all information required by the PCM driver to perform the * PDC DMA operation. All fields except dma_intr_handler() are initialized * by the interface. The dma_intr_handler() pointer is set by the PCM * driver and called by the interface SSC interrupt handler if it is * non-NULL. */ struct atmel_pcm_dma_params { … }; /* * SSC register access (since ssc_writel() / ssc_readl() require literal name) */ #define ssc_readx(base, reg) … #define ssc_writex(base, reg, value) … #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_PDC) int atmel_pcm_pdc_platform_register(struct device *dev); #else static inline int atmel_pcm_pdc_platform_register(struct device *dev) { return 0; } #endif #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_DMA) int atmel_pcm_dma_platform_register(struct device *dev); #else static inline int atmel_pcm_dma_platform_register(struct device *dev) { return 0; } #endif #endif /* _ATMEL_PCM_H */