Mailing List Archive

Re: UNKNOWN IVTV CARD: vendor/device: [4444:0016] subsystem vendor/device: [1540:9673]]
On Mon, 2009-11-23 at 19:55 +0300, Rajesh Padalia wrote:
> Andy,
> 0x0180 and 0x00c0 enables the LED on board, however I could not hear
> audio for any of the bits.
> Thanks and regards,
> Rajesh

OK, so GPIO 7 should be set as an output as it controls the LED.

So we know ".direction" can safely always have bit 7 set; i.e. 0x0080.

When you tested the values trying to listen for audio, did you try with
the "direction" bits set, but the "value" bits set to 0 (0x0000) as well
as the value bits set to 1 (value the same as direction)?

I'm almost certain two GPIOs will control the multiplexer and route
audio.

Hmmm...Perhaps one of the GPIOs also controls a "chip" enable on the
multiplexer chip. One additional test you should try:

# v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio dir=0xffff,val=0xffff
(listen for audio in the capture)
# v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio dir=0xffff,val=0x0000
(listen for audio in the capture)

That turns them all on as outputs and tries them all high at once and
all low at once. Maybe something wll be audible then.

Obviously don't leave the GPIO directions all set to output for too long
to avoid any possible damage to the card.


Could you please look at the wire traces on the board and follow the
board wire traces from the 74HC4053 multiplexer chip pins 9, 10, & 11 (&
maybe 6) back to the CX23416 ball grid array and tell me the approximate
row and columns? Or send a link to a high resolution picture with
bright lighting behind the board so that I can follow the traces?

Regards,
Andy


