All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: cx23885 module
       [not found] <BLU0-SMTP179D180C75C88F1B693AA73A75A0@phx.gbl>
@ 2010-10-19 21:27 ` Steven Toth
  2010-10-20 16:19   ` Daniel Lee Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Toth @ 2010-10-19 21:27 UTC (permalink / raw)
  To: Daniel Lee Kim, linux-media

Hi Dan,

Thanks for writing.

I can't do one-on-one end user support without copying in the Linux Media 
mailing list. I'm taking the liberty of doing so. Please reply-all when 
discussing this issue - so everyone can benefit.

[Dan is having issues being up an AverMedia board with a LG demod and a MT2131 
tuner via the cx23885 driver]

> However, I am having some trouble getting the tuner to be recognized. I was

It's the GPIO probably holding the tuner in reset, I suspect your gpio 
configuration is wrong. That's my first guess. What makes you think the gpio 
settings in your patch are correct?

> hoping that you might be willing to look over the code a bit to see what I am
> missing. I have altered the following 3 files: cx23885.h, cx23885-cards.c, and
> cx23885-dvb.c. I am attaching the 3 files in this email. I have been trying to
> do 3 things. First, to have the module auto-detect my card which was successful.
> Second, I wanted to attach the LGDT330X as my frontend which was successful.
> Third, I wanted to attach the MT2131 tuner. This third step is where I am having
> my troubles. I feel so close but I am not there yet. I know that you wrote the
> code a while back but if you would be willing to help me, I'd really appreciate
> it. Some folks have gotten the ngene module to work with the M780 board which

Yeah, I worked on the ngene with Devin as part of our KernelLabs.com projects, 
we brought up the digital side of the card as a pre-test while investigating 
ngene analog support.

If the 2131 isn't attaching then it's because you think it's on a different I2C 
bus, or the LG demod has it's I2C gate closed (unlikely) or the tuner is not 
responding because it's being held in reset.

Do you see the tuner if you perform and I2C scan (modprobe i2c_scan=1)?

- Steve

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cx23885 module
  2010-10-19 21:27 ` cx23885 module Steven Toth
@ 2010-10-20 16:19   ` Daniel Lee Kim
  2010-10-20 20:58     ` Steven Toth
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Lee Kim @ 2010-10-20 16:19 UTC (permalink / raw)
  To: Steven Toth; +Cc: linux-media

Thank you, Steve, for introducing me to the mailing list and showing me 
the protocol.  I have taken a look at your questions and comments.  My 
responses are interspersed in the email below

On 10/19/2010 04:27 PM, Steven Toth wrote:
> Hi Dan,
>
> Thanks for writing.
>
> I can't do one-on-one end user support without copying in the Linux 
> Media mailing list. I'm taking the liberty of doing so. Please 
> reply-all when discussing this issue - so everyone can benefit.
>
> [Dan is having issues being up an AverMedia board with a LG demod and 
> a MT2131 tuner via the cx23885 driver]
>
>> However, I am having some trouble getting the tuner to be recognized. 
>> I was
>
> It's the GPIO probably holding the tuner in reset, I suspect your gpio 
> configuration is wrong. That's my first guess. What makes you think 
> the gpio settings in your patch are correct?

how do I find out the GPIO?  I was unable to find it in the 
ngene-cards.c file.  I have the AVer88xHD.inf file with me and it says 
the following:

----from AVer88xHD.inf----
;Enable TS capture and BDA filter registration
HKR,"DriverData","Enable_BDA",0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","BDA_Demod_Tuner_type",0x00010001, 0x65, 0x00, 0x00, 0x00
HKR,"DriverData","DemodI2CAddress",0x00010001, 0xb2, 0x00, 0x00, 0x00
HKR,"DriverData","DigitalDemodI2CBus",0x00010001, 0x1, 0x00, 0x00, 0x00

; these registry keys for TS filter
; DebugTS entry forces creation of TS capture filter without a demod
;HKR,"DriverData","DebugTS",0x00010001, 0x01,0x00,0x00,0x00
; Next line enables the software TS packetizer
;HKR,"DriverData","dwIsTSStream",0x00010001,0x01,0x00,0x00,0x00

;IR Support
HKR,"DriverData","EnableIR",0x00010001, 0x00, 0x00, 0x00, 0x00
;NEC standard
HKR,"DriverData","IRStandard",0x00010001, 0x01, 0x00, 0x00, 0x00

; GPIO Pin values
; IMPORTANT !!! if any GPIO is not used - just delete the corresponding 
entry !!!
;HKR,"DriverData","comp_select_gpio_bit", 0x00010001, 0x00, 0x00, 0x00, 
0x00

; Back Panel = 0x00, Front Panel = 0x01
;HKR,"DriverData","comp_select_panel", 0x00010001, 0x00, 0x00, 0x00, 0x00

;Demod Comm mode : 0x00 = Serial, 0x01 = Parallel
HKR,"DriverData","DemodTransferMode",0x00010001, 0x00, 0x00, 0x00, 0x00

;BoardType M791ENC = 113
HKR,"DriverData","BoardType",0x00010001, 0x71, 0x00, 0x00, 0x00
HKR,"DriverData","ComboBoard",0x00010001, 0x01, 0x00, 0x00, 0x00

; XCeive 3028 = 100
HKR,"DriverData","TunerType",              0x00010001, 0x64, 0x00, 0x00, 
0x00
HKR,"DriverData","TunerI2CAddress",        0x00010001, 0xC2, 0x00, 0x00, 
0x00
HKR,"DriverData","TunerI2CBus",            0x00010001, 0x02, 0x00, 0x00, 
0x00
HKR,"DriverData","tuner_reset_gpio_bit",   0x00010001, 0x02, 0x00, 0x00, 
0x00
;HKR,"DriverData","tuner_sif_fm_gpio_bit",  0x00010001, 0x01, 0x00, 
0x00, 0x00

; MT2131            = 102
HKR,"DriverData","DigitalTunerType",       0x00010001, 0x66, 0x00, 0x00, 
0x00
HKR,"DriverData","DigitalTunerI2CAddress", 0x00010001, 0xC0, 0x00, 0x00, 
0x00
HKR,"DriverData","DigitalTunerI2CBus",     0x00010001, 0x01, 0x00, 0x00, 
0x00
HKR,"DriverData","demod_reset_gpio_bit",   0x00010001, 0x14, 0x00, 0x00, 
0x00
---end AVer88xHD.inf----

I'm not sure how to get the gpio from this?  Am I supposed to use 
0x00010001?
>
>> hoping that you might be willing to look over the code a bit to see 
>> what I am
>> missing. I have altered the following 3 files: cx23885.h, 
>> cx23885-cards.c, and
>> cx23885-dvb.c. I am attaching the 3 files in this email. I have been 
>> trying to
>> do 3 things. First, to have the module auto-detect my card which was 
>> successful.
>> Second, I wanted to attach the LGDT330X as my frontend which was 
>> successful.
>> Third, I wanted to attach the MT2131 tuner. This third step is where 
>> I am having
>> my troubles. I feel so close but I am not there yet. I know that you 
>> wrote the
>> code a while back but if you would be willing to help me, I'd really 
>> appreciate
>> it. Some folks have gotten the ngene module to work with the M780 
>> board which
>
> Yeah, I worked on the ngene with Devin as part of our KernelLabs.com 
> projects, we brought up the digital side of the card as a pre-test 
> while investigating ngene analog support.
>
> If the 2131 isn't attaching then it's because you think it's on a 
> different I2C bus, or the LG demod has it's I2C gate closed (unlikely) 
> or the tuner is not responding because it's being held in reset.
>
> Do you see the tuner if you perform and I2C scan (modprobe i2c_scan=1)?
>
When I run this, I can the following message:
FATAL: Module i2c_scan=1 not found.

However, running dmesg, I get the following:
[ 3072.274680] cx23885 driver version 0.0.2 loaded
[ 3072.274752] cx23885 0000:04:00.0: PCI INT A -> GSI 19 (level, low) -> 
IRQ 19
[ 3072.274970] CORE cx23885[0]: subsystem: 1461:d439, board: AVermedia 
M791 [card=29,autodetected]
[ 3072.605134] cx23885_dvb_register() allocating 1 frontend(s)
[ 3072.605189] cx23885[0]: cx23885 based dvb card
[ 3072.621974] MT2131: successfully identified at address 0x60
[ 3072.621981] DVB: registering new adapter (cx23885[0])
[ 3072.621986] DVB: registering adapter 0 frontend 0 (LG Electronics 
LGDT3303 VSB/QAM Frontend)...
[ 3072.622519] cx23885_dev_checkrevision() Hardware revision = 0xb1
[ 3072.622529] cx23885[0]/0: found at 0000:04:00.0, rev: 15, irq: 19, 
latency: 0, mmio: 0xea000000
[ 3072.622540] cx23885 0000:04:00.0: setting latency timer to 64
[ 3072.622546] IRQ 19/cx23885[0]: IRQF_DISABLED is not guaranteed on 
shared IRQs

so it does look like it has identified MT2131 as the tuner but is unable 
to work it.

Any further help would be greatly appreciated.

-Dan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cx23885 module
  2010-10-20 16:19   ` Daniel Lee Kim
