mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
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>
This commit is contained in:
parent
21684ba921
commit
1df59f0b90
3 changed files with 31 additions and 1 deletions
|
@ -84,7 +84,9 @@ static const struct routing_scheme_item routing_schemegv[] = {
|
||||||
.vid = CX25840_COMPOSITE2,
|
.vid = CX25840_COMPOSITE2,
|
||||||
.aud = CX25840_AUDIO5,
|
.aud = CX25840_AUDIO5,
|
||||||
},
|
},
|
||||||
[PVR2_CVAL_INPUT_RADIO] = { /* Treat the same as composite */
|
[PVR2_CVAL_INPUT_RADIO] = {
|
||||||
|
/* line-in is used for radio and composite. A GPIO is
|
||||||
|
used to switch between the two choices. */
|
||||||
.vid = CX25840_COMPOSITE1,
|
.vid = CX25840_COMPOSITE1,
|
||||||
.aud = CX25840_AUDIO_SERIAL,
|
.aud = CX25840_AUDIO_SERIAL,
|
||||||
},
|
},
|
||||||
|
|
|
@ -124,6 +124,7 @@ static const struct pvr2_device_desc pvr2_device_gotview_2 = {
|
||||||
.flag_has_cx25840 = !0,
|
.flag_has_cx25840 = !0,
|
||||||
.default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
|
.default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
|
||||||
.flag_has_analogtuner = !0,
|
.flag_has_analogtuner = !0,
|
||||||
|
.flag_has_fmradio = !0,
|
||||||
.flag_has_composite = !0,
|
.flag_has_composite = !0,
|
||||||
.flag_has_svideo = !0,
|
.flag_has_svideo = !0,
|
||||||
.signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
|
.signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
|
||||||
|
|
|
@ -1321,6 +1321,12 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
if (hdw->hdw_desc->signal_routing_scheme ==
|
||||||
|
PVR2_ROUTING_SCHEME_GOTVIEW) {
|
||||||
|
/* Ensure that GPIO 11 is set to output for GOTVIEW
|
||||||
|
hardware. */
|
||||||
|
pvr2_hdw_gpio_chg_dir(hdw,(1 << 11),~0);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1735,6 +1741,13 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
|
||||||
|
|
||||||
if (!pvr2_hdw_dev_ok(hdw)) return;
|
if (!pvr2_hdw_dev_ok(hdw)) return;
|
||||||
|
|
||||||
|
if (hdw->hdw_desc->signal_routing_scheme ==
|
||||||
|
PVR2_ROUTING_SCHEME_GOTVIEW) {
|
||||||
|
/* Ensure that GPIO 11 is set to output for GOTVIEW
|
||||||
|
hardware. */
|
||||||
|
pvr2_hdw_gpio_chg_dir(hdw,(1 << 11),~0);
|
||||||
|
}
|
||||||
|
|
||||||
pvr2_hdw_commit_setup(hdw);
|
pvr2_hdw_commit_setup(hdw);
|
||||||
|
|
||||||
hdw->vid_stream = pvr2_stream_create();
|
hdw->vid_stream = pvr2_stream_create();
|
||||||
|
@ -2498,6 +2511,20 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw)
|
||||||
hdw->active_stream_type = hdw->desired_stream_type;
|
hdw->active_stream_type = hdw->desired_stream_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hdw->hdw_desc->signal_routing_scheme ==
|
||||||
|
PVR2_ROUTING_SCHEME_GOTVIEW) {
|
||||||
|
u32 b;
|
||||||
|
/* Handle GOTVIEW audio switching */
|
||||||
|
pvr2_hdw_gpio_get_out(hdw,&b);
|
||||||
|
if (hdw->input_val == PVR2_CVAL_INPUT_RADIO) {
|
||||||
|
/* Set GPIO 11 */
|
||||||
|
pvr2_hdw_gpio_chg_out(hdw,(1 << 11),~0);
|
||||||
|
} else {
|
||||||
|
/* Clear GPIO 11 */
|
||||||
|
pvr2_hdw_gpio_chg_out(hdw,(1 << 11),0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Now execute i2c core update */
|
/* Now execute i2c core update */
|
||||||
pvr2_i2c_core_sync(hdw);
|
pvr2_i2c_core_sync(hdw);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue