]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] rtl2832_sdr: control ADC
authorAntti Palosaari <crope@iki.fi>
Wed, 3 Dec 2014 23:11:03 +0000 (20:11 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 4 Dec 2014 14:42:46 +0000 (12:42 -0200)
Recent rtl28xxu patch I made moved demod ADC enable from power control
to frontend control (due to slave demod support). Because of that we
need call USB interface frontend control too in order to enable ADC.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/rtl2832_sdr.c

index 7bf98cf6bbe172715b3b2923fe771c35b5c5247b..2896b47c29d881eaa5c443ec5048804801cefeca 100644 (file)
@@ -1013,6 +1013,10 @@ static int rtl2832_sdr_start_streaming(struct vb2_queue *vq, unsigned int count)
        if (s->d->props->power_ctrl)
                s->d->props->power_ctrl(s->d, 1);
 
+       /* enable ADC */
+       if (s->d->props->frontend_ctrl)
+               s->d->props->frontend_ctrl(s->fe, 1);
+
        set_bit(POWER_ON, &s->flags);
 
        ret = rtl2832_sdr_set_tuner(s);
@@ -1064,6 +1068,10 @@ static void rtl2832_sdr_stop_streaming(struct vb2_queue *vq)
 
        clear_bit(POWER_ON, &s->flags);
 
+       /* disable ADC */
+       if (s->d->props->frontend_ctrl)
+               s->d->props->frontend_ctrl(s->fe, 0);
+
        if (s->d->props->power_ctrl)
                s->d->props->power_ctrl(s->d, 0);