@ 2010-10-20 20:58     ` Steven Toth
       [not found]       ` <SNT130-w25B4AAC1A5FC7F00372440A75E0@phx.gbl>
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Toth @ 2010-10-20 20:58 UTC (permalink / raw)
  To: Daniel Lee Kim; +Cc: linux-media

On 10/20/10 12:19 PM, Daniel Lee Kim wrote:
> Thank you, Steve, for introducing me to the mailing list and showing me the
> protocol. I have taken a look at your questions and comments. My responses are
> interspersed in the email below

You are welcome.

<cut>

> However, running dmesg, I get the following:
> [ 3072.274680] cx23885 driver version 0.0.2 loaded
> [ 3072.274752] cx23885 0000:04:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
> [ 3072.274970] CORE cx23885[0]: subsystem: 1461:d439, board: AVermedia M791
> [card=29,autodetected]
> [ 3072.605134] cx23885_dvb_register() allocating 1 frontend(s)
> [ 3072.605189] cx23885[0]: cx23885 based dvb card
> [ 3072.621974] MT2131: successfully identified at address 0x60
> [ 3072.621981] DVB: registering new adapter (cx23885[0])
> [ 3072.621986] DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3303
> VSB/QAM Frontend)...
> [ 3072.622519] cx23885_dev_checkrevision() Hardware revision = 0xb1
> [ 3072.622529] cx23885[0]/0: found at 0000:04:00.0, rev: 15, irq: 19, latency:
> 0, mmio: 0xea000000
> [ 3072.622540] cx23885 0000:04:00.0: setting latency timer to 64
> [ 3072.622546] IRQ 19/cx23885[0]: IRQF_DISABLED is not guaranteed on shared IRQs
>
> so it does look like it has identified MT2131 as the tuner but is unable to work
> it.
>
> Any further help would be greatly appreciated.

If the drivers are now loading (which sounds like progress) then the GPIOs (in 
whatever form you have them) are probably OK. Double check this by doing a cold 
boot without booting into windows first, does the tuner still attach?

It's never wise to drive a GPIO regardless unless you know what you are doing, 
you could be sinking current into a part for long periods of time that doesn't 
like it (or applying/removing write protection from eeproms etc).

At this stage I'd probably guess when you say the 'tuner is unable to work' that 
it's not locking when testing with azap (and a correctly configured 
channels.conf). It's probably the I/F (intermediate frequency) between the 
MT2131 and the LG3305 is incorrect, so the demod does not see the RF correctly 
from the tuner. Try stepping the LG I/F through it's various combination (see 
the LG header .h file) then repeat the test with spectral inversion inverted.

