aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/ir-functions.c2
-rw-r--r--drivers/media/common/ir-keymaps.c172
-rw-r--r--drivers/media/common/saa7146_core.c8
-rw-r--r--drivers/media/common/saa7146_i2c.c6
-rw-r--r--drivers/media/common/saa7146_vbi.c4
-rw-r--r--drivers/media/common/saa7146_video.c4
6 files changed, 182 insertions, 14 deletions
diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c
index bb2a027b9483..266505207925 100644
--- a/drivers/media/common/ir-functions.c
+++ b/drivers/media/common/ir-functions.c
@@ -34,7 +34,7 @@ static int repeat = 1;
34module_param(repeat, int, 0444); 34module_param(repeat, int, 0444);
35MODULE_PARM_DESC(repeat,"auto-repeat for IR keys (default: on)"); 35MODULE_PARM_DESC(repeat,"auto-repeat for IR keys (default: on)");
36 36
37static int debug = 0; /* debug level (0,1,2) */ 37static int debug; /* debug level (0,1,2) */
38module_param(debug, int, 0644); 38module_param(debug, int, 0644);
39 39
40#define dprintk(level, fmt, arg...) if (debug >= level) \ 40#define dprintk(level, fmt, arg...) if (debug >= level) \
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
index 2ab5a120470d..a3485817e46c 100644
--- a/drivers/media/common/ir-keymaps.c
+++ b/drivers/media/common/ir-keymaps.c
@@ -212,6 +212,51 @@ IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE] = {
212 212
213EXPORT_SYMBOL_GPL(ir_codes_pixelview); 213EXPORT_SYMBOL_GPL(ir_codes_pixelview);
214 214
215/*
216 Mauro Carvalho Chehab <mchehab@infradead.org>
217 present on PV MPEG 8000GT
218 */
219IR_KEYTAB_TYPE ir_codes_pixelview_new[IR_KEYTAB_SIZE] = {
220 [0x3c] = KEY_PAUSE, /* Timeshift */
221 [0x12] = KEY_POWER,
222
223 [0x3d] = KEY_1,
224 [0x38] = KEY_2,
225 [0x18] = KEY_3,
226 [0x35] = KEY_4,
227 [0x39] = KEY_5,
228 [0x15] = KEY_6,
229 [0x36] = KEY_7,
230 [0x3a] = KEY_8,
231 [0x1e] = KEY_9,
232 [0x3e] = KEY_0,
233
234 [0x1c] = KEY_AGAIN, /* LOOP */
235 [0x3f] = KEY_MEDIA, /* Source */
236 [0x1f] = KEY_LAST, /* +100 */
237 [0x1b] = KEY_MUTE,
238
239 [0x17] = KEY_CHANNELDOWN,
240 [0x16] = KEY_CHANNELUP,
241 [0x10] = KEY_VOLUMEUP,
242 [0x14] = KEY_VOLUMEDOWN,
243 [0x13] = KEY_ZOOM,
244
245 [0x19] = KEY_SHUFFLE, /* SNAPSHOT */
246 [0x1a] = KEY_SEARCH, /* scan */
247
248 [0x37] = KEY_REWIND, /* << */
249 [0x32] = KEY_RECORD, /* o (red) */
250 [0x33] = KEY_FORWARD, /* >> */
251 [0x11] = KEY_STOP, /* square */
252 [0x3b] = KEY_PLAY, /* > */
253 [0x30] = KEY_PLAYPAUSE, /* || */
254
255 [0x31] = KEY_TV,
256 [0x34] = KEY_RADIO,
257};
258EXPORT_SYMBOL_GPL(ir_codes_pixelview_new);
259
215IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE] = { 260IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE] = {
216 [ 0x00 ] = KEY_0, 261 [ 0x00 ] = KEY_0,
217 [ 0x01 ] = KEY_1, 262 [ 0x01 ] = KEY_1,
@@ -726,7 +771,11 @@ IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE] = {
726 [ 0x12 ] = KEY_CHANNELUP, // Channel + 771 [ 0x12 ] = KEY_CHANNELUP, // Channel +
727 [ 0x13 ] = KEY_CHANNELDOWN, // Channel - 772 [ 0x13 ] = KEY_CHANNELDOWN, // Channel -
728 [ 0x06 ] = KEY_AGAIN, // Recall 773 [ 0x06 ] = KEY_AGAIN, // Recall
729 [ 0x10 ] = KEY_ENTER, // Enter 774 [ 0x10 ] = KEY_ENTER, // Enter
775
776 [ 0x19 ] = KEY_BACK, // Rewind ( <<< )
777 [ 0x1f ] = KEY_FORWARD, // Forward ( >>> )
778 [ 0x0a ] = KEY_ANGLE, // (no label, may be used as the PAUSE button)
730}; 779};
731 780
732EXPORT_SYMBOL_GPL(ir_codes_flyvideo); 781EXPORT_SYMBOL_GPL(ir_codes_flyvideo);
@@ -1157,7 +1206,8 @@ EXPORT_SYMBOL_GPL(ir_codes_purpletv);
1157 1206
1158/* Mapping for the 28 key remote control as seen at 1207/* Mapping for the 28 key remote control as seen at
1159 http://www.sednacomputer.com/photo/cardbus-tv.jpg 1208 http://www.sednacomputer.com/photo/cardbus-tv.jpg
1160 Pavel Mihaylov <bin@bash.info> */ 1209 Pavel Mihaylov <bin@bash.info>
1210 Also for the remote bundled with Kozumi KTV-01C card */
1161IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE] = { 1211IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE] = {
1162 [ 0x00 ] = KEY_0, 1212 [ 0x00 ] = KEY_0,
1163 [ 0x01 ] = KEY_1, 1213 [ 0x01 ] = KEY_1,
@@ -1188,6 +1238,11 @@ IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE] = {
1188 [ 0x1c ] = KEY_RADIO, /* FM Radio */ 1238 [ 0x1c ] = KEY_RADIO, /* FM Radio */
1189 [ 0x1d ] = KEY_RECORD, 1239 [ 0x1d ] = KEY_RECORD,
1190 [ 0x1e ] = KEY_PAUSE, 1240 [ 0x1e ] = KEY_PAUSE,
1241 /* additional codes for Kozumi's remote */
1242 [0x14] = KEY_INFO, /* OSD */
1243 [0x16] = KEY_OK, /* OK */
1244 [0x17] = KEY_DIGITS, /* Plus */
1245 [0x1f] = KEY_PLAY, /* Play */
1191}; 1246};
1192 1247
1193EXPORT_SYMBOL_GPL(ir_codes_pctv_sedna); 1248EXPORT_SYMBOL_GPL(ir_codes_pctv_sedna);
@@ -1988,6 +2043,76 @@ IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE] = {
1988 2043
1989EXPORT_SYMBOL_GPL(ir_codes_behold); 2044EXPORT_SYMBOL_GPL(ir_codes_behold);
1990 2045
2046/* Beholder Intl. Ltd. 2008
2047 * Dmitry Belimov d.belimov@google.com
2048 * Keytable is used by BeholdTV Columbus
2049 * The "ascii-art picture" below (in comments, first row
2050 * is the keycode in hex, and subsequent row(s) shows
2051 * the button labels (several variants when appropriate)
2052 * helps to descide which keycodes to assign to the buttons.
2053 */
2054IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE] = {
2055
2056 /* 0x13 0x11 0x1C 0x12 *
2057 * Mute Source TV/FM Power *
2058 * */
2059
2060 [0x13] = KEY_MUTE,
2061 [0x11] = KEY_PROPS,
2062 [0x1C] = KEY_TUNER, /* KEY_TV/KEY_RADIO */
2063 [0x12] = KEY_POWER,
2064
2065 /* 0x01 0x02 0x03 0x0D *
2066 * 1 2 3 Stereo *
2067 * *
2068 * 0x04 0x05 0x06 0x19 *
2069 * 4 5 6 Snapshot *
2070 * *
2071 * 0x07 0x08 0x09 0x10 *
2072 * 7 8 9 Zoom *
2073 * */
2074 [0x01] = KEY_1,
2075 [0x02] = KEY_2,
2076 [0x03] = KEY_3,
2077 [0x0D] = KEY_SETUP, /* Setup key */
2078 [0x04] = KEY_4,
2079 [0x05] = KEY_5,
2080 [0x06] = KEY_6,
2081 [0x19] = KEY_BOOKMARKS, /* Snapshot key */
2082 [0x07] = KEY_7,
2083 [0x08] = KEY_8,
2084 [0x09] = KEY_9,
2085 [0x10] = KEY_ZOOM,
2086
2087 /* 0x0A 0x00 0x0B 0x0C *
2088 * RECALL 0 ChannelUp VolumeUp *
2089 * */
2090 [0x0A] = KEY_AGAIN,
2091 [0x00] = KEY_0,
2092 [0x0B] = KEY_CHANNELUP,
2093 [0x0C] = KEY_VOLUMEUP,
2094
2095 /* 0x1B 0x1D 0x15 0x18 *
2096 * Timeshift Record ChannelDown VolumeDown *
2097 * */
2098
2099 [0x1B] = KEY_REWIND,
2100 [0x1D] = KEY_RECORD,
2101 [0x15] = KEY_CHANNELDOWN,
2102 [0x18] = KEY_VOLUMEDOWN,
2103
2104 /* 0x0E 0x1E 0x0F 0x1A *
2105 * Stop Pause Previouse Next *
2106 * */
2107
2108 [0x0E] = KEY_STOP,
2109 [0x1E] = KEY_PAUSE,
2110 [0x0F] = KEY_PREVIOUS,
2111 [0x1A] = KEY_NEXT,
2112
2113};
2114EXPORT_SYMBOL_GPL(ir_codes_behold_columbus);
2115
1991/* 2116/*
1992 * Remote control for the Genius TVGO A11MCE 2117 * Remote control for the Genius TVGO A11MCE
1993 * Adrian Pardini <pardo.bsso@gmail.com> 2118 * Adrian Pardini <pardo.bsso@gmail.com>
@@ -2033,3 +2158,46 @@ IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE] = {
2033 [0x50] = KEY_BLUE, 2158 [0x50] = KEY_BLUE,
2034}; 2159};
2035EXPORT_SYMBOL_GPL(ir_codes_genius_tvgo_a11mce); 2160EXPORT_SYMBOL_GPL(ir_codes_genius_tvgo_a11mce);
2161
2162/*
2163 * Remote control for Powercolor Real Angel 330
2164 * Daniel Fraga <fragabr@gmail.com>
2165 */
2166IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE] = {
2167 [0x38] = KEY_SWITCHVIDEOMODE, /* switch inputs */
2168 [0x0c] = KEY_MEDIA, /* Turn ON/OFF App */
2169 [0x00] = KEY_0,
2170 [0x01] = KEY_1,
2171 [0x02] = KEY_2,
2172 [0x03] = KEY_3,
2173 [0x04] = KEY_4,
2174 [0x05] = KEY_5,
2175 [0x06] = KEY_6,
2176 [0x07] = KEY_7,
2177 [0x08] = KEY_8,
2178 [0x09] = KEY_9,
2179 [0x0a] = KEY_DIGITS, /* single, double, tripple digit */
2180 [0x29] = KEY_PREVIOUS, /* previous channel */
2181 [0x12] = KEY_BRIGHTNESSUP,
2182 [0x13] = KEY_BRIGHTNESSDOWN,
2183 [0x2b] = KEY_MODE, /* stereo/mono */
2184 [0x2c] = KEY_TEXT, /* teletext */
2185 [0x20] = KEY_UP, /* channel up */
2186 [0x21] = KEY_DOWN, /* channel down */
2187 [0x10] = KEY_RIGHT, /* volume up */
2188 [0x11] = KEY_LEFT, /* volume down */
2189 [0x0d] = KEY_MUTE,
2190 [0x1f] = KEY_RECORD,
2191 [0x17] = KEY_PLAY,
2192 [0x16] = KEY_PAUSE,
2193 [0x0b] = KEY_STOP,
2194 [0x27] = KEY_FASTFORWARD,
2195 [0x26] = KEY_REWIND,
2196 [0x1e] = KEY_SEARCH, /* autoscan */
2197 [0x0e] = KEY_SHUFFLE, /* snapshot */
2198 [0x2d] = KEY_SETUP,
2199 [0x0f] = KEY_SCREEN, /* full screen */
2200 [0x14] = KEY_RADIO, /* FM radio */
2201 [0x25] = KEY_POWER, /* power */
2202};
2203EXPORT_SYMBOL_GPL(ir_codes_powercolor_real_angel);
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
index 7707b8c7394b..89c7660b85d6 100644
--- a/drivers/media/common/saa7146_core.c
+++ b/drivers/media/common/saa7146_core.c
@@ -74,7 +74,7 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
74 if (err) { 74 if (err) {
75 printk(KERN_ERR "%s: %s timed out while waiting for " 75 printk(KERN_ERR "%s: %s timed out while waiting for "
76 "registers getting programmed\n", 76 "registers getting programmed\n",
77 dev->name, __FUNCTION__); 77 dev->name, __func__);
78 return -ETIMEDOUT; 78 return -ETIMEDOUT;
79 } 79 }
80 msleep(1); 80 msleep(1);
@@ -89,7 +89,7 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
89 saa7146_read(dev, MC2); 89 saa7146_read(dev, MC2);
90 if (err) { 90 if (err) {
91 DEB_S(("%s: %s timed out while waiting for transfer " 91 DEB_S(("%s: %s timed out while waiting for transfer "
92 "completion\n", dev->name, __FUNCTION__)); 92 "completion\n", dev->name, __func__));
93 return -ETIMEDOUT; 93 return -ETIMEDOUT;
94 } 94 }
95 msleep(1); 95 msleep(1);
@@ -111,7 +111,7 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
111 if (!loops--) { 111 if (!loops--) {
112 printk(KERN_ERR "%s: %s timed out while waiting for " 112 printk(KERN_ERR "%s: %s timed out while waiting for "
113 "registers getting programmed\n", 113 "registers getting programmed\n",
114 dev->name, __FUNCTION__); 114 dev->name, __func__);
115 return -ETIMEDOUT; 115 return -ETIMEDOUT;
116 } 116 }
117 udelay(1); 117 udelay(1);
@@ -125,7 +125,7 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
125 saa7146_read(dev, MC2); 125 saa7146_read(dev, MC2);
126 if (!loops--) { 126 if (!loops--) {
127 DEB_S(("%s: %s timed out while waiting for transfer " 127 DEB_S(("%s: %s timed out while waiting for transfer "
128 "completion\n", dev->name, __FUNCTION__)); 128 "completion\n", dev->name, __func__));
129 return -ETIMEDOUT; 129 return -ETIMEDOUT;
130 } 130 }
131 udelay(5); 131 udelay(5);
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c
index 7e7689afae62..35b01ec40a51 100644
--- a/drivers/media/common/saa7146_i2c.c
+++ b/drivers/media/common/saa7146_i2c.c
@@ -203,7 +203,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
203 return -ERESTARTSYS; 203 return -ERESTARTSYS;
204 204
205 printk(KERN_WARNING "%s %s [irq]: timed out waiting for end of xfer\n", 205 printk(KERN_WARNING "%s %s [irq]: timed out waiting for end of xfer\n",
206 dev->name, __FUNCTION__); 206 dev->name, __func__);
207 return -EIO; 207 return -EIO;
208 } 208 }
209 status = saa7146_read(dev, I2C_STATUS); 209 status = saa7146_read(dev, I2C_STATUS);
@@ -221,7 +221,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
221 } 221 }
222 if (time_after(jiffies,timeout)) { 222 if (time_after(jiffies,timeout)) {
223 printk(KERN_WARNING "%s %s: timed out waiting for MC2\n", 223 printk(KERN_WARNING "%s %s: timed out waiting for MC2\n",
224 dev->name, __FUNCTION__); 224 dev->name, __func__);
225 return -EIO; 225 return -EIO;
226 } 226 }
227 } 227 }
@@ -238,7 +238,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
238 * (no answer from nonexisistant device...) 238 * (no answer from nonexisistant device...)
239 */ 239 */
240 printk(KERN_WARNING "%s %s [poll]: timed out waiting for end of xfer\n", 240 printk(KERN_WARNING "%s %s [poll]: timed out waiting for end of xfer\n",
241 dev->name, __FUNCTION__); 241 dev->name, __func__);
242 return -EIO; 242 return -EIO;
243 } 243 }
244 if (++trial < 50 && short_delay) 244 if (++trial < 50 && short_delay)
diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c
index bfbd5a841ebf..74e2b56ecb5b 100644
--- a/drivers/media/common/saa7146_vbi.c
+++ b/drivers/media/common/saa7146_vbi.c
@@ -407,8 +407,8 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
407 fh->vbi_fmt.start[1] = 312; 407 fh->vbi_fmt.start[1] = 312;
408 fh->vbi_fmt.count[1] = 16; 408 fh->vbi_fmt.count[1] = 16;
409 409
410 videobuf_queue_pci_init(&fh->vbi_q, &vbi_qops, 410 videobuf_queue_sg_init(&fh->vbi_q, &vbi_qops,
411 dev->pci, &dev->slock, 411 &dev->pci->dev, &dev->slock,
412 V4L2_BUF_TYPE_VBI_CAPTURE, 412 V4L2_BUF_TYPE_VBI_CAPTURE,
413 V4L2_FIELD_SEQ_TB, // FIXME: does this really work? 413 V4L2_FIELD_SEQ_TB, // FIXME: does this really work?
414 sizeof(struct saa7146_buf), 414 sizeof(struct saa7146_buf),
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index 66fdbd0e6a6d..3cbc6ebbe649 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1410,8 +1410,8 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
1410 sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); 1410 sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat);
1411 fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8; 1411 fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8;
1412 1412
1413 videobuf_queue_pci_init(&fh->video_q, &video_qops, 1413 videobuf_queue_sg_init(&fh->video_q, &video_qops,
1414 dev->pci, &dev->slock, 1414 &dev->pci->dev, &dev->slock,
1415 V4L2_BUF_TYPE_VIDEO_CAPTURE, 1415 V4L2_BUF_TYPE_VIDEO_CAPTURE,
1416 V4L2_FIELD_INTERLACED, 1416 V4L2_FIELD_INTERLACED,
1417 sizeof(struct saa7146_buf), 1417 sizeof(struct saa7146_buf),