/sound/usb/ |
D | pcm.c | 34 static snd_pcm_uframes_t snd_usb_pcm_delay(struct snd_usb_substream *subs, in snd_usb_pcm_delay() argument 42 if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) { in snd_usb_pcm_delay() 43 queued = bytes_to_frames(runtime, subs->inflight_bytes); in snd_usb_pcm_delay() 46 } else if (!subs->running) { in snd_usb_pcm_delay() 50 current_frame_number = usb_get_current_frame_number(subs->dev); in snd_usb_pcm_delay() 56 frame_diff = (current_frame_number - subs->last_frame_number) & 0xff; in snd_usb_pcm_delay() 62 if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) { in snd_usb_pcm_delay() 77 struct snd_usb_substream *subs = runtime->private_data; in snd_usb_pcm_pointer() local 80 if (atomic_read(&subs->stream->chip->shutdown)) in snd_usb_pcm_pointer() 82 spin_lock(&subs->lock); in snd_usb_pcm_pointer() [all …]
|
D | media.h | 56 int snd_media_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, 58 void snd_media_stream_delete(struct snd_usb_substream *subs); 59 int snd_media_start_pipeline(struct snd_usb_substream *subs); 60 void snd_media_stop_pipeline(struct snd_usb_substream *subs); 66 static inline int snd_media_stream_init(struct snd_usb_substream *subs, in snd_media_stream_init() argument 69 static inline void snd_media_stream_delete(struct snd_usb_substream *subs) { } in snd_media_stream_delete() argument 70 static inline int snd_media_start_pipeline(struct snd_usb_substream *subs) in snd_media_start_pipeline() argument 72 static inline void snd_media_stop_pipeline(struct snd_usb_substream *subs) { } in snd_media_stop_pipeline() argument
|
D | stream.c | 42 static void free_substream(struct snd_usb_substream *subs) in free_substream() argument 46 if (!subs->num_formats) in free_substream() 48 list_for_each_entry_safe(fp, n, &subs->fmt_list, list) in free_substream() 50 kfree(subs->str_pd); in free_substream() 51 snd_media_stream_delete(subs); in free_substream() 84 struct snd_usb_substream *subs = &as->substream[stream]; in snd_usb_init_substream() local 86 INIT_LIST_HEAD(&subs->fmt_list); in snd_usb_init_substream() 87 spin_lock_init(&subs->lock); in snd_usb_init_substream() 89 subs->stream = as; in snd_usb_init_substream() 90 subs->direction = stream; in snd_usb_init_substream() [all …]
|
D | proc.c | 92 static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct snd_info_buffer *buf… in proc_dump_substream_formats() argument 99 list_for_each_entry(fp, &subs->fmt_list, list) { in proc_dump_substream_formats() 129 if (subs->speed != USB_SPEED_FULL) in proc_dump_substream_formats() 172 static void proc_dump_ep_status(struct snd_usb_substream *subs, in proc_dump_ep_status() argument 181 subs->speed == USB_SPEED_FULL in proc_dump_ep_status() 193 struct snd_usb_substream *subs, in proc_dump_substream_status() argument 197 if (subs->running) { in proc_dump_substream_status() 199 if (subs->cur_audiofmt) { in proc_dump_substream_status() 200 snd_iprintf(buffer, " Interface = %d\n", subs->cur_audiofmt->iface); in proc_dump_substream_status() 201 snd_iprintf(buffer, " Altset = %d\n", subs->cur_audiofmt->altsetting); in proc_dump_substream_status() [all …]
|
D | media.c | 33 int snd_media_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, in snd_media_stream_init() argument 44 mdev = subs->stream->chip->media_dev; in snd_media_stream_init() 48 if (subs->media_ctl) in snd_media_stream_init() 103 subs->media_ctl = mctl; in snd_media_stream_init() 117 void snd_media_stream_delete(struct snd_usb_substream *subs) in snd_media_stream_delete() argument 119 struct media_ctl *mctl = subs->media_ctl; in snd_media_stream_delete() 131 subs->media_ctl = NULL; in snd_media_stream_delete() 135 int snd_media_start_pipeline(struct snd_usb_substream *subs) in snd_media_start_pipeline() argument 137 struct media_ctl *mctl = subs->media_ctl; in snd_media_start_pipeline() 151 void snd_media_stop_pipeline(struct snd_usb_substream *subs) in snd_media_stop_pipeline() argument [all …]
|
D | implicit.c | 404 static int match_endpoint_audioformats(struct snd_usb_substream *subs, in match_endpoint_audioformats() argument 441 struct snd_usb_substream *subs; in find_matching_substream() local 444 subs = &as->substream[stream]; in find_matching_substream() 445 if (as->fmt_type == fmt_type && subs->ep_num == ep_num) in find_matching_substream() 446 return subs; in find_matching_substream() 462 struct snd_usb_substream *subs; in snd_usb_find_implicit_fb_sync_format() local 471 subs = find_matching_substream(chip, stream, target->sync_ep, in snd_usb_find_implicit_fb_sync_format() 473 if (!subs) in snd_usb_find_implicit_fb_sync_format() 477 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_find_implicit_fb_sync_format() 478 score = match_endpoint_audioformats(subs, fp, in snd_usb_find_implicit_fb_sync_format() [all …]
|
/sound/usb/usx2y/ |
D | usbusx2yaudio.c | 58 static int usx2y_urb_capt_retire(struct snd_usx2y_substream *subs) in usx2y_urb_capt_retire() argument 60 struct urb *urb = subs->completed_urb; in usx2y_urb_capt_retire() 61 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; in usx2y_urb_capt_retire() 63 int i, len, lens = 0, hwptr_done = subs->hwptr_done; in usx2y_urb_capt_retire() 65 struct usx2ydev *usx2y = subs->usx2y; in usx2y_urb_capt_retire() 97 subs->hwptr_done = hwptr_done; in usx2y_urb_capt_retire() 98 subs->transfer_done += lens; in usx2y_urb_capt_retire() 100 if (subs->transfer_done >= runtime->period_size) { in usx2y_urb_capt_retire() 101 subs->transfer_done -= runtime->period_size; in usx2y_urb_capt_retire() 102 snd_pcm_period_elapsed(subs->pcm_substream); in usx2y_urb_capt_retire() [all …]
|
D | usx2yhwdeppcm.c | 49 static int usx2y_usbpcm_urb_capt_retire(struct snd_usx2y_substream *subs) in usx2y_usbpcm_urb_capt_retire() argument 51 struct urb *urb = subs->completed_urb; in usx2y_usbpcm_urb_capt_retire() 52 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; in usx2y_usbpcm_urb_capt_retire() 53 int i, lens = 0, hwptr_done = subs->hwptr_done; in usx2y_usbpcm_urb_capt_retire() 54 struct usx2ydev *usx2y = subs->usx2y; in usx2y_usbpcm_urb_capt_retire() 76 subs->hwptr_done = hwptr_done; in usx2y_usbpcm_urb_capt_retire() 77 subs->transfer_done += lens; in usx2y_usbpcm_urb_capt_retire() 79 if (subs->transfer_done >= runtime->period_size) { in usx2y_usbpcm_urb_capt_retire() 80 subs->transfer_done -= runtime->period_size; in usx2y_usbpcm_urb_capt_retire() 81 snd_pcm_period_elapsed(subs->pcm_substream); in usx2y_usbpcm_urb_capt_retire() [all …]
|
/sound/core/seq/ |
D | seq_ports.c | 191 struct snd_seq_subscribers *subs, 215 struct snd_seq_subscribers *subs; in clear_subscriber_list() local 219 subs = get_subscriber(p, is_src); in clear_subscriber_list() 221 aport = get_client_port(&subs->info.dest, &c); in clear_subscriber_list() 223 aport = get_client_port(&subs->info.sender, &c); in clear_subscriber_list() 224 delete_and_unsubscribe_port(client, port, subs, is_src, false); in clear_subscriber_list() 231 if (atomic_dec_and_test(&subs->ref_count)) in clear_subscriber_list() 232 kfree(subs); in clear_subscriber_list() 237 delete_and_unsubscribe_port(c, aport, subs, !is_src, true); in clear_subscriber_list() 238 kfree(subs); in clear_subscriber_list() [all …]
|
D | seq_clientmgr.c | 666 struct snd_seq_subscribers *subs; in deliver_to_subscribers() local 684 list_for_each_entry(subs, &grp->list_head, src_list) { in deliver_to_subscribers() 686 if (atomic_read(&subs->ref_count) != 2) in deliver_to_subscribers() 688 event->dest = subs->info.dest; in deliver_to_subscribers() 689 if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP) in deliver_to_subscribers() 691 update_timestamp_of_queue(event, subs->info.queue, in deliver_to_subscribers() 692 subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIME_REAL); in deliver_to_subscribers() 1415 struct snd_seq_port_subscribe *subs) in check_subscription_permission() argument 1417 if (client->number != subs->sender.client && in check_subscription_permission() 1418 client->number != subs->dest.client) { in check_subscription_permission() [all …]
|
/sound/isa/sb/ |
D | emu8000_pcm.c | 216 static int emu8k_pcm_open(struct snd_pcm_substream *subs) in emu8k_pcm_open() argument 218 struct snd_emu8000 *emu = snd_pcm_substream_chip(subs); in emu8k_pcm_open() 220 struct snd_pcm_runtime *runtime = subs->runtime; in emu8k_pcm_open() 227 rec->substream = subs; in emu8k_pcm_open() 244 static int emu8k_pcm_close(struct snd_pcm_substream *subs) in emu8k_pcm_close() argument 246 struct snd_emu8k_pcm *rec = subs->runtime->private_data; in emu8k_pcm_close() 248 subs->runtime->private_data = NULL; in emu8k_pcm_close() 373 static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd) in emu8k_pcm_trigger() argument 375 struct snd_emu8k_pcm *rec = subs->runtime->private_data; in emu8k_pcm_trigger() 451 static int emu8k_pcm_copy(struct snd_pcm_substream *subs, in emu8k_pcm_copy() argument [all …]
|
/sound/firewire/tascam/ |
D | tascam-midi.c | 87 struct snd_rawmidi_substream *subs; in snd_tscm_create_midi_devices() local 107 list_for_each_entry(subs, &stream->substreams, list) { in snd_tscm_create_midi_devices() 109 if (subs->number < tscm->spec->midi_capture_ports) { in snd_tscm_create_midi_devices() 111 snprintf(subs->name, sizeof(subs->name), in snd_tscm_create_midi_devices() 113 tscm->card->shortname, subs->number + 1); in snd_tscm_create_midi_devices() 123 list_for_each_entry(subs, &stream->substreams, list) { in snd_tscm_create_midi_devices() 124 if (subs->number < tscm->spec->midi_playback_ports) { in snd_tscm_create_midi_devices() 126 snprintf(subs->name, sizeof(subs->name), in snd_tscm_create_midi_devices() 128 tscm->card->shortname, subs->number + 1); in snd_tscm_create_midi_devices()
|
/sound/pcmcia/pdaudiocf/ |
D | pdaudiocf_pcm.c | 34 static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd) in pdacf_pcm_trigger() argument 36 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); in pdacf_pcm_trigger() 37 struct snd_pcm_runtime *runtime = subs->runtime; in pdacf_pcm_trigger() 89 static int pdacf_pcm_prepare(struct snd_pcm_substream *subs) in pdacf_pcm_prepare() argument 91 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); in pdacf_pcm_prepare() 92 struct snd_pcm_runtime *runtime = subs->runtime; in pdacf_pcm_prepare() 196 static int pdacf_pcm_capture_open(struct snd_pcm_substream *subs) in pdacf_pcm_capture_open() argument 198 struct snd_pcm_runtime *runtime = subs->runtime; in pdacf_pcm_capture_open() 199 struct snd_pdacf *chip = snd_pcm_substream_chip(subs); in pdacf_pcm_capture_open() 206 chip->pcm_substream = subs; in pdacf_pcm_capture_open() [all …]
|
/sound/pci/mixart/ |
D | mixart.c | 416 static int snd_mixart_trigger(struct snd_pcm_substream *subs, int cmd) in snd_mixart_trigger() argument 418 struct mixart_stream *stream = subs->runtime->private_data; in snd_mixart_trigger() 423 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_START\n"); in snd_mixart_trigger() 440 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_STOP\n"); in snd_mixart_trigger() 447 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_PUSH\n"); in snd_mixart_trigger() 452 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_RELEASE\n"); in snd_mixart_trigger() 477 static int snd_mixart_prepare(struct snd_pcm_substream *subs) in snd_mixart_prepare() argument 479 struct snd_mixart *chip = snd_pcm_substream_chip(subs); in snd_mixart_prepare() 480 struct mixart_stream *stream = subs->runtime->private_data; in snd_mixart_prepare() 491 chip->mgr->sample_rate = subs->runtime->rate; in snd_mixart_prepare() [all …]
|
/sound/drivers/vx/ |
D | vx_pcm.c | 512 static int vx_pcm_playback_open(struct snd_pcm_substream *subs) in vx_pcm_playback_open() argument 514 struct snd_pcm_runtime *runtime = subs->runtime; in vx_pcm_playback_open() 515 struct vx_core *chip = snd_pcm_substream_chip(subs); in vx_pcm_playback_open() 523 audio = subs->pcm->device * 2; in vx_pcm_playback_open() 538 pipe->substream = subs; in vx_pcm_playback_open() 555 static int vx_pcm_playback_close(struct snd_pcm_substream *subs) in vx_pcm_playback_close() argument 557 struct vx_core *chip = snd_pcm_substream_chip(subs); in vx_pcm_playback_close() 560 if (! subs->runtime->private_data) in vx_pcm_playback_close() 563 pipe = subs->runtime->private_data; in vx_pcm_playback_close() 676 struct snd_pcm_substream *subs, in vx_pcm_playback_transfer() argument [all …]
|
/sound/ppc/ |
D | pmac.c | 179 …nd_pmac_pcm_prepare(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs) in snd_pmac_pcm_prepare() argument 183 struct snd_pcm_runtime *runtime = subs->runtime; in snd_pmac_pcm_prepare() 188 rec->dma_size = snd_pcm_lib_buffer_bytes(subs); in snd_pmac_pcm_prepare() 189 rec->period_size = snd_pcm_lib_period_bytes(subs); in snd_pmac_pcm_prepare() 244 struct snd_pcm_substream *subs, int cmd) in snd_pmac_pcm_trigger() argument 254 command = (subs->stream == SNDRV_PCM_STREAM_PLAYBACK ? in snd_pmac_pcm_trigger() 292 struct snd_pcm_substream *subs) in snd_pmac_pcm_pointer() argument 308 return bytes_to_frames(subs->runtime, count); in snd_pmac_pcm_pointer() 315 static int snd_pmac_playback_prepare(struct snd_pcm_substream *subs) in snd_pmac_playback_prepare() argument 317 struct snd_pmac *chip = snd_pcm_substream_chip(subs); in snd_pmac_playback_prepare() [all …]
|
/sound/core/seq/oss/ |
D | seq_oss_midi.c | 326 struct snd_seq_port_subscribe subs; in snd_seq_oss_midi_open() local 359 memset(&subs, 0, sizeof(subs)); in snd_seq_oss_midi_open() 362 subs.sender = dp->addr; in snd_seq_oss_midi_open() 363 subs.dest.client = mdev->client; in snd_seq_oss_midi_open() 364 subs.dest.port = mdev->port; in snd_seq_oss_midi_open() 365 if (snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs) >= 0) in snd_seq_oss_midi_open() 369 subs.sender.client = mdev->client; in snd_seq_oss_midi_open() 370 subs.sender.port = mdev->port; in snd_seq_oss_midi_open() 371 subs.dest = dp->addr; in snd_seq_oss_midi_open() 372 subs.flags = SNDRV_SEQ_PORT_SUBS_TIMESTAMP; in snd_seq_oss_midi_open() [all …]
|
/sound/pci/pcxhr/ |
D | pcxhr.c | 626 struct snd_pcm_substream *subs = stream->substream; in pcxhr_update_r_buffer() local 627 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_update_r_buffer() 629 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); in pcxhr_update_r_buffer() 630 stream_num = is_capture ? 0 : subs->number; in pcxhr_update_r_buffer() 635 chip->chip_idx, (void *)(long)subs->runtime->dma_addr, in pcxhr_update_r_buffer() 636 subs->runtime->dma_bytes, subs->number); in pcxhr_update_r_buffer() 643 snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000); in pcxhr_update_r_buffer() 645 rmh.cmd[1] = subs->runtime->dma_bytes * 8; in pcxhr_update_r_buffer() 647 rmh.cmd[2] = subs->runtime->dma_addr >> 24; in pcxhr_update_r_buffer() 651 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD; in pcxhr_update_r_buffer() [all …]
|
/sound/firewire/digi00x/ |
D | digi00x-midi.c | 94 struct snd_rawmidi_substream *subs; in set_substream_names() local 101 list_for_each_entry(subs, &str->substreams, list) { in set_substream_names() 103 snprintf(subs->name, sizeof(subs->name), in set_substream_names() 106 subs->number + 1); in set_substream_names() 108 snprintf(subs->name, sizeof(subs->name), in set_substream_names()
|
/sound/pci/ |
D | maestro3.c | 1041 struct snd_pcm_substream *subs) in snd_m3_pcm_start() argument 1043 if (! s || ! subs) in snd_m3_pcm_start() 1047 switch (subs->stream) { in snd_m3_pcm_start() 1068 struct snd_pcm_substream *subs) in snd_m3_pcm_stop() argument 1070 if (! s || ! subs) in snd_m3_pcm_stop() 1076 switch (subs->stream) { in snd_m3_pcm_stop() 1092 snd_m3_pcm_trigger(struct snd_pcm_substream *subs, int cmd) in snd_m3_pcm_trigger() argument 1094 struct snd_m3 *chip = snd_pcm_substream_chip(subs); in snd_m3_pcm_trigger() 1095 struct m3_dma *s = subs->runtime->private_data; in snd_m3_pcm_trigger() 1109 err = snd_m3_pcm_start(chip, s, subs); in snd_m3_pcm_trigger() [all …]
|
/sound/core/ |
D | pcm_local.h | 71 #define for_each_pcm_substream(pcm, str, subs) \ argument 73 for ((subs) = (pcm)->streams[str].substream; (subs); \ 74 (subs) = (subs)->next)
|
/sound/firewire/motu/ |
D | motu-midi.c | 88 struct snd_rawmidi_substream *subs; in set_midi_substream_names() local 90 list_for_each_entry(subs, &str->substreams, list) { in set_midi_substream_names() 91 snprintf(subs->name, sizeof(subs->name), in set_midi_substream_names() 92 "%s MIDI %d", motu->card->shortname, subs->number + 1); in set_midi_substream_names()
|
/sound/firewire/bebob/ |
D | bebob_midi.c | 84 struct snd_rawmidi_substream *subs; in set_midi_substream_names() local 86 list_for_each_entry(subs, &str->substreams, list) { in set_midi_substream_names() 87 snprintf(subs->name, sizeof(subs->name), in set_midi_substream_names() 89 bebob->card->shortname, subs->number + 1); in set_midi_substream_names()
|
/sound/firewire/fireworks/ |
D | fireworks_midi.c | 84 struct snd_rawmidi_substream *subs; in set_midi_substream_names() local 86 list_for_each_entry(subs, &str->substreams, list) { in set_midi_substream_names() 87 snprintf(subs->name, sizeof(subs->name), in set_midi_substream_names() 88 "%s MIDI %d", efw->card->shortname, subs->number + 1); in set_midi_substream_names()
|
/sound/firewire/dice/ |
D | dice-midi.c | 88 struct snd_rawmidi_substream *subs; in set_midi_substream_names() local 90 list_for_each_entry(subs, &str->substreams, list) { in set_midi_substream_names() 91 snprintf(subs->name, sizeof(subs->name), in set_midi_substream_names() 92 "%s MIDI %d", dice->card->shortname, subs->number + 1); in set_midi_substream_names()
|