s3c2412-i2s.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* sound/soc/s3c24xx/s3c2412-i2s.c
  2. *
  3. * ALSA Soc Audio Layer - S3C2412 I2S driver
  4. *
  5. * Copyright (c) 2007 Simtec Electronics
  6. * http://armlinux.simtec.co.uk/
  7. * Ben Dooks <ben@simtec.co.uk>
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the
  11. * Free Software Foundation; either version 2 of the License, or (at your
  12. * option) any later version.
  13. */
  14. #ifndef __SND_SOC_S3C24XX_S3C2412_I2S_H
  15. #define __SND_SOC_S3C24XX_S3C2412_I2S_H __FILE__
  16. #define S3C2412_DIV_BCLK (1)
  17. #define S3C2412_DIV_RCLK (2)
  18. #define S3C2412_DIV_PRESCALER (3)
  19. #define S3C2412_CLKSRC_PCLK (0)
  20. #define S3C2412_CLKSRC_I2SCLK (1)
  21. extern struct clk *s3c2412_get_iisclk(void);
  22. extern struct snd_soc_dai s3c2412_i2s_dai;
  23. struct s3c2412_rate_calc {
  24. unsigned int clk_div; /* for prescaler */
  25. unsigned int fs_div; /* for root frame clock */
  26. };
  27. extern int s3c2412_iis_calc_rate(struct s3c2412_rate_calc *info,
  28. unsigned int *fstab,
  29. unsigned int rate, struct clk *clk);
  30. #endif /* __SND_SOC_S3C24XX_S3C2412_I2S_H */