Use azap to tune during each test and watch for status bits 0x1f (meaning the 
demod is locked).

If no lock, adjust the I/F and/or spectral inversion and try again.

- Steve

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cx23885 module
       [not found]       ` <SNT130-w25B4AAC1A5FC7F00372440A75E0@phx.gbl>
@ 2010-10-22 13:06         ` Steven Toth
  2010-10-23 12:01           ` linuxtv.org Wiki (was Re: cx23885 module) Bjørn Mork
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Toth @ 2010-10-22 13:06 UTC (permalink / raw)
  To: Daniel Lee Kim; +Cc: linux-media

On 10/22/10 9:02 AM, Daniel Lee Kim wrote:
> Steve,
>
>
>  > > [ 3072.621974] MT2131: successfully identified at address 0x60
>
> Would the above message indicate that the tuner has been taken out of reset mode?

Yes.

>  > It's probably the I/F (intermediate frequency) between the
>  > MT2131 and the LG3305 is incorrect, so the demod does not see the RF correctly
>  > from the tuner. Try stepping the LG I/F through it's various combination (see
>  > the LG header .h file) then repeat the test with spectral inversion inverted.
>  >
>  > Use azap to tune during each test and watch for status bits 0x1f (meaning the
>  > demod is locked).
>  >
>  > If no lock, adjust the I/F and/or spectral inversion and try again.
>  >
>  > - Steve
>
> Are you suggesting that the above test might resolve the issue of not being able
> to tune using the MT2131? I'll take a look at the LG header though I'm using the
> LGDT330X driver since mine is the 3303 chip.

Yes.

>
> How do I know that the tuner is working? The modprobe i2c_scan=1 returned a
> fatal error, not found. Is there another way to test it?

If the MT2131 was detected then it's probably working. modprobe cx23885 
i2c_scan=1 should work and show a tuner at address 0xC0, 2 or 4 etc.

>
> One more question, is there a place I can go to learn how to compile just the
> cx23885.ko module? I am not able to compile only that module and so I have to
> wait until it compiles all the modules. I apologize as this is my first time
> tweaking a driver module. I've searched all over the net but have not found
> anyone who wrote about this. Thanks,

The wiki at linuxtv.org should contain everything you need for compiling, 
modifying and submitting patches.

Regards,

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* linuxtv.org Wiki (was Re: cx23885 module)
  2010-10-22 13:06         ` Steven Toth
@ 2010-10-23 12:01           ` Bjørn Mork
  2010-10-23 13:26             ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 7+ messages in thread
From: Bjørn Mork @ 2010-10-23 12:01 UTC (permalink / raw)
  To: linux-media

Steven Toth <stoth@kernellabs.com> writes:
> On 10/22/10 9:02 AM, Daniel Lee Kim wrote:
>
>> One more question, is there a place I can go to learn how to compile just the
>> cx23885.ko module? I am not able to compile only that module and so I have to
>> wait until it compiles all the modules. I apologize as this is my first time
>> tweaking a driver module. I've searched all over the net but have not found
>> anyone who wrote about this. Thanks,
>
> The wiki at linuxtv.org should contain everything you need for
> compiling, modifying and submitting patches.

It should, but it does not.

Following the path from 
www.linuxtv.org => V4L-DVB Wiki => Developer Section => How to submit patches
you end up at
http://www.linuxtv.org/wiki/index.php/Development:_How_to_submit_patches
which states

 'For V4L-DVB driver modules and/or documentation, patches should be
  created against the master V4L-DVB mercurial tree; for instructions on
  obtaining and building these sources, see the "How to Obtain, Build and
  Install V4L-DVB Device Drivers" article.'


and the "How to Obtain, Build and Install V4L-DVB Device Drivers"
article contains more of the same outdated information, with its
references to to 2.6.16 backwards compatibility and Mercurial.

For a new developer coming from the outside, this is worse than not
having any information at all.  Anyone reading this list will know that
the above quote is plain misleading.  But as a new developer you have no
way to know whether other information in the same page, or even the
whole Wiki, is just as misleading.  So you cannot trust any of it.
Making the Wiki useless.

Never write documentation you do not plan to keep updated. Delete
outdated documentation if you don't have time/resources to update it.
Misleading documentation is much, much worse than no documentation.

Bjørn



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxtv.org Wiki (was Re: cx23885 module)
  2010-10-23 12:01           ` linuxtv.org Wiki (was Re: cx23885 module) Bjørn Mork
