• Home
  • Raw
  • Download

Lines Matching refs:s

411 snd_nm256_set_format(struct nm256 *chip, struct nm256_stream *s,  in snd_nm256_set_format()  argument
418 s->shift = 0; in snd_nm256_set_format()
421 s->shift++; in snd_nm256_set_format()
425 s->shift++; in snd_nm256_set_format()
485 static void snd_nm256_pcm_mark(struct nm256 *chip, struct nm256_stream *s, int reg) in snd_nm256_pcm_mark() argument
487 s->cur_period++; in snd_nm256_pcm_mark()
488 s->cur_period %= s->periods; in snd_nm256_pcm_mark()
489 snd_nm256_writel(chip, reg, s->buf + s->cur_period * s->period_size); in snd_nm256_pcm_mark()
492 #define snd_nm256_playback_mark(chip, s) snd_nm256_pcm_mark(chip, s, NM_PBUFFER_WMARK) argument
493 #define snd_nm256_capture_mark(chip, s) snd_nm256_pcm_mark(chip, s, NM_RBUFFER_WMARK) argument
496 snd_nm256_playback_start(struct nm256 *chip, struct nm256_stream *s, in snd_nm256_playback_start() argument
500 snd_nm256_writel(chip, NM_PBUFFER_START, s->buf); in snd_nm256_playback_start()
501 snd_nm256_writel(chip, NM_PBUFFER_END, s->buf + s->dma_size - (1 << s->shift)); in snd_nm256_playback_start()
502 snd_nm256_writel(chip, NM_PBUFFER_CURRP, s->buf); in snd_nm256_playback_start()
503 snd_nm256_playback_mark(chip, s); in snd_nm256_playback_start()
513 snd_nm256_capture_start(struct nm256 *chip, struct nm256_stream *s, in snd_nm256_capture_start() argument
517 snd_nm256_writel(chip, NM_RBUFFER_START, s->buf); in snd_nm256_capture_start()
518 snd_nm256_writel(chip, NM_RBUFFER_END, s->buf + s->dma_size); in snd_nm256_capture_start()
519 snd_nm256_writel(chip, NM_RBUFFER_CURRP, s->buf); in snd_nm256_capture_start()
520 snd_nm256_capture_mark(chip, s); in snd_nm256_capture_start()
549 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_playback_trigger() local
552 if (snd_BUG_ON(!s)) in snd_nm256_playback_trigger()
558 s->suspended = 0; in snd_nm256_playback_trigger()
561 if (! s->running) { in snd_nm256_playback_trigger()
562 snd_nm256_playback_start(chip, s, substream); in snd_nm256_playback_trigger()
563 s->running = 1; in snd_nm256_playback_trigger()
567 s->suspended = 1; in snd_nm256_playback_trigger()
570 if (s->running) { in snd_nm256_playback_trigger()
572 s->running = 0; in snd_nm256_playback_trigger()
587 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_capture_trigger() local
590 if (snd_BUG_ON(!s)) in snd_nm256_capture_trigger()
597 if (! s->running) { in snd_nm256_capture_trigger()
598 snd_nm256_capture_start(chip, s, substream); in snd_nm256_capture_trigger()
599 s->running = 1; in snd_nm256_capture_trigger()
604 if (s->running) { in snd_nm256_capture_trigger()
606 s->running = 0; in snd_nm256_capture_trigger()
625 struct nm256_stream *s = runtime->private_data; in snd_nm256_pcm_prepare() local
627 if (snd_BUG_ON(!s)) in snd_nm256_pcm_prepare()
629 s->dma_size = frames_to_bytes(runtime, substream->runtime->buffer_size); in snd_nm256_pcm_prepare()
630 s->period_size = frames_to_bytes(runtime, substream->runtime->period_size); in snd_nm256_pcm_prepare()
631 s->periods = substream->runtime->periods; in snd_nm256_pcm_prepare()
632 s->cur_period = 0; in snd_nm256_pcm_prepare()
635 s->running = 0; in snd_nm256_pcm_prepare()
636 snd_nm256_set_format(chip, s, substream); in snd_nm256_pcm_prepare()
650 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_playback_pointer() local
653 if (snd_BUG_ON(!s)) in snd_nm256_playback_pointer()
655 curp = snd_nm256_readl(chip, NM_PBUFFER_CURRP) - (unsigned long)s->buf; in snd_nm256_playback_pointer()
656 curp %= s->dma_size; in snd_nm256_playback_pointer()
664 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_capture_pointer() local
667 if (snd_BUG_ON(!s)) in snd_nm256_capture_pointer()
669 curp = snd_nm256_readl(chip, NM_RBUFFER_CURRP) - (unsigned long)s->buf; in snd_nm256_capture_pointer()
670 curp %= s->dma_size; in snd_nm256_capture_pointer()
685 struct nm256_stream *s = runtime->private_data; in snd_nm256_playback_silence() local
687 memset_io(s->bufptr + pos, 0, count); in snd_nm256_playback_silence()
697 struct nm256_stream *s = runtime->private_data; in snd_nm256_playback_copy() local
699 if (copy_from_user_toio(s->bufptr + pos, src, count)) in snd_nm256_playback_copy()
710 struct nm256_stream *s = runtime->private_data; in snd_nm256_playback_copy_kernel() local
712 memcpy_toio(s->bufptr + pos, src, count); in snd_nm256_playback_copy_kernel()
725 struct nm256_stream *s = runtime->private_data; in snd_nm256_capture_copy() local
727 if (copy_to_user_fromio(dst, s->bufptr + pos, count)) in snd_nm256_capture_copy()
738 struct nm256_stream *s = runtime->private_data; in snd_nm256_capture_copy_kernel() local
740 memcpy_fromio(dst, s->bufptr + pos, count); in snd_nm256_capture_copy_kernel()
755 struct nm256_stream *s; in snd_nm256_playback_update() local
757 s = &chip->streams[SNDRV_PCM_STREAM_PLAYBACK]; in snd_nm256_playback_update()
758 if (s->running && s->substream) { in snd_nm256_playback_update()
760 snd_pcm_period_elapsed(s->substream); in snd_nm256_playback_update()
762 snd_nm256_playback_mark(chip, s); in snd_nm256_playback_update()
770 struct nm256_stream *s; in snd_nm256_capture_update() local
772 s = &chip->streams[SNDRV_PCM_STREAM_CAPTURE]; in snd_nm256_capture_update()
773 if (s->running && s->substream) { in snd_nm256_capture_update()
775 snd_pcm_period_elapsed(s->substream); in snd_nm256_capture_update()
777 snd_nm256_capture_mark(chip, s); in snd_nm256_capture_update()
835 static void snd_nm256_setup_stream(struct nm256 *chip, struct nm256_stream *s, in snd_nm256_setup_stream() argument
841 s->running = 0; in snd_nm256_setup_stream()
843 runtime->hw.buffer_bytes_max = s->bufsize; in snd_nm256_setup_stream()
844 runtime->hw.period_bytes_max = s->bufsize / 2; in snd_nm256_setup_stream()
845 runtime->dma_area = (void __force *) s->bufptr; in snd_nm256_setup_stream()
846 runtime->dma_addr = s->bufptr_addr; in snd_nm256_setup_stream()
847 runtime->dma_bytes = s->bufsize; in snd_nm256_setup_stream()
848 runtime->private_data = s; in snd_nm256_setup_stream()
849 s->substream = substream; in snd_nm256_setup_stream()
940 struct nm256_stream *s = &chip->streams[i]; in snd_nm256_pcm() local
941 s->bufptr = chip->buffer + (s->buf - chip->buffer_start); in snd_nm256_pcm()
942 s->bufptr_addr = chip->buffer_addr + (s->buf - chip->buffer_start); in snd_nm256_pcm()
1420 struct nm256_stream *s = &chip->streams[i]; in nm256_resume() local
1421 if (s->substream && s->suspended) { in nm256_resume()
1423 snd_nm256_set_format(chip, s, s->substream); in nm256_resume()