Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (c) 2009 Samsung Electronics Co. Ltd
0004  * Author: Jaswinder Singh <jassi.brar@samsung.com>
0005  */
0006 
0007 /* The machine init code calls s3c*_ac97_setup_gpio with
0008  * one of these defines in order to select appropriate bank
0009  * of GPIO for AC97 pins
0010  */
0011 #define S3C64XX_AC97_GPD  0
0012 #define S3C64XX_AC97_GPE  1
0013 
0014 #include <linux/dmaengine.h>
0015 
0016 extern void s3c64xx_ac97_setup_gpio(int);
0017 
0018 struct samsung_i2s_type {
0019 /* If the Primary DAI has 5.1 Channels */
0020 #define QUIRK_PRI_6CHAN     (1 << 0)
0021 /* If the I2S block has a Stereo Overlay Channel */
0022 #define QUIRK_SEC_DAI       (1 << 1)
0023 /*
0024  * If the I2S block has no internal prescalar or MUX (I2SMOD[10] bit)
0025  * The Machine driver must provide suitably set clock to the I2S block.
0026  */
0027 #define QUIRK_NO_MUXPSR     (1 << 2)
0028 #define QUIRK_NEED_RSTCLR   (1 << 3)
0029 #define QUIRK_SUPPORTS_TDM  (1 << 4)
0030 #define QUIRK_SUPPORTS_IDMA (1 << 5)
0031     /* Quirks of the I2S controller */
0032     u32 quirks;
0033     dma_addr_t idma_addr;
0034 };
0035 
0036 /**
0037  * struct s3c_audio_pdata - common platform data for audio device drivers
0038  * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
0039  */
0040 struct s3c_audio_pdata {
0041     int (*cfg_gpio)(struct platform_device *);
0042     dma_filter_fn dma_filter;
0043     void *dma_playback;
0044     void *dma_capture;
0045     void *dma_play_sec;
0046     void *dma_capture_mic;
0047     struct samsung_i2s_type type;
0048 };