2008-05-24 10:33:34 video in-out.
Pranay Upadhyay (INDIA)
Message: 56249
Hello ,
Can you explained me about the function used in the file "arch/blackfin/mach-bf561/coreb.c" .The function is
static ssize_t coreb_write(struct file *file, const char *buf, size_t count, loff_t * ppos)
and
static ssize_t coreb_read(struct file *file, char *buf, size_t count, loff_t * ppos)
in these two function I am not getting the term "CH_MEM_STREAM2_SRC, coreb_base + p
and CH_MEM_STREAM2_DEST.
I am not getting that in the same read and write function ,How can we use source and destination channel for transmit.I want to use the ppi driver for video in-out.
please reply soon.May be my problem will be solve after this issue.
Regards
Pranay
QuoteReplyEditDelete
2008-05-26 00:16:20 Re: video in-out.
Yi Li (CHINA)
Message: 56260
arch/blackfin/mach-bf561/coreb.c is a driver used by uclinux-dist/user/blkfin-apps/corebld to excecute a specially program on coreb. It has nothing to do with PPI.
QuoteReplyEditDelete
2008-05-26 08:58:54 Re: video in-out.
Pranay Upadhyay (INDIA)
Message: 56272
Hello YiLi,
Ok,I am asking that what is the meaning of that term used in this read and write function.Because when I am using the read and write function in the ppi driver for reading and writing function in same core B.Please explain about these two terms used in that function"CH_MEM_STREAM2_SRC, coreb_base + p and CH_MEM_STREAM2_DEST. My ppi0 and ppi1 driver working properly but know I want real time video in-out after using these two driver.If you have any idea about than please explain me clearly or tell me about some link.Thanks for your kind response.
-Regards
Pranay
QuoteReplyEditDelete
2008-05-26 14:30:37 Re: video in-out.
Mike Frysinger (UNITED STATES)
Message: 56278
just grep for them in the Blackfin headers ... they are simply numbers which represent some DMA channel
QuoteReplyEditDelete
2008-05-27 08:56:03 Re: video in-out.
Pranay Upadhyay (INDIA)
Message: 56302
Hello sir,
In this read functoin may I use /* Source Channel */ and /* Destination Channel */ in the same functon. If in ppio I am using the dma1_0 channel for source and in ppi1 driver I am using the dma1_1 for destination.Then why In this function there are both, source and destination. And also I have no clear about the "loff_t * ppos".
In my case ppi0 recieve the one frame and send to the ppi1 driver but just after sendinfg one frame there is not able to read the next frame.
In read function I am using only one /* Source Channel */ , there is no any /* Destination Channel */ .If I got idea about this then I want to use the both source and destination in the read function and only destination channel in the write function.
I am attatching the, my view for the video in-out for real time video. I am telling you that for single frame my both driver is working properly .
static ssize_t coreb_read(struct file *file, char *buf, size_t count,
loff_t * ppos)
{
unsigned long p = *ppos;
ssize_t read = 0;
if ((p + count) > coreb_size)
return -EFAULT;
while (count > 0) {
int len = count;
if (len > PAGE_SIZE)
len = PAGE_SIZE;
coreb_dma_done = 0;
/* Source Channel */
set_dma_start_addr(CH_MEM_STREAM2_SRC, coreb_base + p);
set_dma_x_count(CH_MEM_STREAM2_SRC, len);
set_dma_x_modify(CH_MEM_STREAM2_SRC, sizeof(char));
set_dma_config(CH_MEM_STREAM2_SRC, RESTART);
/* Destination Channel */
set_dma_start_addr(CH_MEM_STREAM2_DEST, (unsigned long)buf);
set_dma_x_count(CH_MEM_STREAM2_DEST, len);
set_dma_x_modify(CH_MEM_STREAM2_DEST, sizeof(char));
set_dma_config(CH_MEM_STREAM2_DEST, WNR | RESTART | DI_EN);
enable_dma(CH_MEM_STREAM2_SRC);
enable_dma(CH_MEM_STREAM2_DEST);
wait_event_interruptible(coreb_dma_wait, coreb_dma_done);
disable_dma(CH_MEM_STREAM2_SRC);
disable_dma(CH_MEM_STREAM2_DEST);
count -= len;
read += len;
buf += len;
p += len;
}
return read;
}
SINGLE CORE.doc