aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-04-21 02:50:39 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:49 -0400
commit1df59f0b908bfcdc35d1ea2319290ece272bf576 (patch)
tree0088152d4c7523406fc0910fd81d884b2441003e /drivers/media
parent21684ba921d7758dc9264e0de64475b8a636ee95 (diff)
V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c4
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-devattr.c1
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c27
3 files changed, 31 insertions, 1 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index ffdc45c324e5..97350b048b8d 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -84,7 +84,9 @@ static const struct routing_scheme_item routing_schemegv[] = {
84 .vid = CX25840_COMPOSITE2, 84 .vid = CX25840_COMPOSITE2,
85 .aud = CX25840_AUDIO5, 85 .aud = CX25840_AUDIO5,
86 }, 86 },
87 [PVR2_CVAL_INPUT_RADIO] = { /* Treat the same as composite */ 87 [PVR2_CVAL_INPUT_RADIO] = {
88 /* line-in is used for radio and composite. A GPIO is
89 used to switch between the two choices. */
88 .vid = CX25840_COMPOSITE1, 90 .vid = CX25840_COMPOSITE1,
89 .aud = CX25840_AUDIO_SERIAL, 91 .aud = CX25840_AUDIO_SERIAL,
90 }, 92 },
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index 43c49fb66209..2dd06a90adce 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -124,6 +124,7 @@ static const struct pvr2_device_desc pvr2_device_gotview_2 = {
124 .flag_has_cx25840 = !0, 124 .flag_has_cx25840 = !0,
125 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, 125 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
126 .flag_has_analogtuner = !0, 126 .flag_has_analogtuner = !0,
127 .flag_has_fmradio = !0,
127 .flag_has_composite = !0, 128 .flag_has_composite = !0,
128 .flag_has_svideo = !0, 129 .flag_has_svideo = !0,
129 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, 130 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 19de395a5fcb..0a868888f389 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1321,6 +1321,12 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
1321 } 1321 }
1322 1322
1323 done: 1323 done:
1324 if (hdw->hdw_desc->signal_routing_scheme ==
1325 PVR2_ROUTING_SCHEME_GOTVIEW) {
1326 /* Ensure that GPIO 11 is set to output for GOTVIEW
1327 hardware. */
1328 pvr2_hdw_gpio_chg_dir(hdw,(1 << 11),~0);
1329 }
1324 return ret; 1330 return ret;
1325} 1331}
1326 1332
@@ -1735,6 +1741,13 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
1735 1741
1736 if (!pvr2_hdw_dev_ok(hdw)) return; 1742 if (!pvr2_hdw_dev_ok(hdw)) return;
1737 1743
1744 if (hdw->hdw_desc->signal_routing_scheme ==
1745 PVR2_ROUTING_SCHEME_GOTVIEW) {
1746 /* Ensure that GPIO 11 is set to output for GOTVIEW
1747 hardware. */
1748 pvr2_hdw_gpio_chg_dir(hdw,(1 << 11),~0);
1749 }
1750
1738 pvr2_hdw_commit_setup(hdw); 1751 pvr2_hdw_commit_setup(hdw);
1739 1752
1740 hdw->vid_stream = pvr2_stream_create(); 1753 hdw->vid_stream = pvr2_stream_create();
@@ -2498,6 +2511,20 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw)
2498 hdw->active_stream_type = hdw->desired_stream_type; 2511 hdw->active_stream_type = hdw->desired_stream_type;
2499 } 2512 }
2500 2513
2514 if (hdw->hdw_desc->signal_routing_scheme ==
2515 PVR2_ROUTING_SCHEME_GOTVIEW) {
2516 u32 b;
2517 /* Handle GOTVIEW audio switching */
2518 pvr2_hdw_gpio_get_out(hdw,&b);
2519 if (hdw->input_val == PVR2_CVAL_INPUT_RADIO) {
2520 /* Set GPIO 11 */
2521 pvr2_hdw_gpio_chg_out(hdw,(1 << 11),~0);
2522 } else {
2523 /* Clear GPIO 11 */
2524 pvr2_hdw_gpio_chg_out(hdw,(1 << 11),0);
2525 }
2526 }
2527
2501 /* Now execute i2c core update */ 2528 /* Now execute i2c core update */
2502 pvr2_i2c_core_sync(hdw); 2529 pvr2_i2c_core_sync(hdw);
2503 2530