18d971691SSachin Kamat /* 2436d42c6SArnd Bergmann * Copyright (c) 2009 Samsung Electronics Co. Ltd 3436d42c6SArnd Bergmann * Author: Jaswinder Singh <[email protected]> 4436d42c6SArnd Bergmann * 5436d42c6SArnd Bergmann * This program is free software; you can redistribute it and/or modify 6436d42c6SArnd Bergmann * it under the terms of the GNU General Public License version 2 as 7436d42c6SArnd Bergmann * published by the Free Software Foundation. 8436d42c6SArnd Bergmann */ 9436d42c6SArnd Bergmann 10436d42c6SArnd Bergmann /* The machine init code calls s3c*_ac97_setup_gpio with 11436d42c6SArnd Bergmann * one of these defines in order to select appropriate bank 12436d42c6SArnd Bergmann * of GPIO for AC97 pins 13436d42c6SArnd Bergmann */ 14436d42c6SArnd Bergmann #define S3C64XX_AC97_GPD 0 15436d42c6SArnd Bergmann #define S3C64XX_AC97_GPE 1 16*9bdca822SArnd Bergmann 17*9bdca822SArnd Bergmann #include <linux/dmaengine.h> 18*9bdca822SArnd Bergmann 19436d42c6SArnd Bergmann extern void s3c64xx_ac97_setup_gpio(int); 20436d42c6SArnd Bergmann 21436d42c6SArnd Bergmann struct samsung_i2s { 22436d42c6SArnd Bergmann /* If the Primary DAI has 5.1 Channels */ 23436d42c6SArnd Bergmann #define QUIRK_PRI_6CHAN (1 << 0) 24436d42c6SArnd Bergmann /* If the I2S block has a Stereo Overlay Channel */ 25436d42c6SArnd Bergmann #define QUIRK_SEC_DAI (1 << 1) 26436d42c6SArnd Bergmann /* 27436d42c6SArnd Bergmann * If the I2S block has no internal prescalar or MUX (I2SMOD[10] bit) 28436d42c6SArnd Bergmann * The Machine driver must provide suitably set clock to the I2S block. 29436d42c6SArnd Bergmann */ 30436d42c6SArnd Bergmann #define QUIRK_NO_MUXPSR (1 << 2) 31436d42c6SArnd Bergmann #define QUIRK_NEED_RSTCLR (1 << 3) 324ca0c0d4SPadmavathi Venna #define QUIRK_SUPPORTS_TDM (1 << 4) 33b0759736SPadmavathi Venna #define QUIRK_SUPPORTS_IDMA (1 << 5) 34436d42c6SArnd Bergmann /* Quirks of the I2S controller */ 35436d42c6SArnd Bergmann u32 quirks; 36436d42c6SArnd Bergmann dma_addr_t idma_addr; 37436d42c6SArnd Bergmann }; 38436d42c6SArnd Bergmann 39436d42c6SArnd Bergmann /** 40436d42c6SArnd Bergmann * struct s3c_audio_pdata - common platform data for audio device drivers 41436d42c6SArnd Bergmann * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode 42436d42c6SArnd Bergmann */ 43436d42c6SArnd Bergmann struct s3c_audio_pdata { 44436d42c6SArnd Bergmann int (*cfg_gpio)(struct platform_device *); 45*9bdca822SArnd Bergmann dma_filter_fn dma_filter; 46b9a1a743SArnd Bergmann void *dma_playback; 47b9a1a743SArnd Bergmann void *dma_capture; 48b9a1a743SArnd Bergmann void *dma_play_sec; 49b9a1a743SArnd Bergmann void *dma_capture_mic; 50436d42c6SArnd Bergmann union { 51436d42c6SArnd Bergmann struct samsung_i2s i2s; 52436d42c6SArnd Bergmann } type; 53436d42c6SArnd Bergmann }; 54