Searched refs:subs (Results 1 - 139 of 139) sorted by relevance

/linux-4.1.27/sound/usb/
H A Dpcm.c43 snd_pcm_uframes_t snd_usb_pcm_delay(struct snd_usb_substream *subs, snd_usb_pcm_delay() argument
50 if (!subs->last_delay) snd_usb_pcm_delay()
53 current_frame_number = usb_get_current_frame_number(subs->dev); snd_usb_pcm_delay()
59 frame_diff = (current_frame_number - subs->last_frame_number) & 0xff; snd_usb_pcm_delay()
64 if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) snd_usb_pcm_delay()
65 est_delay = subs->last_delay - est_delay; snd_usb_pcm_delay()
67 est_delay = subs->last_delay + est_delay; snd_usb_pcm_delay()
79 struct snd_usb_substream *subs; snd_usb_pcm_pointer() local
82 subs = (struct snd_usb_substream *)substream->runtime->private_data; snd_usb_pcm_pointer()
83 if (atomic_read(&subs->stream->chip->shutdown)) snd_usb_pcm_pointer()
85 spin_lock(&subs->lock); snd_usb_pcm_pointer()
86 hwptr_done = subs->hwptr_done; snd_usb_pcm_pointer()
87 substream->runtime->delay = snd_usb_pcm_delay(subs, snd_usb_pcm_pointer()
89 spin_unlock(&subs->lock); snd_usb_pcm_pointer()
96 static struct audioformat *find_format(struct snd_usb_substream *subs) find_format() argument
102 list_for_each_entry(fp, &subs->fmt_list, list) { find_format()
103 if (!(fp->formats & pcm_format_to_bits(subs->pcm_format))) find_format()
105 if (fp->channels != subs->channels) find_format()
107 if (subs->cur_rate < fp->rate_min || find_format()
108 subs->cur_rate > fp->rate_max) find_format()
113 if (fp->rate_table[i] == subs->cur_rate) find_format()
131 subs->direction == SNDRV_PCM_STREAM_PLAYBACK) || find_format()
133 subs->direction == SNDRV_PCM_STREAM_CAPTURE)) find_format()
136 subs->direction == SNDRV_PCM_STREAM_PLAYBACK) || find_format()
138 subs->direction == SNDRV_PCM_STREAM_CAPTURE)) { find_format()
221 static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep) start_endpoints() argument
225 if (!subs->data_endpoint) start_endpoints()
228 if (!test_and_set_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags)) { start_endpoints()
229 struct snd_usb_endpoint *ep = subs->data_endpoint; start_endpoints()
231 dev_dbg(&subs->dev->dev, "Starting data EP @%p\n", ep); start_endpoints()
233 ep->data_subs = subs; start_endpoints()
236 clear_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags); start_endpoints()
241 if (subs->sync_endpoint && start_endpoints()
242 !test_and_set_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags)) { start_endpoints()
243 struct snd_usb_endpoint *ep = subs->sync_endpoint; start_endpoints()
245 if (subs->data_endpoint->iface != subs->sync_endpoint->iface || start_endpoints()
246 subs->data_endpoint->altsetting != subs->sync_endpoint->altsetting) { start_endpoints()
247 err = usb_set_interface(subs->dev, start_endpoints()
248 subs->sync_endpoint->iface, start_endpoints()
249 subs->sync_endpoint->altsetting); start_endpoints()
251 clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags); start_endpoints()
252 dev_err(&subs->dev->dev, start_endpoints()
254 subs->sync_endpoint->iface, start_endpoints()
255 subs->sync_endpoint->altsetting, err); start_endpoints()
260 dev_dbg(&subs->dev->dev, "Starting sync EP @%p\n", ep); start_endpoints()
262 ep->sync_slave = subs->data_endpoint; start_endpoints()
265 clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags); start_endpoints()
273 static void stop_endpoints(struct snd_usb_substream *subs, bool wait) stop_endpoints() argument
275 if (test_and_clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags)) stop_endpoints()
276 snd_usb_endpoint_stop(subs->sync_endpoint); stop_endpoints()
278 if (test_and_clear_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags)) stop_endpoints()
279 snd_usb_endpoint_stop(subs->data_endpoint); stop_endpoints()
282 snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint); stop_endpoints()
283 snd_usb_endpoint_sync_pending_stop(subs->data_endpoint); stop_endpoints()
316 static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs, set_sync_ep_implicit_fb_quirk() argument
326 if (subs->direction != SNDRV_PCM_STREAM_PLAYBACK) set_sync_ep_implicit_fb_quirk()
329 switch (subs->stream->chip->usb_id) { set_sync_ep_implicit_fb_quirk()
356 USB_ID_VENDOR(subs->stream->chip->usb_id) == 0x0582 /* Roland */ && set_sync_ep_implicit_fb_quirk()
367 subs->sync_endpoint = snd_usb_add_endpoint(subs->stream->chip, set_sync_ep_implicit_fb_quirk()
368 alts, ep, !subs->direction, set_sync_ep_implicit_fb_quirk()
370 if (!subs->sync_endpoint) set_sync_ep_implicit_fb_quirk()
373 subs->data_endpoint->sync_master = subs->sync_endpoint; set_sync_ep_implicit_fb_quirk()
378 static int set_sync_endpoint(struct snd_usb_substream *subs, set_sync_endpoint() argument
384 int is_playback = subs->direction == SNDRV_PCM_STREAM_PLAYBACK; set_sync_endpoint()
396 err = set_sync_ep_implicit_fb_quirk(subs, dev, altsd, attr); set_sync_endpoint()
436 subs->sync_endpoint = snd_usb_add_endpoint(subs->stream->chip, set_sync_endpoint()
437 alts, ep, !subs->direction, set_sync_endpoint()
441 if (!subs->sync_endpoint) set_sync_endpoint()
444 subs->data_endpoint->sync_master = subs->sync_endpoint; set_sync_endpoint()
452 static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt) set_format() argument
454 struct usb_device *dev = subs->dev; set_format()
468 if (fmt == subs->cur_audiofmt) set_format()
472 if (subs->interface >= 0 && subs->interface != fmt->iface) { set_format()
473 err = usb_set_interface(subs->dev, subs->interface, 0); set_format()
480 subs->interface = -1; set_format()
481 subs->altset_idx = 0; set_format()
485 if (subs->interface != fmt->iface || set_format()
486 subs->altset_idx != fmt->altset_idx) { set_format()
488 err = snd_usb_select_mode_quirk(subs, fmt); set_format()
501 subs->interface = fmt->iface; set_format()
502 subs->altset_idx = fmt->altset_idx; set_format()
507 subs->data_endpoint = snd_usb_add_endpoint(subs->stream->chip, set_format()
508 alts, fmt->endpoint, subs->direction, set_format()
511 if (!subs->data_endpoint) set_format()
514 err = set_sync_endpoint(subs, fmt, dev, alts, altsd); set_format()
518 err = snd_usb_init_pitch(subs->stream->chip, fmt->iface, alts, fmt); set_format()
522 subs->cur_audiofmt = fmt; set_format()
524 snd_usb_set_format_quirk(subs, fmt); set_format()
536 static int match_endpoint_audioformats(struct snd_usb_substream *subs, match_endpoint_audioformats() argument
545 dev_dbg(&subs->dev->dev, match_endpoint_audioformats()
551 dev_dbg(&subs->dev->dev, match_endpoint_audioformats()
564 dev_dbg(&subs->dev->dev, match_endpoint_audioformats()
573 dev_dbg(&subs->dev->dev, match_endpoint_audioformats()
582 static int configure_sync_endpoint(struct snd_usb_substream *subs) configure_sync_endpoint() argument
588 int sync_period_bytes = subs->period_bytes; configure_sync_endpoint()
590 &subs->stream->substream[subs->direction ^ 1]; configure_sync_endpoint()
592 if (subs->sync_endpoint->type != SND_USB_ENDPOINT_TYPE_DATA || configure_sync_endpoint()
593 !subs->stream) configure_sync_endpoint()
594 return snd_usb_endpoint_set_params(subs->sync_endpoint, configure_sync_endpoint()
595 subs->pcm_format, configure_sync_endpoint()
596 subs->channels, configure_sync_endpoint()
597 subs->period_bytes, configure_sync_endpoint()
599 subs->cur_rate, configure_sync_endpoint()
600 subs->cur_audiofmt, configure_sync_endpoint()
605 int score = match_endpoint_audioformats(subs, configure_sync_endpoint()
606 fp, subs->cur_audiofmt, configure_sync_endpoint()
607 subs->cur_rate, subs->pcm_format); configure_sync_endpoint()
616 dev_err(&subs->dev->dev, configure_sync_endpoint()
626 if (sync_fp->channels != subs->channels) { configure_sync_endpoint()
627 sync_period_bytes = (subs->period_bytes / subs->channels) * configure_sync_endpoint()
629 dev_dbg(&subs->dev->dev, configure_sync_endpoint()
631 __func__, subs->period_bytes, sync_period_bytes); configure_sync_endpoint()
634 ret = snd_usb_endpoint_set_params(subs->sync_endpoint, configure_sync_endpoint()
635 subs->pcm_format, configure_sync_endpoint()
639 subs->cur_rate, configure_sync_endpoint()
651 static int configure_endpoint(struct snd_usb_substream *subs) configure_endpoint() argument
656 stop_endpoints(subs, true); configure_endpoint()
657 ret = snd_usb_endpoint_set_params(subs->data_endpoint, configure_endpoint()
658 subs->pcm_format, configure_endpoint()
659 subs->channels, configure_endpoint()
660 subs->period_bytes, configure_endpoint()
661 subs->period_frames, configure_endpoint()
662 subs->buffer_periods, configure_endpoint()
663 subs->cur_rate, configure_endpoint()
664 subs->cur_audiofmt, configure_endpoint()
665 subs->sync_endpoint); configure_endpoint()
669 if (subs->sync_endpoint) configure_endpoint()
670 ret = configure_sync_endpoint(subs); configure_endpoint()
688 struct snd_usb_substream *subs = substream->runtime->private_data; snd_usb_hw_params() local
697 subs->pcm_format = params_format(hw_params); snd_usb_hw_params()
698 subs->period_bytes = params_period_bytes(hw_params); snd_usb_hw_params()
699 subs->period_frames = params_period_size(hw_params); snd_usb_hw_params()
700 subs->buffer_periods = params_periods(hw_params); snd_usb_hw_params()
701 subs->channels = params_channels(hw_params); snd_usb_hw_params()
702 subs->cur_rate = params_rate(hw_params); snd_usb_hw_params()
704 fmt = find_format(subs); snd_usb_hw_params()
706 dev_dbg(&subs->dev->dev, snd_usb_hw_params()
708 subs->pcm_format, subs->cur_rate, subs->channels); snd_usb_hw_params()
712 ret = snd_usb_lock_shutdown(subs->stream->chip); snd_usb_hw_params()
715 ret = set_format(subs, fmt); snd_usb_hw_params()
716 snd_usb_unlock_shutdown(subs->stream->chip); snd_usb_hw_params()
720 subs->interface = fmt->iface; snd_usb_hw_params()
721 subs->altset_idx = fmt->altset_idx; snd_usb_hw_params()
722 subs->need_setup_ep = true; snd_usb_hw_params()
734 struct snd_usb_substream *subs = substream->runtime->private_data; snd_usb_hw_free() local
736 subs->cur_audiofmt = NULL; snd_usb_hw_free()
737 subs->cur_rate = 0; snd_usb_hw_free()
738 subs->period_bytes = 0; snd_usb_hw_free()
739 if (!snd_usb_lock_shutdown(subs->stream->chip)) { snd_usb_hw_free()
740 stop_endpoints(subs, true); snd_usb_hw_free()
741 snd_usb_endpoint_deactivate(subs->sync_endpoint); snd_usb_hw_free()
742 snd_usb_endpoint_deactivate(subs->data_endpoint); snd_usb_hw_free()
743 snd_usb_unlock_shutdown(subs->stream->chip); snd_usb_hw_free()
756 struct snd_usb_substream *subs = runtime->private_data; snd_usb_pcm_prepare() local
761 if (! subs->cur_audiofmt) { snd_usb_pcm_prepare()
762 dev_err(&subs->dev->dev, "no format is specified!\n"); snd_usb_pcm_prepare()
766 ret = snd_usb_lock_shutdown(subs->stream->chip); snd_usb_pcm_prepare()
769 if (snd_BUG_ON(!subs->data_endpoint)) { snd_usb_pcm_prepare()
774 snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint); snd_usb_pcm_prepare()
775 snd_usb_endpoint_sync_pending_stop(subs->data_endpoint); snd_usb_pcm_prepare()
777 ret = set_format(subs, subs->cur_audiofmt); snd_usb_pcm_prepare()
781 iface = usb_ifnum_to_if(subs->dev, subs->cur_audiofmt->iface); snd_usb_pcm_prepare()
782 alts = &iface->altsetting[subs->cur_audiofmt->altset_idx]; snd_usb_pcm_prepare()
783 ret = snd_usb_init_sample_rate(subs->stream->chip, snd_usb_pcm_prepare()
784 subs->cur_audiofmt->iface, snd_usb_pcm_prepare()
786 subs->cur_audiofmt, snd_usb_pcm_prepare()
787 subs->cur_rate); snd_usb_pcm_prepare()
791 if (subs->need_setup_ep) { snd_usb_pcm_prepare()
792 ret = configure_endpoint(subs); snd_usb_pcm_prepare()
795 subs->need_setup_ep = false; snd_usb_pcm_prepare()
799 subs->data_endpoint->maxframesize = snd_usb_pcm_prepare()
800 bytes_to_frames(runtime, subs->data_endpoint->maxpacksize); snd_usb_pcm_prepare()
801 subs->data_endpoint->curframesize = snd_usb_pcm_prepare()
802 bytes_to_frames(runtime, subs->data_endpoint->curpacksize); snd_usb_pcm_prepare()
805 subs->hwptr_done = 0; snd_usb_pcm_prepare()
806 subs->transfer_done = 0; snd_usb_pcm_prepare()
807 subs->last_delay = 0; snd_usb_pcm_prepare()
808 subs->last_frame_number = 0; snd_usb_pcm_prepare()
813 if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) snd_usb_pcm_prepare()
814 ret = start_endpoints(subs, true); snd_usb_pcm_prepare()
817 snd_usb_unlock_shutdown(subs->stream->chip); snd_usb_pcm_prepare()
836 static int hw_check_valid_format(struct snd_usb_substream *subs, hw_check_valid_format() argument
871 if (subs->speed != USB_SPEED_FULL) { hw_check_valid_format()
884 struct snd_usb_substream *subs = rule->private; hw_rule_rate() local
893 list_for_each_entry(fp, &subs->fmt_list, list) { hw_rule_rate()
894 if (!hw_check_valid_format(subs, params, fp)) hw_rule_rate()
936 struct snd_usb_substream *subs = rule->private; hw_rule_channels() local
945 list_for_each_entry(fp, &subs->fmt_list, list) { hw_rule_channels()
946 if (!hw_check_valid_format(subs, params, fp)) hw_rule_channels()
987 struct snd_usb_substream *subs = rule->private; hw_rule_format() local
996 list_for_each_entry(fp, &subs->fmt_list, list) { hw_rule_format()
997 if (!hw_check_valid_format(subs, params, fp)) hw_rule_format()
1018 struct snd_usb_substream *subs = rule->private; hw_rule_period_time() local
1028 list_for_each_entry(fp, &subs->fmt_list, list) { hw_rule_period_time()
1029 if (!hw_check_valid_format(subs, params, fp)) hw_rule_period_time()
1057 struct snd_usb_substream *subs) snd_usb_pcm_check_knot()
1064 kfree(subs->rate_list.list); snd_usb_pcm_check_knot()
1065 subs->rate_list.list = NULL; snd_usb_pcm_check_knot()
1067 list_for_each_entry(fp, &subs->fmt_list, list) { snd_usb_pcm_check_knot()
1077 subs->rate_list.list = rate_list = snd_usb_pcm_check_knot()
1079 if (!subs->rate_list.list) snd_usb_pcm_check_knot()
1081 subs->rate_list.count = count; snd_usb_pcm_check_knot()
1082 subs->rate_list.mask = 0; snd_usb_pcm_check_knot()
1084 list_for_each_entry(fp, &subs->fmt_list, list) { snd_usb_pcm_check_knot()
1090 &subs->rate_list); snd_usb_pcm_check_knot()
1102 static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs) setup_hw_info() argument
1109 runtime->hw.formats = subs->formats; setup_hw_info()
1118 list_for_each_entry(fp, &subs->fmt_list, list) { setup_hw_info()
1136 err = snd_usb_autoresume(subs->stream->chip); setup_hw_info()
1141 if (subs->speed == USB_SPEED_FULL) setup_hw_info()
1151 hw_rule_rate, subs, setup_hw_info()
1158 hw_rule_channels, subs, setup_hw_info()
1165 hw_rule_format, subs, setup_hw_info()
1174 hw_rule_period_time, subs, setup_hw_info()
1182 if ((err = snd_usb_pcm_check_knot(runtime, subs)) < 0) setup_hw_info()
1187 snd_usb_autosuspend(subs->stream->chip); setup_hw_info()
1195 struct snd_usb_substream *subs = &as->substream[direction]; snd_usb_pcm_open() local
1197 subs->interface = -1; snd_usb_pcm_open()
1198 subs->altset_idx = 0; snd_usb_pcm_open()
1200 runtime->private_data = subs; snd_usb_pcm_open()
1201 subs->pcm_substream = substream; snd_usb_pcm_open()
1205 subs->dsd_dop.byte_idx = 0; snd_usb_pcm_open()
1206 subs->dsd_dop.channel = 0; snd_usb_pcm_open()
1207 subs->dsd_dop.marker = 1; snd_usb_pcm_open()
1209 return setup_hw_info(runtime, subs); snd_usb_pcm_open()
1215 struct snd_usb_substream *subs = &as->substream[direction]; snd_usb_pcm_close() local
1217 stop_endpoints(subs, true); snd_usb_pcm_close()
1219 if (subs->interface >= 0 && snd_usb_pcm_close()
1220 !snd_usb_lock_shutdown(subs->stream->chip)) { snd_usb_pcm_close()
1221 usb_set_interface(subs->dev, subs->interface, 0); snd_usb_pcm_close()
1222 subs->interface = -1; snd_usb_pcm_close()
1223 snd_usb_unlock_shutdown(subs->stream->chip); snd_usb_pcm_close()
1226 subs->pcm_substream = NULL; snd_usb_pcm_close()
1227 snd_usb_autosuspend(subs->stream->chip); snd_usb_pcm_close()
1237 static void retire_capture_urb(struct snd_usb_substream *subs, retire_capture_urb() argument
1240 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; retire_capture_urb()
1248 current_frame_number = usb_get_current_frame_number(subs->dev); retire_capture_urb()
1253 cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset + subs->pkt_offset_adj; retire_capture_urb()
1255 dev_dbg(&subs->dev->dev, "frame %d active: %d\n", retire_capture_urb()
1261 if (!subs->txfr_quirk) retire_capture_urb()
1266 dev_warn(&subs->dev->dev, retire_capture_urb()
1271 spin_lock_irqsave(&subs->lock, flags); retire_capture_urb()
1272 oldptr = subs->hwptr_done; retire_capture_urb()
1273 subs->hwptr_done += bytes; retire_capture_urb()
1274 if (subs->hwptr_done >= runtime->buffer_size * stride) retire_capture_urb()
1275 subs->hwptr_done -= runtime->buffer_size * stride; retire_capture_urb()
1277 subs->transfer_done += frames; retire_capture_urb()
1278 if (subs->transfer_done >= runtime->period_size) { retire_capture_urb()
1279 subs->transfer_done -= runtime->period_size; retire_capture_urb()
1285 runtime->delay = subs->last_delay = 0; retire_capture_urb()
1288 subs->last_frame_number = current_frame_number; retire_capture_urb()
1289 subs->last_frame_number &= 0xFF; /* keep 8 LSBs */ retire_capture_urb()
1291 spin_unlock_irqrestore(&subs->lock, flags); retire_capture_urb()
1304 snd_pcm_period_elapsed(subs->pcm_substream); retire_capture_urb()
1307 static inline void fill_playback_urb_dsd_dop(struct snd_usb_substream *subs, fill_playback_urb_dsd_dop() argument
1310 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; fill_playback_urb_dsd_dop()
1313 unsigned int src_idx = subs->hwptr_done; fill_playback_urb_dsd_dop()
1336 if (++subs->dsd_dop.byte_idx == 3) { fill_playback_urb_dsd_dop()
1338 dst[dst_idx++] = marker[subs->dsd_dop.marker]; fill_playback_urb_dsd_dop()
1340 subs->dsd_dop.byte_idx = 0; fill_playback_urb_dsd_dop()
1342 if (++subs->dsd_dop.channel % runtime->channels == 0) { fill_playback_urb_dsd_dop()
1344 subs->dsd_dop.marker++; fill_playback_urb_dsd_dop()
1345 subs->dsd_dop.marker %= ARRAY_SIZE(marker); fill_playback_urb_dsd_dop()
1346 subs->dsd_dop.channel = 0; fill_playback_urb_dsd_dop()
1350 int idx = (src_idx + subs->dsd_dop.byte_idx - 1) % wrap; fill_playback_urb_dsd_dop()
1352 if (subs->cur_audiofmt->dsd_bitrev) fill_playback_urb_dsd_dop()
1357 subs->hwptr_done++; fill_playback_urb_dsd_dop()
1362 static void prepare_playback_urb(struct snd_usb_substream *subs, prepare_playback_urb() argument
1365 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; prepare_playback_urb()
1366 struct snd_usb_endpoint *ep = subs->data_endpoint; prepare_playback_urb()
1376 spin_lock_irqsave(&subs->lock, flags); prepare_playback_urb()
1377 subs->frame_limit += ep->max_urb_frames; prepare_playback_urb()
1389 subs->transfer_done += counts; prepare_playback_urb()
1390 if (subs->transfer_done >= runtime->period_size) { prepare_playback_urb()
1391 subs->transfer_done -= runtime->period_size; prepare_playback_urb()
1392 subs->frame_limit = 0; prepare_playback_urb()
1394 if (subs->fmt_type == UAC_FORMAT_TYPE_II) { prepare_playback_urb()
1395 if (subs->transfer_done > 0) { prepare_playback_urb()
1398 frames -= subs->transfer_done; prepare_playback_urb()
1399 counts -= subs->transfer_done; prepare_playback_urb()
1402 subs->transfer_done = 0; prepare_playback_urb()
1417 subs->transfer_done >= subs->frame_limit) && prepare_playback_urb()
1423 if (unlikely(subs->pcm_format == SNDRV_PCM_FORMAT_DSD_U16_LE && prepare_playback_urb()
1424 subs->cur_audiofmt->dsd_dop)) { prepare_playback_urb()
1425 fill_playback_urb_dsd_dop(subs, urb, bytes); prepare_playback_urb()
1426 } else if (unlikely(subs->pcm_format == SNDRV_PCM_FORMAT_DSD_U8 && prepare_playback_urb()
1427 subs->cur_audiofmt->dsd_bitrev)) { prepare_playback_urb()
1431 int idx = (subs->hwptr_done + i) prepare_playback_urb()
1436 subs->hwptr_done += bytes; prepare_playback_urb()
1439 if (subs->hwptr_done + bytes > runtime->buffer_size * stride) { prepare_playback_urb()
1442 runtime->buffer_size * stride - subs->hwptr_done; prepare_playback_urb()
1444 runtime->dma_area + subs->hwptr_done, bytes1); prepare_playback_urb()
1449 runtime->dma_area + subs->hwptr_done, bytes); prepare_playback_urb()
1452 subs->hwptr_done += bytes; prepare_playback_urb()
1455 if (subs->hwptr_done >= runtime->buffer_size * stride) prepare_playback_urb()
1456 subs->hwptr_done -= runtime->buffer_size * stride; prepare_playback_urb()
1459 runtime->delay = subs->last_delay; prepare_playback_urb()
1461 subs->last_delay = runtime->delay; prepare_playback_urb()
1464 subs->last_frame_number = usb_get_current_frame_number(subs->dev); prepare_playback_urb()
1465 subs->last_frame_number &= 0xFF; /* keep 8 LSBs */ prepare_playback_urb()
1467 if (subs->trigger_tstamp_pending_update) { prepare_playback_urb()
1472 subs->trigger_tstamp_pending_update = false; prepare_playback_urb()
1475 spin_unlock_irqrestore(&subs->lock, flags); prepare_playback_urb()
1478 snd_pcm_period_elapsed(subs->pcm_substream); prepare_playback_urb()
1485 static void retire_playback_urb(struct snd_usb_substream *subs, retire_playback_urb() argument
1489 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; retire_playback_urb()
1490 struct snd_usb_endpoint *ep = subs->data_endpoint; retire_playback_urb()
1500 spin_lock_irqsave(&subs->lock, flags); retire_playback_urb()
1501 if (!subs->last_delay) retire_playback_urb()
1504 est_delay = snd_usb_pcm_delay(subs, runtime->rate); retire_playback_urb()
1506 if (processed > subs->last_delay) retire_playback_urb()
1507 subs->last_delay = 0; retire_playback_urb()
1509 subs->last_delay -= processed; retire_playback_urb()
1510 runtime->delay = subs->last_delay; retire_playback_urb()
1517 if (abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2) retire_playback_urb()
1518 dev_dbg_ratelimited(&subs->dev->dev, retire_playback_urb()
1520 est_delay, subs->last_delay); retire_playback_urb()
1522 if (!subs->running) { retire_playback_urb()
1526 subs->last_frame_number = retire_playback_urb()
1527 usb_get_current_frame_number(subs->dev) & 0xff; retire_playback_urb()
1531 spin_unlock_irqrestore(&subs->lock, flags); retire_playback_urb()
1557 struct snd_usb_substream *subs = substream->runtime->private_data; snd_usb_substream_playback_trigger() local
1561 subs->trigger_tstamp_pending_update = true; snd_usb_substream_playback_trigger()
1563 subs->data_endpoint->prepare_data_urb = prepare_playback_urb; snd_usb_substream_playback_trigger()
1564 subs->data_endpoint->retire_data_urb = retire_playback_urb; snd_usb_substream_playback_trigger()
1565 subs->running = 1; snd_usb_substream_playback_trigger()
1568 stop_endpoints(subs, false); snd_usb_substream_playback_trigger()
1569 subs->running = 0; snd_usb_substream_playback_trigger()
1572 subs->data_endpoint->prepare_data_urb = NULL; snd_usb_substream_playback_trigger()
1574 subs->data_endpoint->retire_data_urb = retire_playback_urb; snd_usb_substream_playback_trigger()
1575 subs->running = 0; snd_usb_substream_playback_trigger()
1586 struct snd_usb_substream *subs = substream->runtime->private_data; snd_usb_substream_capture_trigger() local
1590 err = start_endpoints(subs, false); snd_usb_substream_capture_trigger()
1594 subs->data_endpoint->retire_data_urb = retire_capture_urb; snd_usb_substream_capture_trigger()
1595 subs->running = 1; snd_usb_substream_capture_trigger()
1598 stop_endpoints(subs, false); snd_usb_substream_capture_trigger()
1599 subs->running = 0; snd_usb_substream_capture_trigger()
1602 subs->data_endpoint->retire_data_urb = NULL; snd_usb_substream_capture_trigger()
1603 subs->running = 0; snd_usb_substream_capture_trigger()
1606 subs->data_endpoint->retire_data_urb = retire_capture_urb; snd_usb_substream_capture_trigger()
1607 subs->running = 1; snd_usb_substream_capture_trigger()
1056 snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs) snd_usb_pcm_check_knot() argument
H A Dpcm.h4 snd_pcm_uframes_t snd_usb_pcm_delay(struct snd_usb_substream *subs,
H A Dproc.c74 static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct snd_info_buffer *buffer) proc_dump_substream_formats() argument
81 list_for_each_entry(fp, &subs->fmt_list, list) { proc_dump_substream_formats()
110 if (subs->speed != USB_SPEED_FULL) proc_dump_substream_formats()
118 static void proc_dump_ep_status(struct snd_usb_substream *subs, proc_dump_ep_status() argument
127 subs->speed == USB_SPEED_FULL proc_dump_ep_status()
138 static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer) proc_dump_substream_status() argument
140 if (subs->running) { proc_dump_substream_status()
142 snd_iprintf(buffer, " Interface = %d\n", subs->interface); proc_dump_substream_status()
143 snd_iprintf(buffer, " Altset = %d\n", subs->altset_idx); proc_dump_substream_status()
144 proc_dump_ep_status(subs, subs->data_endpoint, subs->sync_endpoint, buffer); proc_dump_substream_status()
H A Dstream.c43 static void free_substream(struct snd_usb_substream *subs) free_substream() argument
47 if (!subs->num_formats) free_substream()
49 list_for_each_entry_safe(fp, n, &subs->fmt_list, list) { free_substream()
54 kfree(subs->rate_list.list); free_substream()
86 struct snd_usb_substream *subs = &as->substream[stream]; snd_usb_init_substream() local
88 INIT_LIST_HEAD(&subs->fmt_list); snd_usb_init_substream()
89 spin_lock_init(&subs->lock); snd_usb_init_substream()
91 subs->stream = as; snd_usb_init_substream()
92 subs->direction = stream; snd_usb_init_substream()
93 subs->dev = as->chip->dev; snd_usb_init_substream()
94 subs->txfr_quirk = as->chip->txfr_quirk; snd_usb_init_substream()
95 subs->speed = snd_usb_get_speed(subs->dev); snd_usb_init_substream()
96 subs->pkt_offset_adj = 0; snd_usb_init_substream()
100 list_add_tail(&fp->list, &subs->fmt_list); snd_usb_init_substream()
101 subs->formats |= fp->formats; snd_usb_init_substream()
102 subs->num_formats++; snd_usb_init_substream()
103 subs->fmt_type = fp->fmt_type; snd_usb_init_substream()
104 subs->ep_num = fp->endpoint; snd_usb_init_substream()
105 if (fp->channels > subs->channels_max) snd_usb_init_substream()
106 subs->channels_max = fp->channels; snd_usb_init_substream()
114 struct snd_usb_substream *subs = info->private_data; usb_chmap_ctl_info() local
117 uinfo->count = subs->channels_max; usb_chmap_ctl_info()
124 static bool have_dup_chmap(struct snd_usb_substream *subs, have_dup_chmap() argument
129 for (p = fp->list.prev; p != &subs->fmt_list; p = p->prev) { have_dup_chmap()
143 struct snd_usb_substream *subs = info->private_data; usb_chmap_ctl_tlv() local
154 list_for_each_entry(fp, &subs->fmt_list, list) { usb_chmap_ctl_tlv()
159 if (have_dup_chmap(subs, fp)) usb_chmap_ctl_tlv()
186 struct snd_usb_substream *subs = info->private_data; usb_chmap_ctl_get() local
192 if (subs->cur_audiofmt) usb_chmap_ctl_get()
193 chmap = subs->cur_audiofmt->chmap; usb_chmap_ctl_get()
203 struct snd_usb_substream *subs) add_chmap()
210 list_for_each_entry(fp, &subs->fmt_list, list) add_chmap()
222 chmap->private_data = subs; add_chmap()
325 struct snd_usb_substream *subs; snd_usb_add_audio_stream() local
332 subs = &as->substream[stream]; snd_usb_add_audio_stream()
333 if (subs->ep_num == fp->endpoint) { snd_usb_add_audio_stream()
334 list_add_tail(&fp->list, &subs->fmt_list); snd_usb_add_audio_stream()
335 subs->num_formats++; snd_usb_add_audio_stream()
336 subs->formats |= fp->formats; snd_usb_add_audio_stream()
344 subs = &as->substream[stream]; snd_usb_add_audio_stream()
345 if (subs->ep_num) snd_usb_add_audio_stream()
351 return add_chmap(as->pcm, stream, subs); snd_usb_add_audio_stream()
202 add_chmap(struct snd_pcm *pcm, int stream, struct snd_usb_substream *subs) add_chmap() argument
H A Dquirks.h21 void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
36 int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
H A Dcard.h42 struct snd_usb_substream *subs; member in struct:snd_urb_ctx
58 void (*prepare_data_urb) (struct snd_usb_substream *subs,
60 void (*retire_data_urb) (struct snd_usb_substream *subs,
H A Dquirks.c1070 static void set_format_emu_quirk(struct snd_usb_substream *subs, set_format_emu_quirk() argument
1079 if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) { set_format_emu_quirk()
1080 if (subs->stream->substream[SNDRV_PCM_STREAM_CAPTURE].interface != -1) set_format_emu_quirk()
1104 snd_emuusb_set_samplerate(subs->stream->chip, emu_samplerate_id); set_format_emu_quirk()
1105 subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0; set_format_emu_quirk()
1108 void snd_usb_set_format_quirk(struct snd_usb_substream *subs, snd_usb_set_format_quirk() argument
1111 switch (subs->stream->chip->usb_id) { snd_usb_set_format_quirk()
1116 set_format_emu_quirk(subs, fmt); snd_usb_set_format_quirk()
1159 int snd_usb_select_mode_quirk(struct snd_usb_substream *subs, snd_usb_select_mode_quirk() argument
1162 struct usb_device *dev = subs->dev; snd_usb_select_mode_quirk()
1165 if (is_marantz_denon_dac(subs->stream->chip->usb_id)) { snd_usb_select_mode_quirk()
H A Dcard.c120 struct snd_usb_substream *subs; snd_usb_stream_disconnect() local
123 subs = &as->substream[idx]; snd_usb_stream_disconnect()
124 if (!subs->num_formats) snd_usb_stream_disconnect()
126 subs->interface = -1; snd_usb_stream_disconnect()
127 subs->data_endpoint = NULL; snd_usb_stream_disconnect()
128 subs->sync_endpoint = NULL; snd_usb_stream_disconnect()
/linux-4.1.27/sound/usb/usx2y/
H A Dusx2yhwdeppcm.c62 static int usX2Y_usbpcm_urb_capt_retire(struct snd_usX2Y_substream *subs) usX2Y_usbpcm_urb_capt_retire() argument
64 struct urb *urb = subs->completed_urb; usX2Y_usbpcm_urb_capt_retire()
65 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; usX2Y_usbpcm_urb_capt_retire()
66 int i, lens = 0, hwptr_done = subs->hwptr_done; usX2Y_usbpcm_urb_capt_retire()
67 struct usX2Ydev *usX2Y = subs->usX2Y; usX2Y_usbpcm_urb_capt_retire()
84 subs->hwptr_done = hwptr_done; usX2Y_usbpcm_urb_capt_retire()
85 subs->transfer_done += lens; usX2Y_usbpcm_urb_capt_retire()
87 if (subs->transfer_done >= runtime->period_size) { usX2Y_usbpcm_urb_capt_retire()
88 subs->transfer_done -= runtime->period_size; usX2Y_usbpcm_urb_capt_retire()
89 snd_pcm_period_elapsed(subs->pcm_substream); usX2Y_usbpcm_urb_capt_retire()
110 static int usX2Y_hwdep_urb_play_prepare(struct snd_usX2Y_substream *subs, usX2Y_hwdep_urb_play_prepare() argument
114 struct usX2Ydev *usX2Y = subs->usX2Y; usX2Y_hwdep_urb_play_prepare()
116 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; usX2Y_hwdep_urb_play_prepare()
137 if (atomic_read(&subs->state) != state_RUNNING) usX2Y_hwdep_urb_play_prepare()
149 static inline void usX2Y_usbpcm_urb_capt_iso_advance(struct snd_usX2Y_substream *subs, usX2Y_usbpcm_urb_capt_iso_advance() argument
155 if (NULL != subs) { usX2Y_usbpcm_urb_capt_iso_advance()
156 struct snd_usX2Y_hwdep_pcm_shm *shm = subs->usX2Y->hwdep_pcm_shm; usX2Y_usbpcm_urb_capt_iso_advance()
232 struct snd_usX2Y_substream *subs = urb->context; i_usX2Y_usbpcm_urb_complete() local
233 struct usX2Ydev *usX2Y = subs->usX2Y; i_usX2Y_usbpcm_urb_complete()
236 if (unlikely(atomic_read(&subs->state) < state_PREPARED)) { i_usX2Y_usbpcm_urb_complete()
239 subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", i_usX2Y_usbpcm_urb_complete()
244 usX2Y_error_urb_status(usX2Y, subs, urb); i_usX2Y_usbpcm_urb_complete()
248 subs->completed_urb = urb; i_usX2Y_usbpcm_urb_complete()
249 capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; i_usX2Y_usbpcm_urb_complete()
250 capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; i_usX2Y_usbpcm_urb_complete()
251 playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; i_usX2Y_usbpcm_urb_complete()
275 static void usX2Y_usbpcm_urbs_release(struct snd_usX2Y_substream *subs) usX2Y_usbpcm_urbs_release() argument
278 snd_printdd("snd_usX2Y_urbs_release() %i\n", subs->endpoint); usX2Y_usbpcm_urbs_release()
280 usX2Y_hwdep_urb_release(subs->urb + i); usX2Y_usbpcm_urbs_release()
291 struct snd_usX2Y_substream *subs = urb->context; i_usX2Y_usbpcm_subs_startup() local
292 struct usX2Ydev *usX2Y = subs->usX2Y; i_usX2Y_usbpcm_subs_startup()
297 if (prepare_subs == usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]) { i_usX2Y_usbpcm_subs_startup()
298 struct snd_usX2Y_substream *cap_subs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; i_usX2Y_usbpcm_subs_startup()
312 static int usX2Y_usbpcm_urbs_allocate(struct snd_usX2Y_substream *subs) usX2Y_usbpcm_urbs_allocate() argument
316 int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; usX2Y_usbpcm_urbs_allocate()
317 struct usb_device *dev = subs->usX2Y->dev; usX2Y_usbpcm_urbs_allocate()
319 pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) : usX2Y_usbpcm_urbs_allocate()
320 usb_rcvisocpipe(dev, subs->endpoint); usX2Y_usbpcm_urbs_allocate()
321 subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback); usX2Y_usbpcm_urbs_allocate()
322 if (!subs->maxpacksize) usX2Y_usbpcm_urbs_allocate()
327 struct urb **purb = subs->urb + i; usX2Y_usbpcm_urbs_allocate()
334 usX2Y_usbpcm_urbs_release(subs); usX2Y_usbpcm_urbs_allocate()
338 subs->usX2Y->hwdep_pcm_shm->playback : ( usX2Y_usbpcm_urbs_allocate()
339 subs->endpoint == 0x8 ? usX2Y_usbpcm_urbs_allocate()
340 subs->usX2Y->hwdep_pcm_shm->capture0x8 : usX2Y_usbpcm_urbs_allocate()
341 subs->usX2Y->hwdep_pcm_shm->capture0xA); usX2Y_usbpcm_urbs_allocate()
346 (*purb)->context = subs; usX2Y_usbpcm_urbs_allocate()
359 struct snd_usX2Y_substream *subs = runtime->private_data, snd_usX2Y_usbpcm_hw_free() local
360 *cap_subs2 = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; snd_usX2Y_usbpcm_hw_free()
361 mutex_lock(&subs->usX2Y->pcm_mutex); snd_usX2Y_usbpcm_hw_free()
365 struct snd_usX2Y_substream *cap_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; snd_usX2Y_usbpcm_hw_free()
366 atomic_set(&subs->state, state_STOPPED); snd_usX2Y_usbpcm_hw_free()
367 usX2Y_usbpcm_urbs_release(subs); snd_usX2Y_usbpcm_hw_free()
380 struct snd_usX2Y_substream *playback_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; snd_usX2Y_usbpcm_hw_free()
382 atomic_set(&subs->state, state_STOPPED); snd_usX2Y_usbpcm_hw_free()
385 usX2Y_usbpcm_urbs_release(subs); snd_usX2Y_usbpcm_hw_free()
390 mutex_unlock(&subs->usX2Y->pcm_mutex); snd_usX2Y_usbpcm_hw_free()
394 static void usX2Y_usbpcm_subs_startup(struct snd_usX2Y_substream *subs) usX2Y_usbpcm_subs_startup() argument
396 struct usX2Ydev * usX2Y = subs->usX2Y; usX2Y_usbpcm_subs_startup()
397 usX2Y->prepare_subs = subs; usX2Y_usbpcm_subs_startup()
398 subs->urb[0]->start_frame = -1; usX2Y_usbpcm_subs_startup()
403 static int usX2Y_usbpcm_urbs_start(struct snd_usX2Y_substream *subs) usX2Y_usbpcm_urbs_start() argument
406 stream = subs->pcm_substream->stream; usX2Y_usbpcm_urbs_start()
407 struct usX2Ydev *usX2Y = subs->usX2Y; usX2Y_usbpcm_urbs_start()
415 struct snd_usX2Y_substream *subs = usX2Y->subs[stream + p]; usX2Y_usbpcm_urbs_start() local
416 if (subs != NULL) { usX2Y_usbpcm_urbs_start()
417 if ((err = usX2Y_usbpcm_urbs_allocate(subs)) < 0) usX2Y_usbpcm_urbs_start()
419 subs->completed_urb = NULL; usX2Y_usbpcm_urbs_start()
424 struct snd_usX2Y_substream *subs = usX2Y->subs[p]; usX2Y_usbpcm_urbs_start() local
425 if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED) usX2Y_usbpcm_urbs_start()
430 usX2Y_usbpcm_subs_startup(subs); usX2Y_usbpcm_urbs_start()
433 struct snd_usX2Y_substream *subs = usX2Y->subs[stream + p]; usX2Y_usbpcm_urbs_start() local
434 if (subs != NULL) { usX2Y_usbpcm_urbs_start()
435 struct urb *urb = subs->urb[u]; usX2Y_usbpcm_urbs_start()
439 atomic_set(&subs->state, state_STARTING3); usX2Y_usbpcm_urbs_start()
442 urb->iso_frame_desc[pack].offset = subs->maxpacksize * (pack + u * nr_of_packs()); usX2Y_usbpcm_urbs_start()
443 urb->iso_frame_desc[pack].length = subs->maxpacksize; usX2Y_usbpcm_urbs_start()
445 urb->transfer_buffer_length = subs->maxpacksize * nr_of_packs(); usX2Y_usbpcm_urbs_start()
457 atomic_set(&subs->state, state_STARTING1); usX2Y_usbpcm_urbs_start()
465 if (atomic_read(&subs->state) != state_PREPARED) usX2Y_usbpcm_urbs_start()
484 struct snd_usX2Y_substream *subs = runtime->private_data; snd_usX2Y_usbpcm_prepare() local
485 struct usX2Ydev *usX2Y = subs->usX2Y; snd_usX2Y_usbpcm_prepare()
486 struct snd_usX2Y_substream *capsubs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; snd_usX2Y_usbpcm_prepare()
497 usX2Y_subs_prepare(subs); snd_usX2Y_usbpcm_prepare()
507 snd_printdd("starting capture pipe for %s\n", subs == capsubs ? snd_usX2Y_usbpcm_prepare()
513 if (subs != capsubs) { snd_usX2Y_usbpcm_prepare()
515 if (atomic_read(&subs->state) < state_PREPARED) { snd_usX2Y_usbpcm_prepare()
527 if (0 > (err = usX2Y_usbpcm_urbs_start(subs))) snd_usX2Y_usbpcm_prepare()
564 struct snd_usX2Y_substream *subs = ((struct snd_usX2Y_substream **) snd_usX2Y_usbpcm_open() local
568 if (!(subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS)) snd_usX2Y_usbpcm_open()
572 (subs->usX2Y->subs[3] ? snd_usX2Y_4c : snd_usX2Y_2c); snd_usX2Y_usbpcm_open()
573 runtime->private_data = subs; snd_usX2Y_usbpcm_open()
574 subs->pcm_substream = substream; snd_usX2Y_usbpcm_open()
583 struct snd_usX2Y_substream *subs = runtime->private_data; snd_usX2Y_usbpcm_close() local
585 subs->pcm_substream = NULL; snd_usX2Y_usbpcm_close()
609 struct snd_usX2Y_substream *subs = dev->subs[i]; usX2Y_pcms_busy_check() local
610 if (subs && subs->pcm_substream && usX2Y_pcms_busy_check()
611 SUBSTREAM_BUSY(subs->pcm_substream)) usX2Y_pcms_busy_check()
736 pcm->private_data = usX2Y(card)->subs; usX2Y_hwdep_pcm_new()
H A Dusbusx2yaudio.c71 static int usX2Y_urb_capt_retire(struct snd_usX2Y_substream *subs) usX2Y_urb_capt_retire() argument
73 struct urb *urb = subs->completed_urb; usX2Y_urb_capt_retire()
74 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; usX2Y_urb_capt_retire()
76 int i, len, lens = 0, hwptr_done = subs->hwptr_done; usX2Y_urb_capt_retire()
77 struct usX2Ydev *usX2Y = subs->usX2Y; usX2Y_urb_capt_retire()
108 subs->hwptr_done = hwptr_done; usX2Y_urb_capt_retire()
109 subs->transfer_done += lens; usX2Y_urb_capt_retire()
111 if (subs->transfer_done >= runtime->period_size) { usX2Y_urb_capt_retire()
112 subs->transfer_done -= runtime->period_size; usX2Y_urb_capt_retire()
113 snd_pcm_period_elapsed(subs->pcm_substream); usX2Y_urb_capt_retire()
127 static int usX2Y_urb_play_prepare(struct snd_usX2Y_substream *subs, usX2Y_urb_play_prepare() argument
132 struct usX2Ydev *usX2Y = subs->usX2Y; usX2Y_urb_play_prepare()
133 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; usX2Y_urb_play_prepare()
151 if (atomic_read(&subs->state) >= state_PRERUNNING) usX2Y_urb_play_prepare()
152 if (subs->hwptr + count > runtime->buffer_size) { usX2Y_urb_play_prepare()
157 len = runtime->buffer_size - subs->hwptr; usX2Y_urb_play_prepare()
158 urb->transfer_buffer = subs->tmpbuf; usX2Y_urb_play_prepare()
159 memcpy(subs->tmpbuf, runtime->dma_area + usX2Y_urb_play_prepare()
160 subs->hwptr * usX2Y->stride, len * usX2Y->stride); usX2Y_urb_play_prepare()
161 memcpy(subs->tmpbuf + len * usX2Y->stride, usX2Y_urb_play_prepare()
163 subs->hwptr += count; usX2Y_urb_play_prepare()
164 subs->hwptr -= runtime->buffer_size; usX2Y_urb_play_prepare()
167 urb->transfer_buffer = runtime->dma_area + subs->hwptr * usX2Y->stride; usX2Y_urb_play_prepare()
168 if ((subs->hwptr += count) >= runtime->buffer_size) usX2Y_urb_play_prepare()
169 subs->hwptr -= runtime->buffer_size; usX2Y_urb_play_prepare()
172 urb->transfer_buffer = subs->tmpbuf; usX2Y_urb_play_prepare()
182 static void usX2Y_urb_play_retire(struct snd_usX2Y_substream *subs, struct urb *urb) usX2Y_urb_play_retire() argument
184 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; usX2Y_urb_play_retire()
185 int len = urb->actual_length / subs->usX2Y->stride; usX2Y_urb_play_retire()
187 subs->transfer_done += len; usX2Y_urb_play_retire()
188 subs->hwptr_done += len; usX2Y_urb_play_retire()
189 if (subs->hwptr_done >= runtime->buffer_size) usX2Y_urb_play_retire()
190 subs->hwptr_done -= runtime->buffer_size; usX2Y_urb_play_retire()
191 if (subs->transfer_done >= runtime->period_size) { usX2Y_urb_play_retire()
192 subs->transfer_done -= runtime->period_size; usX2Y_urb_play_retire()
193 snd_pcm_period_elapsed(subs->pcm_substream); usX2Y_urb_play_retire()
197 static int usX2Y_urb_submit(struct snd_usX2Y_substream *subs, struct urb *urb, int frame) usX2Y_urb_submit() argument
204 urb->dev = subs->usX2Y->dev; /* we need to set this at each time */ usX2Y_urb_submit()
266 struct snd_usX2Y_substream *subs = usX2Y->subs[s]; usX2Y_clients_stop() local
267 if (subs) { usX2Y_clients_stop()
268 snd_printdd("%i %p state=%i\n", s, subs, atomic_read(&subs->state)); usX2Y_clients_stop()
269 atomic_set(&subs->state, state_STOPPED); usX2Y_clients_stop()
273 struct snd_usX2Y_substream *subs = usX2Y->subs[s]; usX2Y_clients_stop() local
274 if (subs) { usX2Y_clients_stop()
275 if (atomic_read(&subs->state) >= state_PRERUNNING) usX2Y_clients_stop()
276 snd_pcm_stop_xrun(subs->pcm_substream); usX2Y_clients_stop()
278 struct urb *urb = subs->urb[u]; usX2Y_clients_stop()
290 struct snd_usX2Y_substream *subs, struct urb *urb) usX2Y_error_urb_status()
292 snd_printk(KERN_ERR "ep=%i stalled with status=%i\n", subs->endpoint, urb->status); usX2Y_error_urb_status()
299 struct snd_usX2Y_substream *subs = urb->context; i_usX2Y_urb_complete() local
300 struct usX2Ydev *usX2Y = subs->usX2Y; i_usX2Y_urb_complete()
302 if (unlikely(atomic_read(&subs->state) < state_PREPARED)) { i_usX2Y_urb_complete()
305 subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", i_usX2Y_urb_complete()
310 usX2Y_error_urb_status(usX2Y, subs, urb); i_usX2Y_urb_complete()
314 subs->completed_urb = urb; i_usX2Y_urb_complete()
317 struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE], i_usX2Y_urb_complete()
318 *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; i_usX2Y_urb_complete()
338 struct snd_usX2Y_substream *subs = usX2Y->subs[s]; usX2Y_urbs_set_complete() local
339 if (NULL != subs) usX2Y_urbs_set_complete()
341 struct urb * urb = subs->urb[u]; usX2Y_urbs_set_complete()
356 struct snd_usX2Y_substream *subs = urb->context; i_usX2Y_subs_startup() local
357 struct usX2Ydev *usX2Y = subs->usX2Y; i_usX2Y_subs_startup()
369 static void usX2Y_subs_prepare(struct snd_usX2Y_substream *subs) usX2Y_subs_prepare() argument
372 subs, subs->endpoint, subs->urb[0], subs->urb[1]); usX2Y_subs_prepare()
374 subs->hwptr = 0; usX2Y_subs_prepare()
375 subs->hwptr_done = 0; usX2Y_subs_prepare()
376 subs->transfer_done = 0; usX2Y_subs_prepare()
393 static void usX2Y_urbs_release(struct snd_usX2Y_substream *subs) usX2Y_urbs_release() argument
396 snd_printdd("usX2Y_urbs_release() %i\n", subs->endpoint); usX2Y_urbs_release()
398 usX2Y_urb_release(subs->urb + i, usX2Y_urbs_release()
399 subs != subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]); usX2Y_urbs_release()
401 kfree(subs->tmpbuf); usX2Y_urbs_release()
402 subs->tmpbuf = NULL; usX2Y_urbs_release()
407 static int usX2Y_urbs_allocate(struct snd_usX2Y_substream *subs) usX2Y_urbs_allocate() argument
411 int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; usX2Y_urbs_allocate()
412 struct usb_device *dev = subs->usX2Y->dev; usX2Y_urbs_allocate()
414 pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) : usX2Y_urbs_allocate()
415 usb_rcvisocpipe(dev, subs->endpoint); usX2Y_urbs_allocate()
416 subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback); usX2Y_urbs_allocate()
417 if (!subs->maxpacksize) usX2Y_urbs_allocate()
420 if (is_playback && NULL == subs->tmpbuf) { /* allocate a temporary buffer for playback */ usX2Y_urbs_allocate()
421 subs->tmpbuf = kcalloc(nr_of_packs(), subs->maxpacksize, GFP_KERNEL); usX2Y_urbs_allocate()
422 if (NULL == subs->tmpbuf) { usX2Y_urbs_allocate()
429 struct urb **purb = subs->urb + i; usX2Y_urbs_allocate()
436 usX2Y_urbs_release(subs); usX2Y_urbs_allocate()
441 (*purb)->transfer_buffer = kmalloc(subs->maxpacksize * nr_of_packs(), GFP_KERNEL); usX2Y_urbs_allocate()
443 usX2Y_urbs_release(subs); usX2Y_urbs_allocate()
450 (*purb)->context = subs; usX2Y_urbs_allocate()
457 static void usX2Y_subs_startup(struct snd_usX2Y_substream *subs) usX2Y_subs_startup() argument
459 struct usX2Ydev *usX2Y = subs->usX2Y; usX2Y_subs_startup()
460 usX2Y->prepare_subs = subs; usX2Y_subs_startup()
461 subs->urb[0]->start_frame = -1; usX2Y_subs_startup()
466 static int usX2Y_urbs_start(struct snd_usX2Y_substream *subs) usX2Y_urbs_start() argument
469 struct usX2Ydev *usX2Y = subs->usX2Y; usX2Y_urbs_start()
471 if ((err = usX2Y_urbs_allocate(subs)) < 0) usX2Y_urbs_start()
473 subs->completed_urb = NULL; usX2Y_urbs_start()
475 struct snd_usX2Y_substream *subs = usX2Y->subs[i]; usX2Y_urbs_start() local
476 if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED) usX2Y_urbs_start()
481 usX2Y_subs_startup(subs); usX2Y_urbs_start()
483 struct urb *urb = subs->urb[i]; usX2Y_urbs_start()
487 atomic_set(&subs->state, state_STARTING3); usX2Y_urbs_start()
490 urb->iso_frame_desc[pack].offset = subs->maxpacksize * pack; usX2Y_urbs_start()
491 urb->iso_frame_desc[pack].length = subs->maxpacksize; usX2Y_urbs_start()
493 urb->transfer_buffer_length = subs->maxpacksize * nr_of_packs(); usX2Y_urbs_start()
503 atomic_set(&subs->state, state_STARTING1); usX2Y_urbs_start()
509 if (atomic_read(&subs->state) != state_PREPARED) usX2Y_urbs_start()
525 struct snd_usX2Y_substream *subs = substream->runtime->private_data; snd_usX2Y_pcm_pointer() local
526 return subs->hwptr_done; snd_usX2Y_pcm_pointer()
533 struct snd_usX2Y_substream *subs = substream->runtime->private_data; snd_usX2Y_pcm_trigger() local
538 if (atomic_read(&subs->state) == state_PREPARED && snd_usX2Y_pcm_trigger()
539 atomic_read(&subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]->state) >= state_PREPARED) { snd_usX2Y_pcm_trigger()
540 atomic_set(&subs->state, state_PRERUNNING); snd_usX2Y_pcm_trigger()
548 if (atomic_read(&subs->state) >= state_PRERUNNING) snd_usX2Y_pcm_trigger()
549 atomic_set(&subs->state, state_PREPARED); snd_usX2Y_pcm_trigger()
759 struct snd_usX2Y_substream *subs = dev->subs[i]; snd_usX2Y_pcm_hw_params() local
762 if (!subs) snd_usX2Y_pcm_hw_params()
764 test_substream = subs->pcm_substream; snd_usX2Y_pcm_hw_params()
796 struct snd_usX2Y_substream *subs = runtime->private_data; snd_usX2Y_pcm_hw_free() local
797 mutex_lock(&subs->usX2Y->pcm_mutex); snd_usX2Y_pcm_hw_free()
801 struct snd_usX2Y_substream *cap_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; snd_usX2Y_pcm_hw_free()
802 atomic_set(&subs->state, state_STOPPED); snd_usX2Y_pcm_hw_free()
803 usX2Y_urbs_release(subs); snd_usX2Y_pcm_hw_free()
812 struct snd_usX2Y_substream *playback_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; snd_usX2Y_pcm_hw_free()
814 atomic_set(&subs->state, state_STOPPED); snd_usX2Y_pcm_hw_free()
815 usX2Y_urbs_release(subs); snd_usX2Y_pcm_hw_free()
818 mutex_unlock(&subs->usX2Y->pcm_mutex); snd_usX2Y_pcm_hw_free()
829 struct snd_usX2Y_substream *subs = runtime->private_data; snd_usX2Y_pcm_prepare() local
830 struct usX2Ydev *usX2Y = subs->usX2Y; snd_usX2Y_pcm_prepare()
831 struct snd_usX2Y_substream *capsubs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; snd_usX2Y_pcm_prepare()
836 usX2Y_subs_prepare(subs); snd_usX2Y_pcm_prepare()
846 snd_printdd("starting capture pipe for %s\n", subs == capsubs ? "self" : "playpipe"); snd_usX2Y_pcm_prepare()
851 if (subs != capsubs && atomic_read(&subs->state) < state_PREPARED) snd_usX2Y_pcm_prepare()
852 err = usX2Y_urbs_start(subs); snd_usX2Y_pcm_prepare()
883 struct snd_usX2Y_substream *subs = ((struct snd_usX2Y_substream **) snd_usX2Y_pcm_open() local
887 if (subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS) snd_usX2Y_pcm_open()
891 runtime->private_data = subs; snd_usX2Y_pcm_open()
892 subs->pcm_substream = substream; snd_usX2Y_pcm_open()
902 struct snd_usX2Y_substream *subs = runtime->private_data; snd_usX2Y_pcm_close() local
904 subs->pcm_substream = NULL; snd_usX2Y_pcm_close()
947 usX2Y(card)->subs + 2 * usX2Y(card)->pcm_devs; usX2Y_audio_stream_new()
289 usX2Y_error_urb_status(struct usX2Ydev *usX2Y, struct snd_usX2Y_substream *subs, struct urb *urb) usX2Y_error_urb_status() argument
H A Dusbusx2y.h44 struct snd_usX2Y_substream *subs[4]; member in struct:usX2Ydev
/linux-4.1.27/arch/arm/lib/
H A Dfloppydma.S16 subs r9, r9, #1
20 subs pc, lr, #4
25 subs r9, r9, #1
31 subs pc, lr, #4
H A Dio-writesw-armv4.S40 subs r2, r2, #8
44 subs r2, r2, #8
84 subs r2, r2, #2
91 subs r2, r2, #2
H A Dio-readsw-armv4.S35 subs r2, r2, #8
54 subs r2, r2, #8
107 1: subs r2, r2, #2
113 subs r2, r2, #2
H A Dcopy_page.S40 subs r2, r2, #1 @ 1
H A Dlib1funcs.S172 subs \order, \order, #3 @ yes, 3 is intended here
212 subs r2, r1, #1
241 subs r2, r1, #1 @ compare divisor with 1
264 subs r2, r1, #1 @ division by 1 or -1 ?
307 subs r2, r1, #1 @ compare divisor with 1
H A Dashldi3.S43 subs r3, r2, #32
H A Dashrdi3.S43 subs r3, r2, #32
H A Dlshrdi3.S43 subs r3, r2, #32
H A Dbacktrace.S138 2: subs reg, reg, #1
H A Ddiv64.S52 subs ip, r4, #1
/linux-4.1.27/arch/arm/mach-rpc/
H A Dfiq.S15 subs pc, lr, #4
/linux-4.1.27/sound/pcmcia/pdaudiocf/
H A Dpdaudiocf_pcm.c47 static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd) pdacf_pcm_trigger() argument
49 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); pdacf_pcm_trigger()
50 struct snd_pcm_runtime *runtime = subs->runtime; pdacf_pcm_trigger()
102 static int pdacf_pcm_hw_params(struct snd_pcm_substream *subs, pdacf_pcm_hw_params() argument
106 (subs, params_buffer_bytes(hw_params)); pdacf_pcm_hw_params()
112 static int pdacf_pcm_hw_free(struct snd_pcm_substream *subs) pdacf_pcm_hw_free() argument
114 return snd_pcm_lib_free_vmalloc_buffer(subs); pdacf_pcm_hw_free()
120 static int pdacf_pcm_prepare(struct snd_pcm_substream *subs) pdacf_pcm_prepare() argument
122 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); pdacf_pcm_prepare()
123 struct snd_pcm_runtime *runtime = subs->runtime; pdacf_pcm_prepare()
227 static int pdacf_pcm_capture_open(struct snd_pcm_substream *subs) pdacf_pcm_capture_open() argument
229 struct snd_pcm_runtime *runtime = subs->runtime; pdacf_pcm_capture_open()
230 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); pdacf_pcm_capture_open()
237 chip->pcm_substream = subs; pdacf_pcm_capture_open()
245 static int pdacf_pcm_capture_close(struct snd_pcm_substream *subs) pdacf_pcm_capture_close() argument
247 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); pdacf_pcm_capture_close()
260 static snd_pcm_uframes_t pdacf_pcm_capture_pointer(struct snd_pcm_substream *subs) pdacf_pcm_capture_pointer() argument
262 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); pdacf_pcm_capture_pointer()
/linux-4.1.27/sound/isa/sb/
H A Demu8000_pcm.c227 static int emu8k_pcm_open(struct snd_pcm_substream *subs) emu8k_pcm_open() argument
229 struct snd_emu8000 *emu = snd_pcm_substream_chip(subs); emu8k_pcm_open()
231 struct snd_pcm_runtime *runtime = subs->runtime; emu8k_pcm_open()
238 rec->substream = subs; emu8k_pcm_open()
255 static int emu8k_pcm_close(struct snd_pcm_substream *subs) emu8k_pcm_close() argument
257 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_close()
259 subs->runtime->private_data = NULL; emu8k_pcm_close()
384 static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd) emu8k_pcm_trigger() argument
386 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_trigger()
441 static int emu8k_pcm_copy(struct snd_pcm_substream *subs, emu8k_pcm_copy() argument
447 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_copy()
479 static int emu8k_pcm_silence(struct snd_pcm_substream *subs, emu8k_pcm_silence() argument
484 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_silence()
507 static int emu8k_pcm_copy(struct snd_pcm_substream *subs, emu8k_pcm_copy() argument
513 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_copy()
540 static int emu8k_pcm_silence(struct snd_pcm_substream *subs, emu8k_pcm_silence() argument
545 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_silence()
568 static int emu8k_pcm_hw_params(struct snd_pcm_substream *subs, emu8k_pcm_hw_params() argument
571 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_hw_params()
585 subs->dma_buffer.bytes = params_buffer_bytes(hw_params); emu8k_pcm_hw_params()
593 static int emu8k_pcm_hw_free(struct snd_pcm_substream *subs) emu8k_pcm_hw_free() argument
595 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_hw_free()
611 static int emu8k_pcm_prepare(struct snd_pcm_substream *subs) emu8k_pcm_prepare() argument
613 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_prepare()
615 rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate); emu8k_pcm_prepare()
619 rec->buf_size = subs->runtime->buffer_size; emu8k_pcm_prepare()
620 rec->period_size = subs->runtime->period_size; emu8k_pcm_prepare()
621 rec->voices = subs->runtime->channels; emu8k_pcm_prepare()
657 static snd_pcm_uframes_t emu8k_pcm_pointer(struct snd_pcm_substream *subs) emu8k_pcm_pointer() argument
659 struct snd_emu8k_pcm *rec = subs->runtime->private_data; emu8k_pcm_pointer()
/linux-4.1.27/firmware/av7110/
H A DBoot.S39 subs pc, r14, #4 // SWI
40 subs pc, r14, #4 // prefetch abort
41 subs pc, r14, #8 // data abort
42 subs pc, r14, #4 // reserved
43 subs pc, r14, #4 // IRQ
44 subs pc, r14, #4 // FIQ
91 subs r2, r2, #1
/linux-4.1.27/sound/firewire/dice/
H A Ddice-midi.c96 struct snd_rawmidi_substream *subs; set_midi_substream_names() local
98 list_for_each_entry(subs, &str->substreams, list) { set_midi_substream_names()
99 snprintf(subs->name, sizeof(subs->name), set_midi_substream_names()
100 "%s MIDI %d", dice->card->shortname, subs->number + 1); set_midi_substream_names()
/linux-4.1.27/sound/core/seq/
H A Dseq_ports.c204 struct snd_seq_subscribers *subs,
228 struct snd_seq_subscribers *subs; clear_subscriber_list() local
232 subs = get_subscriber(p, is_src); clear_subscriber_list()
234 aport = get_client_port(&subs->info.dest, &c); clear_subscriber_list()
236 aport = get_client_port(&subs->info.sender, &c); clear_subscriber_list()
237 delete_and_unsubscribe_port(client, port, subs, is_src, false); clear_subscriber_list()
244 if (atomic_dec_and_test(&subs->ref_count)) clear_subscriber_list()
245 kfree(subs); clear_subscriber_list()
250 delete_and_unsubscribe_port(c, aport, subs, !is_src, true); clear_subscriber_list()
251 kfree(subs); clear_subscriber_list()
485 struct snd_seq_subscribers *subs, check_and_subscribe_port()
505 if (match_subs_info(&subs->info, &s->info)) check_and_subscribe_port()
510 err = subscribe_port(client, port, grp, &subs->info, ack); check_and_subscribe_port()
519 list_add_tail(&subs->src_list, &grp->list_head); check_and_subscribe_port()
521 list_add_tail(&subs->dest_list, &grp->list_head); check_and_subscribe_port()
523 atomic_inc(&subs->ref_count); check_and_subscribe_port()
534 struct snd_seq_subscribers *subs, delete_and_unsubscribe_port()
542 list = is_src ? &subs->src_list : &subs->dest_list; delete_and_unsubscribe_port()
553 unsubscribe_port(client, port, grp, &subs->info, ack); delete_and_unsubscribe_port()
564 struct snd_seq_subscribers *subs; snd_seq_port_connect() local
568 subs = kzalloc(sizeof(*subs), GFP_KERNEL); snd_seq_port_connect()
569 if (!subs) snd_seq_port_connect()
572 subs->info = *info; snd_seq_port_connect()
573 atomic_set(&subs->ref_count, 0); snd_seq_port_connect()
574 INIT_LIST_HEAD(&subs->src_list); snd_seq_port_connect()
575 INIT_LIST_HEAD(&subs->dest_list); snd_seq_port_connect()
579 err = check_and_subscribe_port(src_client, src_port, subs, true, snd_seq_port_connect()
584 err = check_and_subscribe_port(dest_client, dest_port, subs, false, snd_seq_port_connect()
593 delete_and_unsubscribe_port(src_client, src_port, subs, true, snd_seq_port_connect()
596 kfree(subs); snd_seq_port_connect()
609 struct snd_seq_subscribers *subs; snd_seq_port_disconnect() local
614 list_for_each_entry(subs, &src->list_head, src_list) { snd_seq_port_disconnect()
615 if (match_subs_info(info, &subs->info)) { snd_seq_port_disconnect()
616 atomic_dec(&subs->ref_count); /* mark as not ready */ snd_seq_port_disconnect()
625 delete_and_unsubscribe_port(src_client, src_port, subs, true, snd_seq_port_disconnect()
627 delete_and_unsubscribe_port(dest_client, dest_port, subs, false, snd_seq_port_disconnect()
629 kfree(subs); snd_seq_port_disconnect()
483 check_and_subscribe_port(struct snd_seq_client *client, struct snd_seq_client_port *port, struct snd_seq_subscribers *subs, bool is_src, bool exclusive, bool ack) check_and_subscribe_port() argument
532 delete_and_unsubscribe_port(struct snd_seq_client *client, struct snd_seq_client_port *port, struct snd_seq_subscribers *subs, bool is_src, bool ack) delete_and_unsubscribe_port() argument
H A Dseq_clientmgr.c662 struct snd_seq_subscribers *subs; deliver_to_subscribers() local
680 list_for_each_entry(subs, &grp->list_head, src_list) { deliver_to_subscribers()
682 if (atomic_read(&subs->ref_count) != 2) deliver_to_subscribers()
684 event->dest = subs->info.dest; deliver_to_subscribers()
685 if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP) deliver_to_subscribers()
687 update_timestamp_of_queue(event, subs->info.queue, deliver_to_subscribers()
688 subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIME_REAL); deliver_to_subscribers()
1393 struct snd_seq_port_subscribe *subs) check_subscription_permission()
1395 if (client->number != subs->sender.client && check_subscription_permission()
1396 client->number != subs->dest.client) { check_subscription_permission()
1408 if (client->number != subs->sender.client) { check_subscription_permission()
1413 if (client->number != subs->dest.client) { check_subscription_permission()
1448 struct snd_seq_port_subscribe subs; snd_seq_ioctl_subscribe_port() local
1450 if (copy_from_user(&subs, arg, sizeof(subs))) snd_seq_ioctl_subscribe_port()
1453 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) snd_seq_ioctl_subscribe_port()
1455 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) snd_seq_ioctl_subscribe_port()
1457 if ((sport = snd_seq_port_use_ptr(sender, subs.sender.port)) == NULL) snd_seq_ioctl_subscribe_port()
1459 if ((dport = snd_seq_port_use_ptr(receiver, subs.dest.port)) == NULL) snd_seq_ioctl_subscribe_port()
1462 result = check_subscription_permission(client, sport, dport, &subs); snd_seq_ioctl_subscribe_port()
1467 result = snd_seq_port_connect(client, sender, sport, receiver, dport, &subs); snd_seq_ioctl_subscribe_port()
1470 &subs, SNDRV_SEQ_EVENT_PORT_SUBSCRIBED); snd_seq_ioctl_subscribe_port()
1493 struct snd_seq_port_subscribe subs; snd_seq_ioctl_unsubscribe_port() local
1495 if (copy_from_user(&subs, arg, sizeof(subs))) snd_seq_ioctl_unsubscribe_port()
1498 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) snd_seq_ioctl_unsubscribe_port()
1500 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) snd_seq_ioctl_unsubscribe_port()
1502 if ((sport = snd_seq_port_use_ptr(sender, subs.sender.port)) == NULL) snd_seq_ioctl_unsubscribe_port()
1504 if ((dport = snd_seq_port_use_ptr(receiver, subs.dest.port)) == NULL) snd_seq_ioctl_unsubscribe_port()
1507 result = check_subscription_permission(client, sport, dport, &subs); snd_seq_ioctl_unsubscribe_port()
1511 result = snd_seq_port_disconnect(client, sender, sport, receiver, dport, &subs); snd_seq_ioctl_unsubscribe_port()
1514 &subs, SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED); snd_seq_ioctl_unsubscribe_port()
1988 struct snd_seq_port_subscribe subs; snd_seq_ioctl_get_subscription() local
1991 if (copy_from_user(&subs, arg, sizeof(subs))) snd_seq_ioctl_get_subscription()
1995 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) snd_seq_ioctl_get_subscription()
1997 if ((sport = snd_seq_port_use_ptr(sender, subs.sender.port)) == NULL) snd_seq_ioctl_get_subscription()
1999 p = snd_seq_port_get_subscription(&sport->c_src, &subs.dest); snd_seq_ioctl_get_subscription()
2002 subs = p->info; snd_seq_ioctl_get_subscription()
2012 if (copy_to_user(arg, &subs, sizeof(subs))) snd_seq_ioctl_get_subscription()
2028 struct snd_seq_query_subs subs; snd_seq_ioctl_query_subs() local
2033 if (copy_from_user(&subs, arg, sizeof(subs))) snd_seq_ioctl_query_subs()
2036 if ((cptr = snd_seq_client_use_ptr(subs.root.client)) == NULL) snd_seq_ioctl_query_subs()
2038 if ((port = snd_seq_port_use_ptr(cptr, subs.root.port)) == NULL) snd_seq_ioctl_query_subs()
2041 switch (subs.type) { snd_seq_ioctl_query_subs()
2054 subs.num_subs = group->count; snd_seq_ioctl_query_subs()
2058 if (i++ == subs.index) { snd_seq_ioctl_query_subs()
2061 if (subs.type == SNDRV_SEQ_QUERY_SUBS_READ) { snd_seq_ioctl_query_subs()
2063 subs.addr = s->info.dest; snd_seq_ioctl_query_subs()
2066 subs.addr = s->info.sender; snd_seq_ioctl_query_subs()
2068 subs.flags = s->info.flags; snd_seq_ioctl_query_subs()
2069 subs.queue = s->info.queue; snd_seq_ioctl_query_subs()
2082 if (copy_to_user(arg, &subs, sizeof(subs))) snd_seq_ioctl_query_subs()
1390 check_subscription_permission(struct snd_seq_client *client, struct snd_seq_client_port *sport, struct snd_seq_client_port *dport, struct snd_seq_port_subscribe *subs) check_subscription_permission() argument
/linux-4.1.27/sound/pci/mixart/
H A Dmixart.c429 static int snd_mixart_trigger(struct snd_pcm_substream *subs, int cmd) snd_mixart_trigger() argument
431 struct mixart_stream *stream = subs->runtime->private_data; snd_mixart_trigger()
436 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_START\n"); snd_mixart_trigger()
453 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_STOP\n"); snd_mixart_trigger()
460 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_PUSH\n"); snd_mixart_trigger()
465 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_RELEASE\n"); snd_mixart_trigger()
490 static int snd_mixart_prepare(struct snd_pcm_substream *subs) snd_mixart_prepare() argument
492 struct snd_mixart *chip = snd_pcm_substream_chip(subs); snd_mixart_prepare()
493 struct mixart_stream *stream = subs->runtime->private_data; snd_mixart_prepare()
504 chip->mgr->sample_rate = subs->runtime->rate; snd_mixart_prepare()
508 if( mixart_set_clock(chip->mgr, stream->pipe, subs->runtime->rate) ) snd_mixart_prepare()
603 static int snd_mixart_hw_params(struct snd_pcm_substream *subs, snd_mixart_hw_params() argument
606 struct snd_mixart *chip = snd_pcm_substream_chip(subs); snd_mixart_hw_params()
608 struct mixart_stream *stream = subs->runtime->private_data; snd_mixart_hw_params()
624 if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) snd_mixart_hw_params()
625 mixart_update_playback_stream_level(chip, is_aes, subs->number); snd_mixart_hw_params()
640 err = snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw)); snd_mixart_hw_params()
644 int i = (chip->chip_idx * MIXART_MAX_STREAM_PER_CARD) + (stream->pcm_number * (MIXART_PLAYBACK_STREAMS+MIXART_CAPTURE_STREAMS)) + subs->number; snd_mixart_hw_params()
645 if( subs->stream == SNDRV_PCM_STREAM_CAPTURE ) { snd_mixart_hw_params()
650 bufferinfo[i].buffer_address = subs->runtime->dma_addr; snd_mixart_hw_params()
651 bufferinfo[i].available_length = subs->runtime->dma_bytes; snd_mixart_hw_params()
655 "snd_mixart_hw_params(pcm %d) : dma_addr(%x) dma_bytes(%x) subs-number(%d)\n", snd_mixart_hw_params()
658 subs->number); snd_mixart_hw_params()
665 static int snd_mixart_hw_free(struct snd_pcm_substream *subs) snd_mixart_hw_free() argument
667 struct snd_mixart *chip = snd_pcm_substream_chip(subs); snd_mixart_hw_free()
668 snd_pcm_lib_free_pages(subs); snd_mixart_hw_free()
721 static int snd_mixart_playback_open(struct snd_pcm_substream *subs) snd_mixart_playback_open() argument
723 struct snd_mixart *chip = snd_pcm_substream_chip(subs); snd_mixart_playback_open()
725 struct snd_pcm_runtime *runtime = subs->runtime; snd_mixart_playback_open()
726 struct snd_pcm *pcm = subs->pcm; snd_mixart_playback_open()
744 chip->chip_idx, pcm_number, subs->number); snd_mixart_playback_open()
747 stream = &(chip->playback_stream[pcm_number][subs->number]); snd_mixart_playback_open()
753 chip->chip_idx, pcm_number, subs->number); snd_mixart_playback_open()
778 stream->substream = subs; snd_mixart_playback_open()
800 static int snd_mixart_capture_open(struct snd_pcm_substream *subs) snd_mixart_capture_open() argument
802 struct snd_mixart *chip = snd_pcm_substream_chip(subs); snd_mixart_capture_open()
804 struct snd_pcm_runtime *runtime = subs->runtime; snd_mixart_capture_open()
805 struct snd_pcm *pcm = subs->pcm; snd_mixart_capture_open()
825 chip->chip_idx, pcm_number, subs->number); snd_mixart_capture_open()
834 chip->chip_idx, pcm_number, subs->number); snd_mixart_capture_open()
859 stream->substream = subs; snd_mixart_capture_open()
882 static int snd_mixart_close(struct snd_pcm_substream *subs) snd_mixart_close() argument
884 struct snd_mixart *chip = snd_pcm_substream_chip(subs); snd_mixart_close()
886 struct mixart_stream *stream = subs->runtime->private_data; snd_mixart_close()
891 chip->chip_idx, stream->pcm_number, subs->number); snd_mixart_close()
915 static snd_pcm_uframes_t snd_mixart_stream_pointer(struct snd_pcm_substream *subs) snd_mixart_stream_pointer() argument
917 struct snd_pcm_runtime *runtime = subs->runtime; snd_mixart_stream_pointer()
950 struct snd_pcm_substream *subs; preallocate_buffers()
955 for (subs = pcm->streams[stream].substream; subs; subs = subs->next, idx++) preallocate_buffers()
957 subs->dma_device.id = subs->pcm->device << 16 | preallocate_buffers()
958 subs->stream << 8 | (subs->number + 1) | preallocate_buffers()
H A Dmixart.h164 int references; /* number of subs openned */
/linux-4.1.27/drivers/spi/
H A Dspi-s3c24xx-fiq.S52 subs fiq_rcount, fiq_rcount, #1
58 subs pc, lr, #4
79 subs fiq_rcount, fiq_rcount, #1
84 subs pc, lr, #4
104 subs fiq_rcount, fiq_rcount, #1
109 subs pc, lr, #4
/linux-4.1.27/sound/core/seq/oss/
H A Dseq_oss_midi.c330 struct snd_seq_port_subscribe subs; snd_seq_oss_midi_open() local
360 memset(&subs, 0, sizeof(subs)); snd_seq_oss_midi_open()
363 subs.sender = dp->addr; snd_seq_oss_midi_open()
364 subs.dest.client = mdev->client; snd_seq_oss_midi_open()
365 subs.dest.port = mdev->port; snd_seq_oss_midi_open()
366 if (snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs) >= 0) snd_seq_oss_midi_open()
370 subs.sender.client = mdev->client; snd_seq_oss_midi_open()
371 subs.sender.port = mdev->port; snd_seq_oss_midi_open()
372 subs.dest = dp->addr; snd_seq_oss_midi_open()
373 subs.flags = SNDRV_SEQ_PORT_SUBS_TIMESTAMP; snd_seq_oss_midi_open()
374 subs.queue = dp->queue; /* queue for timestamps */ snd_seq_oss_midi_open()
375 if (snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs) >= 0) snd_seq_oss_midi_open()
396 struct snd_seq_port_subscribe subs; snd_seq_oss_midi_close() local
405 memset(&subs, 0, sizeof(subs)); snd_seq_oss_midi_close()
407 subs.sender = dp->addr; snd_seq_oss_midi_close()
408 subs.dest.client = mdev->client; snd_seq_oss_midi_close()
409 subs.dest.port = mdev->port; snd_seq_oss_midi_close()
410 snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, &subs); snd_seq_oss_midi_close()
413 subs.sender.client = mdev->client; snd_seq_oss_midi_close()
414 subs.sender.port = mdev->port; snd_seq_oss_midi_close()
415 subs.dest = dp->addr; snd_seq_oss_midi_close()
416 snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, &subs); snd_seq_oss_midi_close()
H A Dseq_oss_init.c112 struct snd_seq_port_subscribe subs; snd_seq_oss_create_client() local
114 memset(&subs, 0, sizeof(subs)); snd_seq_oss_create_client()
115 subs.sender.client = SNDRV_SEQ_CLIENT_SYSTEM; snd_seq_oss_create_client()
116 subs.sender.port = SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE; snd_seq_oss_create_client()
117 subs.dest.client = system_client; snd_seq_oss_create_client()
118 subs.dest.port = system_port; snd_seq_oss_create_client()
119 call_ctl(SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs); snd_seq_oss_create_client()
/linux-4.1.27/sound/ppc/
H A Dpmac.c127 static int snd_pmac_pcm_hw_params(struct snd_pcm_substream *subs, snd_pmac_pcm_hw_params() argument
130 return snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw_params)); snd_pmac_pcm_hw_params()
136 static int snd_pmac_pcm_hw_free(struct snd_pcm_substream *subs) snd_pmac_pcm_hw_free() argument
138 snd_pcm_lib_free_pages(subs); snd_pmac_pcm_hw_free()
211 static int snd_pmac_pcm_prepare(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs) snd_pmac_pcm_prepare() argument
215 struct snd_pcm_runtime *runtime = subs->runtime; snd_pmac_pcm_prepare()
220 rec->dma_size = snd_pcm_lib_buffer_bytes(subs); snd_pmac_pcm_prepare()
221 rec->period_size = snd_pcm_lib_period_bytes(subs); snd_pmac_pcm_prepare()
276 struct snd_pcm_substream *subs, int cmd) snd_pmac_pcm_trigger()
286 command = (subs->stream == SNDRV_PCM_STREAM_PLAYBACK ? snd_pmac_pcm_trigger()
324 struct snd_pcm_substream *subs) snd_pmac_pcm_pointer()
340 return bytes_to_frames(subs->runtime, count); snd_pmac_pcm_pointer()
347 static int snd_pmac_playback_prepare(struct snd_pcm_substream *subs) snd_pmac_playback_prepare() argument
349 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_playback_prepare()
350 return snd_pmac_pcm_prepare(chip, &chip->playback, subs); snd_pmac_playback_prepare()
353 static int snd_pmac_playback_trigger(struct snd_pcm_substream *subs, snd_pmac_playback_trigger() argument
356 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_playback_trigger()
357 return snd_pmac_pcm_trigger(chip, &chip->playback, subs, cmd); snd_pmac_playback_trigger()
360 static snd_pcm_uframes_t snd_pmac_playback_pointer(struct snd_pcm_substream *subs) snd_pmac_playback_pointer() argument
362 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_playback_pointer()
363 return snd_pmac_pcm_pointer(chip, &chip->playback, subs); snd_pmac_playback_pointer()
371 static int snd_pmac_capture_prepare(struct snd_pcm_substream *subs) snd_pmac_capture_prepare() argument
373 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_capture_prepare()
374 return snd_pmac_pcm_prepare(chip, &chip->capture, subs); snd_pmac_capture_prepare()
377 static int snd_pmac_capture_trigger(struct snd_pcm_substream *subs, snd_pmac_capture_trigger() argument
380 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_capture_trigger()
381 return snd_pmac_pcm_trigger(chip, &chip->capture, subs, cmd); snd_pmac_capture_trigger()
384 static snd_pcm_uframes_t snd_pmac_capture_pointer(struct snd_pcm_substream *subs) snd_pmac_capture_pointer() argument
386 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_capture_pointer()
387 return snd_pmac_pcm_pointer(chip, &chip->capture, subs); snd_pmac_capture_pointer()
586 struct snd_pcm_substream *subs) snd_pmac_pcm_open()
588 struct snd_pcm_runtime *runtime = subs->runtime; snd_pmac_pcm_open()
618 rec->substream = subs; snd_pmac_pcm_open()
635 struct snd_pcm_substream *subs) snd_pmac_pcm_close()
652 static int snd_pmac_playback_open(struct snd_pcm_substream *subs) snd_pmac_playback_open() argument
654 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_playback_open()
656 subs->runtime->hw = snd_pmac_playback; snd_pmac_playback_open()
657 return snd_pmac_pcm_open(chip, &chip->playback, subs); snd_pmac_playback_open()
660 static int snd_pmac_capture_open(struct snd_pcm_substream *subs) snd_pmac_capture_open() argument
662 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_capture_open()
664 subs->runtime->hw = snd_pmac_capture; snd_pmac_capture_open()
665 return snd_pmac_pcm_open(chip, &chip->capture, subs); snd_pmac_capture_open()
668 static int snd_pmac_playback_close(struct snd_pcm_substream *subs) snd_pmac_playback_close() argument
670 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_playback_close()
672 return snd_pmac_pcm_close(chip, &chip->playback, subs); snd_pmac_playback_close()
675 static int snd_pmac_capture_close(struct snd_pcm_substream *subs) snd_pmac_capture_close() argument
677 struct snd_pmac *chip = snd_pcm_substream_chip(subs); snd_pmac_capture_close()
679 return snd_pmac_pcm_close(chip, &chip->capture, subs); snd_pmac_capture_close()
275 snd_pmac_pcm_trigger(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs, int cmd) snd_pmac_pcm_trigger() argument
322 snd_pmac_pcm_pointer(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs) snd_pmac_pcm_pointer() argument
585 snd_pmac_pcm_open(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs) snd_pmac_pcm_open() argument
634 snd_pmac_pcm_close(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs) snd_pmac_pcm_close() argument
/linux-4.1.27/sound/firewire/bebob/
H A Dbebob_midi.c116 struct snd_rawmidi_substream *subs; set_midi_substream_names() local
118 list_for_each_entry(subs, &str->substreams, list) { set_midi_substream_names()
119 snprintf(subs->name, sizeof(subs->name), set_midi_substream_names()
121 bebob->card->shortname, subs->number + 1); set_midi_substream_names()
/linux-4.1.27/sound/firewire/fireworks/
H A Dfireworks_midi.c117 struct snd_rawmidi_substream *subs; set_midi_substream_names() local
119 list_for_each_entry(subs, &str->substreams, list) { set_midi_substream_names()
120 snprintf(subs->name, sizeof(subs->name), set_midi_substream_names()
121 "%s MIDI %d", efw->card->shortname, subs->number + 1); set_midi_substream_names()
/linux-4.1.27/sound/firewire/oxfw/
H A Doxfw-midi.c134 struct snd_rawmidi_substream *subs; set_midi_substream_names() local
136 list_for_each_entry(subs, &str->substreams, list) { set_midi_substream_names()
137 snprintf(subs->name, sizeof(subs->name), set_midi_substream_names()
139 oxfw->card->shortname, subs->number + 1); set_midi_substream_names()
/linux-4.1.27/sound/pci/pcxhr/
H A Dpcxhr.c640 struct snd_pcm_substream *subs = stream->substream; pcxhr_update_r_buffer() local
641 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); pcxhr_update_r_buffer()
643 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); pcxhr_update_r_buffer()
644 stream_num = is_capture ? 0 : subs->number; pcxhr_update_r_buffer()
647 "pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%zx) subs(%d)\n", pcxhr_update_r_buffer()
649 chip->chip_idx, (void *)(long)subs->runtime->dma_addr, pcxhr_update_r_buffer()
650 subs->runtime->dma_bytes, subs->number); pcxhr_update_r_buffer()
657 snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000); pcxhr_update_r_buffer()
659 rmh.cmd[1] = subs->runtime->dma_bytes * 8; pcxhr_update_r_buffer()
661 rmh.cmd[2] = subs->runtime->dma_addr >> 24; pcxhr_update_r_buffer()
665 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD; pcxhr_update_r_buffer()
838 static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) pcxhr_trigger() argument
842 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); pcxhr_trigger()
847 if (snd_pcm_stream_linked(subs)) { snd_pcm_group_for_each_entry()
848 snd_pcm_group_for_each_entry(s, subs) { snd_pcm_group_for_each_entry()
854 snd_pcm_trigger_done(s, subs); snd_pcm_group_for_each_entry()
858 stream = subs->runtime->private_data;
875 snd_pcm_group_for_each_entry(s, subs) { snd_pcm_group_for_each_entry()
880 snd_pcm_trigger_done(s, subs); snd_pcm_group_for_each_entry()
914 static int pcxhr_prepare(struct snd_pcm_substream *subs) pcxhr_prepare() argument
916 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); pcxhr_prepare()
922 subs->runtime->period_size, subs->runtime->periods, pcxhr_prepare()
923 subs->runtime->buffer_size); pcxhr_prepare()
930 if (mgr->sample_rate != subs->runtime->rate) { pcxhr_prepare()
931 err = pcxhr_set_clock(mgr, subs->runtime->rate); pcxhr_prepare()
937 mgr->sample_rate = subs->runtime->rate; pcxhr_prepare()
950 static int pcxhr_hw_params(struct snd_pcm_substream *subs, pcxhr_hw_params() argument
953 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); pcxhr_hw_params()
955 struct pcxhr_stream *stream = subs->runtime->private_data; pcxhr_hw_params()
972 err = snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw)); pcxhr_hw_params()
979 static int pcxhr_hw_free(struct snd_pcm_substream *subs) pcxhr_hw_free() argument
981 snd_pcm_lib_free_pages(subs); pcxhr_hw_free()
1016 static int pcxhr_open(struct snd_pcm_substream *subs) pcxhr_open() argument
1018 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); pcxhr_open()
1020 struct snd_pcm_runtime *runtime = subs->runtime; pcxhr_open()
1029 if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) { pcxhr_open()
1030 dev_dbg(chip->card->dev, "pcxhr_open playback chip%d subs%d\n", pcxhr_open()
1031 chip->chip_idx, subs->number); pcxhr_open()
1032 stream = &chip->playback_stream[subs->number]; pcxhr_open()
1034 dev_dbg(chip->card->dev, "pcxhr_open capture chip%d subs%d\n", pcxhr_open()
1035 chip->chip_idx, subs->number); pcxhr_open()
1040 stream = &chip->capture_stream[subs->number]; pcxhr_open()
1044 dev_err(chip->card->dev, "pcxhr_open chip%d subs%d in use\n", pcxhr_open()
1045 chip->chip_idx, subs->number); pcxhr_open()
1083 stream->substream = subs; pcxhr_open()
1093 snd_pcm_set_sync(subs); pcxhr_open()
1102 static int pcxhr_close(struct snd_pcm_substream *subs) pcxhr_close() argument
1104 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); pcxhr_close()
1106 struct pcxhr_stream *stream = subs->runtime->private_data; pcxhr_close()
1110 dev_dbg(chip->card->dev, "pcxhr_close chip%d subs%d\n", pcxhr_close()
1111 chip->chip_idx, subs->number); pcxhr_close()
1128 static snd_pcm_uframes_t pcxhr_stream_pointer(struct snd_pcm_substream *subs) pcxhr_stream_pointer() argument
1132 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); pcxhr_stream_pointer()
1133 struct snd_pcm_runtime *runtime = subs->runtime; pcxhr_stream_pointer()
/linux-4.1.27/sound/drivers/vx/
H A Dvx_pcm.c526 static int vx_pcm_playback_open(struct snd_pcm_substream *subs) vx_pcm_playback_open() argument
528 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_playback_open()
529 struct vx_core *chip = snd_pcm_substream_chip(subs); vx_pcm_playback_open()
537 audio = subs->pcm->device * 2; vx_pcm_playback_open()
553 pipe->substream = subs; vx_pcm_playback_open()
570 static int vx_pcm_playback_close(struct snd_pcm_substream *subs) vx_pcm_playback_close() argument
572 struct vx_core *chip = snd_pcm_substream_chip(subs); vx_pcm_playback_close()
575 if (! subs->runtime->private_data) vx_pcm_playback_close()
578 pipe = subs->runtime->private_data; vx_pcm_playback_close()
615 * @subs: substream
691 struct snd_pcm_substream *subs, vx_pcm_playback_transfer()
695 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_playback_transfer()
711 struct snd_pcm_substream *subs, vx_pcm_playback_update()
715 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_playback_update()
722 snd_pcm_period_elapsed(subs); vx_pcm_playback_update()
730 static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd) vx_pcm_trigger() argument
732 struct vx_core *chip = snd_pcm_substream_chip(subs); vx_pcm_trigger()
733 struct vx_pipe *pipe = subs->runtime->private_data; vx_pcm_trigger()
743 vx_pcm_playback_transfer(chip, subs, pipe, 2); vx_pcm_trigger()
783 static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs) vx_pcm_playback_pointer() argument
785 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_playback_pointer()
793 static int vx_pcm_hw_params(struct snd_pcm_substream *subs, vx_pcm_hw_params() argument
797 (subs, params_buffer_bytes(hw_params)); vx_pcm_hw_params()
803 static int vx_pcm_hw_free(struct snd_pcm_substream *subs) vx_pcm_hw_free() argument
805 return snd_pcm_lib_free_vmalloc_buffer(subs); vx_pcm_hw_free()
811 static int vx_pcm_prepare(struct snd_pcm_substream *subs) vx_pcm_prepare() argument
813 struct vx_core *chip = snd_pcm_substream_chip(subs); vx_pcm_prepare()
814 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_prepare()
917 static int vx_pcm_capture_open(struct snd_pcm_substream *subs) vx_pcm_capture_open() argument
919 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_capture_open()
920 struct vx_core *chip = snd_pcm_substream_chip(subs); vx_pcm_capture_open()
929 audio = subs->pcm->device * 2; vx_pcm_capture_open()
935 pipe->substream = subs; vx_pcm_capture_open()
976 static int vx_pcm_capture_close(struct snd_pcm_substream *subs) vx_pcm_capture_close() argument
978 struct vx_core *chip = snd_pcm_substream_chip(subs); vx_pcm_capture_close()
982 if (! subs->runtime->private_data) vx_pcm_capture_close()
984 pipe = subs->runtime->private_data; vx_pcm_capture_close()
1012 static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs, vx_pcm_capture_update() argument
1016 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_capture_update()
1073 snd_pcm_period_elapsed(subs); vx_pcm_capture_update()
1086 static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs) vx_pcm_capture_pointer() argument
1088 struct snd_pcm_runtime *runtime = subs->runtime; vx_pcm_capture_pointer()
690 vx_pcm_playback_transfer(struct vx_core *chip, struct snd_pcm_substream *subs, struct vx_pipe *pipe, int nchunks) vx_pcm_playback_transfer() argument
710 vx_pcm_playback_update(struct vx_core *chip, struct snd_pcm_substream *subs, struct vx_pipe *pipe) vx_pcm_playback_update() argument
/linux-4.1.27/arch/arm/mm/
H A Dproc-arm940.S117 subs r3, r3, #1 << 26
119 subs r1, r1, #1 << 4
167 subs r3, r3, #1 << 26
169 subs r1, r1, #1 << 4
189 subs r3, r3, #1 << 26
191 subs r1, r1, #1 << 4
212 subs r3, r3, #1 << 26
214 subs r1, r1, #1 << 4
239 subs r3, r3, #1 << 26
241 subs r1, r1, #1 << 4
H A Dcopypage-fa.c34 subs r2, r2, #1 @ 1\n\ fa_copy_user_page()
74 subs r1, r1, #1 @ 1\n\ fa_clear_user_highpage()
H A Dcopypage-v4wt.c36 subs r2, r2, #1 @ 1\n\ v4wt_copy_user_page()
76 subs r1, r1, #1 @ 1\n\ v4wt_clear_user_highpage()
H A Dcopypage-xsc3.c60 subs lr, lr, #1 \n\ xsc3_mc_copy_user_page()
103 subs r1, r1, #1 \n\ xsc3_mc_clear_user_highpage()
H A Dcopypage-feroceon.c60 subs ip, ip, #(32 * 8) \n\ feroceon_copy_user_page()
97 subs r1, r1, #1 \n\ feroceon_clear_user_highpage()
H A Dcopypage-v4mc.c58 subs r4, r4, #1 @ 1\n\ mc_copy_user_page()
104 subs r1, r1, #1 @ 1\n\ v4_mc_clear_user_highpage()
H A Dcopypage-v4wb.c40 subs r2, r2, #1 @ 1\n\ v4wb_copy_user_page()
83 subs r1, r1, #1 @ 1\n\ v4wb_clear_user_highpage()
H A Dcopypage-xscale.c78 subs lr, lr, #1 \n\ mc_copy_user_page()
123 subs r1, r1, #1 \n\ xscale_mc_clear_user_highpage()
H A Dproc-arm1022.S149 subs r3, r3, #1 << 26
151 subs r1, r1, #1 << 5
358 subs r1, r1, #CACHE_DLINESIZE
379 subs r3, r3, #1 << 26
381 subs r1, r1, #1 << 5
H A Dproc-arm1020.S160 subs r3, r3, #1 << 26
162 subs r1, r1, #1 << 5
382 subs r1, r1, #CACHE_DLINESIZE
408 subs r3, r3, #1
411 subs r1, r1, #1
H A Dproc-arm1020e.S159 subs r3, r3, #1 << 26
161 subs r1, r1, #1 << 5
367 subs r1, r1, #CACHE_DLINESIZE
392 subs r3, r3, #1
395 subs r1, r1, #1
H A Dproc-arm920.S147 subs r3, r3, #1 << 26
149 subs r1, r1, #1 << 5
333 subs r1, r1, #CACHE_DLINESIZE
360 subs r3, r3, #1 << 26
362 subs r1, r1, #1 << 5
H A Dproc-arm922.S149 subs r3, r3, #1 << 26
151 subs r1, r1, #1 << 5
336 subs r1, r1, #CACHE_DLINESIZE
364 subs r3, r3, #1 << 26
366 subs r1, r1, #1 << 5
H A Dproc-arm946.S112 subs r3, r3, #1 << 4
114 subs r1, r1, #1 << 29
323 subs r1, r1, #CACHE_DLINESIZE
H A Dcache-v7.S54 2: subs r3, r3, #1 @ Temp--
158 subs r9, r9, #1 @ decrement the index
160 subs r4, r4, #1 @ decrement the way
H A Dproc-arm925.S185 subs r3, r3, #1 << 4
389 subs r1, r1, #CACHE_DLINESIZE
414 subs r3, r3, #1 << 4
H A Dproc-feroceon.S163 subs ip, ip, #(1 << 30) @ next way
165 subs r1, r1, #(1 << 5) @ next set
454 subs r1, r1, #CACHE_DLINESIZE
460 subs r3, r3, #CACHE_DLINESIZE
H A Dproc-sa110.S122 subs r1, r1, #DCACHELINESIZE
H A Dproc-fa526.S90 subs r1, r1, #CACHE_DLINESIZE
H A Dproc-sa1100.S132 subs r1, r1, #DCACHELINESIZE
H A Dproc-xsc3.S74 subs \rd, \rd, #0x20
349 subs r1, r1, #CACHELINESIZE
H A Dproc-arm1026.S352 subs r1, r1, #CACHE_DLINESIZE
H A Dproc-v6.S85 subs r1, r1, #D_CACHE_LINE_SIZE
H A Dproc-arm926.S352 subs r1, r1, #CACHE_DLINESIZE
H A Dproc-mohawk.S315 subs r1, r1, #CACHE_DLINESIZE
H A Dproc-v7.S84 subs r1, r1, r2
H A Dproc-xscale.S459 subs r1, r1, #CACHELINESIZE
/linux-4.1.27/sound/pci/
H A Dmaestro3.c1061 struct snd_pcm_substream *subs) snd_m3_pcm_start()
1063 if (! s || ! subs) snd_m3_pcm_start()
1067 switch (subs->stream) { snd_m3_pcm_start()
1088 struct snd_pcm_substream *subs) snd_m3_pcm_stop()
1090 if (! s || ! subs) snd_m3_pcm_stop()
1096 switch (subs->stream) { snd_m3_pcm_stop()
1112 snd_m3_pcm_trigger(struct snd_pcm_substream *subs, int cmd) snd_m3_pcm_trigger() argument
1114 struct snd_m3 *chip = snd_pcm_substream_chip(subs); snd_m3_pcm_trigger()
1115 struct m3_dma *s = subs->runtime->private_data; snd_m3_pcm_trigger()
1129 err = snd_m3_pcm_start(chip, s, subs); snd_m3_pcm_trigger()
1138 err = snd_m3_pcm_stop(chip, s, subs); snd_m3_pcm_trigger()
1150 snd_m3_pcm_setup1(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) snd_m3_pcm_setup1() argument
1153 struct snd_pcm_runtime *runtime = subs->runtime; snd_m3_pcm_setup1()
1155 if (subs->stream == SNDRV_PCM_STREAM_PLAYBACK) { snd_m3_pcm_setup1()
1303 struct snd_pcm_substream *subs) snd_m3_playback_setup()
1322 subs->runtime->rate > 45000 ? 0xff : 0); snd_m3_playback_setup()
1369 snd_m3_capture_setup(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) snd_m3_capture_setup() argument
1425 snd_m3_pcm_prepare(struct snd_pcm_substream *subs) snd_m3_pcm_prepare() argument
1427 struct snd_m3 *chip = snd_pcm_substream_chip(subs); snd_m3_pcm_prepare()
1428 struct snd_pcm_runtime *runtime = subs->runtime; snd_m3_pcm_prepare()
1443 snd_m3_pcm_setup1(chip, s, subs); snd_m3_pcm_prepare()
1445 if (subs->stream == SNDRV_PCM_STREAM_PLAYBACK) snd_m3_pcm_prepare()
1446 snd_m3_playback_setup(chip, s, subs); snd_m3_pcm_prepare()
1448 snd_m3_capture_setup(chip, s, subs); snd_m3_pcm_prepare()
1461 snd_m3_get_pointer(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) snd_m3_get_pointer() argument
1486 snd_m3_pcm_pointer(struct snd_pcm_substream *subs) snd_m3_pcm_pointer() argument
1488 struct snd_m3 *chip = snd_pcm_substream_chip(subs); snd_m3_pcm_pointer()
1490 struct m3_dma *s = subs->runtime->private_data; snd_m3_pcm_pointer()
1496 ptr = snd_m3_get_pointer(chip, s, subs); snd_m3_pcm_pointer()
1498 return bytes_to_frames(subs->runtime, ptr); snd_m3_pcm_pointer()
1506 struct snd_pcm_substream *subs = s->substream; snd_m3_update_ptr() local
1513 hwptr = snd_m3_get_pointer(chip, s, subs); snd_m3_update_ptr()
1534 snd_pcm_period_elapsed(subs); snd_m3_update_ptr()
1731 snd_m3_substream_open(struct snd_m3 *chip, struct snd_pcm_substream *subs) snd_m3_substream_open() argument
1749 subs->runtime->private_data = s; snd_m3_substream_open()
1750 s->substream = subs; snd_m3_substream_open()
1753 if (subs->stream == SNDRV_PCM_STREAM_PLAYBACK) { snd_m3_substream_open()
1764 snd_m3_substream_close(struct snd_m3 *chip, struct snd_pcm_substream *subs) snd_m3_substream_close() argument
1766 struct m3_dma *s = subs->runtime->private_data; snd_m3_substream_close()
1786 snd_m3_playback_open(struct snd_pcm_substream *subs) snd_m3_playback_open() argument
1788 struct snd_m3 *chip = snd_pcm_substream_chip(subs); snd_m3_playback_open()
1789 struct snd_pcm_runtime *runtime = subs->runtime; snd_m3_playback_open()
1792 if ((err = snd_m3_substream_open(chip, subs)) < 0) snd_m3_playback_open()
1801 snd_m3_playback_close(struct snd_pcm_substream *subs) snd_m3_playback_close() argument
1803 struct snd_m3 *chip = snd_pcm_substream_chip(subs); snd_m3_playback_close()
1805 snd_m3_substream_close(chip, subs); snd_m3_playback_close()
1810 snd_m3_capture_open(struct snd_pcm_substream *subs) snd_m3_capture_open() argument
1812 struct snd_m3 *chip = snd_pcm_substream_chip(subs); snd_m3_capture_open()
1813 struct snd_pcm_runtime *runtime = subs->runtime; snd_m3_capture_open()
1816 if ((err = snd_m3_substream_open(chip, subs)) < 0) snd_m3_capture_open()
1825 snd_m3_capture_close(struct snd_pcm_substream *subs) snd_m3_capture_close() argument
1827 struct snd_m3 *chip = snd_pcm_substream_chip(subs); snd_m3_capture_close()
1829 snd_m3_substream_close(chip, subs); snd_m3_capture_close()
1060 snd_m3_pcm_start(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) snd_m3_pcm_start() argument
1087 snd_m3_pcm_stop(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) snd_m3_pcm_stop() argument
1302 snd_m3_playback_setup(struct snd_m3 *chip, struct m3_dma *s, struct snd_pcm_substream *subs) snd_m3_playback_setup() argument
H A Dcmipci.c1203 static void setup_ac3(struct cmipci *cm, struct snd_pcm_substream *subs, int do_ac3, int rate) setup_ac3() argument
1235 if (snd_pcm_format_width(subs->runtime->format) > 16) { setup_ac3()
1250 static int setup_spdif_playback(struct cmipci *cm, struct snd_pcm_substream *subs, int up, int do_ac3) setup_spdif_playback() argument
1254 rate = subs->runtime->rate; setup_spdif_playback()
1268 setup_ac3(cm, subs, do_ac3, rate); setup_spdif_playback()
1284 setup_ac3(cm, subs, 0, 0); setup_spdif_playback()
1427 static int snd_cmipci_capture_spdif_hw_free(struct snd_pcm_substream *subs) snd_cmipci_capture_spdif_hw_free() argument
1429 struct cmipci *cm = snd_pcm_substream_chip(subs); snd_cmipci_capture_spdif_hw_free()
1436 return snd_cmipci_hw_free(subs); snd_cmipci_capture_spdif_hw_free()
1611 static int open_device_check(struct cmipci *cm, int mode, struct snd_pcm_substream *subs) open_device_check() argument
1626 cm->channel[ch].substream = subs; open_device_check()
H A Dintel8x0.c2762 struct snd_pcm_substream *subs; intel8x0_measure_ac97_clock() local
2773 subs = chip->pcm[0]->streams[0].substream; intel8x0_measure_ac97_clock()
2774 if (! subs || subs->dma_buffer.bytes < INTEL8X0_TESTBUF_SIZE) { intel8x0_measure_ac97_clock()
2780 ichdev->physbuf = subs->dma_buffer.addr; intel8x0_measure_ac97_clock()
H A Des1968.c1868 struct snd_pcm_substream *subs = es->substream; snd_es1968_update_pcm() local
1870 if (subs == NULL || !es->running) snd_es1968_update_pcm()
1883 snd_pcm_period_elapsed(subs); snd_es1968_update_pcm()
/linux-4.1.27/arch/arm64/crypto/
H A Daes-modes.S121 subs w4, w4, #INTERLEAVE
141 subs w4, w4, #1
157 subs w4, w4, #INTERLEAVE
177 subs w4, w4, #1
203 subs w4, w4, #1
218 subs w4, w4, #INTERLEAVE
255 subs w4, w4, #1
290 subs w4, w4, #INTERLEAVE
345 subs w4, w4, #1
407 subs w4, w4, #INTERLEAVE
453 subs w4, w4, #1
479 subs w4, w4, #INTERLEAVE
525 subs w4, w4, #1
H A Daes-ce-cipher.c64 " subs %w[rounds], %w[rounds], #3 ;" aes_cipher_encrypt()
109 " subs %w[rounds], %w[rounds], #3 ;" aes_cipher_decrypt()
H A Daes-neon.S93 subs \i, \i, #1
241 subs \i, \i, #1
270 subs \i, \i, #1
/linux-4.1.27/arch/arm/crypto/
H A Daes-ce-core.S171 subs r4, r4, #3
186 subs r4, r4, #1
197 subs r4, r4, #3
212 subs r4, r4, #1
234 subs r4, r4, #1
246 subs r4, r4, #3
271 subs r4, r4, #1
292 subs r4, r4, #3
321 subs r4, r4, #1
407 subs r4, r4, #3
435 subs r4, r4, #1
458 subs r4, r4, #3
487 subs r4, r4, #1
H A Dbsaes-armv7.pl768 subs $rounds,$rounds,#1
865 subs $rounds,$rounds,#1
970 subs $rounds,$rounds,#1
1024 subs $len,$len,#0x80
1074 subs $len,$len,#0x80
1157 subs $len, $len, #0x8
1456 subs $len, $len, #8
1574 subs r6, r6, #1
1662 subs $len, #0x80
1731 subs $len, #0x80
1756 subs $len, #0x10
1971 subs $len, #1
2086 subs $len, #0x80
2156 subs $len, #0x80
2181 subs $len, #0x10
2415 subs $len, #1
H A Daes-armv4.S320 subs r12,r12,#1
486 subs r12,r12,#1
550 subs r12,r12,#1
619 subs r12,r12,#1
734 subs r12,r12,#1
1015 subs r12,r12,#1
H A Dsha512-armv7-neon.S336 subs %r3, #1;
H A Dsha1-armv7-neon.S535 subs RNBLKS, #1;
/linux-4.1.27/arch/arm64/lib/
H A Dmemcmp.S78 subs limit_wd, limit_wd, #1
147 subs tmp3, tmp1, tmp2
155 subs pos, pos, #1
181 subs limit_wd, limit_wd, #1
208 subs limit_wd, limit_wd, #1
249 subs limit, limit, #1
H A Dstrncmp.S92 subs limit_wd, limit_wd, #1
165 subs tmp3, tmp1, tmp2
174 subs pos, pos, #1
199 subs limit_wd, limit_wd, #1
234 subs limit_wd, limit_wd, #1
299 subs limit, limit, #1
H A Dmemmove.S144 subs count, count, #128
187 subs count, count, #64
H A Dmemset.S138 subs count, count, #64
200 subs tmp2, tmp2, #64
211 subs count, count, zva_len_x
H A Dmemcpy.S148 subs count, count, #128
191 subs count, count, #64
H A Dstrcmp.S121 subs tmp3, tmp1, tmp2
126 subs pos, pos, #1
H A Dstrnlen.S92 subs limit_wd, limit_wd, #1
/linux-4.1.27/drivers/media/pci/cx18/
H A Dcx18-alsa-pcm.c231 static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, snd_pcm_alloc_vmalloc_buffer() argument
234 struct snd_pcm_runtime *runtime = subs->runtime; snd_pcm_alloc_vmalloc_buffer()
306 static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, snd_pcm_get_vmalloc_page() argument
309 void *pageptr = subs->runtime->dma_area + offset; snd_pcm_get_vmalloc_page()
/linux-4.1.27/drivers/media/pci/ivtv/
H A Divtv-alsa-pcm.c238 static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, snd_pcm_alloc_vmalloc_buffer() argument
241 struct snd_pcm_runtime *runtime = subs->runtime; snd_pcm_alloc_vmalloc_buffer()
313 static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, snd_pcm_get_vmalloc_page() argument
316 void *pageptr = subs->runtime->dma_area + offset; snd_pcm_get_vmalloc_page()
/linux-4.1.27/arch/arm/mach-pxa/
H A Dmp900.c37 "subs %0, %1, #1\n" isp116x_pfm_delay()
H A Dsleep.S154 10: subs r0, r0, #1
/linux-4.1.27/arch/arm/kernel/
H A Drelocate_kernel.S53 subs r6,r6,#1
H A Dentry-armv.S903 subs r8, r4, r7
960 subs r3, r3, r0 @ compare with oldval
974 subs r8, r4, r7
991 subs r3, r3, r0
H A Dhead.S198 subs r6, r6, #1
591 subs r3, r0, r3 @ PHYS_OFFSET - PAGE_OFFSET
/linux-4.1.27/arch/arm/mach-davinci/
H A Dsleep.S75 1: subs ip, ip, #0x1
97 2: subs ip, ip, #0x1
131 3: subs ip, ip, #0x1
141 4: subs ip, ip, #0x1
/linux-4.1.27/drivers/media/pci/bt8xx/
H A Dbttv-gpio.c105 list_add_tail(&sub->list,&core->subs); bttv_sub_add_device()
113 list_for_each_entry_safe(sub, save, &core->subs, list) { bttv_sub_del_devices()
H A Dbttv.h208 struct list_head subs; /* struct bttv_sub_device */ member in struct:bttv_core
H A Dbttv-driver.c4040 INIT_LIST_HEAD(&btv->c.subs); bttv_probe()
/linux-4.1.27/drivers/scsi/arm/
H A Dacornscsi-io.S30 subs r2, r2, #16
82 subs r2, r2, #16
H A Darxescsi.c96 " subs r4, r4, #16\n" arxescsi_pseudo_dma_write()
/linux-4.1.27/arch/arm/mach-omap2/
H A Dsleep24xx.S80 subs r5, r5, #0x1 @ awake, wait just a bit
96 subs r5, r5, #0x1
H A Dsram242x.S102 subs r4, r4, #0x1
196 subs r1, r1, #0x1
276 subs r4, r4, #1 @ dec loop
290 subs r0, r0, #1 @ dec loop
312 subs r4, r4, #0x1
H A Dsram243x.S102 subs r4, r4, #0x1
196 subs r1, r1, #0x1
276 subs r4, r4, #1 @ dec loop
290 subs r0, r0, #1 @ dec loop
312 subs r4, r4, #0x1
H A Dsleep34xx.S311 subs r6, r6, #0x1
393 subs r2, r2, #0x1 @ num_words--
H A Dsram34xx.S226 subs r12, r12, #1
/linux-4.1.27/arch/arm/mach-mvebu/
H A Dpm-board.c67 "1: subs r1, r1, #1\n\t" mvebu_armada_xp_gp_pm_enter()
/linux-4.1.27/drivers/net/ethernet/i825xx/
H A Dether1.c149 "subs %3, %3, #2\n\ ether1_writebuffer()
155 subs %3, %3, #2\n\ ether1_writebuffer()
161 subs %3, %3, #2\n\ ether1_writebuffer()
167 subs %3, %3, #2\n\ ether1_writebuffer()
173 subs %3, %3, #2\n\ ether1_writebuffer()
212 "subs %3, %3, #2\n\ ether1_readbuffer()
218 subs %3, %3, #2\n\ ether1_readbuffer()
224 subs %3, %3, #2\n\ ether1_readbuffer()
230 subs %3, %3, #2\n\ ether1_readbuffer()
236 subs %3, %3, #2\n\ ether1_readbuffer()
/linux-4.1.27/arch/arm/mach-imx/
H A Dsuspend-imx6.S106 subs r6, r6, #0x1
218 subs r7, r7, #0x1
288 subs r6, r6, #0x1
H A Dssi-fiq.S133 subs pc, lr, #4
/linux-4.1.27/arch/arm64/kernel/
H A Dkuser32.S60 .inst 0xe0533000 // subs r3, r3, r0
/linux-4.1.27/arch/arm/boot/bootp/
H A Dinit.S70 subs r6, r6, #8 * 4
/linux-4.1.27/sound/pci/ymfpci/
H A Dymfpci_main.c336 unsigned int subs = ypcm->substream->number; snd_ymfpci_pcm_interrupt() local
342 volume = cpu_to_le32(chip->pcm_mixer[subs].left << 15); snd_ymfpci_pcm_interrupt()
348 volume = cpu_to_le32(chip->pcm_mixer[subs].right << 15); snd_ymfpci_pcm_interrupt()
1742 unsigned int subs = kcontrol->id.subdevice; snd_ymfpci_pcm_vol_get() local
1744 ucontrol->value.integer.value[0] = chip->pcm_mixer[subs].left; snd_ymfpci_pcm_vol_get()
1745 ucontrol->value.integer.value[1] = chip->pcm_mixer[subs].right; snd_ymfpci_pcm_vol_get()
1753 unsigned int subs = kcontrol->id.subdevice; snd_ymfpci_pcm_vol_put() local
1757 if (ucontrol->value.integer.value[0] != chip->pcm_mixer[subs].left || snd_ymfpci_pcm_vol_put()
1758 ucontrol->value.integer.value[1] != chip->pcm_mixer[subs].right) { snd_ymfpci_pcm_vol_put()
1759 chip->pcm_mixer[subs].left = ucontrol->value.integer.value[0]; snd_ymfpci_pcm_vol_put()
1760 chip->pcm_mixer[subs].right = ucontrol->value.integer.value[1]; snd_ymfpci_pcm_vol_put()
1761 if (chip->pcm_mixer[subs].left > 0x8000) snd_ymfpci_pcm_vol_put()
1762 chip->pcm_mixer[subs].left = 0x8000; snd_ymfpci_pcm_vol_put()
1763 if (chip->pcm_mixer[subs].right > 0x8000) snd_ymfpci_pcm_vol_put()
1764 chip->pcm_mixer[subs].right = 0x8000; snd_ymfpci_pcm_vol_put()
/linux-4.1.27/arch/arm64/mm/
H A Dcache.S69 subs x9, x9, #1 // decrement the way
71 subs x7, x7, #1 // decrement the index
/linux-4.1.27/arch/arm/include/asm/
H A Datomic.h322 ATOMIC64_OPS(sub, subs, sbc)
386 " subs %Q0, %Q0, #1\n" atomic64_dec_if_positive()
H A Dspinlock.h93 " subs %1, %0, %0, ror #16\n" arch_spin_trylock()
/linux-4.1.27/sound/soc/kirkwood/
H A Dkirkwood-dma.c24 static struct kirkwood_dma_data *kirkwood_priv(struct snd_pcm_substream *subs) kirkwood_priv() argument
26 struct snd_soc_pcm_runtime *soc_runtime = subs->private_data; kirkwood_priv()
/linux-4.1.27/drivers/media/usb/cx231xx/
H A Dcx231xx-audio.c390 static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, snd_pcm_alloc_vmalloc_buffer() argument
393 struct snd_pcm_runtime *runtime = subs->runtime; snd_pcm_alloc_vmalloc_buffer()
394 struct cx231xx *dev = snd_pcm_substream_chip(subs); snd_pcm_alloc_vmalloc_buffer()
627 static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, snd_pcm_get_vmalloc_page() argument
630 void *pageptr = subs->runtime->dma_area + offset; snd_pcm_get_vmalloc_page()
/linux-4.1.27/arch/arm/probes/kprobes/
H A Dtest-thumb.c76 TEST_RR( "subs r2, r",0,VAL1,", r",7,VAL2,"") kprobe_thumb16_test_cases()
77 TEST_RR( "subs r5, r",7,VAL2,", r",0,VAL2,"") kprobe_thumb16_test_cases()
80 TEST_R( "subs r7, r",0,VAL1,", #5") kprobe_thumb16_test_cases()
81 TEST_R( "subs r0, r",7,VAL2,", #2") kprobe_thumb16_test_cases()
89 TEST_R( "subs.n r",0,VAL1,", #0x5f") kprobe_thumb16_test_cases()
90 TEST_R( "subs.n r",7,VAL2,", #0xa0") kprobe_thumb16_test_cases()
329 TEST_ITBLOCK("subs.n r0, r0") kprobe_thumb16_test_cases()
600 TEST_R("subs r0, sp, r",1, 4,", asl #3") kprobe_thumb32_test_cases()
779 TEST_UNSUPPORTED("subs pc, lr, #4") kprobe_thumb32_test_cases()
/linux-4.1.27/arch/arm64/include/asm/
H A Datomic.h221 " subs %0, %0, #1\n" atomic64_dec_if_positive()
H A Dinsn.h245 __AARCH64_INSN_FUNCS(subs, 0x7F200000, 0x6B000000)
/linux-4.1.27/arch/arm/boot/compressed/
H A Dhead-sharpsl.S48 subs r5, r5, #1
H A Dhead.S354 subs r1, r5, r1
1115 subs r3, r3, #1 << 26
1117 subs r1, r1, #1 << 5
1186 subs r9, r9, #1 @ decrement the way
1188 subs r7, r7, #1 @ decrement the index
1270 1: subs r1, r1, #1
1288 3: subs r1, r1, #1
/linux-4.1.27/sound/usb/caiaq/
H A Daudio.c93 all_substreams_zero(struct snd_pcm_substream **subs) all_substreams_zero() argument
97 if (subs[i] != NULL) all_substreams_zero()
355 struct snd_pcm_substream **subs) check_for_elapsed_periods()
361 sub = subs[stream]; check_for_elapsed_periods()
354 check_for_elapsed_periods(struct snd_usb_caiaqdev *cdev, struct snd_pcm_substream **subs) check_for_elapsed_periods() argument
/linux-4.1.27/drivers/media/usb/tm6000/
H A Dtm6000-alsa.c380 static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, snd_pcm_get_vmalloc_page() argument
383 void *pageptr = subs->runtime->dma_area + offset; snd_pcm_get_vmalloc_page()
/linux-4.1.27/drivers/media/usb/em28xx/
H A Dem28xx-audio.c197 static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, snd_pcm_alloc_vmalloc_buffer() argument
200 struct snd_pcm_runtime *runtime = subs->runtime; snd_pcm_alloc_vmalloc_buffer()
468 static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, snd_pcm_get_vmalloc_page() argument
471 void *pageptr = subs->runtime->dma_area + offset; snd_pcm_get_vmalloc_page()
/linux-4.1.27/drivers/staging/lustre/include/linux/libcfs/
H A Dlibcfs_ioctl.h80 unsigned int subs; member in struct:libcfs_debug_ioctl_data
/linux-4.1.27/arch/arm/vfp/
H A Dvfp.h62 asm( "subs %Q0, %Q2, %Q4\n\t" sub128()
/linux-4.1.27/sound/usb/misc/
H A Dua101.c879 static snd_pcm_uframes_t capture_pcm_pointer(struct snd_pcm_substream *subs) capture_pcm_pointer() argument
881 struct ua101 *ua = subs->private_data; capture_pcm_pointer()
886 static snd_pcm_uframes_t playback_pcm_pointer(struct snd_pcm_substream *subs) playback_pcm_pointer() argument
888 struct ua101 *ua = subs->private_data; playback_pcm_pointer()
/linux-4.1.27/arch/arm/kvm/
H A Dinterrupts_head.S459 subs r4, r4, #1
498 subs r4, r4, #1
/linux-4.1.27/arch/arm/mach-omap1/
H A Dams-delta-fiq-handler.S121 subs pc, lr, #4 @ return from FIQ
H A Dsleep.S195 subs r5, r5, #1
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
H A Dclass_obd.c213 libcfs_subsystem_debug = debug_data->subs; class_handle_ioctl()
/linux-4.1.27/drivers/scsi/device_handler/
H A Dscsi_dh_rdac.c125 u8 page_id[4]; /* "subs" */
/linux-4.1.27/arch/arm/mach-tegra/
H A Dsleep-tegra30.S192 subs r3, r3, #1 @ delay as a part of wfe war.
/linux-4.1.27/sound/pci/hda/
H A Dhda_codec.h112 unsigned int subs; member in struct:hda_codec_preset
/linux-4.1.27/arch/tile/kernel/
H A Dtile-desc_32.c1147 { "subs", TILEPRO_OPC_SUBS, 0x3, 3, TREG_ZERO, 1,
1150 { "subs.sn", TILEPRO_OPC_SUBS_SN, 0x3, 3, TREG_SN, 1,
/linux-4.1.27/drivers/ata/
H A Dpata_ep93xx.c210 "subs %0, %1, #1\n" ep93xx_pata_delay()
/linux-4.1.27/lib/mpi/
H A Dlonglong.h186 __asm__ ("subs %1, %4, %5\n" \
/linux-4.1.27/drivers/media/platform/s5p-jpeg/
H A Djpeg-core.c549 enum v4l2_jpeg_chroma_subsampling subs, s5p_jpeg_adjust_fourcc_to_subsampling()
548 s5p_jpeg_adjust_fourcc_to_subsampling( enum v4l2_jpeg_chroma_subsampling subs, u32 in_fourcc, u32 *out_fourcc, struct s5p_jpeg_ctx *ctx) s5p_jpeg_adjust_fourcc_to_subsampling() argument
/linux-4.1.27/scripts/
H A Dkernel-doc1878 # output_* subs.
/linux-4.1.27/drivers/net/wireless/
H A Datmel.c4409 subs r0, r0, #1

Completed in 3207 milliseconds