diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-01 07:59:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 12:56:22 -0500 |
commit | ed0e3729c9d790d17688083f070da3674088ea9c (patch) | |
tree | f6c25942baa88ded9a68c446d662fb8e338f40de | |
parent | 88538bb5449caef8347a2785f7ac32c0b8d5858c (diff) |
[media] cx231xx: Cleanup printk at the driver
There are lots of debug printks printed with pr_info. Also, the
printk's data are not too coherent:
- there are duplicated driver name at the print format;
- function name format string differs from function to function;
- long strings broken into multiple lines;
- some printks just produce ugly reports, being almost useless
as-is.
Do a cleanup on that.
Still, there are much to be done in order to do a better printk
job on this driver, but, at least it will now be a way less
verbose, if debug printks are disabled, and some logs might
actually be useful.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-417.c | 15 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-audio.c | 20 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-avcore.c | 142 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-cards.c | 81 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-core.c | 93 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-dvb.c | 12 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-i2c.c | 17 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c | 12 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-vbi.c | 24 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-video.c | 41 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx.h | 1 |
11 files changed, 199 insertions, 259 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index d678f4587ab4..a0d1156d1df1 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c | |||
@@ -90,10 +90,10 @@ static unsigned int v4l_debug = 1; | |||
90 | module_param(v4l_debug, int, 0644); | 90 | module_param(v4l_debug, int, 0644); |
91 | MODULE_PARM_DESC(v4l_debug, "enable V4L debug messages"); | 91 | MODULE_PARM_DESC(v4l_debug, "enable V4L debug messages"); |
92 | 92 | ||
93 | #define dprintk(level, fmt, arg...)\ | 93 | #define dprintk(level, fmt, arg...) \ |
94 | do { if (v4l_debug >= level) \ | 94 | do { \ |
95 | pr_info("%s: " fmt, \ | 95 | if (v4l_debug >= level) \ |
96 | (dev) ? dev->name : "cx231xx[?]", ## arg); \ | 96 | printk(KERN_DEBUG pr_fmt(fmt), ## arg); \ |
97 | } while (0) | 97 | } while (0) |
98 | 98 | ||
99 | static struct cx231xx_tvnorm cx231xx_tvnorms[] = { | 99 | static struct cx231xx_tvnorm cx231xx_tvnorms[] = { |
@@ -1114,15 +1114,15 @@ static int cx231xx_initialize_codec(struct cx231xx *dev) | |||
1114 | cx231xx_disable656(dev); | 1114 | cx231xx_disable656(dev); |
1115 | retval = cx231xx_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */ | 1115 | retval = cx231xx_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */ |
1116 | if (retval < 0) { | 1116 | if (retval < 0) { |
1117 | dprintk(2, "%s() PING OK\n", __func__); | 1117 | dprintk(2, "%s: PING OK\n", __func__); |
1118 | retval = cx231xx_load_firmware(dev); | 1118 | retval = cx231xx_load_firmware(dev); |
1119 | if (retval < 0) { | 1119 | if (retval < 0) { |
1120 | pr_err("%s() f/w load failed\n", __func__); | 1120 | pr_err("%s: f/w load failed\n", __func__); |
1121 | return retval; | 1121 | return retval; |
1122 | } | 1122 | } |
1123 | retval = cx231xx_find_mailbox(dev); | 1123 | retval = cx231xx_find_mailbox(dev); |
1124 | if (retval < 0) { | 1124 | if (retval < 0) { |
1125 | pr_err("%s() mailbox < 0, error\n", | 1125 | pr_err("%s: mailbox < 0, error\n", |
1126 | __func__); | 1126 | __func__); |
1127 | return -1; | 1127 | return -1; |
1128 | } | 1128 | } |
@@ -1798,7 +1798,6 @@ static unsigned int mpeg_poll(struct file *file, | |||
1798 | static int mpeg_mmap(struct file *file, struct vm_area_struct *vma) | 1798 | static int mpeg_mmap(struct file *file, struct vm_area_struct *vma) |
1799 | { | 1799 | { |
1800 | struct cx231xx_fh *fh = file->private_data; | 1800 | struct cx231xx_fh *fh = file->private_data; |
1801 | struct cx231xx *dev = fh->dev; | ||
1802 | 1801 | ||
1803 | dprintk(2, "%s()\n", __func__); | 1802 | dprintk(2, "%s()\n", __func__); |
1804 | 1803 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c index 8312388edabb..e96703180c0c 100644 --- a/drivers/media/usb/cx231xx/cx231xx-audio.c +++ b/drivers/media/usb/cx231xx/cx231xx-audio.c | |||
@@ -277,7 +277,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) | |||
277 | int i, errCode; | 277 | int i, errCode; |
278 | int sb_size; | 278 | int sb_size; |
279 | 279 | ||
280 | pr_info("%s: Starting ISO AUDIO transfers\n", __func__); | 280 | pr_debug("%s: Starting ISO AUDIO transfers\n", __func__); |
281 | 281 | ||
282 | if (dev->state & DEV_DISCONNECTED) | 282 | if (dev->state & DEV_DISCONNECTED) |
283 | return -ENODEV; | 283 | return -ENODEV; |
@@ -338,7 +338,7 @@ static int cx231xx_init_audio_bulk(struct cx231xx *dev) | |||
338 | int i, errCode; | 338 | int i, errCode; |
339 | int sb_size; | 339 | int sb_size; |
340 | 340 | ||
341 | pr_info("%s: Starting BULK AUDIO transfers\n", __func__); | 341 | pr_debug("%s: Starting BULK AUDIO transfers\n", __func__); |
342 | 342 | ||
343 | if (dev->state & DEV_DISCONNECTED) | 343 | if (dev->state & DEV_DISCONNECTED) |
344 | return -ENODEV; | 344 | return -ENODEV; |
@@ -439,8 +439,7 @@ static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream) | |||
439 | dprintk("opening device and trying to acquire exclusive lock\n"); | 439 | dprintk("opening device and trying to acquire exclusive lock\n"); |
440 | 440 | ||
441 | if (!dev) { | 441 | if (!dev) { |
442 | pr_err("BUG: cx231xx can't find device struct." | 442 | pr_err("BUG: cx231xx can't find device struct. Can't proceed with open\n"); |
443 | " Can't proceed with open\n"); | ||
444 | return -ENODEV; | 443 | return -ENODEV; |
445 | } | 444 | } |
446 | 445 | ||
@@ -662,8 +661,7 @@ static int cx231xx_audio_init(struct cx231xx *dev) | |||
662 | return 0; | 661 | return 0; |
663 | } | 662 | } |
664 | 663 | ||
665 | pr_info("cx231xx-audio.c: probing for cx231xx " | 664 | pr_debug("probing for cx231xx non standard usbaudio\n"); |
666 | "non standard usbaudio\n"); | ||
667 | 665 | ||
668 | err = snd_card_new(&dev->udev->dev, index[devnr], "Cx231xx Audio", | 666 | err = snd_card_new(&dev->udev->dev, index[devnr], "Cx231xx Audio", |
669 | THIS_MODULE, 0, &card); | 667 | THIS_MODULE, 0, &card); |
@@ -707,14 +705,12 @@ static int cx231xx_audio_init(struct cx231xx *dev) | |||
707 | bEndpointAddress; | 705 | bEndpointAddress; |
708 | 706 | ||
709 | adev->num_alt = uif->num_altsetting; | 707 | adev->num_alt = uif->num_altsetting; |
710 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 708 | pr_info("audio EndPoint Addr 0x%x, Alternate settings: %i\n", |
711 | adev->end_point_addr, adev->num_alt); | 709 | adev->end_point_addr, adev->num_alt); |
712 | adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL); | 710 | adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL); |
713 | 711 | ||
714 | if (adev->alt_max_pkt_size == NULL) { | 712 | if (adev->alt_max_pkt_size == NULL) |
715 | pr_err("out of memory!\n"); | ||
716 | return -ENOMEM; | 713 | return -ENOMEM; |
717 | } | ||
718 | 714 | ||
719 | for (i = 0; i < adev->num_alt; i++) { | 715 | for (i = 0; i < adev->num_alt; i++) { |
720 | u16 tmp = | 716 | u16 tmp = |
@@ -722,7 +718,7 @@ static int cx231xx_audio_init(struct cx231xx *dev) | |||
722 | wMaxPacketSize); | 718 | wMaxPacketSize); |
723 | adev->alt_max_pkt_size[i] = | 719 | adev->alt_max_pkt_size[i] = |
724 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 720 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
725 | pr_info("Alternate setting %i, max size= %i\n", i, | 721 | pr_debug("audio alternate setting %i, max size= %i\n", i, |
726 | adev->alt_max_pkt_size[i]); | 722 | adev->alt_max_pkt_size[i]); |
727 | } | 723 | } |
728 | 724 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c index 58b42e63405c..62c63b9e2291 100644 --- a/drivers/media/usb/cx231xx/cx231xx-avcore.c +++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c | |||
@@ -83,10 +83,10 @@ void initGPIO(struct cx231xx *dev) | |||
83 | cx231xx_send_gpio_cmd(dev, _gpio_direction, (u8 *)&value, 4, 0, 0); | 83 | cx231xx_send_gpio_cmd(dev, _gpio_direction, (u8 *)&value, 4, 0, 0); |
84 | 84 | ||
85 | verve_read_byte(dev, 0x07, &val); | 85 | verve_read_byte(dev, 0x07, &val); |
86 | pr_info(" verve_read_byte address0x07=0x%x\n", val); | 86 | pr_debug("verve_read_byte address0x07=0x%x\n", val); |
87 | verve_write_byte(dev, 0x07, 0xF4); | 87 | verve_write_byte(dev, 0x07, 0xF4); |
88 | verve_read_byte(dev, 0x07, &val); | 88 | verve_read_byte(dev, 0x07, &val); |
89 | pr_info(" verve_read_byte address0x07=0x%x\n", val); | 89 | pr_debug("verve_read_byte address0x07=0x%x\n", val); |
90 | 90 | ||
91 | cx231xx_capture_start(dev, 1, Vbi); | 91 | cx231xx_capture_start(dev, 1, Vbi); |
92 | 92 | ||
@@ -156,22 +156,22 @@ int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count) | |||
156 | while (afe_power_status != 0x18) { | 156 | while (afe_power_status != 0x18) { |
157 | status = afe_write_byte(dev, SUP_BLK_PWRDN, 0x18); | 157 | status = afe_write_byte(dev, SUP_BLK_PWRDN, 0x18); |
158 | if (status < 0) { | 158 | if (status < 0) { |
159 | pr_info( | 159 | pr_debug("%s: Init Super Block failed in send cmd\n", |
160 | ": Init Super Block failed in send cmd\n"); | 160 | __func__); |
161 | break; | 161 | break; |
162 | } | 162 | } |
163 | 163 | ||
164 | status = afe_read_byte(dev, SUP_BLK_PWRDN, &afe_power_status); | 164 | status = afe_read_byte(dev, SUP_BLK_PWRDN, &afe_power_status); |
165 | afe_power_status &= 0xff; | 165 | afe_power_status &= 0xff; |
166 | if (status < 0) { | 166 | if (status < 0) { |
167 | pr_info( | 167 | pr_debug("%s: Init Super Block failed in receive cmd\n", |
168 | ": Init Super Block failed in receive cmd\n"); | 168 | __func__); |
169 | break; | 169 | break; |
170 | } | 170 | } |
171 | i++; | 171 | i++; |
172 | if (i == 10) { | 172 | if (i == 10) { |
173 | pr_info( | 173 | pr_debug("%s: Init Super Block force break in loop !!!!\n", |
174 | ": Init Super Block force break in loop !!!!\n"); | 174 | __func__); |
175 | status = -1; | 175 | status = -1; |
176 | break; | 176 | break; |
177 | } | 177 | } |
@@ -410,7 +410,7 @@ int cx231xx_afe_update_power_control(struct cx231xx *dev, | |||
410 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, | 410 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, |
411 | 0x00); | 411 | 0x00); |
412 | } else { | 412 | } else { |
413 | pr_info("Invalid AV mode input\n"); | 413 | pr_debug("Invalid AV mode input\n"); |
414 | status = -1; | 414 | status = -1; |
415 | } | 415 | } |
416 | break; | 416 | break; |
@@ -467,7 +467,7 @@ int cx231xx_afe_update_power_control(struct cx231xx *dev, | |||
467 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, | 467 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, |
468 | 0x40); | 468 | 0x40); |
469 | } else { | 469 | } else { |
470 | pr_info("Invalid AV mode input\n"); | 470 | pr_debug("Invalid AV mode input\n"); |
471 | status = -1; | 471 | status = -1; |
472 | } | 472 | } |
473 | } /* switch */ | 473 | } /* switch */ |
@@ -628,8 +628,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
628 | if (pin_type != dev->video_input) { | 628 | if (pin_type != dev->video_input) { |
629 | status = cx231xx_afe_adjust_ref_count(dev, pin_type); | 629 | status = cx231xx_afe_adjust_ref_count(dev, pin_type); |
630 | if (status < 0) { | 630 | if (status < 0) { |
631 | pr_err("%s: adjust_ref_count :Failed to set" | 631 | pr_err("%s: adjust_ref_count :Failed to set AFE input mux - errCode [%d]!\n", |
632 | "AFE input mux - errCode [%d]!\n", | ||
633 | __func__, status); | 632 | __func__, status); |
634 | return status; | 633 | return status; |
635 | } | 634 | } |
@@ -638,9 +637,8 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
638 | /* call afe block to set video inputs */ | 637 | /* call afe block to set video inputs */ |
639 | status = cx231xx_afe_set_input_mux(dev, input); | 638 | status = cx231xx_afe_set_input_mux(dev, input); |
640 | if (status < 0) { | 639 | if (status < 0) { |
641 | pr_err("%s: set_input_mux :Failed to set" | 640 | pr_err("%s: set_input_mux :Failed to set AFE input mux - errCode [%d]!\n", |
642 | " AFE input mux - errCode [%d]!\n", | 641 | __func__, status); |
643 | __func__, status); | ||
644 | return status; | 642 | return status; |
645 | } | 643 | } |
646 | 644 | ||
@@ -670,8 +668,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
670 | /* Tell DIF object to go to baseband mode */ | 668 | /* Tell DIF object to go to baseband mode */ |
671 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); | 669 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); |
672 | if (status < 0) { | 670 | if (status < 0) { |
673 | pr_err("%s: cx231xx_dif set to By pass" | 671 | pr_err("%s: cx231xx_dif set to By pass mode- errCode [%d]!\n", |
674 | " mode- errCode [%d]!\n", | ||
675 | __func__, status); | 672 | __func__, status); |
676 | return status; | 673 | return status; |
677 | } | 674 | } |
@@ -715,8 +712,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
715 | /* Tell DIF object to go to baseband mode */ | 712 | /* Tell DIF object to go to baseband mode */ |
716 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); | 713 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); |
717 | if (status < 0) { | 714 | if (status < 0) { |
718 | pr_err("%s: cx231xx_dif set to By pass" | 715 | pr_err("%s: cx231xx_dif set to By pass mode- errCode [%d]!\n", |
719 | " mode- errCode [%d]!\n", | ||
720 | __func__, status); | 716 | __func__, status); |
721 | return status; | 717 | return status; |
722 | } | 718 | } |
@@ -790,9 +786,8 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
790 | status = cx231xx_dif_set_standard(dev, | 786 | status = cx231xx_dif_set_standard(dev, |
791 | DIF_USE_BASEBAND); | 787 | DIF_USE_BASEBAND); |
792 | if (status < 0) { | 788 | if (status < 0) { |
793 | pr_err("%s: cx231xx_dif set to By pass" | 789 | pr_err("%s: cx231xx_dif set to By pass mode- errCode [%d]!\n", |
794 | " mode- errCode [%d]!\n", | 790 | __func__, status); |
795 | __func__, status); | ||
796 | return status; | 791 | return status; |
797 | } | 792 | } |
798 | 793 | ||
@@ -826,9 +821,8 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
826 | /* Reinitialize the DIF */ | 821 | /* Reinitialize the DIF */ |
827 | status = cx231xx_dif_set_standard(dev, dev->norm); | 822 | status = cx231xx_dif_set_standard(dev, dev->norm); |
828 | if (status < 0) { | 823 | if (status < 0) { |
829 | pr_err("%s: cx231xx_dif set to By pass" | 824 | pr_err("%s: cx231xx_dif set to By pass mode- errCode [%d]!\n", |
830 | " mode- errCode [%d]!\n", | 825 | __func__, status); |
831 | __func__, status); | ||
832 | return status; | 826 | return status; |
833 | } | 827 | } |
834 | 828 | ||
@@ -970,14 +964,14 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) | |||
970 | { | 964 | { |
971 | int status = 0; | 965 | int status = 0; |
972 | 966 | ||
973 | pr_info("do_mode_ctrl_overrides : 0x%x\n", | 967 | pr_debug("%s: 0x%x\n", |
974 | (unsigned int)dev->norm); | 968 | __func__, (unsigned int)dev->norm); |
975 | 969 | ||
976 | /* Change the DFE_CTRL3 bp_percent to fix flagging */ | 970 | /* Change the DFE_CTRL3 bp_percent to fix flagging */ |
977 | status = vid_blk_write_word(dev, DFE_CTRL3, 0xCD3F0280); | 971 | status = vid_blk_write_word(dev, DFE_CTRL3, 0xCD3F0280); |
978 | 972 | ||
979 | if (dev->norm & (V4L2_STD_NTSC | V4L2_STD_PAL_M)) { | 973 | if (dev->norm & (V4L2_STD_NTSC | V4L2_STD_PAL_M)) { |
980 | pr_info("do_mode_ctrl_overrides NTSC\n"); | 974 | pr_debug("%s: NTSC\n", __func__); |
981 | 975 | ||
982 | /* Move the close caption lines out of active video, | 976 | /* Move the close caption lines out of active video, |
983 | adjust the active video start point */ | 977 | adjust the active video start point */ |
@@ -1004,7 +998,7 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) | |||
1004 | (FLD_HBLANK_CNT, 0x79)); | 998 | (FLD_HBLANK_CNT, 0x79)); |
1005 | 999 | ||
1006 | } else if (dev->norm & V4L2_STD_SECAM) { | 1000 | } else if (dev->norm & V4L2_STD_SECAM) { |
1007 | pr_info("do_mode_ctrl_overrides SECAM\n"); | 1001 | pr_debug("%s: SECAM\n", __func__); |
1008 | status = cx231xx_read_modify_write_i2c_dword(dev, | 1002 | status = cx231xx_read_modify_write_i2c_dword(dev, |
1009 | VID_BLK_I2C_ADDRESS, | 1003 | VID_BLK_I2C_ADDRESS, |
1010 | VERT_TIM_CTRL, | 1004 | VERT_TIM_CTRL, |
@@ -1031,7 +1025,7 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) | |||
1031 | cx231xx_set_field | 1025 | cx231xx_set_field |
1032 | (FLD_HBLANK_CNT, 0x85)); | 1026 | (FLD_HBLANK_CNT, 0x85)); |
1033 | } else { | 1027 | } else { |
1034 | pr_info("do_mode_ctrl_overrides PAL\n"); | 1028 | pr_debug("%s: PAL\n", __func__); |
1035 | status = cx231xx_read_modify_write_i2c_dword(dev, | 1029 | status = cx231xx_read_modify_write_i2c_dword(dev, |
1036 | VID_BLK_I2C_ADDRESS, | 1030 | VID_BLK_I2C_ADDRESS, |
1037 | VERT_TIM_CTRL, | 1031 | VERT_TIM_CTRL, |
@@ -1331,113 +1325,113 @@ void cx231xx_dump_HH_reg(struct cx231xx *dev) | |||
1331 | 1325 | ||
1332 | for (i = 0x100; i < 0x140; i++) { | 1326 | for (i = 0x100; i < 0x140; i++) { |
1333 | vid_blk_read_word(dev, i, &value); | 1327 | vid_blk_read_word(dev, i, &value); |
1334 | pr_info("reg0x%x=0x%x\n", i, value); | 1328 | pr_debug("reg0x%x=0x%x\n", i, value); |
1335 | i = i+3; | 1329 | i = i+3; |
1336 | } | 1330 | } |
1337 | 1331 | ||
1338 | for (i = 0x300; i < 0x400; i++) { | 1332 | for (i = 0x300; i < 0x400; i++) { |
1339 | vid_blk_read_word(dev, i, &value); | 1333 | vid_blk_read_word(dev, i, &value); |
1340 | pr_info("reg0x%x=0x%x\n", i, value); | 1334 | pr_debug("reg0x%x=0x%x\n", i, value); |
1341 | i = i+3; | 1335 | i = i+3; |
1342 | } | 1336 | } |
1343 | 1337 | ||
1344 | for (i = 0x400; i < 0x440; i++) { | 1338 | for (i = 0x400; i < 0x440; i++) { |
1345 | vid_blk_read_word(dev, i, &value); | 1339 | vid_blk_read_word(dev, i, &value); |
1346 | pr_info("reg0x%x=0x%x\n", i, value); | 1340 | pr_debug("reg0x%x=0x%x\n", i, value); |
1347 | i = i+3; | 1341 | i = i+3; |
1348 | } | 1342 | } |
1349 | 1343 | ||
1350 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); | 1344 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); |
1351 | pr_info("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); | 1345 | pr_debug("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); |
1352 | vid_blk_write_word(dev, AFE_CTRL_C2HH_SRC_CTRL, 0x4485D390); | 1346 | vid_blk_write_word(dev, AFE_CTRL_C2HH_SRC_CTRL, 0x4485D390); |
1353 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); | 1347 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); |
1354 | pr_info("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); | 1348 | pr_debug("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); |
1355 | } | 1349 | } |
1356 | 1350 | ||
1357 | void cx231xx_dump_SC_reg(struct cx231xx *dev) | 1351 | #if 0 |
1352 | static void cx231xx_dump_SC_reg(struct cx231xx *dev) | ||
1358 | { | 1353 | { |
1359 | u8 value[4] = { 0, 0, 0, 0 }; | 1354 | u8 value[4] = { 0, 0, 0, 0 }; |
1360 | pr_info("cx231xx_dump_SC_reg!\n"); | 1355 | pr_debug("%s!\n", __func__); |
1361 | 1356 | ||
1362 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, | 1357 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, |
1363 | value, 4); | 1358 | value, 4); |
1364 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", BOARD_CFG_STAT, value[0], | 1359 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", BOARD_CFG_STAT, value[0], |
1365 | value[1], value[2], value[3]); | 1360 | value[1], value[2], value[3]); |
1366 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS_MODE_REG, | 1361 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS_MODE_REG, |
1367 | value, 4); | 1362 | value, 4); |
1368 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS_MODE_REG, value[0], | 1363 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS_MODE_REG, value[0], |
1369 | value[1], value[2], value[3]); | 1364 | value[1], value[2], value[3]); |
1370 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_CFG_REG, | 1365 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_CFG_REG, |
1371 | value, 4); | 1366 | value, 4); |
1372 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_CFG_REG, value[0], | 1367 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_CFG_REG, value[0], |
1373 | value[1], value[2], value[3]); | 1368 | value[1], value[2], value[3]); |
1374 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_LENGTH_REG, | 1369 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_LENGTH_REG, |
1375 | value, 4); | 1370 | value, 4); |
1376 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_LENGTH_REG, value[0], | 1371 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_LENGTH_REG, value[0], |
1377 | value[1], value[2], value[3]); | 1372 | value[1], value[2], value[3]); |
1378 | 1373 | ||
1379 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_CFG_REG, | 1374 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_CFG_REG, |
1380 | value, 4); | 1375 | value, 4); |
1381 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_CFG_REG, value[0], | 1376 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_CFG_REG, value[0], |
1382 | value[1], value[2], value[3]); | 1377 | value[1], value[2], value[3]); |
1383 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_LENGTH_REG, | 1378 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_LENGTH_REG, |
1384 | value, 4); | 1379 | value, 4); |
1385 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_LENGTH_REG, value[0], | 1380 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_LENGTH_REG, value[0], |
1386 | value[1], value[2], value[3]); | 1381 | value[1], value[2], value[3]); |
1387 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, | 1382 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, |
1388 | value, 4); | 1383 | value, 4); |
1389 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", EP_MODE_SET, value[0], | 1384 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", EP_MODE_SET, value[0], |
1390 | value[1], value[2], value[3]); | 1385 | value[1], value[2], value[3]); |
1391 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN1, | 1386 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN1, |
1392 | value, 4); | 1387 | value, 4); |
1393 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN1, value[0], | 1388 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN1, value[0], |
1394 | value[1], value[2], value[3]); | 1389 | value[1], value[2], value[3]); |
1395 | 1390 | ||
1396 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN2, | 1391 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN2, |
1397 | value, 4); | 1392 | value, 4); |
1398 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN2, value[0], | 1393 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN2, value[0], |
1399 | value[1], value[2], value[3]); | 1394 | value[1], value[2], value[3]); |
1400 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN3, | 1395 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN3, |
1401 | value, 4); | 1396 | value, 4); |
1402 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN3, value[0], | 1397 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN3, value[0], |
1403 | value[1], value[2], value[3]); | 1398 | value[1], value[2], value[3]); |
1404 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK0, | 1399 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK0, |
1405 | value, 4); | 1400 | value, 4); |
1406 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK0, value[0], | 1401 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK0, value[0], |
1407 | value[1], value[2], value[3]); | 1402 | value[1], value[2], value[3]); |
1408 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK1, | 1403 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK1, |
1409 | value, 4); | 1404 | value, 4); |
1410 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK1, value[0], | 1405 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK1, value[0], |
1411 | value[1], value[2], value[3]); | 1406 | value[1], value[2], value[3]); |
1412 | 1407 | ||
1413 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK2, | 1408 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK2, |
1414 | value, 4); | 1409 | value, 4); |
1415 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK2, value[0], | 1410 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK2, value[0], |
1416 | value[1], value[2], value[3]); | 1411 | value[1], value[2], value[3]); |
1417 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_GAIN, | 1412 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_GAIN, |
1418 | value, 4); | 1413 | value, 4); |
1419 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_GAIN, value[0], | 1414 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_GAIN, value[0], |
1420 | value[1], value[2], value[3]); | 1415 | value[1], value[2], value[3]); |
1421 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_CAR_REG, | 1416 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_CAR_REG, |
1422 | value, 4); | 1417 | value, 4); |
1423 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_CAR_REG, value[0], | 1418 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_CAR_REG, value[0], |
1424 | value[1], value[2], value[3]); | 1419 | value[1], value[2], value[3]); |
1425 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG1, | 1420 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG1, |
1426 | value, 4); | 1421 | value, 4); |
1427 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG1, value[0], | 1422 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG1, value[0], |
1428 | value[1], value[2], value[3]); | 1423 | value[1], value[2], value[3]); |
1429 | 1424 | ||
1430 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG2, | 1425 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG2, |
1431 | value, 4); | 1426 | value, 4); |
1432 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG2, value[0], | 1427 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG2, value[0], |
1433 | value[1], value[2], value[3]); | 1428 | value[1], value[2], value[3]); |
1434 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, | 1429 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, |
1435 | value, 4); | 1430 | value, 4); |
1436 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", PWR_CTL_EN, value[0], | 1431 | pr_debug("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", PWR_CTL_EN, value[0], |
1437 | value[1], value[2], value[3]); | 1432 | value[1], value[2], value[3]); |
1438 | |||
1439 | |||
1440 | } | 1433 | } |
1434 | #endif | ||
1441 | 1435 | ||
1442 | void cx231xx_Setup_AFE_for_LowIF(struct cx231xx *dev) | 1436 | void cx231xx_Setup_AFE_for_LowIF(struct cx231xx *dev) |
1443 | 1437 | ||
@@ -1503,7 +1497,7 @@ void cx231xx_set_Colibri_For_LowIF(struct cx231xx *dev, u32 if_freq, | |||
1503 | u32 standard = 0; | 1497 | u32 standard = 0; |
1504 | u8 value[4] = { 0, 0, 0, 0 }; | 1498 | u8 value[4] = { 0, 0, 0, 0 }; |
1505 | 1499 | ||
1506 | pr_info("Enter cx231xx_set_Colibri_For_LowIF()\n"); | 1500 | pr_debug("Enter cx231xx_set_Colibri_For_LowIF()\n"); |
1507 | value[0] = (u8) 0x6F; | 1501 | value[0] = (u8) 0x6F; |
1508 | value[1] = (u8) 0x6F; | 1502 | value[1] = (u8) 0x6F; |
1509 | value[2] = (u8) 0x6F; | 1503 | value[2] = (u8) 0x6F; |
@@ -1523,7 +1517,7 @@ void cx231xx_set_Colibri_For_LowIF(struct cx231xx *dev, u32 if_freq, | |||
1523 | colibri_carrier_offset = cx231xx_Get_Colibri_CarrierOffset(mode, | 1517 | colibri_carrier_offset = cx231xx_Get_Colibri_CarrierOffset(mode, |
1524 | standard); | 1518 | standard); |
1525 | 1519 | ||
1526 | pr_info("colibri_carrier_offset=%d, standard=0x%x\n", | 1520 | pr_debug("colibri_carrier_offset=%d, standard=0x%x\n", |
1527 | colibri_carrier_offset, standard); | 1521 | colibri_carrier_offset, standard); |
1528 | 1522 | ||
1529 | /* Set the band Pass filter for DIF*/ | 1523 | /* Set the band Pass filter for DIF*/ |
@@ -1557,7 +1551,7 @@ void cx231xx_set_DIF_bandpass(struct cx231xx *dev, u32 if_freq, | |||
1557 | u64 pll_freq_u64 = 0; | 1551 | u64 pll_freq_u64 = 0; |
1558 | u32 i = 0; | 1552 | u32 i = 0; |
1559 | 1553 | ||
1560 | pr_info("if_freq=%d;spectral_invert=0x%x;mode=0x%x\n", | 1554 | pr_debug("if_freq=%d;spectral_invert=0x%x;mode=0x%x\n", |
1561 | if_freq, spectral_invert, mode); | 1555 | if_freq, spectral_invert, mode); |
1562 | 1556 | ||
1563 | 1557 | ||
@@ -1601,7 +1595,7 @@ void cx231xx_set_DIF_bandpass(struct cx231xx *dev, u32 if_freq, | |||
1601 | if_freq = 16000000; | 1595 | if_freq = 16000000; |
1602 | } | 1596 | } |
1603 | 1597 | ||
1604 | pr_info("Enter IF=%zu\n", | 1598 | pr_debug("Enter IF=%zu\n", |
1605 | ARRAY_SIZE(Dif_set_array)); | 1599 | ARRAY_SIZE(Dif_set_array)); |
1606 | for (i = 0; i < ARRAY_SIZE(Dif_set_array); i++) { | 1600 | for (i = 0; i < ARRAY_SIZE(Dif_set_array); i++) { |
1607 | if (Dif_set_array[i].if_freq == if_freq) { | 1601 | if (Dif_set_array[i].if_freq == if_freq) { |
@@ -1714,7 +1708,7 @@ int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard) | |||
1714 | u32 dif_misc_ctrl_value = 0; | 1708 | u32 dif_misc_ctrl_value = 0; |
1715 | u32 func_mode = 0; | 1709 | u32 func_mode = 0; |
1716 | 1710 | ||
1717 | pr_info("%s: setStandard to %x\n", __func__, standard); | 1711 | pr_debug("%s: setStandard to %x\n", __func__, standard); |
1718 | 1712 | ||
1719 | status = vid_blk_read_word(dev, DIF_MISC_CTRL, &dif_misc_ctrl_value); | 1713 | status = vid_blk_read_word(dev, DIF_MISC_CTRL, &dif_misc_ctrl_value); |
1720 | if (standard != DIF_USE_BASEBAND) | 1714 | if (standard != DIF_USE_BASEBAND) |
@@ -2117,8 +2111,8 @@ int cx231xx_tuner_post_channel_change(struct cx231xx *dev) | |||
2117 | { | 2111 | { |
2118 | int status = 0; | 2112 | int status = 0; |
2119 | u32 dwval; | 2113 | u32 dwval; |
2120 | pr_info("cx231xx_tuner_post_channel_change dev->tuner_type =0%d\n", | 2114 | pr_debug("%s: dev->tuner_type =0%d\n", |
2121 | dev->tuner_type); | 2115 | __func__, dev->tuner_type); |
2122 | /* Set the RF and IF k_agc values to 4 for PAL/NTSC and 8 for | 2116 | /* Set the RF and IF k_agc values to 4 for PAL/NTSC and 8 for |
2123 | * SECAM L/B/D standards */ | 2117 | * SECAM L/B/D standards */ |
2124 | status = vid_blk_read_word(dev, DIF_AGC_IF_REF, &dwval); | 2118 | status = vid_blk_read_word(dev, DIF_AGC_IF_REF, &dwval); |
@@ -2219,8 +2213,8 @@ int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode) | |||
2219 | if (dev->power_mode != mode) | 2213 | if (dev->power_mode != mode) |
2220 | dev->power_mode = mode; | 2214 | dev->power_mode = mode; |
2221 | else { | 2215 | else { |
2222 | pr_info(" setPowerMode::mode = %d, No Change req.\n", | 2216 | pr_debug("%s: mode = %d, No Change req.\n", |
2223 | mode); | 2217 | __func__, mode); |
2224 | return 0; | 2218 | return 0; |
2225 | } | 2219 | } |
2226 | 2220 | ||
@@ -2459,7 +2453,7 @@ int cx231xx_start_stream(struct cx231xx *dev, u32 ep_mask) | |||
2459 | u32 tmp = 0; | 2453 | u32 tmp = 0; |
2460 | int status = 0; | 2454 | int status = 0; |
2461 | 2455 | ||
2462 | pr_info("cx231xx_start_stream():: ep_mask = %x\n", ep_mask); | 2456 | pr_debug("%s: ep_mask = %x\n", __func__, ep_mask); |
2463 | status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, | 2457 | status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, |
2464 | value, 4); | 2458 | value, 4); |
2465 | if (status < 0) | 2459 | if (status < 0) |
@@ -2484,7 +2478,7 @@ int cx231xx_stop_stream(struct cx231xx *dev, u32 ep_mask) | |||
2484 | u32 tmp = 0; | 2478 | u32 tmp = 0; |
2485 | int status = 0; | 2479 | int status = 0; |
2486 | 2480 | ||
2487 | pr_info("cx231xx_stop_stream():: ep_mask = %x\n", ep_mask); | 2481 | pr_debug("%s: ep_mask = %x\n", __func__, ep_mask); |
2488 | status = | 2482 | status = |
2489 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, value, 4); | 2483 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, value, 4); |
2490 | if (status < 0) | 2484 | if (status < 0) |
@@ -2512,24 +2506,24 @@ int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type) | |||
2512 | if (dev->udev->speed == USB_SPEED_HIGH) { | 2506 | if (dev->udev->speed == USB_SPEED_HIGH) { |
2513 | switch (media_type) { | 2507 | switch (media_type) { |
2514 | case Audio: | 2508 | case Audio: |
2515 | pr_info("%s: Audio enter HANC\n", __func__); | 2509 | pr_debug("%s: Audio enter HANC\n", __func__); |
2516 | status = | 2510 | status = |
2517 | cx231xx_mode_register(dev, TS_MODE_REG, 0x9300); | 2511 | cx231xx_mode_register(dev, TS_MODE_REG, 0x9300); |
2518 | break; | 2512 | break; |
2519 | 2513 | ||
2520 | case Vbi: | 2514 | case Vbi: |
2521 | pr_info("%s: set vanc registers\n", __func__); | 2515 | pr_debug("%s: set vanc registers\n", __func__); |
2522 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x300); | 2516 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x300); |
2523 | break; | 2517 | break; |
2524 | 2518 | ||
2525 | case Sliced_cc: | 2519 | case Sliced_cc: |
2526 | pr_info("%s: set hanc registers\n", __func__); | 2520 | pr_debug("%s: set hanc registers\n", __func__); |
2527 | status = | 2521 | status = |
2528 | cx231xx_mode_register(dev, TS_MODE_REG, 0x1300); | 2522 | cx231xx_mode_register(dev, TS_MODE_REG, 0x1300); |
2529 | break; | 2523 | break; |
2530 | 2524 | ||
2531 | case Raw_Video: | 2525 | case Raw_Video: |
2532 | pr_info("%s: set video registers\n", __func__); | 2526 | pr_debug("%s: set video registers\n", __func__); |
2533 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); | 2527 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); |
2534 | break; | 2528 | break; |
2535 | 2529 | ||
@@ -2569,7 +2563,7 @@ int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type) | |||
2569 | break; | 2563 | break; |
2570 | 2564 | ||
2571 | case TS1_parallel_mode: | 2565 | case TS1_parallel_mode: |
2572 | pr_info("%s: set ts1 parallel mode registers\n", | 2566 | pr_debug("%s: set ts1 parallel mode registers\n", |
2573 | __func__); | 2567 | __func__); |
2574 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); | 2568 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); |
2575 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400); | 2569 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400); |
@@ -2923,7 +2917,7 @@ int cx231xx_gpio_i2c_read_ack(struct cx231xx *dev) | |||
2923 | (nCnt > 0)); | 2917 | (nCnt > 0)); |
2924 | 2918 | ||
2925 | if (nCnt == 0) | 2919 | if (nCnt == 0) |
2926 | pr_info("No ACK after %d msec -GPIO I2C failed!", | 2920 | pr_debug("No ACK after %d msec -GPIO I2C failed!", |
2927 | nInit * 10); | 2921 | nInit * 10); |
2928 | 2922 | ||
2929 | /* | 2923 | /* |
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index 375fd85447f8..d59f483102d2 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c | |||
@@ -856,8 +856,7 @@ int cx231xx_tuner_callback(void *ptr, int component, int command, int arg) | |||
856 | 856 | ||
857 | if (dev->tuner_type == TUNER_XC5000) { | 857 | if (dev->tuner_type == TUNER_XC5000) { |
858 | if (command == XC5000_TUNER_RESET) { | 858 | if (command == XC5000_TUNER_RESET) { |
859 | pr_info | 859 | pr_debug("Tuner CB: RESET: cmd %d : tuner type %d \n", |
860 | ("Tuner CB: RESET: cmd %d : tuner type %d \n", | ||
861 | command, dev->tuner_type); | 860 | command, dev->tuner_type); |
862 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, | 861 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, |
863 | 1); | 862 | 1); |
@@ -917,7 +916,7 @@ void cx231xx_pre_card_setup(struct cx231xx *dev) | |||
917 | cx231xx_set_model(dev); | 916 | cx231xx_set_model(dev); |
918 | 917 | ||
919 | pr_info("Identified as %s (card=%d)\n", | 918 | pr_info("Identified as %s (card=%d)\n", |
920 | dev->board.name, dev->model); | 919 | dev->board.name, dev->model); |
921 | 920 | ||
922 | /* set the direction for GPIO pins */ | 921 | /* set the direction for GPIO pins */ |
923 | if (dev->board.tuner_gpio) { | 922 | if (dev->board.tuner_gpio) { |
@@ -1008,7 +1007,7 @@ static int read_eeprom(struct cx231xx *dev, struct i2c_client *client, | |||
1008 | } | 1007 | } |
1009 | 1008 | ||
1010 | for (i = 0; i + 15 < len; i += 16) | 1009 | for (i = 0; i + 15 < len; i += 16) |
1011 | pr_info("i2c eeprom %02x: %*ph\n", i, 16, &eedata[i]); | 1010 | pr_debug("i2c eeprom %02x: %*ph\n", i, 16, &eedata[i]); |
1012 | 1011 | ||
1013 | return 0; | 1012 | return 0; |
1014 | } | 1013 | } |
@@ -1028,7 +1027,7 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
1028 | cx231xx_get_i2c_adap(dev, I2C_0), | 1027 | cx231xx_get_i2c_adap(dev, I2C_0), |
1029 | "cx25840", 0x88 >> 1, NULL); | 1028 | "cx25840", 0x88 >> 1, NULL); |
1030 | if (dev->sd_cx25840 == NULL) | 1029 | if (dev->sd_cx25840 == NULL) |
1031 | pr_info("cx25840 subdev registration failure\n"); | 1030 | pr_err("cx25840 subdev registration failure\n"); |
1032 | cx25840_call(dev, core, load_fw); | 1031 | cx25840_call(dev, core, load_fw); |
1033 | 1032 | ||
1034 | } | 1033 | } |
@@ -1042,7 +1041,7 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
1042 | "tuner", | 1041 | "tuner", |
1043 | dev->tuner_addr, NULL); | 1042 | dev->tuner_addr, NULL); |
1044 | if (dev->sd_tuner == NULL) | 1043 | if (dev->sd_tuner == NULL) |
1045 | pr_info("tuner subdev registration failure\n"); | 1044 | pr_err("tuner subdev registration failure\n"); |
1046 | else | 1045 | else |
1047 | cx231xx_config_tuner(dev); | 1046 | cx231xx_config_tuner(dev); |
1048 | } | 1047 | } |
@@ -1290,21 +1289,19 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1290 | dev->video_mode.end_point_addr = uif->altsetting[0].endpoint[isoc_pipe].desc.bEndpointAddress; | 1289 | dev->video_mode.end_point_addr = uif->altsetting[0].endpoint[isoc_pipe].desc.bEndpointAddress; |
1291 | dev->video_mode.num_alt = uif->num_altsetting; | 1290 | dev->video_mode.num_alt = uif->num_altsetting; |
1292 | 1291 | ||
1293 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1292 | pr_info("video EndPoint Addr 0x%x, Alternate settings: %i\n", |
1294 | dev->video_mode.end_point_addr, | 1293 | dev->video_mode.end_point_addr, |
1295 | dev->video_mode.num_alt); | 1294 | dev->video_mode.num_alt); |
1296 | 1295 | ||
1297 | dev->video_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->video_mode.num_alt, GFP_KERNEL); | 1296 | dev->video_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->video_mode.num_alt, GFP_KERNEL); |
1298 | if (dev->video_mode.alt_max_pkt_size == NULL) { | 1297 | if (dev->video_mode.alt_max_pkt_size == NULL) |
1299 | pr_err("out of memory!\n"); | ||
1300 | return -ENOMEM; | 1298 | return -ENOMEM; |
1301 | } | ||
1302 | 1299 | ||
1303 | for (i = 0; i < dev->video_mode.num_alt; i++) { | 1300 | for (i = 0; i < dev->video_mode.num_alt; i++) { |
1304 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.wMaxPacketSize); | 1301 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.wMaxPacketSize); |
1305 | dev->video_mode.alt_max_pkt_size[i] = (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1302 | dev->video_mode.alt_max_pkt_size[i] = (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1306 | pr_info("Alternate setting %i, max size= %i\n", i, | 1303 | pr_debug("Alternate setting %i, max size= %i\n", i, |
1307 | dev->video_mode.alt_max_pkt_size[i]); | 1304 | dev->video_mode.alt_max_pkt_size[i]); |
1308 | } | 1305 | } |
1309 | 1306 | ||
1310 | /* VBI Init */ | 1307 | /* VBI Init */ |
@@ -1321,16 +1318,14 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1321 | bEndpointAddress; | 1318 | bEndpointAddress; |
1322 | 1319 | ||
1323 | dev->vbi_mode.num_alt = uif->num_altsetting; | 1320 | dev->vbi_mode.num_alt = uif->num_altsetting; |
1324 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1321 | pr_info("VBI EndPoint Addr 0x%x, Alternate settings: %i\n", |
1325 | dev->vbi_mode.end_point_addr, | 1322 | dev->vbi_mode.end_point_addr, |
1326 | dev->vbi_mode.num_alt); | 1323 | dev->vbi_mode.num_alt); |
1327 | 1324 | ||
1328 | /* compute alternate max packet sizes for vbi */ | 1325 | /* compute alternate max packet sizes for vbi */ |
1329 | dev->vbi_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->vbi_mode.num_alt, GFP_KERNEL); | 1326 | dev->vbi_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->vbi_mode.num_alt, GFP_KERNEL); |
1330 | if (dev->vbi_mode.alt_max_pkt_size == NULL) { | 1327 | if (dev->vbi_mode.alt_max_pkt_size == NULL) |
1331 | pr_err("out of memory!\n"); | ||
1332 | return -ENOMEM; | 1328 | return -ENOMEM; |
1333 | } | ||
1334 | 1329 | ||
1335 | for (i = 0; i < dev->vbi_mode.num_alt; i++) { | 1330 | for (i = 0; i < dev->vbi_mode.num_alt; i++) { |
1336 | u16 tmp = | 1331 | u16 tmp = |
@@ -1338,8 +1333,8 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1338 | desc.wMaxPacketSize); | 1333 | desc.wMaxPacketSize); |
1339 | dev->vbi_mode.alt_max_pkt_size[i] = | 1334 | dev->vbi_mode.alt_max_pkt_size[i] = |
1340 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1335 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1341 | pr_info("Alternate setting %i, max size= %i\n", i, | 1336 | pr_debug("Alternate setting %i, max size= %i\n", i, |
1342 | dev->vbi_mode.alt_max_pkt_size[i]); | 1337 | dev->vbi_mode.alt_max_pkt_size[i]); |
1343 | } | 1338 | } |
1344 | 1339 | ||
1345 | /* Sliced CC VBI init */ | 1340 | /* Sliced CC VBI init */ |
@@ -1357,23 +1352,20 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1357 | bEndpointAddress; | 1352 | bEndpointAddress; |
1358 | 1353 | ||
1359 | dev->sliced_cc_mode.num_alt = uif->num_altsetting; | 1354 | dev->sliced_cc_mode.num_alt = uif->num_altsetting; |
1360 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1355 | pr_info("sliced CC EndPoint Addr 0x%x, Alternate settings: %i\n", |
1361 | dev->sliced_cc_mode.end_point_addr, | 1356 | dev->sliced_cc_mode.end_point_addr, |
1362 | dev->sliced_cc_mode.num_alt); | 1357 | dev->sliced_cc_mode.num_alt); |
1363 | dev->sliced_cc_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->sliced_cc_mode.num_alt, GFP_KERNEL); | 1358 | dev->sliced_cc_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->sliced_cc_mode.num_alt, GFP_KERNEL); |
1364 | 1359 | if (dev->sliced_cc_mode.alt_max_pkt_size == NULL) | |
1365 | if (dev->sliced_cc_mode.alt_max_pkt_size == NULL) { | ||
1366 | pr_err("out of memory!\n"); | ||
1367 | return -ENOMEM; | 1360 | return -ENOMEM; |
1368 | } | ||
1369 | 1361 | ||
1370 | for (i = 0; i < dev->sliced_cc_mode.num_alt; i++) { | 1362 | for (i = 0; i < dev->sliced_cc_mode.num_alt; i++) { |
1371 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe]. | 1363 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe]. |
1372 | desc.wMaxPacketSize); | 1364 | desc.wMaxPacketSize); |
1373 | dev->sliced_cc_mode.alt_max_pkt_size[i] = | 1365 | dev->sliced_cc_mode.alt_max_pkt_size[i] = |
1374 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1366 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1375 | pr_info("Alternate setting %i, max size= %i\n", i, | 1367 | pr_debug("Alternate setting %i, max size= %i\n", i, |
1376 | dev->sliced_cc_mode.alt_max_pkt_size[i]); | 1368 | dev->sliced_cc_mode.alt_max_pkt_size[i]); |
1377 | } | 1369 | } |
1378 | 1370 | ||
1379 | return 0; | 1371 | return 0; |
@@ -1410,8 +1402,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1410 | nr = find_first_zero_bit(&cx231xx_devused, CX231XX_MAXBOARDS); | 1402 | nr = find_first_zero_bit(&cx231xx_devused, CX231XX_MAXBOARDS); |
1411 | if (nr >= CX231XX_MAXBOARDS) { | 1403 | if (nr >= CX231XX_MAXBOARDS) { |
1412 | /* No free device slots */ | 1404 | /* No free device slots */ |
1413 | pr_err(DRIVER_NAME ": Supports only %i devices.\n", | 1405 | pr_err("Supports only %i devices.\n", CX231XX_MAXBOARDS); |
1414 | CX231XX_MAXBOARDS); | ||
1415 | return -ENOMEM; | 1406 | return -ENOMEM; |
1416 | } | 1407 | } |
1417 | } while (test_and_set_bit(nr, &cx231xx_devused)); | 1408 | } while (test_and_set_bit(nr, &cx231xx_devused)); |
@@ -1421,7 +1412,6 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1421 | /* allocate memory for our device state and initialize it */ | 1412 | /* allocate memory for our device state and initialize it */ |
1422 | dev = devm_kzalloc(&udev->dev, sizeof(*dev), GFP_KERNEL); | 1413 | dev = devm_kzalloc(&udev->dev, sizeof(*dev), GFP_KERNEL); |
1423 | if (dev == NULL) { | 1414 | if (dev == NULL) { |
1424 | pr_err(DRIVER_NAME ": out of memory!\n"); | ||
1425 | clear_bit(nr, &cx231xx_devused); | 1415 | clear_bit(nr, &cx231xx_devused); |
1426 | return -ENOMEM; | 1416 | return -ENOMEM; |
1427 | } | 1417 | } |
@@ -1468,14 +1458,13 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1468 | speed = "unknown"; | 1458 | speed = "unknown"; |
1469 | } | 1459 | } |
1470 | 1460 | ||
1471 | pr_info("New device %s %s @ %s Mbps " | 1461 | pr_info("New device %s %s @ %s Mbps (%04x:%04x) with %d interfaces\n", |
1472 | "(%04x:%04x) with %d interfaces\n", | 1462 | udev->manufacturer ? udev->manufacturer : "", |
1473 | udev->manufacturer ? udev->manufacturer : "", | 1463 | udev->product ? udev->product : "", |
1474 | udev->product ? udev->product : "", | 1464 | speed, |
1475 | speed, | 1465 | le16_to_cpu(udev->descriptor.idVendor), |
1476 | le16_to_cpu(udev->descriptor.idVendor), | 1466 | le16_to_cpu(udev->descriptor.idProduct), |
1477 | le16_to_cpu(udev->descriptor.idProduct), | 1467 | dev->max_iad_interface_count); |
1478 | dev->max_iad_interface_count); | ||
1479 | 1468 | ||
1480 | /* increment interface count */ | 1469 | /* increment interface count */ |
1481 | dev->interface_count++; | 1470 | dev->interface_count++; |
@@ -1485,13 +1474,12 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1485 | 1474 | ||
1486 | assoc_desc = udev->actconfig->intf_assoc[0]; | 1475 | assoc_desc = udev->actconfig->intf_assoc[0]; |
1487 | if (assoc_desc->bFirstInterface != ifnum) { | 1476 | if (assoc_desc->bFirstInterface != ifnum) { |
1488 | pr_err(DRIVER_NAME ": Not found " | 1477 | pr_err("Not found matching IAD interface\n"); |
1489 | "matching IAD interface\n"); | ||
1490 | retval = -ENODEV; | 1478 | retval = -ENODEV; |
1491 | goto err_if; | 1479 | goto err_if; |
1492 | } | 1480 | } |
1493 | 1481 | ||
1494 | pr_info("registering interface %d\n", ifnum); | 1482 | pr_debug("registering interface %d\n", ifnum); |
1495 | 1483 | ||
1496 | /* save our data pointer in this interface device */ | 1484 | /* save our data pointer in this interface device */ |
1497 | usb_set_intfdata(interface, dev); | 1485 | usb_set_intfdata(interface, dev); |
@@ -1527,13 +1515,12 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1527 | desc.bEndpointAddress; | 1515 | desc.bEndpointAddress; |
1528 | 1516 | ||
1529 | dev->ts1_mode.num_alt = uif->num_altsetting; | 1517 | dev->ts1_mode.num_alt = uif->num_altsetting; |
1530 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1518 | pr_info("TS EndPoint Addr 0x%x, Alternate settings: %i\n", |
1531 | dev->ts1_mode.end_point_addr, | 1519 | dev->ts1_mode.end_point_addr, |
1532 | dev->ts1_mode.num_alt); | 1520 | dev->ts1_mode.num_alt); |
1533 | 1521 | ||
1534 | dev->ts1_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->ts1_mode.num_alt, GFP_KERNEL); | 1522 | dev->ts1_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->ts1_mode.num_alt, GFP_KERNEL); |
1535 | if (dev->ts1_mode.alt_max_pkt_size == NULL) { | 1523 | if (dev->ts1_mode.alt_max_pkt_size == NULL) { |
1536 | pr_err("out of memory!\n"); | ||
1537 | retval = -ENOMEM; | 1524 | retval = -ENOMEM; |
1538 | goto err_video_alt; | 1525 | goto err_video_alt; |
1539 | } | 1526 | } |
@@ -1544,7 +1531,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1544 | wMaxPacketSize); | 1531 | wMaxPacketSize); |
1545 | dev->ts1_mode.alt_max_pkt_size[i] = | 1532 | dev->ts1_mode.alt_max_pkt_size[i] = |
1546 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1533 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1547 | pr_info("Alternate setting %i, max size= %i\n", i, | 1534 | pr_debug("Alternate setting %i, max size= %i\n", i, |
1548 | dev->ts1_mode.alt_max_pkt_size[i]); | 1535 | dev->ts1_mode.alt_max_pkt_size[i]); |
1549 | } | 1536 | } |
1550 | } | 1537 | } |
@@ -1609,10 +1596,8 @@ static void cx231xx_usb_disconnect(struct usb_interface *interface) | |||
1609 | wake_up_interruptible_all(&dev->open); | 1596 | wake_up_interruptible_all(&dev->open); |
1610 | 1597 | ||
1611 | if (dev->users) { | 1598 | if (dev->users) { |
1612 | pr_warn | 1599 | pr_warn("device %s is open! Deregistration and memory deallocation are deferred on close.\n", |
1613 | ("device %s is open! Deregistration and memory " | 1600 | video_device_node_name(dev->vdev)); |
1614 | "deallocation are deferred on close.\n", | ||
1615 | video_device_node_name(dev->vdev)); | ||
1616 | 1601 | ||
1617 | /* Even having users, it is safe to remove the RC i2c driver */ | 1602 | /* Even having users, it is safe to remove the RC i2c driver */ |
1618 | cx231xx_ir_exit(dev); | 1603 | cx231xx_ir_exit(dev); |
diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c index 229e855fc7f2..c5842a1ea104 100644 --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c | |||
@@ -228,9 +228,8 @@ int cx231xx_send_usb_command(struct cx231xx_i2c *i2c_bus, | |||
228 | /* call common vendor command request */ | 228 | /* call common vendor command request */ |
229 | status = cx231xx_send_vendor_cmd(dev, &ven_req); | 229 | status = cx231xx_send_vendor_cmd(dev, &ven_req); |
230 | if (status < 0) { | 230 | if (status < 0) { |
231 | pr_info | 231 | pr_err("%s: failed with status -%d\n", |
232 | ("UsbInterface::sendCommand, failed with status -%d\n", | 232 | __func__, status); |
233 | status); | ||
234 | } | 233 | } |
235 | 234 | ||
236 | return status; | 235 | return status; |
@@ -524,9 +523,8 @@ int cx231xx_set_video_alternate(struct cx231xx *dev) | |||
524 | usb_set_interface(dev->udev, usb_interface_index, | 523 | usb_set_interface(dev->udev, usb_interface_index, |
525 | dev->video_mode.alt); | 524 | dev->video_mode.alt); |
526 | if (errCode < 0) { | 525 | if (errCode < 0) { |
527 | pr_err | 526 | pr_err("cannot change alt number to %d (error=%i)\n", |
528 | ("cannot change alt number to %d (error=%i)\n", | 527 | dev->video_mode.alt, errCode); |
529 | dev->video_mode.alt, errCode); | ||
530 | return errCode; | 528 | return errCode; |
531 | } | 529 | } |
532 | } | 530 | } |
@@ -600,9 +598,8 @@ int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt) | |||
600 | } | 598 | } |
601 | 599 | ||
602 | if (alt > 0 && max_pkt_size == 0) { | 600 | if (alt > 0 && max_pkt_size == 0) { |
603 | pr_err | 601 | pr_err("can't change interface %d alt no. to %d: Max. Pkt size = 0\n", |
604 | ("can't change interface %d alt no. to %d: Max. Pkt size = 0\n", | 602 | usb_interface_index, alt); |
605 | usb_interface_index, alt); | ||
606 | /*To workaround error number=-71 on EP0 for videograbber, | 603 | /*To workaround error number=-71 on EP0 for videograbber, |
607 | need add following codes.*/ | 604 | need add following codes.*/ |
608 | if (dev->board.no_alt_vanc) | 605 | if (dev->board.no_alt_vanc) |
@@ -616,9 +613,8 @@ int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt) | |||
616 | if (usb_interface_index > 0) { | 613 | if (usb_interface_index > 0) { |
617 | status = usb_set_interface(dev->udev, usb_interface_index, alt); | 614 | status = usb_set_interface(dev->udev, usb_interface_index, alt); |
618 | if (status < 0) { | 615 | if (status < 0) { |
619 | pr_err | 616 | pr_err("can't change interface %d alt no. to %d (err=%i)\n", |
620 | ("can't change interface %d alt no. to %d (err=%i)\n", | 617 | usb_interface_index, alt, status); |
621 | usb_interface_index, alt, status); | ||
622 | return status; | 618 | return status; |
623 | } | 619 | } |
624 | } | 620 | } |
@@ -767,17 +763,15 @@ int cx231xx_ep5_bulkout(struct cx231xx *dev, u8 *firmware, u16 size) | |||
767 | u32 *buffer; | 763 | u32 *buffer; |
768 | 764 | ||
769 | buffer = kzalloc(4096, GFP_KERNEL); | 765 | buffer = kzalloc(4096, GFP_KERNEL); |
770 | if (buffer == NULL) { | 766 | if (buffer == NULL) |
771 | pr_info("out of mem\n"); | ||
772 | return -ENOMEM; | 767 | return -ENOMEM; |
773 | } | ||
774 | memcpy(&buffer[0], firmware, 4096); | 768 | memcpy(&buffer[0], firmware, 4096); |
775 | 769 | ||
776 | ret = usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 5), | 770 | ret = usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 5), |
777 | buffer, 4096, &actlen, 2000); | 771 | buffer, 4096, &actlen, 2000); |
778 | 772 | ||
779 | if (ret) | 773 | if (ret) |
780 | pr_info("bulk message failed: %d (%d/%d)", ret, | 774 | pr_err("bulk message failed: %d (%d/%d)", ret, |
781 | size, actlen); | 775 | size, actlen); |
782 | else { | 776 | else { |
783 | errCode = actlen != size ? -1 : 0; | 777 | errCode = actlen != size ? -1 : 0; |
@@ -987,12 +981,8 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
987 | cx231xx_uninit_isoc(dev); | 981 | cx231xx_uninit_isoc(dev); |
988 | 982 | ||
989 | dma_q->p_left_data = kzalloc(4096, GFP_KERNEL); | 983 | dma_q->p_left_data = kzalloc(4096, GFP_KERNEL); |
990 | if (dma_q->p_left_data == NULL) { | 984 | if (dma_q->p_left_data == NULL) |
991 | pr_info("out of mem\n"); | ||
992 | return -ENOMEM; | 985 | return -ENOMEM; |
993 | } | ||
994 | |||
995 | |||
996 | 986 | ||
997 | dev->video_mode.isoc_ctl.isoc_copy = isoc_copy; | 987 | dev->video_mode.isoc_ctl.isoc_copy = isoc_copy; |
998 | dev->video_mode.isoc_ctl.num_bufs = num_bufs; | 988 | dev->video_mode.isoc_ctl.num_bufs = num_bufs; |
@@ -1055,10 +1045,9 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
1055 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, | 1045 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, |
1056 | &urb->transfer_dma); | 1046 | &urb->transfer_dma); |
1057 | if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { | 1047 | if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { |
1058 | pr_err("unable to allocate %i bytes for transfer" | 1048 | pr_err("unable to allocate %i bytes for transfer buffer %i%s\n", |
1059 | " buffer %i%s\n", | 1049 | sb_size, i, |
1060 | sb_size, i, | 1050 | in_interrupt() ? " while in int" : ""); |
1061 | in_interrupt() ? " while in int" : ""); | ||
1062 | cx231xx_uninit_isoc(dev); | 1051 | cx231xx_uninit_isoc(dev); |
1063 | return -ENOMEM; | 1052 | return -ENOMEM; |
1064 | } | 1053 | } |
@@ -1091,7 +1080,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
1091 | GFP_ATOMIC); | 1080 | GFP_ATOMIC); |
1092 | if (rc) { | 1081 | if (rc) { |
1093 | pr_err("submit of urb %i failed (error=%i)\n", i, | 1082 | pr_err("submit of urb %i failed (error=%i)\n", i, |
1094 | rc); | 1083 | rc); |
1095 | cx231xx_uninit_isoc(dev); | 1084 | cx231xx_uninit_isoc(dev); |
1096 | return rc; | 1085 | return rc; |
1097 | } | 1086 | } |
@@ -1189,10 +1178,9 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets, | |||
1189 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, | 1178 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, |
1190 | &urb->transfer_dma); | 1179 | &urb->transfer_dma); |
1191 | if (!dev->video_mode.bulk_ctl.transfer_buffer[i]) { | 1180 | if (!dev->video_mode.bulk_ctl.transfer_buffer[i]) { |
1192 | pr_err("unable to allocate %i bytes for transfer" | 1181 | pr_err("unable to allocate %i bytes for transfer buffer %i%s\n", |
1193 | " buffer %i%s\n", | 1182 | sb_size, i, |
1194 | sb_size, i, | 1183 | in_interrupt() ? " while in int" : ""); |
1195 | in_interrupt() ? " while in int" : ""); | ||
1196 | cx231xx_uninit_bulk(dev); | 1184 | cx231xx_uninit_bulk(dev); |
1197 | return -ENOMEM; | 1185 | return -ENOMEM; |
1198 | } | 1186 | } |
@@ -1212,8 +1200,7 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets, | |||
1212 | rc = usb_submit_urb(dev->video_mode.bulk_ctl.urb[i], | 1200 | rc = usb_submit_urb(dev->video_mode.bulk_ctl.urb[i], |
1213 | GFP_ATOMIC); | 1201 | GFP_ATOMIC); |
1214 | if (rc) { | 1202 | if (rc) { |
1215 | pr_err("submit of urb %i failed (error=%i)\n", i, | 1203 | pr_err("submit of urb %i failed (error=%i)\n", i,rc); |
1216 | rc); | ||
1217 | cx231xx_uninit_bulk(dev); | 1204 | cx231xx_uninit_bulk(dev); |
1218 | return rc; | 1205 | return rc; |
1219 | } | 1206 | } |
@@ -1316,18 +1303,16 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1316 | errCode = cx231xx_set_power_mode(dev, | 1303 | errCode = cx231xx_set_power_mode(dev, |
1317 | POLARIS_AVMODE_ENXTERNAL_AV); | 1304 | POLARIS_AVMODE_ENXTERNAL_AV); |
1318 | if (errCode < 0) { | 1305 | if (errCode < 0) { |
1319 | pr_err | 1306 | pr_err("%s: Failed to set Power - errCode [%d]!\n", |
1320 | ("%s: Failed to set Power - errCode [%d]!\n", | 1307 | __func__, errCode); |
1321 | __func__, errCode); | ||
1322 | return errCode; | 1308 | return errCode; |
1323 | } | 1309 | } |
1324 | } else { | 1310 | } else { |
1325 | errCode = cx231xx_set_power_mode(dev, | 1311 | errCode = cx231xx_set_power_mode(dev, |
1326 | POLARIS_AVMODE_ANALOGT_TV); | 1312 | POLARIS_AVMODE_ANALOGT_TV); |
1327 | if (errCode < 0) { | 1313 | if (errCode < 0) { |
1328 | pr_err | 1314 | pr_err("%s: Failed to set Power - errCode [%d]!\n", |
1329 | ("%s: Failed to set Power - errCode [%d]!\n", | 1315 | __func__, errCode); |
1330 | __func__, errCode); | ||
1331 | return errCode; | 1316 | return errCode; |
1332 | } | 1317 | } |
1333 | } | 1318 | } |
@@ -1340,34 +1325,30 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1340 | /* initialize Colibri block */ | 1325 | /* initialize Colibri block */ |
1341 | errCode = cx231xx_afe_init_super_block(dev, 0x23c); | 1326 | errCode = cx231xx_afe_init_super_block(dev, 0x23c); |
1342 | if (errCode < 0) { | 1327 | if (errCode < 0) { |
1343 | pr_err | 1328 | pr_err("%s: cx231xx_afe init super block - errCode [%d]!\n", |
1344 | ("%s: cx231xx_afe init super block - errCode [%d]!\n", | 1329 | __func__, errCode); |
1345 | __func__, errCode); | ||
1346 | return errCode; | 1330 | return errCode; |
1347 | } | 1331 | } |
1348 | errCode = cx231xx_afe_init_channels(dev); | 1332 | errCode = cx231xx_afe_init_channels(dev); |
1349 | if (errCode < 0) { | 1333 | if (errCode < 0) { |
1350 | pr_err | 1334 | pr_err("%s: cx231xx_afe init channels - errCode [%d]!\n", |
1351 | ("%s: cx231xx_afe init channels - errCode [%d]!\n", | 1335 | __func__, errCode); |
1352 | __func__, errCode); | ||
1353 | return errCode; | 1336 | return errCode; |
1354 | } | 1337 | } |
1355 | 1338 | ||
1356 | /* Set DIF in By pass mode */ | 1339 | /* Set DIF in By pass mode */ |
1357 | errCode = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); | 1340 | errCode = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); |
1358 | if (errCode < 0) { | 1341 | if (errCode < 0) { |
1359 | pr_err | 1342 | pr_err("%s: cx231xx_dif set to By pass mode - errCode [%d]!\n", |
1360 | ("%s: cx231xx_dif set to By pass mode - errCode [%d]!\n", | 1343 | __func__, errCode); |
1361 | __func__, errCode); | ||
1362 | return errCode; | 1344 | return errCode; |
1363 | } | 1345 | } |
1364 | 1346 | ||
1365 | /* I2S block related functions */ | 1347 | /* I2S block related functions */ |
1366 | errCode = cx231xx_i2s_blk_initialize(dev); | 1348 | errCode = cx231xx_i2s_blk_initialize(dev); |
1367 | if (errCode < 0) { | 1349 | if (errCode < 0) { |
1368 | pr_err | 1350 | pr_err("%s: cx231xx_i2s block initialize - errCode [%d]!\n", |
1369 | ("%s: cx231xx_i2s block initialize - errCode [%d]!\n", | 1351 | __func__, errCode); |
1370 | __func__, errCode); | ||
1371 | return errCode; | 1352 | return errCode; |
1372 | } | 1353 | } |
1373 | 1354 | ||
@@ -1375,7 +1356,7 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1375 | errCode = cx231xx_init_ctrl_pin_status(dev); | 1356 | errCode = cx231xx_init_ctrl_pin_status(dev); |
1376 | if (errCode < 0) { | 1357 | if (errCode < 0) { |
1377 | pr_err("%s: cx231xx_init ctrl pins - errCode [%d]!\n", | 1358 | pr_err("%s: cx231xx_init ctrl pins - errCode [%d]!\n", |
1378 | __func__, errCode); | 1359 | __func__, errCode); |
1379 | return errCode; | 1360 | return errCode; |
1380 | } | 1361 | } |
1381 | 1362 | ||
@@ -1400,9 +1381,8 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1400 | break; | 1381 | break; |
1401 | } | 1382 | } |
1402 | if (errCode < 0) { | 1383 | if (errCode < 0) { |
1403 | pr_err | 1384 | pr_err("%s: cx231xx_AGC mode to Analog - errCode [%d]!\n", |
1404 | ("%s: cx231xx_AGC mode to Analog - errCode [%d]!\n", | 1385 | __func__, errCode); |
1405 | __func__, errCode); | ||
1406 | return errCode; | 1386 | return errCode; |
1407 | } | 1387 | } |
1408 | 1388 | ||
@@ -1477,9 +1457,8 @@ int cx231xx_send_gpio_cmd(struct cx231xx *dev, u32 gpio_bit, u8 *gpio_val, | |||
1477 | /* call common vendor command request */ | 1457 | /* call common vendor command request */ |
1478 | status = cx231xx_send_vendor_cmd(dev, &ven_req); | 1458 | status = cx231xx_send_vendor_cmd(dev, &ven_req); |
1479 | if (status < 0) { | 1459 | if (status < 0) { |
1480 | pr_info | 1460 | pr_err("%s: failed with status -%d\n", |
1481 | ("UsbInterface::sendCommand, failed with status -%d\n", | 1461 | __func__, status); |
1482 | status); | ||
1483 | } | 1462 | } |
1484 | 1463 | ||
1485 | return status; | 1464 | return status; |
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index a743865b40c0..b6af923eb5a3 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c | |||
@@ -265,7 +265,7 @@ static int start_streaming(struct cx231xx_dvb *dvb) | |||
265 | struct cx231xx *dev = dvb->adapter.priv; | 265 | struct cx231xx *dev = dvb->adapter.priv; |
266 | 266 | ||
267 | if (dev->USE_ISO) { | 267 | if (dev->USE_ISO) { |
268 | pr_info("DVB transfer mode is ISO.\n"); | 268 | pr_debug("DVB transfer mode is ISO.\n"); |
269 | cx231xx_set_alt_setting(dev, INDEX_TS1, 4); | 269 | cx231xx_set_alt_setting(dev, INDEX_TS1, 4); |
270 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); | 270 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); |
271 | if (rc < 0) | 271 | if (rc < 0) |
@@ -276,7 +276,7 @@ static int start_streaming(struct cx231xx_dvb *dvb) | |||
276 | dev->ts1_mode.max_pkt_size, | 276 | dev->ts1_mode.max_pkt_size, |
277 | dvb_isoc_copy); | 277 | dvb_isoc_copy); |
278 | } else { | 278 | } else { |
279 | pr_info("DVB transfer mode is BULK.\n"); | 279 | pr_debug("DVB transfer mode is BULK.\n"); |
280 | cx231xx_set_alt_setting(dev, INDEX_TS1, 0); | 280 | cx231xx_set_alt_setting(dev, INDEX_TS1, 0); |
281 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); | 281 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); |
282 | if (rc < 0) | 282 | if (rc < 0) |
@@ -430,16 +430,14 @@ int cx231xx_reset_analog_tuner(struct cx231xx *dev) | |||
430 | 430 | ||
431 | if (dops->init != NULL && !dev->xc_fw_load_done) { | 431 | if (dops->init != NULL && !dev->xc_fw_load_done) { |
432 | 432 | ||
433 | pr_info("Reloading firmware for XC5000\n"); | 433 | pr_debug("Reloading firmware for XC5000\n"); |
434 | status = dops->init(dev->dvb->frontend); | 434 | status = dops->init(dev->dvb->frontend); |
435 | if (status == 0) { | 435 | if (status == 0) { |
436 | dev->xc_fw_load_done = 1; | 436 | dev->xc_fw_load_done = 1; |
437 | pr_info | 437 | pr_debug("XC5000 firmware download completed\n"); |
438 | ("XC5000 firmware download completed\n"); | ||
439 | } else { | 438 | } else { |
440 | dev->xc_fw_load_done = 0; | 439 | dev->xc_fw_load_done = 0; |
441 | pr_info | 440 | pr_debug("XC5000 firmware download failed !!!\n"); |
442 | ("XC5000 firmware download failed !!!\n"); | ||
443 | } | 441 | } |
444 | } | 442 | } |
445 | 443 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c index d4a468a60bd0..1a0d9efeb209 100644 --- a/drivers/media/usb/cx231xx/cx231xx-i2c.c +++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c | |||
@@ -498,17 +498,18 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, int i2c_port) | |||
498 | memset(&client, 0, sizeof(client)); | 498 | memset(&client, 0, sizeof(client)); |
499 | client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); | 499 | client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); |
500 | 500 | ||
501 | pr_info(": Checking for I2C devices on port=%d ..\n", i2c_port); | 501 | pr_info("i2c_scan: checking for I2C devices on port=%d ..\n", |
502 | i2c_port); | ||
502 | for (i = 0; i < 128; i++) { | 503 | for (i = 0; i < 128; i++) { |
503 | client.addr = i; | 504 | client.addr = i; |
504 | rc = i2c_master_recv(&client, &buf, 0); | 505 | rc = i2c_master_recv(&client, &buf, 0); |
505 | if (rc < 0) | 506 | if (rc < 0) |
506 | continue; | 507 | continue; |
507 | pr_info("%s: i2c scan: found device @ 0x%x [%s]\n", | 508 | pr_info("i2c scan: found device @ 0x%x [%s]\n", |
508 | dev->name, i << 1, | 509 | i << 1, |
509 | i2c_devs[i] ? i2c_devs[i] : "???"); | 510 | i2c_devs[i] ? i2c_devs[i] : "???"); |
510 | } | 511 | } |
511 | pr_info(": Completed Checking for I2C devices on port=%d.\n", | 512 | pr_info("i2c scan: Completed Checking for I2C devices on port=%d.\n", |
512 | i2c_port); | 513 | i2c_port); |
513 | } | 514 | } |
514 | 515 | ||
@@ -532,8 +533,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus) | |||
532 | i2c_add_adapter(&bus->i2c_adap); | 533 | i2c_add_adapter(&bus->i2c_adap); |
533 | 534 | ||
534 | if (0 != bus->i2c_rc) | 535 | if (0 != bus->i2c_rc) |
535 | pr_warn("%s: i2c bus %d register FAILED\n", | 536 | pr_warn("i2c bus %d register FAILED\n", bus->nr); |
536 | dev->name, bus->nr); | ||
537 | 537 | ||
538 | return bus->i2c_rc; | 538 | return bus->i2c_rc; |
539 | } | 539 | } |
@@ -576,8 +576,7 @@ int cx231xx_i2c_mux_register(struct cx231xx *dev, int mux_no) | |||
576 | NULL); | 576 | NULL); |
577 | 577 | ||
578 | if (!dev->i2c_mux_adap[mux_no]) | 578 | if (!dev->i2c_mux_adap[mux_no]) |
579 | pr_warn("%s: i2c mux %d register FAILED\n", | 579 | pr_warn("i2c mux %d register FAILED\n", mux_no); |
580 | dev->name, mux_no); | ||
581 | 580 | ||
582 | return 0; | 581 | return 0; |
583 | } | 582 | } |
diff --git a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c index 4666e533fe0a..2f8dc6afac54 100644 --- a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c +++ b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c | |||
@@ -703,9 +703,9 @@ int initialize_cx231xx(struct cx231xx *dev) | |||
703 | _current_scenario_idx = INDEX_BUSPOWER_DIF_ONLY; | 703 | _current_scenario_idx = INDEX_BUSPOWER_DIF_ONLY; |
704 | break; | 704 | break; |
705 | default: | 705 | default: |
706 | pr_info("bad config in buspower!!!!\n"); | 706 | pr_err("bad config in buspower!!!!\n"); |
707 | pr_info("config_info=%x\n", | 707 | pr_err("config_info=%x\n", |
708 | (config_info & BUSPOWER_MASK)); | 708 | config_info & BUSPOWER_MASK); |
709 | return 1; | 709 | return 1; |
710 | } | 710 | } |
711 | } else { /* self-power */ | 711 | } else { /* self-power */ |
@@ -768,9 +768,9 @@ int initialize_cx231xx(struct cx231xx *dev) | |||
768 | _current_scenario_idx = INDEX_SELFPOWER_COMPRESSOR; | 768 | _current_scenario_idx = INDEX_SELFPOWER_COMPRESSOR; |
769 | break; | 769 | break; |
770 | default: | 770 | default: |
771 | pr_info("bad senario!!!!!\n"); | 771 | pr_err("bad senario!!!!!\n"); |
772 | pr_info("config_info=%x\n", | 772 | pr_err("config_info=%x\n", |
773 | (config_info & SELFPOWER_MASK)); | 773 | config_info & SELFPOWER_MASK); |
774 | return -ENODEV; | 774 | return -ENODEV; |
775 | } | 775 | } |
776 | } | 776 | } |
diff --git a/drivers/media/usb/cx231xx/cx231xx-vbi.c b/drivers/media/usb/cx231xx/cx231xx-vbi.c index f80126d3525a..14e1eb7f2128 100644 --- a/drivers/media/usb/cx231xx/cx231xx-vbi.c +++ b/drivers/media/usb/cx231xx/cx231xx-vbi.c | |||
@@ -69,11 +69,10 @@ static inline void print_err_status(struct cx231xx *dev, int packet, int status) | |||
69 | break; | 69 | break; |
70 | } | 70 | } |
71 | if (packet < 0) { | 71 | if (packet < 0) { |
72 | pr_err("URB status %d [%s].\n", status, | 72 | pr_err("URB status %d [%s].\n", status, errmsg); |
73 | errmsg); | ||
74 | } else { | 73 | } else { |
75 | pr_err("URB packet %d, status %d [%s].\n", | 74 | pr_err("URB packet %d, status %d [%s].\n", |
76 | packet, status, errmsg); | 75 | packet, status, errmsg); |
77 | } | 76 | } |
78 | } | 77 | } |
79 | 78 | ||
@@ -317,7 +316,7 @@ static void cx231xx_irq_vbi_callback(struct urb *urb) | |||
317 | return; | 316 | return; |
318 | default: /* error */ | 317 | default: /* error */ |
319 | pr_err("urb completition error %d.\n", | 318 | pr_err("urb completition error %d.\n", |
320 | urb->status); | 319 | urb->status); |
321 | break; | 320 | break; |
322 | } | 321 | } |
323 | 322 | ||
@@ -332,7 +331,7 @@ static void cx231xx_irq_vbi_callback(struct urb *urb) | |||
332 | urb->status = usb_submit_urb(urb, GFP_ATOMIC); | 331 | urb->status = usb_submit_urb(urb, GFP_ATOMIC); |
333 | if (urb->status) { | 332 | if (urb->status) { |
334 | pr_err("urb resubmit failed (error=%i)\n", | 333 | pr_err("urb resubmit failed (error=%i)\n", |
335 | urb->status); | 334 | urb->status); |
336 | } | 335 | } |
337 | } | 336 | } |
338 | 337 | ||
@@ -344,7 +343,7 @@ void cx231xx_uninit_vbi_isoc(struct cx231xx *dev) | |||
344 | struct urb *urb; | 343 | struct urb *urb; |
345 | int i; | 344 | int i; |
346 | 345 | ||
347 | pr_info("called cx231xx_uninit_vbi_isoc\n"); | 346 | pr_debug("called cx231xx_uninit_vbi_isoc\n"); |
348 | 347 | ||
349 | dev->vbi_mode.bulk_ctl.nfields = -1; | 348 | dev->vbi_mode.bulk_ctl.nfields = -1; |
350 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { | 349 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { |
@@ -393,7 +392,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
393 | struct urb *urb; | 392 | struct urb *urb; |
394 | int rc; | 393 | int rc; |
395 | 394 | ||
396 | pr_info("called cx231xx_vbi_isoc\n"); | 395 | pr_debug("called cx231xx_vbi_isoc\n"); |
397 | 396 | ||
398 | /* De-allocates all pending stuff */ | 397 | /* De-allocates all pending stuff */ |
399 | cx231xx_uninit_vbi_isoc(dev); | 398 | cx231xx_uninit_vbi_isoc(dev); |
@@ -451,9 +450,9 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
451 | dev->vbi_mode.bulk_ctl.transfer_buffer[i] = | 450 | dev->vbi_mode.bulk_ctl.transfer_buffer[i] = |
452 | kzalloc(sb_size, GFP_KERNEL); | 451 | kzalloc(sb_size, GFP_KERNEL); |
453 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) { | 452 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) { |
454 | pr_err("unable to allocate %i bytes for transfer" | 453 | pr_err("unable to allocate %i bytes for transfer buffer %i%s\n", |
455 | " buffer %i%s\n", sb_size, i, | 454 | sb_size, i, |
456 | in_interrupt() ? " while in int" : ""); | 455 | in_interrupt() ? " while in int" : ""); |
457 | cx231xx_uninit_vbi_isoc(dev); | 456 | cx231xx_uninit_vbi_isoc(dev); |
458 | return -ENOMEM; | 457 | return -ENOMEM; |
459 | } | 458 | } |
@@ -470,8 +469,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
470 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { | 469 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { |
471 | rc = usb_submit_urb(dev->vbi_mode.bulk_ctl.urb[i], GFP_ATOMIC); | 470 | rc = usb_submit_urb(dev->vbi_mode.bulk_ctl.urb[i], GFP_ATOMIC); |
472 | if (rc) { | 471 | if (rc) { |
473 | pr_err("submit of urb %i failed (error=%i)\n", i, | 472 | pr_err("submit of urb %i failed (error=%i)\n", i, rc); |
474 | rc); | ||
475 | cx231xx_uninit_vbi_isoc(dev); | 473 | cx231xx_uninit_vbi_isoc(dev); |
476 | return rc; | 474 | return rc; |
477 | } | 475 | } |
@@ -522,7 +520,7 @@ static inline void vbi_buffer_filled(struct cx231xx *dev, | |||
522 | struct cx231xx_buffer *buf) | 520 | struct cx231xx_buffer *buf) |
523 | { | 521 | { |
524 | /* Advice that buffer was filled */ | 522 | /* Advice that buffer was filled */ |
525 | /* pr_info("[%p/%d] wakeup\n", buf, buf->vb.i); */ | 523 | /* pr_debug("[%p/%d] wakeup\n", buf, buf->vb.i); */ |
526 | 524 | ||
527 | buf->vb.state = VIDEOBUF_DONE; | 525 | buf->vb.state = VIDEOBUF_DONE; |
528 | buf->vb.field_count++; | 526 | buf->vb.field_count++; |
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index bda5597b5eff..4d1d750ab38d 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c | |||
@@ -737,7 +737,7 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, | |||
737 | if (!dev->video_mode.bulk_ctl.num_bufs) | 737 | if (!dev->video_mode.bulk_ctl.num_bufs) |
738 | urb_init = 1; | 738 | urb_init = 1; |
739 | } | 739 | } |
740 | /*pr_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", | 740 | /*pr_debug("urb_init=%d dev->video_mode.max_pkt_size=%d\n", |
741 | urb_init, dev->video_mode.max_pkt_size);*/ | 741 | urb_init, dev->video_mode.max_pkt_size);*/ |
742 | if (urb_init) { | 742 | if (urb_init) { |
743 | dev->mode_tv = 0; | 743 | dev->mode_tv = 0; |
@@ -809,7 +809,7 @@ void video_mux(struct cx231xx *dev, int index) | |||
809 | 809 | ||
810 | cx231xx_set_audio_input(dev, dev->ctl_ainput); | 810 | cx231xx_set_audio_input(dev, dev->ctl_ainput); |
811 | 811 | ||
812 | pr_info("video_mux : %d\n", index); | 812 | pr_debug("video_mux : %d\n", index); |
813 | 813 | ||
814 | /* do mode control overrides if required */ | 814 | /* do mode control overrides if required */ |
815 | cx231xx_do_mode_ctrl_overrides(dev); | 815 | cx231xx_do_mode_ctrl_overrides(dev); |
@@ -953,12 +953,12 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
953 | return -EINVAL; | 953 | return -EINVAL; |
954 | 954 | ||
955 | if (videobuf_queue_is_busy(&fh->vb_vidq)) { | 955 | if (videobuf_queue_is_busy(&fh->vb_vidq)) { |
956 | pr_err("%s queue busy\n", __func__); | 956 | pr_err("%s: queue busy\n", __func__); |
957 | return -EBUSY; | 957 | return -EBUSY; |
958 | } | 958 | } |
959 | 959 | ||
960 | if (dev->stream_on && !fh->stream_on) { | 960 | if (dev->stream_on && !fh->stream_on) { |
961 | pr_err("%s device in use by another fh\n", __func__); | 961 | pr_err("%s: device in use by another fh\n", __func__); |
962 | return -EBUSY; | 962 | return -EBUSY; |
963 | } | 963 | } |
964 | 964 | ||
@@ -1176,9 +1176,8 @@ int cx231xx_s_frequency(struct file *file, void *priv, | |||
1176 | int rc; | 1176 | int rc; |
1177 | u32 if_frequency = 5400000; | 1177 | u32 if_frequency = 5400000; |
1178 | 1178 | ||
1179 | pr_info("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n", | 1179 | pr_debug("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n", |
1180 | f->frequency, f->type); | 1180 | f->frequency, f->type); |
1181 | /*pr_info("f->type: 1-radio 2-analogTV 3-digitalTV\n");*/ | ||
1182 | 1181 | ||
1183 | rc = check_dev(dev); | 1182 | rc = check_dev(dev); |
1184 | if (rc < 0) | 1183 | if (rc < 0) |
@@ -1213,13 +1212,13 @@ int cx231xx_s_frequency(struct file *file, void *priv, | |||
1213 | else if (dev->norm & V4L2_STD_SECAM_LC) | 1212 | else if (dev->norm & V4L2_STD_SECAM_LC) |
1214 | if_frequency = 1250000; /*1.25MHz */ | 1213 | if_frequency = 1250000; /*1.25MHz */ |
1215 | 1214 | ||
1216 | pr_info("if_frequency is set to %d\n", if_frequency); | 1215 | pr_debug("if_frequency is set to %d\n", if_frequency); |
1217 | cx231xx_set_Colibri_For_LowIF(dev, if_frequency, 1, 1); | 1216 | cx231xx_set_Colibri_For_LowIF(dev, if_frequency, 1, 1); |
1218 | 1217 | ||
1219 | update_HH_register_after_set_DIF(dev); | 1218 | update_HH_register_after_set_DIF(dev); |
1220 | } | 1219 | } |
1221 | 1220 | ||
1222 | pr_info("Set New FREQUENCY to %d\n", f->frequency); | 1221 | pr_debug("Set New FREQUENCY to %d\n", f->frequency); |
1223 | 1222 | ||
1224 | return rc; | 1223 | return rc; |
1225 | } | 1224 | } |
@@ -1642,8 +1641,7 @@ static int cx231xx_v4l2_open(struct file *filp) | |||
1642 | #if 0 | 1641 | #if 0 |
1643 | errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); | 1642 | errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); |
1644 | if (errCode < 0) { | 1643 | if (errCode < 0) { |
1645 | pr_err | 1644 | pr_err("Device locked on digital mode. Can't open analog\n"); |
1646 | ("Device locked on digital mode. Can't open analog\n"); | ||
1647 | return -EBUSY; | 1645 | return -EBUSY; |
1648 | } | 1646 | } |
1649 | #endif | 1647 | #endif |
@@ -1737,7 +1735,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev) | |||
1737 | } | 1735 | } |
1738 | if (dev->vbi_dev) { | 1736 | if (dev->vbi_dev) { |
1739 | pr_info("V4L2 device %s deregistered\n", | 1737 | pr_info("V4L2 device %s deregistered\n", |
1740 | video_device_node_name(dev->vbi_dev)); | 1738 | video_device_node_name(dev->vbi_dev)); |
1741 | if (video_is_registered(dev->vbi_dev)) | 1739 | if (video_is_registered(dev->vbi_dev)) |
1742 | video_unregister_device(dev->vbi_dev); | 1740 | video_unregister_device(dev->vbi_dev); |
1743 | else | 1741 | else |
@@ -1746,7 +1744,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev) | |||
1746 | } | 1744 | } |
1747 | if (dev->vdev) { | 1745 | if (dev->vdev) { |
1748 | pr_info("V4L2 device %s deregistered\n", | 1746 | pr_info("V4L2 device %s deregistered\n", |
1749 | video_device_node_name(dev->vdev)); | 1747 | video_device_node_name(dev->vdev)); |
1750 | 1748 | ||
1751 | if (dev->board.has_417) | 1749 | if (dev->board.has_417) |
1752 | cx231xx_417_unregister(dev); | 1750 | cx231xx_417_unregister(dev); |
@@ -2080,8 +2078,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2080 | { | 2078 | { |
2081 | int ret; | 2079 | int ret; |
2082 | 2080 | ||
2083 | pr_info("%s: v4l2 driver version %s\n", | 2081 | pr_info("v4l2 driver version %s\n", CX231XX_VERSION); |
2084 | dev->name, CX231XX_VERSION); | ||
2085 | 2082 | ||
2086 | /* set default norm */ | 2083 | /* set default norm */ |
2087 | dev->norm = V4L2_STD_PAL; | 2084 | dev->norm = V4L2_STD_PAL; |
@@ -2129,12 +2126,12 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2129 | video_nr[dev->devno]); | 2126 | video_nr[dev->devno]); |
2130 | if (ret) { | 2127 | if (ret) { |
2131 | pr_err("unable to register video device (error=%i).\n", | 2128 | pr_err("unable to register video device (error=%i).\n", |
2132 | ret); | 2129 | ret); |
2133 | return ret; | 2130 | return ret; |
2134 | } | 2131 | } |
2135 | 2132 | ||
2136 | pr_info("%s/0: registered device %s [v4l2]\n", | 2133 | pr_info("Registered video device %s [v4l2]\n", |
2137 | dev->name, video_device_node_name(dev->vdev)); | 2134 | video_device_node_name(dev->vdev)); |
2138 | 2135 | ||
2139 | /* Initialize VBI template */ | 2136 | /* Initialize VBI template */ |
2140 | cx231xx_vbi_template = cx231xx_video_template; | 2137 | cx231xx_vbi_template = cx231xx_video_template; |
@@ -2156,8 +2153,8 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2156 | return ret; | 2153 | return ret; |
2157 | } | 2154 | } |
2158 | 2155 | ||
2159 | pr_info("%s/0: registered device %s\n", | 2156 | pr_info("Registered VBI device %s\n", |
2160 | dev->name, video_device_node_name(dev->vbi_dev)); | 2157 | video_device_node_name(dev->vbi_dev)); |
2161 | 2158 | ||
2162 | if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) { | 2159 | if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) { |
2163 | dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template, | 2160 | dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template, |
@@ -2174,12 +2171,8 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2174 | return ret; | 2171 | return ret; |
2175 | } | 2172 | } |
2176 | pr_info("Registered radio device as %s\n", | 2173 | pr_info("Registered radio device as %s\n", |
2177 | video_device_node_name(dev->radio_dev)); | 2174 | video_device_node_name(dev->radio_dev)); |
2178 | } | 2175 | } |
2179 | 2176 | ||
2180 | pr_info("V4L2 device registered as %s and %s\n", | ||
2181 | video_device_node_name(dev->vdev), | ||
2182 | video_device_node_name(dev->vbi_dev)); | ||
2183 | |||
2184 | return 0; | 2177 | return 0; |
2185 | } | 2178 | } |
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index fa27e0c2accb..aeee721a8eef 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h | |||
@@ -809,7 +809,6 @@ void cx231xx_Setup_AFE_for_LowIF(struct cx231xx *dev); | |||
809 | void reset_s5h1432_demod(struct cx231xx *dev); | 809 | void reset_s5h1432_demod(struct cx231xx *dev); |
810 | void cx231xx_dump_HH_reg(struct cx231xx *dev); | 810 | void cx231xx_dump_HH_reg(struct cx231xx *dev); |
811 | void update_HH_register_after_set_DIF(struct cx231xx *dev); | 811 | void update_HH_register_after_set_DIF(struct cx231xx *dev); |
812 | void cx231xx_dump_SC_reg(struct cx231xx *dev); | ||
813 | 812 | ||
814 | 813 | ||
815 | 814 | ||