bf5xx-ac97.h 989 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * linux/sound/arm/bf5xx-ac97.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _BF5XX_AC97_H
  9. #define _BF5XX_AC97_H
  10. extern struct snd_ac97_bus_ops bf5xx_ac97_ops;
  11. extern struct snd_ac97 *ac97;
  12. /* Frame format in memory, only support stereo currently */
  13. struct ac97_frame {
  14. u16 ac97_tag; /* slot 0 */
  15. u16 ac97_addr; /* slot 1 */
  16. u16 ac97_data; /* slot 2 */
  17. u32 ac97_pcm; /* slot 3 and 4: left and right pcm data */
  18. } __attribute__ ((packed));
  19. #define TAG_VALID 0x8000
  20. #define TAG_CMD 0x6000
  21. #define TAG_PCM_LEFT 0x1000
  22. #define TAG_PCM_RIGHT 0x0800
  23. #define TAG_PCM (TAG_PCM_LEFT | TAG_PCM_RIGHT)
  24. extern struct snd_soc_dai bfin_ac97_dai;
  25. void bf5xx_pcm_to_ac97(struct ac97_frame *dst, const __u32 *src, \
  26. size_t count);
  27. void bf5xx_ac97_to_pcm(const struct ac97_frame *src, __u32 *dst, \
  28. size_t count);
  29. #endif