From: Maciej Szmigiero <mhej@o2.pl>
To: Andy Walls <awalls@md.metrocast.net>
Cc: Michael Krufky <mkrufky@linuxtv.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Antti Palosaari <crope@iki.fi>,
Malcolm Priestley <tvboxspy@gmail.com>,
Patrick Boettcher <pboettcher@kernellabs.com>,
Martin Wilks <m.wilks@technisat.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Arnaud Lacombe <lacombar@gmail.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
Sven Barth <pascaldragon@googlemail.com>,
Lucas De Marchi <lucas.demarchi@profusion.mobi>,
linux-media@vger.kernel.org
Subject: Re: [PATCH]Medion 95700 analog video support
Date: Mon, 26 Sep 2011 23:37:04 +0200 [thread overview]
Message-ID: <4E80F080.7030500@o2.pl> (raw)
In-Reply-To: <1316895712.12899.84.camel@palomino.walls.org>
W dniu 24.09.2011 22:21, Andy Walls pisze:
> Hi Maciej,
>
> I'll try and comment on the specific areas below, but overall the
> problem is this:
>
> 1. The default setup and behavior of the cx25840 module was written
> around hardware designs supported by the ivtv driver: i.e. interfacing
> to a CX23416 MPEG encoder.
>
> 2. The ivtv and pvrusb2 drivers rely on that default setup and behavior
> of the cx25840 module.
>
> 3. The PVR-150 and PVR-500 are very popular cards supported by ivtv that
> use a CX25843 and CX23416. Many MythTV users still have these cards in
> service.
>
> 4. The ivtv driver also supports other hardware designs that use
> different encoders, so trying fix ivtv to match new changes in the
> cx25840 will ripples along to other analog video decoder drivers. This
> would result in a lot of time to perform regression testing with as many
> different ivtv supported capture cards as possible.
>
>
> What I recommend is that you rework your changes so that the cx25840
> module is provided information by the bridge driver as to the board
> model, and then have the cx25840 module behave appropriately based on
> the board information passed in by the bridge driver.
>
> 1. Add whatever data fields you think you need to the "struct
> cx25840_platform_data" structure in include/media/cx25840.h. Maybe
> something as simple as "bool is_medion95700"
>
> 2. In cxusb-analog.c you instantiate the cx25840 sub-device with
> v4l2_i2c_new_subdev_board() with the cx25840 platform data filled in as
> needed for the Medion 95700. Look at
> drivers/media/video/ivtv/ivtv-i2c.c:ivtv_i2c_register() for an example
> of how this is done for the cx25840 module.
>
> 3. Modify the cx25840 module to behave as you need it if the platform
> data indicates a Medion 95700; otherwise, leave the default cx25840
> setup and behavior.
>
Hi Andy,
Thanks for you detailed explanation, I did not know that ivtv boards are that
quirky with regard to VBI capture.
I will do as you wrote above, make my changes to cx25840 driver conditional,
so ivtv won't be affected.
> Any specific comments I have are in-line below:
>
>> @@ -18,6 +18,9 @@
>> * CX2388[578] IRQ handling, IO Pin mux configuration and other small fixes are
>> * Copyright (C) 2010 Andy Walls <awalls@md.metrocast.net>
>> *
>> + * CX2384x pin to pad mapping and output format configuration support are
> ^^^^^^^
> CX2584x?
>> if ((fmt->width * 16 < Hsrc) || (Hsrc < fmt->width) ||
>> (Vlines * 8 < Vsrc) || (Vsrc < Vlines)) {
>> @@ -1403,6 +1695,112 @@ static void log_audio_status(struct i2c_client *client)
>> }
>> }
>>
>> +#define CX25480_VCONFIG_OPTION(option_mask) \
> ^^^^^^
> CX25840?
>
>> + if (config_in & option_mask) { \
>> + state->vid_config &= ~(option_mask); \
>> + state->vid_config |= config_in & option_mask; \
>> + } \
>> +
>> +#define CX25480_VCONFIG_SET_BIT(optionmask, reg, bit, oneval) \
> ^^^^^^
> CX25840?
>
You mean here that it should be named consistently either as CX2584x or CX25840?
>> return set_input(client, input, state->aud_input);
>> }
>>
>> @@ -1877,7 +2278,7 @@ static int cx25840_probe(struct i2c_client *client,
>> u16 device_id;
>>
>> /* Check if the adapter supports the needed features */
>> - if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
>> + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
>> return -EIO;
>
> On the surface, this change doesn't appear to adversely affect the ivtv,
> pvrusb2, cx23885, and cx231xx bridge drivers.
>
> I would need to take a hard look at the CX2584[0123], CX2583[67],
> CX2388[578], and CX2310[12] datasheets to see why, and if, all the Mako
> core variants require I2C_FUNC_SMBUS_BYTE_DATA.
>
> However, if the cxusb bridge has a full I2C master, shouldn't the cxusb
> driver be specifying (I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL) as its
> functionality? See Documentation/i2c/functionality.
Adding I2C_FUNC_SMBUS_EMUL flag to cxusb i2c host seems to be a right thing to do for now,
but I would be very surprised if any of Conexant video decoders actually used SMBus instead
of plain I2C.
Best regards,
Maciej Szmigiero
next prev parent reply other threads:[~2011-09-26 21:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-04 18:51 [PATCH]Medion 95700 analog video support Maciej Szmigiero
2011-09-04 19:05 ` Arnaud Lacombe
2011-09-04 19:10 ` Maciej Szmigiero
2011-09-04 19:46 ` Michael Krufky
2011-09-04 21:01 ` Maciej Szmigiero
2011-09-23 19:32 ` Mauro Carvalho Chehab
2011-09-23 19:39 ` Michael Krufky
2011-09-23 21:06 ` Andy Walls
2011-09-23 21:15 ` Maciej Szmigiero
2011-09-24 20:21 ` Andy Walls
2011-09-26 21:37 ` Maciej Szmigiero [this message]
2011-09-26 23:53 ` Andy Walls
2011-10-02 19:12 ` Maciej Szmigiero
2012-08-13 23:35 ` Mauro Carvalho Chehab
2012-08-15 10:56 ` Maciej S. Szmigiero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E80F080.7030500@o2.pl \
--to=mhej@o2.pl \
--cc=awalls@md.metrocast.net \
--cc=crope@iki.fi \
--cc=hverkuil@xs4all.nl \
--cc=lacombar@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=lucas.demarchi@profusion.mobi \
--cc=m.wilks@technisat.com \
--cc=mchehab@infradead.org \
--cc=mkrufky@linuxtv.org \
--cc=pascaldragon@googlemail.com \
--cc=pboettcher@kernellabs.com \
--cc=tvboxspy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.