Blame view

include/sound/tea575x-tuner.h 1.95 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
  #ifndef __SOUND_TEA575X_TUNER_H
  #define __SOUND_TEA575X_TUNER_H
  
  /*
   *   ALSA driver for TEA5757/5759 Philips AM/FM tuner chips
   *
c1017a4cd   Jaroslav Kysela   [ALSA] Changed Ja...
7
   *	Copyright (c) 2004 Jaroslav Kysela <perex@perex.cz>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
   *
   *   This program is free software; you can redistribute it and/or modify
   *   it under the terms of the GNU General Public License as published by
   *   the Free Software Foundation; either version 2 of the License, or
   *   (at your option) any later version.
   *
   *   This program is distributed in the hope that it will be useful,
   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   *   GNU General Public License for more details.
   *
   *   You should have received a copy of the GNU General Public License
   *   along with this program; if not, write to the Free Software
   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
   *
7477ddaa4   Andrew Morton   V4L/DVB (4210b): ...
23
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
24

9b76ede41   Mauro Carvalho Chehab   V4L/DVB (10771): ...
25
  #include <linux/videodev2.h>
4522e825d   Ondrej Zary   [media] tea575x: ...
26
  #include <media/v4l2-ctrls.h>
7477ddaa4   Andrew Morton   V4L/DVB (4210b): ...
27
  #include <media/v4l2-dev.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
28

ea27316e4   Ondrej Zary   ALSA: tea575x: re...
29
  #define TEA575X_FMIF	10700
14219d065   Ondrej Zary   ALSA: tea575x: un...
30
31
32
33
  #define TEA575X_DATA	(1 << 0)
  #define TEA575X_CLK	(1 << 1)
  #define TEA575X_WREN	(1 << 2)
  #define TEA575X_MOST	(1 << 3)
97f02e05f   Takashi Iwai   [ALSA] Remove xxx...
34
  struct snd_tea575x;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
35
36
  
  struct snd_tea575x_ops {
14219d065   Ondrej Zary   ALSA: tea575x: un...
37
38
39
  	void (*set_pins)(struct snd_tea575x *tea, u8 pins);
  	u8 (*get_pins)(struct snd_tea575x *tea);
  	void (*set_direction)(struct snd_tea575x *tea, bool output);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
40
41
42
  };
  
  struct snd_tea575x {
4522e825d   Ondrej Zary   [media] tea575x: ...
43
  	struct video_device vd;		/* video device */
375d13581   Ondrej Zary   ALSA: tea575x-tun...
44
45
46
47
  	bool tea5759;			/* 5759 chip is present */
  	bool mute;			/* Device is muted? */
  	bool stereo;			/* receiving stereo */
  	bool tuned;			/* tuned to a station */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
48
49
  	unsigned int val;		/* hw value */
  	unsigned long freq;		/* frequency */
6a529c1a4   Ondrej Zary   [media] tea575x: ...
50
  	struct mutex mutex;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51
52
  	struct snd_tea575x_ops *ops;
  	void *private_data;
10ca72014   Ondrej Zary   ALSA: tea575x: us...
53
54
  	u8 card[32];
  	u8 bus_info[32];
4522e825d   Ondrej Zary   [media] tea575x: ...
55
56
  	struct v4l2_ctrl_handler ctrl_handler;
  	int (*ext_init)(struct snd_tea575x *tea);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
57
  };
14219d065   Ondrej Zary   ALSA: tea575x: un...
58
  int snd_tea575x_init(struct snd_tea575x *tea);
97f02e05f   Takashi Iwai   [ALSA] Remove xxx...
59
  void snd_tea575x_exit(struct snd_tea575x *tea);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
60
61
  
  #endif /* __SOUND_TEA575X_TUNER_H */