• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/media/video/cx25840/
1/* cx25840 internal API header
2 *
3 * Copyright (C) 2003-2004 Chris Kennedy
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 */
19
20#ifndef _CX25840_CORE_H_
21#define _CX25840_CORE_H_
22
23
24#include <linux/videodev2.h>
25#include <linux/i2c.h>
26
27extern int cx25840_debug;
28
29#define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0)
30
31struct cx25840_state {
32	struct i2c_client c;
33	int pvr150_workaround;
34	int radio;
35	enum cx25840_video_input vid_input;
36	enum cx25840_audio_input aud_input;
37	u32 audclk_freq;
38	int audmode;
39	int vbi_line_offset;
40	u32 id;
41	u32 rev;
42	int is_cx25836;
43};
44
45/* ----------------------------------------------------------------------- */
46/* cx25850-core.c 							   */
47int cx25840_write(struct i2c_client *client, u16 addr, u8 value);
48int cx25840_write4(struct i2c_client *client, u16 addr, u32 value);
49u8 cx25840_read(struct i2c_client *client, u16 addr);
50u32 cx25840_read4(struct i2c_client *client, u16 addr);
51int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned mask, u8 value);
52v4l2_std_id cx25840_get_v4lstd(struct i2c_client *client);
53
54/* ----------------------------------------------------------------------- */
55/* cx25850-firmware.c                                                      */
56int cx25840_loadfw(struct i2c_client *client);
57
58/* ----------------------------------------------------------------------- */
59/* cx25850-audio.c                                                         */
60int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg);
61void cx25840_audio_set_path(struct i2c_client *client);
62
63/* ----------------------------------------------------------------------- */
64/* cx25850-vbi.c                                                           */
65void cx25840_vbi_setup(struct i2c_client *client);
66int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg);
67
68#endif
69