diff options
author | Antti Palosaari <crope@iki.fi> | 2014-12-14 12:10:47 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-03 13:10:19 -0500 |
commit | e20b0cf2f394304577df86417f37f02e26caa9fa (patch) | |
tree | 55d8371915e9cc67970d29d4a1eb294b804d63cf /drivers/media | |
parent | 4b01e01a81b6629878344430531ced347cc2ed5b (diff) |
[media] rtl28xxu: add support for RTL2832U/RTL2832 PID filter
RTL2832 demod integrated into RTL2832U has PID filter. PID filtering
is provided by rtl2832 demod driver. Add support for it.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index ef27ad09384c..c64b5ed60ab9 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c | |||
@@ -1599,7 +1599,7 @@ static int rtl2832u_get_rc_config(struct dvb_usb_device *d, | |||
1599 | #define rtl2832u_get_rc_config NULL | 1599 | #define rtl2832u_get_rc_config NULL |
1600 | #endif | 1600 | #endif |
1601 | 1601 | ||
1602 | static int rtl28xxu_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) | 1602 | static int rtl2831u_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) |
1603 | { | 1603 | { |
1604 | struct dvb_usb_device *d = adap_to_d(adap); | 1604 | struct dvb_usb_device *d = adap_to_d(adap); |
1605 | struct rtl28xxu_priv *priv = d_to_priv(d); | 1605 | struct rtl28xxu_priv *priv = d_to_priv(d); |
@@ -1608,7 +1608,16 @@ static int rtl28xxu_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) | |||
1608 | return pdata->pid_filter_ctrl(adap->fe[0], onoff); | 1608 | return pdata->pid_filter_ctrl(adap->fe[0], onoff); |
1609 | } | 1609 | } |
1610 | 1610 | ||
1611 | static int rtl28xxu_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) | 1611 | static int rtl2832u_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) |
1612 | { | ||
1613 | struct dvb_usb_device *d = adap_to_d(adap); | ||
1614 | struct rtl28xxu_priv *priv = d_to_priv(d); | ||
1615 | struct rtl2832_platform_data *pdata = &priv->rtl2832_platform_data; | ||
1616 | |||
1617 | return pdata->pid_filter_ctrl(adap->fe[0], onoff); | ||
1618 | } | ||
1619 | |||
1620 | static int rtl2831u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) | ||
1612 | { | 1621 | { |
1613 | struct dvb_usb_device *d = adap_to_d(adap); | 1622 | struct dvb_usb_device *d = adap_to_d(adap); |
1614 | struct rtl28xxu_priv *priv = d_to_priv(d); | 1623 | struct rtl28xxu_priv *priv = d_to_priv(d); |
@@ -1617,6 +1626,15 @@ static int rtl28xxu_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, | |||
1617 | return pdata->pid_filter(adap->fe[0], index, pid, onoff); | 1626 | return pdata->pid_filter(adap->fe[0], index, pid, onoff); |
1618 | } | 1627 | } |
1619 | 1628 | ||
1629 | static int rtl2832u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) | ||
1630 | { | ||
1631 | struct dvb_usb_device *d = adap_to_d(adap); | ||
1632 | struct rtl28xxu_priv *priv = d_to_priv(d); | ||
1633 | struct rtl2832_platform_data *pdata = &priv->rtl2832_platform_data; | ||
1634 | |||
1635 | return pdata->pid_filter(adap->fe[0], index, pid, onoff); | ||
1636 | } | ||
1637 | |||
1620 | static const struct dvb_usb_device_properties rtl2831u_props = { | 1638 | static const struct dvb_usb_device_properties rtl2831u_props = { |
1621 | .driver_name = KBUILD_MODNAME, | 1639 | .driver_name = KBUILD_MODNAME, |
1622 | .owner = THIS_MODULE, | 1640 | .owner = THIS_MODULE, |
@@ -1639,8 +1657,8 @@ static const struct dvb_usb_device_properties rtl2831u_props = { | |||
1639 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1657 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
1640 | 1658 | ||
1641 | .pid_filter_count = 32, | 1659 | .pid_filter_count = 32, |
1642 | .pid_filter_ctrl = rtl28xxu_pid_filter_ctrl, | 1660 | .pid_filter_ctrl = rtl2831u_pid_filter_ctrl, |
1643 | .pid_filter = rtl28xxu_pid_filter, | 1661 | .pid_filter = rtl2831u_pid_filter, |
1644 | 1662 | ||
1645 | .stream = DVB_USB_STREAM_BULK(0x81, 6, 8 * 512), | 1663 | .stream = DVB_USB_STREAM_BULK(0x81, 6, 8 * 512), |
1646 | }, | 1664 | }, |
@@ -1667,6 +1685,13 @@ static const struct dvb_usb_device_properties rtl2832u_props = { | |||
1667 | .num_adapters = 1, | 1685 | .num_adapters = 1, |
1668 | .adapter = { | 1686 | .adapter = { |
1669 | { | 1687 | { |
1688 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | ||
1689 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | ||
1690 | |||
1691 | .pid_filter_count = 32, | ||
1692 | .pid_filter_ctrl = rtl2832u_pid_filter_ctrl, | ||
1693 | .pid_filter = rtl2832u_pid_filter, | ||
1694 | |||
1670 | .stream = DVB_USB_STREAM_BULK(0x81, 6, 8 * 512), | 1695 | .stream = DVB_USB_STREAM_BULK(0x81, 6, 8 * 512), |
1671 | }, | 1696 | }, |
1672 | }, | 1697 | }, |