aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-06-25 19:04:40 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-26 23:17:27 -0400
commit332139635a8c0431cc2eb67adf1e983eb96728e3 (patch)
treee7646bc367486fd1b52bd80bc789fe26307ed9fe /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parent077203a7d464f6ea7c94b4f3ea4b5bd246285fcd (diff)
V4L/DVB (4239): Handle boolean controls in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 872705633048..7d46bc10179a 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -436,6 +436,9 @@ static void ctrl_stdenumcur_clear_dirty(struct pvr2_ctrl *cptr)
436 .def.type_enum.count = (sizeof(tab)/sizeof((tab)[0])), \ 436 .def.type_enum.count = (sizeof(tab)/sizeof((tab)[0])), \
437 .def.type_enum.value_names = tab 437 .def.type_enum.value_names = tab
438 438
439#define DEFBOOL \
440 .type = pvr2_ctl_bool
441
439#define DEFMASK(msk,tab) \ 442#define DEFMASK(msk,tab) \
440 .type = pvr2_ctl_bitmask, \ 443 .type = pvr2_ctl_bitmask, \
441 .def.type_bitmask.valid_bits = msk, \ 444 .def.type_bitmask.valid_bits = msk, \
@@ -548,7 +551,7 @@ static const struct pvr2_ctl_info control_defs[] = {
548 .name = "mute", 551 .name = "mute",
549 .default_value = 0, 552 .default_value = 0,
550 DEFREF(mute), 553 DEFREF(mute),
551 DEFINT(0,1), 554 DEFBOOL,
552 },{ 555 },{
553 .desc = "Video Source", 556 .desc = "Video Source",
554 .name = "input", 557 .name = "input",
@@ -597,7 +600,7 @@ static const struct pvr2_ctl_info control_defs[] = {
597 .name = "audio_crc", 600 .name = "audio_crc",
598 .default_value = 1, 601 .default_value = 1,
599 DEFREF(audiocrc), 602 DEFREF(audiocrc),
600 DEFINT(0,1), 603 DEFBOOL,
601 },{ 604 },{
602 .v4l_id = V4L2_CID_PVR_AUDIOEMPHASIS, 605 .v4l_id = V4L2_CID_PVR_AUDIOEMPHASIS,
603 .desc = "Audio Emphasis", 606 .desc = "Audio Emphasis",
@@ -611,7 +614,7 @@ static const struct pvr2_ctl_info control_defs[] = {
611 .name = "vbr", 614 .name = "vbr",
612 .default_value = 0, 615 .default_value = 0,
613 DEFREF(vbr), 616 DEFREF(vbr),
614 DEFINT(0,1), 617 DEFBOOL,
615 },{ 618 },{
616 .v4l_id = V4L2_CID_PVR_VIDEOBITRATE, 619 .v4l_id = V4L2_CID_PVR_VIDEOBITRATE,
617 .desc = "Average video bitrate", 620 .desc = "Average video bitrate",
@@ -632,7 +635,7 @@ static const struct pvr2_ctl_info control_defs[] = {
632 .internal_id = PVR2_CID_INTERLACE, 635 .internal_id = PVR2_CID_INTERLACE,
633 .default_value = 0, 636 .default_value = 0,
634 DEFREF(interlace), 637 DEFREF(interlace),
635 DEFINT(0,1), 638 DEFBOOL,
636 },{ 639 },{
637 .desc = "Audio Layer", 640 .desc = "Audio Layer",
638 .name = "audio_layer", 641 .name = "audio_layer",
@@ -671,7 +674,7 @@ static const struct pvr2_ctl_info control_defs[] = {
671 .desc = "Streaming Enabled", 674 .desc = "Streaming Enabled",
672 .name = "streaming_enabled", 675 .name = "streaming_enabled",
673 .get_value = ctrl_streamingenabled_get, 676 .get_value = ctrl_streamingenabled_get,
674 DEFINT(0,1), 677 DEFBOOL,
675 },{ 678 },{
676 .desc = "USB Speed", 679 .desc = "USB Speed",
677 .name = "usb_speed", 680 .name = "usb_speed",
@@ -681,7 +684,7 @@ static const struct pvr2_ctl_info control_defs[] = {
681 .desc = "Signal Present", 684 .desc = "Signal Present",
682 .name = "signal_present", 685 .name = "signal_present",
683 .get_value = ctrl_signal_get, 686 .get_value = ctrl_signal_get,
684 DEFINT(0,1), 687 DEFBOOL,
685 },{ 688 },{
686 .desc = "Video Standards Available Mask", 689 .desc = "Video Standards Available Mask",
687 .name = "video_standard_mask_available", 690 .name = "video_standard_mask_available",
@@ -2007,6 +2010,7 @@ static const char *get_ctrl_typename(enum pvr2_ctl_type tp)
2007 switch (tp) { 2010 switch (tp) {
2008 case pvr2_ctl_int: return "integer"; 2011 case pvr2_ctl_int: return "integer";
2009 case pvr2_ctl_enum: return "enum"; 2012 case pvr2_ctl_enum: return "enum";
2013 case pvr2_ctl_bool: return "boolean";
2010 case pvr2_ctl_bitmask: return "bitmask"; 2014 case pvr2_ctl_bitmask: return "bitmask";
2011 } 2015 }
2012 return ""; 2016 return "";