Lines Matching refs:substream
372 static void open_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream) in open_cs8427() argument
377 static void close_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream) in close_cs8427() argument
468 struct snd_pcm_substream *substream; in snd_ice1712_interrupt() local
474 substream = ice->playback_con_substream_ds[idx]; in snd_ice1712_interrupt()
475 if (substream != NULL) in snd_ice1712_interrupt()
476 snd_pcm_period_elapsed(substream); in snd_ice1712_interrupt()
500 static int snd_ice1712_hw_params(struct snd_pcm_substream *substream, in snd_ice1712_hw_params() argument
503 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_ice1712_hw_params()
506 static int snd_ice1712_hw_free(struct snd_pcm_substream *substream) in snd_ice1712_hw_free() argument
508 return snd_pcm_lib_free_pages(substream); in snd_ice1712_hw_free()
515 static int snd_ice1712_playback_trigger(struct snd_pcm_substream *substream, in snd_ice1712_playback_trigger() argument
518 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_trigger()
540 static int snd_ice1712_playback_ds_trigger(struct snd_pcm_substream *substream, in snd_ice1712_playback_ds_trigger() argument
543 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_ds_trigger()
548 tmp = snd_ice1712_ds_read(ice, substream->number * 2, ICE1712_DSC_CONTROL); in snd_ice1712_playback_ds_trigger()
560 snd_ice1712_ds_write(ice, substream->number * 2, ICE1712_DSC_CONTROL, tmp); in snd_ice1712_playback_ds_trigger()
565 static int snd_ice1712_capture_trigger(struct snd_pcm_substream *substream, in snd_ice1712_capture_trigger() argument
568 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_trigger()
586 static int snd_ice1712_playback_prepare(struct snd_pcm_substream *substream) in snd_ice1712_playback_prepare() argument
588 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_prepare()
589 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_playback_prepare()
592 period_size = (snd_pcm_lib_period_bytes(substream) >> 2) - 1; in snd_ice1712_playback_prepare()
593 buf_size = snd_pcm_lib_buffer_bytes(substream) - 1; in snd_ice1712_playback_prepare()
619 static int snd_ice1712_playback_ds_prepare(struct snd_pcm_substream *substream) in snd_ice1712_playback_ds_prepare() argument
621 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_ds_prepare()
622 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_playback_ds_prepare()
625 period_size = snd_pcm_lib_period_bytes(substream) - 1; in snd_ice1712_playback_ds_prepare()
634 ice->playback_con_active_buf[substream->number] = 0; in snd_ice1712_playback_ds_prepare()
635 ice->playback_con_virt_addr[substream->number] = runtime->dma_addr; in snd_ice1712_playback_ds_prepare()
636 chn = substream->number * 2; in snd_ice1712_playback_ds_prepare()
653 static int snd_ice1712_capture_prepare(struct snd_pcm_substream *substream) in snd_ice1712_capture_prepare() argument
655 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_prepare()
656 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_capture_prepare()
660 period_size = (snd_pcm_lib_period_bytes(substream) >> 2) - 1; in snd_ice1712_capture_prepare()
661 buf_size = snd_pcm_lib_buffer_bytes(substream) - 1; in snd_ice1712_capture_prepare()
678 static snd_pcm_uframes_t snd_ice1712_playback_pointer(struct snd_pcm_substream *substream) in snd_ice1712_playback_pointer() argument
680 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_pointer()
681 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_playback_pointer()
687 ptr = bytes_to_frames(substream->runtime, ptr); in snd_ice1712_playback_pointer()
693 static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(struct snd_pcm_substream *substream) in snd_ice1712_playback_ds_pointer() argument
695 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_ds_pointer()
699 if (!(snd_ice1712_ds_read(ice, substream->number * 2, ICE1712_DSC_CONTROL) & 1)) in snd_ice1712_playback_ds_pointer()
701 if (ice->playback_con_active_buf[substream->number]) in snd_ice1712_playback_ds_pointer()
705 ptr = snd_ice1712_ds_read(ice, substream->number * 2, addr) - in snd_ice1712_playback_ds_pointer()
706 ice->playback_con_virt_addr[substream->number]; in snd_ice1712_playback_ds_pointer()
707 ptr = bytes_to_frames(substream->runtime, ptr); in snd_ice1712_playback_ds_pointer()
708 if (ptr == substream->runtime->buffer_size) in snd_ice1712_playback_ds_pointer()
713 static snd_pcm_uframes_t snd_ice1712_capture_pointer(struct snd_pcm_substream *substream) in snd_ice1712_capture_pointer() argument
715 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_pointer()
721 ptr = bytes_to_frames(substream->runtime, ptr); in snd_ice1712_capture_pointer()
722 if (ptr == substream->runtime->buffer_size) in snd_ice1712_capture_pointer()
783 static int snd_ice1712_playback_open(struct snd_pcm_substream *substream) in snd_ice1712_playback_open() argument
785 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_playback_open()
786 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_open()
788 ice->playback_con_substream = substream; in snd_ice1712_playback_open()
793 static int snd_ice1712_playback_ds_open(struct snd_pcm_substream *substream) in snd_ice1712_playback_ds_open() argument
795 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_playback_ds_open()
796 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_ds_open()
799 ice->playback_con_substream_ds[substream->number] = substream; in snd_ice1712_playback_ds_open()
802 tmp = inw(ICEDS(ice, INTMASK)) & ~(1 << (substream->number * 2)); in snd_ice1712_playback_ds_open()
808 static int snd_ice1712_capture_open(struct snd_pcm_substream *substream) in snd_ice1712_capture_open() argument
810 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_capture_open()
811 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_open()
813 ice->capture_con_substream = substream; in snd_ice1712_capture_open()
821 static int snd_ice1712_playback_close(struct snd_pcm_substream *substream) in snd_ice1712_playback_close() argument
823 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_close()
829 static int snd_ice1712_playback_ds_close(struct snd_pcm_substream *substream) in snd_ice1712_playback_ds_close() argument
831 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_ds_close()
835 tmp = inw(ICEDS(ice, INTMASK)) | (3 << (substream->number * 2)); in snd_ice1712_playback_ds_close()
838 ice->playback_con_substream_ds[substream->number] = NULL; in snd_ice1712_playback_ds_close()
842 static int snd_ice1712_capture_close(struct snd_pcm_substream *substream) in snd_ice1712_capture_close() argument
844 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_close()
944 static int snd_ice1712_pro_trigger(struct snd_pcm_substream *substream, in snd_ice1712_pro_trigger() argument
947 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_pro_trigger()
954 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) in snd_ice1712_pro_trigger()
957 snd_pcm_trigger_done(substream, substream); in snd_ice1712_pro_trigger()
975 snd_pcm_group_for_each_entry(s, substream) { in snd_ice1712_pro_trigger()
978 snd_pcm_trigger_done(s, substream); in snd_ice1712_pro_trigger()
981 snd_pcm_trigger_done(s, substream); in snd_ice1712_pro_trigger()
1058 static int snd_ice1712_playback_pro_prepare(struct snd_pcm_substream *substream) in snd_ice1712_playback_pro_prepare() argument
1060 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_pro_prepare()
1062 ice->playback_pro_size = snd_pcm_lib_buffer_bytes(substream); in snd_ice1712_playback_pro_prepare()
1064 outl(substream->runtime->dma_addr, ICEMT(ice, PLAYBACK_ADDR)); in snd_ice1712_playback_pro_prepare()
1066 outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ICEMT(ice, PLAYBACK_COUNT)); in snd_ice1712_playback_pro_prepare()
1072 static int snd_ice1712_playback_pro_hw_params(struct snd_pcm_substream *substream, in snd_ice1712_playback_pro_hw_params() argument
1075 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_pro_hw_params()
1078 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_ice1712_playback_pro_hw_params()
1081 static int snd_ice1712_capture_pro_prepare(struct snd_pcm_substream *substream) in snd_ice1712_capture_pro_prepare() argument
1083 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_pro_prepare()
1085 ice->capture_pro_size = snd_pcm_lib_buffer_bytes(substream); in snd_ice1712_capture_pro_prepare()
1087 outl(substream->runtime->dma_addr, ICEMT(ice, CAPTURE_ADDR)); in snd_ice1712_capture_pro_prepare()
1089 outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ICEMT(ice, CAPTURE_COUNT)); in snd_ice1712_capture_pro_prepare()
1094 static int snd_ice1712_capture_pro_hw_params(struct snd_pcm_substream *substream, in snd_ice1712_capture_pro_hw_params() argument
1097 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_pro_hw_params()
1100 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_ice1712_capture_pro_hw_params()
1103 static snd_pcm_uframes_t snd_ice1712_playback_pro_pointer(struct snd_pcm_substream *substream) in snd_ice1712_playback_pro_pointer() argument
1105 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_pro_pointer()
1111 ptr = bytes_to_frames(substream->runtime, ptr); in snd_ice1712_playback_pro_pointer()
1112 if (ptr == substream->runtime->buffer_size) in snd_ice1712_playback_pro_pointer()
1117 static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(struct snd_pcm_substream *substream) in snd_ice1712_capture_pro_pointer() argument
1119 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_pro_pointer()
1125 ptr = bytes_to_frames(substream->runtime, ptr); in snd_ice1712_capture_pro_pointer()
1126 if (ptr == substream->runtime->buffer_size) in snd_ice1712_capture_pro_pointer()
1169 static int snd_ice1712_playback_pro_open(struct snd_pcm_substream *substream) in snd_ice1712_playback_pro_open() argument
1171 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_playback_pro_open()
1172 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_pro_open()
1174 ice->playback_pro_substream = substream; in snd_ice1712_playback_pro_open()
1176 snd_pcm_set_sync(substream); in snd_ice1712_playback_pro_open()
1185 ice->spdif.ops.open(ice, substream); in snd_ice1712_playback_pro_open()
1190 static int snd_ice1712_capture_pro_open(struct snd_pcm_substream *substream) in snd_ice1712_capture_pro_open() argument
1192 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_pro_open()
1193 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ice1712_capture_pro_open()
1195 ice->capture_pro_substream = substream; in snd_ice1712_capture_pro_open()
1197 snd_pcm_set_sync(substream); in snd_ice1712_capture_pro_open()
1208 static int snd_ice1712_playback_pro_close(struct snd_pcm_substream *substream) in snd_ice1712_playback_pro_close() argument
1210 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_playback_pro_close()
1216 ice->spdif.ops.close(ice, substream); in snd_ice1712_playback_pro_close()
1221 static int snd_ice1712_capture_pro_close(struct snd_pcm_substream *substream) in snd_ice1712_capture_pro_close() argument
1223 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_ice1712_capture_pro_close()
1277 pcm->streams[0].substream, in snd_ice1712_pcm_profi()
1278 pcm->streams[1].substream); in snd_ice1712_pcm_profi()