Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261556
b: refs/heads/master
c: 243bf1a
h: refs/heads/master
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 1a53e1b commit 3ceff0d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af935746781088f28904601469671d244d2f653b
refs/heads/master: 243bf1a24d991f57398aa9d24e408ca83abc6135
24 changes: 17 additions & 7 deletions trunk/drivers/media/video/cx88/cx88-mpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,13 +614,17 @@ static int cx8802_request_acquire(struct cx8802_driver *drv)
core->active_type_id != drv->type_id)
return -EBUSY;

core->input = 0;
for (i = 0;
i < (sizeof(core->board.input) / sizeof(struct cx88_input));
i++) {
if (core->board.input[i].type == CX88_VMUX_DVB) {
core->input = i;
break;
if (drv->type_id == CX88_MPEG_DVB) {
/* When switching to DVB, always set the input to the tuner */
core->last_analog_input = core->input;
core->input = 0;
for (i = 0;
i < (sizeof(core->board.input) / sizeof(struct cx88_input));
i++) {
if (core->board.input[i].type == CX88_VMUX_DVB) {
core->input = i;
break;
}
}
}

Expand All @@ -645,6 +649,12 @@ static int cx8802_request_release(struct cx8802_driver *drv)

if (drv->advise_release && --core->active_ref == 0)
{
if (drv->type_id == CX88_MPEG_DVB) {
/* If the DVB driver is releasing, reset the input
state to the last configured analog input */
core->input = core->last_analog_input;
}

drv->advise_release(drv);
core->active_type_id = CX88_BOARD_NONE;
mpeg_dbg(1,"%s() Post release GPIO=%x\n", __func__, cx_read(MO_GP0_IO));
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/cx88/cx88.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ struct cx88_core {
u32 audiomode_manual;
u32 audiomode_current;
u32 input;
u32 last_analog_input;
u32 astat;
u32 use_nicam;
unsigned long last_change;
Expand Down

0 comments on commit 3ceff0d

Please sign in to comment.