@ 2010-10-23 13:26             ` Mauro Carvalho Chehab
  2010-10-24 11:25               ` linuxtv.org Wiki Bjørn Mork
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-23 13:26 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: linux-media

Em 23-10-2010 10:01, Bjørn Mork escreveu:
> Steven Toth <stoth@kernellabs.com> writes:
>> On 10/22/10 9:02 AM, Daniel Lee Kim wrote:
>>
>>> One more question, is there a place I can go to learn how to compile just the
>>> cx23885.ko module? I am not able to compile only that module and so I have to
>>> wait until it compiles all the modules. I apologize as this is my first time
>>> tweaking a driver module. I've searched all over the net but have not found
>>> anyone who wrote about this. Thanks,
>>
>> The wiki at linuxtv.org should contain everything you need for
>> compiling, modifying and submitting patches.
> 
> It should, but it does not.
> 
> Following the path from 
> www.linuxtv.org => V4L-DVB Wiki => Developer Section => How to submit patches
> you end up at
> http://www.linuxtv.org/wiki/index.php/Development:_How_to_submit_patches
> which states
> 
>  'For V4L-DVB driver modules and/or documentation, patches should be
>   created against the master V4L-DVB mercurial tree; for instructions on
>   obtaining and building these sources, see the "How to Obtain, Build and
>   Install V4L-DVB Device Drivers" article.'
> 
> 
> and the "How to Obtain, Build and Install V4L-DVB Device Drivers"
> article contains more of the same outdated information, with its
> references to to 2.6.16 backwards compatibility and Mercurial.
> 
> For a new developer coming from the outside, this is worse than not
> having any information at all.  Anyone reading this list will know that
> the above quote is plain misleading.  But as a new developer you have no
> way to know whether other information in the same page, or even the
> whole Wiki, is just as misleading.  So you cannot trust any of it.
> Making the Wiki useless.
> 
> Never write documentation you do not plan to keep updated. Delete
> outdated documentation if you don't have time/resources to update it.
> Misleading documentation is much, much worse than no documentation.


It is a wiki for a community effort. If you found it outdated, please help us 
on keeping it uptodated.

Thanks,
Mauro


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxtv.org Wiki
  2010-10-23 13:26             ` Mauro Carvalho Chehab
@ 2010-10-24 11:25               ` Bjørn Mork
  0 siblings, 0 replies; 7+ messages in thread
From: Bjørn Mork @ 2010-10-24 11:25 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

Mauro Carvalho Chehab <mchehab@redhat.com> writes:

> It is a wiki for a community effort. If you found it outdated, please help us 
> on keeping it uptodated.

Yes, I know and I do wish I could write somethingmore up-to-date.

My problem with that is that I do not feel I know enough about your
requirements for driver submission to actually write anything on that.
I just know barely enough to see that the information in the wiki must
be outdated.



Bjørn

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-24 11:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <BLU0-SMTP179D180C75C88F1B693AA73A75A0@phx.gbl>
2010-10-19 21:27 ` cx23885 module Steven Toth
2010-10-20 16:19   ` Daniel Lee Kim
2010-10-20 20:58     ` Steven Toth
     [not found]       ` <SNT130-w25B4AAC1A5FC7F00372440A75E0@phx.gbl>
2010-10-22 13:06         ` Steven Toth
2010-10-23 12:01           ` linuxtv.org Wiki (was Re: cx23885 module) Bjørn Mork
2010-10-23 13:26             ` Mauro Carvalho Chehab
2010-10-24 11:25               ` linuxtv.org Wiki Bjørn Mork

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.