]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/soc/s3c24xx/s3c-i2s-v2.h
ASoC: multi-component - ASoC Multi-Component Support
[mv-sheeva.git] / sound / soc / s3c24xx / s3c-i2s-v2.h
index ecf8eaaed1db7a4c61e561c831a186d5b6a3c6e2..d45830151484a62610baa69a9c32e3580f2cfeef 100644 (file)
 #define S3C_I2SV2_DIV_RCLK     (2)
 #define S3C_I2SV2_DIV_PRESCALER        (3)
 
+#define S3C_I2SV2_CLKSRC_PCLK          0
+#define S3C_I2SV2_CLKSRC_AUDIOBUS      1
+#define S3C_I2SV2_CLKSRC_CDCLK         2
+
+/* Set this flag for I2S controllers that have the bit IISMOD[12]
+ * bridge/break RCLK signal and external Xi2sCDCLK pin.
+ */
+#define S3C_FEATURE_CDCLKCON   (1 << 0)
+
 /**
  * struct s3c_i2sv2_info - S3C I2S-V2 information
  * @dev: The parent device passed to use from the probe.
  * @regs: The pointer to the device registe block.
+ * @feature: Set of bit-flags indicating features of the controller.
  * @master: True if the I2S core is the I2S bit clock master.
  * @dma_playback: DMA information for playback channel.
  * @dma_capture: DMA information for capture channel.
@@ -43,9 +53,10 @@ struct s3c_i2sv2_info {
        struct device   *dev;
        void __iomem    *regs;
 
+       u32             feature;
+
        struct clk      *iis_pclk;
        struct clk      *iis_cclk;
-       struct clk      *iis_clk;
 
        unsigned char    master;
 
@@ -55,8 +66,12 @@ struct s3c_i2sv2_info {
        u32              suspend_iismod;
        u32              suspend_iiscon;
        u32              suspend_iispsr;
+
+       unsigned long   base;
 };
 
+extern struct clk *s3c_i2sv2_get_clock(struct snd_soc_dai *cpu_dai);
+
 struct s3c_i2sv2_rate_calc {
        unsigned int    clk_div;        /* for prescaler */
        unsigned int    fs_div;         /* for root frame clock */
@@ -68,23 +83,24 @@ extern int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
 
 /**
  * s3c_i2sv2_probe - probe for i2s device helper
- * @pdev: The platform device supplied to the original probe.
  * @dai: The ASoC DAI structure supplied to the original probe.
  * @i2s: Our local i2s structure to fill in.
  * @base: The base address for the registers.
  */
-extern int s3c_i2sv2_probe(struct platform_device *pdev,
-                          struct snd_soc_dai *dai,
+extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
                           struct s3c_i2sv2_info *i2s,
                           unsigned long base);
 
 /**
  * s3c_i2sv2_register_dai - register dai with soc core
- * @dai: The snd_soc_dai structure to register
+ * @dev: DAI device
+ * @id: DAI ID
+ * @drv: The driver structure to register
  *
  * Fill in any missing fields and then register the given dai with the
  * soc core.
  */
-extern int s3c_i2sv2_register_dai(struct snd_soc_dai *dai);
+extern int s3c_i2sv2_register_dai(struct device *dev, int id,
+               struct snd_soc_dai_driver *drv);
 
 #endif /* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */