diff options
author | Mike Isely <isely@pobox.com> | 2008-04-21 02:50:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:49 -0400 |
commit | 1df59f0b908bfcdc35d1ea2319290ece272bf576 (patch) | |
tree | 0088152d4c7523406fc0910fd81d884b2441003e /drivers/media/video/pvrusb2/pvrusb2-hdw.c | |
parent | 21684ba921d7758dc9264e0de64475b8a636ee95 (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/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 27 |
1 files changed, 27 insertions, 0 deletions
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 | ||