Home
last modified time | relevance | path

Searched refs:nsamples (Results 1 – 21 of 21) sorted by relevance

/drivers/staging/comedi/drivers/
Dni_labpc_isadma.c90 unsigned int nsamples; in labpc_drain_dma() local
104 nsamples = max_samples - comedi_bytes_to_samples(s, residue); in labpc_drain_dma()
106 if (devpriv->count <= nsamples) { in labpc_drain_dma()
107 nsamples = devpriv->count; in labpc_drain_dma()
110 leftover = devpriv->count - nsamples; in labpc_drain_dma()
114 devpriv->count -= nsamples; in labpc_drain_dma()
120 comedi_buf_write_samples(s, desc->virt_addr, nsamples); in labpc_drain_dma()
Dpcl816.c119 unsigned int nsamples; in pcl816_ai_setup_dma() local
127 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in pcl816_ai_setup_dma()
128 if (nsamples > unread_samples) { in pcl816_ai_setup_dma()
129 nsamples -= unread_samples; in pcl816_ai_setup_dma()
130 desc->size = comedi_samples_to_bytes(s, nsamples); in pcl816_ai_setup_dma()
247 unsigned int nsamples; in pcl816_interrupt() local
261 nsamples = comedi_bytes_to_samples(s, desc->size) - in pcl816_interrupt()
268 pcl816_ai_setup_dma(dev, s, nsamples); in pcl816_interrupt()
270 transfer_from_dma_buf(dev, s, desc->virt_addr, bufptr, nsamples); in pcl816_interrupt()
Ddas16.c458 unsigned int nsamples; in das16_ai_setup_dma() local
464 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in das16_ai_setup_dma()
465 if (nsamples > unread_samples) { in das16_ai_setup_dma()
466 nsamples -= unread_samples; in das16_ai_setup_dma()
467 desc->size = comedi_samples_to_bytes(s, nsamples); in das16_ai_setup_dma()
483 unsigned int nsamples; in das16_interrupt() local
507 nsamples = comedi_bytes_to_samples(s, nbytes); in das16_interrupt()
510 if (nsamples) { in das16_interrupt()
512 das16_ai_setup_dma(dev, s, nsamples); in das16_interrupt()
517 comedi_buf_write_samples(s, desc->virt_addr, nsamples); in das16_interrupt()
Dpcl812.c533 unsigned int nsamples; in pcl812_ai_setup_dma() local
545 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in pcl812_ai_setup_dma()
546 if (nsamples > unread_samples) { in pcl812_ai_setup_dma()
547 nsamples -= unread_samples; in pcl812_ai_setup_dma()
548 desc->size = comedi_samples_to_bytes(s, nsamples); in pcl812_ai_setup_dma()
820 unsigned int nsamples; in pcl812_handle_dma() local
823 nsamples = comedi_bytes_to_samples(s, desc->size) - in pcl812_handle_dma()
830 pcl812_ai_setup_dma(dev, s, nsamples); in pcl812_handle_dma()
832 transfer_from_dma_buf(dev, s, desc->virt_addr, bufptr, nsamples); in pcl812_handle_dma()
Ddas1800.c473 unsigned int nsamples = comedi_nsamples_left(s, FIFO_SIZE / 2); in das1800_handle_fifo_half_full() local
475 insw(dev->iobase + DAS1800_FIFO, devpriv->fifo_buf, nsamples); in das1800_handle_fifo_half_full()
476 munge_data(dev, devpriv->fifo_buf, nsamples); in das1800_handle_fifo_half_full()
477 comedi_buf_write_samples(s, devpriv->fifo_buf, nsamples); in das1800_handle_fifo_half_full()
508 unsigned int nsamples; in das1800_flush_dma_channel() local
511 nsamples = comedi_bytes_to_samples(s, nbytes); in das1800_flush_dma_channel()
512 nsamples = comedi_nsamples_left(s, nsamples); in das1800_flush_dma_channel()
514 munge_data(dev, desc->virt_addr, nsamples); in das1800_flush_dma_channel()
515 comedi_buf_write_samples(s, desc->virt_addr, nsamples); in das1800_flush_dma_channel()
Dpcl818.c308 unsigned int nsamples; in pcl818_ai_setup_dma() local
316 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in pcl818_ai_setup_dma()
317 if (nsamples > unread_samples) { in pcl818_ai_setup_dma()
318 nsamples -= unread_samples; in pcl818_ai_setup_dma()
319 desc->size = comedi_samples_to_bytes(s, nsamples); in pcl818_ai_setup_dma()
480 unsigned int nsamples = comedi_bytes_to_samples(s, desc->size); in pcl818_handle_dma() local
487 pcl818_ai_setup_dma(dev, s, nsamples); in pcl818_handle_dma()
489 for (i = 0; i < nsamples; i++) { in pcl818_handle_dma()
Dusbduxfast.c244 unsigned int nsamples; in usbduxfast_ai_handle_urb() local
246 nsamples = comedi_bytes_to_samples(s, urb->actual_length); in usbduxfast_ai_handle_urb()
247 nsamples = comedi_nsamples_left(s, nsamples); in usbduxfast_ai_handle_urb()
248 comedi_buf_write_samples(s, urb->transfer_buffer, nsamples); in usbduxfast_ai_handle_urb()
Dcomedi_test.c185 unsigned int nsamples; in waveform_ai_timer() local
189 nsamples = comedi_nsamples_left(s, UINT_MAX); in waveform_ai_timer()
191 while (nsamples && devpriv->ai_convert_time < now) { in waveform_ai_timer()
210 nsamples--; in waveform_ai_timer()
Dcb_pcidas64.c2755 unsigned int nsamples; in pio_drain_ai_fifo_32() local
2763 nsamples = comedi_nsamples_left(s, 100000); in pio_drain_ai_fifo_32()
2764 for (i = 0; read_code != write_code && i < nsamples;) { in pio_drain_ai_fifo_32()
2771 if (i < nsamples) { in pio_drain_ai_fifo_32()
2943 unsigned int nsamples = comedi_bytes_to_samples(s, max_bytes); in cb_pcidas64_ao_fill_buffer() local
2946 nsamples = comedi_nsamples_left(s, nsamples); in cb_pcidas64_ao_fill_buffer()
2947 actual_bytes = comedi_buf_read_samples(s, dest, nsamples); in cb_pcidas64_ao_fill_buffer()
2959 unsigned int nsamples; in load_ao_dma_buffer() local
2963 nsamples = cb_pcidas64_ao_fill_buffer(dev, s, in load_ao_dma_buffer()
2966 if (nsamples == 0) in load_ao_dma_buffer()
[all …]
Ddt282x.c425 unsigned int nsamples = comedi_bytes_to_samples(s, desc->maxsize); in dt282x_ao_setup_dma() local
428 nbytes = comedi_buf_read_samples(s, desc->virt_addr, nsamples); in dt282x_ao_setup_dma()
461 unsigned int nsamples = comedi_bytes_to_samples(s, desc->size); in dt282x_ai_dma_interrupt() local
470 ret = comedi_buf_write_samples(s, desc->virt_addr, nsamples); in dt282x_ai_dma_interrupt()
474 devpriv->nread -= nsamples; in dt282x_ai_dma_interrupt()
Dcb_pcidas.c992 unsigned int nsamples) in cb_pcidas_ao_load_fifo() argument
997 nsamples = comedi_nsamples_left(s, nsamples); in cb_pcidas_ao_load_fifo()
998 nbytes = comedi_buf_read_samples(s, devpriv->ao_buffer, nsamples); in cb_pcidas_ao_load_fifo()
1000 nsamples = comedi_bytes_to_samples(s, nbytes); in cb_pcidas_ao_load_fifo()
1002 devpriv->ao_buffer, nsamples); in cb_pcidas_ao_load_fifo()
Dquatech_daqp_cs.c571 unsigned long long nsamples; in daqp_ai_cmd() local
574 nsamples = (unsigned long long)cmd->stop_arg * in daqp_ai_cmd()
576 nbytes = nsamples * comedi_bytes_per_sample(s); in daqp_ai_cmd()
Daddi_apci_3120.c441 unsigned int nsamples; in apci3120_interrupt_dma() local
455 nsamples = comedi_bytes_to_samples(s, nbytes); in apci3120_interrupt_dma()
456 if (nsamples) { in apci3120_interrupt_dma()
457 comedi_buf_write_samples(s, dmabuf->virt, nsamples); in apci3120_interrupt_dma()
Dni_mio_common.c1066 unsigned int nsamples; in ni_ao_fifo_half_empty() local
1074 nsamples = comedi_bytes_to_samples(s, nbytes); in ni_ao_fifo_half_empty()
1075 if (nsamples > board->ao_fifo_depth / 2) in ni_ao_fifo_half_empty()
1076 nsamples = board->ao_fifo_depth / 2; in ni_ao_fifo_half_empty()
1078 ni_ao_fifo_load(dev, s, nsamples); in ni_ao_fifo_half_empty()
1089 unsigned int nsamples; in ni_ao_prep_fifo() local
1101 nsamples = comedi_bytes_to_samples(s, nbytes); in ni_ao_prep_fifo()
1102 if (nsamples > board->ao_fifo_depth) in ni_ao_prep_fifo()
1103 nsamples = board->ao_fifo_depth; in ni_ao_prep_fifo()
1105 ni_ao_fifo_load(dev, s, nsamples); in ni_ao_prep_fifo()
[all …]
Damplc_pci230.c2014 unsigned int nsamples; in pci230_handle_ai() local
2019 nsamples = comedi_nsamples_left(s, PCI230_ADC_FIFOLEVEL_HALFFULL); in pci230_handle_ai()
2020 if (nsamples == 0) in pci230_handle_ai()
2024 for (i = 0; i < nsamples; i++) { in pci230_handle_ai()
/drivers/staging/comedi/
Dcomedi_buf.c558 const void *data, unsigned int nsamples) in comedi_buf_write_samples() argument
569 if (nsamples > max_samples) { in comedi_buf_write_samples()
572 nsamples = max_samples; in comedi_buf_write_samples()
575 if (nsamples == 0) in comedi_buf_write_samples()
579 comedi_samples_to_bytes(s, nsamples)); in comedi_buf_write_samples()
604 void *data, unsigned int nsamples) in comedi_buf_read_samples() argument
612 if (nsamples > max_samples) in comedi_buf_read_samples()
613 nsamples = max_samples; in comedi_buf_read_samples()
615 if (nsamples == 0) in comedi_buf_read_samples()
619 comedi_samples_to_bytes(s, nsamples)); in comedi_buf_read_samples()
Dcomedidev.h825 unsigned int nsamples) in comedi_samples_to_bytes() argument
827 return nsamples << comedi_sample_shift(s); in comedi_samples_to_bytes()
965 const void *data, unsigned int nsamples);
967 void *data, unsigned int nsamples);
991 unsigned int nsamples);
Ddrivers.c481 unsigned int nsamples) in comedi_nsamples_left() argument
497 if (samples_left < nsamples) in comedi_nsamples_left()
498 nsamples = samples_left; in comedi_nsamples_left()
500 return nsamples; in comedi_nsamples_left()
/drivers/gpu/drm/radeon/
Dr600_cs.c46 u32 nsamples; member
243 u32 nsamples; member
258 u32 tile_bytes = tile_width * tile_height * values->blocksize * values->nsamples; in r600_get_array_mode_alignment()
278 (tile_height * values->blocksize * values->nsamples))); in r600_get_array_mode_alignment()
286 (values->blocksize * values->nsamples * tile_width))); in r600_get_array_mode_alignment()
290 (*pitch_align) * values->blocksize * (*height_align) * values->nsamples); in r600_get_array_mode_alignment()
321 track->nsamples = 16; in r600_cs_track_init()
360 unsigned nsamples = track->is_resolve && i == 1 ? 1 : track->nsamples; in r600_cs_track_validate_cb() local
384 array_check.nsamples = nsamples; in r600_cs_track_validate_cb()
430 r600_fmt_get_blocksize(format) * nsamples; in r600_cs_track_validate_cb()
[all …]
Devergreen_cs.c47 u32 nsamples; /* unused */ member
180 unsigned nsamples; member
193 surf->layer_size = surf->nbx * surf->nby * surf->bpe * surf->nsamples; in evergreen_surface_check_linear()
208 surf->layer_size = surf->nbx * surf->nby * surf->bpe * surf->nsamples; in evergreen_surface_check_linear_aligned()
229 palign = track->group_size / (8 * surf->bpe * surf->nsamples); in evergreen_surface_check_1d()
239 track->group_size, surf->bpe, surf->nsamples); in evergreen_surface_check_1d()
261 tileb = 64 * surf->bpe * surf->nsamples; in evergreen_surface_check_2d()
413 surf.nsamples = 1; in evergreen_cs_track_validate_cb()
460 size = nby * surf.nbx * surf.bpe * surf.nsamples; in evergreen_cs_track_validate_cb()
485 surf.mode, surf.bpe, surf.nsamples, in evergreen_cs_track_validate_cb()
[all …]
/drivers/net/wireless/brcm80211/brcmsmac/phy/
Dphy_lcn.c1323 static u32 wlc_lcnphy_measure_digital_power(struct brcms_phy *pi, u16 nsamples) in wlc_lcnphy_measure_digital_power() argument
1327 if (!wlc_lcnphy_rx_iq_est(pi, nsamples, 32, &iq_est)) in wlc_lcnphy_measure_digital_power()
1329 return (iq_est.i_pwr + iq_est.q_pwr) / nsamples; in wlc_lcnphy_measure_digital_power()