diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-01-28 19:32:59 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:47 -0400 |
commit | 5221e21e5ecd3aebd2e8e3234bd18883ce720945 (patch) | |
tree | 28ba523ee7bf7ac90f892958e3fdf6e50dbc5c94 /drivers/media/video/bt8xx/bttv-risc.c | |
parent | 4c548d4b28c0c65938914b2790fd2ca2e9c61d63 (diff) |
V4L/DVB (10562): bttv: rework the way digital inputs are indicated
The code was using a muxsel value of -1U to indicate a digital input. A
couple places in were checking of muxsel < 0 to detect this, which doesn't
work of course because muxsel is unsigned and can't be negative.
Only a couple cards had digital inputs and it was always the last one, so
for the card database create a one bit field that indicates the last input
is digital. On init, this is used to set a new field in the bttv struct to
the digital input's number or UNSET for none. This makes it easier to
check if the current input is digital.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-risc.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-risc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/bt8xx/bttv-risc.c b/drivers/media/video/bt8xx/bttv-risc.c index 5b1b8e4c78ba..d16af2836379 100644 --- a/drivers/media/video/bt8xx/bttv-risc.c +++ b/drivers/media/video/bt8xx/bttv-risc.c | |||
@@ -341,7 +341,7 @@ bttv_calc_geo_old(struct bttv *btv, struct bttv_geometry *geo, | |||
341 | int totalwidth = tvnorm->totalwidth; | 341 | int totalwidth = tvnorm->totalwidth; |
342 | int scaledtwidth = tvnorm->scaledtwidth; | 342 | int scaledtwidth = tvnorm->scaledtwidth; |
343 | 343 | ||
344 | if (bttv_tvcards[btv->c.type].muxsel[btv->input] < 0) { | 344 | if (btv->input == btv->dig) { |
345 | swidth = 720; | 345 | swidth = 720; |
346 | totalwidth = 858; | 346 | totalwidth = 858; |
347 | scaledtwidth = 858; | 347 | scaledtwidth = 858; |
@@ -391,7 +391,7 @@ bttv_calc_geo (struct bttv * btv, | |||
391 | && crop->width == tvnorm->cropcap.defrect.width | 391 | && crop->width == tvnorm->cropcap.defrect.width |
392 | && crop->height == tvnorm->cropcap.defrect.height | 392 | && crop->height == tvnorm->cropcap.defrect.height |
393 | && width <= tvnorm->swidth /* see PAL-Nc et al */) | 393 | && width <= tvnorm->swidth /* see PAL-Nc et al */) |
394 | || bttv_tvcards[btv->c.type].muxsel[btv->input] < 0) { | 394 | || btv->input == btv->dig) { |
395 | bttv_calc_geo_old(btv, geo, width, height, | 395 | bttv_calc_geo_old(btv, geo, width, height, |
396 | both_fields, tvnorm); | 396 | both_fields, tvnorm); |
397 | return; | 397 | return; |