> On Sat, Nov 21, 2009 at 11:56 PM, Andy Walls <awalls@radix.net> wrote:
> > On Sat, 2009-11-21 at 18:53 +0300, Rajesh Padalia wrote:
> >> Andy,
> >> I am back and have started testing.
> >> Some of clarifications:
> >> 1. I am trying different combination when video capture is on (mplayer
> >> /dev/video0).
> >
> > Yes. There will be a short delay of a few seconds before you will be
> > able to tell if a change of GPIO lines changes the audio.
> >
> >
> >> 1. Should I try different combinations for 'dir' .i.e. from 0xc000,
> >> 0xb000....0x0000 and even 0xffff?
> >> 2. You recommended to try 'val' from 0xc000 to 0x0000. Do I have to
> >> try values like 0xf000, 0xcd00, 0x0010?
> >
> > Try not to top post. Look below .....
> >
> >> BTW, no response from Interact-TV inspite of reminder.
> >> Thanks for your help.
> >> Regards,
> >> Rajesh
> >>
> >
> >> >>
> >> >>> 2. The one close to crystal is : 74HC4053D, AG124 29, URO 0348D
> >> >>> The other one is: 5333KZ, GZ0337
> >> >>
> >> >> OK those chips are what I needed to know:
> >> >>
> >> >> Philips/NXP 74HC4053 Triple 2:1 analog multiplexer:
> >> >> http://www.nxp.com/acrobat_download/datasheets/74HC_HCT4053_4.pdf
> >> >>
> >> >> Cirrus Logic CS5333 24 bit, 96 kHz stereo A/D converter:
> >> >> http://www.digchip.com/datasheets/download_datasheet.php?id=228624∂-number=CDB5333
> >> >>
> >> >> This is where the information from Ineteract-TV could save everyone a
> >> >> lot of time and effort. *sigh*
> >> >>
> >> >> Oh, well. I have created a preliminary card entry for the PV-947D in my
> >> >> repository here:
> >> >>
> >> >> http://linuxtv.org/hg/~awalls/ivtv-provideo/
> >> >>
> >> >>
> >> >> The easiest thing to do is to download the tar.gz archive from this
> >> >> link:
> >> >>
> >> >> http://linuxtv.org/hg/~awalls/ivtv-provideo/archive/tip.tar.gz
> >> >>
> >> >> And build and install the v4l-dvb subsystem modules:
> >> >>
> >> >> $ tar -xvf tip.tar.gz
> >> >> $ cd (into the newly extarcted archive)
> >> >> $ make
> >> >> $ cd v4l2-apps
> >> >> $ make (it will fail, but ivtv-ctl will get built)
> >> >> $ cd ..
> >> >> $ su root
> >> >> # make install
> >> >> # make unload; make unload
> >> >> # /sbin/modprobe ivtv
> >> >>
> >> >> (*WARNING* The 'make install' step will overwrite all of you existing
> >> >> v4l-dvb (media subsystem) modules under /lib/modules/`uname -r` . Back
> >> >> them up if you wan to save them.)
> >> >>
> >> >> Now ivtv should at least automatically recognize your card.
> >> >>
> >> >> And now the fun part: *you* have to experiment and fix the card
> >> >> definition.
> >> >>
> >> >> 1. You will have to figure out which of the 8 CX25843 analog inputs
> >> >> correspond to which of the following:
> >> >>
> >> >> a. RF tuner assembly CVBS (composite) video
> >> >> b. RF Sound IF (SIF) audio
> >> >> c. Rear bracket CVBS (composite) video
> >> >> d. Rear bracket SVideo Luma (Y) video component
> >> >> e. Rear bracket SVideo Chroma (C) video component
> >> >>
> >> >> I assume you'll just ignore the internal black video connector with pins
> >> >> labeled Y (Luma or CVBS?), C (Chroma), AV (?), and G (ground) as these
> >> >> would be for Compsite 2 and SVideo 2.
> >> >>
> >> >>
> >> >> 2. You will have to figure out how to set the GPIO pin direction, and
> >> >> masks for audio routing:
> >> >>
> >> >> a. RF tuner baseband audio (if you can't use SIF audio for some reason)
> >> >> b. Rear bracket Line-in 1 L and R audio
> >> >>
> >> >> I assume you'll ignore the the internal black video connector with pins
> >> >> labeled L (Left), R (Right) and G (ground) as these would be Line in 2
> >> >> audio.
> >> >>
> >> >>
> >> >> OK. So that's the task. Now how do you do it? You'll need to edit
> >> >>
> >> >> linux/drivers/media/video/ivtv/ivtv-cards.c
> >> >>
> >> >> to fix up the card entry for the Provideo PV-947D. It currently looks Like this:
> >> >>
> >> >> static const struct ivtv_card ivtv_card_provideo = {
> >> >> .type = IVTV_CARD_PROVIDEO_PV947,
> >> >> .name = "Provideo Multimedia PV-947D",
> >> >> .v4l2_capabilities = IVTV_CAP_ENCODER,
> >> >> .hw_video = IVTV_HW_CX25840,
> >> >> .hw_audio = IVTV_HW_CX25840,
> >> >> .hw_audio_ctrl = IVTV_HW_CX25840,
> >> >> .hw_muxer = IVTV_HW_GPIO,
> >> >> .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_GPIO,
> >> >> .video_inputs = {
> >> >> { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
> >> >> /* Rear Bracket connectors */
> >> >> { IVTV_CARD_INPUT_SVIDEO1, 1,
> >> >> CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
> >> >> { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
> >> >> /* Internal Video-In connectors */
> >> >> { IVTV_CARD_INPUT_SVIDEO2, 2,
> >> >> CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
> >> >> { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE1 },
> >> >> },
> >> >> .audio_inputs = {
> >> >> { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
> >> >> { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
> >> >> { IVTV_CARD_INPUT_LINE_IN2, CX25840_AUDIO_SERIAL, 2 },
> >> >> },
> >> >> .tuners = {
> >> >> { .std = V4L2_STD_NTSC, .tuner = TUNER_PHILIPS_FQ1236A_MK4 },
> >> >> },
> >> >> /*
> >> >> * The 74HC4053 Triple 2:1 multiplexer must be controlled by 3 GPIOs.
> >> >> * It is likely the mux switches Audio L and R between the rear bracket
> >> >> * connector and the internal connectors.
> >> >> * It is unclear if the third unit in the triple mux switches Y or C or
> >> >> * something else.
> >> >> *
> >> >> * The board also has an LED (D2) which is likely controlled by a GPIO
> >> >> */
> >> >> .gpio_init = { .direction = 0x0000, .initial_value = 0 },
> >> >> .gpio_audio_input = { .mask = 0x0000,
> >> >> .tuner = 0x0000,
> >> >> .linein = 0x0000, /* Line In 1: rear bracket */
> >> >> .radio = 0x0000 }, /* Line in 2: internal con */
> >> >> .pci_list = ivtv_pci_provideo,
> >> >> .i2c = &ivtv_i2c_std,
> >> >> };
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> 1. I assume you don't have an NTSC-M RF source available to you, so
> >> >> we'll forget about the RF tuner for now. That means we won't be editing
> >> >> the lines that look like these:
> >> >>
> >> >> { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
> >> >>
> >> >> { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
> >> >>
> >> >> .tuner = 0x0000,
> >> >>
> >> >> 2. Set the card using v4l2-ctl to "Composite 1" and the proper video
> >> >> standard for the incoming signal (PAL, SECAM, NTSC) on the rear bracket
> >> >> connector. If you have color video that looks correct go to the next
> >> >> step. If not change this line:
> >> >>
> >> >> { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
> >> >>
> >> >> so the last argument is CX25840_COMPOSITE2, rebuild the driver,
> >> >> reinstall the drivers, unload the ivtv module, load the new ivtv module
> >> >> and test again. If that doesn't work continue to test
> >> >> CX24840_COMPOSITE3 through 8. One of them should work.
> >> >>
> >> >>
> >> >> 3. Set the card using v4l2-ctl to "SVideo 1" and the proper video
> >> >> standard for the incoming SVideo signal (PAL, SECAM, NTSC) on the rear
> >> >> bracket connector. If you have color video that looks correct go to the
> >> >> next step. Otherwise change this line:
> >> >>
> >> >> { IVTV_CARD_INPUT_SVIDEO1, 1,
> >> >> CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
> >> >>
> >> >> so the last argument's LUMA value is CX25840_SVIDEO_LUMA1. rebuild the
> >> >> driver, reinstall the drivers, unload the ivtv module, load the new ivtv
> >> >> module and test again. If that doesn't work continue to test
> >> >> CX25840_SVIDEO_LUMA2 through 8, skipping the value you found to be
> >> >> correct for video in the previous step(s). One of them should work such
> >> >> that you get at least a good black and white picture.
> >> >>
> >> >> Once you have Black and White SVideo, repeat the process with the
> >> >> CX25840_SVIDEO_CHROMAn values, skipping the values you already know are
> >> >> correct for previous step(s), until you get good color.
> >> >>
> >> >>
> >> >>
> >> >> 4. You will need to determine the GPIO output settings for to make line
> >> >> in 1 audio work. Using v4l2-ctl set the iput to "Composite 1" or
> >> >> "SVideo 1" and start a capture. As root, from where you built the
> >> >> drivers, run
> >> >>
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --list-gpio
> >> >>
> >> >> to show that state of the 16 GPIO pins. They should all have their
> >> >> direction set as input, and some random garbage should be read in for
> >> >> the in and out values. You will now use
> >> >>
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio dir=0xuuuu,val=0xvvvv
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --list-gpio
> >> >>
> >> >> To set 2 GPIO output pins (one for Line in 1 L audio, one for Line in 1
> >> >> R audio) to a high level (or maybe a low level) to hear audio from Line
> >> >> in 1. I would start with the highest bits first:
> >> >>
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio dir=0xc000,val=0xc000
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio dir=0xc000,val=0x0000
> >> >>
> >> >> and work my way down to the lowest bits. (One of the 16 bit will likely
> >> >> end up controlling the LED on the board.)
> >
> > You will want to try 2 bits at at time: setting their direction as
> > output and setting their output as either both high(1) or both as low
> > (0).
> >
> > So use these values:
> >
> > 0xc000 (1100 0000 0000 0000)
> > 0x6000 (0110 0000 0000 0000)
> > 0x3000 (0011 0000 0000 0000)
> > 0x1800 (0001 1000 0000 0000)
> > 0x0c00 (0000 1100 0000 0000)
> > 0x0600 (0000 0110 0000 0000)
> > 0x0300 (0000 0011 0000 0000)
> > 0x0180 (0000 0001 1000 0000)
> > 0x00c0 (0000 0000 1100 0000)
> > 0x0060 (0000 0000 0110 0000)
> > 0x0030 (0000 0000 0011 0000)
> > 0x0018 (0000 0000 0001 1000)
> > 0x000c (0000 0000 0000 1100)
> > 0x0006 (0000 0000 0000 0110)
> > 0x0003 (0000 0000 0000 0011)
> >
> > Report back which of those 15 values:
> >
> > 1. enables left audio from the rear panel connector
> > 2. enables right audio from the rear panel connector
> > 3. enables the LED (if you can see it)
> >
> >
> > If a value doesn't seem to have an effect, do not leave those bits set
> > with their direction as "output" (1) for a long time to avoid any
> > possible damage to the card.
> >
> > Regards,
> > Andy
> >
> >> >> One you find the bits that give you good Line in 1 audio: you will edit
> >> >> these lines in the card entry:
> >> >>
> >> >> .gpio_init = { .direction = 0x0000, .initial_value = 0 },
> >> >> .gpio_audio_input = { .mask = 0x0000,
> >> >> .tuner = 0x0000,
> >> >> .linein = 0x0000, /* Line In 1: rear bracket */
> >> >> .radio = 0x0000 }, /* Line in 2: internal con */
> >> >>
> >> >> To fix the direction, mask, and linein value.
> >> >>
> >> >>
> >> >> Good luck.
> >> >>
> >> >> Regards,
> >> >> Andy
> >> >>
> >> >>
> >> >>> On Thu, Nov 12, 2009 at 2:18 AM, Andy Walls <awalls@radix.net> wrote:
> >> >>> > On Wed, 2009-11-11 at 19:55 +0300, Rajesh Padalia wrote:
> >> >>> >> Hi Andy,
> >> >>> >> It works! I was able to capture video. I am yet to get Audio. Any idea?
> >> >>> >> -------------------------------
> >> >>> >
> >> >>> > 1. Please provide the output of
> >> >>> >
> >> >>> > $ v4l2-ctl --log-status
> >> >>> >
> >> >>> > while capturing TV.
> >> >>> >
> >> >>> > 2. Also could you provide the chip numbers from the two black chips
> >> >>> > next to the end of the metal tuner can just above the 27.00 MHz crystal?
> >> >>> > I can't read them from the photograph. One looks like it has a
> >> >>> > "Philips" logo, but I can't tell much else.
> >> >>> >
> >> >>> > 3. Make sure you have the firmware for the cx25843 chip in the proper
> >> >>> > firmware directory for your distirbution. You will never get broadcast
> >> >>> > audio without that firmware loaded into the CX25843.
> >> >>> >
> >> >>> > Regards,
> >> >>> > Andy
> >> >>> >
> >> >>> >> ---------------------------------------------------------------------------------------------
> >> >>> >> Thanks for your help.
> >> >>> >> Rajesh
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >>
> >
> >
> >
>


_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: UNKNOWN IVTV CARD: vendor/device: [4444:0016] subsystem vendor/device: [1540:9673]] [ In reply to ]
Andy,


>> 0x0180 and 0x00c0 enables the LED on board, however I could not hear
>> audio for any of the bits.


>OK, so GPIO 7 should be set as an output as it controls the LED.

>So we know ".direction" can safely always have bit 7 set; i.e. 0x0080.

>When you tested the values trying to listen for audio, did you try with
>the "direction" bits set, but the "value" bits set to 0 (0x0000) as well
>as the value bits set to 1 (value the same as direction)?
Yes, but no audio ...
>I'm almost certain two GPIOs will control the multiplexer and route
>audio.

>Hmmm...Perhaps one of the GPIOs also controls a "chip" enable on the
>multiplexer chip. One additional test you should try:

># v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio dir=0xffff,val=0xffff
>(listen for audio in the capture)
># v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio dir=0xffff,val=0x0000
>(listen for audio in the capture)
No audio yet.....

>That turns them all on as outputs and tries them all high at once and
>all low at once. Maybe something wll be audible then.

>Obviously don't leave the GPIO directions all set to output for too long
>to avoid any possible damage to the card.

>Could you please look at the wire traces on the board and follow the
>board wire traces from the 74HC4053 multiplexer chip pins 9, 10, & 11 (&
>maybe 6) back to the CX23416 ball grid array and tell me the approximate
>row and columns? Or send a link to a high resolution picture with
>bright lighting behind the board so that I can follow the traces?

I have posted thumbnails links to pictures at -
http://rajesh.padalia.net/TVCard.html
However I afraid images may not be that useful. I tried to check continuity
with multimeter and only thing I got is continuity between pin 6 of to inner
side of all capacitors (C64, C80, C81, C82 and all) viz in the back of
card. For other pins it is not possible to trace or check continuity.

Thanks and best regards,
Rajesh

----------------------------------------------------------------------------------------------------------------------------------------
> >> Andy,
> >> I am back and have started testing.
> >> Some of clarifications:
> >> 1. I am trying different combination when video capture is on (mplayer
> >> /dev/video0).
> >
> > Yes. There will be a short delay of a few seconds before you will be
> > able to tell if a change of GPIO lines changes the audio.
> >
> >
> >> 1. Should I try different combinations for 'dir' .i.e. from 0xc000,
> >> 0xb000....0x0000 and even 0xffff?
> >> 2. You recommended to try 'val' from 0xc000 to 0x0000. Do I have to
> >> try values like 0xf000, 0xcd00, 0x0010?
> >
> > Try not to top post. Look below .....
> >
> >> BTW, no response from Interact-TV inspite of reminder.
> >> Thanks for your help.
> >> Regards,
> >> Rajesh
> >>
> >
> >> >>
> >> >>> 2. The one close to crystal is : 74HC4053D, AG124 29, URO 0348D
> >> >>> The other one is: 5333KZ, GZ0337
> >> >>
> >> >> OK those chips are what I needed to know:
> >> >>
> >> >> Philips/NXP 74HC4053 Triple 2:1 analog multiplexer:
> >> >> http://www.nxp.com/acrobat_download/datasheets/74HC_HCT4053_4.pdf
> >> >>
> >> >> Cirrus Logic CS5333 24 bit, 96 kHz stereo A/D converter:
> >> >> http://www.digchip.com/datasheets/download_datasheet.php?id=228624
∂-number=CDB5333
> >> >>
> >> >> This is where the information from Ineteract-TV could save everyone
a
> >> >> lot of time and effort. *sigh*
> >> >>
> >> >> Oh, well. I have created a preliminary card entry for the PV-947D
in my
> >> >> repository here:
> >> >>
> >> >> http://linuxtv.org/hg/~awalls/ivtv-provideo/
> >> >>
> >> >>
> >> >> The easiest thing to do is to download the tar.gz archive from this
> >> >> link:
> >> >>
> >> >>
http://linuxtv.org/hg/~awalls/ivtv-provideo/archive/tip.tar.gz
> >> >>
> >> >> And build and install the v4l-dvb subsystem modules:
> >> >>
> >> >> $ tar -xvf tip.tar.gz
> >> >> $ cd (into the newly extarcted archive)
> >> >> $ make
> >> >> $ cd v4l2-apps
> >> >> $ make (it will fail, but ivtv-ctl will get built)
> >> >> $ cd ..
> >> >> $ su root
> >> >> # make install
> >> >> # make unload; make unload
> >> >> # /sbin/modprobe ivtv
> >> >>
> >> >> (*WARNING* The 'make install' step will overwrite all of you
existing
> >> >> v4l-dvb (media subsystem) modules under /lib/modules/`uname -r` .
Back
> >> >> them up if you wan to save them.)
> >> >>
> >> >> Now ivtv should at least automatically recognize your card.
> >> >>
> >> >> And now the fun part: *you* have to experiment and fix the card
> >> >> definition.
> >> >>
> >> >> 1. You will have to figure out which of the 8 CX25843 analog inputs
> >> >> correspond to which of the following:
> >> >>
> >> >> a. RF tuner assembly CVBS (composite) video
> >> >> b. RF Sound IF (SIF) audio
> >> >> c. Rear bracket CVBS (composite) video
> >> >> d. Rear bracket SVideo Luma (Y) video component
> >> >> e. Rear bracket SVideo Chroma (C) video component
> >> >>
> >> >> I assume you'll just ignore the internal black video connector with
pins
> >> >> labeled Y (Luma or CVBS?), C (Chroma), AV (?), and G (ground) as
these
> >> >> would be for Compsite 2 and SVideo 2.
> >> >>
> >> >>
> >> >> 2. You will have to figure out how to set the GPIO pin direction,
and
> >> >> masks for audio routing:
> >> >>
> >> >> a. RF tuner baseband audio (if you can't use SIF audio for some
reason)
> >> >> b. Rear bracket Line-in 1 L and R audio
> >> >>
> >> >> I assume you'll ignore the the internal black video connector with
pins
> >> >> labeled L (Left), R (Right) and G (ground) as these would be Line in
2
> >> >> audio.
> >> >>
> >> >>
> >> >> OK. So that's the task. Now how do you do it? You'll need to edit
> >> >>
> >> >> linux/drivers/media/video/ivtv/ivtv-cards.c
> >> >>
> >> >> to fix up the card entry for the Provideo PV-947D. It currently
looks Like this:
> >> >>
> >> >> static const struct ivtv_card ivtv_card_provideo = {
> >> >> .type = IVTV_CARD_PROVIDEO_PV947,
> >> >> .name = "Provideo Multimedia PV-947D",
> >> >> .v4l2_capabilities = IVTV_CAP_ENCODER,
> >> >> .hw_video = IVTV_HW_CX25840,
> >> >> .hw_audio = IVTV_HW_CX25840,
> >> >> .hw_audio_ctrl = IVTV_HW_CX25840,
> >> >> .hw_muxer = IVTV_HW_GPIO,
> >> >> .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_GPIO,
> >> >> .video_inputs = {
> >> >> { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2
},
> >> >> /* Rear Bracket connectors */
> >> >> { IVTV_CARD_INPUT_SVIDEO1, 1,
> >> >> CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
> >> >> { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1
},
> >> >> /* Internal Video-In connectors */
> >> >> { IVTV_CARD_INPUT_SVIDEO2, 2,
> >> >> CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
> >> >> { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE1
},
> >> >> },
> >> >> .audio_inputs = {
> >> >> { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5,
0 },
> >> >> { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1 },
> >> >> { IVTV_CARD_INPUT_LINE_IN2, CX25840_AUDIO_SERIAL,
2 },
> >> >> },
> >> >> .tuners = {
> >> >> { .std = V4L2_STD_NTSC, .tuner =
TUNER_PHILIPS_FQ1236A_MK4 },
> >> >> },
> >> >> /*
> >> >> * The 74HC4053 Triple 2:1 multiplexer must be controlled by
3 GPIOs.
> >> >> * It is likely the mux switches Audio L and R between the
rear bracket
> >> >> * connector and the internal connectors.
> >> >> * It is unclear if the third unit in the triple mux switches
Y or C or
> >> >> * something else.
> >> >> *
> >> >> * The board also has an LED (D2) which is likely controlled
by a GPIO
> >> >> */
> >> >> .gpio_init = { .direction = 0x0000, .initial_value = 0 },
> >> >> .gpio_audio_input = { .mask = 0x0000,
> >> >> .tuner = 0x0000,
> >> >> .linein = 0x0000, /* Line In 1: rear
bracket */
> >> >> .radio = 0x0000 }, /* Line in 2:
internal con */
> >> >> .pci_list = ivtv_pci_provideo,
> >> >> .i2c = &ivtv_i2c_std,
> >> >> };
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> 1. I assume you don't have an NTSC-M RF source available to you, so
> >> >> we'll forget about the RF tuner for now. That means we won't be
editing
> >> >> the lines that look like these:
> >> >>
> >> >> { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
> >> >>
> >> >> { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
> >> >>
> >> >> .tuner = 0x0000,
> >> >>
> >> >> 2. Set the card using v4l2-ctl to "Composite 1" and the proper video
> >> >> standard for the incoming signal (PAL, SECAM, NTSC) on the rear
bracket
> >> >> connector. If you have color video that looks correct go to the
next
> >> >> step. If not change this line:
> >> >>
> >> >> { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
> >> >>
> >> >> so the last argument is CX25840_COMPOSITE2, rebuild the driver,
> >> >> reinstall the drivers, unload the ivtv module, load the new ivtv
module
> >> >> and test again. If that doesn't work continue to test
> >> >> CX24840_COMPOSITE3 through 8. One of them should work.
> >> >>
> >> >>
> >> >> 3. Set the card using v4l2-ctl to "SVideo 1" and the proper video
> >> >> standard for the incoming SVideo signal (PAL, SECAM, NTSC) on the
rear
> >> >> bracket connector. If you have color video that looks correct go to
the
> >> >> next step. Otherwise change this line:
> >> >>
> >> >> { IVTV_CARD_INPUT_SVIDEO1, 1,
> >> >> CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
> >> >>
> >> >> so the last argument's LUMA value is CX25840_SVIDEO_LUMA1. rebuild
the
> >> >> driver, reinstall the drivers, unload the ivtv module, load the new
ivtv
> >> >> module and test again. If that doesn't work continue to test
> >> >> CX25840_SVIDEO_LUMA2 through 8, skipping the value you found to be
> >> >> correct for video in the previous step(s). One of them should work
such
> >> >> that you get at least a good black and white picture.
> >> >>
> >> >> Once you have Black and White SVideo, repeat the process with the
> >> >> CX25840_SVIDEO_CHROMAn values, skipping the values you already know
are
> >> >> correct for previous step(s), until you get good color.
> >> >>
> >> >>
> >> >>
> >> >> 4. You will need to determine the GPIO output settings for to make
line
> >> >> in 1 audio work. Using v4l2-ctl set the iput to "Composite 1" or
> >> >> "SVideo 1" and start a capture. As root, from where you built the
> >> >> drivers, run
> >> >>
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --list-gpio
> >> >>
> >> >> to show that state of the 16 GPIO pins. They should all have their
> >> >> direction set as input, and some random garbage should be read in
for
> >> >> the in and out values. You will now use
> >> >>
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio
dir=0xuuuu,val=0xvvvv
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --list-gpio
> >> >>
> >> >> To set 2 GPIO output pins (one for Line in 1 L audio, one for Line
in 1
> >> >> R audio) to a high level (or maybe a low level) to hear audio from
Line
> >> >> in 1. I would start with the highest bits first:
> >> >>
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio
dir=0xc000,val=0xc000
> >> >> # v4l2-apps/util/ivtv-ctl -d /dev/video0 --set-gpio
dir=0xc000,val=0x0000
> >> >>
> >> >> and work my way down to the lowest bits. (One of the 16 bit will
likely
> >> >> end up controlling the LED on the board.)
> >
> > You will want to try 2 bits at at time: setting their direction as
> > output and setting their output as either both high(1) or both as low
> > (0).
> >
> > So use these values:
> >
> > 0xc000 (1100 0000 0000 0000)
> > 0x6000 (0110 0000 0000 0000)
> > 0x3000 (0011 0000 0000 0000)
> > 0x1800 (0001 1000 0000 0000)
> > 0x0c00 (0000 1100 0000 0000)
> > 0x0600 (0000 0110 0000 0000)
> > 0x0300 (0000 0011 0000 0000)
> > 0x0180 (0000 0001 1000 0000)
> > 0x00c0 (0000 0000 1100 0000)
> > 0x0060 (0000 0000 0110 0000)
> > 0x0030 (0000 0000 0011 0000)
> > 0x0018 (0000 0000 0001 1000)
> > 0x000c (0000 0000 0000 1100)
> > 0x0006 (0000 0000 0000 0110)
> > 0x0003 (0000 0000 0000 0011)
> >
> > Report back which of those 15 values:
> >
> > 1. enables left audio from the rear panel connector
> > 2. enables right audio from the rear panel connector
> > 3. enables the LED (if you can see it)
> >
> >
> > If a value doesn't seem to have an effect, do not leave those bits set
> > with their direction as "output" (1) for a long time to avoid any
> > possible damage to the card.
> >
> > Regards,
> > Andy
> >
> >> >> One you find the bits that give you good Line in 1 audio: you will
edit
> >> >> these lines in the card entry:
> >> >>
> >> >> .gpio_init = { .direction = 0x0000, .initial_value = 0 },
> >> >> .gpio_audio_input = { .mask = 0x0000,
> >> >> .tuner = 0x0000,
> >> >> .linein = 0x0000, /* Line In 1: rear
bracket */
> >> >> .radio = 0x0000 }, /* Line in 2:
internal con */
> >> >>
> >> >> To fix the direction, mask, and linein value.
> >> >>
> >> >>
> >> >> Good luck.
> >> >>
> >> >> Regards,
> >> >> Andy
> >> >>
> >> >>
> >> >>> On Thu, Nov 12, 2009 at 2:18 AM, Andy Walls <awalls@radix.net>
wrote:
> >> >>> > On Wed, 2009-11-11 at 19:55 +0300, Rajesh Padalia wrote:
> >> >>> >> Hi Andy,
> >> >>> >> It works! I was able to capture video. I am yet to get Audio.
Any idea?
> >> >>> >> -------------------------------
> >> >>> >
> >> >>> > 1. Please provide the output of
> >> >>> >
> >> >>> > $ v4l2-ctl --log-status
> >> >>> >
> >> >>> > while capturing TV.
> >> >>> >
> >> >>> > 2. Also could you provide the chip numbers from the two black
chips
> >> >>> > next to the end of the metal tuner can just above the 27.00 MHz
crystal?
> >> >>> > I can't read them from the photograph. One looks like it has a
> >> >>> > "Philips" logo, but I can't tell much else.
> >> >>> >
> >> >>> > 3. Make sure you have the firmware for the cx25843 chip in the
proper
> >> >>> > firmware directory for your distirbution. You will never get
broadcast
> >> >>> > audio without that firmware loaded into the CX25843.
> >> >>> >
> >> >>> > Regards,
> >> >>> > Andy
> >> >>> >
> >> >>> >>
---------------------------------------------------------------------------------------------
> >> >>> >> Thanks for your help.
> >> >>> >> Rajesh
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >>
> >
> >
> >
>