diff options
| author | Antti Palosaari <crope@iki.fi> | 2013-09-09 23:13:57 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-14 04:33:07 -0400 |
| commit | bcf43393579e3d4069e75a9200a87703185bcf11 (patch) | |
| tree | 869b9306fb3e3384de0b5adc0889d09c4143f61d | |
| parent | e8b4668937c4892685b970a94de851c5fdd27571 (diff) | |
[media] rtl28xxu: attach SDR extension module
With that extension module it supports SDR.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| -rw-r--r-- | drivers/media/usb/dvb-usb-v2/Makefile | 1 | ||||
| -rw-r--r-- | drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/Makefile b/drivers/media/usb/dvb-usb-v2/Makefile index bc38f03394cd..7407b8338ccf 100644 --- a/drivers/media/usb/dvb-usb-v2/Makefile +++ b/drivers/media/usb/dvb-usb-v2/Makefile | |||
| @@ -41,3 +41,4 @@ ccflags-y += -I$(srctree)/drivers/media/dvb-core | |||
| 41 | ccflags-y += -I$(srctree)/drivers/media/dvb-frontends | 41 | ccflags-y += -I$(srctree)/drivers/media/dvb-frontends |
| 42 | ccflags-y += -I$(srctree)/drivers/media/tuners | 42 | ccflags-y += -I$(srctree)/drivers/media/tuners |
| 43 | ccflags-y += -I$(srctree)/drivers/media/common | 43 | ccflags-y += -I$(srctree)/drivers/media/common |
| 44 | ccflags-y += -I$(srctree)/drivers/staging/media/rtl2832u_sdr | ||
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index db98f1cbd71f..61b420c67ded 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | #include "rtl2830.h" | 25 | #include "rtl2830.h" |
| 26 | #include "rtl2832.h" | 26 | #include "rtl2832.h" |
| 27 | #include "rtl2832_sdr.h" | ||
| 27 | 28 | ||
| 28 | #include "qt1010.h" | 29 | #include "qt1010.h" |
| 29 | #include "mt2060.h" | 30 | #include "mt2060.h" |
| @@ -902,6 +903,10 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
| 902 | * that to the tuner driver */ | 903 | * that to the tuner driver */ |
| 903 | adap->fe[0]->ops.read_signal_strength = | 904 | adap->fe[0]->ops.read_signal_strength = |
| 904 | adap->fe[0]->ops.tuner_ops.get_rf_strength; | 905 | adap->fe[0]->ops.tuner_ops.get_rf_strength; |
| 906 | |||
| 907 | /* attach SDR */ | ||
| 908 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, | ||
| 909 | &rtl28xxu_rtl2832_fc0012_config, NULL); | ||
| 905 | return 0; | 910 | return 0; |
| 906 | break; | 911 | break; |
| 907 | case TUNER_RTL2832_FC0013: | 912 | case TUNER_RTL2832_FC0013: |
| @@ -911,8 +916,13 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
| 911 | /* fc0013 also supports signal strength reading */ | 916 | /* fc0013 also supports signal strength reading */ |
| 912 | adap->fe[0]->ops.read_signal_strength = | 917 | adap->fe[0]->ops.read_signal_strength = |
| 913 | adap->fe[0]->ops.tuner_ops.get_rf_strength; | 918 | adap->fe[0]->ops.tuner_ops.get_rf_strength; |
| 919 | |||
| 920 | /* attach SDR */ | ||
| 921 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, | ||
| 922 | &rtl28xxu_rtl2832_fc0013_config, NULL); | ||
| 914 | return 0; | 923 | return 0; |
| 915 | case TUNER_RTL2832_E4000: { | 924 | case TUNER_RTL2832_E4000: { |
| 925 | struct v4l2_subdev *sd; | ||
| 916 | struct e4000_config e4000_config = { | 926 | struct e4000_config e4000_config = { |
| 917 | .fe = adap->fe[0], | 927 | .fe = adap->fe[0], |
| 918 | .clock = 28800000, | 928 | .clock = 28800000, |
| @@ -933,6 +943,12 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
| 933 | } | 943 | } |
| 934 | 944 | ||
| 935 | priv->client = client; | 945 | priv->client = client; |
| 946 | sd = i2c_get_clientdata(client); | ||
| 947 | |||
| 948 | /* attach SDR */ | ||
| 949 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], | ||
| 950 | &d->i2c_adap, | ||
| 951 | &rtl28xxu_rtl2832_e4000_config, sd); | ||
| 936 | } | 952 | } |
| 937 | break; | 953 | break; |
| 938 | case TUNER_RTL2832_FC2580: | 954 | case TUNER_RTL2832_FC2580: |
| @@ -959,6 +975,10 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
| 959 | /* Use tuner to get the signal strength */ | 975 | /* Use tuner to get the signal strength */ |
| 960 | adap->fe[0]->ops.read_signal_strength = | 976 | adap->fe[0]->ops.read_signal_strength = |
| 961 | adap->fe[0]->ops.tuner_ops.get_rf_strength; | 977 | adap->fe[0]->ops.tuner_ops.get_rf_strength; |
| 978 | |||
| 979 | /* attach SDR */ | ||
| 980 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, | ||
| 981 | &rtl28xxu_rtl2832_r820t_config, NULL); | ||
| 962 | break; | 982 | break; |
| 963 | case TUNER_RTL2832_R828D: | 983 | case TUNER_RTL2832_R828D: |
| 964 | /* power off mn88472 demod on GPIO0 */ | 984 | /* power off mn88472 demod on GPIO0 */ |
