Lines Matching defs:port
57 struct saa7164_dev *dev = buf->port->dev;
78 struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_port *port,
81 struct tmHWStreamParameters *params = &port->hw_streamingparams;
83 struct saa7164_dev *dev = port->dev;
96 buf->port = port;
106 buf->cpu = pci_alloc_consistent(port->dev->pci, buf->pci_size,
111 buf->pt_cpu = pci_alloc_consistent(port->dev->pci, buf->pt_size,
140 pci_free_consistent(port->dev->pci, buf->pci_size, buf->cpu, buf->dma);
153 if (!buf || !buf->port)
155 dev = buf->port->dev;
171 int saa7164_buffer_zero_offsets(struct saa7164_port *port, int i)
173 struct saa7164_dev *dev = port->dev;
175 if ((i < 0) || (i >= port->hwcfg.buffercount))
180 saa7164_writel(port->bufoffset + (sizeof(u32) * i), 0);
188 struct saa7164_port *port = buf->port;
189 struct saa7164_dev *dev = port->dev;
191 if ((i < 0) || (i >= port->hwcfg.buffercount))
201 saa7164_writel(port->bufoffset + (sizeof(u32) * i), 0);
202 saa7164_writel(port->bufptr32h + ((sizeof(u32) * 2) * i), buf->pt_dma);
203 saa7164_writel(port->bufptr32l + ((sizeof(u32) * 2) * i), 0);
207 (u64)port->bufoffset + (i * sizeof(u32)),
208 saa7164_readl(port->bufoffset + (sizeof(u32) * i)),
209 (u64)port->bufptr32h + ((sizeof(u32) * 2) * i),
210 (u64)port->bufptr32l + ((sizeof(u32) * 2) * i),
211 saa7164_readl(port->bufptr32h + ((sizeof(u32) * i) * 2)),
212 saa7164_readl(port->bufptr32l + ((sizeof(u32) * i) * 2)),
218 int saa7164_buffer_cfg_port(struct saa7164_port *port)
220 struct tmHWStreamParameters *params = &port->hw_streamingparams;
221 struct saa7164_dev *dev = port->dev;
226 dprintk(DBGLVL_BUF, "%s(port=%d)\n", __func__, port->nr);
228 saa7164_writel(port->bufcounter, 0);
229 saa7164_writel(port->pitch, params->pitch);
230 saa7164_writel(port->bufsize, params->pitch * params->numberoflines);
234 dprintk(DBGLVL_BUF, " bufcounter 0x%x = 0x%x\n", port->bufcounter,
235 saa7164_readl(port->bufcounter));
237 dprintk(DBGLVL_BUF, " pitch 0x%x = %d\n", port->pitch,
238 saa7164_readl(port->pitch));
240 dprintk(DBGLVL_BUF, " bufsize 0x%x = %d\n", port->bufsize,
241 saa7164_readl(port->bufsize));
243 dprintk(DBGLVL_BUF, " buffercount = %d\n", port->hwcfg.buffercount);
244 dprintk(DBGLVL_BUF, " bufoffset = 0x%x\n", port->bufoffset);
245 dprintk(DBGLVL_BUF, " bufptr32h = 0x%x\n", port->bufptr32h);
246 dprintk(DBGLVL_BUF, " bufptr32l = 0x%x\n", port->bufptr32l);
249 mutex_lock(&port->dmaqueue_lock);
250 list_for_each_safe(c, n, &port->dmaqueue.list) {
259 BUG_ON(i > port->hwcfg.buffercount);
263 mutex_unlock(&port->dmaqueue_lock);