Home
last modified time | relevance | path

Searched refs:period_bytes (Results 1 – 25 of 71) sorted by relevance

123

/linux/sound/soc/codecs/
H A Drt5514-spi.c78 size_t period_bytes, truncated_bytes = 0; in rt5514_spi_copy_work() local
89 period_bytes = snd_pcm_lib_period_bytes(rt5514_dsp->substream); in rt5514_spi_copy_work()
90 if (!period_bytes) { in rt5514_spi_copy_work()
95 if (rt5514_dsp->buf_size % period_bytes) in rt5514_spi_copy_work()
96 rt5514_dsp->buf_size = (rt5514_dsp->buf_size / period_bytes) * in rt5514_spi_copy_work()
97 period_bytes; in rt5514_spi_copy_work()
112 if (remain_data < period_bytes) { in rt5514_spi_copy_work()
118 if (rt5514_dsp->buf_rp + period_bytes <= rt5514_dsp->buf_limit) { in rt5514_spi_copy_work()
121 period_bytes); in rt5514_spi_copy_work()
123 if (rt5514_dsp->buf_rp + period_bytes == rt5514_dsp->buf_limit) in rt5514_spi_copy_work()
[all …]
H A Drt5677-spi.c309 size_t new_bytes, copy_bytes, period_bytes; in rt5677_spi_copy_work() local
351 period_bytes = snd_pcm_lib_period_bytes(rt5677_dsp->substream); in rt5677_spi_copy_work()
353 copy_bytes = min(new_bytes, period_bytes in rt5677_spi_copy_work()
361 if (rt5677_dsp->avail_bytes >= period_bytes) { in rt5677_spi_copy_work()
368 delay = bytes_to_frames(runtime, period_bytes) / runtime->rate; in rt5677_spi_copy_work()
/linux/sound/soc/renesas/
H A Dsiu_pcm.c26 #define GET_MAX_PERIODS(buf_bytes, period_bytes) \ argument
27 ((buf_bytes) / (period_bytes))
28 #define PERIOD_OFFSET(buf_addr, period_num, period_bytes) \ argument
29 ((buf_addr) + ((period_num) * (period_bytes)))
88 siu_stream->period_bytes)) in siu_dma_tx_complete()
93 siu_stream->cur_period * siu_stream->period_bytes, in siu_dma_tx_complete()
223 siu_stream->period_bytes); in siu_io_work()
224 count = siu_stream->period_bytes; in siu_io_work()
232 siu_stream->period_bytes), in siu_io_work()
233 siu_stream->period_bytes); in siu_io_work()
[all …]
/linux/sound/virtio/
H A Dvirtio_pcm_msg.c133 unsigned int periods, unsigned int period_bytes) in virtsnd_pcm_msg_alloc() argument
145 u8 *data = runtime->dma_area + period_bytes * i; in virtsnd_pcm_msg_alloc()
146 int sg_num = virtsnd_pcm_sg_num(data, period_bytes); in virtsnd_pcm_msg_alloc()
159 period_bytes); in virtsnd_pcm_msg_alloc()
206 unsigned long period_bytes = snd_pcm_lib_period_bytes(vss->substream); in virtsnd_pcm_msg_send() local
212 start = offset / period_bytes; in virtsnd_pcm_msg_send()
213 end = (offset + bytes - 1) / period_bytes; in virtsnd_pcm_msg_send()
224 n = period_bytes - (offset % period_bytes); in virtsnd_pcm_msg_send()
229 if (msg->length == period_bytes) { in virtsnd_pcm_msg_send()
H A Dvirtio_pcm_ops.c155 unsigned int period_bytes, in virtsnd_pcm_dev_set_params() argument
190 request->period_bytes = cpu_to_le32(period_bytes); in virtsnd_pcm_dev_set_params()
288 unsigned int period_bytes = snd_pcm_lib_period_bytes(substream); in virtsnd_pcm_prepare() local
291 rc = virtsnd_pcm_dev_set_params(vss, buffer_bytes, period_bytes, in virtsnd_pcm_prepare()
/linux/sound/hda/core/
H A Dstream.c345 azx_dev->period_bytes = 0; in snd_hdac_stream_cleanup()
505 int i, ofs, periods, period_bytes; in snd_hdac_stream_setup_bdle() local
513 period_bytes = azx_dev->period_bytes; in snd_hdac_stream_setup_bdle()
514 periods = azx_dev->bufsize / period_bytes; in snd_hdac_stream_setup_bdle()
530 if (pos_adj >= period_bytes) { in snd_hdac_stream_setup_bdle()
546 &bdl, ofs, period_bytes - pos_adj, 0); in snd_hdac_stream_setup_bdle()
549 &bdl, ofs, period_bytes, in snd_hdac_stream_setup_bdle()
558 azx_dev->bufsize, period_bytes); in snd_hdac_stream_setup_bdle()
603 unsigned int bufsize, period_bytes; in snd_hdac_stream_set_params() local
609 period_bytes = snd_pcm_lib_period_bytes(substream); in snd_hdac_stream_set_params()
[all …]
/linux/sound/soc/au1x/
H A Ddbdma2.c53 unsigned long period_bytes; /* size in bytes of one SG segment */ member
81 cd->period_bytes, DDMA_FLAGS_IE); in au1x_pcm_queue_tx()
85 cd->dma_area += cd->period_bytes; in au1x_pcm_queue_tx()
95 cd->period_bytes, DDMA_FLAGS_IE); in au1x_pcm_queue_rx()
99 cd->dma_area += cd->period_bytes; in au1x_pcm_queue_rx()
110 cd->pos += cd->period_bytes; in au1x_pcm_dmatx_cb()
123 cd->pos += cd->period_bytes; in au1x_pcm_dmarx_cb()
219 pcd->period_bytes = params_period_bytes(params); in au1xpsc_pcm_hw_params()
H A Ddma.c64 unsigned int period_bytes, in au1000_setup_dma_link() argument
75 if (stream->period_size == period_bytes && in au1000_setup_dma_link()
81 stream->period_size = period_bytes; in au1000_setup_dma_link()
89 pointer->start = (u32)(dma_start + (i * period_bytes)); in au1000_setup_dma_link()
90 pointer->relative_end = (u32) (((i+1) * period_bytes) - 0x1); in au1000_setup_dma_link()
/linux/sound/pci/cs5535audio/
H A Dcs5535audio_pcm.c110 unsigned int period_bytes) in cs5535audio_build_dma_packets() argument
125 dma->period_bytes = dma->periods = 0; in cs5535audio_build_dma_packets()
128 if (dma->periods == periods && dma->period_bytes == period_bytes) in cs5535audio_build_dma_packets()
138 desc->size = cpu_to_le16(period_bytes); in cs5535audio_build_dma_packets()
140 addr += period_bytes; in cs5535audio_build_dma_packets()
151 dma->period_bytes = period_bytes; in cs5535audio_build_dma_packets()
/linux/sound/pci/
H A Dals300.c400 unsigned short period_bytes = snd_pcm_lib_period_bytes(substream); in snd_als300_playback_prepare() local
408 period_bytes, buffer_bytes); in snd_als300_playback_prepare()
412 tmp |= period_bytes - 1; in snd_als300_playback_prepare()
428 unsigned short period_bytes = snd_pcm_lib_period_bytes(substream); in snd_als300_capture_prepare() local
435 snd_als300_dbgplay("Period bytes: %d Buffer bytes %d\n", period_bytes, in snd_als300_capture_prepare()
440 tmp |= period_bytes - 1; in snd_als300_capture_prepare()
499 unsigned short period_bytes; in snd_als300_pointer() local
502 period_bytes = snd_pcm_lib_period_bytes(substream); in snd_als300_pointer()
508 if (current_ptr > period_bytes) in snd_als300_pointer()
511 current_ptr = period_bytes - current_ptr; in snd_als300_pointer()
[all …]
H A Datiixp_modem.c210 unsigned int period_bytes, periods; member
313 unsigned int period_bytes) in atiixp_build_dma_packets() argument
325 dma->period_bytes = dma->periods = 0; /* clear */ in atiixp_build_dma_packets()
328 if (dma->periods == periods && dma->period_bytes == period_bytes) in atiixp_build_dma_packets()
346 desc->size = period_bytes >> 2; /* in dwords */ in atiixp_build_dma_packets()
352 addr += period_bytes; in atiixp_build_dma_packets()
358 dma->period_bytes = period_bytes; in atiixp_build_dma_packets()
H A Datiixp.c234 unsigned int period_bytes, periods; member
344 unsigned int period_bytes) in atiixp_build_dma_packets() argument
358 dma->period_bytes = dma->periods = 0; /* clear */ in atiixp_build_dma_packets()
361 if (dma->periods == periods && dma->period_bytes == period_bytes) in atiixp_build_dma_packets()
379 desc->size = period_bytes >> 2; /* in dwords */ in atiixp_build_dma_packets()
385 addr += period_bytes; in atiixp_build_dma_packets()
391 dma->period_bytes = period_bytes; in atiixp_build_dma_packets()
/linux/sound/pci/lola/
H A Dlola_pcm.c279 str->period_bytes = 0; in lola_pcm_hw_params()
340 int i, ofs, periods, period_bytes; in lola_setup_periods() local
342 period_bytes = str->period_bytes; in lola_setup_periods()
343 periods = str->bufsize / period_bytes; in lola_setup_periods()
350 ofs = setup_bdle(substream, str, &bdl, ofs, period_bytes); in lola_setup_periods()
358 str->bufsize, period_bytes); in lola_setup_periods()
452 unsigned int bufsize, period_bytes, format_verb; in lola_pcm_prepare() local
467 period_bytes = snd_pcm_lib_period_bytes(substream); in lola_pcm_prepare()
471 str->period_bytes = period_bytes; in lola_pcm_prepare()
/linux/sound/soc/bcm/
H A Dcygnus-ssp.h31 unsigned period_bytes; member
41 .period_bytes = 0, \
51 .period_bytes = 0, \
/linux/sound/drivers/pcsp/
H A Dpcsp_lib.c92 size_t period_bytes, buffer_bytes; in pcsp_pointer_update() local
101 period_bytes = snd_pcm_lib_period_bytes(substream); in pcsp_pointer_update()
111 chip->playback_ptr, period_bytes, buffer_bytes); in pcsp_pointer_update()
115 periods_elapsed /= period_bytes; in pcsp_pointer_update()
121 chip->period_ptr += periods_elapsed * period_bytes; in pcsp_pointer_update()
/linux/sound/soc/amd/ps/
H A Dps-pdm-dma.c222 size_t size, period_bytes; in acp63_pdm_dma_hw_params() local
228 period_bytes = params_period_bytes(params); in acp63_pdm_dma_hw_params()
233 period_bytes, rtd->acp63_base); in acp63_pdm_dma_hw_params()
410 u32 period_bytes, buffer_len; in acp63_pdm_resume() local
416 period_bytes = frames_to_bytes(runtime, runtime->period_size); in acp63_pdm_resume()
420 period_bytes, adata->acp63_base); in acp63_pdm_resume()
H A Dps-sdw-dma.c349 u32 period_bytes; in acp63_sdw_dma_hw_params() local
415 period_bytes = params_period_bytes(params); in acp63_sdw_dma_hw_params()
428 writel(period_bytes, sdw_data->acp_base + water_mark_size_reg); in acp63_sdw_dma_hw_params()
694 u32 period_bytes, buf_size, water_mark_size_reg; in acp63_restore_sdw_dma_config() local
718 period_bytes = frames_to_bytes(runtime, runtime->period_size); in acp63_restore_sdw_dma_config()
726 writel(period_bytes, sdw_data->acp_base + water_mark_size_reg); in acp63_restore_sdw_dma_config()
739 u32 period_bytes, buf_size, water_mark_size_reg; in acp70_restore_sdw_dma_config() local
759 period_bytes = frames_to_bytes(runtime, runtime->period_size); in acp70_restore_sdw_dma_config()
767 writel(period_bytes, sdw_data->acp_base + water_mark_size_reg); in acp70_restore_sdw_dma_config()
/linux/sound/soc/amd/yc/
H A Dacp6x-pdm-dma.c220 size_t size, period_bytes; in acp6x_pdm_dma_hw_params() local
226 period_bytes = params_period_bytes(params); in acp6x_pdm_dma_hw_params()
231 period_bytes, rtd->acp6x_base); in acp6x_pdm_dma_hw_params()
402 u32 period_bytes, buffer_len; in acp6x_pdm_resume() local
408 period_bytes = frames_to_bytes(runtime, runtime->period_size); in acp6x_pdm_resume()
412 period_bytes, adata->acp6x_base); in acp6x_pdm_resume()
/linux/sound/soc/amd/renoir/
H A Dacp3x-pdm-dma.c244 size_t size, period_bytes; in acp_pdm_dma_hw_params() local
250 period_bytes = params_period_bytes(params); in acp_pdm_dma_hw_params()
254 init_pdm_ring_buffer(MEM_WINDOW_START, size, period_bytes, in acp_pdm_dma_hw_params()
451 u32 period_bytes, buffer_len; in acp_pdm_resume() local
457 period_bytes = frames_to_bytes(runtime, runtime->period_size); in acp_pdm_resume()
460 init_pdm_ring_buffer(MEM_WINDOW_START, buffer_len, period_bytes, in acp_pdm_resume()
/linux/sound/soc/amd/acp/
H A Dacp-pdm.c34 u32 physical_addr, size_dmic, period_bytes; in acp_dmic_prepare() local
44 period_bytes = frames_to_bytes(substream->runtime, in acp_dmic_prepare()
57 writel(period_bytes, chip->base + ACP_WOV_RX_INTR_WATERMARK_SIZE); in acp_dmic_prepare()
/linux/sound/soc/sof/intel/
H A Dhda-stream.c118 int i, offset, period_bytes, periods; in hda_dsp_stream_setup_bdl() local
121 period_bytes = hstream->period_bytes; in hda_dsp_stream_setup_bdl()
122 dev_dbg(sdev->dev, "period_bytes: %#x, bufsize: %#x\n", period_bytes, in hda_dsp_stream_setup_bdl()
125 if (!period_bytes) { in hda_dsp_stream_setup_bdl()
130 period_bytes = hstream->bufsize; in hda_dsp_stream_setup_bdl()
143 * Note: period_bytes == 0 can only happen for firmware or in hda_dsp_stream_setup_bdl()
149 period_bytes /= 2; in hda_dsp_stream_setup_bdl()
152 periods = hstream->bufsize / period_bytes; in hda_dsp_stream_setup_bdl()
[all...]
/linux/sound/core/oss/
H A Dpcm_oss.c776 runtime->oss.period_bytes = oss_period_size; in snd_pcm_oss_period_size()
955 n = snd_pcm_plug_slave_size(substream, runtime->oss.period_bytes / oss_frame_size); in snd_pcm_oss_change_params_locked()
1055 runtime->oss.period_bytes = oss_period_size; in snd_pcm_oss_change_params_locked()
1059 runtime->oss.period_bytes, in snd_pcm_oss_change_params_locked()
1070 runtime->oss.buffer = kvzalloc(runtime->oss.period_bytes, GFP_KERNEL); in snd_pcm_oss_change_params_locked()
1411 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) { in snd_pcm_oss_write1()
1413 if (tmp + runtime->oss.buffer_used > runtime->oss.period_bytes) in snd_pcm_oss_write1()
1414 tmp = runtime->oss.period_bytes - runtime->oss.buffer_used; in snd_pcm_oss_write1()
1426 runtime->oss.buffer_used == runtime->oss.period_bytes) { in snd_pcm_oss_write1()
1433 runtime->oss.period_ptr %= runtime->oss.period_bytes; in snd_pcm_oss_write1()
[all …]
/linux/sound/soc/amd/raven/
H A Dacp3x-i2s.c152 u32 val, period_bytes, reg_val, ier_val, water_val; in acp3x_i2s_trigger() local
157 period_bytes = frames_to_bytes(substream->runtime, in acp3x_i2s_trigger()
202 rv_writel(period_bytes, rtd->acp3x_base + water_val); in acp3x_i2s_trigger()
/linux/sound/soc/google/
H A Dchv3-i2s.c205 unsigned int buffer_bytes, period_bytes, period_size; in chv3_dma_prepare() local
208 period_bytes = snd_pcm_lib_period_bytes(substream); in chv3_dma_prepare()
221 chv3_i2s_wr(i2s, I2S_TX_IRQ, ((period_bytes / i2s->tx_bytes_to_fetch) << 8) | 1); in chv3_dma_prepare()
/linux/sound/soc/fsl/
H A Dmpc5200_dma.c67 bd->status = s->period_bytes; in psc_dma_bcom_enqueue_next_buffer()
68 bd->data[0] = s->runtime->dma_addr + (s->period_next * s->period_bytes); in psc_dma_bcom_enqueue_next_buffer()
127 s->period_bytes = frames_to_bytes(runtime, in psc_dma_trigger()
279 count = s->period_current * s->period_bytes; in psc_dma_pointer()

123