tea575x-tuner.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __SOUND_TEA575X_TUNER_H
  2. #define __SOUND_TEA575X_TUNER_H
  3. /*
  4. * ALSA driver for TEA5757/5759 Philips AM/FM tuner chips
  5. *
  6. * Copyright (c) 2004 Jaroslav Kysela <perex@suse.cz>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. *
  22. */
  23. #include <linux/videodev.h>
  24. #include <media/v4l2-dev.h>
  25. struct snd_tea575x;
  26. struct snd_tea575x_ops {
  27. void (*write)(struct snd_tea575x *tea, unsigned int val);
  28. unsigned int (*read)(struct snd_tea575x *tea);
  29. };
  30. struct snd_tea575x {
  31. struct snd_card *card;
  32. struct video_device vd; /* video device */
  33. struct file_operations fops;
  34. int dev_nr; /* requested device number + 1 */
  35. int vd_registered; /* video device is registered */
  36. int tea5759; /* 5759 chip is present */
  37. unsigned int freq_fixup; /* crystal onboard */
  38. unsigned int val; /* hw value */
  39. unsigned long freq; /* frequency */
  40. struct snd_tea575x_ops *ops;
  41. void *private_data;
  42. };
  43. void snd_tea575x_init(struct snd_tea575x *tea);
  44. void snd_tea575x_exit(struct snd_tea575x *tea);
  45. #endif /* __SOUND_TEA575X_TUNER_H */