On Sat, 2009-07-18 at 02:35 +0530, Ravi A wrote: > On Tue, Jul 14, 2009 at 6:07 AM, Andy Walls<[email protected]> wrote: >
> > > > Hi Andy, > > There seems to be some problem reading/writing registers - > > -- transcript -- > $ sudo v4l2-dbg -R type=i2cdrv,chip=cx25840,min=1,max=3 > ioctl: VIDIOC_DBG_G_REGISTER > > 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F > ioctl: VIDIOC_DBG_G_REGISTER failed for 0x1 > ioctl: VIDIOC_DBG_G_REGISTER failed for 0x2 > ioctl: VIDIOC_DBG_G_REGISTER failed for 0x3 > 00000000: > ---- > > I confirmed that CONFIG_VIDEO_ADV_DEBUG is set in config file. There > also seems to be some difference in the command arguments v4l2-dbg > expects, from what you gave. Hmmm. I know you need to be root (you did sudo, so that is Ok I think). You may have to use the latest v4l2-dbg. $ cd path_to_source_code/ivtv/v4l2-apps $ make (The make will halt for missing dependencies, but hopefully v4l2-dbg gets built before that happens). $ cd util $ ./v4l2-dbg --help > To check the MUX control/GPIO I measured the voltages on the sel pins > while switching the inputs using v4l2-ctl -i. Following is the result > - > sel0 sel1 > --------------------- > -i0 0V 0V > -i1 3.3V 0V > -i2 3.3V 0V > So it seems to be alright. However when I measured again when there is > no sound output, sel0 and sel1 were both at 0V. Good experiment and good to know! > I then forced sel0 to > 5V using a jumper wire, and the sound came back on! Good result, but don't do that again! When the CX23416 is driving a GPIO as an out and trying to drive it low, fighting with an external power supply trying to pull the line high may cause a damaging amount of current to go through the CX23416's output driver. The CX23416 datasheet that you can find with Goggle says that the GPIO's are 5V tolerant and rated to handle up to 4 mA. > It so happens the driver/utility is setting the input back to Y0 > (default, white connector) whenever video format is changed - > > $sudo v4l2-ctl -s pal > sets MUX input to Y0 from wherever it was. However - > $sudo v4l2-ctl --log-status > still shows the input to be Line-In! > > $sudo v4l2-ctl -i1 > $sudo v4l2-ctl -i2 > sets the input back to Y1 and sound re-appears. > > Is this how the behavior should be? Nope. Good observation, this is the bug. I checked the source code of ivtv-gpio.c and the version history, and it's a bug that's been in the ivtv driver since before it was in the mainline kernel. It should be striaght-forward to fix the behavior, but I'll have to take a look and make sure there's not some odd board that needs something special. I'll have a patch ready soon. > I checked with MythTV too, and it > seems to be setting the video standard when starting, which is > switching off sound. That's probably normal. > (by the way, the MUX supply is 5V but the sel inputs are at 3.3V level > - this seems to be marginal from the spec. Is there any way the GPIO > can be programmed to be 5V outputs?). No. The CX23416 is a 3.3 V device according to the old datasheet out on the web. The Sn inputs of the 74HC4052 can go from 0 V to Vcc (the positive suuply voltage). Looking at figure 14 of the 74HC4052 datasheet, it would suggest that Vcc/2 is the needed turn on voltage. So even if Vcc = 5V, 3.3 V is larger than 2.5 V by 1.2 V. I don't think the 3.3V will be an issue, especially if Vcc to the 74HC4052 is 3.3V. Regards, Andy > When MUX is set properly and sound is present, the volume was still a > bit low and it seemed very noisy - something like zero-crossing > distortion. I could improve it a bit by setting volume all the way > high. > sudo v4l2-ctl -c volume=65535 > Setting bass and treble to '0' helped to reduce the distortion/noise > significantly although the volume still seemed low > sudo v4l2-ctl -c bass=0 > sudo v4l2-ctl -c treble=0 > > If I can get v4l2-dbg to read/set registers maybe I can try more > experiments for the audio quality. > > Regards > Ravi > _______________________________________________ ivtv-devel mailing list [email protected] http://ivtvdriver.org/mailman/listinfo/ivtv-devel
