tea575x-tuner.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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@perex.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/videodev2.h>
  24. #include <media/v4l2-dev.h>
  25. #include <media/v4l2-ioctl.h>
  26. struct snd_tea575x;
  27. struct snd_tea575x_ops {
  28. void (*write)(struct snd_tea575x *tea, unsigned int val);
  29. unsigned int (*read)(struct snd_tea575x *tea);
  30. void (*mute)(struct snd_tea575x *tea, unsigned int mute);
  31. };
  32. struct snd_tea575x {
  33. struct snd_card *card;
  34. struct video_device *vd; /* video device */
  35. int dev_nr; /* requested device number + 1 */
  36. int tea5759; /* 5759 chip is present */
  37. int mute; /* Device is muted? */
  38. unsigned int freq_fixup; /* crystal onboard */
  39. unsigned int val; /* hw value */
  40. unsigned long freq; /* frequency */
  41. unsigned long in_use; /* set if the device is in use */
  42. struct snd_tea575x_ops *ops;
  43. void *private_data;
  44. };
  45. void snd_tea575x_init(struct snd_tea575x *tea);
  46. void snd_tea575x_exit(struct snd_tea575x *tea);
  47. #endif /* __SOUND_TEA575X_TUNER_H */