diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-04-06 13:32:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-05-12 18:54:44 -0400 |
commit | 6445401673fe486ba15a39370d41100df6d73b1f (patch) | |
tree | 0b5283aa3db5f10d963d2d4d260e5960161af864 /drivers/media | |
parent | 71a8dffb07ae40af87b2f7b93dcd5810e2c558bf (diff) |
V4L/DVB (3742): Set tone/voltage again if the frontend was reinitialised
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 4f8f257e6795..a051790161b0 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -106,6 +106,8 @@ struct dvb_frontend_private { | |||
106 | unsigned long tune_mode_flags; | 106 | unsigned long tune_mode_flags; |
107 | unsigned int delay; | 107 | unsigned int delay; |
108 | unsigned int reinitialise; | 108 | unsigned int reinitialise; |
109 | int tone; | ||
110 | int voltage; | ||
109 | 111 | ||
110 | /* swzigzag values */ | 112 | /* swzigzag values */ |
111 | unsigned int state; | 113 | unsigned int state; |
@@ -537,6 +539,12 @@ static int dvb_frontend_thread(void *data) | |||
537 | 539 | ||
538 | if (fepriv->reinitialise) { | 540 | if (fepriv->reinitialise) { |
539 | dvb_frontend_init(fe); | 541 | dvb_frontend_init(fe); |
542 | if (fepriv->tone != -1) { | ||
543 | fe->ops->set_tone(fe, fepriv->tone); | ||
544 | } | ||
545 | if (fepriv->voltage != -1) { | ||
546 | fe->ops->set_voltage(fe, fepriv->voltage); | ||
547 | } | ||
540 | fepriv->reinitialise = 0; | 548 | fepriv->reinitialise = 0; |
541 | } | 549 | } |
542 | 550 | ||
@@ -788,6 +796,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, | |||
788 | case FE_SET_TONE: | 796 | case FE_SET_TONE: |
789 | if (fe->ops->set_tone) { | 797 | if (fe->ops->set_tone) { |
790 | err = fe->ops->set_tone(fe, (fe_sec_tone_mode_t) parg); | 798 | err = fe->ops->set_tone(fe, (fe_sec_tone_mode_t) parg); |
799 | fepriv->tone = (fe_sec_tone_mode_t) parg; | ||
791 | fepriv->state = FESTATE_DISEQC; | 800 | fepriv->state = FESTATE_DISEQC; |
792 | fepriv->status = 0; | 801 | fepriv->status = 0; |
793 | } | 802 | } |
@@ -796,6 +805,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, | |||
796 | case FE_SET_VOLTAGE: | 805 | case FE_SET_VOLTAGE: |
797 | if (fe->ops->set_voltage) { | 806 | if (fe->ops->set_voltage) { |
798 | err = fe->ops->set_voltage(fe, (fe_sec_voltage_t) parg); | 807 | err = fe->ops->set_voltage(fe, (fe_sec_voltage_t) parg); |
808 | fepriv->voltage = (fe_sec_voltage_t) parg; | ||
799 | fepriv->state = FESTATE_DISEQC; | 809 | fepriv->state = FESTATE_DISEQC; |
800 | fepriv->status = 0; | 810 | fepriv->status = 0; |
801 | } | 811 | } |
@@ -995,6 +1005,8 @@ static int dvb_frontend_open(struct inode *inode, struct file *file) | |||
995 | 1005 | ||
996 | /* normal tune mode when opened R/W */ | 1006 | /* normal tune mode when opened R/W */ |
997 | fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT; | 1007 | fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT; |
1008 | fepriv->tone = -1; | ||
1009 | fepriv->voltage = -1; | ||
998 | } | 1010 | } |
999 | 1011 | ||
1000 | return ret; | 1012 | return ret; |