How's this look instead? I added names for all the streams, use what I
think are the proper variables and units for the parameters. (This is
obviously with dynbuff off):
ivtv: Configuring WinTV PVR 150 card with 5 streams
ivtv: Registered v4l2 device for encoder MPEG minor 1
ivtv: Create DMA encoder MPEG stream: 32 x 131072 buffers (4096KB total)
ivtv: Allocate DMA encoder MPEG stream: 32 x 131072 buffers (4096KB total)
ivtv: Registered v4l2 device for encoder YUV minor 33
ivtv: Create DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv: Registered v4l2 device for encoder VBI minor 225
ivtv: Create DMA encoder VBI stream: 240 x 8736 buffers (2048KB total)
ivtv: Allocate DMA encoder VBI stream: 240 x 8736 buffers (2048KB total)
ivtv: Registered v4l2 device for encoder PCM audio minor 25
ivtv: Create DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB total)
ivtv: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB
total)
ivtv: Registered v4l2 device for encoder radio minor 65
ivtv: Create encoder radio stream
ivtv: Allocate encoder radio stream
**
Chris Kennedy wrote:
Ah, very possibly true, that line is more of a hacked up status line
from the old original one, so really could just be redone, I haven't
looked at it too closely besides just generally seeing it kinda makes
sense in the messages still, but sounds like an oddity there which
needs to be changed most likely.
Thanks,
Chris
Bryan Mayland wrote:
What I was saying was that on line 96, s->buf_min isn't set, since
the initialization of the buffer limits starts right below that,
doesn't it? ivtv_stream_init() is only called from
ivtv_stream_setup() which is only called from ivtv_streams_setup(),
which looks to only happen when the card is first pci probed. I'm
not all that familar with the streams setup, but that's how it looks
to me.
In either case, the value should be >> 10, since the printf says
"kbytes" but the value for both buf_min and buffers is in bytes, no?
Chris Kennedy wrote:
It's not allocated yet, just shows how much memory is allocated to
begin with, so when dynamic buffers are used (the default) that's
what it'll say.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel
Index: driver/ivtv-queue.c
===================================================================
--- driver/ivtv-queue.c (revision 317)
+++ driver/ivtv-queue.c (working copy)
@@ -20,6 +20,7 @@
*/
#include "ivtv-driver.h"
+#include "ivtv-streams.h"
#include "ivtv-queue.h"
#include "ivtv-dma.h"
#include "ivtv-mailbox.h"
@@ -1463,15 +1464,16 @@
}
if (s->buffers) {
- IVTV_KERN_INFO("Allocate %sstream %d using %d %d byte buffers "
- " %d kbytes total\n",
- s->dma != PCI_DMA_NONE ? "DMA " : "",
- streamtype, (s->buffers / s->bufsize),
- s->bufsize, s->buf_min);
+ IVTV_KERN_INFO("Allocate %s%s stream: "
+ "%d x %d buffers (%dKB total)\n",
+ s->dma != PCI_DMA_NONE ? "DMA " : "",
+ ivtv_stream_name(streamtype),
+ (s->buf_min / s->bufsize), s->bufsize,
+ (s->buf_min / 1024));
} else {
- IVTV_KERN_INFO("Allocate %sstream %d \n",
+ IVTV_KERN_INFO("Allocate %s%s stream\n",
s->dma != PCI_DMA_NONE ? "DMA " : "",
- streamtype);
+ ivtv_stream_name(streamtype));
}
/* Allocate DMA SG Arrays */
@@ -1504,8 +1506,8 @@
if (s->buffers && ivtv_init_queues_nolock(itv,
streamtype, s->buf_min,
s->bufsize) < 0) {
- IVTV_KERN_ERR("Couldn't allocate buffers, " "streamtype %d\n",
- streamtype);
+ IVTV_KERN_ERR("Couldn't allocate buffers for %s stream\n",
+ ivtv_stream_name(streamtype));
/* Free SG Array/Lists */
if (s->SGarray != NULL) {
@@ -1636,3 +1638,30 @@
return 0;
}
+const char *ivtv_stream_name(int streamtype)
+{
+ switch (streamtype) {
+ case IVTV_ENC_STREAM_TYPE_MPG:
+ return "encoder MPEG";
+ case IVTV_ENC_STREAM_TYPE_YUV:
+ return "encoder YUV";
+ case IVTV_ENC_STREAM_TYPE_VBI:
+ return "encoder VBI";
+ case IVTV_ENC_STREAM_TYPE_PCM:
+ return "encoder PCM audio";
+ case IVTV_ENC_STREAM_TYPE_RAD:
+ return "encoder radio";
+ case IVTV_DEC_STREAM_TYPE_MPG:
+ return "decoder MPEG";
+ case IVTV_DEC_STREAM_TYPE_VBI:
+ return "decoder VBI";
+ case IVTV_DEC_STREAM_TYPE_VOUT:
+ return "decoder VOUT";
+ case IVTV_DEC_STREAM_TYPE_YUV:
+ return "decoder YUV";
+ case IVTV_DEC_STREAM_TYPE_OSD:
+ return "decoder OSD";
+ default:
+ return "unknown";
+ }
+}
Index: driver/ivtv-queue.h
===================================================================
--- driver/ivtv-queue.h (revision 317)
+++ driver/ivtv-queue.h (working copy)
@@ -134,3 +134,4 @@
int ivtv_stream_alloc(struct ivtv *itv, int streamtype);
void ivtv_stop_stream(struct ivtv *itv, int stream);
int unlock_TO_dma(struct ivtv *itv, int stream_type);
+const char *ivtv_stream_name(int streamtype);
Index: driver/ivtv-streams.c
===================================================================
--- driver/ivtv-streams.c (revision 317)
+++ driver/ivtv-streams.c (working copy)
@@ -89,14 +89,16 @@
struct ivtv_stream *s = &itv->streams[streamtype];
if (buffers) {
- IVTV_KERN_INFO("Create %sstream %d using %d %d byte buffers "
- " %d kbytes total\n",
+ IVTV_KERN_INFO("Create %s%s stream: "
+ "%d x %d buffers (%dKB total)\n",
+ dma != PCI_DMA_NONE ? "DMA " : "",
+ ivtv_stream_name(streamtype),
+ (buffers / bufsize), bufsize,
+ (buffers / 1024));
+ } else {
+ IVTV_KERN_INFO("Create %s%s stream\n",
dma != PCI_DMA_NONE ? "DMA " : "",
- streamtype, (buffers / bufsize), bufsize,
- s->buf_min);
- } else {
- IVTV_KERN_INFO("Create %sstream %d \n",
- dma != PCI_DMA_NONE ? "DMA " : "", streamtype);
+ ivtv_stream_name(streamtype));
}
/* Translate streamtype to buffers limit */
@@ -224,16 +226,16 @@
then any free one. */
if (video_register_device(s->v4l2dev, reg_type, minor) &&
video_register_device(s->v4l2dev, reg_type, -1)) {
- IVTV_KERN_ERR("Couldn't register v4l2 device, "
- "streamtype %d, minor %d\n", streamtype, minor);
+ IVTV_KERN_ERR("Couldn't register v4l2 device for %s minor %d\n",
+ ivtv_stream_name(streamtype), minor);
video_device_release(s->v4l2dev);
s->v4l2dev = NULL;
return -ENOMEM;
}
- IVTV_KERN_INFO("Registered v4l2 device, streamtype %d minor %d\n",
- streamtype, s->v4l2dev->minor);
+ IVTV_KERN_INFO("Registered v4l2 device for %s minor %d\n",
+ ivtv_stream_name(streamtype), s->v4l2dev->minor);
/* Success! All done. */