Re: CX23103 Video Grabber seems to be supported by cx231xx driver

2013-07-14 Thread Hans Verkuil
Hi Florian,

On 07/12/2013 06:26 PM, Florian Streibelt wrote:
 Hi,
 
 the chip CX23103 that is used in various devices sold e.g. in germany works 
 with the cx231xx stock driver.
 
 The author of that driver is not reachable via the email adress stated in the 
 source file: srinivasa.de...@conexant.com
 [ host cnxtsmtp1.conexant.com [198.62.9.252]: 550 5.1.1 
 srinivasa.de...@conexant.com:  Recipient address rejected: User unknown in 
 relay recipient table]

Yeah, I suspect he left Conexant. For all practical purposes that leaves me as
the maintainer for my sins.

 
 In drivers/media/video/cx231xx/cx231xx-cards.c the struct usb_device_id 
 cx231xx_id_table[] needs these lines added:
 
{USB_DEVICE(0x1D19, 0x6109),
.driver_info = CX231XX_BOARD_PV_XCAPTURE_USB},

That looks OK.

 While the change is minimal due to the fact that no real technical 
 documentation is available on the chip the support was guessed - but worked 
 for video.
 
 The videostream can pe played using mplayer tv:///0  - proof: 
 http://streibelt.de/blog/2013/06/23/kernel-patch-for-cx23103-video-grabber-linux-support/
 
 However when trying to capture audio using audacity while playing the video 
 stream in mplayer my system locked (no message in syslog, complete freeze). 

I've no idea what is happening here. It has probably to do with the board setup,
although there isn't all that much that you can change there that relates to 
audio.

Try using 'arecord' instead of audicity. The arecord tool is more low-level, so
it will be interesting to know if it behaves differently.

Besides that the only thing I can think of is just to try and add printk's to
cx231xx-audio.c and see where things go boom.

A useful trick there is to add a mdelay(5) or so after the printk to give the
system time to write to the kernel log.

Be aware that I consider this driver to be flaky, so I would not at all be
surprised if there are bugs lurking in the code.

Regards,

Hans

 I posted this one month ago to this list without any reaction so I ask if 
 this is the correct way to get that grabber really supported.
 
 I am willing to do any tests neccessary and try out patches.

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: CX23103 Video Grabber seems to be supported by cx231xx driver

2013-07-14 Thread Florian Streibelt
On Sun, 14 Jul 2013 11:23:46 +0200
 Hans Verkuil hverk...@xs4all.nl wrote:

 Hi Florian,
 
 On 07/12/2013 06:26 PM, Florian Streibelt wrote:
  Hi,
  
  the chip CX23103 that is used in various devices sold e.g. in germany works 
  with the cx231xx stock driver.
  
  The author of that driver is not reachable via the email adress stated in 
  the source file: srinivasa.de...@conexant.com
  [ host cnxtsmtp1.conexant.com [198.62.9.252]: 550 5.1.1 
  srinivasa.de...@conexant.com:  Recipient address rejected: User unknown 
  in relay recipient table]
 
 Yeah, I suspect he left Conexant. For all practical purposes that leaves me as
 the maintainer for my sins.

heh - also means a patch should remove the wrong email adress/change the 
maintainers in the source?


 
  
  In drivers/media/video/cx231xx/cx231xx-cards.c the struct usb_device_id 
  cx231xx_id_table[] needs these lines added:
  
 {USB_DEVICE(0x1D19, 0x6109),
 .driver_info = CX231XX_BOARD_PV_XCAPTURE_USB},
 
 That looks OK.

Only if the board layout is different :/ 
There is no information from the vendor, they don't even reply to messages via 
the contact form, of course.



 
  While the change is minimal due to the fact that no real technical 
  documentation is available on the chip the support was guessed - but worked 
  for video.
  
  The videostream can pe played using mplayer tv:///0  - proof: 
  http://streibelt.de/blog/2013/06/23/kernel-patch-for-cx23103-video-grabber-linux-support/
  
  However when trying to capture audio using audacity while playing the video 
  stream in mplayer my system locked (no message in syslog, complete freeze). 
 
 I've no idea what is happening here. It has probably to do with the board 
 setup,
 although there isn't all that much that you can change there that relates to 
 audio.

hm. maybe disable it - currently my time budget is negative - so  I cannot 
really work on this.

 
 Try using 'arecord' instead of audicity. The arecord tool is more low-level, 
 so
 it will be interesting to know if it behaves differently.

I'll try - the problem is the complete system freeze - I'll see if I can setup 
a system with serial console for the kernel log

 
 Besides that the only thing I can think of is just to try and add printk's to
 cx231xx-audio.c and see where things go boom.

yup. If I had the time.

 
 A useful trick there is to add a mdelay(5) or so after the printk to give the
 system time to write to the kernel log.

ok

 
 Be aware that I consider this driver to be flaky, so I would not at all be
 surprised if there are bugs lurking in the code.


Hum. Because of code quality or due to the missing documentation from the 
vendor?


If you have any documents on the chip I would be happy.


/Florian
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: CX23103 Video Grabber seems to be supported by cx231xx driver

2013-07-14 Thread Devin Heitmueller
On Sun, Jul 14, 2013 at 9:23 AM, Florian Streibelt
flor...@inet.tu-berlin.de wrote:
 Be aware that I consider this driver to be flaky, so I would not at all be
 surprised if there are bugs lurking in the code.


 Hum. Because of code quality or due to the missing documentation from the 
 vendor?

While this is all too common for vendors, it really isn't a reasonable
assertion in this case.  Conexant (the chip vendor) wrote the original
driver, and they have been very supportive in the past.  They provided
documentation (under NDA) and reference designs at no cost.  They've
also answered questions I've had in the past regarding the chip and
you'll also note that the email address of the maintainer was a
Conexant engineer until he left the company.

Regarding the flakiness, there indeed have been some reliability
problems - some of them were in the original driver sources, a couple
I introduced doing the cleanup work to get it upstream (and long ago
fixed), and some were regressions introduced after the driver went
upstream.  It's tough maintaining a driver on an ongoing basis that
supports many different cards from different vendors, in particular
since individuals making changes to the driver to make it work with
some new device, don't have all of the other products to test with (to
ensure regressions aren't introduced).

These drivers also tend to suffer from bitrot.  If they aren't
actively being used by many people and if there isn't a developer who
actively maintains the driver, then regressions sneak in there and go
unnoticed for months/years.

 If you have any documents on the chip I would be happy.

I don't think there are any documents that aren't under NDA.  That
said, you don't need the register docs to debug a system hang.  If you
don't have the time to jam a few printk() statements into the source,
then there's no point in going through the effort to get you docs.

Your best bet at this point is probably to wait [indefinitely] for
some developer who has a need for the device to work to stumble across
the problem and debug it.  You get what you pay for.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: CX23103 Video Grabber seems to be supported by cx231xx driver

2013-07-14 Thread Florian Streibelt
On Sun, 14 Jul 2013 09:41:40 -0400
 Devin Heitmueller dheitmuel...@kernellabs.com wrote:

 said, you don't need the register docs to debug a system hang.  If you
 don't have the time to jam a few printk() statements into the source,
 then there's no point in going through the effort to get you docs.

heh - yea. The thing is that I don't want to star yet another project which 
ends in frustration because I have to guess and miss documents.

I'll see if I find the time to put some printk's and find a debug system with 
external logging - but this wil take some time (currently writing my diploma 
thesis)...


/Florian
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html