Re: hdpvr lockup with audio dropouts
On 2012-06-09 10:31:36 -0400, sitten74...@mypacks.net wrote: > > > >On Thu, Jun 7, 2012 at 7:53 PM, wrote: > >> Apparently there is a known issue where the HD-PVR cannot handle the loss > >> of audio signal over SPDIF while recording. If this happens, the unit > >> locks up requiring it to be power cycled before it can be used again. This > >> behavior can easily be reproduced by pulling the SPDIF cable during > >> recording. My question is this: are there any changes that could be made > >> to the hdpvr driver that would make it more tolerant of brief audio > >> dropouts? > > > >Does it do this under Windows? If it does, then call Hauppauge and get them > >to fix it (and if that results in a firmware fix, then it will help Linux > >too). If it works under Windows, then we know it's some sort of driver > >issue which would be needed. > > > >It's always good when it's readily reproducible. :-) > > > > Well, I tested it in Windows and no, the HD-PVR does not lock up when the > audio signal is lost. It does pause, but when the signal comes back it > resumes playing normally. So if I understand you correctly, this would most > likely be a Linux driver bug rather than a firmware problem. Yes, it's a driver bug (although iirc the device locked up when I wrote the driver). If you have usb traffic logs from the windows driver I'll look at them. If not I'll try to set my hdpvr up in the next days. Janne -- 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: [RFC PATCH 5/8] v4l: fix compiler warnings.
On 2012-04-23 13:51:25 +0200, Hans Verkuil wrote: > From: Hans Verkuil [...] > --- > drivers/media/video/au0828/au0828-video.c|4 ++-- > drivers/media/video/cx23885/cx23888-ir.c |4 +--- > drivers/media/video/cx25840/cx25840-ir.c |6 +- > drivers/media/video/em28xx/em28xx-audio.c|9 + > drivers/media/video/et61x251/et61x251_core.c | 11 --- > drivers/media/video/hdpvr/hdpvr-control.c|2 ++ > drivers/media/video/hdpvr/hdpvr-video.c |2 +- > drivers/media/video/saa7134/saa7134-video.c |2 +- > drivers/media/video/sn9c102/sn9c102_core.c |4 +--- > 9 files changed, 18 insertions(+), 26 deletions(-) > [...] > diff --git a/drivers/media/video/hdpvr/hdpvr-control.c > b/drivers/media/video/hdpvr/hdpvr-control.c > index 068df4b..ae8f229 100644 > --- a/drivers/media/video/hdpvr/hdpvr-control.c > +++ b/drivers/media/video/hdpvr/hdpvr-control.c > @@ -113,6 +113,8 @@ int get_input_lines_info(struct hdpvr_device *dev) >"get input lines info returned: %d, %s\n", ret, >print_buf); > } > +#else > + (void)ret; /* suppress compiler warning */ > #endif > lines = dev->usbc_buf[1] << 8 | dev->usbc_buf[0]; > mutex_unlock(&dev->usbc_mutex); > diff --git a/drivers/media/video/hdpvr/hdpvr-video.c > b/drivers/media/video/hdpvr/hdpvr-video.c > index 11ffe9c..0e9e156 100644 > --- a/drivers/media/video/hdpvr/hdpvr-video.c > +++ b/drivers/media/video/hdpvr/hdpvr-video.c > @@ -994,7 +994,7 @@ static int hdpvr_try_ctrl(struct v4l2_ext_control *ctrl, > int ac3) > default: > return -EINVAL; > } > - return 0; > + return ret; > } > > static int vidioc_try_ext_ctrls(struct file *file, void *priv, Acked-by: Janne Grunau -- 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
missing patches in patchwork (was Re: [PATCH] [media] hdpvr: update picture controls to support firmware versions > 0.15)
On 2012-02-14 17:09:55 -0500, Jarod Wilson wrote: > On Tue, Feb 14, 2012 at 4:32 PM, Devin Heitmueller > wrote: > > On Tue, Feb 14, 2012 at 3:43 PM, Jarod Wilson wrote: > >> Looks sane to me, and really needs to get in ASAP. I'd even suggest we > >> get it sent to stable, as these newer firmware HDPVR are pretty wonky > >> with any current kernel. > >> > >> Acked-by: Jarod Wilson > >> Reviewed-by: Jarod Wilson > >> CC: sta...@vger.kernel.org > > > > Where did the process break down here? Taylor did this patch *months* > > ago, and there has been absolutely no comment with why it wouldn't go > > upstream. If he hadn't been diligent in pinging the ML repeatedly, it > > would have been lost. > > It looks like for some reason, the v3 patch got eaten. :\ > > http://patchwork.linuxtv.org/patch/8183/ is the v2, in state Changes > Requested, but you can see in the comments a mail that says v3 is > attached, which contains the requested change (added s-o-b). A v3 > patch object is nowhere to be found though. The patch *was* indeed > attached to the mail though, I've got it here in my linux-media > mailbox. > > So at least on this one, I think I'm blaming patchwork, but it would > be good to better understand how that patch got eaten, and to know if > indeed its happened to other patches as well. Patchwork ignored the patch because of its mime type. Patchwork only handles text/{x-patch,x-diff,plain} but the v3 patch was attached as application/octet-stream. I have a clumsy patch to handle application/octet-stream for libav's patchwork instance. I'll try to find time to clean it up and submit it upstream. Janne -- 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
[PATCH 1/1] [media] hdpvr: fix race conditon during start of streaming
status has to be set to STREAMING before the streaming worker is queued. hdpvr_transmit_buffers() will exit immediately otherwise. Reported-by: Joerg Desch CC: sta...@kernel.org --- drivers/media/video/hdpvr/hdpvr-video.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c index 087f7c0..41fd57b 100644 --- a/drivers/media/video/hdpvr/hdpvr-video.c +++ b/drivers/media/video/hdpvr/hdpvr-video.c @@ -283,12 +283,13 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev) hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); + dev->status = STATUS_STREAMING; + INIT_WORK(&dev->worker, hdpvr_transmit_buffers); queue_work(dev->workqueue, &dev->worker); v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, "streaming started\n"); - dev->status = STATUS_STREAMING; return 0; } -- 1.7.8.4 -- 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: [PATCH] [media] hdpvr: update picture controls to support firmware versions > 0.15
On Thu, Oct 20, 2011 at 12:35:40PM -0400, Devin Heitmueller wrote: > On Thu, Oct 20, 2011 at 12:23 PM, Janne Grunau wrote: > > > > I've looked at them only at very beginning and if I recall correctly > > they had no visible effects. The values in the linux driver were taken > > from sniffing the windows driver. I remember that I've verified the > > default brightness value since 0x86 looked odd. I'm not sure that I > > verified all controls. I might have assumed all controls shared the > > same value range. > > > > There were previous reports of the picture controls not working at all. > > Thanks for taking the time to chime in. no problem, sorry for ignoring the other mails, I had no time to look at the problem immediately and then forgot about it. > If the controls really were broken all along under Linux, then that's > good to know. That said, I'm not confident the changes Taylor > proposed should really be run against older firmwares. There probably > needs to be a check to have the values in question only applied if > firmware >= 16. If the controls were broken entirely, then we should > probably not advertise them in ENUM_CTRL and S_CTRL should return > -EINVAL if running the old firmware (perhaps put a warning in the > dmesg output saying the controls are unavailable because the user is > not running firmware >= 16). > > My immediate concern is about ensuring we don't cause breakage in > older firmware. For example, we don't know if there are some older > firmware revisions that *did* work with the driver. The controls > might have worked up to firmware revision 10, then been broken from > 11-15, then work again in 16 (with the new hue value needed). The > safe approach is to only use these new settings if they're running > firmware >= 16. I think such scenario is unlikely but I don't know it for sure and I don't want to force anyone to test every firmware version. Ignoring them for firmware version < 16 should be safe since we assume they had no effect. Returning -EINVAL might break API-ignoring applications written with the HD PVR in mind but I think it's a better approach than silently ignoring those controls. Janne -- 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: [PATCH] [media] hdpvr: update picture controls to support firmware versions > 0.15
On Thu, Oct 20, 2011 at 11:30:11AM -0400, Devin Heitmueller wrote: > On Thu, Oct 20, 2011 at 11:24 AM, Taylor Ralph wrote: > > I've attached a patch that correctly sets the max/min/default values > > for the hdpvr picture controls. The reason the current values didn't > > cause a problem until now is because any firmware <= 0.15 didn't > > support them. The latest firmware releases properly support picture > > controls and the values in the patch are derived from the windows > > driver using SniffUSB2.0. > > > > Thanks to Devin Heitmueller for helping me. > > What worries me here is the assertion that the controls didn't work at > all in previous firmware and driver versions. Did you downgrade the > firmware and see that the controls had no effect when using v4l2-ctl? > > Janne, any comment on whether the controls *ever* worked? I've looked at them only at very beginning and if I recall correctly they had no visible effects. The values in the linux driver were taken from sniffing the windows driver. I remember that I've verified the default brightness value since 0x86 looked odd. I'm not sure that I verified all controls. I might have assumed all controls shared the same value range. There were previous reports of the picture controls not working at all. Janne -- 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: [PATCH] DVB-APPS: azap gets -p argument
On Wed, Apr 06, 2011 at 08:39:05AM +0200, Oliver Endriss wrote: > On Monday 04 April 2011 13:05:19 Janne Grunau wrote: > > On Tue, Mar 15, 2011 at 02:50:05PM +0100, Oliver Endriss wrote: > > > The PAT/PMT from the stream does not describe the dvr stream correctly. > > > > > > The dvr device provides *some* PIDs of the transponder, while the > > > PAT/PMT reference *all* programs of the transponder. > > > > True, the PAT references some PMT pids which won't be included. All pids > > from the desired program should be included. A transport stream without > > PAT/PMT is as invalid as the stream with incorrect PAT/PMT/missing pids > > but the second is easier to handle for player software than the first. > > A sane player can handle a TS stream without PAT/PMT. > Iirc mplayer never had any problems. mplayer with default options has only no problems as long as the video codec is mpeg2 and possible mpeg 1 layer 2 audio. Try any H.264 stream and see it fail. That was the reason why I want to change the behaviour with -r in the first place. http://blog.fefe.de/?ts=b58fb6b1 (german content) triggered it. I don't care too much. Can someone please push Christian's original patch adding -p to azap. Janne -- 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: [PATCH] DVB-APPS: azap gets -p argument
On Tue, Mar 15, 2011 at 02:50:05PM +0100, Oliver Endriss wrote: > On Tuesday 15 March 2011 13:32:58 Janne Grunau wrote: > > On Tue, Mar 15, 2011 at 01:23:40PM +0100, Christian Ulrich wrote: > > > Hi, thank you for your feedback. > > > > > > Indeed, I never used -r alone, but only with -p. > > > So with your patch, [acst]zap -r will be the same as -rp. That looks good > > > to me. > > > > well, azap not yet. iirc I implemented -p for azap but it was never > > applied since nobody tested it. see attached patch for [cst]zap > > NAK. I think we had the same discussion when I submitted -p for czap and tzap. > The PAT/PMT from the stream does not describe the dvr stream correctly. > > The dvr device provides *some* PIDs of the transponder, while the > PAT/PMT reference *all* programs of the transponder. True, the PAT references some PMT pids which won't be included. All pids from the desired program should be included. A transport stream without PAT/PMT is as invalid as the stream with incorrect PAT/PMT/missing pids but the second is easier to handle for player software than the first. > For correct results the PAT/PMT has to be re-created. That's not possible from ?zap and I hope you don't suggest we add PMT/PAT rewriting routines to kernel software demuxer. > The separate -p option seems acceptable - as a debug feature. -r is as much a debug feature as -p. the output is invalid too Janne -- 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: [PATCH] DVB-APPS: azap gets -p argument
On Tue, Mar 15, 2011 at 01:23:40PM +0100, Christian Ulrich wrote: > Hi, thank you for your feedback. > > Indeed, I never used -r alone, but only with -p. > So with your patch, [acst]zap -r will be the same as -rp. That looks good to > me. well, azap not yet. iirc I implemented -p for azap but it was never applied since nobody tested it. see attached patch for [cst]zap Janne diff -r 4746d76ae4b6 util/szap/czap.c --- a/util/szap/czap.c Sat Mar 05 18:39:58 2011 +0100 +++ b/util/szap/czap.c Tue Mar 15 13:32:29 2011 +0100 @@ -253,7 +253,7 @@ " -x: exit after tuning\n" " -H: human readable output\n" " -r: set up /dev/dvb/adapterX/dvr0 for TS recording\n" -" -p: add pat and pmt to TS recording (implies -r)\n" +" -p: obsolete (pat and pmt will always be included with -r)\n" ; int main(int argc, char **argv) @@ -279,8 +279,11 @@ case 'd': demux = strtoul(optarg, NULL, 0); break; + case 'p': + printf("'-p' is obsolete. '-r' records PAT/PMT"); case 'r': dvr = 1; + rec_psi = 1; break; case 'l': list_channels = 1; @@ -288,9 +291,6 @@ case 'n': chan_no = strtoul(optarg, NULL, 0); break; - case 'p': - rec_psi = 1; - break; case 'x': exit_after_tuning = 1; break; diff -r 4746d76ae4b6 util/szap/szap.c --- a/util/szap/szap.c Sat Mar 05 18:39:58 2011 +0100 +++ b/util/szap/szap.c Tue Mar 15 13:32:29 2011 +0100 @@ -547,8 +547,11 @@ case 'q': list_channels = 1; break; +case 'p': + printf("'-p' is obsolete. '-r' records PAT/PMT"); case 'r': dvr = 1; + rec_psi = 1; break; case 'n': chan_no = strtoul(optarg, NULL, 0); @@ -559,9 +562,6 @@ case 'f': frontend = strtoul(optarg, NULL, 0); break; -case 'p': - rec_psi = 1; - break; case 'd': demux = strtoul(optarg, NULL, 0); break; diff -r 4746d76ae4b6 util/szap/tzap.c --- a/util/szap/tzap.c Sat Mar 05 18:39:58 2011 +0100 +++ b/util/szap/tzap.c Tue Mar 15 13:32:29 2011 +0100 @@ -485,7 +485,7 @@ " -c file : read channels list from 'file'\n" " -x: exit after tuning\n" " -r: set up /dev/dvb/adapterX/dvr0 for TS recording\n" -" -p: add pat and pmt to TS recording (implies -r)\n" +" -p: obsolete (pat and pmt will always be included with -r)\n" " -s: only print summary\n" " -S: run silently (no output)\n" " -H: human readable output\n" @@ -529,10 +529,10 @@ filename = strdup(optarg); record=1; /* fall through */ + case 'p': + printf("'-p' is obsolete. '-r' records PAT/PMT"); case 'r': dvr = 1; - break; - case 'p': rec_psi = 1; break; case 'x':
Re: [PATCH] DVB-APPS: azap gets -p argument
Hi, On Sat, Mar 05, 2011 at 03:16:51AM +0100, Christian Ulrich wrote: > > I've written a patch against the latest version of azap in the hg > repository during the work of my Archos Gen8 DVB-T / ATSC project. > > Details of patch: > - add -p argument from tzap to azap > - thus ts streaming to dvr0 includes the pat/pmt I would prefer if you simply add PAT/PMT filters to -r. I'll send a patch which does the same for [cst]zap. The reulting files without PAT/PMT are simply invalid. It wasn't a serious problem as long as the used codecs were always mpeg2 video and mpeg1 layer 2 audio but that has changed. Since people use "[acst]zap -r" + cat/dd/... for recording we should make the life of playback software easier by producing valid files. patch looks good otherwise. thanks Janne -- 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: Enable IR on hdpvr
On Mon, Jan 10, 2011 at 01:05:10AM -0500, Jarod Wilson wrote: > > There's a bit more to it than just the one line change. Here's the patch we're > carrying in the Fedora kernels to enable it: > > http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable.patch > > Janne, I've heard many success stories w/the hdpvr IR lately, and almost no > reports > of lockups, so I'm thinking a firmware update may have helped out here, and > thus, > maybe its time we just go ahead and push this patch along upstream? We still > require someone to load lirc_zilog manually, so it seems like a fairly > low-risk > thing to do. Ack, go ahead. I haven't checked IR for a long time. Janne -- 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: Volunteers needed: BKL removal: replace .ioctl by .unlocked_ioctl
Hi, On Sat, Dec 18, 2010 at 12:31:26PM +0100, Hans Verkuil wrote: > > Now that the BKL patch series has been merged in 2.6.37 it is time to work > on replacing .ioctl by .unlocked_ioctl in all v4l drivers. > > I've made an inventory of all drivers that still use .ioctl and I am looking > for volunteers to tackle one or more drivers. > > I have CCed this email to the maintainers of the various drivers (if I know > who it is) in the hope that we can get this conversion done as quickly as > possible. > > If I have added your name to a driver, then please confirm if you are able to > work on it or not. If you can't work on it, but you know someone else, then > let me know as well. ... > Driver list: ... > au0828 (Janne Grunau) I did only two minor cleanups and don't have the hardware. Steven Toth, Devin Heitmueller or Michael Krufky have done major changes to the driver. Added to CC and trimmed Janne -- 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: budget_av and high load
On Fri, Dec 10, 2010 at 01:15:14PM +0100, Schubert Andreas wrote: > Hello everybody on the list, > > I have a KNC-1 DVB-S card running under kernel 2.6.36 and mythtv. I > experience high load values in top like mentioned ages ago in this thread: > http://www.linuxtv.org/pipermail/linux-dvb/2008-June/026509.html. > My card has no CI-Module installed and the high load was CI-Module related, > so I decided to give it a try and completely disable ciintf_init() in the > kernel module which helped a lot. Load decreased by 50-80%. So I decided to > add a module parameter to disable ciintf_init() on demand. Here is the diff: > > 65,69d64 > < > < int budget_init_ci=1; > < module_param_named(init_ci, budget_init_ci, int, 0644); > < MODULE_PARM_DESC(init_ci, "Turn on(1)/off(0) ci initializing > (default:on)."); > < > 1519,1520c1514 > < if (budget_init_ci) > < ciintf_init(budget_av); > --- > > ciintf_init(budget_av); > > I don't know if this is useful at all so please be patient with me. It's useful as bug report. I don't think the module parameter makes sense we should simply fix the bug. I'll look if I can reproduce this with one of my budget_av DVB-C cards. Janne -- 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: [PATCH] Too slow libv4l MJPEG decoding with HD cameras
On Wed, Oct 27, 2010 at 11:08:35AM +0200, Hans de Goede wrote: > Hi, > > On 10/27/2010 01:51 AM, Mitar wrote: > > Hi! > > > > On Sun, Oct 24, 2010 at 6:04 PM, Mitar wrote: > >> Has anybody tried to improve MJPEG support in libv4l? With newer > >> cameras this becomes important. > > > > I have made a patch which makes libv4l uses ffmpeg's avcodec library > > for MJPEG decoding. Performance improvements are unbelievable. > > > > Thanks for the patch! > > > I have been testing with Logitech HD Pro Webcam C910 and > > 2.6.36-rc6-amd64 and Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz. > > Camera supports 2592x1944 at 10 FPS MJPEG stream. > > > > With using original MJPEG code it takes my computer on average 129.614 > > ms to decode the frame what is 0.0257 us per pixel. > > > > With using ffmpeg MJPEG decoding it takes my computer on average > > 43.616 ms to decode the frame what is 0.0087 us per pixel. > > That is a great improvement, but using ffmpeg in libv4l is not an option > for multiple reasons: > > 1) It is GPL licensed not LGPL FFmpeg is mostly LGPL licensed, only a few optimizations and interfaces to GPL libraries. Running FFmpeg's configure without options and especially without --enable-gpl will only use lgpl or compatible licensed code. > 2) It has various other legal issues which means it is not available > in most distro's main repository. FUD, Ubuntu doesn't seem to have a problem with it. > So I'm afraid that using ffmpeg really is out of the question. What > would be interesting is to see how libjpeg performs and then esp. the > turbo-libjpeg version: > http://libjpeg-turbo.virtualgl.org/ > > I would love to see a patch to use that instead of tiny jpeg, leaving > tinyjpeg usage only for the pixart jpeg variant stuff. > > Note that some cameras generate what I call planar jpeg, this means > that they send 3 SOS markers with one component per scan. I don't know > if libjpeg will grok this (I had to patch libv4l's tinyjpeg copy for > this). But first lets see how libjpeg performs, and then we can always > use tinyjpeg to parse the header and depending on the header decide to > use tinyjpeg or libjpeg. > > Sorry about nacking your ffmpeg patch, While the patch is not the cleanest, there shouldn't be a problem of making ffmpeg mjpeg decoding optional. Janne -- 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
[PULL] hdpvr changes for 2.6.37
Hi Mauro, please pull git://git.jannau.net/linux hdpvr-v2.6.37 for following hdpvr changes. thanks, Janne Alan Young (4): V4L/DVB: hdpvr: remove unnecessary sleep in hdpvr_config_call V4L/DVB: hdpvr: remove unecessary sleep in buffer drain loop V4L/DVB: hdpvr: print firmware date V4L/DVB: hdpvr: decrease URB timeout to 90ms James M McLaren (1): V4L/DVB: hdpvr: Add missing URB_NO_TRANSFER_DMA_MAP flag Janne Grunau (4): V4L/DVB: hdpvr: add two known to work firmware versions V4L/DVB: hdpvr: use AC3 as default audio codec for SPDIF V4L/DVB: hdpvr: fix audio input setting for pre AC3 firmwares V4L/DVB: hdpvr: add usb product id 0x4903 drivers/media/video/hdpvr/hdpvr-control.c |5 +--- drivers/media/video/hdpvr/hdpvr-core.c| 36 +++- drivers/media/video/hdpvr/hdpvr-video.c |5 +-- drivers/media/video/hdpvr/hdpvr.h |7 - 4 files changed, 32 insertions(+), 21 deletions(-) -- 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: [GIT PATCHES FOR 2.6.37] Remove v4l2-i2c-drv.h and most of i2c-id.h
On Wed, Sep 15, 2010 at 10:00:26PM +0200, Hans Verkuil wrote: > Mauro, Jean, Janne, > > This patch series finally retires the hackish v4l2-i2c-drv.h. It served > honorably, > but now that the hg repository no longer supports kernels <2.6.26 it is time > to > remove it. > > Note that this patch series builds on the vtx-removal patch series. > > Several patches at the end remove unused i2c-id.h includes and remove bogus > uses > of the I2C_HW_ defines (as found in i2c-id.h). > > After applying this patch series I get the following if I grep for > I2C_HW_ in the kernel sources: > > > drivers/staging/lirc/lirc_i2c.c:if (adap->id == > I2C_HW_B_CX2388x) > drivers/staging/lirc/lirc_i2c.c:if (adap->id == > I2C_HW_B_CX2388x) { > drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR > drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == > I2C_HW_B_HDPVR) { > drivers/staging/lirc/lirc_zilog.c:#ifdef I2C_HW_B_HDPVR > drivers/staging/lirc/lirc_zilog.c: if (ir->c_rx.adapter->id == > I2C_HW_B_HDPVR) > drivers/video/riva/rivafb-i2c.c:chan->adapter.id= > I2C_HW_B_RIVA; > drivers/media/video/ir-kbd-i2c.c: if (ir->c->adapter->id == > I2C_HW_SAA7134 && ir->c->addr == 0x30) > drivers/media/video/ir-kbd-i2c.c: if (adap->id == > I2C_HW_B_CX2388x) { > drivers/media/video/saa7134/saa7134-i2c.c: .id= > I2C_HW_SAA7134, > drivers/media/video/cx88/cx88-i2c.c:core->i2c_adap.id = I2C_HW_B_CX2388x; > drivers/media/video/cx88/cx88-vp3054-i2c.c: vp3054_i2c->adap.id = > I2C_HW_B_CX2388x; > > Jean, I guess the one in rivafb-i2c.c can just be removed, right? > > Janne, the HDPVR checks in lirc no longer work since hdpvr never sets the > adapter ID (nor should it). This lirc code should be checked. I haven't > been following the IR changes, but there must be a better way of doing this. The staging/lirc drivers will only be merged after porting them to ir/rc-core. CC-ed Jarod who will work on lirc_zilog. > > The same is true for the CX2388x and SAA7134 checks. These all relate to the > IR subsystem. > > Once we fixed these remaining users of the i2c-id.h defines, then Jean can > remove that header together with the adapter's 'id' field. > > Regards, > > Hans > > The following changes since commit 991403c594f666a2ed46297c592c60c3b9f4e1e2: > Mauro Carvalho Chehab (1): > V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0) > > are available in the git repository at: > > ssh://linuxtv.org/git/hverkuil/v4l-dvb.git i2c > > Hans Verkuil (49): > saa5246a/saa5249: Remove obsolete teletext drivers > videotext: remove this obsolete API > Documentation: update now that the vtx/videotext API has been removed. > Merge branch 'vtx' into i2c > > The patches above are the same as the vtx patch series posted before. This > patch series requires that vtx is merged first as there is no point to convert > i2c drivers that are going to be removed anyway! > > vp27smpx: remove obsolete v4l2-i2c-drv.h header > wm8739: remove obsolete v4l2-i2c-drv.h header > cs5345: remove obsolete v4l2-i2c-drv.h header > saa717x: remove obsolete v4l2-i2c-drv.h header > saa7115: remove obsolete v4l2-i2c-drv.h header. > tda9840: remove obsolete v4l2-i2c-drv.h header > ov7670: remove obsolete v4l2-i2c-drv.h header > mt9v011: remove obsolete v4l2-i2c-drv.h header > upd64031a: remove obsolete v4l2-i2c-drv.h header > saa6588: remove obsolete v4l2-i2c-drv.h header > saa6752hs: remove obsolete v4l2-i2c-drv.h header > bt819: remove obsolete v4l2-i2c-drv.h header > indycam: remove obsolete v4l2-i2c-drv.h header > m52790: remove obsolete v4l2-i2c-drv.h header > saa7185: remove obsolete v4l2-i2c-drv.h header > msp3400: remove obsolete v4l2-i2c-drv.h header > bt866: remove obsolete v4l2-i2c-drv.h header > tea6415c: remove obsolete v4l2-i2c-drv.h header > tvaudio: remove obsolete v4l2-i2c-drv.h header > wm8775: remove obsolete v4l2-i2c-drv.h header > adv7175: remove obsolete v4l2-i2c-drv.h header > saa7191: remove obsolete v4l2-i2c-drv.h header > bt856: remove obsolete v4l2-i2c-drv.h header > tlv320aic23b: remove obsolete v4l2-i2c-drv.h header > tuner: remove obsolete v4l2-i2c-drv.h header > tda9875: remove obsolete v4l2-i2c-drv.h header > saa7110: remove obsolete v4l2-i2c-drv.h header > tda7432: remove obsolete v4l2-i2c-drv.h header > tea6420: remove obsolete v4l2-i2c-drv.h header > cs53l32a: remove obsolete v4l2-i2c-drv.h header > vpx3220: remove obsolete v4l2-i2c-drv.h header > tvp5150: remove obsolete v4l2-i2c-drv.h header > upd64083: remove obsolete v4l2-i2c-drv.h header > saa7127: remove obsolete v4l2-i2c-drv.h header > cx25840: remove obsolete v4l2-i2c-drv.h header > adv7
Re: PATCH to hdpvr-video.c solves DMA allocation problems on arm processsors.
On Fri, Sep 03, 2010 at 11:19:00AM -0500, James MacLaren wrote: > I needed to patch hdpvr-video.c to capture on my dockstar arm > processor. I see that this patch has been noted on a number of other > usb drivers on this list. > > diff -Naur hdpvr-video.c hdpvr-video-jmm.c > > --- hdpvr-video.c 2010-08-29 09:28:57.126133063 -0500 > +++ hdpvr-video-jmm.c 2010-09-03 08:41:37.854129338 -0500 > @@ -157,6 +157,7 @@ > > mem, dev->bulk_in_size, > hdpvr_read_bulk_callback, buf); > > + buf->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; > // added JMM > buf->status = BUFSTAT_AVAILABLE; > list_add_tail(&buf->buff_list, &dev->free_buff_list); > } > > > Hopefully this patch can be applied. yes, it can and should. Please resend the patch without the '// added JMM' comment and your sign-off Janne -- 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: linux-next: Tree for July 28 (lirc #2)
On Thu, Jul 29, 2010 at 12:27:01AM -0400, Jarod Wilson wrote: > On Wed, Jul 28, 2010 at 6:27 PM, Jarod Wilson wrote: > > On Wed, Jul 28, 2010 at 6:16 PM, Randy Dunlap > > wrote: > >> On 07/28/10 15:04, Janne Grunau wrote: > >>> On Wed, Jul 28, 2010 at 10:24:17AM -0700, Randy Dunlap wrote: > >>>> On Wed, 28 Jul 2010 16:28:55 +1000 Stephen Rothwell wrote: > >>>> > >>>>> Hi all, > >>>>> > >>>>> Changes since 20100727: > >>>> > >>>> > >>>> When USB_SUPPORT is not enabled and MEDIA_SUPPORT is not enabled: > >>>> > >>> > >>> following patch should fix it > >>> > >>> Janne > >> > >> Acked-by: Randy Dunlap > >> > >> Thanks. > > > > Acked-by: Jarod Wilson > > > > Indeed, thanks much, Janne! > > D'oh, I should have looked a bit closer... What if instead of making > all the drivers depend on both LIRC && LIRC_STAGING, LIRC_STAGING just > depends on LIRC? I started adding LIRC to each driver by one. Adding LIRC as LIRC_STAGING dependency is simpler. See updated patch. > And there are a few depends lines with duplicate > USB's in them and LIRC_IMON should have USB added to it (technically, D'oh, I've must have stopped reading after LIRC_STAG... fixed and added additional dependencies Janne >From 45d384de90e3709a986700db14888eff77bb7e1f Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 28 Jul 2010 23:53:35 +0200 Subject: [PATCH 1/2] V4L/DVB: staging/lirc: fix Kconfig dependencies Signed-off-by: Janne Grunau --- drivers/staging/lirc/Kconfig | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lirc/Kconfig b/drivers/staging/lirc/Kconfig index 968c2ade..ab30a09 100644 --- a/drivers/staging/lirc/Kconfig +++ b/drivers/staging/lirc/Kconfig @@ -3,6 +3,7 @@ # menuconfig LIRC_STAGING bool "Linux Infrared Remote Control IR receiver/transmitter drivers" + depends on LIRC help Say Y here, and all supported Linux Infrared Remote Control IR and RF receiver and transmitter drivers will be displayed. When paired @@ -13,13 +14,13 @@ if LIRC_STAGING config LIRC_BT829 tristate "BT829 based hardware" - depends on LIRC_STAGING + depends on LIRC_STAGING && PCI help Driver for the IR interface on BT829-based hardware config LIRC_ENE0100 tristate "ENE KB3924/ENE0100 CIR Port Reciever" - depends on LIRC_STAGING + depends on LIRC_STAGING && PNP help This is a driver for CIR port handled by ENE KB3924 embedded controller found on some notebooks. @@ -27,7 +28,7 @@ config LIRC_ENE0100 config LIRC_I2C tristate "I2C Based IR Receivers" - depends on LIRC_STAGING + depends on LIRC_STAGING && I2C help Driver for I2C-based IR receivers, such as those commonly found onboard Hauppauge PVR-150/250/350 video capture cards @@ -40,7 +41,7 @@ config LIRC_IGORPLUGUSB config LIRC_IMON tristate "Legacy SoundGraph iMON Receiver and Display" - depends on LIRC_STAGING + depends on LIRC_STAGING && USB help Driver for the original SoundGraph iMON IR Receiver and Display @@ -48,7 +49,7 @@ config LIRC_IMON config LIRC_IT87 tristate "ITE IT87XX CIR Port Receiver" - depends on LIRC_STAGING + depends on LIRC_STAGING && PNP help Driver for the ITE IT87xx IR Receiver @@ -60,13 +61,13 @@ config LIRC_ITE8709 config LIRC_PARALLEL tristate "Homebrew Parallel Port Receiver" - depends on LIRC_STAGING && !SMP + depends on LIRC_STAGING && PARPORT && !SMP help Driver for Homebrew Parallel Port Receivers config LIRC_SASEM tristate "Sasem USB IR Remote" - depends on LIRC_STAGING + depends on LIRC_STAGING && USB help Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module @@ -91,7 +92,7 @@ config LIRC_SIR config LIRC_STREAMZAP tristate "Streamzap PC Receiver" - depends on LIRC_STAGING + depends on LIRC_STAGING && USB help Driver for the Streamzap PC Receiver @@ -103,7 +104,7 @@ config LIRC_TTUSBIR config LIRC_ZILOG tristate "Zilog/Hauppauge IR Transmitter" - depends on LIRC_STAGING + depends on LIRC_STAGING && I2C help Driver for the Zilog/Hauppauge IR Transmitter, found on PVR-150/500, HVR-1200/1250/1700/1800, HD-PVR and other cards -- 1.7.2 -- 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: linux-next: Tree for July 28 (lirc #2)
On Wed, Jul 28, 2010 at 10:24:17AM -0700, Randy Dunlap wrote: > On Wed, 28 Jul 2010 16:28:55 +1000 Stephen Rothwell wrote: > > > Hi all, > > > > Changes since 20100727: > > > When USB_SUPPORT is not enabled and MEDIA_SUPPORT is not enabled: > following patch should fix it Janne >From 7d1cc98c19a6c27dd74a28f04dfe4248a0b335ce Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 28 Jul 2010 23:53:35 +0200 Subject: [PATCH 1/2] staging/lirc: fix Kconfig dependencies Signed-off-by: Janne Grunau --- drivers/staging/lirc/Kconfig | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/lirc/Kconfig b/drivers/staging/lirc/Kconfig index 968c2ade..3981a4a 100644 --- a/drivers/staging/lirc/Kconfig +++ b/drivers/staging/lirc/Kconfig @@ -13,13 +13,13 @@ if LIRC_STAGING config LIRC_BT829 tristate "BT829 based hardware" - depends on LIRC_STAGING + depends on LIRC && LIRC_STAGING help Driver for the IR interface on BT829-based hardware config LIRC_ENE0100 tristate "ENE KB3924/ENE0100 CIR Port Reciever" - depends on LIRC_STAGING + depends on LIRC && LIRC_STAGING help This is a driver for CIR port handled by ENE KB3924 embedded controller found on some notebooks. @@ -27,20 +27,20 @@ config LIRC_ENE0100 config LIRC_I2C tristate "I2C Based IR Receivers" - depends on LIRC_STAGING + depends on I2C && LIRC && LIRC_STAGING help Driver for I2C-based IR receivers, such as those commonly found onboard Hauppauge PVR-150/250/350 video capture cards config LIRC_IGORPLUGUSB tristate "Igor Cesko's USB IR Receiver" - depends on LIRC_STAGING && USB + depends on USB && LIRC && LIRC_STAGING && USB help Driver for Igor Cesko's USB IR Receiver config LIRC_IMON tristate "Legacy SoundGraph iMON Receiver and Display" - depends on LIRC_STAGING + depends on LIRC && LIRC_STAGING help Driver for the original SoundGraph iMON IR Receiver and Display @@ -48,31 +48,31 @@ config LIRC_IMON config LIRC_IT87 tristate "ITE IT87XX CIR Port Receiver" - depends on LIRC_STAGING + depends on LIRC && LIRC_STAGING help Driver for the ITE IT87xx IR Receiver config LIRC_ITE8709 tristate "ITE8709 CIR Port Receiver" - depends on LIRC_STAGING && PNP + depends on LIRC && LIRC_STAGING && PNP help Driver for the ITE8709 IR Receiver config LIRC_PARALLEL tristate "Homebrew Parallel Port Receiver" - depends on LIRC_STAGING && !SMP + depends on LIRC && LIRC_STAGING && !SMP help Driver for Homebrew Parallel Port Receivers config LIRC_SASEM tristate "Sasem USB IR Remote" - depends on LIRC_STAGING + depends on USB && LIRC && LIRC_STAGING help Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module config LIRC_SERIAL tristate "Homebrew Serial Port Receiver" - depends on LIRC_STAGING + depends on LIRC && LIRC_STAGING help Driver for Homebrew Serial Port Receivers @@ -85,25 +85,25 @@ config LIRC_SERIAL_TRANSMITTER config LIRC_SIR tristate "Built-in SIR IrDA port" - depends on LIRC_STAGING + depends on LIRC && LIRC_STAGING help Driver for the SIR IrDA port config LIRC_STREAMZAP tristate "Streamzap PC Receiver" - depends on LIRC_STAGING + depends on USB && LIRC && LIRC_STAGING help Driver for the Streamzap PC Receiver config LIRC_TTUSBIR tristate "Technotrend USB IR Receiver" - depends on LIRC_STAGING && USB + depends on USB && LIRC && LIRC_STAGING && USB help Driver for the Technotrend USB IR Receiver config LIRC_ZILOG tristate "Zilog/Hauppauge IR Transmitter" - depends on LIRC_STAGING + depends on I2C && LIRC && LIRC_STAGING help Driver for the Zilog/Hauppauge IR Transmitter, found on PVR-150/500, HVR-1200/1250/1700/1800, HD-PVR and other cards -- 1.7.2 -- 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: Module option adapter_nr
Hi, On Mon, Mar 29, 2010 at 08:41:08PM +0200, Tomáš Skočdopole wrote: > > I am using the Archlinux distribution and i have four Skystar HD2 > cards and one Airstar DVB card in my system. > I want to specify adapter numbers for this cards. Order of DVB-S2 > cards is not important. > > So I add this lines into /etc/modprobe.d/modprobe.conf > options b2c2-flexcop adapter_nr=0 > options mantis-core adapter_nr=11,12,13,14 > > But with no results. DVB core supports by default only 8 adapters. have you tried options mantis-core adapter_nr=4,5,6,7 ? The code in mantis-dvb.c in Linus' repo looks correct. Janne -- 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
[PATCH 0 of 7] Implement -p in all zap programs
Hi, this patch series implements -p (record PAT and PMT) for [act]zap and a couple of related cleanups. Janne b/util/szap/util.c | 126 + b/util/szap/util.h | 24 ++ util/szap/Makefile |2 util/szap/azap.c | 72 -- util/szap/czap.c | 91 ++ util/szap/szap.c | 97 ++-- util/szap/tzap.c | 73 +- 7 files changed, 291 insertions(+), 194 deletions(-) -- 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
[PATCH 7 of 7] azap: implement record program and service information with -p
util/szap/azap.c | 45 ++--- 1 files changed, 38 insertions(+), 7 deletions(-) # HG changeset patch # User Janne Grunau # Date 1265824500 -3600 # Node ID eb8e295536aa230a2b5f1fbab86ab4b99527 # Parent c38dce87f96ab87a59c3565da978d3564ff438c3 azap: implement record program and service information with -p diff -r c38dce87f96a -r eb8e295536aa util/szap/azap.c --- a/util/szap/azap.c Wed Feb 10 18:54:38 2010 +0100 +++ b/util/szap/azap.c Wed Feb 10 18:55:00 2010 +0100 @@ -171,7 +171,8 @@ int parse(const char *fname, const char *channel, - struct dvb_frontend_parameters *frontend, int *vpid, int *apid) + struct dvb_frontend_parameters *frontend, int *vpid, int *apid, + int *pno) { int fd; int err; @@ -202,7 +203,10 @@ return -5; if ((err = try_parse_int(fd, apid, "Audio PID"))) - return -6; + return -6; + + if ((err = try_parse_int(fd, pno, "MPEG Program Number"))) + return -7; close(fd); @@ -275,12 +279,12 @@ char *homedir = getenv ("HOME"); char *confname = NULL; char *channel = NULL; - int adapter = 0, frontend = 0, demux = 0, dvr = 0; - int vpid, apid; - int frontend_fd, audio_fd, video_fd; + int adapter = 0, frontend = 0, demux = 0, dvr = 0, rec_psi = 0; + int vpid, apid, pno, pmtpid = 0; + int frontend_fd, audio_fd, video_fd, pat_fd, pmt_fd; int opt; - while ((opt = getopt(argc, argv, "hrn:a:f:d:c:")) != -1) { + while ((opt = getopt(argc, argv, "hrpn:a:f:d:c:")) != -1) { switch (opt) { case 'a': adapter = strtoul(optarg, NULL, 0); @@ -294,6 +298,9 @@ case 'r': dvr = 1; break; + case 'p': + rec_psi = 1; + break; case 'c': confname = optarg; break; @@ -333,7 +340,7 @@ memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters)); - if (parse (confname, channel, &frontend_param, &vpid, &apid)) + if (parse (confname, channel, &frontend_param, &vpid, &apid, &pno)) return -1; if ((frontend_fd = open(FRONTEND_DEV, O_RDWR)) < 0) { @@ -344,6 +351,28 @@ if (setup_frontend (frontend_fd, &frontend_param) < 0) return -1; + if (rec_psi) { + pmtpid = get_pmt_pid(DEMUX_DEV, pno); + if (pmtpid <= 0) { + fprintf(stderr,"couldn't find pmt-pid for program number %04x\n", pno); + return -1; + } + + if ((pat_fd = open(DEMUX_DEV, O_RDWR)) < 0) { + perror("opening pat demux failed"); + return -1; + } + if (set_pesfilter(pat_fd, 0, DMX_PES_OTHER, dvr) < 0) + return -1; + + if ((pmt_fd = open(DEMUX_DEV, O_RDWR)) < 0) { + perror("opening pmt demux failed"); + return -1; + } + if (set_pesfilter(pmt_fd, pmtpid, DMX_PES_OTHER, dvr) < 0) + return -1; + } + if ((video_fd = open(DEMUX_DEV, O_RDWR)) < 0) { PERROR("failed opening '%s'", DEMUX_DEV); return -1; @@ -363,6 +392,8 @@ check_frontend (frontend_fd); + close (pat_fd); + close (pmt_fd); close (audio_fd); close (video_fd); close (frontend_fd);
[PATCH 6 of 7] tzap: implement recording program and service information with -p
util/szap/tzap.c | 46 -- 1 files changed, 40 insertions(+), 6 deletions(-) # HG changeset patch # User Janne Grunau # Date 1265824478 -3600 # Node ID c38dce87f96ab87a59c3565da978d3564ff438c3 # Parent c46ead95be23c07b1c95329c713b4dfc649fd67d tzap: implement recording program and service information with -p diff -r c46ead95be23 -r c38dce87f96a util/szap/tzap.c --- a/util/szap/tzap.c Wed Feb 10 17:47:08 2010 +0100 +++ b/util/szap/tzap.c Wed Feb 10 18:54:38 2010 +0100 @@ -271,7 +271,8 @@ int parse(const char *fname, const char *channel, - struct dvb_frontend_parameters *frontend, int *vpid, int *apid) + struct dvb_frontend_parameters *frontend, int *vpid, int *apid, + int *sid) { int fd; int err; @@ -345,7 +346,11 @@ if ((err = try_parse_int(fd, apid, "Audio PID"))) return -13; - + + if ((err = try_parse_int(fd, sid, "Service ID"))) + return -14; + + close(fd); return 0; @@ -480,6 +485,7 @@ " -c file : read channels list from 'file'\n" " -x: exit after tuning\n" " -r: set up /dev/dvb/adapterX/dvr0 for TS recording\n" +" -p: add pat and pmt to TS recording (implies -r)\n" " -s: only print summary\n" " -S: run silently (no output)\n" " -H: human readable output\n" @@ -496,15 +502,16 @@ char *confname = NULL; char *channel = NULL; int adapter = 0, frontend = 0, demux = 0, dvr = 0; - int vpid, apid; + int vpid, apid, sid, pmtpid = 0; + int pat_fd, pmt_fd; int frontend_fd, audio_fd = 0, video_fd = 0, dvr_fd, file_fd; int opt; int record = 0; int frontend_only = 0; char *filename = NULL; - int human_readable = 0; + int human_readable = 0, rec_psi = 0; - while ((opt = getopt(argc, argv, "H?hrxRsFSn:a:f:d:c:t:o:")) != -1) { + while ((opt = getopt(argc, argv, "H?hrpxRsFSn:a:f:d:c:t:o:")) != -1) { switch (opt) { case 'a': adapter = strtoul(optarg, NULL, 0); @@ -525,6 +532,9 @@ case 'r': dvr = 1; break; + case 'p': + rec_psi = 1; + break; case 'x': exit_after_tuning = 1; break; @@ -587,7 +597,7 @@ memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters)); - if (parse (confname, channel, &frontend_param, &vpid, &apid)) + if (parse (confname, channel, &frontend_param, &vpid, &apid, &sid)) return -1; if ((frontend_fd = open(FRONTEND_DEV, O_RDWR)) < 0) { @@ -601,6 +611,28 @@ if (frontend_only) goto just_the_frontend_dude; + if (rec_psi) { + pmtpid = get_pmt_pid(DEMUX_DEV, sid); + if (pmtpid <= 0) { + fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid); + return -1; + } + + if ((pat_fd = open(DEMUX_DEV, O_RDWR)) < 0) { + perror("opening pat demux failed"); + return -1; + } + if (set_pesfilter(pat_fd, 0, DMX_PES_OTHER, dvr) < 0) + return -1; + + if ((pmt_fd = open(DEMUX_DEV, O_RDWR)) < 0) { + perror("opening pmt demux failed"); + return -1; + } + if (set_pesfilter(pmt_fd, pmtpid, DMX_PES_OTHER, dvr) < 0) + return -1; + } + if ((video_fd = open(DEMUX_DEV, O_RDWR)) < 0) { PERROR("failed opening '%s'", DEMUX_DEV); return -1; @@ -666,6 +698,8 @@ check_frontend (frontend_fd, human_readable); } + close (pat_fd); + close (pmt_fd); close (audio_fd); close (video_fd); close (frontend_fd);
[PATCH 5 of 7] czap: implement -p option to record PAT & PMT (PSI)
util/szap/czap.c | 48 ++-- 1 files changed, 38 insertions(+), 10 deletions(-) # HG changeset patch # User Janne Grunau # Date 1265820428 -3600 # Node ID c46ead95be23c07b1c95329c713b4dfc649fd67d # Parent 0163e837905411bb9932bb65fecde5735e5bd7e9 czap: implement -p option to record PAT & PMT (PSI) diff -r 0163e8379054 -r c46ead95be23 util/szap/czap.c --- a/util/szap/czap.c Wed Feb 10 18:43:05 2010 +0100 +++ b/util/szap/czap.c Wed Feb 10 17:47:08 2010 +0100 @@ -120,7 +120,7 @@ int parse(const char *fname, int list_channels, int chan_no, const char *channel, - struct dvb_frontend_parameters *frontend, int *vpid, int *apid) + struct dvb_frontend_parameters *frontend, int *vpid, int *apid, int *sid) { FILE *f; char *chan; @@ -143,10 +143,10 @@ } printf("%3d %s", chan_no, chan); - if ((sscanf(chan, "%m[^:]:%d:%m[^:]:%d:%m[^:]:%m[^:]:%d:%d\n", + if ((sscanf(chan, "%m[^:]:%d:%m[^:]:%d:%m[^:]:%m[^:]:%d:%d:%d\n", &name, &frontend->frequency, &inv, &frontend->u.qam.symbol_rate, -&fec, &mod, vpid, apid) != 8) +&fec, &mod, vpid, apid, sid) != 9) || !name || !inv || !fec | !mod) { ERROR("cannot parse service data"); return -3; @@ -167,10 +167,10 @@ ERROR("modulation field syntax '%s'", mod); return -6; } - printf("%3d %s: f %d, s %d, i %d, fec %d, qam %d, v %#x, a %#x\n", + printf("%3d %s: f %d, s %d, i %d, fec %d, qam %d, v %#x, a %#x, s %#x \n", chan_no, name, frontend->frequency, frontend->u.qam.symbol_rate, frontend->inversion, frontend->u.qam.fec_inner, - frontend->u.qam.modulation, *vpid, *apid); + frontend->u.qam.modulation, *vpid, *apid, *sid); free(name); free(inv); free(fec); @@ -253,6 +253,7 @@ " -x: exit after tuning\n" " -H: human readable output\n" " -r: set up /dev/dvb/adapterX/dvr0 for TS recording\n" +" -p: add pat and pmt to TS recording (implies -r)\n" ; int main(int argc, char **argv) @@ -262,12 +263,12 @@ char *confname = NULL; char *channel = NULL; int adapter = 0, frontend = 0, demux = 0, dvr = 0; - int vpid, apid; - int frontend_fd, video_fd, audio_fd; + int vpid, apid, sid, pmtpid = 0; + int frontend_fd, video_fd, audio_fd, pat_fd, pmt_fd; int opt, list_channels = 0, chan_no = 0; - int human_readable = 0; + int human_readable = 0, rec_psi = 0; - while ((opt = getopt(argc, argv, "Hln:hrn:a:f:d:c:x")) != -1) { + while ((opt = getopt(argc, argv, "Hln:hrn:a:f:d:c:x:p")) != -1) { switch (opt) { case 'a': adapter = strtoul(optarg, NULL, 0); @@ -287,6 +288,9 @@ case 'n': chan_no = strtoul(optarg, NULL, 0); break; + case 'p': + rec_psi = 1; + break; case 'x': exit_after_tuning = 1; break; @@ -339,7 +343,7 @@ memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters)); - if (parse(confname, list_channels, chan_no, channel, &frontend_param, &vpid, &apid)) + if (parse(confname, list_channels, chan_no, channel, &frontend_param, &vpid, &apid, &sid)) return -1; if (list_channels) return 0; @@ -352,6 +356,28 @@ if (setup_frontend(frontend_fd, &frontend_param) < 0) return -1; + if (rec_psi) { + pmtpid = get_pmt_pid(DEMUX_DEV, sid); + if (pmtpid <= 0) { + fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid); + return -1; + } + + if ((pat_fd = open(DEMUX_DEV, O_RDWR)) < 0) { + perror("opening pat demux failed"); + return -1; + } + if (set_pesfilter(pat_fd, 0, DMX_PES_OTHER, dvr) < 0) + return -1; + + if ((pmt_fd = open(DEMUX_DEV, O_RDWR)) < 0) { + perror("opening pmt demux failed"); + return -1; + } + if (set_pesfilter(pmt_fd, pmtpid, DMX_PES_OTHER, dvr) < 0) + return -1; + } + if ((video_fd = open(DEMUX_DEV, O_RDWR)) < 0) { PERROR("failed opening '%s'", DEMUX_DEV); return -1; @@ -370,6 +396,8 @@ check_frontend (frontend_fd, human_readable); + close (pat_fd); + close (pmt_fd); close (audio_fd); close (video_fd); close (frontend_fd);
[PATCH 4 of 7] czap: use %m modifier in sscanf instead of %a
util/szap/czap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) # HG changeset patch # User Janne Grunau # Date 1265823785 -3600 # Node ID 0163e837905411bb9932bb65fecde5735e5bd7e9 # Parent c1e4c34da4fd395755d98dbbdd7af2950d723a9d czap: use %m modifier in sscanf instead of %a %a is a old glibc extension and conflicts with the floating point modifier %a in C99 diff -r c1e4c34da4fd -r 0163e8379054 util/szap/czap.c --- a/util/szap/czap.c Wed Feb 10 18:42:59 2010 +0100 +++ b/util/szap/czap.c Wed Feb 10 18:43:05 2010 +0100 @@ -143,7 +143,7 @@ } printf("%3d %s", chan_no, chan); - if ((sscanf(chan, "%a[^:]:%d:%a[^:]:%d:%a[^:]:%a[^:]:%d:%d\n", + if ((sscanf(chan, "%m[^:]:%d:%m[^:]:%d:%m[^:]:%m[^:]:%d:%d\n", &name, &frontend->frequency, &inv, &frontend->u.qam.symbol_rate, &fec, &mod, vpid, apid) != 8)
[PATCH 3 of 7] czap: reformat and extend usage string
util/szap/czap.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) # HG changeset patch # User Janne Grunau # Date 1265823779 -3600 # Node ID c1e4c34da4fd395755d98dbbdd7af2950d723a9d # Parent d79f9e2901a05fbee905998294d9cb1ae46a422d czap: reformat and extend usage string diff -r d79f9e2901a0 -r c1e4c34da4fd util/szap/czap.c --- a/util/szap/czap.c Wed Feb 10 17:45:30 2010 +0100 +++ b/util/szap/czap.c Wed Feb 10 18:42:59 2010 +0100 @@ -241,9 +241,19 @@ } -static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] [-c conf_file] [ -H ] {| -n channel_num} [-x]\n" - " or: %s [-c conf_file] -l\n\n"; - +static const char *usage = +"\nusage: %s [options] -l\n" +" list known channels\n" +" %s [options] {-n channel-number|channel_name}\n" +" zap to channel via number or full name (case insensitive)\n" +" -a number : use given adapter (default 0)\n" +" -f number : use given frontend (default 0)\n" +" -d number : use given demux (default 0)\n" +" -c file : read channels list from 'file'\n" +" -x: exit after tuning\n" +" -H: human readable output\n" +" -r: set up /dev/dvb/adapterX/dvr0 for TS recording\n" +; int main(int argc, char **argv) {
[PATCH 2 of 7] szap: move get_pmt_pid() to utils.c
util/szap/szap.c | 60 --- util/szap/util.c | 61 util/szap/util.h | 2 + 3 files changed, 63 insertions(+), 60 deletions(-) # HG changeset patch # User Janne Grunau # Date 1265820330 -3600 # Node ID d79f9e2901a05fbee905998294d9cb1ae46a422d # Parent 28369a87b6c7db2a5704be5dda8ed60a4cbf3397 szap: move get_pmt_pid() to utils.c to be reused by the other zap implemetations diff -r 28369a87b6c7 -r d79f9e2901a0 util/szap/szap.c --- a/util/szap/szap.c Wed Feb 10 17:40:41 2010 +0100 +++ b/util/szap/szap.c Wed Feb 10 17:45:30 2010 +0100 @@ -93,66 +93,6 @@ " -p: add pat and pmt to TS recording (implies -r)\n" " or -n numbers for zapping\n"; -int get_pmt_pid(char *dmxdev, int sid) -{ - int patfd, count; - int pmt_pid = 0; - int patread = 0; - int section_length; - unsigned char buft[4096]; - unsigned char *buf = buft; - struct dmx_sct_filter_params f; - - memset(&f, 0, sizeof(f)); - f.pid = 0; - f.filter.filter[0] = 0x00; - f.filter.mask[0] = 0xff; - f.timeout = 0; - f.flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC; - - if ((patfd = open(dmxdev, O_RDWR)) < 0) { - perror("openening pat demux failed"); - return -1; - } - - if (ioctl(patfd, DMX_SET_FILTER, &f) == -1) { - perror("ioctl DMX_SET_FILTER failed"); - close(patfd); - return -1; - } - - while (!patread){ - if (((count = read(patfd, buf, sizeof(buft))) < 0) && errno == EOVERFLOW) - count = read(patfd, buf, sizeof(buft)); - if (count < 0) { - perror("read_sections: read error"); - close(patfd); - return -1; - } - - section_length = ((buf[1] & 0x0f) << 8) | buf[2]; - if (count != section_length + 3) - continue; - - buf += 8; - section_length -= 8; - - patread = 1; /* assumes one section contains the whole pat */ - while (section_length > 0) { - int service_id = (buf[0] << 8) | buf[1]; - if (service_id == sid) { -pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3]; -section_length = 0; - } - buf += 4; - section_length -= 4; - } - } - - close(patfd); - return pmt_pid; -} - struct diseqc_cmd { struct dvb_diseqc_master_cmd cmd; uint32_t wait; diff -r 28369a87b6c7 -r d79f9e2901a0 util/szap/util.c --- a/util/szap/util.c Wed Feb 10 17:40:41 2010 +0100 +++ b/util/szap/util.c Wed Feb 10 17:45:30 2010 +0100 @@ -63,3 +63,64 @@ return 0; } + + +int get_pmt_pid(char *dmxdev, int sid) +{ +int patfd, count; +int pmt_pid = 0; +int patread = 0; +int section_length; +unsigned char buft[4096]; +unsigned char *buf = buft; +struct dmx_sct_filter_params f; + +memset(&f, 0, sizeof(f)); +f.pid = 0; +f.filter.filter[0] = 0x00; +f.filter.mask[0] = 0xff; +f.timeout = 0; +f.flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC; + +if ((patfd = open(dmxdev, O_RDWR)) < 0) { + perror("openening pat demux failed"); + return -1; +} + +if (ioctl(patfd, DMX_SET_FILTER, &f) == -1) { + perror("ioctl DMX_SET_FILTER failed"); + close(patfd); + return -1; +} + +while (!patread){ + if (((count = read(patfd, buf, sizeof(buft))) < 0) && errno == EOVERFLOW) + count = read(patfd, buf, sizeof(buft)); + if (count < 0) { + perror("read_sections: read error"); + close(patfd); + return -1; + } + + section_length = ((buf[1] & 0x0f) << 8) | buf[2]; + if (count != section_length + 3) + continue; + + buf += 8; + section_length -= 8; + + patread = 1; /* assumes one section contains the whole pat */ + while (section_length > 0) { + int service_id = (buf[0] << 8) | buf[1]; + if (service_id == sid) { + pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3]; + section_length = 0; + } + buf += 4; + section_length -= 4; + } +} + +close(patfd); +return pmt_pid; +} diff -r 28369a87b6c7 -r d79f9e2901a0 util/szap/util.h --- a/util/szap/util.h Wed Feb 10 17:40:41 2010 +0100 +++ b/util/szap/util.h Wed Feb 10 17:45:30 2010 +0100 @@ -20,3 +20,5 @@ */ int set_pesfilter(int dmxfd, int pid, int pes_type, int dvr); + +int get_pmt_pid(char *dmxdev, int sid); \ No newline at end of file
[PATCH 1 of 7] szap: move duplicate function set_pesfilter|demux to a common object
util/szap/Makefile | 2 +- util/szap/azap.c | 27 + util/szap/czap.c | 27 + util/szap/szap.c | 37 -- util/szap/tzap.c | 27 + util/szap/util.c | 65 ++ util/szap/util.h | 22 ++ 7 files changed, 99 insertions(+), 108 deletions(-) # HG changeset patch # User Janne Grunau # Date 1265820041 -3600 # Node ID 28369a87b6c7db2a5704be5dda8ed60a4cbf3397 # Parent 80e9da1c00934139c817b33430bf44836f51406e szap: move duplicate function set_pesfilter|demux to a common object diff -r 80e9da1c0093 -r 28369a87b6c7 util/szap/Makefile --- a/util/szap/Makefile Sun Feb 07 17:01:50 2010 +0100 +++ b/util/szap/Makefile Wed Feb 10 17:40:41 2010 +0100 @@ -1,6 +1,6 @@ # Makefile for linuxtv.org dvb-apps/util/szap -objects = lnb.o +objects = lnb.o util.o binaries = azap \ czap \ diff -r 80e9da1c0093 -r 28369a87b6c7 util/szap/azap.c --- a/util/szap/azap.c Sun Feb 07 17:01:50 2010 +0100 +++ b/util/szap/azap.c Wed Feb 10 17:40:41 2010 +0100 @@ -13,6 +13,8 @@ #include #include +#include "util.h" + static char FRONTEND_DEV [80]; static char DEMUX_DEV [80]; @@ -209,31 +211,6 @@ static -int set_pesfilter (int fd, int pid, dmx_pes_type_t type, int dvr) -{ -struct dmx_pes_filter_params pesfilter; - -if (pid <= 0 || pid >= 0x1fff) -return 0; - -pesfilter.pid = pid; -pesfilter.input = DMX_IN_FRONTEND; -pesfilter.output = dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER; -pesfilter.pes_type = type; -pesfilter.flags = DMX_IMMEDIATE_START; - -if (ioctl(fd, DMX_SET_PES_FILTER, &pesfilter) < 0) { -PERROR ("ioctl(DMX_SET_PES_FILTER) for %s PID failed", -type == DMX_PES_AUDIO ? "Audio" : -type == DMX_PES_VIDEO ? "Video" : "??"); -return -1; -} - -return 0; -} - - -static int setup_frontend (int fe_fd, struct dvb_frontend_parameters *frontend) { struct dvb_frontend_info fe_info; diff -r 80e9da1c0093 -r 28369a87b6c7 util/szap/czap.c --- a/util/szap/czap.c Sun Feb 07 17:01:50 2010 +0100 +++ b/util/szap/czap.c Wed Feb 10 17:40:41 2010 +0100 @@ -13,6 +13,8 @@ #include #include +#include "util.h" + static char FRONTEND_DEV [80]; static char DEMUX_DEV [80]; @@ -178,31 +180,6 @@ } - -static -int set_pesfilter (int fd, int pid, dmx_pes_type_t type, int dvr) -{ - struct dmx_pes_filter_params pesfilter; - - if (pid <= 0 || pid >= 0x1fff) - return 0; - - pesfilter.pid = pid; - pesfilter.input = DMX_IN_FRONTEND; - pesfilter.output = dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER; - pesfilter.pes_type = type; - pesfilter.flags = DMX_IMMEDIATE_START; - - if (ioctl(fd, DMX_SET_PES_FILTER, &pesfilter) < 0) { - PERROR ("ioctl(DMX_SET_PES_FILTER) for %s PID failed", - type == DMX_PES_AUDIO ? "Audio" : - type == DMX_PES_VIDEO ? "Video" : "??"); - return -1; - } - - return 0; -} - static int setup_frontend(int fe_fd, struct dvb_frontend_parameters *frontend) { diff -r 80e9da1c0093 -r 28369a87b6c7 util/szap/szap.c --- a/util/szap/szap.c Sun Feb 07 17:01:50 2010 +0100 +++ b/util/szap/szap.c Wed Feb 10 17:40:41 2010 +0100 @@ -48,6 +48,7 @@ #include #include #include "lnb.h" +#include "util.h" #ifndef TRUE #define TRUE (1==1) @@ -92,34 +93,6 @@ " -p: add pat and pmt to TS recording (implies -r)\n" " or -n numbers for zapping\n"; -static int set_demux(int dmxfd, int pid, int pes_type, int dvr) -{ - struct dmx_pes_filter_params pesfilter; - - if (pid < 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */ - return TRUE; - - if (dvr) { - int buffersize = 64 * 1024; - if (ioctl(dmxfd, DMX_SET_BUFFER_SIZE, buffersize) == -1) -perror("DMX_SET_BUFFER_SIZE failed"); - } - - pesfilter.pid = pid; - pesfilter.input = DMX_IN_FRONTEND; - pesfilter.output = dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER; - pesfilter.pes_type = pes_type; - pesfilter.flags = DMX_IMMEDIATE_START; - - if (ioctl(dmxfd, DMX_SET_PES_FILTER, &pesfilter) == -1) { - fprintf(stderr, "DMX_SET_PES_FILTER failed " - "(PID = 0x%04x): %d %m\n", pid, errno); - return FALSE; - } - - return TRUE; -} - int get_pmt_pid(char *dmxdev, int sid) { int patfd, count; @@ -390,10 +363,10 @@ if (diseqc(fefd, sat_no, pol, hiband)) if (do_tune(fefd, ifreq, sr)) - if (set_demux(dmxfdv, vpid, DMX_PES_VIDEO, dvr)) + if (set_pesfilter(dmxfdv, vpid, DMX_PES_VIDEO, dvr)) if (audiofd >= 0) (void)ioctl(audiofd, AUDIO_SET_BYPASS_MODE, bypass); - if (set_demux(dmxfda, apid, DMX_PES_AUD
Re: [GIT PULL] V4L HD PVR updates
On Wed, Feb 03, 2010 at 01:37:19PM -0200, Mauro Carvalho Chehab wrote: > Janne Grunau wrote: > > Hi Mauro, > > > > please pull from git://git.jannau.net/linux hdpvr > > Didn't work: > > $ git pull git://git.jannau.net/linux > fatal: The remote end hung up unexpectedly sorry, missing git-daemon-export-ok. fixed, please try again. Janne -- 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
[GIT PULL] V4L HD PVR updates
Hi Mauro, please pull from git://git.jannau.net/linux hdpvr for following patches: Janne Grunau (1): V4L/DVB: hdpvr: add new USB product id Márton Németh (2): hdpvr-video: cleanup signedness hdpvr-core: make module parameters local drivers/media/video/hdpvr/hdpvr-core.c |5 +++-- drivers/media/video/hdpvr/hdpvr-video.c |3 ++- drivers/media/video/hdpvr/hdpvr.h |1 + 3 files changed, 6 insertions(+), 3 deletions(-) -- 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: [PATCH] hdpvr-video: cleanup signedness
On Sat, Jan 23, 2010 at 02:44:34PM +0100, Németh Márton wrote: > From: Márton Németh > > The fifth parameter of usb_bulk_msg() is a pointer to signed > (see ) so also call this function with pointer to signed. > > This will remove the following sparse warning (see "make C=1"): > * warning: incorrect type in argument 5 (different signedness) >expected int *actual_length >got unsigned int * > > Signed-off-by: Márton Németh Thanks, I'll send a git pull request including the second patch for Mauro later today. cheers Janne -- 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: [PATCH 3/8] drivers/media/video/hdpvr: introduce missing kfree
Hej, On Tue, Feb 02, 2010 at 01:19:15PM -0200, Mauro Carvalho Chehab wrote: > > Janne Grunau wrote: > > On Fri, Sep 11, 2009 at 06:21:35PM +0200, Julia Lawall wrote: > >> Error handling code following a kzalloc should free the allocated data. > > > > Thanks for the report. I'll commit a different patch which adds the buffer > > to the buffer list as soon it is allocated. The hdpvr_free_buffers() in the > > error handling code will clean it up then. See below: > > Any news about this subject? The current upstream code still misses the > change bellow it was fixed differently in cd0e280f kind regards, Janne -- 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: [PATCH 3/8] drivers/media/video/hdpvr: introduce missing kfree
On Fri, Sep 11, 2009 at 06:21:35PM +0200, Julia Lawall wrote: > > Error handling code following a kzalloc should free the allocated data. Thanks for the report. I'll commit a different patch which adds the buffer to the buffer list as soon it is allocated. The hdpvr_free_buffers() in the error handling code will clean it up then. See below: diff --git a/linux/drivers/media/video/hdpvr/hdpvr-video.c b/linux/drivers/media/video/hdpvr/hdpvr-video.c --- a/linux/drivers/media/video/hdpvr/hdpvr-video.c +++ b/linux/drivers/media/video/hdpvr/hdpvr-video.c @@ -134,6 +134,8 @@ v4l2_err(&dev->v4l2_dev, "cannot allocate buffer\n"); goto exit; } + list_add_tail(&buf->buff_list, &dev->free_buff_list); + buf->dev = dev; urb = usb_alloc_urb(0, GFP_KERNEL); @@ -158,7 +160,6 @@ hdpvr_read_bulk_callback, buf); buf->status = BUFSTAT_AVAILABLE; - list_add_tail(&buf->buff_list, &dev->free_buff_list); } return 0; exit: -- 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: [PATCH] hdpvr: i2c fixups for fully functional IR support
On Sun, Sep 13, 2009 at 05:04:16PM -0400, Jarod Wilson wrote: > On Sep 13, 2009, at 1:23 PM, Brandon Jenkins wrote: > > > I don't mind testing. Currently I am running ArchLinux 64-bit, > > kernel26-2.6.30.6-1. Please tell me where to build the driver from. > > Hrm... It *was* in Janne's hdpvr tree, but it seems to have gone > missing... It's in http://hg.jannau.net/hdpvr. I just merged several weeks of v4l-dvb changes after the last commit. So it's not at the top of the log. Janne -- 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: [PATCH] hdpvr: fix i2c device registration on latest kernel
On Thu, Sep 03, 2009 at 03:59:40PM -0400, Jarod Wilson wrote: > The i2c changes in 2.6.31 lead to the hdpvr driver oops'ing on load > at the moment. These changes remedy that, and after some related changes > in the lirc_zilog driver, IR is working again as well. > > This patch is against http://hg.jannau.net/hdpvr/, which contains > multiple related patches also required for properly enabling the IR > part on the hdpvr. Tested on 2.6.30.5 and 2.6.31-rc8. Thanks, pushed to that tree. I'll prepare a merge request for all the hdpvr i2c/ir changes over the weekend. Janne -- 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: [PATCH] hdpvr: i2c fixups for fully functional IR support
On Thu, Sep 03, 2009 at 04:02:12PM -0400, Jarod Wilson wrote: > On Sep 3, 2009, at 7:50 AM, Andy Walls wrote: > > >> Hrm. A brief google search suggests the 1250 IR part isn't enabled. I > >> see a number of i2c devices in i2cdetect -l output, but none that say > >> anything about IR... I could just plug the hdpvr in there and see > >> what > >> happens, I suppose... > > > > You should try that. It was an issue of legacy I2C driver probing > > that > > caused the hdpvr module to have problems. The cx18 driver simply > > stimulated the i2c subsystem to do legacy probing (via the tuner > > modules > > IIRC)? See the email I sent you. > > So from what I can tell, the i2c changes in 2.6.31 *should* prevent > that from happening, and now that I've got everything working on > 2.6.31 too, I'll try hooking up my hdpvr to my box w/an hvr-1250, > hvr-1800 and pchdtv hd-3000 in it and see what blows up (hopefully > nothing...). We still need something to prevent it from happening with older kernels. Easiest solution would be to disable it for 2.6.30 and earlier. Janne -- 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: [PULL] http://hg.jannau.net/v4l-dvb/
On Tue, Sep 01, 2009 at 09:43:32PM +0200, Janne Grunau wrote: > > Please pull from http://hg.jannau.net/v4l-dvb/v4l-dvb > > for the following 4 changesets: > > 01/04: hdpvr: i2c fixups for fully functional IR support > http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=24f996ba510e IR related changes for the HD PVR need a little more time, I repush the repo only with the following dvb changes. > 02/04: DVB: make DVB_MAX_ADAPTERS configureable > http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=49cecb27a086 > > 03/04: dvb-core: check fe->ops.set_frontend return value > http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=4938eaa8ee76 > > 04/04: dvb-core: check supported QAM modulations > http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=b746ea1289a0 Janne -- 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: [PULL] http://hg.jannau.net/v4l-dvb/
On Tue, Sep 01, 2009 at 05:30:36PM -0400, Michael Krufky wrote: > On Tue, Sep 1, 2009 at 3:43 PM, Janne Grunau wrote: > > This is great -- I only see one issue here, but it should not prevent > any merge. Please submit an additional patch to correct the > misspelled word "vallues" to "values" in the "DVB: make > DVB_MAX_ADAPTERS configureable" patch. Actually, another spelling > error -- "configureable" should actually be spelled as, "configurable" both typos fixed, thanks for the review Janne -- 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
[PULL] http://hg.jannau.net/v4l-dvb/
Mauro, Please pull from http://hg.jannau.net/v4l-dvb/v4l-dvb for the following 4 changesets: 01/04: hdpvr: i2c fixups for fully functional IR support http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=24f996ba510e 02/04: DVB: make DVB_MAX_ADAPTERS configureable http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=49cecb27a086 03/04: dvb-core: check fe->ops.set_frontend return value http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=4938eaa8ee76 04/04: dvb-core: check supported QAM modulations http://hg.jannau.net/v4l-dvb/v4l-dvb?cmd=changeset;node=b746ea1289a0 dvb/Kconfig | 13 + dvb/dvb-core/dvb_frontend.c | 35 ++- dvb/dvb-core/dvbdev.h |5 + video/hdpvr/Makefile|4 +--- video/hdpvr/hdpvr-core.c|6 +++--- video/hdpvr/hdpvr-i2c.c |5 - 6 files changed, 56 insertions(+), 12 deletions(-) Thanks, Janne -- 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: Haupauge Nova-T 500 2.6.28 regression dib0700
Hi, cc-ed linux-media On Mon, Jun 01, 2009 at 12:48:33PM +0200, Hubert Hafner wrote: > > I've read your message on mail-archive.com on the linux-media section. > > The same problem seems to be valid for the Haupauge Nova-TD (a dual > receiver). After a few minutes the ehci_hcd core is halted. > > Have you got any ideas how to solve this? I've read setting URB to 1 > (?) should solve this issue - but where to set this parameter and did > it work out? There's a patch on the linux-media list. Search for a thread with "dib0700 Nova-TD-Stick problem" as subject. > disable_rc_polling does not solve the problem. At least at my Ubuntu > Server 8.10 with kernel 2.6.27-7. Seems to be different problem than. At least kernel 2.6.27.x works here without problems. Janne -- 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: [questions] dmesg: Non-NULL drvdata on register
On Mon, May 04, 2009 at 03:03:40PM +0200, Hans Verkuil wrote: > > > Not so many time ago i noticed such line in dmesg: > > > > radio-mr800 2-1:1.0: Non-NULL drvdata on register > > > > Quick review showed that it appears in usb_amradio_probe fucntions. Then > > i found such code in v4l2_device_register() function (v4l2-device.c > > file): > > > > /* Set name to driver name + device name if it is empty. */ > > if (!v4l2_dev->name[0]) > > snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "%s % > > s", > > dev->driver->name, dev_name(dev)); > > if (dev_get_drvdata(dev)) > > v4l2_warn(v4l2_dev, "Non-NULL drvdata on register\n"); > > dev_set_drvdata(dev, v4l2_dev); > > return 0; > > > > The questions is - should i deal with this warning in dmesg? Probably > > the order of callbacks in radio-mr800 probe function is incorrect. > > I (or you :-) should look into this: I think the usb subsystem is calling > dev_set_drvdata as well, so we could have a clash here. I don't think so. But probably all USB drivers call usb_set_intfdata (just a wrapper around dev_set_drvdata). Most (media) drivers use it to get driver struct back on a disconnect. My change to use usb interface's struct device for v4l2_device_register caused an oops on disconnect for em28xx based devices. Other drivers (hdpvr, au0828) fortunately call usb_set_intfdata after calling v4l2_device_register. I'm not sure how to resolve this. USB drivers need for the disconnect a way of of getting their private driver struct. We could add a data field to v4l2_device. A couple of drivers seems to be already based on the assumption that dev_get_drvdata(parent.dev) returns a v4l2_device. Janne -- 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: Re: Haupauge Nova-T 500 2.6.28 regression dib0700
On Thu, Apr 30, 2009 at 09:19:17AM +0200, Samuel Rodelius wrote: > > I experience the same problem as Janne with the following reported in the > /var/log/syslog: > Apr 30 09:07:02 homer kernel: [ 86.068011] ehci_hcd :01:06.2: force > halt; handhake c203c014 4000 -> -110 > > I was wondering if you have found any workaround or if there is any bugfix > submitted in a later kernel-version (I'am running 2.6.28.11)? > > The problem started when I updated the kernel-version from 2.6.27-11 (Ubuntu > Intrepid to Jaunty upgrade). I've not really investigated due to lack of time and another problem in 2.6.29 (The computer doesn't reliable shut down). A possible workaround is to disable rc polling but since you seems to use the remote you probably don't like this (disable_rc_polling=1 module option for dvb-usb). > For me the device is working when I have just booted but after a minute of > inactivity it seems to receive the above error. The device is a PCI-TV-card > where the USB-device is internal on the PCI-card so it is a bit hard to > unplug the device, connecting and unconnecting the cable to the IR-eye or > the TV-aerial will not make any difference. > > Let me know if I can help in any other ways to resolve this problem Janne -- 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: [mythtv] current hd-pvr driver with Centos 5
On Sat, Apr 11, 2009 at 10:34:02PM -0700, Ian Forde wrote: > On Wed, 2009-04-08 at 19:56 -0700, Ian Forde wrote: > > (now to the dev list...) > > > > So I went to upgrade my CentOS 5 myth boxes from 5.2 to 5.3. Upgrade > > went successfully. Next step, upgrade my myth trunk installation. Ah, > > but I have to upgrade my hd-pvr driver. Go to the wiki page... looks > > like the driver is now in v4l-dvb trunk. No problem - download, > > build... bzzt. Looks like it requires 2.6.20. Since CentOS uses > > 2.6.18 with a TON of backported fixes, I figured I'd give it a shot, > > since it worked earlier. Remember that "bzzt" earlier? Yeah - that's > > this error: > > > > [myhost v4l-dvb]# make > > make -C /usr/local/src/myth/v4l-dvb/v4l > > make[1]: Entering directory `/usr/local/src/myth/v4l-dvb/v4l' > > creating symbolic links... > > Kernel build directory is /lib/modules/2.6.18-128.1.6.el5/build > > make -C /lib/modules/2.6.18-128.1.6.el5/build > > SUBDIRS=/usr/local/src/myth/v4l-dvb/v4l modules > > make[2]: Entering directory `/usr/src/kernels/2.6.18-128.1.6.el5-x86_64' > > CC [M] /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.o > > /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.c: In function > > 'hdpvr_alloc_buffers': > > /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.c:158: warning: passing > > argument 6 of 'usb_fill_bulk_urb' from incompatible pointer type > > /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.c:282:49: error: macro > > "INIT_WORK" requires 3 arguments, but only 2 given > > /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.c: In function > > 'hdpvr_start_streaming': > > /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.c:282: error: 'INIT_WORK' > > undeclared (first use in this function) > > /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.c:282: error: (Each > > undeclared identifier is reported only once > > /usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.c:282: error: for each > > function it appears in.) > > make[3]: *** [/usr/local/src/myth/v4l-dvb/v4l/hdpvr-video.o] Error 1 > > make[2]: *** [_module_/usr/local/src/myth/v4l-dvb/v4l] Error 2 > > make[2]: Leaving directory `/usr/src/kernels/2.6.18-128.1.6.el5-x86_64' > > make[1]: *** [default] Error 2 > > make[1]: Leaving directory `/usr/local/src/myth/v4l-dvb/v4l' > > make: *** [all] Error 2 > > Okay - looks like I figured a way out of this one. By changing line 282 > of hdpvr-video.c to read: > > INIT_WORK(&dev->worker, hdpvr_transmit_buffers, &dev->worker); That's simple enough change to restore backward compatibility to 2.6.18. > I was able to get it to build. Unfortunately, SPDIF input doesn't seem > to be doing the "right thing". As I understand it, the driver won't > record unless it sees a signal. But it *is* able to record, even with > the 'cat /dev/video4 > /tmp/1.mpg' test. When I do a subsequent 'ffmpeg > -i /tmp/1.mpg', it tells me that regarding audio, it's got AAC audio > rather than AC3 5.1. The audio encoding has to be set explititly to ac3 > Next step: trying 'v4l2-ctl --device=/dev/video4 -l' to see if I missed > anything. I tried 'v4l2-ctl --device=/dev/video4 > --set-ctrl=audio_encoding=4' and retried a capture. That yields a file > with AC3 but 2-channel audio, Are any other audio signals beside spdif connected? Try disconnecting them. > and it still won't play on a frontend that > can play AC3 and non-AC3 content without a problem. Anything more specific on this problem would help. Are there error messages? Is it playable in other players? > I suppose my question is: Is this the correct place to ask questions > regarding the hd-pvr driver itself? No, linux-media@vger.kernel.org is (cc-ed). Janne -- 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: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model
On Sun, Apr 05, 2009 at 01:39:33PM -0400, Andy Walls wrote: > On Sun, 2009-04-05 at 16:37 +0200, Janne Grunau wrote: > > > > I would guess that it won't work. There is an effort to merge lirc. It's > > currently stalled though. > > Perhaps you and Jarrod and Christopher have already discussed this, > but... > > Instead of trying to push all of the LIRC kernel components through in > one big patch set, perhaps it would be easier to just get the lirc_dev > and any other needed infrastructure components in first. > > If one focuses on satisfying the LKML comments to lirc_dev and the > Makefile to get that kernel module in the kernel, then, at least for > video card hosted IR devices, there is an infrastructure to which to > hook new or rewritten i2c IR driver modules. I guess lkml would NAK patches adding infrastructure only bits but we will probably for the next patchset concentrate on a few lirc drivers. Christopher doesn't participate in the merge attempt. > > A git tree is available at > > > > git://git.wilsonet.com/linux-2.6-lirc.git > > > > Jared Wilson and I were working on it (mainly last september). Since the > > IR on the HD PVR is also driven by the same zilog chip as on other > > hauppauge devices I'll take of lirc_zilog. Help converting the i2c > > drivers to the new i2c model is welcome. General cleanup of lirc to make > > it ready for mainline is of course wellcome too. > > I can help with this. I'm mainly concerned with lirc_dev, lirc_i2c (for > Rx only use of the zilog at 0x71), lirc_zilog, and lirc_mceusb2. That's > because, of course, I have devices that use those modules. :) I have devices for lirc_zilog (which should probably be merged with lirc_i2c) and lirc serial. Jarod has at least mce usb and imon devices. That are probably the devices we'll concentrate on the next submission. > lirc_dev and the API header would be my first priority, if you need > help. Did anyone consolidate all the comments from the LKML on Jarrod's > patch submission? no and I lost track which comments were already handled. Janne -- 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: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model
On Sun, Apr 05, 2009 at 06:37:43PM +0200, Jean Delvare wrote: > Hi Janne, > > On Sun, 5 Apr 2009 16:37:49 +0200, Janne Grunau wrote: > > On Sun, Apr 05, 2009 at 07:46:47AM +0200, Hans Verkuil wrote: > > > > > > Let's keep it simple: add a 'load_ir_kbd_i2c' module option for those > > > drivers that did not autoload this module. The driver author can refine > > > things later (I'll definitely will do that for ivtv). > > > > > > It will be interesting if someone can find out whether lirc will work at > > > all > > > once autoprobing is removed from i2c. If it isn't, then perhaps that will > > > wake them up to the realization that they really need to move to the > > > kernel. > > > > I would guess that it won't work. There is an effort to merge lirc. It's > > currently stalled though. A git tree is available at > > > > git://git.wilsonet.com/linux-2.6-lirc.git > > I tried to clone this but it failed: > > git.wilsonet.com[0: 72.93.233.4]: errno=Connection timed out > fatal: unable to connect a socket (Connection timed out) hmm, getting that here too. I'll send Jarod a mail. You can use my clone instead: git://git.jannau.net/linux-2.6-lirc.git > I will happily help you with the i2c side of things. Without an access > to your git tree however, I don't know the latest state of your code. > And I can't see any lirc_zilog module in the CVS repository of lirc > either. But if you show me the i2c code you're worried about, I'll let > you know what I think about it. lirc_zilog or lirc_pvr is not in lirc's cvs since it requires a 'firmware' for mapping keys to sequences for the ir blaster. Janne -- 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: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model
On Sun, Apr 05, 2009 at 07:46:47AM +0200, Hans Verkuil wrote: > > Let's keep it simple: add a 'load_ir_kbd_i2c' module option for those > drivers that did not autoload this module. The driver author can refine > things later (I'll definitely will do that for ivtv). > > It will be interesting if someone can find out whether lirc will work at all > once autoprobing is removed from i2c. If it isn't, then perhaps that will > wake them up to the realization that they really need to move to the > kernel. I would guess that it won't work. There is an effort to merge lirc. It's currently stalled though. A git tree is available at git://git.wilsonet.com/linux-2.6-lirc.git Jared Wilson and I were working on it (mainly last september). Since the IR on the HD PVR is also driven by the same zilog chip as on other hauppauge devices I'll take of lirc_zilog. Help converting the i2c drivers to the new i2c model is welcome. General cleanup of lirc to make it ready for mainline is of course wellcome too. Janne -- 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
[PULL] http://hg.jannau.net/v4l-dvb/
Mauro, Please pull from http://hg.jannau.net/v4l-dvb/ for the following 8 changesets: 01/08: v4l: use usb_interface for v4l2_device_register http://hg.jannau.net/v4l-dvbi?cmd=changeset;node=3d54e7da8077 02/08: cx231xx: use usb_interface.dev for v4l2_device_register http://hg.jannau.net/v4l-dvb?cmd=changeset;node=e474a093efdc 03/08: cx231xx: remove explicitly set v4l2_device.name http://hg.jannau.net/v4l-dvb?cmd=changeset;node=297b327d1f05 04/08: usbvision: use usb_interface.dev for v4l2_device_register http://hg.jannau.net/v4l-dvb?cmd=changeset;node=756481d43c2e 05/08: pvrusb2: use usb_interface.dev for v4l2_device_register http://hg.jannau.net/v4l-dvb?cmd=changeset;node=62b788811b17 06/08: au0828: use usb_interface.dev for v4l2_device_register http://hg.jannau.net/v4l-dvb?cmd=changeset;node=33810c734a0d 07/08: au0828: remove explicitly set v4l2_device.name and unused au0828_instance http://hg.jannau.net/v4l-dvb?cmd=changeset;node=12cad7ee9ede 08/08: w9968cf: use usb_interface.dev for v4l2_device_register http://hg.jannau.net/v4l-dvb?cmd=changeset;node=6872bf22ee49 Documentation/video4linux/v4l2-framework.txt|2 +- drivers/media/video/au0828/au0828-core.c|9 ++--- drivers/media/video/cx231xx/cx231xx-cards.c |4 +--- drivers/media/video/pvrusb2/pvrusb2-hdw.c |2 +- drivers/media/video/usbvision/usbvision-video.c |8 +--- drivers/media/video/w9968cf.c |2 +- 6 files changed, 11 insertions(+), 16 deletions(-) Thanks, Janne -- 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: [PATCH 5 of 8] pvrusb2: use usb_interface.dev for v4l2_device_register
On Wed, Apr 01, 2009 at 06:37:18AM -0300, Mauro Carvalho Chehab wrote: > On Tue, 31 Mar 2009 21:02:16 -0500 (CDT) > Mike Isely wrote: > > > > > This patch will not at all impact the operation of the pvrusb2 driver, > > and if associating with the USB interface's device node is preferred > > then I'm fine with it. > > > > Acked-by: Mike Isely Thanks, added. > > Mauro: Is this series going to be pulled into v4l-dvb or shall I just > > bring this one specific change into my pvrusb2 repo? Is there any > > reason not to pull it? > > I'll take care on it on the next time I'll apply patchwork patches. You don't need to. My plan was to send a pull request once I have enough feedback. I should have said that in the intro mail. > I suspect > that Janne preferred to send via email for people to better analyse the > impacts. Yes, exactly. Janne -- 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: [PATCH 5 of 6] au0828: use usb_interface.dev for v4l2_device_register
Hi Devin, On Sun, Mar 29, 2009 at 09:44:25AM -0400, Devin Heitmueller wrote: > On Sun, Mar 29, 2009 at 8:42 AM, Janne Grunau wrote: > > > > I'm not against this change, but you should also get rid of the "i" > variable and the au0828_instance list (since the v4l2_device.name was > the only purpose for both). done > Also, your subject didn't really match the function of the patch. Had > I not looked at the patch itself, I would have only thought you were > changing the v4l2_device_register(). yeah, the subject was bad for au0828 and cx231xx but I had trouble to find find something better. I splitted the patches nao. > Please put me on the CC: for anything related to au0828 analog > support, since I authored the code in question. noted, Sorry I had only looked at the au0228-core.c header which notes only Steven. Janne -- 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
[PATCH 8 of 8] w9968cf: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID fcd789d767ee307c25a006528bcd1b021d56b732 # Parent 9de2e49de0b75360d86b8fc444de057a485003c1 w9968cf: use usb_interface.dev for v4l2_device_register Priority: normal Signed-off-by: Janne Grunau diff -r 9de2e49de0b7 -r fcd789d767ee linux/drivers/media/video/w9968cf.c --- a/linux/drivers/media/video/w9968cf.c Sun Mar 29 16:53:48 2009 +0200 +++ b/linux/drivers/media/video/w9968cf.c Sun Mar 29 16:53:48 2009 +0200 @@ -3454,7 +3454,7 @@ if (!cam) return -ENOMEM; - err = v4l2_device_register(&udev->dev, &cam->v4l2_dev); + err = v4l2_device_register(&intf->dev, &cam->v4l2_dev); if (err) goto fail0; -- 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
[PATCH 7 of 8] au0828: remove explicitly set v4l2_device.name and unused au0828_instance
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID 9de2e49de0b75360d86b8fc444de057a485003c1 # Parent 1fd54536517a9be6f93f5711766bb8efd64ddbdf au0828: remove explicitly set v4l2_device.name and unused au0828_instance Priority: normal Signed-off-by: Janne Grunau diff -r 1fd54536517a -r 9de2e49de0b7 linux/drivers/media/video/au0828/au0828-core.c --- a/linux/drivers/media/video/au0828/au0828-core.c Sun Mar 29 16:53:48 2009 +0200 +++ b/linux/drivers/media/video/au0828/au0828-core.c Sun Mar 29 16:53:48 2009 +0200 @@ -37,8 +37,6 @@ module_param_named(debug, au0828_debug, int, 0644); MODULE_PARM_DESC(debug, "enable debug messages"); -static atomic_t au0828_instance = ATOMIC_INIT(0); - #define _AU0828_BULKPIPE 0x03 #define _BULKPIPESIZE 0x @@ -170,7 +168,7 @@ static int au0828_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) { - int ifnum, retval, i; + int ifnum, retval; struct au0828_dev *dev; struct usb_device *usbdev = interface_to_usbdev(interface); @@ -198,9 +196,6 @@ usb_set_intfdata(interface, dev); /* Create the v4l2_device */ - i = atomic_inc_return(&au0828_instance) - 1; - snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s-%03d", - "au0828", i); retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { printk(KERN_ERR "%s() v4l2_device_register failed\n", -- 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
[PATCH 6 of 8] au0828: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID 1fd54536517a9be6f93f5711766bb8efd64ddbdf # Parent 2d52ac089920f9ac36960c0245442fd89a06bb75 au0828: use usb_interface.dev for v4l2_device_register Priority: normal Signed-off-by: Janne Grunau diff -r 2d52ac089920 -r 1fd54536517a linux/drivers/media/video/au0828/au0828-core.c --- a/linux/drivers/media/video/au0828/au0828-core.c Sun Mar 29 16:53:48 2009 +0200 +++ b/linux/drivers/media/video/au0828/au0828-core.c Sun Mar 29 16:53:48 2009 +0200 @@ -201,7 +201,7 @@ i = atomic_inc_return(&au0828_instance) - 1; snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s-%03d", "au0828", i); - retval = v4l2_device_register(&dev->usbdev->dev, &dev->v4l2_dev); + retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { printk(KERN_ERR "%s() v4l2_device_register failed\n", __func__); -- 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
[PATCH 5 of 8] pvrusb2: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID 2d52ac089920f9ac36960c0245442fd89a06bb75 # Parent 01af508490af3bc9c939c36001d6989e2c147aa0 pvrusb2: use usb_interface.dev for v4l2_device_register Priority: normal Signed-off-by: Janne Grunau diff -r 01af508490af -r 2d52ac089920 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c Sun Mar 29 16:53:48 2009 +0200 +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c Sun Mar 29 16:53:48 2009 +0200 @@ -2591,7 +2591,7 @@ hdw->ctl_read_urb = usb_alloc_urb(0,GFP_KERNEL); if (!hdw->ctl_read_urb) goto fail; - if (v4l2_device_register(&usb_dev->dev, &hdw->v4l2_dev) != 0) { + if (v4l2_device_register(&intf->dev, &hdw->v4l2_dev) != 0) { pvr2_trace(PVR2_TRACE_ERROR_LEGS, "Error registering with v4l core, giving up"); goto fail; -- 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
[PATCH 4 of 8] usbvision: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID 01af508490af3bc9c939c36001d6989e2c147aa0 # Parent ce50af27b414d4e146e6833b78852b42b129293a usbvision: use usb_interface.dev for v4l2_device_register Priority: normal Signed-off-by: Janne Grunau diff -r ce50af27b414 -r 01af508490af linux/drivers/media/video/usbvision/usbvision-video.c --- a/linux/drivers/media/video/usbvision/usbvision-video.c Sun Mar 29 16:53:48 2009 +0200 +++ b/linux/drivers/media/video/usbvision/usbvision-video.c Sun Mar 29 16:53:48 2009 +0200 @@ -1522,7 +1522,8 @@ * Returns NULL on error, a pointer to usb_usbvision else. * */ -static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) +static struct usb_usbvision *usbvision_alloc(struct usb_device *dev, + struct usb_interface *intf) { struct usb_usbvision *usbvision; @@ -1531,7 +1532,7 @@ return NULL; usbvision->dev = dev; - if (v4l2_device_register(&dev->dev, &usbvision->v4l2_dev)) + if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev)) goto err_free; mutex_init(&usbvision->lock); /* available */ @@ -1669,7 +1670,8 @@ return -ENODEV; } - if ((usbvision = usbvision_alloc(dev)) == NULL) { + usbvision = usbvision_alloc(dev, intf); + if (usbvision == NULL) { dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__); return -ENOMEM; } -- 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
[PATCH 3 of 8] cx231xx: remove explicitly set v4l2_device.name
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID ce50af27b414d4e146e6833b78852b42b129293a # Parent eb7601494dc5e58ed519dde38c763fee20cbd0a9 cx231xx: remove explicitly set v4l2_device.name Priority: normal Signed-off-by: Janne Grunau diff -r eb7601494dc5 -r ce50af27b414 linux/drivers/media/video/cx231xx/cx231xx-cards.c --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c Sun Mar 29 16:53:48 2009 +0200 +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c Sun Mar 29 16:53:48 2009 +0200 @@ -683,8 +683,6 @@ */ /* Create v4l2 device */ - snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), - "%s-%03d", "cx231xx", nr); retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { cx231xx_errdev("v4l2_device_register failed\n"); -- 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
[PATCH 2 of 8] cx231xx: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID eb7601494dc5e58ed519dde38c763fee20cbd0a9 # Parent 36b738f9cb1916e9885084f32bb29373f70f0720 cx231xx: use usb_interface.dev for v4l2_device_register Priority: normal Signed-off-by: Janne Grunau diff -r 36b738f9cb19 -r eb7601494dc5 linux/drivers/media/video/cx231xx/cx231xx-cards.c --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c Sun Mar 29 16:53:48 2009 +0200 +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c Sun Mar 29 16:53:48 2009 +0200 @@ -685,7 +685,7 @@ /* Create v4l2 device */ snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s-%03d", "cx231xx", nr); - retval = v4l2_device_register(&udev->dev, &dev->v4l2_dev); + retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { cx231xx_errdev("v4l2_device_register failed\n"); cx231xx_devused &= ~(1 << nr); -- 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
[PATCH 1 of 8] v4l: use usb_interface for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238338428 -7200 # Node ID 36b738f9cb1916e9885084f32bb29373f70f0720 # Parent df7a51ffa2baddae044a318c928f960488b9ec38 v4l: use usb_interface for v4l2_device_register If usb_interface.dev is used as dev parameter for v4l2_device_register v4l2_dev.name contains the v4l driver/module name and usb device and interface instead of a simple "usb x-y". It also matches the recommendation to set the parent devices for usb drivers. Priority: normal Signed-off-by: Janne Grunau diff -r df7a51ffa2ba -r 36b738f9cb19 linux/Documentation/video4linux/v4l2-framework.txt --- a/linux/Documentation/video4linux/v4l2-framework.txt Sun Mar 29 05:58:58 2009 -0300 +++ b/linux/Documentation/video4linux/v4l2-framework.txt Sun Mar 29 16:53:48 2009 +0200 @@ -90,7 +90,7 @@ NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. The first 'dev' argument is normally the struct device pointer of a pci_dev, -usb_device or platform_device. It is rare for dev to be NULL, but it happens +usb_interface or platform_device. It is rare for dev to be NULL, but it happens with ISA devices or when one device creates multiple PCI devices, thus making it impossible to associate v4l2_dev with a particular parent. -- 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
[PATCH 0 of 8] Use usb_interface.dev for v4l2_device_register - try 2
Hi, try 2: fixed typo in the cx231xx driver name, the name is set explicitly in cx2311 not pvrusb2, spltted v4l2_device_register changes and name changes. the documentation suggest and the current usb driver are using struct device from the usb_device. As discussed for video_device parent the usb_interface should be used. This has the advantage that v4l2_device_register creates meaningfull names, for example "hdpvr usb2-3:1.0" instead of "usb 2-3". This patch series updates Documentation/video4linux/v4l2-framework.txt and hopefully all usb drivers uing v4l2_device. The cx231xx and au0828 drivers are already overriding v4l2_device.name with a driver name and a device counter. I removed that code since I suspect it was only added to get meaningful names. If the current names are preferred just NAK the patches removing that code. regards, Janne -- 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
[PATCH 6 of 6] w9968cf: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238191413 -3600 # Node ID a37ea4c88edbaa73ef7a145986ab8f5c3ea9fa65 # Parent 16016db934ee03d0156754b8e07d4212c933d234 w9968cf: use usb_interface.dev for v4l2_device_register From: Janne Grunau Priority: normal Signed-off-by: Janne Grunau diff -r 16016db934ee -r a37ea4c88edb linux/drivers/media/video/w9968cf.c --- a/linux/drivers/media/video/w9968cf.c Fri Mar 27 22:57:05 2009 +0100 +++ b/linux/drivers/media/video/w9968cf.c Fri Mar 27 23:03:33 2009 +0100 @@ -3454,7 +3454,7 @@ if (!cam) return -ENOMEM; - err = v4l2_device_register(&udev->dev, &cam->v4l2_dev); + err = v4l2_device_register(&intf->dev, &cam->v4l2_dev); if (err) goto fail0; -- 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
[PATCH 5 of 6] au0828: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238191025 -3600 # Node ID 16016db934ee03d0156754b8e07d4212c933d234 # Parent 210007cef5bdef2364590755a2b7ab219534db16 au0828: use usb_interface.dev for v4l2_device_register From: Janne Grunau removes the explicitly set v4l2_device.name Priority: normal Signed-off-by: Janne Grunau diff -r 210007cef5bd -r 16016db934ee linux/drivers/media/video/au0828/au0828-core.c --- a/linux/drivers/media/video/au0828/au0828-core.c Fri Mar 27 22:54:45 2009 +0100 +++ b/linux/drivers/media/video/au0828/au0828-core.c Fri Mar 27 22:57:05 2009 +0100 @@ -199,9 +199,7 @@ /* Create the v4l2_device */ i = atomic_inc_return(&au0828_instance) - 1; - snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s-%03d", - "au0828", i); - retval = v4l2_device_register(&dev->usbdev->dev, &dev->v4l2_dev); + retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { printk(KERN_ERR "%s() v4l2_device_register failed\n", __func__); -- 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
[PATCH 4 of 6] pvrusb2: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238190885 -3600 # Node ID 210007cef5bdef2364590755a2b7ab219534db16 # Parent 09d6b9873181402892bb746d101b1b22b245208d pvrusb2: use usb_interface.dev for v4l2_device_register From: Janne Grunau Priority: normal Signed-off-by: Janne Grunau diff -r 09d6b9873181 -r 210007cef5bd linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c Fri Mar 27 22:53:20 2009 +0100 +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c Fri Mar 27 22:54:45 2009 +0100 @@ -2591,7 +2591,7 @@ hdw->ctl_read_urb = usb_alloc_urb(0,GFP_KERNEL); if (!hdw->ctl_read_urb) goto fail; - if (v4l2_device_register(&usb_dev->dev, &hdw->v4l2_dev) != 0) { + if (v4l2_device_register(&intf->dev, &hdw->v4l2_dev) != 0) { pvr2_trace(PVR2_TRACE_ERROR_LEGS, "Error registering with v4l core, giving up"); goto fail; -- 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
[PATCH 3 of 6] usbvision: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238190800 -3600 # Node ID 09d6b9873181402892bb746d101b1b22b245208d # Parent edca57a287041646c86b404852ef9abf0ecd6c72 usbvision: use usb_interface.dev for v4l2_device_register From: Janne Grunau Priority: normal Signed-off-by: Janne Grunau diff -r edca57a28704 -r 09d6b9873181 linux/drivers/media/video/usbvision/usbvision-video.c --- a/linux/drivers/media/video/usbvision/usbvision-video.c Fri Mar 27 22:42:45 2009 +0100 +++ b/linux/drivers/media/video/usbvision/usbvision-video.c Fri Mar 27 22:53:20 2009 +0100 @@ -1530,7 +1530,8 @@ * Returns NULL on error, a pointer to usb_usbvision else. * */ -static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) +static struct usb_usbvision *usbvision_alloc(struct usb_device *dev, + struct usb_interface *intf) { struct usb_usbvision *usbvision; @@ -1539,7 +1540,7 @@ return NULL; usbvision->dev = dev; - if (v4l2_device_register(&dev->dev, &usbvision->v4l2_dev)) + if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev)) goto err_free; mutex_init(&usbvision->lock); /* available */ @@ -1677,7 +1678,8 @@ return -ENODEV; } - if ((usbvision = usbvision_alloc(dev)) == NULL) { + usbvision = usbvision_alloc(dev, intf); + if (usbvision == NULL) { dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__); return -ENOMEM; } -- 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
[PATCH 2 of 6] cx321xx: use usb_interface.dev for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238190165 -3600 # Node ID edca57a287041646c86b404852ef9abf0ecd6c72 # Parent 602a8fff1ba466ec4fb4816d0fb0725c8650c311 cx321xx: use usb_interface.dev for v4l2_device_register From: Janne Grunau removes the explicitly set v4l2_device.name Priority: normal Signed-off-by: Janne Grunau diff -r 602a8fff1ba4 -r edca57a28704 linux/drivers/media/video/cx231xx/cx231xx-cards.c --- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c Fri Mar 27 22:34:06 2009 +0100 +++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c Fri Mar 27 22:42:45 2009 +0100 @@ -683,9 +683,7 @@ */ /* Create v4l2 device */ - snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), - "%s-%03d", "cx231xx", nr); - retval = v4l2_device_register(&udev->dev, &dev->v4l2_dev); + retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { cx231xx_errdev("v4l2_device_register failed\n"); cx231xx_devused &= ~(1 << nr); -- 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
[PATCH 1 of 6] v4l: use usb_interface for v4l2_device_register
# HG changeset patch # User Janne Grunau # Date 1238189646 -3600 # Node ID 602a8fff1ba466ec4fb4816d0fb0725c8650c311 # Parent b1596c6517c925abd1e683e86592af1aedf9de06 v4l: use usb_interface for v4l2_device_register From: Janne Grunau If usb_interface.dev is used as dev parameter for v4l2_device_register v4l2_dev.name contains the v4l driver/module name and usb device and interface instead of a simple "usb x-y". It also matches the recommendation to set the parent devices for usb drivers. Priority: normal Signed-off-by: Janne Grunau diff -r b1596c6517c9 -r 602a8fff1ba4 linux/Documentation/video4linux/v4l2-framework.txt --- a/linux/Documentation/video4linux/v4l2-framework.txt Thu Mar 26 20:47:48 2009 + +++ b/linux/Documentation/video4linux/v4l2-framework.txt Fri Mar 27 22:34:06 2009 +0100 @@ -90,7 +90,7 @@ NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. The first 'dev' argument is normally the struct device pointer of a pci_dev, -usb_device or platform_device. It is rare for dev to be NULL, but it happens +usb_interface or platform_device. It is rare for dev to be NULL, but it happens with ISA devices or when one device creates multiple PCI devices, thus making it impossible to associate v4l2_dev with a particular parent. -- 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
[PATCH 0 of 6] Use usb_interface.dev for v4l2_device_register
Hi, the documentation suggest and the current usb driver are using struct device from the usb_device. As discussed for video_device parent the usb_interface should be used. This has the advantage that v4l2_device_register creates meaningfull names, for example "hdpvr usb2-3:1.0" instead of "usb 2-3". This patch series updates Documentation/video4linux/v4l2-framework.txt and hopefully all usb drivers uing v4l2_device. The pvrusb2 and au0828 drivers are already overriding v4l2_device.name with a driver name and a device counter. I removed that code since I suspect it was only added to get meaningful names. If the current names are preferred I'll update the patches. regards, Janne -- 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
[PULL] http://hg.jannau.net/hdpvr-merge/
Hi Mauro, please pull from http://hg.jannau.net/hdpvr-merge/ for hdpvr: add struct v4l2_device hdpvr: convert printing macros to v4l2_* with struct v4l2_device hdpvr: empty internal device buffer after stopping streaming hdpvr-control.c | 22 +++--- hdpvr-core.c| 65 + hdpvr-video.c | 87 +--- hdpvr.h |4 ++ 4 files changed, 114 insertions(+), 64 deletions(-) thanks, Janne -- 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: v4l parent for usb device interface or device?
On Thu, Mar 26, 2009 at 06:31:55PM -0700, David Brownell wrote: > On Thursday 26 March 2009, Janne Grunau wrote: > > > I noticed a problem after > > changing the hdpvr driver accordingly. > > > > With parent set to the usb interface there is no longer easy access to > > the usb device properties like the serial number through sysfs. I know > > that a couple of user with more than one device use the serial number > > to set static device nodes through udev. > > The serial number is still available, but it's coupled to the USB > device not its interface. Make your udev script hop up a level or > two in the driver model tree, as appropriate. yes, ATTRS{} still matches. There are udev howtos around which suggest ATTRS{} just matches one level up and not the entire path. I tried it but had unfortunately a typo in the udev rule. Sorry for the noise. Janne -- 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: v4l parent for usb device interface or device?
[cc-ing linux-usb] On Thu, Mar 26, 2009 at 01:29:57PM +0100, Hans de Goede wrote: > > On 03/25/2009 03:58 PM, Hans Verkuil wrote: > >> Hi Hans, > >> > >> On Wednesday 25 March 2009 11:18:31 Hans de Goede wrote: > >>> > >>> > >>> Hi, > >>> > >>> Today it came to my attention (through a libv4l bugreport) that > >>> the uvc driver and the gspca driver handle the setting of > >>> the v4l parent for usb webcams differently. > >>> > >>> The probe function for an usb driver gets passed in a > >>> "struct usb_interface *intf" parameter. > >>> > >>> uvc sets parent to: > >>> > >>> vdev->parent =&intf->dev; > >>> > >>> gspca uses: > >>> struct usb_device *dev = interface_to_usbdev(intf); > >>> vdev.parent =&dev->dev; > >>> > >>> Looking at what for example the usb mass-storage driver > >>> does (with my multi function printer/scanner with cardreader), > >>> which matches UVC, and thinking about how this is supposed to > >>> work with multifunction devices in general, I believe the uvc > >>> driver behaviour is correct, but before writing a patch for > >>> gspca, I thought it would be good to first discuss this on the > >>> list. > >>> > >>> So what do you think ? > >> I obviously agree with you :-) > >> > >> USB class drivers bind to interfaces instead of devices to support > >> composite > >> (multifunction) devices. While drivers for vendor-specific USB devices can > >> bind to the device, in which case the parent could be a USB device, we > >> need to > >> have some consistency in the sysfs symlinks. Using a USB interface as the > >> video device parent regardless of the device type makes sense. > > > > If the parent should indeed become the usb_interface, then we should make > > all v4l usb drivers consistent. And update v4l2-framework.txt. I've > > noticed before that it seems to be random what is used as the parent. I'm > > no USB expert, so I'm relying on your input. > > > > I believe that what uvc is doing, is the right thing. USB explicitly allows > for > multi-function devices, where each function has a seperate interface. So far > example a still camera, with a webcam mode, could have 2 interfaces, a mass > storage interface for the sdcard which stores the pictures and a foo > interface, > for the webcam mode. Clearly the right parent for the webcam v4l device then > is > the foo interface, and not the entire device (just like the mass storage > driver > will use the other interface as its parent). > > I think writing some docs about this and making all drivers consistent wrt > this, > is a good plan. I will write a driver to make gspca the right thing. > While I generally agree that setting parent to the usb interface is probably correct for multifunction devices I noticed a problem after changing the hdpvr driver accordingly. With parent set to the usb interface there is no longer easy access to the usb device properties like the serial number through sysfs. I know that a couple of user with more than one device use the serial number to set static device nodes through udev. Regards, Janne -- 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
[PULL] http://hg.jannau.net/hdpvr-merge/
Hi Mauro, please pull from http://hg.jannau.net/hdpvr-merge/ for hdpvr: use debugging macro for buffer status hdpvr: set usb interface dev as parent in struct video_device hdpvr: return immediately from hdpvr_poll if data is available hdpvr: locking fixes hdpvr-core.c |2 +- hdpvr-video.c | 56 hdpvr.h |3 ++- 3 files changed, 27 insertions(+), 34 deletions(-) cheers Janne -- 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: V4L2 Advanced Codec questions
On Thu, Mar 26, 2009 at 11:59:11AM -0400, Steven Toth wrote: > > I want to open a couple of HVR22xx items up for discussion. > > The HVR-22xx analog encoder is capable of encoded to all kinds of video and > audio codecs in various containers formats. > > From memory, wm9, mpeg4, mpeg2, divx, AAC, AC3, Windows audio codecs in asf, > ts, ps, avi containers, depending on various firmware license enablements and > configuration options. Maybe more, maybe, I'll draw up a complete list when I > begin to focus on analog. Well, the current list is already impressive. I guess MPEG audio layer 2 or 3 are missing. > Any single encoder on the HVR22xx can produce (if licensed) any of the > formats > above. However, due to a lack of CPU horsepower in the RISC engine, the board > is > not completely symmetrical when the encoders are running concurrently. This > is > the main reason why Hauppauge have disabled these features in the windows > driver. I guess that will also be a problem within the v4l2 driver since user space has generally no idea if two video devices share hardware. > It's possible for example to get two concurrent MPEG2 PS streams but only if > the > bitrate is limited to 6Mbps, which we also do in the windows driver. > > Apart from the fact that we (the LinuxTV community) will need to determine > what's possible concurrently, and what isn't, it does raise interesting > issues > for the V4L2 API. > > So, how do we expose this advanced codec and hardware encoder limitation > information through v4l2 to the applications? One possibility is adding an mpeg control which request concurrent usage of the hardware encoder and limits the control values to allow concurrent usage. If the control is not set, the hardware encoder will be only useable on one device. User space applications need to discover the devices sharing hardware and can set the concurrent mode if they wishes. Current applications won't break but can only use hardware decoding on a single device. A module option could force concurrent mode in which case only the encoding parameters are limited but both devices can use hardware encoding. Janne -- 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: how to disable mail sending in this ML?
Hi, On Wed, Mar 25, 2009 at 09:34:13AM +0200, Darius Augulis wrote: > > subj. > Want to still subscribed, but don't need all these posts in my mailbox. > How to disable? Since everyone can send mails to the list there is no need to be subscribed if you don't want to receive mails. HTH Janne -- 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: linux-next: Tree for March 23 (media/video/hdpvr)
On Mon, Mar 23, 2009 at 10:04:15PM +0100, Hans Verkuil wrote: > On Monday 23 March 2009 21:49:40 Janne Grunau wrote: > > > > diff --git a/drivers/media/video/hdpvr/hdpvr-core.c > > b/drivers/media/video/hdpvr/hdpvr-core.c index e7300b5..dadb2e7 100644 > > --- a/drivers/media/video/hdpvr/hdpvr-core.c > > +++ b/drivers/media/video/hdpvr/hdpvr-core.c > > @@ -21,6 +21,7 @@ > > #include > > #include > > #include > > +#include > > > > #include > > #include > > Don't include autoconf.h! It's preloaded for you already and shouldn't be > included manually. Esp. since the v4l-dvb tree creates and preloads a custom > version. Loading it manually will overwrite that. > > Other than that it's fine. Thanks Hans, fixed in the patch sent to Mauro. Janne -- 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
[PULL] http://hg.jannau.net/hdpvr-merge/
Hi Mauro, please pull from http://hg.jannau.net/hdpvr-merge/ for a single build fix for the hdpvr driver with CONFIG_I2C not set. diffstat: Makefile |4 +++- hdpvr-core.c | 10 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) cheers Janne -- 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: linux-next: Tree for March 23 (media/video/hdpvr)
Hi, On Mon, Mar 23, 2009 at 11:48:05AM -0700, Randy Dunlap wrote: > Stephen Rothwell wrote: > > > > Changes since 20090320: > > > The v4l-dvb tree gained a build failure for which I have reverted 3 commits. > > drivers/built-in.o: In function `hdpvr_disconnect': > hdpvr-core.c:(.text+0xf3894): undefined reference to `i2c_del_adapter' > drivers/built-in.o: In function `hdpvr_register_i2c_adapter': > (.text+0xf4145): undefined reference to `i2c_add_adapter' > > > CONFIG_I2C is not enabled. following patch should fix that. Janne ps: Mauro, I'll send a pull request shortly make hdpvr build without CONFIG_I2C Signed-off-by: Janne Grunau --- diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile index 79ad2e1..145163b 100644 --- a/drivers/media/video/hdpvr/Makefile +++ b/drivers/media/video/hdpvr/Makefile @@ -1,4 +1,6 @@ -hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-i2c.o hdpvr-video.o +hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-video.o + +hdpvr-$(CONFIG_I2C) += hdpvr-i2c.o obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c index e7300b5..dadb2e7 100644 --- a/drivers/media/video/hdpvr/hdpvr-core.c +++ b/drivers/media/video/hdpvr/hdpvr-core.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -389,12 +390,14 @@ static void hdpvr_disconnect(struct usb_interface *interface) mutex_unlock(&dev->io_mutex); /* deregister I2C adapter */ +#ifdef CONFIG_I2C mutex_lock(&dev->i2c_mutex); if (dev->i2c_adapter) i2c_del_adapter(dev->i2c_adapter); kfree(dev->i2c_adapter); dev->i2c_adapter = NULL; mutex_unlock(&dev->i2c_mutex); +#endif /* CONFIG_I2C */ atomic_dec(&dev_nr);
Re: HD PVR question
Hi Simon, answering to linux-media@vger.kernel.org since such things should be asked and archieved on a mailing list. On Sat, Mar 21, 2009 at 02:23:33AM +0100, Simon Peter wrote: > > is there a way to set the resolution to 720x576 in the Linux driver > when capturing S-Video? If you feed a pal signal into the S-Video input the resolution should be 720 or 704 to 576. You have to select the s-video input and set the standard to pal variant with 50Hz. But if you don't do that you won't get any data. There is to my knowledge no scaler in the device. Janne -- 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: [PULL] http://hg.jannau.net/hdpvr-merge/ - Hauppauge HD PVR driver
On Wed, Mar 18, 2009 at 08:40:37PM -0300, Mauro Carvalho Chehab wrote: > On Thu, 19 Mar 2009 00:25:53 +0100 > Janne Grunau wrote: > > > > > Why haven't you just used the two video_ioctl2 handlers for > > > vidioc_encoder_cmd > > > and vidioc_try_encoder_cmd, like ivtv and cx18, instead of the above code? > > > > They were missing in the video_ioctl2 handler then I wrote the code. > > Ah, ok. Next time, you can just add the missing handler ;) yes, I was too lazy. > > I forgot to check if that's still the case. I'll change it in a minute. > > Ok. pushed as additional change for the unliky case that I broke something. Janne -- 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: [PULL] http://hg.jannau.net/hdpvr-merge/ - Hauppauge HD PVR driver
On Wed, Mar 18, 2009 at 08:12:17PM -0300, Mauro Carvalho Chehab wrote: > > Everything looks ok, except for this part of your code: > > +static long hdpvr_ioctl(struct file *filp, unsigned int cmd, unsigned long > arg) > +{ > + struct hdpvr_fh *fh = (struct hdpvr_fh *)filp->private_data; > + struct hdpvr_device *dev = fh->dev; > + int res; > + > + if (video_is_unregistered(dev->video_dev)) > + return -EIO; > + > + mutex_lock(&dev->io_mutex); > + switch (cmd) { > + case VIDIOC_TRY_ENCODER_CMD: > + case VIDIOC_ENCODER_CMD: { > + struct v4l2_encoder_cmd *enc = (struct v4l2_encoder_cmd *)arg; > + int try = cmd == VIDIOC_TRY_ENCODER_CMD; > + > + memset(&enc->raw, 0, sizeof(enc->raw)); > + switch (enc->cmd) { > + case V4L2_ENC_CMD_START: > + enc->flags = 0; > + if (try) > + return 0; > + res = hdpvr_start_streaming(dev); > + break; > + case V4L2_ENC_CMD_STOP: > + if (try) > + return 0; > + res = hdpvr_stop_streaming(dev); > + break; > + default: > + v4l2_dbg(MSG_INFO, hdpvr_debug, dev->video_dev, > +"Unsupported encoder cmd %d\n", enc->cmd); > + return -EINVAL; > + } > + break; > + } > + default: > + res = video_ioctl2(filp, cmd, arg); > + } > + mutex_unlock(&dev->io_mutex); > + return res; > +} > > Why haven't you just used the two video_ioctl2 handlers for vidioc_encoder_cmd > and vidioc_try_encoder_cmd, like ivtv and cx18, instead of the above code? They were missing in the video_ioctl2 handler then I wrote the code. I forgot to check if that's still the case. I'll change it in a minute. Janne > > Cheers, > Mauro -- 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: [PULL] http://hg.jannau.net/hdpvr-merge/ - Hauppauge HD PVR driver
On Wed, Mar 18, 2009 at 10:51:57PM +0100, Hans Verkuil wrote: > > Good to see this driver as well! And for the record: since it doesn't use > any i2c modules I have no problems with this driver :-) ;) Well it will start using lirc_zilog as i2c module. But since lirc is out of tree that's not a problem you have to care for. > It would be nice if you could add support for struct v4l2_device later. My > goal for 2.6.31 is to have all v4l drivers use that so that I can start > building on it. It's trivial right now since it doesn't do much besides > handling subdevs (which you don't use). But as I said: it's a nice-to-have > only. I looked at it but since it seemed only to be used for subdevs I didn't care. Janne -- 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
[PULL] http://hg.jannau.net/hdpvr-merge/ - Hauppauge HD PVR driver
Hi Mauro, please pull from http://hg.jannau.net/hdpvr-merge/ for the Hauppauge HD PVR driver. The repo has only two changesets. One adding V4L2_CID_SHARPNESS to a method in v4l2-common.c and the complete driver. The history of the driver will be available at http://hg.jannau.net/hdpvr/ so I think it's not worth adding the complete history to the kernel repo. [Janne Grunau ] adds V4L2_CID_SHARPNESS to v4l2_ctrl_query_fill() V4L2 Driver for the Hauppauge HD PVR usb capture device diffstat linux/drivers/media/video/hdpvr/Kconfig | 10 linux/drivers/media/video/hdpvr/Makefile |7 linux/drivers/media/video/hdpvr/hdpvr-control.c | 201 +++ linux/drivers/media/video/hdpvr/hdpvr-core.c | 446 +++ linux/drivers/media/video/hdpvr/hdpvr-i2c.c | 145 ++ linux/drivers/media/video/hdpvr/hdpvr-video.c | 1228 ++ linux/drivers/media/video/hdpvr/hdpvr.h | 298 + linux/drivers/media/video/Kconfig |2 linux/drivers/media/video/Makefile|2 linux/drivers/media/video/v4l2-common.c |1 linux/include/linux/i2c-id.h |1 11 files changed, 2341 insertions(+) -- 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: Possible omission in v4l2-common.c?
On Tuesday 03 March 2009 22:18:55 Hans Verkuil wrote: > On Tuesday 03 March 2009 13:50:30 Brandon Jenkins wrote: > > Hello all, > > > > I was upgrading drivers this morning to capture the latest changes > > for the cx18 and I received a merge conflict in v4l2-common.c. In > > my system, 1 HDPVR and 3 CX18s. The HDPVR sources are 5 weeks old > > from their last sync up but contain: > > > > case V4L2_CID_SHARPNESS: > > > > The newer sources do not, but still have reference to sharpness at > > line 420: case V4L2_CID_SHARPNESS:return > > "Sharpness"; > > > > Because I don't know which way the code is going (is sharpness in > > or out) I can't submit a patch, but thought I would raise here. > > Diff below was pulled from clean clone of v4l-dvb tree. > > Sharpness is definitely in. This is a bug, please submit this patch > with a Signed-off-by line and I'll get it merged. It is and afaik was never handled in v4l2_ctrl_query_fill(), the hdpvr tree adds that. Since I intend request the merge of the driver in a couple of days a seperate patch shouldn't be needed. janne -- 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: Possible omission in v4l2-common.c?
Hi, On Tuesday 03 March 2009 13:50:30 Brandon Jenkins wrote: > > I was upgrading drivers this morning to capture the latest changes > for the cx18 and I received a merge conflict in v4l2-common.c. In my > system, 1 HDPVR and 3 CX18s. The HDPVR sources are 5 weeks old from > their last sync up but contain: > > case V4L2_CID_SHARPNESS: > > The newer sources do not, but still have reference to sharpness at > line 420: case V4L2_CID_SHARPNESS:return "Sharpness"; > > Because I don't know which way the code is going (is sharpness in or > out) I can't submit a patch, but thought I would raise here. Diff > below was pulled from clean clone of v4l-dvb tree. That's seems to be a merge issue on your side. V4L2_CID_SHARPNESS was afaik never handled in v4l2_ctrl_query_fill(). I pushed a correctly merge hdpvr driver. Janne -- 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
Haupauge Nova-T 500 2.6.28 regression dib0700
Hi, I have some difficulties with the Hauppauge Nova-T 500 and 2.6.28 kernels. Following USB errors appear with 2.6.28.4 every 100ms: Feb 15 02:46:03 golem [ 7720.876132] usb 2-1: events/3 timed out on ep1in len=0/6 Feb 15 02:46:03 golem [ 7720.976039] usb 2-1: events/3 timed out on ep1in len=0/6 Feb 15 02:46:03 golem [ 7721.076068] usb 2-1: events/3 timed out on ep1in len=0/6 The device is still useable but occasionally I see the same error with additional usb errors (iirc same kernel and config) Feb 17 20:33:17 golem [ 14.733031] ehci_hcd :01:06.2: reused qh 8800bf80d140 schedule Feb 17 20:33:17 golem [ 14.733040] usb 2-1: link qh64-0001/8800bf80d140 start 63 [2/0 us] Feb 17 20:33:17 golem [ 14.783035] usb 2-1: unlink qh64-0001/8800bf80d140 start 63 [2/0 us] Feb 17 20:33:17 golem [ 14.783107] usb 2-1: events/3 timed out on ep1in len=0/6 ... Feb 17 20:34:12 golem [ 128.130059] ehci_hcd :01:06.2: reused qh 8800bf80d140 schedule Feb 17 20:34:12 golem [ 128.130069] usb 2-1: link qh64-0001/8800bf80d140 start 63 [2/0 us] Feb 17 20:34:12 golem [ 128.131007] ehci_hcd :01:06.2: force halt; handhake c2050014 00 004000 -> -110 ehci gives up and the device is unuseabe. This is still the case with 2.6.28.7. git bisect blames following change: | commit 99afb989b05b9fb1c7b3831ce4b7a000b214acdb | Author: Devin Heitmueller | Date: Sat Nov 15 07:13:07 2008 -0300 | | V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20 2.6.28.x with DVB drivers from v4l-dvb hg works as expected bu I fail to see which changeset fixed it. If you have an idea I'll test it. Otherwise I'll bisect v4l-dvb hg. This should be fixed in 2.6.28-stable. Janne -- 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: [PULL] http://linuxtv.org/hg/~mcisely/pvrusb2
On Friday 16 January 2009 15:39:33 Mike Isely wrote: > In any case, right now the serial number in the pvrusb2 is not available > through that means because I haven't done anything to make it available > to udev. I'd like to do something, but so far I have found no > information on how to make that happen. You shouldn't need to do anything special. The serial number is available through the parent USB device. It can be used for udev rules through ATTRS{serial} and in sysfs entry of the video device through device/serial. Janne -- 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: [PULL] http://linuxtv.org/hg/~mcisely/pvrusb2
On Wednesday 14 January 2009 17:32:07 Mike Isely wrote: > I was asked to make this change, because otherwise there's no means via > the V4L interface to uniquely REPEATABLY be able to identify the same > device each time it is plugged in. I have gotten complaints about this. The serial number of the usb device should be available to udev through ATTRS{serial}. That's how we solved it for owners of multilpe HD PVRs. HTH Janne -- 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