2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* v4l2 device driver for philips saa7134 based TV cards
|
|
|
|
*
|
|
|
|
* (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
[media] Stop using linux/version.h on most video drivers
All the modified drivers didn't have any version increment since
Jan, 1 2011. Several of them didn't have any version increment
for a long time, even having new features and important bug fixes
happening.
As we're now filling the QUERYCAP version with the current Kernel
Release, we don't need to maintain a per-driver version control
anymore. So, let's just use the default.
In order to preserve the Kernel module version history, a
KERNEL_VERSION() macro were added to all modified drivers, and
the extraver number were incremented.
I opted to preserve the per-driver version control to a few
pwc, pvrusb2, s2255, s5p-fimc and sh_vou.
A few drivers are still using the legacy way to handle ioctl's.
So, we can't do such change on them, otherwise, they'll break.
Those are: uvc, et61x251 and sn9c102.
The rationale is that the per-driver version control seems to be
actively maintained on those.
Yet, I think that the better for them would be to just use the
default version numbering, instead of doing that by themselves.
While here, removed a few uneeded include linux/version.h
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-06-25 01:45:49 +08:00
|
|
|
#define SAA7134_VERSION "0, 2, 17"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2015-04-30 17:44:56 +08:00
|
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#include <linux/pci.h>
|
|
|
|
#include <linux/i2c.h>
|
2005-11-09 13:37:49 +08:00
|
|
|
#include <linux/videodev2.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
#include <linux/kdev_t.h>
|
|
|
|
#include <linux/input.h>
|
2005-11-09 13:37:27 +08:00
|
|
|
#include <linux/notifier.h>
|
|
|
|
#include <linux/delay.h>
|
2006-02-07 16:49:14 +08:00
|
|
|
#include <linux/mutex.h>
|
2012-12-10 19:35:09 +08:00
|
|
|
#include <linux/pm_qos.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
2006-06-04 21:06:18 +08:00
|
|
|
#include <media/v4l2-common.h>
|
2008-07-20 19:12:02 +08:00
|
|
|
#include <media/v4l2-ioctl.h>
|
2009-01-17 23:17:14 +08:00
|
|
|
#include <media/v4l2-device.h>
|
2013-02-02 07:01:16 +08:00
|
|
|
#include <media/v4l2-fh.h>
|
2013-12-14 19:28:24 +08:00
|
|
|
#include <media/v4l2-ctrls.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
#include <media/tuner.h>
|
2010-11-18 00:28:38 +08:00
|
|
|
#include <media/rc-core.h>
|
2015-11-10 22:01:44 +08:00
|
|
|
#include <media/i2c/ir-kbd-i2c.h>
|
2014-04-17 18:30:53 +08:00
|
|
|
#include <media/videobuf2-dma-sg.h>
|
2006-01-10 01:25:21 +08:00
|
|
|
#include <sound/core.h>
|
|
|
|
#include <sound/pcm.h>
|
2013-01-20 06:41:09 +08:00
|
|
|
#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB)
|
2014-04-17 18:30:53 +08:00
|
|
|
#include <media/videobuf2-dvb.h>
|
2007-01-31 10:26:01 +08:00
|
|
|
#endif
|
2013-04-07 01:21:36 +08:00
|
|
|
#include "tda8290.h"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define UNSET (-1U)
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* enums */
|
|
|
|
|
|
|
|
enum saa7134_tvaudio_mode {
|
|
|
|
TVAUDIO_FM_MONO = 1,
|
|
|
|
TVAUDIO_FM_BG_STEREO = 2,
|
|
|
|
TVAUDIO_FM_SAT_STEREO = 3,
|
|
|
|
TVAUDIO_FM_K_STEREO = 4,
|
|
|
|
TVAUDIO_NICAM_AM = 5,
|
|
|
|
TVAUDIO_NICAM_FM = 6,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum saa7134_audio_in {
|
|
|
|
TV = 1,
|
|
|
|
LINE1 = 2,
|
|
|
|
LINE2 = 3,
|
|
|
|
LINE2_LEFT,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum saa7134_video_out {
|
|
|
|
CCIR656 = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* static data */
|
|
|
|
|
|
|
|
struct saa7134_tvnorm {
|
|
|
|
char *name;
|
|
|
|
v4l2_std_id id;
|
|
|
|
|
|
|
|
/* video decoder */
|
|
|
|
unsigned int sync_control;
|
|
|
|
unsigned int luma_control;
|
|
|
|
unsigned int chroma_ctrl1;
|
|
|
|
unsigned int chroma_gain;
|
|
|
|
unsigned int chroma_ctrl2;
|
|
|
|
unsigned int vgate_misc;
|
|
|
|
|
|
|
|
/* video scaler */
|
|
|
|
unsigned int h_start;
|
|
|
|
unsigned int h_stop;
|
|
|
|
unsigned int video_v_start;
|
|
|
|
unsigned int video_v_stop;
|
2005-06-24 13:04:47 +08:00
|
|
|
unsigned int vbi_v_start_0;
|
|
|
|
unsigned int vbi_v_stop_0;
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int src_timing;
|
2005-06-24 13:04:47 +08:00
|
|
|
unsigned int vbi_v_start_1;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct saa7134_tvaudio {
|
|
|
|
char *name;
|
|
|
|
v4l2_std_id std;
|
|
|
|
enum saa7134_tvaudio_mode mode;
|
|
|
|
int carr1;
|
|
|
|
int carr2;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct saa7134_format {
|
|
|
|
char *name;
|
|
|
|
unsigned int fourcc;
|
|
|
|
unsigned int depth;
|
|
|
|
unsigned int pm;
|
|
|
|
unsigned int vshift; /* vertical downsampling (for planar yuv) */
|
|
|
|
unsigned int hshift; /* horizontal downsampling (for planar yuv) */
|
|
|
|
unsigned int bswap:1;
|
|
|
|
unsigned int wswap:1;
|
|
|
|
unsigned int yuv:1;
|
|
|
|
unsigned int planar:1;
|
|
|
|
unsigned int uvswap:1;
|
|
|
|
};
|
|
|
|
|
2010-11-17 21:05:29 +08:00
|
|
|
struct saa7134_card_ir {
|
|
|
|
struct rc_dev *dev;
|
|
|
|
|
|
|
|
char phys[32];
|
|
|
|
|
|
|
|
u32 polling;
|
2012-02-18 13:24:53 +08:00
|
|
|
u32 last_gpio;
|
|
|
|
u32 mask_keycode, mask_keydown, mask_keyup;
|
2010-11-17 21:05:29 +08:00
|
|
|
|
|
|
|
bool running;
|
|
|
|
|
|
|
|
struct timer_list timer;
|
|
|
|
|
|
|
|
/* IR core raw decoding */
|
|
|
|
u32 raw_decode;
|
|
|
|
};
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* card configuration */
|
|
|
|
|
|
|
|
#define SAA7134_BOARD_NOAUTO UNSET
|
|
|
|
#define SAA7134_BOARD_UNKNOWN 0
|
|
|
|
#define SAA7134_BOARD_PROTEUS_PRO 1
|
|
|
|
#define SAA7134_BOARD_FLYVIDEO3000 2
|
|
|
|
#define SAA7134_BOARD_FLYVIDEO2000 3
|
|
|
|
#define SAA7134_BOARD_EMPRESS 4
|
|
|
|
#define SAA7134_BOARD_MONSTERTV 5
|
|
|
|
#define SAA7134_BOARD_MD9717 6
|
|
|
|
#define SAA7134_BOARD_TVSTATION_RDS 7
|
|
|
|
#define SAA7134_BOARD_CINERGY400 8
|
|
|
|
#define SAA7134_BOARD_MD5044 9
|
|
|
|
#define SAA7134_BOARD_KWORLD 10
|
|
|
|
#define SAA7134_BOARD_CINERGY600 11
|
|
|
|
#define SAA7134_BOARD_MD7134 12
|
|
|
|
#define SAA7134_BOARD_TYPHOON_90031 13
|
|
|
|
#define SAA7134_BOARD_ELSA 14
|
|
|
|
#define SAA7134_BOARD_ELSA_500TV 15
|
|
|
|
#define SAA7134_BOARD_ASUSTeK_TVFM7134 16
|
|
|
|
#define SAA7134_BOARD_VA1000POWER 17
|
|
|
|
#define SAA7134_BOARD_BMK_MPEX_NOTUNER 18
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_TV 19
|
|
|
|
#define SAA7134_BOARD_CRONOS_PLUS 20
|
|
|
|
#define SAA7134_BOARD_10MOONSTVMASTER 21
|
|
|
|
#define SAA7134_BOARD_MD2819 22
|
|
|
|
#define SAA7134_BOARD_BMK_MPEX_TUNER 23
|
|
|
|
#define SAA7134_BOARD_TVSTATION_DVR 24
|
|
|
|
#define SAA7134_BOARD_ASUSTEK_TVFM7133 25
|
|
|
|
#define SAA7134_BOARD_PINNACLE_PCTV_STEREO 26
|
|
|
|
#define SAA7134_BOARD_MANLI_MTV002 27
|
|
|
|
#define SAA7134_BOARD_MANLI_MTV001 28
|
|
|
|
#define SAA7134_BOARD_TG3000TV 29
|
|
|
|
#define SAA7134_BOARD_ECS_TVP3XP 30
|
|
|
|
#define SAA7134_BOARD_ECS_TVP3XP_4CB5 31
|
|
|
|
#define SAA7134_BOARD_AVACSSMARTTV 32
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER 33
|
|
|
|
#define SAA7134_BOARD_NOVAC_PRIMETV7133 34
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_STUDIO_305 35
|
2005-07-13 04:59:01 +08:00
|
|
|
#define SAA7134_BOARD_UPMOST_PURPLE_TV 36
|
2005-04-17 06:20:36 +08:00
|
|
|
#define SAA7134_BOARD_ITEMS_MTV005 37
|
|
|
|
#define SAA7134_BOARD_CINERGY200 38
|
|
|
|
#define SAA7134_BOARD_FLYTVPLATINUM_MINI 39
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_TV_PVR 40
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUS 41
|
|
|
|
#define SAA7134_BOARD_SABRENT_SBTTVFM 42
|
|
|
|
#define SAA7134_BOARD_ZOLID_XPERT_TV7134 43
|
|
|
|
#define SAA7134_BOARD_EMPIRE_PCI_TV_RADIO_LE 44
|
2005-06-24 13:05:09 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_STUDIO_307 45
|
2005-04-17 06:20:36 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_CARDBUS 46
|
|
|
|
#define SAA7134_BOARD_CINERGY400_CARDBUS 47
|
|
|
|
#define SAA7134_BOARD_CINERGY600_MK3 48
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_GOLD_PLUS 49
|
|
|
|
#define SAA7134_BOARD_PINNACLE_300I_DVBT_PAL 50
|
|
|
|
#define SAA7134_BOARD_PROVIDEO_PV952 51
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_305 52
|
2005-07-13 04:59:01 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTeK_TVFM7135 53
|
2005-04-17 06:20:36 +08:00
|
|
|
#define SAA7134_BOARD_FLYTVPLATINUM_FM 54
|
|
|
|
#define SAA7134_BOARD_FLYDVBTDUO 55
|
2005-06-24 13:05:09 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_307 56
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_GO_007_FM 57
|
|
|
|
#define SAA7134_BOARD_ADS_INSTANT_TV 58
|
|
|
|
#define SAA7134_BOARD_KWORLD_VSTREAM_XPERT 59
|
2006-01-23 19:51:17 +08:00
|
|
|
#define SAA7134_BOARD_FLYDVBT_DUO_CARDBUS 60
|
2005-07-13 04:59:01 +08:00
|
|
|
#define SAA7134_BOARD_PHILIPS_TOUGH 61
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII 62
|
|
|
|
#define SAA7134_BOARD_KWORLD_XPERT 63
|
2005-09-10 04:03:46 +08:00
|
|
|
#define SAA7134_BOARD_FLYTV_DIGIMATRIX 64
|
2005-09-10 04:03:49 +08:00
|
|
|
#define SAA7134_BOARD_KWORLD_TERMINATOR 65
|
2005-09-10 04:03:51 +08:00
|
|
|
#define SAA7134_BOARD_YUAN_TUN900 66
|
2005-11-09 13:36:16 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_409FM 67
|
2005-11-09 13:36:22 +08:00
|
|
|
#define SAA7134_BOARD_GOTVIEW_7135 68
|
2005-11-09 13:36:32 +08:00
|
|
|
#define SAA7134_BOARD_PHILIPS_EUROPA 69
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_DVBT_300 70
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_DVBT_200 71
|
2005-11-09 13:36:35 +08:00
|
|
|
#define SAA7134_BOARD_RTD_VFG7350 72
|
|
|
|
#define SAA7134_BOARD_RTD_VFG7330 73
|
2005-11-09 13:36:49 +08:00
|
|
|
#define SAA7134_BOARD_FLYTVPLATINUM_MINI2 74
|
2005-11-09 13:37:27 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180 75
|
2005-11-09 13:37:40 +08:00
|
|
|
#define SAA7134_BOARD_MONSTERTV_MOBILE 76
|
2005-11-09 13:37:51 +08:00
|
|
|
#define SAA7134_BOARD_PINNACLE_PCTV_110i 77
|
2005-11-09 13:38:03 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTeK_P7131_DUAL 78
|
2005-11-09 13:38:47 +08:00
|
|
|
#define SAA7134_BOARD_SEDNA_PC_TV_CARDBUS 79
|
2005-11-09 13:38:08 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTEK_DIGIMATRIX_TV 80
|
2005-11-09 13:38:42 +08:00
|
|
|
#define SAA7134_BOARD_PHILIPS_TIGER 81
|
2005-11-14 08:08:01 +08:00
|
|
|
#define SAA7134_BOARD_MSI_TVATANYWHERE_PLUS 82
|
2006-01-10 01:25:01 +08:00
|
|
|
#define SAA7134_BOARD_CINERGY250PCI 83
|
2006-01-10 01:32:45 +08:00
|
|
|
#define SAA7134_BOARD_FLYDVB_TRIO 84
|
2006-02-07 16:25:14 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_777 85
|
2006-02-07 16:49:09 +08:00
|
|
|
#define SAA7134_BOARD_FLYDVBT_LR301 86
|
2006-02-07 16:49:10 +08:00
|
|
|
#define SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331 87
|
2006-02-07 16:49:13 +08:00
|
|
|
#define SAA7134_BOARD_TEVION_DVBT_220RF 88
|
2006-02-27 11:08:04 +08:00
|
|
|
#define SAA7134_BOARD_ELSA_700TV 89
|
2006-02-27 11:08:23 +08:00
|
|
|
#define SAA7134_BOARD_KWORLD_ATSC110 90
|
2006-03-12 04:14:12 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_A169_B 91
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_A169_B1 92
|
2006-03-15 06:02:12 +08:00
|
|
|
#define SAA7134_BOARD_MD7134_BRIDGE_2 93
|
2006-03-28 06:39:30 +08:00
|
|
|
#define SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS 94
|
2006-06-20 06:49:20 +08:00
|
|
|
#define SAA7134_BOARD_FLYVIDEO3000_NTSC 95
|
2006-08-08 01:03:32 +08:00
|
|
|
#define SAA7134_BOARD_MEDION_MD8800_QUADRO 96
|
2006-08-08 20:10:10 +08:00
|
|
|
#define SAA7134_BOARD_FLYDVBS_LR300 97
|
2006-09-14 03:42:42 +08:00
|
|
|
#define SAA7134_BOARD_PROTEUS_2309 98
|
2006-09-27 03:53:53 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_A16AR 99
|
2006-10-03 07:49:24 +08:00
|
|
|
#define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100
|
2006-10-07 06:13:50 +08:00
|
|
|
#define SAA7134_BOARD_PINNACLE_PCTV_310i 101
|
2006-10-07 07:23:47 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_STUDIO_507 102
|
2006-10-31 07:00:16 +08:00
|
|
|
#define SAA7134_BOARD_VIDEOMATE_DVBT_200A 103
|
2006-11-16 08:31:54 +08:00
|
|
|
#define SAA7134_BOARD_HAUPPAUGE_HVR1110 104
|
|
|
|
#define SAA7134_BOARD_CINERGY_HT_PCMCIA 105
|
2006-12-20 20:29:09 +08:00
|
|
|
#define SAA7134_BOARD_ENCORE_ENLTV 106
|
2006-12-27 23:46:36 +08:00
|
|
|
#define SAA7134_BOARD_ENCORE_ENLTV_FM 107
|
2007-01-17 05:36:40 +08:00
|
|
|
#define SAA7134_BOARD_CINERGY_HT_PCI 108
|
2007-04-27 23:31:12 +08:00
|
|
|
#define SAA7134_BOARD_PHILIPS_TIGER_S 109
|
2007-04-27 23:31:19 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_M102 110
|
2007-03-14 07:58:29 +08:00
|
|
|
#define SAA7134_BOARD_ASUS_P7131_4871 111
|
2007-03-15 07:33:55 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA 112
|
2007-05-01 21:01:20 +08:00
|
|
|
#define SAA7134_BOARD_ECS_TVP3XP_4CB6 113
|
|
|
|
#define SAA7134_BOARD_KWORLD_DVBT_210 114
|
2007-05-01 21:48:09 +08:00
|
|
|
#define SAA7134_BOARD_SABRENT_TV_PCB05 115
|
2007-05-10 23:16:47 +08:00
|
|
|
#define SAA7134_BOARD_10MOONSTVMASTER3 116
|
2007-08-21 01:14:50 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_SUPER_007 117
|
2018-01-05 02:08:56 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_401 118
|
|
|
|
#define SAA7134_BOARD_BEHOLD_403 119
|
2008-01-07 16:17:39 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_403FM 120
|
|
|
|
#define SAA7134_BOARD_BEHOLD_405 121
|
|
|
|
#define SAA7134_BOARD_BEHOLD_405FM 122
|
|
|
|
#define SAA7134_BOARD_BEHOLD_407 123
|
|
|
|
#define SAA7134_BOARD_BEHOLD_407FM 124
|
|
|
|
#define SAA7134_BOARD_BEHOLD_409 125
|
|
|
|
#define SAA7134_BOARD_BEHOLD_505FM 126
|
|
|
|
#define SAA7134_BOARD_BEHOLD_507_9FM 127
|
|
|
|
#define SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM 128
|
2009-04-23 13:32:49 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_607FM_MK3 129
|
2008-01-07 16:17:39 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_M6 130
|
2008-01-21 06:27:51 +08:00
|
|
|
#define SAA7134_BOARD_TWINHAN_DTV_DVB_3056 131
|
2008-04-23 01:42:11 +08:00
|
|
|
#define SAA7134_BOARD_GENIUS_TVGO_A11MCE 132
|
|
|
|
#define SAA7134_BOARD_PHILIPS_SNAKE 133
|
2008-04-23 01:42:12 +08:00
|
|
|
#define SAA7134_BOARD_CREATIX_CTX953 134
|
2008-04-23 01:42:12 +08:00
|
|
|
#define SAA7134_BOARD_MSI_TVANYWHERE_AD11 135
|
2008-04-23 01:45:27 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_CARDBUS_506 136
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_A16D 137
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_M115 138
|
|
|
|
#define SAA7134_BOARD_VIDEOMATE_T750 139
|
2008-04-09 08:45:08 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_A700_PRO 140
|
|
|
|
#define SAA7134_BOARD_AVERMEDIA_A700_HYBRID 141
|
2008-04-27 01:53:48 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_H6 142
|
2008-06-11 01:22:00 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_M63 143
|
|
|
|
#define SAA7134_BOARD_BEHOLD_M6_EXTRA 144
|
2008-07-12 00:48:02 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_M103 145
|
2008-07-12 23:27:59 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTeK_P7131_ANALOG 146
|
V4L/DVB (9028): saa7134: add support for the triple Asus Tiger 3in1
after looking it up, all rants about the 80 columns restriction seem to
be in vain. After changing the card's name it are now "only" seven new
lines in the tiny DVB-T/DVB-S switch function.
saa7130/34: v4l2 driver version 0.2.14 loaded
saa7133[0]: found at 0000:02:08.0, rev: 209, irq: 18, latency: 32, mmio: 0xfdef7000
saa7133[0]: subsystem: 1043:4878, board: Asus Tiger 3in1 [card=147,autodetected]
saa7133[0]: board init: gpio is 200000
tuner' 2-004b: chip found @ 0x96 (saa7133[0])
saa7133[0]: i2c eeprom 00: 43 10 78 48 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
saa7133[0]: i2c eeprom 10: ff ff ff 0f ff 20 ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: 01 40 01 02 03 01 01 03 08 ff 00 d7 ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff 28 00 c2 96 16 03 02 c0 1c ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c scan: found device @ 0x10 [???]
saa7133[0]: i2c scan: found device @ 0x16 [???]
saa7133[0]: i2c scan: found device @ 0x1c [???]
saa7133[0]: i2c scan: found device @ 0x96 [???]
saa7133[0]: i2c scan: found device @ 0xa0 [eeprom]
tda829x 2-004b: setting tuner address to 61
tda829x 2-004b: type set to tda8290+75a
saa7133[0]: registered device video0 [v4l2]
saa7133[0]: registered device vbi0
saa7133[0]: registered device radio0
DVB: registering new adapter (saa7133[0])
DVB: registering frontend 0 (Philips TDA10086 DVB-S)...
The board init gpio is 0x0, 0x200000 is from previously unloading with
antenna_switch = 1.
It needs firmware for the tda10046 and analog sound needs saa7134-alsa.
I have support for one more board and need to fix the first revision of
the Asus Tiger DVB-T hybrid. DVB-T currently hangs on the male radio
antenna input, also some small other stuff.
Please report any issues with this patch, the next are depending on this
one.
saa7134: add support for the triple Asus Tiger 3in1
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-15 04:49:14 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTeK_TIGER_3IN1 147
|
2008-06-27 04:03:00 +08:00
|
|
|
#define SAA7134_BOARD_ENCORE_ENLTV_FM53 148
|
2008-06-27 04:03:00 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_M135A 149
|
2008-05-06 14:20:27 +08:00
|
|
|
#define SAA7134_BOARD_REAL_ANGEL_220 150
|
|
|
|
#define SAA7134_BOARD_ADS_INSTANT_HDTV_PCI 151
|
2008-10-05 08:37:36 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTeK_TIGER 152
|
2008-12-08 00:19:29 +08:00
|
|
|
#define SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG 153
|
2008-12-31 10:26:09 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS 154
|
2009-08-04 03:51:33 +08:00
|
|
|
#define SAA7134_BOARD_HAUPPAUGE_HVR1150 155
|
2009-08-04 03:51:33 +08:00
|
|
|
#define SAA7134_BOARD_HAUPPAUGE_HVR1120 156
|
2009-04-09 01:01:19 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_STUDIO_507UA 157
|
2009-04-15 02:47:17 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_CARDBUS_501 158
|
2009-12-21 13:00:38 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_505RDS_MK5 159
|
2009-04-23 13:32:49 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_507RDS_MK3 160
|
|
|
|
#define SAA7134_BOARD_BEHOLD_507RDS_MK5 161
|
|
|
|
#define SAA7134_BOARD_BEHOLD_607FM_MK5 162
|
|
|
|
#define SAA7134_BOARD_BEHOLD_609FM_MK3 163
|
|
|
|
#define SAA7134_BOARD_BEHOLD_609FM_MK5 164
|
|
|
|
#define SAA7134_BOARD_BEHOLD_607RDS_MK3 165
|
|
|
|
#define SAA7134_BOARD_BEHOLD_607RDS_MK5 166
|
|
|
|
#define SAA7134_BOARD_BEHOLD_609RDS_MK3 167
|
|
|
|
#define SAA7134_BOARD_BEHOLD_609RDS_MK5 168
|
2009-08-14 08:42:21 +08:00
|
|
|
#define SAA7134_BOARD_VIDEOMATE_S350 169
|
2009-08-27 09:10:55 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_STUDIO_505 170
|
2009-08-26 12:01:12 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_X7 171
|
2009-08-29 20:32:11 +08:00
|
|
|
#define SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM 172
|
2009-09-19 07:44:37 +08:00
|
|
|
#define SAA7134_BOARD_ZOLID_HYBRID_PCI 173
|
2009-09-20 23:14:21 +08:00
|
|
|
#define SAA7134_BOARD_ASUS_EUROPA_HYBRID 174
|
2009-06-05 15:28:28 +08:00
|
|
|
#define SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S 175
|
2009-12-21 13:00:38 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_505RDS_MK3 176
|
2010-03-10 23:44:57 +08:00
|
|
|
#define SAA7134_BOARD_HAWELL_HW_404M7 177
|
2010-04-06 12:00:05 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_H7 178
|
|
|
|
#define SAA7134_BOARD_BEHOLD_A7 179
|
2010-05-08 13:23:37 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_M733A 180
|
2010-05-29 23:49:16 +08:00
|
|
|
#define SAA7134_BOARD_TECHNOTREND_BUDGET_T3000 181
|
2010-10-03 16:27:59 +08:00
|
|
|
#define SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG 182
|
2010-12-27 05:13:30 +08:00
|
|
|
#define SAA7134_BOARD_VIDEOMATE_M1F 183
|
2011-01-20 02:25:17 +08:00
|
|
|
#define SAA7134_BOARD_ENCORE_ENLTV_FM3 184
|
2011-03-26 02:00:33 +08:00
|
|
|
#define SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2 185
|
2011-05-17 12:21:34 +08:00
|
|
|
#define SAA7134_BOARD_BEHOLD_501 186
|
|
|
|
#define SAA7134_BOARD_BEHOLD_503FM 187
|
2011-10-25 06:46:52 +08:00
|
|
|
#define SAA7134_BOARD_SENSORAY811_911 188
|
2012-02-18 13:24:53 +08:00
|
|
|
#define SAA7134_BOARD_KWORLD_PC150U 189
|
2012-05-19 17:11:47 +08:00
|
|
|
#define SAA7134_BOARD_ASUSTeK_PS3_100 190
|
2013-01-30 16:14:59 +08:00
|
|
|
#define SAA7134_BOARD_HAWELL_HW_9004V1 191
|
2013-04-07 01:28:16 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_A706 192
|
2014-09-21 17:52:03 +08:00
|
|
|
#define SAA7134_BOARD_WIS_VOYAGER 193
|
2015-05-22 02:53:01 +08:00
|
|
|
#define SAA7134_BOARD_AVERMEDIA_505 194
|
2015-08-28 06:18:54 +08:00
|
|
|
#define SAA7134_BOARD_LEADTEK_WINFAST_TV2100_FM 195
|
2016-02-15 05:23:15 +08:00
|
|
|
#define SAA7134_BOARD_SNAZIO_TVPVR_PRO 196
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2008-03-20 09:17:24 +08:00
|
|
|
#define SAA7134_MAXBOARDS 32
|
2005-04-17 06:20:36 +08:00
|
|
|
#define SAA7134_INPUT_MAX 8
|
|
|
|
|
2005-11-09 13:38:47 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* Since we support 2 remote types, lets tell them apart */
|
|
|
|
|
|
|
|
#define SAA7134_REMOTE_GPIO 1
|
|
|
|
#define SAA7134_REMOTE_I2C 2
|
|
|
|
|
2005-11-09 13:37:10 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* Video Output Port Register Initialization Options */
|
|
|
|
|
|
|
|
#define SET_T_CODE_POLARITY_NON_INVERTED (1 << 0)
|
|
|
|
#define SET_CLOCK_NOT_DELAYED (1 << 1)
|
|
|
|
#define SET_CLOCK_INVERTED (1 << 2)
|
|
|
|
#define SET_VSYNC_OFF (1 << 3)
|
|
|
|
|
2016-02-05 20:24:37 +08:00
|
|
|
enum saa7134_input_types {
|
|
|
|
SAA7134_NO_INPUT = 0,
|
|
|
|
SAA7134_INPUT_MUTE,
|
|
|
|
SAA7134_INPUT_RADIO,
|
|
|
|
SAA7134_INPUT_TV,
|
|
|
|
SAA7134_INPUT_TV_MONO,
|
|
|
|
SAA7134_INPUT_COMPOSITE,
|
|
|
|
SAA7134_INPUT_COMPOSITE0,
|
|
|
|
SAA7134_INPUT_COMPOSITE1,
|
|
|
|
SAA7134_INPUT_COMPOSITE2,
|
|
|
|
SAA7134_INPUT_COMPOSITE3,
|
|
|
|
SAA7134_INPUT_COMPOSITE4,
|
|
|
|
SAA7134_INPUT_SVIDEO,
|
|
|
|
SAA7134_INPUT_SVIDEO0,
|
|
|
|
SAA7134_INPUT_SVIDEO1,
|
|
|
|
SAA7134_INPUT_COMPOSITE_OVER_SVIDEO,
|
|
|
|
};
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
struct saa7134_input {
|
2016-02-05 20:24:37 +08:00
|
|
|
enum saa7134_input_types type;
|
|
|
|
unsigned int vmux;
|
|
|
|
enum saa7134_audio_in amux;
|
|
|
|
unsigned int gpio;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum saa7134_mpeg_type {
|
|
|
|
SAA7134_MPEG_UNUSED,
|
|
|
|
SAA7134_MPEG_EMPRESS,
|
|
|
|
SAA7134_MPEG_DVB,
|
2014-09-21 17:52:03 +08:00
|
|
|
SAA7134_MPEG_GO7007,
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2009-01-13 15:03:26 +08:00
|
|
|
enum saa7134_mpeg_ts_type {
|
|
|
|
SAA7134_MPEG_TS_PARALLEL = 0,
|
|
|
|
SAA7134_MPEG_TS_SERIAL,
|
|
|
|
};
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
struct saa7134_board {
|
|
|
|
char *name;
|
|
|
|
unsigned int audio_clock;
|
|
|
|
|
|
|
|
/* input switching */
|
|
|
|
unsigned int gpiomask;
|
|
|
|
struct saa7134_input inputs[SAA7134_INPUT_MAX];
|
|
|
|
struct saa7134_input radio;
|
|
|
|
struct saa7134_input mute;
|
|
|
|
|
|
|
|
/* i2c chip info */
|
|
|
|
unsigned int tuner_type;
|
2005-07-13 04:59:01 +08:00
|
|
|
unsigned int radio_type;
|
|
|
|
unsigned char tuner_addr;
|
|
|
|
unsigned char radio_addr;
|
2009-03-28 20:27:02 +08:00
|
|
|
unsigned char empress_addr;
|
2009-03-29 17:26:27 +08:00
|
|
|
unsigned char rds_addr;
|
2005-07-13 04:59:01 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int tda9887_conf;
|
2013-04-07 01:21:36 +08:00
|
|
|
struct tda829x_config tda829x_conf;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* peripheral I/O */
|
|
|
|
enum saa7134_video_out video_out;
|
|
|
|
enum saa7134_mpeg_type mpeg;
|
2009-01-13 15:03:26 +08:00
|
|
|
enum saa7134_mpeg_ts_type ts_type;
|
2005-11-09 13:37:10 +08:00
|
|
|
unsigned int vid_port_opts;
|
2009-11-05 01:19:35 +08:00
|
|
|
unsigned int ts_force_val:1;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2016-02-05 20:24:37 +08:00
|
|
|
#define card_has_radio(dev) (SAA7134_NO_INPUT != saa7134_boards[dev->board].radio.type)
|
2005-04-17 06:20:36 +08:00
|
|
|
#define card_is_empress(dev) (SAA7134_MPEG_EMPRESS == saa7134_boards[dev->board].mpeg)
|
|
|
|
#define card_is_dvb(dev) (SAA7134_MPEG_DVB == saa7134_boards[dev->board].mpeg)
|
2014-09-21 17:52:03 +08:00
|
|
|
#define card_is_go7007(dev) (SAA7134_MPEG_GO7007 == saa7134_boards[dev->board].mpeg)
|
2005-04-17 06:20:36 +08:00
|
|
|
#define card_has_mpeg(dev) (SAA7134_MPEG_UNUSED != saa7134_boards[dev->board].mpeg)
|
|
|
|
#define card(dev) (saa7134_boards[dev->board])
|
|
|
|
#define card_in(dev,n) (saa7134_boards[dev->board].inputs[n])
|
|
|
|
|
2013-12-14 19:28:24 +08:00
|
|
|
#define V4L2_CID_PRIVATE_INVERT (V4L2_CID_USER_SAA7134_BASE + 0)
|
|
|
|
#define V4L2_CID_PRIVATE_Y_ODD (V4L2_CID_USER_SAA7134_BASE + 1)
|
|
|
|
#define V4L2_CID_PRIVATE_Y_EVEN (V4L2_CID_USER_SAA7134_BASE + 2)
|
|
|
|
#define V4L2_CID_PRIVATE_AUTOMUTE (V4L2_CID_USER_SAA7134_BASE + 3)
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* device / file handle status */
|
|
|
|
|
|
|
|
#define RESOURCE_OVERLAY 1
|
|
|
|
#define RESOURCE_VIDEO 2
|
|
|
|
#define RESOURCE_VBI 4
|
2013-12-14 19:28:27 +08:00
|
|
|
#define RESOURCE_EMPRESS 8
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define INTERLACE_AUTO 0
|
|
|
|
#define INTERLACE_ON 1
|
|
|
|
#define INTERLACE_OFF 2
|
|
|
|
|
2007-07-18 03:36:20 +08:00
|
|
|
#define BUFFER_TIMEOUT msecs_to_jiffies(500) /* 0.5 seconds */
|
2009-04-28 17:41:08 +08:00
|
|
|
#define TS_BUFFER_TIMEOUT msecs_to_jiffies(1000) /* 1 second */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
struct saa7134_dev;
|
|
|
|
struct saa7134_dma;
|
|
|
|
|
|
|
|
/* saa7134 page table */
|
|
|
|
struct saa7134_pgtable {
|
|
|
|
unsigned int size;
|
2005-06-24 13:04:37 +08:00
|
|
|
__le32 *cpu;
|
2005-04-17 06:20:36 +08:00
|
|
|
dma_addr_t dma;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* tvaudio thread status */
|
|
|
|
struct saa7134_thread {
|
2007-06-02 07:15:26 +08:00
|
|
|
struct task_struct *thread;
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int scan1;
|
|
|
|
unsigned int scan2;
|
|
|
|
unsigned int mode;
|
2007-10-13 16:35:33 +08:00
|
|
|
unsigned int stopped;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* buffer for one video/vbi/ts frame */
|
|
|
|
struct saa7134_buf {
|
|
|
|
/* common v4l buffer stuff -- must be first */
|
[media] media: videobuf2: Restructure vb2_buffer
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer.
Add new member variables - bytesused, length, offset, userptr, fd,
data_offset - to struct vb2_plane in order to cover all information
of v4l2_plane.
struct vb2_plane {
<snip>
unsigned int bytesused;
unsigned int length;
union {
unsigned int offset;
unsigned long userptr;
int fd;
} m;
unsigned int data_offset;
}
Replace v4l2_buf with new member variables - index, type, memory - which
are common fields for buffer management.
struct vb2_buffer {
<snip>
unsigned int index;
unsigned int type;
unsigned int memory;
unsigned int num_planes;
struct vb2_plane planes[VIDEO_MAX_PLANES];
<snip>
};
v4l2 specific fields - flags, field, timestamp, timecode,
sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c
struct vb2_v4l2_buffer {
struct vb2_buffer vb2_buf;
__u32 flags;
__u32 field;
struct timeval timestamp;
struct v4l2_timecode timecode;
__u32 sequence;
};
Signed-off-by: Junghak Sung <jh1009.sung@samsung.com>
Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-22 21:30:30 +08:00
|
|
|
struct vb2_v4l2_buffer vb2;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* saa7134 specific */
|
|
|
|
unsigned int top_seen;
|
|
|
|
int (*activate)(struct saa7134_dev *dev,
|
|
|
|
struct saa7134_buf *buf,
|
|
|
|
struct saa7134_buf *next);
|
2014-04-17 18:30:53 +08:00
|
|
|
|
|
|
|
struct list_head entry;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct saa7134_dmaqueue {
|
|
|
|
struct saa7134_dev *dev;
|
|
|
|
struct saa7134_buf *curr;
|
|
|
|
struct list_head queue;
|
|
|
|
struct timer_list timeout;
|
|
|
|
unsigned int need_two;
|
2014-04-17 18:30:53 +08:00
|
|
|
unsigned int seq_nr;
|
2014-04-17 17:06:06 +08:00
|
|
|
struct saa7134_pgtable pt;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2005-11-09 13:38:54 +08:00
|
|
|
/* dmasound dsp status */
|
|
|
|
struct saa7134_dmasound {
|
2006-02-07 16:49:14 +08:00
|
|
|
struct mutex lock;
|
2005-04-17 06:20:36 +08:00
|
|
|
int minor_mixer;
|
|
|
|
int minor_dsp;
|
|
|
|
unsigned int users_dsp;
|
|
|
|
|
|
|
|
/* mixer */
|
|
|
|
enum saa7134_audio_in input;
|
|
|
|
unsigned int count;
|
|
|
|
unsigned int line1;
|
|
|
|
unsigned int line2;
|
|
|
|
|
|
|
|
/* dsp */
|
|
|
|
unsigned int afmt;
|
|
|
|
unsigned int rate;
|
|
|
|
unsigned int channels;
|
|
|
|
unsigned int recording_on;
|
|
|
|
unsigned int dma_running;
|
|
|
|
unsigned int blocks;
|
|
|
|
unsigned int blksize;
|
|
|
|
unsigned int bufsize;
|
|
|
|
struct saa7134_pgtable pt;
|
2014-04-17 14:57:14 +08:00
|
|
|
void *vaddr;
|
|
|
|
struct scatterlist *sglist;
|
|
|
|
int sglen;
|
|
|
|
int nr_pages;
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int dma_blk;
|
|
|
|
unsigned int read_offset;
|
|
|
|
unsigned int read_count;
|
2005-11-14 08:08:00 +08:00
|
|
|
void * priv_data;
|
2006-01-14 01:48:06 +08:00
|
|
|
struct snd_pcm_substream *substream;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* ts/mpeg status */
|
|
|
|
struct saa7134_ts {
|
|
|
|
/* TS capture */
|
|
|
|
int nr_packets;
|
|
|
|
int nr_bufs;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ts/mpeg ops */
|
|
|
|
struct saa7134_mpeg_ops {
|
|
|
|
enum saa7134_mpeg_type type;
|
|
|
|
struct list_head next;
|
|
|
|
int (*init)(struct saa7134_dev *dev);
|
|
|
|
int (*fini)(struct saa7134_dev *dev);
|
|
|
|
void (*signal_change)(struct saa7134_dev *dev);
|
2014-09-21 17:52:03 +08:00
|
|
|
void (*irq_ts_done)(struct saa7134_dev *dev,
|
|
|
|
unsigned long status);
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2018-08-01 18:20:27 +08:00
|
|
|
enum saa7134_pads {
|
|
|
|
SAA7134_PAD_IF_INPUT,
|
|
|
|
SAA7134_PAD_VID_OUT,
|
|
|
|
SAA7134_NUM_PADS
|
|
|
|
};
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* global device status */
|
|
|
|
struct saa7134_dev {
|
|
|
|
struct list_head devlist;
|
2006-02-07 16:49:14 +08:00
|
|
|
struct mutex lock;
|
2005-11-09 13:37:43 +08:00
|
|
|
spinlock_t slock;
|
2009-01-17 23:17:14 +08:00
|
|
|
struct v4l2_device v4l2_dev;
|
2007-04-27 23:31:17 +08:00
|
|
|
/* workstruct for loading modules */
|
|
|
|
struct work_struct request_module_wk;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2006-10-31 06:56:59 +08:00
|
|
|
/* insmod option/autodetected */
|
|
|
|
int autodetected;
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* various device info */
|
|
|
|
unsigned int resources;
|
|
|
|
struct video_device *video_dev;
|
|
|
|
struct video_device *radio_dev;
|
|
|
|
struct video_device *vbi_dev;
|
2005-11-09 13:38:54 +08:00
|
|
|
struct saa7134_dmasound dmasound;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* infrared remote */
|
|
|
|
int has_remote;
|
2010-11-20 07:42:51 +08:00
|
|
|
struct saa7134_card_ir *remote;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* pci i/o */
|
|
|
|
char name[32];
|
|
|
|
int nr;
|
|
|
|
struct pci_dev *pci;
|
|
|
|
unsigned char pci_rev,pci_lat;
|
|
|
|
__u32 __iomem *lmmio;
|
|
|
|
__u8 __iomem *bmmio;
|
|
|
|
|
|
|
|
/* config info */
|
|
|
|
unsigned int board;
|
|
|
|
unsigned int tuner_type;
|
2018-01-05 02:08:56 +08:00
|
|
|
unsigned int radio_type;
|
2005-07-13 04:59:01 +08:00
|
|
|
unsigned char tuner_addr;
|
|
|
|
unsigned char radio_addr;
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int tda9887_conf;
|
|
|
|
unsigned int gpio_value;
|
|
|
|
|
|
|
|
/* i2c i/o */
|
|
|
|
struct i2c_adapter i2c_adap;
|
|
|
|
struct i2c_client i2c_client;
|
2007-11-15 21:34:33 +08:00
|
|
|
unsigned char eedata[256];
|
2018-01-05 02:08:56 +08:00
|
|
|
int has_rds;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* video overlay */
|
|
|
|
struct v4l2_framebuffer ovbuf;
|
|
|
|
struct saa7134_format *ovfmt;
|
|
|
|
unsigned int ovenable;
|
|
|
|
enum v4l2_field ovfield;
|
2013-05-31 19:22:24 +08:00
|
|
|
struct v4l2_window win;
|
|
|
|
struct v4l2_clip clips[8];
|
|
|
|
unsigned int nclips;
|
2014-04-17 18:30:53 +08:00
|
|
|
struct v4l2_fh *overlay_owner;
|
2013-05-31 19:22:24 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* video+ts+vbi capture */
|
|
|
|
struct saa7134_dmaqueue video_q;
|
2014-04-17 18:30:53 +08:00
|
|
|
struct vb2_queue video_vbq;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct saa7134_dmaqueue vbi_q;
|
2014-04-17 18:30:53 +08:00
|
|
|
struct vb2_queue vbi_vbq;
|
|
|
|
enum v4l2_field field;
|
2013-05-31 19:30:49 +08:00
|
|
|
struct saa7134_format *fmt;
|
|
|
|
unsigned int width, height;
|
2014-04-17 15:55:43 +08:00
|
|
|
unsigned int vbi_hlen, vbi_vlen;
|
2013-05-31 19:44:58 +08:00
|
|
|
struct pm_qos_request qos_request;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2014-04-17 18:30:53 +08:00
|
|
|
/* SAA7134_MPEG_* */
|
|
|
|
struct saa7134_ts ts;
|
|
|
|
struct saa7134_dmaqueue ts_q;
|
|
|
|
enum v4l2_field ts_field;
|
|
|
|
int ts_started;
|
|
|
|
struct saa7134_mpeg_ops *mops;
|
|
|
|
|
|
|
|
/* SAA7134_MPEG_EMPRESS only */
|
|
|
|
struct video_device *empress_dev;
|
|
|
|
struct v4l2_subdev *empress_sd;
|
|
|
|
struct vb2_queue empress_vbq;
|
|
|
|
struct work_struct empress_workqueue;
|
|
|
|
int empress_started;
|
|
|
|
struct v4l2_ctrl_handler empress_ctrl_handler;
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* various v4l controls */
|
|
|
|
struct saa7134_tvnorm *tvnorm; /* video */
|
|
|
|
struct saa7134_tvaudio *tvaudio;
|
2013-12-14 19:28:24 +08:00
|
|
|
struct v4l2_ctrl_handler ctrl_handler;
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int ctl_input;
|
|
|
|
int ctl_bright;
|
|
|
|
int ctl_contrast;
|
|
|
|
int ctl_hue;
|
|
|
|
int ctl_saturation;
|
|
|
|
int ctl_mute; /* audio */
|
|
|
|
int ctl_volume;
|
|
|
|
int ctl_invert; /* private */
|
|
|
|
int ctl_mirror;
|
|
|
|
int ctl_y_odd;
|
|
|
|
int ctl_y_even;
|
|
|
|
int ctl_automute;
|
|
|
|
|
|
|
|
/* crop */
|
|
|
|
struct v4l2_rect crop_bounds;
|
|
|
|
struct v4l2_rect crop_defrect;
|
|
|
|
struct v4l2_rect crop_current;
|
|
|
|
|
|
|
|
/* other global state info */
|
|
|
|
unsigned int automute;
|
|
|
|
struct saa7134_thread thread;
|
|
|
|
struct saa7134_input *input;
|
|
|
|
struct saa7134_input *hw_input;
|
|
|
|
unsigned int hw_mute;
|
|
|
|
int last_carrier;
|
|
|
|
int nosignal;
|
2007-10-12 11:57:15 +08:00
|
|
|
unsigned int insuspend;
|
2013-12-14 19:28:24 +08:00
|
|
|
struct v4l2_ctrl_handler radio_ctrl_handler;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2009-09-07 13:22:01 +08:00
|
|
|
/* I2C keyboard data */
|
|
|
|
struct IR_i2c_init_data init_data;
|
|
|
|
|
2016-02-05 18:33:04 +08:00
|
|
|
#ifdef CONFIG_MEDIA_CONTROLLER
|
|
|
|
struct media_device *media_dev;
|
|
|
|
|
|
|
|
struct media_entity input_ent[SAA7134_INPUT_MAX + 1];
|
|
|
|
struct media_pad input_pad[SAA7134_INPUT_MAX + 1];
|
|
|
|
|
|
|
|
struct media_entity demod;
|
2018-08-01 18:20:27 +08:00
|
|
|
struct media_pad demod_pad[SAA7134_NUM_PADS];
|
2016-02-05 18:33:04 +08:00
|
|
|
|
|
|
|
struct media_pad video_pad, vbi_pad;
|
|
|
|
struct media_entity *decoder;
|
|
|
|
#endif
|
|
|
|
|
2013-01-20 06:41:09 +08:00
|
|
|
#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB)
|
2005-04-17 06:20:36 +08:00
|
|
|
/* SAA7134_MPEG_DVB only */
|
2014-04-17 18:30:53 +08:00
|
|
|
struct vb2_dvb_frontends frontends;
|
2008-04-23 01:42:12 +08:00
|
|
|
int (*original_demod_sleep)(struct dvb_frontend *fe);
|
2015-06-08 01:53:52 +08:00
|
|
|
int (*original_set_voltage)(struct dvb_frontend *fe,
|
|
|
|
enum fe_sec_voltage voltage);
|
2008-04-23 01:42:12 +08:00
|
|
|
int (*original_set_high_voltage)(struct dvb_frontend *fe, long arg);
|
2007-01-31 10:26:01 +08:00
|
|
|
#endif
|
2009-01-19 19:01:24 +08:00
|
|
|
void (*gate_ctrl)(struct saa7134_dev *dev, int open);
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
|
|
|
|
#define saa_readl(reg) readl(dev->lmmio + (reg))
|
|
|
|
#define saa_writel(reg,value) writel((value), dev->lmmio + (reg));
|
|
|
|
#define saa_andorl(reg,mask,value) \
|
|
|
|
writel((readl(dev->lmmio+(reg)) & ~(mask)) |\
|
|
|
|
((value) & (mask)), dev->lmmio+(reg))
|
|
|
|
#define saa_setl(reg,bit) saa_andorl((reg),(bit),(bit))
|
|
|
|
#define saa_clearl(reg,bit) saa_andorl((reg),(bit),0)
|
|
|
|
|
|
|
|
#define saa_readb(reg) readb(dev->bmmio + (reg))
|
|
|
|
#define saa_writeb(reg,value) writeb((value), dev->bmmio + (reg));
|
|
|
|
#define saa_andorb(reg,mask,value) \
|
|
|
|
writeb((readb(dev->bmmio+(reg)) & ~(mask)) |\
|
|
|
|
((value) & (mask)), dev->bmmio+(reg))
|
|
|
|
#define saa_setb(reg,bit) saa_andorb((reg),(bit),(bit))
|
|
|
|
#define saa_clearb(reg,bit) saa_andorb((reg),(bit),0)
|
|
|
|
|
|
|
|
#define saa_wait(us) { udelay(us); }
|
|
|
|
|
2007-12-11 23:56:23 +08:00
|
|
|
#define SAA7134_NORMS (\
|
|
|
|
V4L2_STD_PAL | V4L2_STD_PAL_N | \
|
|
|
|
V4L2_STD_PAL_Nc | V4L2_STD_SECAM | \
|
|
|
|
V4L2_STD_NTSC | V4L2_STD_PAL_M | \
|
|
|
|
V4L2_STD_PAL_60)
|
|
|
|
|
2009-01-17 23:17:14 +08:00
|
|
|
#define GRP_EMPRESS (1)
|
2009-01-19 19:01:24 +08:00
|
|
|
#define saa_call_all(dev, o, f, args...) do { \
|
|
|
|
if (dev->gate_ctrl) \
|
|
|
|
dev->gate_ctrl(dev, 1); \
|
|
|
|
v4l2_device_call_all(&(dev)->v4l2_dev, 0, o, f , ##args); \
|
|
|
|
if (dev->gate_ctrl) \
|
|
|
|
dev->gate_ctrl(dev, 0); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define saa_call_empress(dev, o, f, args...) ({ \
|
|
|
|
long _rc; \
|
|
|
|
if (dev->gate_ctrl) \
|
|
|
|
dev->gate_ctrl(dev, 1); \
|
|
|
|
_rc = v4l2_device_call_until_err(&(dev)->v4l2_dev, \
|
|
|
|
GRP_EMPRESS, o, f , ##args); \
|
|
|
|
if (dev->gate_ctrl) \
|
|
|
|
dev->gate_ctrl(dev, 0); \
|
|
|
|
_rc; \
|
|
|
|
})
|
2009-01-17 23:17:14 +08:00
|
|
|
|
2014-04-17 18:30:53 +08:00
|
|
|
static inline bool is_empress(struct file *file)
|
2013-12-14 19:28:27 +08:00
|
|
|
{
|
2014-04-17 18:30:53 +08:00
|
|
|
struct video_device *vdev = video_devdata(file);
|
|
|
|
struct saa7134_dev *dev = video_get_drvdata(vdev);
|
2013-12-14 19:28:27 +08:00
|
|
|
|
2014-04-17 18:30:53 +08:00
|
|
|
return vdev->queue == &dev->empress_vbq;
|
2013-12-14 19:28:27 +08:00
|
|
|
}
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-core.c */
|
|
|
|
|
|
|
|
extern struct list_head saa7134_devlist;
|
2009-02-09 23:27:03 +08:00
|
|
|
extern struct mutex saa7134_devlist_lock;
|
2006-03-18 07:54:32 +08:00
|
|
|
extern int saa7134_no_overlay;
|
2014-04-17 17:44:31 +08:00
|
|
|
extern bool saa7134_userptr;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2016-02-05 20:24:37 +08:00
|
|
|
void saa7134_track_gpio(struct saa7134_dev *dev, const char *msg);
|
2007-04-27 23:31:11 +08:00
|
|
|
void saa7134_set_gpio(struct saa7134_dev *dev, int bit_no, int value);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define SAA7134_PGTABLE_SIZE 4096
|
|
|
|
|
|
|
|
int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt);
|
|
|
|
int saa7134_pgtable_build(struct pci_dev *pci, struct saa7134_pgtable *pt,
|
|
|
|
struct scatterlist *list, unsigned int length,
|
|
|
|
unsigned int startpage);
|
|
|
|
void saa7134_pgtable_free(struct pci_dev *pci, struct saa7134_pgtable *pt);
|
|
|
|
|
|
|
|
int saa7134_buffer_count(unsigned int size, unsigned int count);
|
|
|
|
int saa7134_buffer_startpage(struct saa7134_buf *buf);
|
|
|
|
unsigned long saa7134_buffer_base(struct saa7134_buf *buf);
|
|
|
|
|
|
|
|
int saa7134_buffer_queue(struct saa7134_dev *dev, struct saa7134_dmaqueue *q,
|
|
|
|
struct saa7134_buf *buf);
|
|
|
|
void saa7134_buffer_finish(struct saa7134_dev *dev, struct saa7134_dmaqueue *q,
|
|
|
|
unsigned int state);
|
|
|
|
void saa7134_buffer_next(struct saa7134_dev *dev, struct saa7134_dmaqueue *q);
|
2017-10-17 07:11:30 +08:00
|
|
|
void saa7134_buffer_timeout(struct timer_list *t);
|
2014-04-17 18:30:53 +08:00
|
|
|
void saa7134_stop_streaming(struct saa7134_dev *dev, struct saa7134_dmaqueue *q);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int saa7134_set_dmabits(struct saa7134_dev *dev);
|
|
|
|
|
2006-07-16 02:19:56 +08:00
|
|
|
extern int (*saa7134_dmasound_init)(struct saa7134_dev *dev);
|
|
|
|
extern int (*saa7134_dmasound_exit)(struct saa7134_dev *dev);
|
2005-12-01 16:51:20 +08:00
|
|
|
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-cards.c */
|
|
|
|
|
|
|
|
extern struct saa7134_board saa7134_boards[];
|
2016-02-05 20:24:37 +08:00
|
|
|
extern const char * const saa7134_input_name[];
|
2005-04-17 06:20:36 +08:00
|
|
|
extern const unsigned int saa7134_bcount;
|
2012-12-22 05:17:53 +08:00
|
|
|
extern struct pci_device_id saa7134_pci_tbl[];
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
extern int saa7134_board_init1(struct saa7134_dev *dev);
|
|
|
|
extern int saa7134_board_init2(struct saa7134_dev *dev);
|
2008-09-13 00:31:45 +08:00
|
|
|
int saa7134_tuner_callback(void *priv, int component, int command, int arg);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-i2c.c */
|
|
|
|
|
|
|
|
int saa7134_i2c_register(struct saa7134_dev *dev);
|
|
|
|
int saa7134_i2c_unregister(struct saa7134_dev *dev);
|
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-video.c */
|
|
|
|
|
2007-12-08 04:34:48 +08:00
|
|
|
extern unsigned int video_debug;
|
2005-04-17 06:20:36 +08:00
|
|
|
extern struct video_device saa7134_video_template;
|
|
|
|
extern struct video_device saa7134_radio_template;
|
|
|
|
|
2014-04-17 18:30:53 +08:00
|
|
|
void saa7134_vb2_buffer_queue(struct vb2_buffer *vb);
|
|
|
|
int saa7134_vb2_start_streaming(struct vb2_queue *vq, unsigned int count);
|
|
|
|
void saa7134_vb2_stop_streaming(struct vb2_queue *vq);
|
|
|
|
|
2013-12-14 19:28:25 +08:00
|
|
|
int saa7134_s_std(struct file *file, void *priv, v4l2_std_id id);
|
|
|
|
int saa7134_g_std(struct file *file, void *priv, v4l2_std_id *id);
|
2014-04-01 20:28:17 +08:00
|
|
|
int saa7134_querystd(struct file *file, void *priv, v4l2_std_id *std);
|
2013-12-14 19:28:25 +08:00
|
|
|
int saa7134_enum_input(struct file *file, void *priv, struct v4l2_input *i);
|
|
|
|
int saa7134_g_input(struct file *file, void *priv, unsigned int *i);
|
|
|
|
int saa7134_s_input(struct file *file, void *priv, unsigned int i);
|
|
|
|
int saa7134_querycap(struct file *file, void *priv,
|
|
|
|
struct v4l2_capability *cap);
|
|
|
|
int saa7134_g_tuner(struct file *file, void *priv,
|
|
|
|
struct v4l2_tuner *t);
|
|
|
|
int saa7134_s_tuner(struct file *file, void *priv,
|
|
|
|
const struct v4l2_tuner *t);
|
|
|
|
int saa7134_g_frequency(struct file *file, void *priv,
|
|
|
|
struct v4l2_frequency *f);
|
|
|
|
int saa7134_s_frequency(struct file *file, void *priv,
|
|
|
|
const struct v4l2_frequency *f);
|
2007-12-11 23:56:23 +08:00
|
|
|
|
2007-09-28 07:34:25 +08:00
|
|
|
int saa7134_videoport_init(struct saa7134_dev *dev);
|
2007-10-12 11:57:15 +08:00
|
|
|
void saa7134_set_tvnorm_hw(struct saa7134_dev *dev);
|
2007-09-28 07:34:25 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
int saa7134_video_init1(struct saa7134_dev *dev);
|
|
|
|
int saa7134_video_init2(struct saa7134_dev *dev);
|
2007-09-28 07:44:39 +08:00
|
|
|
void saa7134_irq_video_signalchange(struct saa7134_dev *dev);
|
2005-04-17 06:20:36 +08:00
|
|
|
void saa7134_irq_video_done(struct saa7134_dev *dev, unsigned long status);
|
2013-12-14 19:28:23 +08:00
|
|
|
void saa7134_video_fini(struct saa7134_dev *dev);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-ts.c */
|
|
|
|
|
|
|
|
#define TS_PACKET_SIZE 188 /* TS packets 188 bytes */
|
|
|
|
|
2014-04-17 18:30:53 +08:00
|
|
|
int saa7134_ts_buffer_init(struct vb2_buffer *vb2);
|
|
|
|
int saa7134_ts_buffer_prepare(struct vb2_buffer *vb2);
|
2015-10-28 10:50:37 +08:00
|
|
|
int saa7134_ts_queue_setup(struct vb2_queue *q,
|
2014-04-17 18:30:53 +08:00
|
|
|
unsigned int *nbuffers, unsigned int *nplanes,
|
2016-04-15 20:15:05 +08:00
|
|
|
unsigned int sizes[], struct device *alloc_devs[]);
|
2014-04-17 18:30:53 +08:00
|
|
|
int saa7134_ts_start_streaming(struct vb2_queue *vq, unsigned int count);
|
|
|
|
void saa7134_ts_stop_streaming(struct vb2_queue *vq);
|
|
|
|
|
|
|
|
extern struct vb2_ops saa7134_ts_qops;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int saa7134_ts_init1(struct saa7134_dev *dev);
|
|
|
|
int saa7134_ts_fini(struct saa7134_dev *dev);
|
|
|
|
void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status);
|
|
|
|
|
|
|
|
int saa7134_ts_register(struct saa7134_mpeg_ops *ops);
|
|
|
|
void saa7134_ts_unregister(struct saa7134_mpeg_ops *ops);
|
|
|
|
|
2007-09-28 07:34:25 +08:00
|
|
|
int saa7134_ts_init_hw(struct saa7134_dev *dev);
|
|
|
|
|
2009-05-28 12:58:57 +08:00
|
|
|
int saa7134_ts_start(struct saa7134_dev *dev);
|
|
|
|
int saa7134_ts_stop(struct saa7134_dev *dev);
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-vbi.c */
|
|
|
|
|
2017-09-28 00:59:06 +08:00
|
|
|
extern const struct vb2_ops saa7134_vbi_qops;
|
2005-04-17 06:20:36 +08:00
|
|
|
extern struct video_device saa7134_vbi_template;
|
|
|
|
|
|
|
|
int saa7134_vbi_init1(struct saa7134_dev *dev);
|
|
|
|
int saa7134_vbi_fini(struct saa7134_dev *dev);
|
|
|
|
void saa7134_irq_vbi_done(struct saa7134_dev *dev, unsigned long status);
|
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-tvaudio.c */
|
|
|
|
|
|
|
|
int saa7134_tvaudio_rx2mode(u32 rx);
|
|
|
|
|
|
|
|
void saa7134_tvaudio_setmute(struct saa7134_dev *dev);
|
|
|
|
void saa7134_tvaudio_setinput(struct saa7134_dev *dev,
|
|
|
|
struct saa7134_input *in);
|
|
|
|
void saa7134_tvaudio_setvolume(struct saa7134_dev *dev, int level);
|
|
|
|
int saa7134_tvaudio_getstereo(struct saa7134_dev *dev);
|
|
|
|
|
2007-10-23 11:58:59 +08:00
|
|
|
void saa7134_tvaudio_init(struct saa7134_dev *dev);
|
2005-04-17 06:20:36 +08:00
|
|
|
int saa7134_tvaudio_init2(struct saa7134_dev *dev);
|
|
|
|
int saa7134_tvaudio_fini(struct saa7134_dev *dev);
|
|
|
|
int saa7134_tvaudio_do_scan(struct saa7134_dev *dev);
|
2011-12-04 03:40:45 +08:00
|
|
|
int saa7134_tvaudio_close(struct saa7134_dev *dev);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value);
|
|
|
|
|
2007-09-28 07:34:25 +08:00
|
|
|
void saa7134_enable_i2s(struct saa7134_dev *dev);
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-oss.c */
|
|
|
|
|
2007-02-12 16:55:33 +08:00
|
|
|
extern const struct file_operations saa7134_dsp_fops;
|
|
|
|
extern const struct file_operations saa7134_mixer_fops;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int saa7134_oss_init1(struct saa7134_dev *dev);
|
|
|
|
int saa7134_oss_fini(struct saa7134_dev *dev);
|
|
|
|
void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status);
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* saa7134-input.c */
|
|
|
|
|
2010-10-07 09:02:58 +08:00
|
|
|
#if defined(CONFIG_VIDEO_SAA7134_RC)
|
2005-04-17 06:20:36 +08:00
|
|
|
int saa7134_input_init1(struct saa7134_dev *dev);
|
|
|
|
void saa7134_input_fini(struct saa7134_dev *dev);
|
|
|
|
void saa7134_input_irq(struct saa7134_dev *dev);
|
2009-05-14 03:48:50 +08:00
|
|
|
void saa7134_probe_i2c_ir(struct saa7134_dev *dev);
|
2018-11-26 01:59:48 +08:00
|
|
|
int saa7134_ir_open(struct rc_dev *dev);
|
|
|
|
void saa7134_ir_close(struct rc_dev *dev);
|
2010-09-30 01:41:52 +08:00
|
|
|
#else
|
2011-10-19 02:37:36 +08:00
|
|
|
#define saa7134_input_init1(dev) ((void)0)
|
|
|
|
#define saa7134_input_fini(dev) ((void)0)
|
|
|
|
#define saa7134_input_irq(dev) ((void)0)
|
|
|
|
#define saa7134_probe_i2c_ir(dev) ((void)0)
|
2018-11-26 01:59:48 +08:00
|
|
|
#define saa7134_ir_open(dev) ((void)0)
|
|
|
|
#define saa7134_ir_close(dev) ((void)0)
|
2010-09-30 01:41:52 +08:00
|
|
|
#endif
|