Andy / Yuri,
To increase vmalloc I added a parameter to the boot line
in /boot/grub/menu.lst. I'm not near the box at the moment but I am
fairly sure I just added "vmalloc=256M" to the image boot line as
another option (along with "quiet" etc.)
I'll copy the actual boot file lines later.
It'll take me a while to digest and incorporate all this in to my
testing but I'll keep you both informed of progress.
Brian
On Wed, 2008-05-28 at 20:43 -0400, Andy Walls wrote:
> On Thu, 2008-05-29 at 00:25 +0200, Yuri Warczynski (gmail) wrote:
> > >> Hello,
> > >>
> > >> I have this card (MPC718) on my Acer Aspire Idea 500.
> > >>
> > >> I?m quite eager to see it work. If testing is required, please do let
> > >> me know, I will be glad to help.
> > >
> > > I assume you already have the cx23418 digitizer, apu, and cpu firmware
> > > files already installed on your system.
> >
> > Yes.
> >
> > > We need to find out how the cards are wired up. Here's what you can do
> > > to help get the analog side of the card working:
> > >
> > > 1. In cx18-cards.c find the cx18_card_mpc718 definition structure.
> > >
> > > 2. Change
> > > .v4l2_capabilities = 0,
> > > to
> > > .v4l2_capabilities = CX18_CAP_ENCODER,
> > >
> > > 3. Start with the composite input (select using v4l2-ctl -i2). (If your
> > > Acer box doesn't have a composite input, skip to step 4.)
> > >
> > > If the Composite 1 input does not work, find the line:
> > >
> > > { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 }
> > >
> > > in video_inputs. Replace CX23418_COMPOSITE3 with CX23418_COMPOSITE1 and
> > > rebuild, and reinstall the driver, and unload the old module and load
> > > the new module. Then test again. Keep iterating with CX23418_COMPOSITE2
> > > through CX23418_COMPOSITE8. One of these 8 possible inputs should work.
> > >
> >
> > Here are my observations so far:
> > 1. The Yuan card has 2 tuners in dmesg I see that the first one
> > intializes, however the second one gives errors.
> > ---
> > [ 79.010881] cx18: Start initialization, version 1.0.0
> > [ 79.010940] cx18-0: Initializing card #0
> > [ 79.010944] cx18-0: Autodetected Yuan MPC718 card
> > [ 79.010981] cx18-0: Unreasonably low latency timer, setting to 64 (was 2)
> > [ 79.011173] cx18-0: cx23418 revision 01010000 (B)
> > [ 79.107114] cx18-0: Not yet supported!
> > [ 79.322601] cx18-0: Disabled encoder IDX device
> > [ 79.322641] cx18-0: Registered device video0 for encoder MPEG (2 MB)
> > [ 79.322664] cx18-0: Registered device video32 for encoder YUV (2 MB)
> > [ 79.322682] cx18-0: Registered device video24 for encoder PCM audio (1
> > MB)
> > [ 79.322701] cx18-0: Registered device radio0 for encoder radio
> > [ 80.026541] cx18-0: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
> > [ 80.107921] cx18-0: loaded v4l-cx23418-apu.fw firmware V00120000
> > (141200 bytes)
> > [ 80.199268] cx18-0: loaded v4l-cx23418-cpu.fw firmware (174716 bytes)
> > [ 80.205197] cx18-0: FW version: 0.0.71.0 (Release 2006/12/29)
> > [ 80.763969] cx18-0: Initialized card #0: Yuan MPC718
> > [ 80.764006] cx18-1: Initializing card #1
> > [ 80.764011] cx18-1: Autodetected Yuan MPC718 card
> > [ 80.764057] cx18-1: Unreasonably low latency timer, setting to 64 (was 2)
> > [ 80.764075] cx18-1: ioremap failed, perhaps increasing
> > __VMALLOC_RESERVE in page.h
> > [ 80.764080] cx18-1: or disabling CONFIG_HIGHMEM4G into the kernel would
> > help
> > [ 80.764085] cx18-1: Error -12 on initialization
> > [ 80.764094] cx18: probe of 0000:02:01.0 failed with error -12
> > [ 80.764175] cx18: End initialization
> > ---
> > Additioanally I've noticed that running modprobe -r cx18 && modrobe -v
> > cx18 produces the same dmesg output for both cards as in the above
> > case for card #1. So only option is to restart the pc in case it is
> > required to initialize the card.
>
> Yuri,
>
> Actually, those are two separate Yuan MPC718 mini-PCI cards installed in
> your Acer box. The second one fails intially because of a kernel
> vmalloc memory shortage on your machine (error -12 is -ENOMEM). Brian
> Hope indicated that upping vmalloc fixed the problem:
>
> Brian,
> Can you give details on how you increased vmalloc? Was it with a kernel
> command line option on boot?
>
> Yuri,
>
> Also Mike Krufky on the video4linux mailing list has indicated he also
> can't reload the cx18 module once he unloads it and gets a vmalloc
> message as well (Mike also uses Ubuntu I think). I think this is
> because the cx18 grabs a pretty large chunk (64 MB) of vmalloc address
> range for the PCI memory mapped IO. When the driver is unloaded, the
> large chunk that cx18 vacated from the vmalloc address space probably
> gets fragmented, and no large chunk is available when trying to reload
> the module. Do a
>
> # cat /proc/iomem | grep cx18
> # cat /proc/meminfo | grep Vmalloc
>
> to see the state of things. Again I think the solution is to increase
> the vmalloc space the kernel is allowed to use.
>
>
> > 2. The acer (which is a multimedia PC) provides 3 composite inputs two
> > through a scart and one through the front pannel (the manual refers to
> > these as AV1 , AV2 and AV3)
>
> And each of these goes to *one* of the two Yuan cards. Perhaps first
> you can try and figure out which external input goes to which internal
> card. (Maybe by booting to Windows and trying things there?)
>
> So anyway, now when issuing v4l2-ctl commands you should try to be
> specific about which card you are controlling:
>
> # v4l2-ctrl -d /dev/video0 -i2
>
> configures the cx23418 digitizer input to the primary composite input on
> card cx18-0
>
> # v4l2-ctrl -d /dev/video1 -i2
>
> configures the cx23418 digitizer input to the primary composite input on
> card cx18-1
>
>
> > so since I did not know that the front
> > pannel exposes AV2 - I started with that one.
> > The results for AV2 were:
> > On COMPOSITE 1,2,3,4,7,8. When trying to test I got a gray screen
> > On 5 - colorful snow
> > On 6 - a distorted video (skewed out of horizontal sync and black/white)
> >
> > Once I discovered the 2 scarts in the back. I thought it would be
> > appropriate to redo the entire test with AV1 input.
> > The results for AV1 were:
> > On 1 - a distorted video (skewed out of horizontal sync and
> > black/white) *yes, the same result as COMPOSITE6 on AV2*
> > On 2,3,4,5,6,7,8 - gray screen (sometimes with a "spark" or two)
>
> OK, so:
>
> AV1 is wired to the COMPOSITE1 pin on the CX23418 on the first card
> AV2 is wired to the COMPOSITE6 pin on the CX23418 on the first card
>
> Since you have 2 composite inputs to the first card, instead of the 1 in
> the inital card definition structure, you'll need to change 1 line and
> add two lines to the cx18_card_mpc718 definition structure. You'll need
> to have two lines to cover the composite video inputs:
>
> { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE1 },
> { CX18_CARD_INPUT_COMPOSITE2, 2, CX23418_COMPOSITE6 },
>
> and a new audio input to go with the second composite input:
>
> { CX18_CARD_INPUT_LINE_IN2, CX23418_AUDIO_SERIAL, 0 },
>
>
> But it looks like the CX23418 is probably set for NTSC when you've got a
> PAL input. So run your experiments again, but this time also use
> v4l2-ctl to set the input video standard to the PAL or SECAM that you're
> using. For example:
>
> # v4l2-ctl -d /dev/video0 -i2 <--- first composite input
> # v4l2-ctl -d /dev/video0 -s pal-I <--- set the card to PAL-I
>
> # v4l2-ctl -d /dev/video0 -i4 <--- second composite input
> # v4l2-ctl -d /dev/video0 -s pal-I <--- set the card to PAL-I
>
> Let us know if get a clean picture.
>
>
> > I am wondering if I should be testing AV 3 now and if the results
> > above indicate anything?
>
> If it is a composite input as well, wait until you fix the VMALLOC
> problem and get the second Yuan MPC718 card initialized properly.
>
> I'll wager:
> AV3 is wired to the COMPOSITE1 pin of the CX23418 on the second card
>
> In which case your card definition will already be correct.
>
>
> > Will the driver distinguish between the AV1,2 and 3 inputs (in the
> > future)? It would be deffintelly nice.
>
> Yes. The typical arrangement is a maximum of two composite inputs, 2
> S-video inputs, and 1 analog tuner input for each CX2341x chip (or Yuan
> MPC718 card in your specific case). The driver can support this and
> also supports multiple cards.
>
> >
> > I will continue with the further tests in the next days.
>
> Thanks for your efforts. Have fun. ;)
>
> Regards,
> Andy
>
>
> > > 4. Next try S-Video input (v4l2-ctl -i1): edit the line
> > >
> > > { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1},
> > >
> > > and replace CX23418_SVIDEO1 with CX23418_SVIDEO2 and rebuild and
> > > reinstall the driver, and unload the old module and load the new module.
> > > Then test again. Keep iterating with CX23418_SVIDEO2 through
> > > CX23418_SVIDEO4, and hopefully one will work.
> > >
> > > If you get one to work, but it is only black and white, then the card
> > > uses an uncommon combination of Luma and Chroma pins. Make a note of
> > > which one gives you a black and white picture (that'll be the correct
> > > Luma pin) and we'll walk through how to set the right Chroma pin. (The
> > > end result will be something like
> > > "CX23418_SVIDEO_LUMA1|CX23418_SVIDEO_CHROMA4", from the range of values
> > > CX23418_SVIDEO_LUMA1-4 and CX23418_SVIDEO_CHROMA4-8.)
> > >
> > >
> > > 5. Tuner: first get the firmware. See the file
> > > linux/Documentation/video4linux/extract_xc3028.pl for instructions.
> > >
> > >
> > > 6. Now modprobe cx18. Then run modprobe -r cx18 and modprobe cx18 again.
> > > If
> > > you get errors in the kernel log regarding the xceive tuner, then you
> > > need to change the xceive_pin setting in the card definition.
> > > It should be in the range 8-15. Try 15 first.
> > >
> > >
> > > 7. Once the tuner firmware appears to be loading, We need to find
> > > the correct composite input for the tuner by editing the line:
> > >
> > > { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 },
> > >
> > > Again, it can be any value from CX23418_COMPOSITE1-8. Rebuild,
> > > reinstall, unload, and reload and test.
> > >
> > >
> > > 8. To get audio from the tuner, you may need to change:
> > >
> > > { CX18_CARD_INPUT_AUD_TUNER, CX23418_AUDIO5, 0 },
> > >
> > > Possible values: CX23418_AUDIO4-8 or CX23418_AUDIO_SERIAL. Rebuild,
> > > reinstall, unload, and reload and test.
> > >
> > > If none of those work, we may need to start experimenting with GPIO
> > > pins.
> > >
> > >
> > > 9. For line in audio, you can try changing:
> > >
> > > { CX18_CARD_INPUT_LINE_IN1, CX23418_AUDIO_SERIAL, 0 }
> > >
> > > to CX23418_AUDIO4-8 if it doesn't already work. (I'm not expecting that
> > > to work though).
> >
> > I did have audio wile testing composite on AV1.
> >
> > > If you have no line in audio after that, we may need to start
> > > experimenting with GPIO pins.
> > >
> > >
> > > Let Hans or I know how it goes. Especially for audio, we're having some
> > > issues with the Hauppauge cards and mono/stereo audio, and Brian Hope on
> > > the ivtv-users list has already indicated he currently gets no audio
> > > with his MPC718 (He's working through similar steps.)
> > >
> > Seems I do not have a problem with line in audio on AV1, however I did
> > not check mono/stereo functionality.
> >
> >
> > Greetings,
> > Yuri
> >
> > > Regards
> > > Andy
> > >
> > >>
> > >>
> > >> Greetings,
> > >>
> > >> Yuri
> >
> > _______________________________________________
> > ivtv-devel mailing list
> > [email protected]
> > http://ivtvdriver.org/mailman/listinfo/ivtv-devel
> >
>
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel